From bd74b8070b1ded8cdbf8923226bd48fed7f4abb8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 3 Apr 2024 14:29:32 +0000 Subject: [PATCH] update dist --- dist/chrome/background.js | 4 +- dist/chrome/content_script.js | 170 +++++++++---------- dist/chrome/content_start.js | 4 +- dist/chrome/manifest.json | 2 +- dist/chrome/options.js | 172 +++++++++---------- dist/chrome/popup.js | 168 +++++++++---------- dist/firefox/background.js | 4 +- dist/firefox/content_script.js | 170 +++++++++---------- dist/firefox/content_start.js | 4 +- dist/firefox/manifest.json | 2 +- dist/firefox/options.js | 172 +++++++++---------- dist/firefox/popup.js | 168 +++++++++---------- dist/userscript/immersive-translate.user.js | 174 ++++++++++---------- docs/options/options.js | 174 ++++++++++---------- 14 files changed, 694 insertions(+), 694 deletions(-) diff --git a/dist/chrome/background.js b/dist/chrome/background.js index 9a7738d..67a3ec2 100644 --- a/dist/chrome/background.js +++ b/dist/chrome/background.js @@ -1,4 +1,4 @@ -(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -5165,7 +5165,7 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda {{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Rg,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...jl,{type:"password",name:"apikey",required:!0}],props:jl},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},RD={type:W+"ChildFrameToRootFrameIdentifier"};var ND=ut()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general";var ir="user_info",qD=ut()||jt()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",Ql=ut()||jt()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",UD=Ql+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",jD=Ql+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",qg=ut()||jt()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Bi=ut()||jt()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",Ug=ut()||jt()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",jg=ut()||jt()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",Kg=ut()||jt()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",KD=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",WD=Ug+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",HD=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Yl=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Xl=jg+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Zl=Kg+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Jl=qg+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true";var eu=pe().TRANSLATE_FILE_URL,GD=eu+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",VD=eu+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var kr=console,Fi=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let r=performance.now(),a=Math.round(r-this.#e),n=Xe.green;a>1e4?n=Xe.red:a>1e3&&(n=Xe.yellow),kr.debug(Xe.dim(nr+" TIMING:"),e,"in",n(a+"ms")),this.#e=r}},ra=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&kr.log(Xe.dim(nr+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&kr.log(Xe.green(nr+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&kr.warn(Xe.yellow(nr+" WARN:"),...e)}error(...e){this.#e<=3&&kr.error(Xe.red(nr+" ERROR:"),...e)}fatal(...e){this.#e<=4&&kr.error(Xe.red(nr+" FATAL:"),...e)}timing(){return this.level===0?new Fi:{reset:()=>{},stop:()=>{}}}},q=new ra;function Kt(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let r=ta.map(n=>n.toLowerCase()),a=r.indexOf(e);if(a===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let n=r.indexOf(e);return n===-1?"auto":ta[n]}else return"auto";else return ta[a]}function zi(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}var Oi="DENO",Xa="CHROME",Za="FIREFOX";function tu(t){let e=Xa;try{let r=navigator?.userAgent||"";/firefox/i.test(r)||typeof InstallTrigger<"u"?e=Za:/deno/i.test(r)&&(e=Oi)}catch{}return t===Xa&&e===Xa||t===Za&&e===Za||t===Oi&&e===Oi}function Mi(){return tu(Xa)}function ru(){return typeof Deno<"u"}function aa(){return tu(Za)}function au(){return Ut()?"monkey":Mi()?"chrome":aa()?"firefox":Ct()?"safari":null}var nu={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},iu={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:nu,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:nu,query:()=>{},sendMessage:()=>{}}};var T;ru()?T=iu:T=globalThis.immersiveTranslateBrowserAPI;var ou=W+"SyncStoreKey_";function Pt(t,e){let r=ou+t;return T.storage.sync.get(r).then(a=>a[r]===void 0?e:a[r])}function Wt(t,e){let r=ou+t;return T.storage.sync.set({[r]:e})}var Wg=W+"StoreKey_";function na(t,e){let r=Wg+t;return T.storage.local.get(r).then(a=>a[r]===void 0?e:a[r])}var or=W+"CacheKey_";function Hg(t,e){let r=or+t;return T.storage.local.get(r).then(a=>a[r]===void 0?e:a[r])}function Gg(){let t=T.storage.local.refresh;t&&t()}function Vg(t,e){let r=or+t;return T.storage.local.get(r).then(a=>{if(a[r]===void 0)return e;let{value:n,expired:i}=a[r];return i&&ia.startsWith(or)).filter(a=>a!==or+ir);if(r.length>0)return T.storage.local.remove(r)}}var ia={get:Hg,set:Qg,getExpired:Vg,setExpired:$g,remove:Yg,clear:Xg,refresh:Gg};function Zg(t,e){let r=t;return e&&Object.keys(e).forEach(a=>{let n=e[a];if(n===void 0)return;let i=Jg(a);if(typeof n=="object"||i){let o=n;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let l=`<${a}>`,s=r.indexOf(l);if(s!==-1){let u=o.tag||"a",c=r.indexOf(``);if(c!==-1){let d=r.substring(s+l.length,c),h=Object.keys(o).filter(b=>b!=="tag").map(b=>`${b}="${o[b]}"`).join(" ");r=r.replace(`${l}${d}`,`<${u} ${h}>${d}`)}}}else if(n){let o=new RegExp("{"+a+"}","gm");r=r.replace(o,n.toString())}}),r}function su(t,e,r){let a=t[e];if(!a)return r;if(!r)return"";let n=r.split("."),i="";do{i+=n.shift();let o=a[i];o!==void 0&&(typeof o=="object"||!n.length)?(a=o,i=""):n.length?i+=".":a=r}while(n.length);return a}function Ri(t,e,r,a,n){if(!t.hasOwnProperty(r))return e;let i=su(t,r,e);return i===e&&r!==a&&(i=su(t,a,e)),Zg(i,n)}function Jg(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function Ht(t,e,r){return Ri(_t,e,t.config.interfaceLanguage,"en",r)}function lu(t,e){let r=new Date(t),a=r.getFullYear().toString(),n=(r.getMonth()+1).toString().padStart(2,"0"),i=r.getDate().toString().padStart(2,"0"),o=r.getHours().toString().padStart(2,"0"),l=r.getMinutes().toString().padStart(2,"0"),s=r.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",a).replace("MM",n).replace("DD",i).replace("HH",o).replace("mm",l).replace("ss",s)}function uu(t){return new Date(t).getTime()}var Gt=class extends Error{status;constructor(e,r){if(e&&r){super(r),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let r=null;if(r=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!r){let a=Ht.bind(null,e),n=this.getErrorMsg();r={type:"error",title:a("networkError"),errMsg:a("error.serveUnavailable",{serverName:a("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+a("errorReason",{message:n}),action:"changeService"}}return r}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let r=Ht.bind(null,e),a=this.message.startsWith("bingAuth"),n=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(a||n)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let r=Ht.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:r("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+r("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let r=Ht.bind(null,e),a="retry",n="network",i=r("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${r("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${r("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${r("error.openAIExceededQuota")}

${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${r("error.gemini.429")}

${o}`:o=`${r("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${r("error.claude.403")}

${o}`:o=`${r("error.403")}

${o}`:this.status===400?o=`${r("error.400")}

${o}`:this.status===502?o=`${r("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${r("error.subscriptionExpired")}

${o}`,a="setting",n="configError",i=r("error.subscriptionExpiredTitle")),{type:n,title:i,errMsg:o,action:a}}handleFetchError(e){let r=Ht.bind(null,e);if(this.status!==-999)return;let a=this.getErrorMsg();return{type:"network",title:"",errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}handleProUser(e){let r=Ht.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:r("upgradeToProErrorTitle"),errMsg:r("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let r=Ht.bind(null,e);this.message=this.message.replace("ProQuota:","");let a=this.message;try{a=JSON.parse(this.message).error}catch{}let n=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:l,subscriptionTo:s}=n;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let d=this.data?.translationService=="deepl"?"OpenAI":"Deepl",h=this.data?.translationService=="deepl"?"Deepl":"OpenAI",b=r("errorReason",{message:a});if(i=="onetime_7day")b+=r("proQuotaExceededError.onetime7day",{anotherService:d,brandId:Se,href:Yl});else{let E="";h=="OpenAI"?E=Xl:E=Zl,o?b+=r("proQuotaExceededError.trial",{anotherService:d,brandId:Se,href:Jl}):b+=r("proQuotaExceededError.nonTrial",{anotherService:d,brandId:Se,href:E,translationService:h}),!o&&(n.cancelAtPeriodEnd==="false"||uu(s)>l)&&(b+=r("proQuotaExceededError.resetTime",{resetTime:lu(l,"YYYY-MM-DD HH:mm:ss")}))}return b}}};async function Ja(t){let e;if(t&&t.retry&&t.retry>0)try{e=await vn(cu.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(r){throw r&&r.name==="RetryError"&&r.cause?r.cause:r}else e=await cu(t);return e}async function cu(t){t.body;let{url:e,responseType:r,...a}=t;r||(r="json"),a={mode:"cors",...a};let n=!0;t.fetchPolyfill&&(n=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),n){let s=new AbortController,u=s.signal;setTimeout(()=>{s.abort()},o),a.signal=u}let l;try{l=await i(e,a)}catch(s){q.debug("fetch error",e,s);let u=s.message||"Unknown Error";throw new Gt("fetchError",u).initNetWork(-999).initStack(s.stack)}if(l.ok&&l.status>=200&&l.status<400){if(r==="json")return await l.json();if(r==="text")return await l.text();if(r==="raw"){let s=await l.text(),u=Object.fromEntries([...l.headers.entries()]),c=l.url;return c||(l.headers.get("X-Final-URL")?c=l.headers.get("X-Final-URL"):c=e),{body:s,headers:u,status:l.status,statusText:l.statusText,url:c}}else if(r==="stream"){let s="",u;if(l.body&&l.body instanceof ReadableStream)for await(let c of eh(l.body)){let d=new TextDecoder().decode(c);s+=d;let h;for(;(h=s.indexOf(` -`))>=0;){let b=s.slice(0,h).trim();if(s=s.slice(h+1),b.startsWith("event:")||b==="")continue;let E="";if(b.startsWith("data:")&&(E=b.slice(5).trim()),E==="[DONE]")break;let ne;try{ne=JSON.parse(E??"")}catch(V){q.debug("json error",V);continue}u=ne}}return u}}else{let s;try{s=await l.text()}catch(b){q.error("parse response failed",b)}s&&q.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,h=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),h&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new Gt("fetchError",c).initNetWork(l.status)}}async function*eh(t){let e=t.getReader();try{for(;;){let{done:r,value:a}=await e.read();if(r)return;yield a}}finally{e.releaseLock()}}var th=new Map;function du(t){let e=rh(64),r=new CustomEvent(Hl,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((a,n)=>{th.set(e,(i,o)=>{i?n(i):a(o)})})}function rh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var nh="";function Er(){return nh||pu.version}function mu(){try{let t=[pe().EBOOK_BUILDER_URL,pe().EBOOK_VIEWER_URL,pe().SUBTITLE_BUILDER_URL,pe().HTML_VIEWER_URL,pe().PDF_VIEWER_URL].filter(n=>!!n),e=["app.immersivetranslate.com"];ut()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(n=>{let i=new URL(n);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var oa=new Map,sr=class{fromType;logger;constructor(e,r=!1){this.logger=new ra,r&&this.logger.setLevel("debug"),this.fromType=e,oa.has(e)||(oa.set(e,new Map),T.runtime.onMessage.addListener((a,n,i)=>{let o=a.from,l=a.to,s,u,c;n.tab&&n.tab.id&&(s=n.tab.id,o=`${o}:${s}`,u=n.tab.url,c=n.tab.active),this.logger.debug(`${a.to} received message [${a.payload.method}] from ${a.from}`,a.payload.data?a.payload.data:" ");let d=qi(l),{type:h,name:b}=d;if(h!==e)return!1;let E=qi(o),V=oa.get(h).get(b);if(!V)return this.logger.debug(`no message handler for ${h}:${l}, but it's ok`),!1;let{messageHandler:f,sync:me}=V,z={type:e,name:E.name,id:s,url:u,active:c};if(me){try{let J=f(a.payload,z);i({ok:!0,data:J})}catch(J){i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.details,errorStatus:J.status})}return!1}else return f(a.payload,z).then(J=>{i({ok:!0,data:J})}).catch(J=>{i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.message,errorStatus:J.status})}),!0}))}getConnection(e,r,a){let n=!1;a&&a.sync&&(n=!0);let i=this.fromType,o=oa.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Ni(`${i}:${e}`,this.logger);return oa.get(i).set(e,{messageHandler:r,sync:n,connectionInstance:l}),l}}},Ni=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let a=qi(e),{type:n,id:i}=a;if(n!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await T.runtime.sendMessage(o);return gu(o,l,this.logger)}catch(l){if(n==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await T.tabs.sendMessage(i,o);return gu(o,l,this.logger)}}};function gu(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new Gt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new Gt("noResponse","Unknown error")}function qi(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let a=parseInt(e[2]);if(!isNaN(a))r.id=a;else throw new Error("tab id not a valid number")}return r}var ih="";function Ui(){return ih||globalThis.navigator.userAgent}function hu(){return Ui().includes("ImtFxiOS")}function oh(){return Ui().includes("ImtFxAndroid")}function ji(){let t=Ui();if(hu()||oh()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),a=r[0];return r[2]&&(a+="_"+r[2]),{name:a,version:r[1]}}}return null}var en;function sh(){return en||(en=new sr("content_script",!1).getConnection("pure_main",()=>{}),en)}var fu="G-MKMD9LWFTR";async function Tu(t){try{let e=pe(),r=e.INSTALL_FROM==="firefox_store";if(ji()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let n=Ut(),i=mu(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Pt("fakeUserId","");s||(s=await na("fakeUserId",""),s&&await Wt("fakeUserId",s));let u=Er(),c=new Date,d=await Pt("installedAt","");d||(d=await na("installedAt",""),d&&await Wt("installedAt",d)),s?d||(d=new Date(0).toISOString(),await Wt("installedAt",d)):(s=lh(32),await Wt("fakeUserId",s)),d||(d=c.toISOString(),await Wt("installedAt",d));let h=new Date(d),b=bu(h),E=bu(c),ne=b===E,V=c.getTime()-h.getTime()<7*24*60*60*1e3,f=`https://www.google-analytics.com/mp/collect?measurement_id=${fu}&api_secret=${l}`;o||(f=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${fu}&api_secret=${l}`);let me="";typeof navigator<"u"&&(me=window.navigator.userAgent);let z=ya.parse(me),J=t.map(C=>{let g=C.params||{};if(z.os&&(g.os_name=z.os.name||"unknown",g.os_version=z.os.version||"unknown",g.os_version_name=z.os.versionName||"unknown"),z.browser){g.browser_name=z.browser.name||"unknown",g.browser_version=z.browser.version||"unknown";let S=ji();S&&(g.browser_name=S.name,g.browser_version=S.version)}return z.platform&&(g.platform_type=z.platform.type||"unknown"),z.engine&&(g.engine_name=z.engine.name||"unknown",g.engine_version=z.engine.version||"unknown"),u&&(g.version=u),e.INSTALL_FROM&&(g.install_from=e.INSTALL_FROM),b&&(g.install_day=uh(h)),g.userscript=n.toString(),ne?g.is_new_user_today="1":g.is_new_user_today="0",V?g.is_new_user_this_week="1":g.is_new_user_this_week="0",i?g.main_frame=0:g.main_frame=1,{...C,params:g}}),ue=await dh({responseType:"text",url:f,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:J})})}catch{}}function lh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} +`))>=0;){let b=s.slice(0,h).trim();if(s=s.slice(h+1),b.startsWith("event:")||b==="")continue;let E="";if(b.startsWith("data:")&&(E=b.slice(5).trim()),E==="[DONE]")break;let ne;try{ne=JSON.parse(E??"")}catch(V){q.debug("json error",V);continue}u=ne}}return u}}else{let s;try{s=await l.text()}catch(b){q.error("parse response failed",b)}s&&q.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,h=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),h&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new Gt("fetchError",c).initNetWork(l.status)}}async function*eh(t){let e=t.getReader();try{for(;;){let{done:r,value:a}=await e.read();if(r)return;yield a}}finally{e.releaseLock()}}var th=new Map;function du(t){let e=rh(64),r=new CustomEvent(Hl,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((a,n)=>{th.set(e,(i,o)=>{i?n(i):a(o)})})}function rh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var nh="";function Er(){return nh||pu.version}function mu(){try{let t=[pe().EBOOK_BUILDER_URL,pe().EBOOK_VIEWER_URL,pe().SUBTITLE_BUILDER_URL,pe().HTML_VIEWER_URL,pe().PDF_VIEWER_URL].filter(n=>!!n),e=["app.immersivetranslate.com"];ut()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(n=>{let i=new URL(n);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var oa=new Map,sr=class{fromType;logger;constructor(e,r=!1){this.logger=new ra,r&&this.logger.setLevel("debug"),this.fromType=e,oa.has(e)||(oa.set(e,new Map),T.runtime.onMessage.addListener((a,n,i)=>{let o=a.from,l=a.to,s,u,c;n.tab&&n.tab.id&&(s=n.tab.id,o=`${o}:${s}`,u=n.tab.url,c=n.tab.active),this.logger.debug(`${a.to} received message [${a.payload.method}] from ${a.from}`,a.payload.data?a.payload.data:" ");let d=qi(l),{type:h,name:b}=d;if(h!==e)return!1;let E=qi(o),V=oa.get(h).get(b);if(!V)return this.logger.debug(`no message handler for ${h}:${l}, but it's ok`),!1;let{messageHandler:f,sync:me}=V,z={type:e,name:E.name,id:s,url:u,active:c};if(me){try{let J=f(a.payload,z);i({ok:!0,data:J})}catch(J){i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.details,errorStatus:J.status})}return!1}else return f(a.payload,z).then(J=>{i({ok:!0,data:J})}).catch(J=>{i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.message,errorStatus:J.status})}),!0}))}getConnection(e,r,a){let n=!1;a&&a.sync&&(n=!0);let i=this.fromType,o=oa.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Ni(`${i}:${e}`,this.logger);return oa.get(i).set(e,{messageHandler:r,sync:n,connectionInstance:l}),l}}},Ni=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let a=qi(e),{type:n,id:i}=a;if(n!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await T.runtime.sendMessage(o);return gu(o,l,this.logger)}catch(l){if(n==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await T.tabs.sendMessage(i,o);return gu(o,l,this.logger)}}};function gu(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new Gt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new Gt("noResponse","Unknown error")}function qi(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let a=parseInt(e[2]);if(!isNaN(a))r.id=a;else throw new Error("tab id not a valid number")}return r}var ih="";function Ui(){return ih||globalThis.navigator.userAgent}function hu(){return Ui().includes("ImtFxiOS")}function oh(){return Ui().includes("ImtFxAndroid")}function ji(){let t=Ui();if(hu()||oh()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),a=r[0];return r[2]&&(a+="_"+r[2]),{name:a,version:r[1]}}}return null}var en;function sh(){return en||(en=new sr("content_script",!1).getConnection("pure_main",()=>{}),en)}var fu="G-MKMD9LWFTR";async function Tu(t){try{let e=pe(),r=e.INSTALL_FROM==="firefox_store";if(ji()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let n=Ut(),i=mu(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Pt("fakeUserId","");s||(s=await na("fakeUserId",""),s&&await Wt("fakeUserId",s));let u=Er(),c=new Date,d=await Pt("installedAt","");d||(d=await na("installedAt",""),d&&await Wt("installedAt",d)),s?d||(d=new Date(0).toISOString(),await Wt("installedAt",d)):(s=lh(32),await Wt("fakeUserId",s)),d||(d=c.toISOString(),await Wt("installedAt",d));let h=new Date(d),b=bu(h),E=bu(c),ne=b===E,V=c.getTime()-h.getTime()<7*24*60*60*1e3,f=`https://www.google-analytics.com/mp/collect?measurement_id=${fu}&api_secret=${l}`;o||(f=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${fu}&api_secret=${l}`);let me="";typeof navigator<"u"&&(me=window.navigator.userAgent);let z=ya.parse(me),J=t.map(C=>{let g=C.params||{};if(z.os&&(g.os_name=z.os.name||"unknown",g.os_version=z.os.version||"unknown",g.os_version_name=z.os.versionName||"unknown"),z.browser){g.browser_name=z.browser.name||"unknown",g.browser_version=z.browser.version||"unknown";let S=ji();S&&(g.browser_name=S.name,g.browser_version=S.version)}return z.platform&&(g.platform_type=z.platform.type||"unknown"),z.engine&&(g.engine_name=z.engine.name||"unknown",g.engine_version=z.engine.version||"unknown"),u&&(g.version=u),e.INSTALL_FROM&&(g.install_from=e.INSTALL_FROM),b&&(g.install_day=uh(h)),g.userscript=n.toString(),ne?g.is_new_user_today="1":g.is_new_user_today="0",V?g.is_new_user_this_week="1":g.is_new_user_this_week="0",i?g.main_frame=0:g.main_frame=1,{...C,params:g}}),ue=await dh({responseType:"text",url:f,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:J})})}catch{}}function lh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 diff --git a/dist/chrome/content_script.js b/dist/chrome/content_script.js index f990db6..27ae752 100644 --- a/dist/chrome/content_script.js +++ b/dist/chrome/content_script.js @@ -1,4 +1,4 @@ -(()=>{var e6=Object.create;var gd=Object.defineProperty;var t6=Object.getOwnPropertyDescriptor;var n6=Object.getOwnPropertyNames;var r6=Object.getPrototypeOf,a6=Object.prototype.hasOwnProperty;var i6=(t,e)=>()=>(t&&(e=t(t=0)),e);var o6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),eu=(t,e)=>{for(var n in e)gd(t,n,{get:e[n],enumerable:!0})},s6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of n6(e))!a6.call(t,a)&&a!==n&&gd(t,a,{get:()=>e[a],enumerable:!(r=t6(e,a))||r.enumerable});return t};var u6=(t,e,n)=>(n=t!=null?e6(r6(t)):{},s6(e||!t||!t.__esModule?gd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=i6(()=>{x={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var e6=Object.create;var pd=Object.defineProperty;var t6=Object.getOwnPropertyDescriptor;var n6=Object.getOwnPropertyNames;var r6=Object.getPrototypeOf,a6=Object.prototype.hasOwnProperty;var i6=(t,e)=>()=>(t&&(e=t(t=0)),e);var o6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),eu=(t,e)=>{for(var n in e)pd(t,n,{get:e[n],enumerable:!0})},s6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of n6(e))!a6.call(t,a)&&a!==n&&pd(t,a,{get:()=>e[a],enumerable:!(r=t6(e,a))||r.enumerable});return t};var u6=(t,e,n)=>(n=t!=null?e6(r6(t)):{},s6(e||!t||!t.__esModule?pd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=i6(()=>{x={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,7 +4936,7 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var F2=o6((ec,As)=>{d();(function(){var t;function e(f){var T,b,h="",E=-1,D;if(f&&f.length)for(D=f.length;(E+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,E,D,M=[],I;if(T=b=h=E=D=0,f&&f.length)for(I=f.length,f+="";T191&&h<224?(E=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|E&63),T+=2):(E=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(E&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",E,D=0,M=f.length;D>>4&15)+b.charAt(E&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function m(f,T){var b=T.length,h=Array(),E,D,M,I,S,y,L,A;for(y=Array(Math.ceil(f.length/2)),I=y.length,E=0;E0;){for(S=Array(),M=0,E=0;E0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(L="",E=h.length-1;E>=0;E--)L+=T.charAt(h[E]);for(A=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),E=L.length;Ef.length*8?h+=T:h+=b.charAt(I>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(E){var D,M,I,S="";for(T=T||"=",E=h?e(E):E,len=E.length,D=0;Dlen*8?S+=T:S+=f.charAt(I>>>6*(3-M)&63);return S},this.decode=function(E){var D,M,I,S,y,L,A,v,O,_,k="",N=[];if(!E)return E;D=_=0,E=E.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(E.charAt(D++)),L=f.indexOf(E.charAt(D++)),A=f.indexOf(E.charAt(D++)),v=f.indexOf(E.charAt(D++)),O=y<<18|L<<12|A<<6|v,M=O>>16&255,I=O>>8&255,S=O&255,_+=1,A===64?N[_]=String.fromCharCode(M):v===64?N[_]=String.fromCharCode(M,I):N[_]=String.fromCharCode(M,I,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(E(v,h),T)},this.b64=function(v){return g(E(v),b)},this.any=function(v,O){return m(E(v,h),O)},this.raw=function(v){return E(v,h)},this.hex_hmac=function(v,O){return i(D(v,O),T)},this.b64_hmac=function(v,O){return g(D(v,O),b)},this.any_hmac=function(v,O,_){return m(D(v,O),_)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function E(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,O){var _,k,N,z,q;for(v=h?e(v):v,O=h?e(O):O,_=c(v),_.length>16&&(_=M(_,v.length*8)),k=Array(16),N=Array(16),q=0;q<16;q+=1)k[q]=_[q]^909522486,N[q]=_[q]^1549556828;return z=M(k.concat(c(O)),512+O.length*8),l(M(N.concat(z),512+128))}function M(v,O){var _,k,N,z,q,F=1732584193,C=-271733879,P=-1732584194,U=271733878;for(v[O>>5]|=128<>>9<<4)+14]=O,_=0;_16&&(A=M(A,y.length*8)),v=Array(16),O=Array(16),_=0;_<16;_+=1)v[_]=A[_]^909522486,O[_]=A[_]^1549556828;return k=M(v.concat(p(L)),512+L.length*8),u(M(O.concat(k),512+160))}function M(y,L){var A,v,O,_,k,N,z,q,F=Array(80),C=1732584193,P=-271733879,U=-1732584194,H=271733878,j=-1009589776;for(y[L>>5]|=128<<24-L%32,y[(L+64>>9<<4)+15]=L,A=0;A16&&(j=F(j,C.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return U=F(W.concat(p(P)),512+P.length*8),u(F(V.concat(U),512+256))}function I(C,P){return C>>>P|C<<32-P}function S(C,P){return C>>>P}function y(C,P,U){return C&P^~C&U}function L(C,P,U){return C&P^C&U^P&U}function A(C){return I(C,2)^I(C,13)^I(C,22)}function v(C){return I(C,6)^I(C,11)^I(C,25)}function O(C){return I(C,7)^I(C,18)^S(C,3)}function _(C){return I(C,17)^I(C,19)^S(C,10)}function k(C){return I(C,28)^I(C,34)^I(C,39)}function N(C){return I(C,14)^I(C,18)^I(C,41)}function z(C){return I(C,1)^I(C,8)^S(C,7)}function q(C){return I(C,19)^I(C,61)^S(C,6)}E=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function F(C,P){var U=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,ue,ae,J,ie,ge,ee,Y,be,ne;for(C[P>>5]|=128<<24-P%32,C[(P+64>>9<<4)+15]=P,ee=0;ee32&&(C=I(C,N.length*8));F<32;F+=1)P[F]=C[F]^909522486,U[F]=C[F]^1549556828;return q=I(P.concat(p(z)),1024+z.length*8),u(I(U.concat(q),1024+512))}function I(N,z){var q,F,C,P=new Array(80),U=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),ue=new S(0,0),ae=new S(0,0),J=new S(0,0),ie=new S(0,0),ge=new S(0,0),ee=new S(0,0),Y=new S(0,0),be=new S(0,0),ne=new S(0,0),re=new S(0,0),xe=new S(0,0),ze=new S(0,0),_e=new S(0,0),de=new S(0,0);for(E===void 0&&(E=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),F=0;F<80;F+=1)P[F]=new S(0,0);for(N[z>>5]|=128<<24-(z&31),N[(z+128>>10<<5)+31]=z,C=N.length,F=0;F>>q|z.h<<32-q,N.h=z.h>>>q|z.l<<32-q}function A(N,z,q){N.l=z.h>>>q|z.l<<32-q,N.h=z.l>>>q|z.h<<32-q}function v(N,z,q){N.l=z.l>>>q|z.h<<32-q,N.h=z.h>>>q}function O(N,z,q){var F=(z.l&65535)+(q.l&65535),C=(z.l>>>16)+(q.l>>>16)+(F>>>16),P=(z.h&65535)+(q.h&65535)+(C>>>16),U=(z.h>>>16)+(q.h>>>16)+(P>>>16);N.l=F&65535|C<<16,N.h=P&65535|U<<16}function _(N,z,q,F,C){var P=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535),U=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P>>>16),H=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(U>>>16),j=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(H>>>16);N.l=P&65535|U<<16,N.h=H&65535|j<<16}function k(N,z,q,F,C,P){var U=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535)+(P.l&65535),H=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P.l>>>16)+(U>>>16),j=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(P.h&65535)+(H>>>16),W=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(P.h>>>16)+(j>>>16);N.l=U&65535|H<<16,N.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(k){return i(S(k,h))},this.b64=function(k){return g(S(k,h),b)},this.any=function(k,N){return m(S(k,h),N)},this.raw=function(k){return S(k,h)},this.hex_hmac=function(k,N){return i(y(k,N))},this.b64_hmac=function(k,N){return g(y(k,N),b)},this.any_hmac=function(k,N,z){return m(y(k,N),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(k){return typeof k=="boolean"&&(T=k),this},this.setPad=function(k){return typeof k<"u"&&(b=k),this},this.setUTF8=function(k){return typeof k=="boolean"&&(h=k),this};function S(k){return k=h?e(k):k,L(A(c(k),k.length*8))}function y(k,N){k=h?e(k):k,N=h?e(N):N;var z,q,F=c(k),C=Array(16),P=Array(16);for(F.length>16&&(F=A(F,k.length*8)),z=0;z<16;z+=1)C[z]=F[z]^909522486,P[z]=F[z]^1549556828;return q=A(C.concat(c(N)),512+N.length*8),L(A(P.concat(q),512+160))}function L(k){var N,z="",q=k.length*32;for(N=0;N>5]>>>N%32&255);return z}function A(k,N){var z,q,F,C,P=1732584193,U=4023233417,H=2562383102,j=271733878,W=3285377520,V,ue,ae,J,ie,ge,ee,Y,be,ne;for(k[N>>5]|=128<>>9<<4)+14]=N,C=k.length,F=0;Ffunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},f6=(t,e)=>{for(var n in e)fd(t,n,{get:e[n],enumerable:!0})},md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!g6.call(t,a)&&a!==n&&fd(t,a,{get:()=>e[a],enumerable:!(r=d6(e,a))||r.enumerable});return t},h6=(t,e,n)=>(md(t,e,"default"),n&&md(n,e,"default")),yf=(t,e,n)=>(n=t!=null?c6(p6(t)):{},md(e||!t||!t.__esModule?fd(n,"default",{value:t,enumerable:!0}):n,t)),vf=m6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,L=void 0){super(L),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(...L)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||L.length<=1&&y.singleCallbackArg!==!1?S.resolve(L[0]):S.resolve(L)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(A,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((O,_)=>{if(y.fallbackToNoCallback)try{A[S](...v,l({resolve:O,reject:_},y))}catch{A[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,O()}else y.noCallback?(A[S](...v),O()):A[S](...v,l({resolve:O,reject:_},y))})},m=(S,y,L)=>new Proxy(y,{apply(A,v,O){return L.call(v,S,...O)}}),g=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},L={})=>{let A=Object.create(null),v={has(_,k){return k in S||k in A},get(_,k,N){if(k in A)return A[k];if(!(k in S))return;let z=S[k];if(typeof z=="function")if(typeof y[k]=="function")z=m(S,S[k],y[k]);else if(g(L,k)){let q=p(k,L[k]);z=m(S,S[k],q)}else z=z.bind(S);else if(typeof z=="object"&&z!==null&&(g(y,k)||g(L,k)))z=f(z,y[k],L[k]);else if(g(L,"*"))z=f(z,y[k],L["*"]);else return Object.defineProperty(A,k,{configurable:!0,enumerable:!0,get(){return S[k]},set(q){S[k]=q}}),z;return A[k]=z,z},set(_,k,N,z){return k in A?A[k]=N:S[k]=N,!0},defineProperty(_,k,N){return Reflect.defineProperty(A,k,N)},deleteProperty(_,k){return Reflect.deleteProperty(A,k)}},O=Object.create(S);return new Proxy(O,v)},T=S=>({addListener(y,L,...A){y.addListener(S.get(L),...A)},hasListener(y,L){return y.hasListener(S.get(L))},removeListener(y,L){y.removeListener(S.get(L))}}),b=new s(S=>typeof S!="function"?S:function(L){let A=f(L,{},{getContent:{minArgs:0,maxArgs:0}});S(A)}),h=new s(S=>typeof S!="function"?S:function(L,A,v){let O=!1,_,k=new Promise(F=>{_=function(C){O=!0,F(C)}}),N;try{N=S(L,A,_)}catch(F){N=Promise.reject(F)}let z=N!==!0&&u(N);if(N!==!0&&!z&&!O)return!1;let q=F=>{F.then(C=>{v(C)},C=>{let P;C&&(C instanceof Error||typeof C.message=="string")?P=C.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(C=>{})};return q(z?N:k),!0}),E=({reject:S,resolve:y},L)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):L&&L.__mozWebExtensionPolyfillReject__?S(new Error(L.message)):y(L)},D=(S,y,L,...A)=>{if(A.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${A.length}`);return new Promise((v,O)=>{let _=E.bind(null,{resolve:v,reject:O});A.push(_),L.sendMessage(...A)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},I={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":I},services:{"*":I},websites:{"*":I}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};f6(Sf,{default:()=>tu});var b6=yf(vf());h6(Sf,yf(vf()));var{default:bf,...T6}=b6,tu=bf!==void 0?bf:T6;globalThis.immersiveTranslateBrowserAPI=tu;d();d();d();d();var y6=` +`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var F2=o6((ec,ks)=>{d();(function(){var t;function e(f){var T,b,h="",E=-1,D;if(f&&f.length)for(D=f.length;(E+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,E,D,M=[],I;if(T=b=h=E=D=0,f&&f.length)for(I=f.length,f+="";T191&&h<224?(E=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|E&63),T+=2):(E=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(E&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",E,D=0,M=f.length;D>>4&15)+b.charAt(E&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function m(f,T){var b=T.length,h=Array(),E,D,M,I,S,y,L,A;for(y=Array(Math.ceil(f.length/2)),I=y.length,E=0;E0;){for(S=Array(),M=0,E=0;E0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(L="",E=h.length-1;E>=0;E--)L+=T.charAt(h[E]);for(A=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),E=L.length;Ef.length*8?h+=T:h+=b.charAt(I>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(E){var D,M,I,S="";for(T=T||"=",E=h?e(E):E,len=E.length,D=0;Dlen*8?S+=T:S+=f.charAt(I>>>6*(3-M)&63);return S},this.decode=function(E){var D,M,I,S,y,L,A,v,O,_,k="",N=[];if(!E)return E;D=_=0,E=E.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(E.charAt(D++)),L=f.indexOf(E.charAt(D++)),A=f.indexOf(E.charAt(D++)),v=f.indexOf(E.charAt(D++)),O=y<<18|L<<12|A<<6|v,M=O>>16&255,I=O>>8&255,S=O&255,_+=1,A===64?N[_]=String.fromCharCode(M):v===64?N[_]=String.fromCharCode(M,I):N[_]=String.fromCharCode(M,I,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(E(v,h),T)},this.b64=function(v){return g(E(v),b)},this.any=function(v,O){return m(E(v,h),O)},this.raw=function(v){return E(v,h)},this.hex_hmac=function(v,O){return i(D(v,O),T)},this.b64_hmac=function(v,O){return g(D(v,O),b)},this.any_hmac=function(v,O,_){return m(D(v,O),_)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function E(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,O){var _,k,N,z,q;for(v=h?e(v):v,O=h?e(O):O,_=c(v),_.length>16&&(_=M(_,v.length*8)),k=Array(16),N=Array(16),q=0;q<16;q+=1)k[q]=_[q]^909522486,N[q]=_[q]^1549556828;return z=M(k.concat(c(O)),512+O.length*8),l(M(N.concat(z),512+128))}function M(v,O){var _,k,N,z,q,F=1732584193,C=-271733879,P=-1732584194,U=271733878;for(v[O>>5]|=128<>>9<<4)+14]=O,_=0;_16&&(A=M(A,y.length*8)),v=Array(16),O=Array(16),_=0;_<16;_+=1)v[_]=A[_]^909522486,O[_]=A[_]^1549556828;return k=M(v.concat(p(L)),512+L.length*8),u(M(O.concat(k),512+160))}function M(y,L){var A,v,O,_,k,N,z,q,F=Array(80),C=1732584193,P=-271733879,U=-1732584194,H=271733878,j=-1009589776;for(y[L>>5]|=128<<24-L%32,y[(L+64>>9<<4)+15]=L,A=0;A16&&(j=F(j,C.length*8));H<16;H+=1)W[H]=j[H]^909522486,$[H]=j[H]^1549556828;return U=F(W.concat(p(P)),512+P.length*8),u(F($.concat(U),512+256))}function I(C,P){return C>>>P|C<<32-P}function S(C,P){return C>>>P}function y(C,P,U){return C&P^~C&U}function L(C,P,U){return C&P^C&U^P&U}function A(C){return I(C,2)^I(C,13)^I(C,22)}function v(C){return I(C,6)^I(C,11)^I(C,25)}function O(C){return I(C,7)^I(C,18)^S(C,3)}function _(C){return I(C,17)^I(C,19)^S(C,10)}function k(C){return I(C,28)^I(C,34)^I(C,39)}function N(C){return I(C,14)^I(C,18)^I(C,41)}function z(C){return I(C,1)^I(C,8)^S(C,7)}function q(C){return I(C,19)^I(C,61)^S(C,6)}E=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function F(C,P){var U=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,$,ue,ae,J,ie,ge,ee,Y,Te,ne;for(C[P>>5]|=128<<24-P%32,C[(P+64>>9<<4)+15]=P,ee=0;ee32&&(C=I(C,N.length*8));F<32;F+=1)P[F]=C[F]^909522486,U[F]=C[F]^1549556828;return q=I(P.concat(p(z)),1024+z.length*8),u(I(U.concat(q),1024+512))}function I(N,z){var q,F,C,P=new Array(80),U=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),$=new S(0,0),ue=new S(0,0),ae=new S(0,0),J=new S(0,0),ie=new S(0,0),ge=new S(0,0),ee=new S(0,0),Y=new S(0,0),Te=new S(0,0),ne=new S(0,0),re=new S(0,0),xe=new S(0,0),ze=new S(0,0),_e=new S(0,0),de=new S(0,0);for(E===void 0&&(E=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),F=0;F<80;F+=1)P[F]=new S(0,0);for(N[z>>5]|=128<<24-(z&31),N[(z+128>>10<<5)+31]=z,C=N.length,F=0;F>>q|z.h<<32-q,N.h=z.h>>>q|z.l<<32-q}function A(N,z,q){N.l=z.h>>>q|z.l<<32-q,N.h=z.l>>>q|z.h<<32-q}function v(N,z,q){N.l=z.l>>>q|z.h<<32-q,N.h=z.h>>>q}function O(N,z,q){var F=(z.l&65535)+(q.l&65535),C=(z.l>>>16)+(q.l>>>16)+(F>>>16),P=(z.h&65535)+(q.h&65535)+(C>>>16),U=(z.h>>>16)+(q.h>>>16)+(P>>>16);N.l=F&65535|C<<16,N.h=P&65535|U<<16}function _(N,z,q,F,C){var P=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535),U=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P>>>16),H=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(U>>>16),j=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(H>>>16);N.l=P&65535|U<<16,N.h=H&65535|j<<16}function k(N,z,q,F,C,P){var U=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535)+(P.l&65535),H=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P.l>>>16)+(U>>>16),j=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(P.h&65535)+(H>>>16),W=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(P.h>>>16)+(j>>>16);N.l=U&65535|H<<16,N.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(k){return i(S(k,h))},this.b64=function(k){return g(S(k,h),b)},this.any=function(k,N){return m(S(k,h),N)},this.raw=function(k){return S(k,h)},this.hex_hmac=function(k,N){return i(y(k,N))},this.b64_hmac=function(k,N){return g(y(k,N),b)},this.any_hmac=function(k,N,z){return m(y(k,N),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(k){return typeof k=="boolean"&&(T=k),this},this.setPad=function(k){return typeof k<"u"&&(b=k),this},this.setUTF8=function(k){return typeof k=="boolean"&&(h=k),this};function S(k){return k=h?e(k):k,L(A(c(k),k.length*8))}function y(k,N){k=h?e(k):k,N=h?e(N):N;var z,q,F=c(k),C=Array(16),P=Array(16);for(F.length>16&&(F=A(F,k.length*8)),z=0;z<16;z+=1)C[z]=F[z]^909522486,P[z]=F[z]^1549556828;return q=A(C.concat(c(N)),512+N.length*8),L(A(P.concat(q),512+160))}function L(k){var N,z="",q=k.length*32;for(N=0;N>5]>>>N%32&255);return z}function A(k,N){var z,q,F,C,P=1732584193,U=4023233417,H=2562383102,j=271733878,W=3285377520,$,ue,ae,J,ie,ge,ee,Y,Te,ne;for(k[N>>5]|=128<>>9<<4)+14]=N,C=k.length,F=0;Ffunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},f6=(t,e)=>{for(var n in e)md(t,n,{get:e[n],enumerable:!0})},gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!g6.call(t,a)&&a!==n&&md(t,a,{get:()=>e[a],enumerable:!(r=d6(e,a))||r.enumerable});return t},h6=(t,e,n)=>(gd(t,e,"default"),n&&gd(n,e,"default")),yf=(t,e,n)=>(n=t!=null?c6(p6(t)):{},gd(e||!t||!t.__esModule?md(n,"default",{value:t,enumerable:!0}):n,t)),vf=m6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,L=void 0){super(L),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(...L)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||L.length<=1&&y.singleCallbackArg!==!1?S.resolve(L[0]):S.resolve(L)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(A,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((O,_)=>{if(y.fallbackToNoCallback)try{A[S](...v,l({resolve:O,reject:_},y))}catch{A[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,O()}else y.noCallback?(A[S](...v),O()):A[S](...v,l({resolve:O,reject:_},y))})},m=(S,y,L)=>new Proxy(y,{apply(A,v,O){return L.call(v,S,...O)}}),g=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},L={})=>{let A=Object.create(null),v={has(_,k){return k in S||k in A},get(_,k,N){if(k in A)return A[k];if(!(k in S))return;let z=S[k];if(typeof z=="function")if(typeof y[k]=="function")z=m(S,S[k],y[k]);else if(g(L,k)){let q=p(k,L[k]);z=m(S,S[k],q)}else z=z.bind(S);else if(typeof z=="object"&&z!==null&&(g(y,k)||g(L,k)))z=f(z,y[k],L[k]);else if(g(L,"*"))z=f(z,y[k],L["*"]);else return Object.defineProperty(A,k,{configurable:!0,enumerable:!0,get(){return S[k]},set(q){S[k]=q}}),z;return A[k]=z,z},set(_,k,N,z){return k in A?A[k]=N:S[k]=N,!0},defineProperty(_,k,N){return Reflect.defineProperty(A,k,N)},deleteProperty(_,k){return Reflect.deleteProperty(A,k)}},O=Object.create(S);return new Proxy(O,v)},T=S=>({addListener(y,L,...A){y.addListener(S.get(L),...A)},hasListener(y,L){return y.hasListener(S.get(L))},removeListener(y,L){y.removeListener(S.get(L))}}),b=new s(S=>typeof S!="function"?S:function(L){let A=f(L,{},{getContent:{minArgs:0,maxArgs:0}});S(A)}),h=new s(S=>typeof S!="function"?S:function(L,A,v){let O=!1,_,k=new Promise(F=>{_=function(C){O=!0,F(C)}}),N;try{N=S(L,A,_)}catch(F){N=Promise.reject(F)}let z=N!==!0&&u(N);if(N!==!0&&!z&&!O)return!1;let q=F=>{F.then(C=>{v(C)},C=>{let P;C&&(C instanceof Error||typeof C.message=="string")?P=C.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(C=>{})};return q(z?N:k),!0}),E=({reject:S,resolve:y},L)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):L&&L.__mozWebExtensionPolyfillReject__?S(new Error(L.message)):y(L)},D=(S,y,L,...A)=>{if(A.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${A.length}`);return new Promise((v,O)=>{let _=E.bind(null,{resolve:v,reject:O});A.push(_),L.sendMessage(...A)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},I={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":I},services:{"*":I},websites:{"*":I}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};f6(Sf,{default:()=>tu});var b6=yf(vf());h6(Sf,yf(vf()));var{default:bf,...T6}=b6,tu=bf!==void 0?bf:T6;globalThis.immersiveTranslateBrowserAPI=tu;d();d();d();d();var y6=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5019,35 +5019,35 @@ select.text-gray-6 { max-width: fit-content; } } -`,hd="immersive-translate-toastify-shadow-root",bd=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(hd)){let e=document.getElementById(hd);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=hd,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=y6,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function nu(t){t=t||{},new bd({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Rn(){return we.PROD_API==="1"}function xf(){return we.HAS_CSP_ERROR=="1"}function et(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function ru(){return typeof Deno<"u"}var cP=Me().PROD==="1",di=Me().PROD!=="1";function au(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();d();d();d();d();function pi(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Td=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function iu(t,e){let n=pi(),r=setTimeout(()=>n.reject(new Td),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function vr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ef=class{#e=0;#t=[];#n=[];#r=pi();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eG6,bgBlue:()=>Q6,bgBrightBlack:()=>eS,bgBrightBlue:()=>aS,bgBrightCyan:()=>oS,bgBrightGreen:()=>nS,bgBrightMagenta:()=>iS,bgBrightRed:()=>tS,bgBrightWhite:()=>sS,bgBrightYellow:()=>rS,bgCyan:()=>Z6,bgGreen:()=>$6,bgMagenta:()=>J6,bgRed:()=>V6,bgRgb24:()=>dS,bgRgb8:()=>lS,bgWhite:()=>X6,bgYellow:()=>Y6,black:()=>L6,blue:()=>B6,bold:()=>E6,brightBlack:()=>Df,brightBlue:()=>j6,brightCyan:()=>W6,brightGreen:()=>U6,brightMagenta:()=>H6,brightRed:()=>N6,brightWhite:()=>K6,brightYellow:()=>q6,cyan:()=>R6,dim:()=>C6,getColorEnabled:()=>S6,gray:()=>z6,green:()=>F6,hidden:()=>k6,inverse:()=>A6,italic:()=>w6,magenta:()=>I6,red:()=>_6,reset:()=>x6,rgb24:()=>cS,rgb8:()=>uS,setColorEnabled:()=>v6,strikethrough:()=>P6,stripColor:()=>gS,underline:()=>D6,white:()=>O6,yellow:()=>M6});d();var{Deno:Cf}=globalThis,wf=typeof Cf?.noColor=="boolean"?Cf.noColor:!0,yd=!wf;function v6(t){wf||(yd=t)}function S6(){return yd}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return yd?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function x6(t){return Pe(t,ke([0],0))}function E6(t){return Pe(t,ke([1],22))}function C6(t){return Pe(t,ke([2],22))}function w6(t){return Pe(t,ke([3],23))}function D6(t){return Pe(t,ke([4],24))}function A6(t){return Pe(t,ke([7],27))}function k6(t){return Pe(t,ke([8],28))}function P6(t){return Pe(t,ke([9],29))}function L6(t){return Pe(t,ke([30],39))}function _6(t){return Pe(t,ke([31],39))}function F6(t){return Pe(t,ke([32],39))}function M6(t){return Pe(t,ke([33],39))}function B6(t){return Pe(t,ke([34],39))}function I6(t){return Pe(t,ke([35],39))}function R6(t){return Pe(t,ke([36],39))}function O6(t){return Pe(t,ke([37],39))}function z6(t){return Df(t)}function Df(t){return Pe(t,ke([90],39))}function N6(t){return Pe(t,ke([91],39))}function U6(t){return Pe(t,ke([92],39))}function q6(t){return Pe(t,ke([93],39))}function j6(t){return Pe(t,ke([94],39))}function H6(t){return Pe(t,ke([95],39))}function W6(t){return Pe(t,ke([96],39))}function K6(t){return Pe(t,ke([97],39))}function G6(t){return Pe(t,ke([40],49))}function V6(t){return Pe(t,ke([41],49))}function $6(t){return Pe(t,ke([42],49))}function Y6(t){return Pe(t,ke([43],49))}function Q6(t){return Pe(t,ke([44],49))}function J6(t){return Pe(t,ke([45],49))}function Z6(t){return Pe(t,ke([46],49))}function X6(t){return Pe(t,ke([47],49))}function eS(t){return Pe(t,ke([100],49))}function tS(t){return Pe(t,ke([101],49))}function nS(t){return Pe(t,ke([102],49))}function rS(t){return Pe(t,ke([103],49))}function aS(t){return Pe(t,ke([104],49))}function iS(t){return Pe(t,ke([105],49))}function oS(t){return Pe(t,ke([106],49))}function sS(t){return Pe(t,ke([107],49))}function Hr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function uS(t,e){return Pe(t,ke([38,5,Hr(e)],39))}function lS(t,e){return Pe(t,ke([48,5,Hr(e)],49))}function cS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Hr(e.r),Hr(e.g),Hr(e.b)],39))}function dS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Hr(e.r),Hr(e.g),Hr(e.b)],49))}var pS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function gS(t){return t.replace(pS,"")}d();d();var vd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},mS={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Sd(t,e){let n={...mS,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new vd(a,n.maxAttempts)}d();var Sr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function wo(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2|e[r]>>6],n+=Sr[e[r]&63];return r===a+1&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2],n+="="),n}d();d();var fS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,hS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,bS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,xd={Space_Separator:fS,ID_Start:hS,ID_Continue:bS},Et={isSpaceSeparator(t){return typeof t=="string"&&xd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||xd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||xd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Cd,cn,Er,su,Wr,Wn,Rt,Ad,Ao,TS=function(t,e){Cd=String(t),cn="start",Er=[],su=0,Wr=1,Wn=0,Rt=void 0,Ad=void 0,Ao=void 0;do Rt=yS(),xS[cn]();while(Rt.type!=="eof");return typeof e=="function"?wd({"":Ao},"",e):Ao};function wd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function nu(t){t=t||{},new hd({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Rn(){return we.PROD_API==="1"}function xf(){return we.HAS_CSP_ERROR=="1"}function tt(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function ru(){return typeof Deno<"u"}var cP=Me().PROD==="1",di=Me().PROD!=="1";function au(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();d();d();d();d();function pi(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var bd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function iu(t,e){let n=pi(),r=setTimeout(()=>n.reject(new bd),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function vr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ef=class{#e=0;#t=[];#n=[];#r=pi();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eG6,bgBlue:()=>Q6,bgBrightBlack:()=>eS,bgBrightBlue:()=>aS,bgBrightCyan:()=>oS,bgBrightGreen:()=>nS,bgBrightMagenta:()=>iS,bgBrightRed:()=>tS,bgBrightWhite:()=>sS,bgBrightYellow:()=>rS,bgCyan:()=>Z6,bgGreen:()=>V6,bgMagenta:()=>J6,bgRed:()=>$6,bgRgb24:()=>dS,bgRgb8:()=>lS,bgWhite:()=>X6,bgYellow:()=>Y6,black:()=>L6,blue:()=>B6,bold:()=>E6,brightBlack:()=>Df,brightBlue:()=>j6,brightCyan:()=>W6,brightGreen:()=>U6,brightMagenta:()=>H6,brightRed:()=>N6,brightWhite:()=>K6,brightYellow:()=>q6,cyan:()=>R6,dim:()=>C6,getColorEnabled:()=>S6,gray:()=>z6,green:()=>F6,hidden:()=>k6,inverse:()=>A6,italic:()=>w6,magenta:()=>I6,red:()=>_6,reset:()=>x6,rgb24:()=>cS,rgb8:()=>uS,setColorEnabled:()=>v6,strikethrough:()=>P6,stripColor:()=>gS,underline:()=>D6,white:()=>O6,yellow:()=>M6});d();var{Deno:Cf}=globalThis,wf=typeof Cf?.noColor=="boolean"?Cf.noColor:!0,Td=!wf;function v6(t){wf||(Td=t)}function S6(){return Td}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return Td?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function x6(t){return Pe(t,ke([0],0))}function E6(t){return Pe(t,ke([1],22))}function C6(t){return Pe(t,ke([2],22))}function w6(t){return Pe(t,ke([3],23))}function D6(t){return Pe(t,ke([4],24))}function A6(t){return Pe(t,ke([7],27))}function k6(t){return Pe(t,ke([8],28))}function P6(t){return Pe(t,ke([9],29))}function L6(t){return Pe(t,ke([30],39))}function _6(t){return Pe(t,ke([31],39))}function F6(t){return Pe(t,ke([32],39))}function M6(t){return Pe(t,ke([33],39))}function B6(t){return Pe(t,ke([34],39))}function I6(t){return Pe(t,ke([35],39))}function R6(t){return Pe(t,ke([36],39))}function O6(t){return Pe(t,ke([37],39))}function z6(t){return Df(t)}function Df(t){return Pe(t,ke([90],39))}function N6(t){return Pe(t,ke([91],39))}function U6(t){return Pe(t,ke([92],39))}function q6(t){return Pe(t,ke([93],39))}function j6(t){return Pe(t,ke([94],39))}function H6(t){return Pe(t,ke([95],39))}function W6(t){return Pe(t,ke([96],39))}function K6(t){return Pe(t,ke([97],39))}function G6(t){return Pe(t,ke([40],49))}function $6(t){return Pe(t,ke([41],49))}function V6(t){return Pe(t,ke([42],49))}function Y6(t){return Pe(t,ke([43],49))}function Q6(t){return Pe(t,ke([44],49))}function J6(t){return Pe(t,ke([45],49))}function Z6(t){return Pe(t,ke([46],49))}function X6(t){return Pe(t,ke([47],49))}function eS(t){return Pe(t,ke([100],49))}function tS(t){return Pe(t,ke([101],49))}function nS(t){return Pe(t,ke([102],49))}function rS(t){return Pe(t,ke([103],49))}function aS(t){return Pe(t,ke([104],49))}function iS(t){return Pe(t,ke([105],49))}function oS(t){return Pe(t,ke([106],49))}function sS(t){return Pe(t,ke([107],49))}function Hr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function uS(t,e){return Pe(t,ke([38,5,Hr(e)],39))}function lS(t,e){return Pe(t,ke([48,5,Hr(e)],49))}function cS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Hr(e.r),Hr(e.g),Hr(e.b)],39))}function dS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Hr(e.r),Hr(e.g),Hr(e.b)],49))}var pS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function gS(t){return t.replace(pS,"")}d();d();var yd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},mS={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function vd(t,e){let n={...mS,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new yd(a,n.maxAttempts)}d();var Sr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Do(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2|e[r]>>6],n+=Sr[e[r]&63];return r===a+1&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2],n+="="),n}d();d();var fS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,hS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,bS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Sd={Space_Separator:fS,ID_Start:hS,ID_Continue:bS},Et={isSpaceSeparator(t){return typeof t=="string"&&Sd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Sd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Sd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Ed,cn,Er,su,Wr,Wn,Ot,Dd,ko,TS=function(t,e){Ed=String(t),cn="start",Er=[],su=0,Wr=1,Wn=0,Ot=void 0,Dd=void 0,ko=void 0;do Ot=yS(),xS[cn]();while(Ot.type!=="eof");return typeof e=="function"?Cd({"":ko},"",e):ko};function Cd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Cr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var xS={start(){if(Rt.type==="eof")throw _a();Ed()},beforePropertyName(){switch(Rt.type){case"identifier":case"string":Ad=Rt.value,cn="afterPropertyName";return;case"punctuator":ou();return;case"eof":throw _a()}},afterPropertyName(){if(Rt.type==="eof")throw _a();cn="beforePropertyValue"},beforePropertyValue(){if(Rt.type==="eof")throw _a();Ed()},beforeArrayValue(){if(Rt.type==="eof")throw _a();if(Rt.type==="punctuator"&&Rt.value==="]"){ou();return}Ed()},afterPropertyValue(){if(Rt.type==="eof")throw _a();switch(Rt.value){case",":cn="beforePropertyName";return;case"}":ou()}},afterArrayValue(){if(Rt.type==="eof")throw _a();switch(Rt.value){case",":cn="beforeArrayValue";return;case"]":ou()}},end(){}};function Ed(){let t;switch(Rt.type){case"punctuator":switch(Rt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Rt.value;break}if(Ao===void 0)Ao=t;else{let e=Er[Er.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Ad,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Er.push(t),Array.isArray(t)?cn="beforeArrayValue":cn="beforePropertyName";else{let e=Er[Er.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}}function ou(){Er.pop();let t=Er[Er.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}function ct(t){return kd(t===void 0?`JSON5: invalid end of input at ${Wr}:${Wn}`:`JSON5: invalid character '${ES(t)}' at ${Wr}:${Wn}`)}function _a(){return kd(`JSON5: invalid end of input at ${Wr}:${Wn}`)}function Af(){return Wn-=5,kd(`JSON5: invalid identifier character at ${Wr}:${Wn}`)}function ES(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function kd(t){let e=new SyntaxError(t);return e.lineNumber=Wr,e.columnNumber=Wn,e}var CS=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?g(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let I=m(D)+":";s!==""&&(I+=" "),I+=M,h.push(I)}}let E;if(h.length===0)E="{}";else{let D;if(s==="")D=h.join(","),E="{"+D+"}";else{let M=`, +`&&K(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ct(K());case void 0:throw ct(K())}return K()}function SS(){let t="",e=Cr();if(!Et.isHexDigit(e)||(t+=K(),e=Cr(),!Et.isHexDigit(e)))throw ct(K());return t+=K(),String.fromCodePoint(parseInt(t,16))}function wd(){let t="",e=4;for(;e-- >0;){let n=Cr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var xS={start(){if(Ot.type==="eof")throw _a();xd()},beforePropertyName(){switch(Ot.type){case"identifier":case"string":Dd=Ot.value,cn="afterPropertyName";return;case"punctuator":ou();return;case"eof":throw _a()}},afterPropertyName(){if(Ot.type==="eof")throw _a();cn="beforePropertyValue"},beforePropertyValue(){if(Ot.type==="eof")throw _a();xd()},beforeArrayValue(){if(Ot.type==="eof")throw _a();if(Ot.type==="punctuator"&&Ot.value==="]"){ou();return}xd()},afterPropertyValue(){if(Ot.type==="eof")throw _a();switch(Ot.value){case",":cn="beforePropertyName";return;case"}":ou()}},afterArrayValue(){if(Ot.type==="eof")throw _a();switch(Ot.value){case",":cn="beforeArrayValue";return;case"]":ou()}},end(){}};function xd(){let t;switch(Ot.type){case"punctuator":switch(Ot.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Ot.value;break}if(ko===void 0)ko=t;else{let e=Er[Er.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Dd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Er.push(t),Array.isArray(t)?cn="beforeArrayValue":cn="beforePropertyName";else{let e=Er[Er.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}}function ou(){Er.pop();let t=Er[Er.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}function ct(t){return Ad(t===void 0?`JSON5: invalid end of input at ${Wr}:${Wn}`:`JSON5: invalid character '${ES(t)}' at ${Wr}:${Wn}`)}function _a(){return Ad(`JSON5: invalid end of input at ${Wr}:${Wn}`)}function Af(){return Wn-=5,Ad(`JSON5: invalid identifier character at ${Wr}:${Wn}`)}function ES(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Ad(t){let e=new SyntaxError(t);return e.lineNumber=Wr,e.columnNumber=Wn,e}var CS=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?g(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let I=m(D)+":";s!==""&&(I+=" "),I+=M,h.push(I)}}let E;if(h.length===0)E="{}";else{let D;if(s==="")D=h.join(","),E="{"+D+"}";else{let M=`, `+a;D=h.join(M),E=`{ `+a+D+`, `+T+"}"}}return r.pop(),a=T,E}function m(f){if(f.length===0)return c(f,!0);let T=String.fromCodePoint(f.codePointAt(0));if(!Et.isIdStartChar(T))return c(f,!0);for(let b=T.length;b=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=[];for(let E=0;E()=>(e||t((e={exports:{}}).exports,e),e.exports),BS=(t,e)=>{for(var n in e)Ld(t,n,{get:e[n],enumerable:!0})},Pd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of LS(e))!FS.call(t,a)&&a!==n&&Ld(t,a,{get:()=>e[a],enumerable:!(r=PS(e,a))||r.enumerable});return t},IS=(t,e,n)=>(Pd(t,e,"default"),n&&Pd(n,e,"default")),Lf=(t,e,n)=>(n=t!=null?kS(_S(t)):{},Pd(e||!t||!t.__esModule?Ld(n,"default",{value:t,enumerable:!0}):n,t)),_f=MS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof lu=="object"&&lu&&lu.Object===Object&&lu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(L,A,v){var O,_,k,N,z,q,F=0,C=!1,P=!1,U=!0;if(typeof L!="function")throw new TypeError(n);A=y(A)||0,M(v)&&(C=!!v.leading,P="maxWait"in v,k=P?T(y(v.maxWait)||0,A):k,U="trailing"in v?!!v.trailing:U);function H(ee){var Y=O,be=_;return O=_=void 0,F=ee,N=L.apply(be,Y),N}function j(ee){return F=ee,z=setTimeout(ue,A),C?H(ee):N}function W(ee){var Y=ee-q,be=ee-F,ne=A-Y;return P?b(ne,k-be):ne}function V(ee){var Y=ee-q,be=ee-F;return q===void 0||Y>=A||Y<0||P&&be>=k}function ue(){var ee=h();if(V(ee))return ae(ee);z=setTimeout(ue,W(ee))}function ae(ee){return z=void 0,U&&O?H(ee):(O=_=void 0,N)}function J(){z!==void 0&&clearTimeout(z),F=0,O=q=_=z=void 0}function ie(){return z===void 0?N:ae(h())}function ge(){var ee=h(),Y=V(ee);if(O=arguments,_=this,q=ee,Y){if(z===void 0)return j(q);if(P)return z=setTimeout(ue,A),H(q)}return z===void 0&&(z=setTimeout(ue,A)),N}return ge.cancel=J,ge.flush=ie,ge}function D(L,A,v){var O=!0,_=!0;if(typeof L!="function")throw new TypeError(n);return M(v)&&(O="leading"in v?!!v.leading:O,_="trailing"in v?!!v.trailing:_),E(L,A,{leading:O,maxWait:A,trailing:_})}function M(L){var A=typeof L;return!!L&&(A=="object"||A=="function")}function I(L){return!!L&&typeof L=="object"}function S(L){return typeof L=="symbol"||I(L)&&f.call(L)==a}function y(L){if(typeof L=="number")return L;if(S(L))return r;if(M(L)){var A=typeof L.valueOf=="function"?L.valueOf():L;L=M(A)?A+"":A}if(typeof L!="string")return L===0?L:+L;L=L.replace(i,"");var v=s.test(L);return v||u.test(L)?l(L.slice(2),v?2:8):o.test(L)?r:+L}e.exports=D}),Ff={};BS(Ff,{default:()=>Kn});var RS=Lf(_f());IS(Ff,Lf(_f()));var{default:Pf,...OS}=RS,Kn=Pf!==void 0?Pf:OS;d();d();var cu=globalThis||(typeof window<"u"?window:self),zS=Object.create,Fd=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,US=Object.getOwnPropertyNames,qS=Object.getPrototypeOf,jS=Object.prototype.hasOwnProperty,HS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),WS=(t,e)=>{for(var n in e)Fd(t,n,{get:e[n],enumerable:!0})},_d=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of US(e))!jS.call(t,a)&&a!==n&&Fd(t,a,{get:()=>e[a],enumerable:!(r=NS(e,a))||r.enumerable});return t},KS=(t,e,n)=>(_d(t,e,"default"),n&&_d(n,e,"default")),Bf=(t,e,n)=>(n=t!=null?zS(qS(t)):{},_d(e||!t||!t.__esModule?Fd(n,"default",{value:t,enumerable:!0}):n,t)),If=HS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof cu=="object"&&cu&&cu.Object===Object&&cu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(y,L,A){var v,O,_,k,N,z,q=0,F=!1,C=!1,P=!0;if(typeof y!="function")throw new TypeError(n);L=S(L)||0,D(A)&&(F=!!A.leading,C="maxWait"in A,_=C?T(S(A.maxWait)||0,L):_,P="trailing"in A?!!A.trailing:P);function U(ge){var ee=v,Y=O;return v=O=void 0,q=ge,k=y.apply(Y,ee),k}function H(ge){return q=ge,N=setTimeout(V,L),F?U(ge):k}function j(ge){var ee=ge-z,Y=ge-q,be=L-ee;return C?b(be,_-Y):be}function W(ge){var ee=ge-z,Y=ge-q;return z===void 0||ee>=L||ee<0||C&&Y>=_}function V(){var ge=h();if(W(ge))return ue(ge);N=setTimeout(V,j(ge))}function ue(ge){return N=void 0,P&&v?U(ge):(v=O=void 0,k)}function ae(){N!==void 0&&clearTimeout(N),q=0,v=z=O=N=void 0}function J(){return N===void 0?k:ue(h())}function ie(){var ge=h(),ee=W(ge);if(v=arguments,O=this,z=ge,ee){if(N===void 0)return H(z);if(C)return N=setTimeout(V,L),U(z)}return N===void 0&&(N=setTimeout(V,L)),k}return ie.cancel=ae,ie.flush=J,ie}function D(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function M(y){return!!y&&typeof y=="object"}function I(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(I(y))return r;if(D(y)){var L=typeof y.valueOf=="function"?y.valueOf():y;y=D(L)?L+"":L}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var A=s.test(y);return A||u.test(y)?l(y.slice(2),A?2:8):o.test(y)?r:+y}e.exports=E}),Rf={};WS(Rf,{default:()=>ko});var GS=Bf(If());KS(Rf,Bf(If()));var{default:Mf,...VS}=GS,ko=Mf!==void 0?Mf:VS;d();d();var $S=Object.create,Bd=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,QS=Object.getOwnPropertyNames,JS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty,XS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ex=(t,e)=>{for(var n in e)Bd(t,n,{get:e[n],enumerable:!0})},Md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of QS(e))!ZS.call(t,a)&&a!==n&&Bd(t,a,{get:()=>e[a],enumerable:!(r=YS(e,a))||r.enumerable});return t},tx=(t,e,n)=>(Md(t,e,"default"),n&&Md(n,e,"default")),zf=(t,e,n)=>(n=t!=null?$S(JS(t)):{},Md(e||!t||!t.__esModule?Bd(n,"default",{value:t,enumerable:!0}):n,t)),Nf=XS((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(g){if(m[g])return m[g].exports;var f=m[g]={i:g,l:!1,exports:{}};return c[g].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var m={};return p.m=c,p.c=m,p.i=function(g){return g},p.d=function(g,f,T){p.o(g,f)||Object.defineProperty(g,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(g){var f=g&&g.__esModule?function(){return g.default}:function(){return g};return p.d(f,"a",f),f},p.o=function(g,f){return Object.prototype.hasOwnProperty.call(g,f)},p.p="",p(p.s=0)}([function(c,p,m){function g(j,W){var V={};for(var ue in j)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(j,ue)&&(V[ue]=j[ue]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+ue+"",be.onclick=function(){return _(ne,Y)},be.listener=function(re){(A(re)||v(re))&&z()},O(be,Y),J&&J<1&&(J=1),!ge&&J&&M(J).then(function(){return _(ne,Y)})},F=p.force=function(j,W){var V=j.type,ue=V===void 0?5:V,ae=j.text,J=j.buttonText,ie=J===void 0?"OK":J,ge=j.callback,ee=j.position,Y=ee===void 0?h.positions.force||Y.top:ee;I(),z();var be=document.createElement("div"),ne=S();be.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var xe=document.createElement("div");xe.classList.add(h.classes.button),xe.classList.add(y[ue]),xe.innerHTML=ie,xe.onclick=function(){_(ne,Y),N(),ge?ge():W&&W()},be.appendChild(re),be.appendChild(xe),be.listener=function(ze){A(ze)&&xe.click()},O(be,Y),k()},C=p.confirm=function(j,W,V){var ue=j.text,ae=j.submitText,J=ae===void 0?"Yes":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,be=j.position,ne=be===void 0?h.positions.confirm||ne.top:be;I(),z();var re=document.createElement("div"),xe=S();re.id=xe;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=J,_e.onclick=function(){_(xe,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=ge,de.onclick=function(){_(xe,ne),N(),Y?Y():V&&V()},re.appendChild(ze),re.appendChild(_e),re.appendChild(de),re.listener=function(gt){A(gt)?_e.click():v(gt)&&de.click()},O(re,ne),k(re,ne)},P=function(j,W,V){var ue=j.text,ae=j.submitText,J=ae===void 0?"Submit":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,be=j.position,ne=be===void 0?h.positions.input||ne.top:be,re=g(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);I(),z();var xe=document.createElement("div"),ze=S();xe.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var xt="",sn=re.allowed,In=0;In'+V+"",Y.appendChild(ne),ie.forEach(function(xe,ze){var _e=xe.type,de=_e===void 0?1:_e,gt=xe.text,Pt=xe.handler,bt=document.createElement("div");bt.classList.add(y[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var xt=ie[ze+1];xt&&!xt.type&&(xt.type=1),xt&&xt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=gt,bt.onclick=function(){_(be,ee),N(),Pt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){_(be,ee),N(),J?J():W&&W()},Y.appendChild(re),Y.listener=function(xe){v(xe)&&re.click()},O(Y,ee),k(Y,ee)},H=p.date=function(j,W,V){var ue=j.value,ae=ue===void 0?new Date:ue,J=j.submitText,ie=J===void 0?"OK":J,ge=j.cancelText,ee=ge===void 0?"Cancel":ge,Y=j.submitCallback,be=j.cancelCallback,ne=j.position,re=ne===void 0?h.positions.date||re.top:ne;I(),z();var xe="▾",ze=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),gt=function(mt){ze.innerHTML=h.dateMonths[mt.getMonth()],_e.innerHTML=mt.getDate(),de.innerHTML=mt.getFullYear()},Pt=function(mt){var Ze=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),Dn=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Dn)>Ze&&(Dn=Ze.toString()),mt.target.textContent=Dn,Number(Dn)<1&&(Dn="1"),ae.setDate(Number(Dn))},bt=function(mt){var Ze=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);mt.target.textContent=Ze,ae.setFullYear(Number(Ze))},xt=function(mt){gt(ae)},sn=function(mt){var Ze=new Date(ae.getFullYear(),ae.getMonth()+mt+1,0).getDate();ae.getDate()>Ze&&ae.setDate(Ze),ae.setMonth(ae.getMonth()+mt),gt(ae)},In=function(mt){ae.setDate(ae.getDate()+mt),gt(ae)},Co=function(mt){var Ze=ae.getFullYear()+mt;Ze<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+mt),gt(ae)},ir=document.createElement("div"),ka=S();ir.id=ka;var ui=document.createElement("div");ui.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=xe;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=xe;var wn=document.createElement("div");wn.classList.add(h.classes.button),wn.classList.add(h.classes.elementThird),wn.classList.add(h.classes.dateSelectorUp),wn.innerHTML=xe,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",xt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",xt),de.innerHTML=ae.getFullYear();var hr=document.createElement("div");hr.classList.add(h.classes.button),hr.classList.add(h.classes.elementThird),hr.innerHTML=xe;var br=document.createElement("div");br.classList.add(h.classes.button),br.classList.add(h.classes.elementThird),br.innerHTML=xe;var Pa=document.createElement("div");Pa.classList.add(h.classes.button),Pa.classList.add(h.classes.elementThird),Pa.innerHTML=xe,Hn.onclick=function(){return sn(1)},Yt.onclick=function(){return In(1)},wn.onclick=function(){return Co(1)},hr.onclick=function(){return sn(-1)},br.onclick=function(){return In(-1)},Pa.onclick=function(){return Co(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){_(ka,re),N(),Y?Y(ae):W&&W(ae)};var Tr=document.createElement("div");Tr.classList.add(h.classes.button),Tr.classList.add(h.classes.elementHalf),Tr.classList.add(h.classes.backgroundError),Tr.innerHTML=ee,Tr.onclick=function(){_(ka,re),N(),be?be(ae):V&&V(ae)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(wn),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(de),$t.appendChild(hr),$t.appendChild(br),$t.appendChild(Pa),ui.appendChild($t),ir.appendChild(ui),ir.appendChild(un),ir.appendChild(Tr),ir.listener=function(mt){A(mt)?un.click():v(mt)&&Tr.click()},O(ir,re),k(ir,re)};p.default={alert:q,force:F,confirm:C,input:P,select:U,date:H,setOptions:E,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),Uf={};ex(Uf,{default:()=>du});var nx=zf(Nf());tx(Uf,zf(Nf()));var{default:Of,...rx}=nx,du=Of!==void 0?Of:rx;d();d();var pu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Po(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function Id(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function qf(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;igi[t.toLowerCase()]||Gn[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),ax=t=>Object.keys(gi).find(e=>gi[e]===t),ix=t=>Object.keys(Gn).find(e=>Gn[e]===t);function Vf(t){Kf=t||"all"}function Lo(){return Kf||"all"}function ox(){return nt.slice(0)}function sx(){return nt.map(t=>ax(t)||ix(t)||String.fromCharCode(t))}function ux(){let t=[];return Object.keys(ft).forEach(e=>{ft[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>_o(o))})})}),t}function lx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function cx(t){return typeof t=="string"&&(t=_o(t)),nt.indexOf(t)!==-1}function dx(t,e){let n,r;t||(t=Lo());for(let a in ft)if(Object.prototype.hasOwnProperty.call(ft,a))for(n=ft[a],r=0;r=0&&nt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&nt.splice(0,nt.length),(e===93||e===224)&&(e=91),e in Ot){Ot[e]=!1;for(let r in Gn)Gn[r]===e&&(wr[r]=!1)}}function $f(t,...e){if(typeof t>"u")Object.keys(ft).forEach(n=>delete ft[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&Od(n)});else if(typeof t=="object")t.key&&Od(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),Od({key:t,scope:n,method:r,splitKey:"+"})}}var Od=({key:t,scope:e,method:n,splitKey:r="+"})=>{Rd(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":_o(u);if(!ft[l])return;e||(e=Lo());let c=s>1?Id(Gn,o):[];ft[l]=ft[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&qf(p.mods,c)))})};function Hf(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Ot)Object.prototype.hasOwnProperty.call(Ot,i)&&(!Ot[i]&&e.mods.indexOf(+i)>-1||Ot[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Ot[16]&&!Ot[18]&&!Ot[17]&&!Ot[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(nt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Wf(t,e){let n=ft["*"],r=t.keyCode||t.which||t.charCode;if(!wr.filter.call(this,t))return;if((r===93||r===224)&&(r=91),nt.indexOf(r)===-1&&r!==229&&nt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=gu[i];t[i]&&nt.indexOf(o)===-1?nt.push(o):!t[i]&&nt.indexOf(o)>-1?nt.splice(nt.indexOf(o),1):i==="metaKey"&&t[i]&&nt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(nt=nt.slice(nt.indexOf(o))))}),r in Ot){Ot[r]=!0;for(let i in Gn)Gn[i]===r&&(wr[i]=!0);if(!n)return}for(let i in Ot)Object.prototype.hasOwnProperty.call(Ot,i)&&(Ot[i]=t[gu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(nt.indexOf(17)===-1&&nt.push(17),nt.indexOf(18)===-1&&nt.push(18),Ot[17]=!0,Ot[18]=!0);let a=Lo();if(n)for(let i=0;i-1}function wr(t,e,n){nt=[];let r=Rd(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,m=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(m=!0)),typeof e=="string"&&(i=e),m&&$f(t,i);s1&&(a=Id(Gn,t)),t=t[t.length-1],t=t==="*"?"*":_o(t),t in ft||(ft[t]=[]),ft[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!gx(o)&&window&&(Gf.push(o),Po(o,"keydown",g=>{Wf(g,o)},p),jf||(jf=!0,Po(window,"focus",()=>{nt=[]},p),Po(window,"click",()=>{nt=[]},!1)),Po(o,"keyup",g=>{Wf(g,o),px(g)},p))}function mx(t,e="all"){Object.keys(ft).forEach(n=>{ft[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var zd={getPressedKeyString:sx,setScope:Vf,getScope:Lo,deleteScope:dx,getPressedKeyCodes:ox,getAllKeyCodes:ux,isPressed:cx,filter:lx,trigger:mx,unbind:$f,keyMap:gi,modifier:Gn,modifierMap:gu};for(let t in zd)Object.prototype.hasOwnProperty.call(zd,t)&&(wr[t]=zd[t]);if(typeof window<"u"){let t=window.hotkeys;wr.noConflict=e=>(e&&window.hotkeys===wr&&(window.hotkeys=t),wr),window.hotkeys=wr}var vn=wr;d();d();var fx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Qf={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Kr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return fx[t]}static getBrowserTypeByAlias(t){return Qf[t]||""}},rt=/version\/(\d+(\.?_?\d+)+)/i,hx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],bx=hx,Tx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:dn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:dn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:dn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],yx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],vx=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Kr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Kr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Kr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Kr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Kr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Kr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Kr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],Sx=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(bx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Tx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(yx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(vx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},Yf=Sx,xx=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Yf(t,e)}static parse(t){return new Yf(t).getResult()}static get BROWSER_MAP(){return Qf}static get ENGINE_MAP(){return Kr}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},mi=xx;d();d();var{entries:ah,setPrototypeOf:Jf,isFrozen:Ex,getPrototypeOf:Cx,getOwnPropertyDescriptor:wx}=Object,{freeze:pn,seal:$n,create:Dx}=Object,{apply:Wd,construct:Kd}=typeof Reflect<"u"&&Reflect;Wd||(Wd=function(t,e,n){return t.apply(e,n)});pn||(pn=function(t){return t});$n||($n=function(t){return t});Kd||(Kd=function(t,e){return new t(...e)});var Ax=zn(Array.prototype.forEach),Zf=zn(Array.prototype.pop),Fo=zn(Array.prototype.push),hu=zn(String.prototype.toLowerCase),Nd=zn(String.prototype.toString),kx=zn(String.prototype.match),Vn=zn(String.prototype.replace),Px=zn(String.prototype.indexOf),Lx=zn(String.prototype.trim),An=zn(RegExp.prototype.test),Mo=_x(TypeError);function zn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Rx=$n(/\${[\w\W]*}/gm),Ox=$n(/^data-[\-\w.\u00B7-\uFFFF]/),zx=$n(/^aria-[\-\w]+$/),ih=$n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nx=$n(/^(?:\w+script|data):/i),Ux=$n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=$n(/^html$/i),rh=Object.freeze({__proto__:null,MUSTACHE_EXPR:Bx,ERB_EXPR:Ix,TMPLIT_EXPR:Rx,DATA_ATTR:Ox,ARIA_ATTR:zx,IS_ALLOWED_URI:ih,IS_SCRIPT_OR_DATA:Nx,ATTR_WHITESPACE:Ux,DOCTYPE_NAME:oh}),qx=()=>typeof window>"u"?null:window,jx=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function sh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qx(),e=R=>sh(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:g}=t,f=u.prototype,T=mu(f,"cloneNode"),b=mu(f,"nextSibling"),h=mu(f,"childNodes"),E=mu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:I,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:L}=a,{importNode:A}=n,v={};e.isSupported=typeof ah=="function"&&typeof E=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:_,TMPLIT_EXPR:k,DATA_ATTR:N,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:F}=rh,{IS_ALLOWED_URI:C}=rh,P=null,U=Oe({},[...Xf,...Ud,...qd,...jd,...eh]),H=null,j=Oe({},[...th,...Hd,...nh,...fu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ue=null,ae=!0,J=!0,ie=!1,ge=!0,ee=!1,Y=!1,be=!1,ne=!1,re=!1,xe=!1,ze=!1,_e=!0,de=!1,gt="user-content-",Pt=!0,bt=!1,xt={},sn=null,In=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Co=null,ir=Oe({},["audio","video","img","source","image","track"]),ka=null,ui=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",wn=Yt,hr=!1,br=null,Pa=Oe({},[$t,Hn,Yt],Nd),un,Tr=["application/xhtml+xml","text/html"],mt="text/html",Ze,Dn=null,Y9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},cd=function(R){if(!(Dn&&Dn===R)){if((!R||typeof R!="object")&&(R={}),R=fi(R),un=Tr.indexOf(R.PARSER_MEDIA_TYPE)===-1?un=mt:un=R.PARSER_MEDIA_TYPE,Ze=un==="application/xhtml+xml"?Nd:hu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Ze):U,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Ze):j,br="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,Nd):Pa,ka="ADD_URI_SAFE_ATTR"in R?Oe(fi(ui),R.ADD_URI_SAFE_ATTR,Ze):ui,Co="ADD_DATA_URI_TAGS"in R?Oe(fi(ir),R.ADD_DATA_URI_TAGS,Ze):ir,sn="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Ze):In,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Ze):{},ue="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Ze):{},xt="USE_PROFILES"in R?R.USE_PROFILES:!1,ae=R.ALLOW_ARIA_ATTR!==!1,J=R.ALLOW_DATA_ATTR!==!1,ie=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,re=R.RETURN_DOM||!1,xe=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ne=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,de=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,bt=R.IN_PLACE||!1,C=R.ALLOWED_URI_REGEXP||ih,wn=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(J=!1),xe&&(re=!0),xt&&(P=Oe({},[...eh]),H=[],xt.html===!0&&(Oe(P,Xf),Oe(H,th)),xt.svg===!0&&(Oe(P,Ud),Oe(H,Hd),Oe(H,fu)),xt.svgFilters===!0&&(Oe(P,qd),Oe(H,Hd),Oe(H,fu)),xt.mathMl===!0&&(Oe(P,jd),Oe(H,nh),Oe(H,fu))),R.ADD_TAGS&&(P===U&&(P=fi(P)),Oe(P,R.ADD_TAGS,Ze)),R.ADD_ATTR&&(H===j&&(H=fi(H)),Oe(H,R.ADD_ATTR,Ze)),R.ADD_URI_SAFE_ATTR&&Oe(ka,R.ADD_URI_SAFE_ATTR,Ze),R.FORBID_CONTENTS&&(sn===In&&(sn=fi(sn)),Oe(sn,R.FORBID_CONTENTS,Ze)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=jx(g,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));pn&&pn(R),Dn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),Q9=Oe({},["title","style","font","a","script"]),Zs=Oe({},Ud);Oe(Zs,qd),Oe(Zs,Fx);let dd=Oe({},jd);Oe(dd,Mx);let J9=function(R){let le=E(R);(!le||!le.tagName)&&(le={namespaceURI:wn,tagName:"template"});let Z=hu(R.tagName),Ge=hu(le.tagName);return br[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?Z==="svg":le.namespaceURI===$t?Z==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Zs[Z]:R.namespaceURI===$t?le.namespaceURI===Yt?Z==="math":le.namespaceURI===Hn?Z==="math"&&lf[Ge]:!!dd[Z]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!dd[Z]&&(Q9[Z]||!Zs[Z]):!!(un==="application/xhtml+xml"&&br[R.namespaceURI]):!1},li=function(R){Fo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},pd=function(R,le){try{Fo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Fo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(re||xe)try{li(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,Z;if(ne)R=""+R;else{let ln=kx(R,/^[\r\n\t ]+/);Z=ln&&ln[0]}un==="application/xhtml+xml"&&wn===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(wn===Yt)try{le=new m().parseFromString(Ge,un)}catch{}if(!le||!le.documentElement){le=I.createDocument(wn,"template",null);try{le.documentElement.innerHTML=hr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&Z&&Lt.insertBefore(a.createTextNode(Z),Lt.childNodes[0]||null),wn===Yt?L.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Z9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Xs=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},yr=function(R,le,Z){v[R]&&Ax(v[R],Ge=>{Ge.call(e,le,Z,Dn)})},pf=function(R){let le;if(yr("beforeSanitizeElements",R,null),Z9(R))return li(R),!0;let Z=Ze(R.nodeName);if(yr("uponSanitizeElement",R,{tagName:Z,allowedTags:P}),R.hasChildNodes()&&!Xs(R.firstElementChild)&&(!Xs(R.content)||!Xs(R.content.firstElementChild))&&An(/<[/\w]/g,R.innerHTML)&&An(/<[/\w]/g,R.textContent))return li(R),!0;if(!P[Z]||V[Z]){if(!V[Z]&&mf(Z)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z)))return!1;if(Pt&&!sn[Z]){let Ge=E(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let ln=Lt.length;for(let yn=ln-1;yn>=0;--yn)Ge.insertBefore(T(Lt[yn],!0),b(R))}}return li(R),!0}return R instanceof u&&!J9(R)||(Z==="noscript"||Z==="noembed")&&An(/<\/no(script|embed)/i,R.innerHTML)?(li(R),!0):(ee&&R.nodeType===3&&(le=R.textContent,le=Vn(le,O," "),le=Vn(le,_," "),le=Vn(le,k," "),R.textContent!==le&&(Fo(e.removed,{element:R.cloneNode()}),R.textContent=le)),yr("afterSanitizeElements",R,null),!1)},gf=function(R,le,Z){if(_e&&(le==="id"||le==="name")&&(Z in a||Z in Y9))return!1;if(!(J&&!ue[le]&&An(N,le))&&!(ae&&An(z,le))){if(!H[le]||ue[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&An(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z))))return!1}else if(!ka[le]&&!An(C,Vn(Z,F,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&Px(Z,"data:")===0&&Co[R])&&!(ie&&!An(q,Vn(Z,F,"")))&&Z)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,Z,Ge,Lt;yr("beforeSanitizeAttributes",R,null);let{attributes:ln}=R;if(!ln)return;let yn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=ln.length;Lt--;){le=ln[Lt];let{name:It,namespaceURI:ci}=le;if(Z=It==="value"?le.value:Lx(le.value),Ge=Ze(It),yn.attrName=Ge,yn.attrValue=Z,yn.keepAttr=!0,yn.forceKeepAttr=void 0,yr("uponSanitizeAttribute",R,yn),Z=yn.attrValue,yn.forceKeepAttr||(pd(It,R),!yn.keepAttr))continue;if(!ge&&An(/\/>/i,Z)){pd(It,R);continue}ee&&(Z=Vn(Z,O," "),Z=Vn(Z,_," "),Z=Vn(Z,k," "));let hf=Ze(R.nodeName);if(gf(hf,Ge,Z)){if(de&&(Ge==="id"||Ge==="name")&&(pd(It,R),Z=gt+Z),D&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ci)switch(g.getAttributeType(hf,Ge)){case"TrustedHTML":{Z=D.createHTML(Z);break}case"TrustedScriptURL":{Z=D.createScriptURL(Z);break}}try{ci?R.setAttributeNS(ci,It,Z):R.setAttribute(It,Z),Zf(e.removed)}catch{}}}yr("afterSanitizeAttributes",R,null)},X9=function R(le){let Z,Ge=df(le);for(yr("beforeSanitizeShadowDOM",le,null);Z=Ge.nextNode();)yr("uponSanitizeShadowNode",Z,null),!pf(Z)&&(Z.content instanceof i&&R(Z.content),ff(Z));yr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z,Ge,Lt,ln;if(hr=!R,hr&&(R=""),typeof R!="string"&&!Xs(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Mo("dirty is not a string, aborting")}else throw Mo("toString is not a function");if(!e.isSupported)return R;if(be||cd(le),e.removed=[],typeof R=="string"&&(bt=!1),bt){if(R.nodeName){let ci=Ze(R.nodeName);if(!P[ci]||V[ci])throw Mo("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)Z=cf(""),Ge=Z.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Z=Ge:Z.appendChild(Ge);else{if(!re&&!ee&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(Z=cf(R),!Z)return re?null:ze?M:""}Z&&ne&&li(Z.firstChild);let yn=df(bt?R:Z);for(;Lt=yn.nextNode();)pf(Lt)||(Lt.content instanceof i&&X9(Lt.content),ff(Lt));if(bt)return R;if(re){if(xe)for(ln=y.call(Z.ownerDocument);Z.firstChild;)ln.appendChild(Z.firstChild);else ln=Z;return(H.shadowroot||H.shadowrootmod)&&(ln=A.call(n,ln,!0)),ln}let It=Y?Z.outerHTML:Z.innerHTML;return Y&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&An(oh,Z.ownerDocument.doctype.name)&&(It=" -`+It),ee&&(It=Vn(It,O," "),It=Vn(It,_," "),It=Vn(It,k," ")),D&&ze?D.createHTML(It):It},e.setConfig=function(R){cd(R),be=!0},e.clearConfig=function(){Dn=null,be=!1},e.isValidAttribute=function(R,le,Z){Dn||cd({});let Ge=Ze(R),Lt=Ze(le);return gf(Ge,Lt,Z)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Fo(v[R],le))},e.removeHook=function(R){if(v[R])return Zf(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var Ye=sh();d();d();var Hx=Object.create,Vd=Object.defineProperty,Wx=Object.getOwnPropertyDescriptor,Kx=Object.getOwnPropertyNames,Gx=Object.getPrototypeOf,Vx=Object.prototype.hasOwnProperty,$d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$x=(t,e)=>{for(var n in e)Vd(t,n,{get:e[n],enumerable:!0})},Gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Kx(e))!Vx.call(t,a)&&a!==n&&Vd(t,a,{get:()=>e[a],enumerable:!(r=Wx(e,a))||r.enumerable});return t},Yx=(t,e,n)=>(Gd(t,e,"default"),n&&Gd(n,e,"default")),lh=(t,e,n)=>(n=t!=null?Hx(Gx(t)):{},Gd(e||!t||!t.__esModule?Vd(n,"default",{value:t,enumerable:!0}):n,t)),Qx=$d((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var m=this._doc.createElement("span");l.firstChild;)m.appendChild(l.firstChild);l.parentNode.replaceChild(m,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),m=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),m){var g=m.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",g)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(g){return g.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var m=s(a);return m<=4&&(!o||m!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,m=l.firstChild;m;){var g=m.nextSibling;if(this._isPhrasingContent(m))p!==null?p.appendChild(m):this._isWhitespace(m)||(p=a.createElement("p"),l.replaceChild(p,m),p.appendChild(m));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}m=g}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var xe=this._getInnerText(re);if(!(xe.length<25)){var ze=this._getNodeAncestors(re,5);if(ze.length!==0){var _e=0;_e+=1,_e+=xe.split(",").length,_e+=Math.min(Math.floor(xe.length/100),3),this._forEachNode(ze,function(de,gt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),T.push(de)),gt===0)var Pt=1;else gt===1?Pt=2:Pt=gt*3;de.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,E=T.length;hS.readability.contentScore){b.splice(I,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,L=!1,A;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],O=1;O=.75&&v.push(this._getNodeAncestors(b[O]));var _=3;if(v.length>=_)for(A=y.parentNode;A.tagName!=="BODY";){for(var k=0,N=0;N=_){y=A;break}A=A.parentNode}y.readability||this._initializeNode(y),A=y.parentNode;for(var z=y.readability.contentScore,q=z/3;A.tagName!=="BODY";){if(!A.readability){A=A.parentNode;continue}var F=A.readability.contentScore;if(Fz){y=A;break}z=A.readability.contentScore,A=A.parentNode}for(A=y.parentNode;A.tagName!="BODY"&&A.children.length==1;)y=A,A=y.parentNode;y.readability||this._initializeNode(y)}var C=a.createElement("DIV");i&&(C.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);A=y.parentNode;for(var U=A.children,H=0,j=U.length;H=P)V=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),J=this._getInnerText(W),ie=J.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),C.appendChild(W),U=A.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+C.innerHTML),this._prepArticle(C),this._debug&&this.log("Article content post-prep: "+C.innerHTML),L)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";C.firstChild;)ge.appendChild(C.firstChild);C.appendChild(ge)}this._debug&&this.log("Article content after paging: "+C.innerHTML);var ee=!0,Y=this._getInnerText(C,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(m){return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(m){return m&&typeof m.name=="string"}).map(function(m){return m.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(m){this.log(m.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),m=l.getAttribute("content");if(m){var g=null,f=null;p&&(g=p.match(s),g&&(f=g[0].toLowerCase().replace(/\s/g,""),i[f]=m.trim())),!g&&c&&u.test(c)&&(f=c,m&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=m.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],m=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(m)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var g=this._getRowAndColumnCount(o);if(g.rows>=10||g.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=g.rows*g.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(A){return A._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,A=>u+=this._getInnerText(A).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var m=i.getElementsByTagName("p").length,g=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,E=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&m/g<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>m||T>Math.floor(m/3)||!s&&b<.9&&S<25&&(g===0||g>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&I>.2||c>=25&&I>.5||h===1&&S<75||h>1;if(s&&y){for(var L=0;L1)return y;let A=i.getElementsByTagName("li").length;if(g==A)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),Jx=$d((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(m){c.add(m.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(m){if(!o.visibilityChecker(m))return!1;var g=m.className+" "+m.id;if(n.unlikelyCandidates.test(g)&&!n.okMaybeItsACandidate.test(g)||m.matches("li p"))return!1;var f=m.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),ch=$d((t,e)=>{var n=Qx(),r=Jx();e.exports={Readability:n,isProbablyReaderable:r}}),dh={};$x(dh,{Readability:()=>bu,default:()=>mh,isProbablyReaderable:()=>gh});var ph=lh(ch());Yx(dh,lh(ch()));var{Readability:bu,isProbablyReaderable:gh}=ph,{default:uh,...Zx}=ph,mh=uh!==void 0?uh:Zx;var Na={};eu(Na,{Breadcrumbs:()=>$r,BrowserClient:()=>Ci,Dedupe:()=>Zr,FunctionToString:()=>Ra,GlobalHandlers:()=>cr,HttpContext:()=>Jr,Hub:()=>_r,InboundFilters:()=>Oa,Integrations:()=>FC,LinkedErrors:()=>Qr,SDK_VERSION:()=>Ei,Scope:()=>Nn,TryCatch:()=>Yr,addBreadcrumb:()=>Pu,addGlobalEventProcessor:()=>lr,captureEvent:()=>Au,captureException:()=>Si,captureMessage:()=>Du,chromeStackLineParser:()=>D0,close:()=>D4,configureScope:()=>ku,createTransport:()=>Go,defaultIntegrations:()=>M0,defaultStackLineParsers:()=>P0,defaultStackParser:()=>qu,flush:()=>w4,forceLoad:()=>E4,geckoStackLineParser:()=>A0,getCurrentHub:()=>Le,getHubFromCarrier:()=>Un,init:()=>v4,lastEventId:()=>x4,makeFetchTransport:()=>Vo,makeMain:()=>vi,onLoad:()=>C4,opera10StackLineParser:()=>o4,opera11StackLineParser:()=>s4,setContext:()=>Lu,setExtra:()=>Fu,setExtras:()=>_u,setTag:()=>Bu,setTags:()=>Mu,setUser:()=>Iu,showReportDialog:()=>S4,startTransaction:()=>Ru,winjsStackLineParser:()=>k0,withScope:()=>xi,wrap:()=>A4});d();d();d();d();d();d();d();d();d();var fh=Object.prototype.toString;function Tu(t){switch(fh.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return or(t,Error)}}function Bo(t,e){return fh.call(t)===`[object ${e}]`}function yu(t){return Bo(t,"ErrorEvent")}function hh(t){return Bo(t,"DOMException")}function Dr(t){return Bo(t,"String")}function Io(t){return t===null||typeof t!="object"&&typeof t!="function"}function Yn(t){return Bo(t,"Object")}function Ro(t){return typeof Event<"u"&&or(t,Event)}function bh(t){return!1}function Th(t){return Bo(t,"RegExp")}function hi(t){return!!(t&&t.then&&typeof t.then=="function")}function yh(t){return Yn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function vh(t){return typeof t=="number"&&t!==t}function or(t,e){try{return t instanceof e}catch{return!1}}function Oo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function Xx(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Dr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return xh({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function xh(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function rE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!tE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function vu(t){let e=typeof t=="string"?nE(t):xh(t);return rE(e),e}d();var aE={};function at(){return typeof window<"u"?window:typeof self<"u"?self:aE}function bi(t,e,n){let r=n||at(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var zo=["debug","info","warn","error","log","assert","trace"];function Yd(t){if(!("console"in at()))return t();let n=console,r={};zo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function Eh(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?zo.forEach(n=>{e[n]=(...r)=>{t&&Yd(()=>{})}}):zo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=bi("logger",Eh):Se=Eh();d();d();function Ma(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function Qd(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Xd(t){if(Tu(t))return{message:t.message,name:t.name,stack:t.stack,...wh(t)};if(Ro(t)){let e={type:t.type,target:Ch(t.target),currentTarget:Ch(t.currentTarget),...wh(t)};return typeof CustomEvent<"u"&&or(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Ch(t){try{return bh(t)?Oo(t):Object.prototype.toString.call(t)}catch{return""}}function wh(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ah(t,e=40){let n=Object.keys(Xd(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ma(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:Ma(a,e)}return""}function Ba(t){return Jd(t,new Map)}function Jd(t,e){if(Yn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=Jd(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(Jd(a,e))}),r}return t}d();var iE=50;function t0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return oE(a)}}function kh(t){return Array.isArray(t)?t0(...t):t}function oE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,iE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var e0="";function Jn(t){try{return!t||typeof t!="function"?e0:t.name||e0}catch{return e0}}d();function Ph(){if(!("fetch"in at()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Lh(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function _h(){return!0}var Ar=at(),Uo={},Fh={};function sE(t){if(!Fh[t])switch(Fh[t]=!0,t){case"console":uE();break;case"fetch":lE();break;case"error":pE();break;case"unhandledrejection":gE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function Zn(t,e){Uo[t]=Uo[t]||[],Uo[t].push(e),sE(t)}function yi(t,e){if(!(!t||!Uo[t]))for(let n of Uo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. +`+T+"]"}return r.pop(),a=T,h}},wS={parse:TS,stringify:CS},DS=wS,uu=DS;d();d();var iL=Number.isNaN||function(t){return typeof t=="number"&&t!==t};d();d();var lu=globalThis||(typeof window<"u"?window:self),kS=Object.create,Pd=Object.defineProperty,PS=Object.getOwnPropertyDescriptor,LS=Object.getOwnPropertyNames,_S=Object.getPrototypeOf,FS=Object.prototype.hasOwnProperty,MS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),BS=(t,e)=>{for(var n in e)Pd(t,n,{get:e[n],enumerable:!0})},kd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of LS(e))!FS.call(t,a)&&a!==n&&Pd(t,a,{get:()=>e[a],enumerable:!(r=PS(e,a))||r.enumerable});return t},IS=(t,e,n)=>(kd(t,e,"default"),n&&kd(n,e,"default")),Lf=(t,e,n)=>(n=t!=null?kS(_S(t)):{},kd(e||!t||!t.__esModule?Pd(n,"default",{value:t,enumerable:!0}):n,t)),_f=MS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof lu=="object"&&lu&&lu.Object===Object&&lu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(L,A,v){var O,_,k,N,z,q,F=0,C=!1,P=!1,U=!0;if(typeof L!="function")throw new TypeError(n);A=y(A)||0,M(v)&&(C=!!v.leading,P="maxWait"in v,k=P?T(y(v.maxWait)||0,A):k,U="trailing"in v?!!v.trailing:U);function H(ee){var Y=O,Te=_;return O=_=void 0,F=ee,N=L.apply(Te,Y),N}function j(ee){return F=ee,z=setTimeout(ue,A),C?H(ee):N}function W(ee){var Y=ee-q,Te=ee-F,ne=A-Y;return P?b(ne,k-Te):ne}function $(ee){var Y=ee-q,Te=ee-F;return q===void 0||Y>=A||Y<0||P&&Te>=k}function ue(){var ee=h();if($(ee))return ae(ee);z=setTimeout(ue,W(ee))}function ae(ee){return z=void 0,U&&O?H(ee):(O=_=void 0,N)}function J(){z!==void 0&&clearTimeout(z),F=0,O=q=_=z=void 0}function ie(){return z===void 0?N:ae(h())}function ge(){var ee=h(),Y=$(ee);if(O=arguments,_=this,q=ee,Y){if(z===void 0)return j(q);if(P)return z=setTimeout(ue,A),H(q)}return z===void 0&&(z=setTimeout(ue,A)),N}return ge.cancel=J,ge.flush=ie,ge}function D(L,A,v){var O=!0,_=!0;if(typeof L!="function")throw new TypeError(n);return M(v)&&(O="leading"in v?!!v.leading:O,_="trailing"in v?!!v.trailing:_),E(L,A,{leading:O,maxWait:A,trailing:_})}function M(L){var A=typeof L;return!!L&&(A=="object"||A=="function")}function I(L){return!!L&&typeof L=="object"}function S(L){return typeof L=="symbol"||I(L)&&f.call(L)==a}function y(L){if(typeof L=="number")return L;if(S(L))return r;if(M(L)){var A=typeof L.valueOf=="function"?L.valueOf():L;L=M(A)?A+"":A}if(typeof L!="string")return L===0?L:+L;L=L.replace(i,"");var v=s.test(L);return v||u.test(L)?l(L.slice(2),v?2:8):o.test(L)?r:+L}e.exports=D}),Ff={};BS(Ff,{default:()=>Kn});var RS=Lf(_f());IS(Ff,Lf(_f()));var{default:Pf,...OS}=RS,Kn=Pf!==void 0?Pf:OS;d();d();var cu=globalThis||(typeof window<"u"?window:self),zS=Object.create,_d=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,US=Object.getOwnPropertyNames,qS=Object.getPrototypeOf,jS=Object.prototype.hasOwnProperty,HS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),WS=(t,e)=>{for(var n in e)_d(t,n,{get:e[n],enumerable:!0})},Ld=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of US(e))!jS.call(t,a)&&a!==n&&_d(t,a,{get:()=>e[a],enumerable:!(r=NS(e,a))||r.enumerable});return t},KS=(t,e,n)=>(Ld(t,e,"default"),n&&Ld(n,e,"default")),Bf=(t,e,n)=>(n=t!=null?zS(qS(t)):{},Ld(e||!t||!t.__esModule?_d(n,"default",{value:t,enumerable:!0}):n,t)),If=HS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof cu=="object"&&cu&&cu.Object===Object&&cu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(y,L,A){var v,O,_,k,N,z,q=0,F=!1,C=!1,P=!0;if(typeof y!="function")throw new TypeError(n);L=S(L)||0,D(A)&&(F=!!A.leading,C="maxWait"in A,_=C?T(S(A.maxWait)||0,L):_,P="trailing"in A?!!A.trailing:P);function U(ge){var ee=v,Y=O;return v=O=void 0,q=ge,k=y.apply(Y,ee),k}function H(ge){return q=ge,N=setTimeout($,L),F?U(ge):k}function j(ge){var ee=ge-z,Y=ge-q,Te=L-ee;return C?b(Te,_-Y):Te}function W(ge){var ee=ge-z,Y=ge-q;return z===void 0||ee>=L||ee<0||C&&Y>=_}function $(){var ge=h();if(W(ge))return ue(ge);N=setTimeout($,j(ge))}function ue(ge){return N=void 0,P&&v?U(ge):(v=O=void 0,k)}function ae(){N!==void 0&&clearTimeout(N),q=0,v=z=O=N=void 0}function J(){return N===void 0?k:ue(h())}function ie(){var ge=h(),ee=W(ge);if(v=arguments,O=this,z=ge,ee){if(N===void 0)return H(z);if(C)return N=setTimeout($,L),U(z)}return N===void 0&&(N=setTimeout($,L)),k}return ie.cancel=ae,ie.flush=J,ie}function D(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function M(y){return!!y&&typeof y=="object"}function I(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(I(y))return r;if(D(y)){var L=typeof y.valueOf=="function"?y.valueOf():y;y=D(L)?L+"":L}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var A=s.test(y);return A||u.test(y)?l(y.slice(2),A?2:8):o.test(y)?r:+y}e.exports=E}),Rf={};WS(Rf,{default:()=>Po});var GS=Bf(If());KS(Rf,Bf(If()));var{default:Mf,...$S}=GS,Po=Mf!==void 0?Mf:$S;d();d();var VS=Object.create,Md=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,QS=Object.getOwnPropertyNames,JS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty,XS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ex=(t,e)=>{for(var n in e)Md(t,n,{get:e[n],enumerable:!0})},Fd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of QS(e))!ZS.call(t,a)&&a!==n&&Md(t,a,{get:()=>e[a],enumerable:!(r=YS(e,a))||r.enumerable});return t},tx=(t,e,n)=>(Fd(t,e,"default"),n&&Fd(n,e,"default")),zf=(t,e,n)=>(n=t!=null?VS(JS(t)):{},Fd(e||!t||!t.__esModule?Md(n,"default",{value:t,enumerable:!0}):n,t)),Nf=XS((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(g){if(m[g])return m[g].exports;var f=m[g]={i:g,l:!1,exports:{}};return c[g].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var m={};return p.m=c,p.c=m,p.i=function(g){return g},p.d=function(g,f,T){p.o(g,f)||Object.defineProperty(g,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(g){var f=g&&g.__esModule?function(){return g.default}:function(){return g};return p.d(f,"a",f),f},p.o=function(g,f){return Object.prototype.hasOwnProperty.call(g,f)},p.p="",p(p.s=0)}([function(c,p,m){function g(j,W){var $={};for(var ue in j)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(j,ue)&&($[ue]=j[ue]);return $}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+ue+"",Te.onclick=function(){return _(ne,Y)},Te.listener=function(re){(A(re)||v(re))&&z()},O(Te,Y),J&&J<1&&(J=1),!ge&&J&&M(J).then(function(){return _(ne,Y)})},F=p.force=function(j,W){var $=j.type,ue=$===void 0?5:$,ae=j.text,J=j.buttonText,ie=J===void 0?"OK":J,ge=j.callback,ee=j.position,Y=ee===void 0?h.positions.force||Y.top:ee;I(),z();var Te=document.createElement("div"),ne=S();Te.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var xe=document.createElement("div");xe.classList.add(h.classes.button),xe.classList.add(y[ue]),xe.innerHTML=ie,xe.onclick=function(){_(ne,Y),N(),ge?ge():W&&W()},Te.appendChild(re),Te.appendChild(xe),Te.listener=function(ze){A(ze)&&xe.click()},O(Te,Y),k()},C=p.confirm=function(j,W,$){var ue=j.text,ae=j.submitText,J=ae===void 0?"Yes":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,Te=j.position,ne=Te===void 0?h.positions.confirm||ne.top:Te;I(),z();var re=document.createElement("div"),xe=S();re.id=xe;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=J,_e.onclick=function(){_(xe,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=ge,de.onclick=function(){_(xe,ne),N(),Y?Y():$&&$()},re.appendChild(ze),re.appendChild(_e),re.appendChild(de),re.listener=function(gt){A(gt)?_e.click():v(gt)&&de.click()},O(re,ne),k(re,ne)},P=function(j,W,$){var ue=j.text,ae=j.submitText,J=ae===void 0?"Submit":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,Te=j.position,ne=Te===void 0?h.positions.input||ne.top:Te,re=g(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);I(),z();var xe=document.createElement("div"),ze=S();xe.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var xt="",sn=re.allowed,In=0;In'+$+"",Y.appendChild(ne),ie.forEach(function(xe,ze){var _e=xe.type,de=_e===void 0?1:_e,gt=xe.text,Pt=xe.handler,bt=document.createElement("div");bt.classList.add(y[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var xt=ie[ze+1];xt&&!xt.type&&(xt.type=1),xt&&xt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=gt,bt.onclick=function(){_(Te,ee),N(),Pt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){_(Te,ee),N(),J?J():W&&W()},Y.appendChild(re),Y.listener=function(xe){v(xe)&&re.click()},O(Y,ee),k(Y,ee)},H=p.date=function(j,W,$){var ue=j.value,ae=ue===void 0?new Date:ue,J=j.submitText,ie=J===void 0?"OK":J,ge=j.cancelText,ee=ge===void 0?"Cancel":ge,Y=j.submitCallback,Te=j.cancelCallback,ne=j.position,re=ne===void 0?h.positions.date||re.top:ne;I(),z();var xe="▾",ze=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),gt=function(mt){ze.innerHTML=h.dateMonths[mt.getMonth()],_e.innerHTML=mt.getDate(),de.innerHTML=mt.getFullYear()},Pt=function(mt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),Dn=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Dn)>Xe&&(Dn=Xe.toString()),mt.target.textContent=Dn,Number(Dn)<1&&(Dn="1"),ae.setDate(Number(Dn))},bt=function(mt){var Xe=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);mt.target.textContent=Xe,ae.setFullYear(Number(Xe))},xt=function(mt){gt(ae)},sn=function(mt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+mt+1,0).getDate();ae.getDate()>Xe&&ae.setDate(Xe),ae.setMonth(ae.getMonth()+mt),gt(ae)},In=function(mt){ae.setDate(ae.getDate()+mt),gt(ae)},wo=function(mt){var Xe=ae.getFullYear()+mt;Xe<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+mt),gt(ae)},ir=document.createElement("div"),ka=S();ir.id=ka;var ui=document.createElement("div");ui.classList.add(h.classes.backgroundInfo);var Vt=document.createElement("div");Vt.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=xe;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=xe;var wn=document.createElement("div");wn.classList.add(h.classes.button),wn.classList.add(h.classes.elementThird),wn.classList.add(h.classes.dateSelectorUp),wn.innerHTML=xe,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",xt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",xt),de.innerHTML=ae.getFullYear();var hr=document.createElement("div");hr.classList.add(h.classes.button),hr.classList.add(h.classes.elementThird),hr.innerHTML=xe;var br=document.createElement("div");br.classList.add(h.classes.button),br.classList.add(h.classes.elementThird),br.innerHTML=xe;var Pa=document.createElement("div");Pa.classList.add(h.classes.button),Pa.classList.add(h.classes.elementThird),Pa.innerHTML=xe,Hn.onclick=function(){return sn(1)},Yt.onclick=function(){return In(1)},wn.onclick=function(){return wo(1)},hr.onclick=function(){return sn(-1)},br.onclick=function(){return In(-1)},Pa.onclick=function(){return wo(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){_(ka,re),N(),Y?Y(ae):W&&W(ae)};var Tr=document.createElement("div");Tr.classList.add(h.classes.button),Tr.classList.add(h.classes.elementHalf),Tr.classList.add(h.classes.backgroundError),Tr.innerHTML=ee,Tr.onclick=function(){_(ka,re),N(),Te?Te(ae):$&&$(ae)},Vt.appendChild(Hn),Vt.appendChild(Yt),Vt.appendChild(wn),Vt.appendChild(ze),Vt.appendChild(_e),Vt.appendChild(de),Vt.appendChild(hr),Vt.appendChild(br),Vt.appendChild(Pa),ui.appendChild(Vt),ir.appendChild(ui),ir.appendChild(un),ir.appendChild(Tr),ir.listener=function(mt){A(mt)?un.click():v(mt)&&Tr.click()},O(ir,re),k(ir,re)};p.default={alert:q,force:F,confirm:C,input:P,select:U,date:H,setOptions:E,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),Uf={};ex(Uf,{default:()=>du});var nx=zf(Nf());tx(Uf,zf(Nf()));var{default:Of,...rx}=nx,du=Of!==void 0?Of:rx;d();d();var pu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Lo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function Bd(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function qf(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;igi[t.toLowerCase()]||Gn[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),ax=t=>Object.keys(gi).find(e=>gi[e]===t),ix=t=>Object.keys(Gn).find(e=>Gn[e]===t);function $f(t){Kf=t||"all"}function _o(){return Kf||"all"}function ox(){return rt.slice(0)}function sx(){return rt.map(t=>ax(t)||ix(t)||String.fromCharCode(t))}function ux(){let t=[];return Object.keys(ft).forEach(e=>{ft[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Fo(o))})})}),t}function lx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function cx(t){return typeof t=="string"&&(t=Fo(t)),rt.indexOf(t)!==-1}function dx(t,e){let n,r;t||(t=_o());for(let a in ft)if(Object.prototype.hasOwnProperty.call(ft,a))for(n=ft[a],r=0;r=0&&rt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&rt.splice(0,rt.length),(e===93||e===224)&&(e=91),e in zt){zt[e]=!1;for(let r in Gn)Gn[r]===e&&(wr[r]=!1)}}function Vf(t,...e){if(typeof t>"u")Object.keys(ft).forEach(n=>delete ft[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&Rd(n)});else if(typeof t=="object")t.key&&Rd(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),Rd({key:t,scope:n,method:r,splitKey:"+"})}}var Rd=({key:t,scope:e,method:n,splitKey:r="+"})=>{Id(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Fo(u);if(!ft[l])return;e||(e=_o());let c=s>1?Bd(Gn,o):[];ft[l]=ft[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&qf(p.mods,c)))})};function Hf(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in zt)Object.prototype.hasOwnProperty.call(zt,i)&&(!zt[i]&&e.mods.indexOf(+i)>-1||zt[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!zt[16]&&!zt[18]&&!zt[17]&&!zt[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(rt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Wf(t,e){let n=ft["*"],r=t.keyCode||t.which||t.charCode;if(!wr.filter.call(this,t))return;if((r===93||r===224)&&(r=91),rt.indexOf(r)===-1&&r!==229&&rt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=gu[i];t[i]&&rt.indexOf(o)===-1?rt.push(o):!t[i]&&rt.indexOf(o)>-1?rt.splice(rt.indexOf(o),1):i==="metaKey"&&t[i]&&rt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(rt=rt.slice(rt.indexOf(o))))}),r in zt){zt[r]=!0;for(let i in Gn)Gn[i]===r&&(wr[i]=!0);if(!n)return}for(let i in zt)Object.prototype.hasOwnProperty.call(zt,i)&&(zt[i]=t[gu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(rt.indexOf(17)===-1&&rt.push(17),rt.indexOf(18)===-1&&rt.push(18),zt[17]=!0,zt[18]=!0);let a=_o();if(n)for(let i=0;i-1}function wr(t,e,n){rt=[];let r=Id(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,m=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(m=!0)),typeof e=="string"&&(i=e),m&&Vf(t,i);s1&&(a=Bd(Gn,t)),t=t[t.length-1],t=t==="*"?"*":Fo(t),t in ft||(ft[t]=[]),ft[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!gx(o)&&window&&(Gf.push(o),Lo(o,"keydown",g=>{Wf(g,o)},p),jf||(jf=!0,Lo(window,"focus",()=>{rt=[]},p),Lo(window,"click",()=>{rt=[]},!1)),Lo(o,"keyup",g=>{Wf(g,o),px(g)},p))}function mx(t,e="all"){Object.keys(ft).forEach(n=>{ft[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var Od={getPressedKeyString:sx,setScope:$f,getScope:_o,deleteScope:dx,getPressedKeyCodes:ox,getAllKeyCodes:ux,isPressed:cx,filter:lx,trigger:mx,unbind:Vf,keyMap:gi,modifier:Gn,modifierMap:gu};for(let t in Od)Object.prototype.hasOwnProperty.call(Od,t)&&(wr[t]=Od[t]);if(typeof window<"u"){let t=window.hotkeys;wr.noConflict=e=>(e&&window.hotkeys===wr&&(window.hotkeys=t),wr),window.hotkeys=wr}var vn=wr;d();d();var fx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Qf={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Kr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return fx[t]}static getBrowserTypeByAlias(t){return Qf[t]||""}},at=/version\/(\d+(\.?_?\d+)+)/i,hx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],bx=hx,Tx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:dn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:dn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:dn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],yx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],vx=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Kr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Kr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Kr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Kr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Kr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Kr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Kr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],Sx=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(bx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Tx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(yx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(vx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},Yf=Sx,xx=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Yf(t,e)}static parse(t){return new Yf(t).getResult()}static get BROWSER_MAP(){return Qf}static get ENGINE_MAP(){return Kr}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},mi=xx;d();d();var{entries:ah,setPrototypeOf:Jf,isFrozen:Ex,getPrototypeOf:Cx,getOwnPropertyDescriptor:wx}=Object,{freeze:pn,seal:Vn,create:Dx}=Object,{apply:Hd,construct:Wd}=typeof Reflect<"u"&&Reflect;Hd||(Hd=function(t,e,n){return t.apply(e,n)});pn||(pn=function(t){return t});Vn||(Vn=function(t){return t});Wd||(Wd=function(t,e){return new t(...e)});var Ax=zn(Array.prototype.forEach),Zf=zn(Array.prototype.pop),Mo=zn(Array.prototype.push),hu=zn(String.prototype.toLowerCase),zd=zn(String.prototype.toString),kx=zn(String.prototype.match),$n=zn(String.prototype.replace),Px=zn(String.prototype.indexOf),Lx=zn(String.prototype.trim),An=zn(RegExp.prototype.test),Bo=_x(TypeError);function zn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Rx=Vn(/\${[\w\W]*}/gm),Ox=Vn(/^data-[\-\w.\u00B7-\uFFFF]/),zx=Vn(/^aria-[\-\w]+$/),ih=Vn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nx=Vn(/^(?:\w+script|data):/i),Ux=Vn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=Vn(/^html$/i),rh=Object.freeze({__proto__:null,MUSTACHE_EXPR:Bx,ERB_EXPR:Ix,TMPLIT_EXPR:Rx,DATA_ATTR:Ox,ARIA_ATTR:zx,IS_ALLOWED_URI:ih,IS_SCRIPT_OR_DATA:Nx,ATTR_WHITESPACE:Ux,DOCTYPE_NAME:oh}),qx=()=>typeof window>"u"?null:window,jx=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function sh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qx(),e=R=>sh(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:g}=t,f=u.prototype,T=mu(f,"cloneNode"),b=mu(f,"nextSibling"),h=mu(f,"childNodes"),E=mu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:I,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:L}=a,{importNode:A}=n,v={};e.isSupported=typeof ah=="function"&&typeof E=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:_,TMPLIT_EXPR:k,DATA_ATTR:N,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:F}=rh,{IS_ALLOWED_URI:C}=rh,P=null,U=Oe({},[...Xf,...Nd,...Ud,...qd,...eh]),H=null,j=Oe({},[...th,...jd,...nh,...fu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,ue=null,ae=!0,J=!0,ie=!1,ge=!0,ee=!1,Y=!1,Te=!1,ne=!1,re=!1,xe=!1,ze=!1,_e=!0,de=!1,gt="user-content-",Pt=!0,bt=!1,xt={},sn=null,In=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),wo=null,ir=Oe({},["audio","video","img","source","image","track"]),ka=null,ui=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",wn=Yt,hr=!1,br=null,Pa=Oe({},[Vt,Hn,Yt],zd),un,Tr=["application/xhtml+xml","text/html"],mt="text/html",Xe,Dn=null,Y9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},ld=function(R){if(!(Dn&&Dn===R)){if((!R||typeof R!="object")&&(R={}),R=fi(R),un=Tr.indexOf(R.PARSER_MEDIA_TYPE)===-1?un=mt:un=R.PARSER_MEDIA_TYPE,Xe=un==="application/xhtml+xml"?zd:hu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Xe):U,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Xe):j,br="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,zd):Pa,ka="ADD_URI_SAFE_ATTR"in R?Oe(fi(ui),R.ADD_URI_SAFE_ATTR,Xe):ui,wo="ADD_DATA_URI_TAGS"in R?Oe(fi(ir),R.ADD_DATA_URI_TAGS,Xe):ir,sn="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Xe):In,$="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Xe):{},ue="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Xe):{},xt="USE_PROFILES"in R?R.USE_PROFILES:!1,ae=R.ALLOW_ARIA_ATTR!==!1,J=R.ALLOW_DATA_ATTR!==!1,ie=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,re=R.RETURN_DOM||!1,xe=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ne=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,de=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,bt=R.IN_PLACE||!1,C=R.ALLOWED_URI_REGEXP||ih,wn=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(J=!1),xe&&(re=!0),xt&&(P=Oe({},[...eh]),H=[],xt.html===!0&&(Oe(P,Xf),Oe(H,th)),xt.svg===!0&&(Oe(P,Nd),Oe(H,jd),Oe(H,fu)),xt.svgFilters===!0&&(Oe(P,Ud),Oe(H,jd),Oe(H,fu)),xt.mathMl===!0&&(Oe(P,qd),Oe(H,nh),Oe(H,fu))),R.ADD_TAGS&&(P===U&&(P=fi(P)),Oe(P,R.ADD_TAGS,Xe)),R.ADD_ATTR&&(H===j&&(H=fi(H)),Oe(H,R.ADD_ATTR,Xe)),R.ADD_URI_SAFE_ATTR&&Oe(ka,R.ADD_URI_SAFE_ATTR,Xe),R.FORBID_CONTENTS&&(sn===In&&(sn=fi(sn)),Oe(sn,R.FORBID_CONTENTS,Xe)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete $.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=jx(g,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));pn&&pn(R),Dn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),Q9=Oe({},["title","style","font","a","script"]),Zs=Oe({},Nd);Oe(Zs,Ud),Oe(Zs,Fx);let cd=Oe({},qd);Oe(cd,Mx);let J9=function(R){let le=E(R);(!le||!le.tagName)&&(le={namespaceURI:wn,tagName:"template"});let Z=hu(R.tagName),Ge=hu(le.tagName);return br[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?Z==="svg":le.namespaceURI===Vt?Z==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Zs[Z]:R.namespaceURI===Vt?le.namespaceURI===Yt?Z==="math":le.namespaceURI===Hn?Z==="math"&&lf[Ge]:!!cd[Z]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===Vt&&!uf[Ge]?!1:!cd[Z]&&(Q9[Z]||!Zs[Z]):!!(un==="application/xhtml+xml"&&br[R.namespaceURI]):!1},li=function(R){Mo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},dd=function(R,le){try{Mo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Mo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(re||xe)try{li(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,Z;if(ne)R=""+R;else{let ln=kx(R,/^[\r\n\t ]+/);Z=ln&&ln[0]}un==="application/xhtml+xml"&&wn===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(wn===Yt)try{le=new m().parseFromString(Ge,un)}catch{}if(!le||!le.documentElement){le=I.createDocument(wn,"template",null);try{le.documentElement.innerHTML=hr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&Z&&Lt.insertBefore(a.createTextNode(Z),Lt.childNodes[0]||null),wn===Yt?L.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Z9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Xs=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},yr=function(R,le,Z){v[R]&&Ax(v[R],Ge=>{Ge.call(e,le,Z,Dn)})},pf=function(R){let le;if(yr("beforeSanitizeElements",R,null),Z9(R))return li(R),!0;let Z=Xe(R.nodeName);if(yr("uponSanitizeElement",R,{tagName:Z,allowedTags:P}),R.hasChildNodes()&&!Xs(R.firstElementChild)&&(!Xs(R.content)||!Xs(R.content.firstElementChild))&&An(/<[/\w]/g,R.innerHTML)&&An(/<[/\w]/g,R.textContent))return li(R),!0;if(!P[Z]||$[Z]){if(!$[Z]&&mf(Z)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z)))return!1;if(Pt&&!sn[Z]){let Ge=E(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let ln=Lt.length;for(let yn=ln-1;yn>=0;--yn)Ge.insertBefore(T(Lt[yn],!0),b(R))}}return li(R),!0}return R instanceof u&&!J9(R)||(Z==="noscript"||Z==="noembed")&&An(/<\/no(script|embed)/i,R.innerHTML)?(li(R),!0):(ee&&R.nodeType===3&&(le=R.textContent,le=$n(le,O," "),le=$n(le,_," "),le=$n(le,k," "),R.textContent!==le&&(Mo(e.removed,{element:R.cloneNode()}),R.textContent=le)),yr("afterSanitizeElements",R,null),!1)},gf=function(R,le,Z){if(_e&&(le==="id"||le==="name")&&(Z in a||Z in Y9))return!1;if(!(J&&!ue[le]&&An(N,le))&&!(ae&&An(z,le))){if(!H[le]||ue[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&An(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z))))return!1}else if(!ka[le]&&!An(C,$n(Z,F,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&Px(Z,"data:")===0&&wo[R])&&!(ie&&!An(q,$n(Z,F,"")))&&Z)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,Z,Ge,Lt;yr("beforeSanitizeAttributes",R,null);let{attributes:ln}=R;if(!ln)return;let yn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=ln.length;Lt--;){le=ln[Lt];let{name:Rt,namespaceURI:ci}=le;if(Z=Rt==="value"?le.value:Lx(le.value),Ge=Xe(Rt),yn.attrName=Ge,yn.attrValue=Z,yn.keepAttr=!0,yn.forceKeepAttr=void 0,yr("uponSanitizeAttribute",R,yn),Z=yn.attrValue,yn.forceKeepAttr||(dd(Rt,R),!yn.keepAttr))continue;if(!ge&&An(/\/>/i,Z)){dd(Rt,R);continue}ee&&(Z=$n(Z,O," "),Z=$n(Z,_," "),Z=$n(Z,k," "));let hf=Xe(R.nodeName);if(gf(hf,Ge,Z)){if(de&&(Ge==="id"||Ge==="name")&&(dd(Rt,R),Z=gt+Z),D&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ci)switch(g.getAttributeType(hf,Ge)){case"TrustedHTML":{Z=D.createHTML(Z);break}case"TrustedScriptURL":{Z=D.createScriptURL(Z);break}}try{ci?R.setAttributeNS(ci,Rt,Z):R.setAttribute(Rt,Z),Zf(e.removed)}catch{}}}yr("afterSanitizeAttributes",R,null)},X9=function R(le){let Z,Ge=df(le);for(yr("beforeSanitizeShadowDOM",le,null);Z=Ge.nextNode();)yr("uponSanitizeShadowNode",Z,null),!pf(Z)&&(Z.content instanceof i&&R(Z.content),ff(Z));yr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z,Ge,Lt,ln;if(hr=!R,hr&&(R=""),typeof R!="string"&&!Xs(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Bo("dirty is not a string, aborting")}else throw Bo("toString is not a function");if(!e.isSupported)return R;if(Te||ld(le),e.removed=[],typeof R=="string"&&(bt=!1),bt){if(R.nodeName){let ci=Xe(R.nodeName);if(!P[ci]||$[ci])throw Bo("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)Z=cf(""),Ge=Z.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Z=Ge:Z.appendChild(Ge);else{if(!re&&!ee&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(Z=cf(R),!Z)return re?null:ze?M:""}Z&&ne&&li(Z.firstChild);let yn=df(bt?R:Z);for(;Lt=yn.nextNode();)pf(Lt)||(Lt.content instanceof i&&X9(Lt.content),ff(Lt));if(bt)return R;if(re){if(xe)for(ln=y.call(Z.ownerDocument);Z.firstChild;)ln.appendChild(Z.firstChild);else ln=Z;return(H.shadowroot||H.shadowrootmod)&&(ln=A.call(n,ln,!0)),ln}let Rt=Y?Z.outerHTML:Z.innerHTML;return Y&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&An(oh,Z.ownerDocument.doctype.name)&&(Rt=" +`+Rt),ee&&(Rt=$n(Rt,O," "),Rt=$n(Rt,_," "),Rt=$n(Rt,k," ")),D&&ze?D.createHTML(Rt):Rt},e.setConfig=function(R){ld(R),Te=!0},e.clearConfig=function(){Dn=null,Te=!1},e.isValidAttribute=function(R,le,Z){Dn||ld({});let Ge=Xe(R),Lt=Xe(le);return gf(Ge,Lt,Z)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Mo(v[R],le))},e.removeHook=function(R){if(v[R])return Zf(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var Ye=sh();d();d();var Hx=Object.create,Gd=Object.defineProperty,Wx=Object.getOwnPropertyDescriptor,Kx=Object.getOwnPropertyNames,Gx=Object.getPrototypeOf,$x=Object.prototype.hasOwnProperty,$d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vx=(t,e)=>{for(var n in e)Gd(t,n,{get:e[n],enumerable:!0})},Kd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Kx(e))!$x.call(t,a)&&a!==n&&Gd(t,a,{get:()=>e[a],enumerable:!(r=Wx(e,a))||r.enumerable});return t},Yx=(t,e,n)=>(Kd(t,e,"default"),n&&Kd(n,e,"default")),lh=(t,e,n)=>(n=t!=null?Hx(Gx(t)):{},Kd(e||!t||!t.__esModule?Gd(n,"default",{value:t,enumerable:!0}):n,t)),Qx=$d((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var m=this._doc.createElement("span");l.firstChild;)m.appendChild(l.firstChild);l.parentNode.replaceChild(m,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),m=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),m){var g=m.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",g)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(g){return g.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var m=s(a);return m<=4&&(!o||m!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,m=l.firstChild;m;){var g=m.nextSibling;if(this._isPhrasingContent(m))p!==null?p.appendChild(m):this._isWhitespace(m)||(p=a.createElement("p"),l.replaceChild(p,m),p.appendChild(m));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}m=g}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var xe=this._getInnerText(re);if(!(xe.length<25)){var ze=this._getNodeAncestors(re,5);if(ze.length!==0){var _e=0;_e+=1,_e+=xe.split(",").length,_e+=Math.min(Math.floor(xe.length/100),3),this._forEachNode(ze,function(de,gt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),T.push(de)),gt===0)var Pt=1;else gt===1?Pt=2:Pt=gt*3;de.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,E=T.length;hS.readability.contentScore){b.splice(I,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,L=!1,A;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],O=1;O=.75&&v.push(this._getNodeAncestors(b[O]));var _=3;if(v.length>=_)for(A=y.parentNode;A.tagName!=="BODY";){for(var k=0,N=0;N=_){y=A;break}A=A.parentNode}y.readability||this._initializeNode(y),A=y.parentNode;for(var z=y.readability.contentScore,q=z/3;A.tagName!=="BODY";){if(!A.readability){A=A.parentNode;continue}var F=A.readability.contentScore;if(Fz){y=A;break}z=A.readability.contentScore,A=A.parentNode}for(A=y.parentNode;A.tagName!="BODY"&&A.children.length==1;)y=A,A=y.parentNode;y.readability||this._initializeNode(y)}var C=a.createElement("DIV");i&&(C.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);A=y.parentNode;for(var U=A.children,H=0,j=U.length;H=P)$=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),J=this._getInnerText(W),ie=J.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&J.search(/\.( |$)/)!==-1)&&($=!0)}}$&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),C.appendChild(W),U=A.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+C.innerHTML),this._prepArticle(C),this._debug&&this.log("Article content post-prep: "+C.innerHTML),L)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";C.firstChild;)ge.appendChild(C.firstChild);C.appendChild(ge)}this._debug&&this.log("Article content after paging: "+C.innerHTML);var ee=!0,Y=this._getInnerText(C,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(m){return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(m){return m&&typeof m.name=="string"}).map(function(m){return m.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(m){this.log(m.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),m=l.getAttribute("content");if(m){var g=null,f=null;p&&(g=p.match(s),g&&(f=g[0].toLowerCase().replace(/\s/g,""),i[f]=m.trim())),!g&&c&&u.test(c)&&(f=c,m&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=m.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],m=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(m)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var g=this._getRowAndColumnCount(o);if(g.rows>=10||g.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=g.rows*g.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(A){return A._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,A=>u+=this._getInnerText(A).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var m=i.getElementsByTagName("p").length,g=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,E=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&m/g<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>m||T>Math.floor(m/3)||!s&&b<.9&&S<25&&(g===0||g>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&I>.2||c>=25&&I>.5||h===1&&S<75||h>1;if(s&&y){for(var L=0;L1)return y;let A=i.getElementsByTagName("li").length;if(g==A)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),Jx=$d((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(m){c.add(m.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(m){if(!o.visibilityChecker(m))return!1;var g=m.className+" "+m.id;if(n.unlikelyCandidates.test(g)&&!n.okMaybeItsACandidate.test(g)||m.matches("li p"))return!1;var f=m.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),ch=$d((t,e)=>{var n=Qx(),r=Jx();e.exports={Readability:n,isProbablyReaderable:r}}),dh={};Vx(dh,{Readability:()=>bu,default:()=>mh,isProbablyReaderable:()=>gh});var ph=lh(ch());Yx(dh,lh(ch()));var{Readability:bu,isProbablyReaderable:gh}=ph,{default:uh,...Zx}=ph,mh=uh!==void 0?uh:Zx;var Na={};eu(Na,{Breadcrumbs:()=>Vr,BrowserClient:()=>Ci,Dedupe:()=>Zr,FunctionToString:()=>Ra,GlobalHandlers:()=>cr,HttpContext:()=>Jr,Hub:()=>_r,InboundFilters:()=>Oa,Integrations:()=>FC,LinkedErrors:()=>Qr,SDK_VERSION:()=>Ei,Scope:()=>Nn,TryCatch:()=>Yr,addBreadcrumb:()=>Pu,addGlobalEventProcessor:()=>lr,captureEvent:()=>Au,captureException:()=>Si,captureMessage:()=>Du,chromeStackLineParser:()=>w0,close:()=>D4,configureScope:()=>ku,createTransport:()=>$o,defaultIntegrations:()=>F0,defaultStackLineParsers:()=>k0,defaultStackParser:()=>qu,flush:()=>w4,forceLoad:()=>E4,geckoStackLineParser:()=>D0,getCurrentHub:()=>Le,getHubFromCarrier:()=>Un,init:()=>v4,lastEventId:()=>x4,makeFetchTransport:()=>Vo,makeMain:()=>vi,onLoad:()=>C4,opera10StackLineParser:()=>o4,opera11StackLineParser:()=>s4,setContext:()=>Lu,setExtra:()=>Fu,setExtras:()=>_u,setTag:()=>Bu,setTags:()=>Mu,setUser:()=>Iu,showReportDialog:()=>S4,startTransaction:()=>Ru,winjsStackLineParser:()=>A0,withScope:()=>xi,wrap:()=>A4});d();d();d();d();d();d();d();d();d();var fh=Object.prototype.toString;function Tu(t){switch(fh.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return or(t,Error)}}function Io(t,e){return fh.call(t)===`[object ${e}]`}function yu(t){return Io(t,"ErrorEvent")}function hh(t){return Io(t,"DOMException")}function Dr(t){return Io(t,"String")}function Ro(t){return t===null||typeof t!="object"&&typeof t!="function"}function Yn(t){return Io(t,"Object")}function Oo(t){return typeof Event<"u"&&or(t,Event)}function bh(t){return!1}function Th(t){return Io(t,"RegExp")}function hi(t){return!!(t&&t.then&&typeof t.then=="function")}function yh(t){return Yn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function vh(t){return typeof t=="number"&&t!==t}function or(t,e){try{return t instanceof e}catch{return!1}}function zo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function Xx(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Dr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return xh({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function xh(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function rE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!tE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function vu(t){let e=typeof t=="string"?nE(t):xh(t);return rE(e),e}d();var aE={};function it(){return typeof window<"u"?window:typeof self<"u"?self:aE}function bi(t,e,n){let r=n||it(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var No=["debug","info","warn","error","log","assert","trace"];function Vd(t){if(!("console"in it()))return t();let n=console,r={};No.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function Eh(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?No.forEach(n=>{e[n]=(...r)=>{t&&Vd(()=>{})}}):No.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=bi("logger",Eh):Se=Eh();d();d();function Ma(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function Yd(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Zd(t){if(Tu(t))return{message:t.message,name:t.name,stack:t.stack,...wh(t)};if(Oo(t)){let e={type:t.type,target:Ch(t.target),currentTarget:Ch(t.currentTarget),...wh(t)};return typeof CustomEvent<"u"&&or(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Ch(t){try{return bh(t)?zo(t):Object.prototype.toString.call(t)}catch{return""}}function wh(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ah(t,e=40){let n=Object.keys(Zd(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ma(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:Ma(a,e)}return""}function Ba(t){return Qd(t,new Map)}function Qd(t,e){if(Yn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=Qd(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(Qd(a,e))}),r}return t}d();var iE=50;function e0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return oE(a)}}function kh(t){return Array.isArray(t)?e0(...t):t}function oE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,iE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var Xd="";function Jn(t){try{return!t||typeof t!="function"?Xd:t.name||Xd}catch{return Xd}}d();function Ph(){if(!("fetch"in it()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Lh(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function _h(){return!0}var Ar=it(),qo={},Fh={};function sE(t){if(!Fh[t])switch(Fh[t]=!0,t){case"console":uE();break;case"fetch":lE();break;case"error":pE();break;case"unhandledrejection":gE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function Zn(t,e){qo[t]=qo[t]||[],qo[t].push(e),sE(t)}function yi(t,e){if(!(!t||!qo[t]))for(let n of qo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${Jn(n)} -Error:`,r)}}function uE(){"console"in Ar&&zo.forEach(function(t){t in console&&Qn(console,t,function(e){return function(...n){yi("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function lE(){_h()&&Qn(Ar,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:cE(e),url:dE(e)},startTimestamp:Date.now()};return yi("fetch",{...n}),t.apply(Ar,e).then(r=>(yi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function cE(t=[]){return"Request"in Ar&&or(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function dE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Ar&&or(t[0],Request)?t[0].url:String(t[0])}var n0=null;function pE(){n0=Ar.onerror,Ar.onerror=function(t,e,n,r,a){return yi("error",{column:r,error:a,line:n,msg:t,url:e}),n0?n0.apply(this,arguments):!1}}var r0=null;function gE(){r0=Ar.onunhandledrejection,Ar.onunhandledrejection=function(t){return yi("unhandledrejection",t),r0?r0.apply(this,arguments):!0}}d();function Mh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function xu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function Bh(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Pr(t){let{message:e,event_id:n}=t;if(e)return e;let r=Bh(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function qo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Gr(t,e){let n=Bh(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function a0(t){if(t&&t.__sentry_captured__)return!0;try{No(t,"__sentry_captured__",!0)}catch{}return!1}d();function Ih(){return!1}d();function Lr(t,e=1/0,n=1/0){try{return i0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function o0(t,e=3,n=100*1024){let r=Lr(t,e);return hE(r)>n?o0(t,e-1,n):r}function i0(t,e,n=1/0,r=1/0,a=Mh()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!vh(e))return e;let s=mE(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return i0("",m,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=Xd(e);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(c>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=i0(m,g,n-1,r,a),c+=1}return o(e),l}function mE(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":yh(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Jn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function fE(t){return~-encodeURI(t).split(/%..|./).length}function hE(t){return fE(JSON.stringify(t))}d();d();d();function Sn(t){return new sr(e=>{e(t)})}function jo(t){return new sr((e,n)=>{n(t)})}var sr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(hi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Rh(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new sr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{Sn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var bE=["fatal","error","warning","log","info","debug"];function Oh(t){return t==="warn"?"warning":bE.includes(t)?t:"log"}d();var u0={nowSeconds:()=>Date.now()/1e3};function TE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var s0=TE(),zh=s0===void 0?u0:{nowSeconds:()=>(s0.timeOrigin+s0.now())/1e3},Vr=u0.nowSeconds.bind(u0),l0=zh.nowSeconds.bind(zh);var Eu,DF=(()=>{if(!performance||!performance.now){Eu="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function c0(t,e){return(e||new TextEncoder).encode(t)}function Cu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[c0(a,e),o]:a.push(typeof o=="string"?c0(o,e):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function uE(){"console"in Ar&&No.forEach(function(t){t in console&&Qn(console,t,function(e){return function(...n){yi("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function lE(){_h()&&Qn(Ar,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:cE(e),url:dE(e)},startTimestamp:Date.now()};return yi("fetch",{...n}),t.apply(Ar,e).then(r=>(yi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function cE(t=[]){return"Request"in Ar&&or(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function dE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Ar&&or(t[0],Request)?t[0].url:String(t[0])}var t0=null;function pE(){t0=Ar.onerror,Ar.onerror=function(t,e,n,r,a){return yi("error",{column:r,error:a,line:n,msg:t,url:e}),t0?t0.apply(this,arguments):!1}}var n0=null;function gE(){n0=Ar.onunhandledrejection,Ar.onunhandledrejection=function(t){return yi("unhandledrejection",t),n0?n0.apply(this,arguments):!0}}d();function Mh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function xu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function Bh(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Pr(t){let{message:e,event_id:n}=t;if(e)return e;let r=Bh(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function jo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Gr(t,e){let n=Bh(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function r0(t){if(t&&t.__sentry_captured__)return!0;try{Uo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Ih(){return!1}d();function Lr(t,e=1/0,n=1/0){try{return a0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function i0(t,e=3,n=100*1024){let r=Lr(t,e);return hE(r)>n?i0(t,e-1,n):r}function a0(t,e,n=1/0,r=1/0,a=Mh()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!vh(e))return e;let s=mE(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return a0("",m,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=Zd(e);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(c>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=a0(m,g,n-1,r,a),c+=1}return o(e),l}function mE(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":yh(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Jn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function fE(t){return~-encodeURI(t).split(/%..|./).length}function hE(t){return fE(JSON.stringify(t))}d();d();d();function Sn(t){return new sr(e=>{e(t)})}function Ho(t){return new sr((e,n)=>{n(t)})}var sr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(hi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Rh(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new sr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{Sn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var bE=["fatal","error","warning","log","info","debug"];function Oh(t){return t==="warn"?"warning":bE.includes(t)?t:"log"}d();var s0={nowSeconds:()=>Date.now()/1e3};function TE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var o0=TE(),zh=o0===void 0?s0:{nowSeconds:()=>(o0.timeOrigin+o0.now())/1e3},$r=s0.nowSeconds.bind(s0),u0=zh.nowSeconds.bind(zh);var Eu,DF=(()=>{if(!performance||!performance.now){Eu="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function l0(t,e){return(e||new TextEncoder).encode(t)}function Cu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[l0(a,e),o]:a.push(typeof o=="string"?l0(o,e):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:yE(a)}function yE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function Uh(t,e){let n=typeof t.data=="string"?c0(t.data,e):t.data;return[Ba({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var vE={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function p0(t){return vE[t]}d();function qh(t,e,n){let r=[{type:"client_report"},{timestamp:n||Vr(),discarded_events:t}];return Ia(e?{dsn:e}:{},[r])}d();var SE=60*1e3;function xE(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?SE:r-e}function EE(t,e){return t[e]||t.all||0}function jh(t,e,n=Date.now()){return EE(t,e)>n}function Hh(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let m of l.split(";"))a[m]=r+p}else o?a.all=r+xE(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Wh(t){return t[0]}d();function g0(t){let e=l0(),n={sid:kr(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CE(n)};return t&&ur(n,t),n}function ur(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||l0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:kr()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function m0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),ur(t,n)}function CE(t){return Ba({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Kh=100,Nn=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ur(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Yn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Kh):Kh;if(r<=0)return this;let a={timestamp:Vr(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Gh(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new sr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),hi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Gh(){return bi("globalEventProcessors",()=>[])}function lr(t){Gh().push(t)}d();d();var f0=4,wE=100,_r=class{constructor(e,n=new Nn,r=f0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:kr(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:kr();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=wE}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:Vr(),...e},l=i?Yd(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=vi(this);try{e(this)}finally{vi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&m0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=at(),{userAgent:s}=o.navigator||{},u=g0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ur(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=Ho().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Ho(){let t=at();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function vi(t){let e=Ho(),n=Un(e);return wu(e,t),n}function Le(){let t=Ho();return(!Vh(t)||Un(t).isOlderThan(f0))&&wu(t,new _r),Ih()?DE(t):Un(t)}function DE(t){try{let e=Ho().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return Un(t);if(!Vh(n)||Un(n).isOlderThan(f0)){let r=Un(t).getStackTop();wu(n,new _r(r.client,Nn.clone(r.scope)))}return Un(n)}catch{return Un(t)}}function Vh(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Un(t){return bi("hub",()=>new _r,t)}function wu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Si(t,e){return Le().captureException(t,{captureContext:e})}function Du(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Au(t,e){return Le().captureEvent(t,e)}function ku(t){Le().configureScope(t)}function Pu(t){Le().addBreadcrumb(t)}function Lu(t,e){Le().setContext(t,e)}function _u(t){Le().setExtras(t)}function Fu(t,e){Le().setExtra(t,e)}function Mu(t){Le().setTags(t)}function Bu(t,e){Le().setTag(t,e)}function Iu(t){Le().setUser(t)}function xi(t){Le().withScope(t)}function Ru(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var AE="7";function $h(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function kE(t){return`${$h(t)}${t.projectId}/envelope/`}function PE(t,e){return Dh({sentry_key:t.publicKey,sentry_version:AE,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Wo(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${kE(t)}?${PE(t,r)}`}function h0(t,e){let n=vu(t),r=`${$h(n)}embed/error-page/`,a=`dsn=${Fa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Yh(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function LE(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Qh(t,e,n,r){let a=Yh(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:Fa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Ia(i,[o])}function Jh(t,e,n,r){let a=Yh(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};LE(t,n&&n.sdk);let l=_E(t,a,r,e);return delete t.sdkProcessingMetadata,Ia(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function _E(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Wh(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:Fa(r)},...t.type==="transaction"&&i&&{trace:Ba({...i})}}}d();var Zh=[];function Xh(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function b0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Xh(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Xh(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function e4(t){let e={};return t.forEach(n=>{e[n.name]=n,Zh.indexOf(n.name)===-1&&(n.setupOnce(lr,Le),Zh.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var t4="Not capturing exception because it's already been captured.",Ko=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=vu(e.dsn);let n=Wo(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(a0(e)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Io(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&a0(n.originalException)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ur(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):Sn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=e4(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=Jh(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Nh(r,Uh(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=Qh(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ur(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new sr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||kr(),timestamp:e.timestamp||Vr()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Nn.clone(s).update(n.captureContext));let u=Sn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Lr(i.data,n,r)}}))},...e.user&&{user:Lr(e.user,n,r)},...e.contexts&&{contexts:Lr(e.contexts,n,r)},...e.extra&&{extra:Lr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Lr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Lr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ma(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ma(s.value,o));let u=e.request;u&&u.url&&(u.url=Ma(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return jo(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),jo(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return FE(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function FE(t){let e="`beforeSend` method has to return `null` or a valid event.";if(hi(t))return t.then(n=>{if(!(Yn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Yn(t)||t===null))throw new Tt(e);return t}d();function T0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var ME=30;function Go(t,e,n=Rh(t.bufferSize||ME)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(d0(o,(p,m)=>{let g=p0(m);jh(r,g)?t.recordDroppedEvent("ratelimit_backoff",g):s.push(p)}),s.length===0)return Sn();let u=Ia(o[0],s),l=p=>{d0(u,(m,g)=>{t.recordDroppedEvent(p,p0(g))})},c=()=>e({body:Cu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Hh(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),Sn();throw p})}return{send:i,flush:a}}d();var Ei="7.7.0";var za={};eu(za,{FunctionToString:()=>Ra,InboundFilters:()=>Oa});d();d();var n4,Ra=class t{static id="FunctionToString";name=t.id;setupOnce(){n4=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ti(this)||this;return n4.apply(n,e)}}};d();var BE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Oa=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=IE(o._options,u);return RE(a,l)?null:a}}return a};r.id=this.name,e(r)}};function IE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...BE],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function RE(t,e){return e.ignoreInternal&&qE(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:yE(a)}function yE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function Uh(t,e){let n=typeof t.data=="string"?l0(t.data,e):t.data;return[Ba({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var vE={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function d0(t){return vE[t]}d();function qh(t,e,n){let r=[{type:"client_report"},{timestamp:n||$r(),discarded_events:t}];return Ia(e?{dsn:e}:{},[r])}d();var SE=60*1e3;function xE(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?SE:r-e}function EE(t,e){return t[e]||t.all||0}function jh(t,e,n=Date.now()){return EE(t,e)>n}function Hh(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let m of l.split(";"))a[m]=r+p}else o?a.all=r+xE(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Wh(t){return t[0]}d();function p0(t){let e=u0(),n={sid:kr(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CE(n)};return t&&ur(n,t),n}function ur(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||u0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:kr()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function g0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),ur(t,n)}function CE(t){return Ba({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Kh=100,Nn=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ur(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Yn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Kh):Kh;if(r<=0)return this;let a={timestamp:$r(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Gh(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new sr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),hi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Gh(){return bi("globalEventProcessors",()=>[])}function lr(t){Gh().push(t)}d();d();var m0=4,wE=100,_r=class{constructor(e,n=new Nn,r=m0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:kr(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:kr();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=wE}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:$r(),...e},l=i?Vd(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=vi(this);try{e(this)}finally{vi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&g0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=it(),{userAgent:s}=o.navigator||{},u=p0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ur(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=Wo().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Wo(){let t=it();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function vi(t){let e=Wo(),n=Un(e);return wu(e,t),n}function Le(){let t=Wo();return(!$h(t)||Un(t).isOlderThan(m0))&&wu(t,new _r),Ih()?DE(t):Un(t)}function DE(t){try{let e=Wo().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return Un(t);if(!$h(n)||Un(n).isOlderThan(m0)){let r=Un(t).getStackTop();wu(n,new _r(r.client,Nn.clone(r.scope)))}return Un(n)}catch{return Un(t)}}function $h(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Un(t){return bi("hub",()=>new _r,t)}function wu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Si(t,e){return Le().captureException(t,{captureContext:e})}function Du(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Au(t,e){return Le().captureEvent(t,e)}function ku(t){Le().configureScope(t)}function Pu(t){Le().addBreadcrumb(t)}function Lu(t,e){Le().setContext(t,e)}function _u(t){Le().setExtras(t)}function Fu(t,e){Le().setExtra(t,e)}function Mu(t){Le().setTags(t)}function Bu(t,e){Le().setTag(t,e)}function Iu(t){Le().setUser(t)}function xi(t){Le().withScope(t)}function Ru(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var AE="7";function Vh(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function kE(t){return`${Vh(t)}${t.projectId}/envelope/`}function PE(t,e){return Dh({sentry_key:t.publicKey,sentry_version:AE,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Ko(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${kE(t)}?${PE(t,r)}`}function f0(t,e){let n=vu(t),r=`${Vh(n)}embed/error-page/`,a=`dsn=${Fa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Yh(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function LE(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Qh(t,e,n,r){let a=Yh(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:Fa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Ia(i,[o])}function Jh(t,e,n,r){let a=Yh(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};LE(t,n&&n.sdk);let l=_E(t,a,r,e);return delete t.sdkProcessingMetadata,Ia(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function _E(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Wh(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:Fa(r)},...t.type==="transaction"&&i&&{trace:Ba({...i})}}}d();var Zh=[];function Xh(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function h0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Xh(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Xh(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function e4(t){let e={};return t.forEach(n=>{e[n.name]=n,Zh.indexOf(n.name)===-1&&(n.setupOnce(lr,Le),Zh.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var t4="Not capturing exception because it's already been captured.",Go=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=vu(e.dsn);let n=Ko(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(r0(e)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Ro(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&r0(n.originalException)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ur(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):Sn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=e4(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=Jh(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Nh(r,Uh(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=Qh(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ur(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new sr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||kr(),timestamp:e.timestamp||$r()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Nn.clone(s).update(n.captureContext));let u=Sn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Lr(i.data,n,r)}}))},...e.user&&{user:Lr(e.user,n,r)},...e.contexts&&{contexts:Lr(e.contexts,n,r)},...e.extra&&{extra:Lr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Lr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Lr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ma(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ma(s.value,o));let u=e.request;u&&u.url&&(u.url=Ma(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Ho(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),Ho(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return FE(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function FE(t){let e="`beforeSend` method has to return `null` or a valid event.";if(hi(t))return t.then(n=>{if(!(Yn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Yn(t)||t===null))throw new Tt(e);return t}d();function b0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var ME=30;function $o(t,e,n=Rh(t.bufferSize||ME)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(c0(o,(p,m)=>{let g=d0(m);jh(r,g)?t.recordDroppedEvent("ratelimit_backoff",g):s.push(p)}),s.length===0)return Sn();let u=Ia(o[0],s),l=p=>{c0(u,(m,g)=>{t.recordDroppedEvent(p,d0(g))})},c=()=>e({body:Cu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Hh(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),Sn();throw p})}return{send:i,flush:a}}d();var Ei="7.7.0";var za={};eu(za,{FunctionToString:()=>Ra,InboundFilters:()=>Oa});d();d();var n4,Ra=class t{static id="FunctionToString";name=t.id;setupOnce(){n4=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ti(this)||this;return n4.apply(n,e)}}};d();var BE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Oa=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=IE(o._options,u);return RE(a,l)?null:a}}return a};r.id=this.name,e(r)}};function IE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...BE],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function RE(t,e){return e.ignoreInternal&&qE(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. Event: ${Pr(t)}`),!0):OE(t,e.ignoreErrors)?(!1&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Pr(t)}`),!0):zE(t,e.denyUrls)?(!1&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Pr(t)}. Url: ${Ou(t)}`),!0):NE(t,e.allowUrls)?!1:(!1&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Pr(t)}. -Url: ${Ou(t)}`),!0)}function OE(t,e){return!e||!e.length?!1:UE(t).some(n=>e.some(r=>Su(n,r)))}function zE(t,e){if(!e||!e.length)return!1;let n=Ou(t);return n?e.some(r=>Su(n,r)):!1}function NE(t,e){if(!e||!e.length)return!0;let n=Ou(t);return n?e.some(r=>Su(n,r)):!0}function UE(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Pr(t)}`),[]}return[]}function qE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function jE(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Ou(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?jE(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Pr(t)}`),null}}d();d();function S0(t,e){let n=x0(t,e),r={type:e&&e.name,value:GE(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HE(t,e,n,r){let a={exception:{values:[{type:Ro(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Ah(e)}`}]},extra:{__serialized__:o0(e)}};if(n){let i=x0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function y0(t,e){return{exception:{values:[S0(t,e)]}}}function x0(t,e){let n=e.stacktrace||e.stack||"",r=KE(e);try{return t(n,r)}catch{}return[]}var WE=/Minified React error #\d+;/i;function KE(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(WE.test(t.message))return 1}return 0}function GE(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function r4(t,e,n,r){let a=n&&n.syntheticException||void 0,i=zu(t,e,a,r);return Gr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Sn(i)}function a4(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=v0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Sn(o)}function zu(t,e,n,r,a){let i;if(yu(e)&&e.error)return y0(t,e.error);if(hh(e)){let o=e;if("stack"in e)i=y0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=v0(t,u,n,r),qo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Tu(e)?y0(t,e):Yn(e)||Ro(e)?(i=HE(t,e,n,a),Gr(i,{synthetic:!0}),i):(i=v0(t,e,n,r),qo(i,`${e}`,void 0),Gr(i,{synthetic:!0}),i)}function v0(t,e,n,r){let a={message:e};if(r&&n){let i=x0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var E0="Breadcrumbs",$r=class t{static id=E0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Zn("console",$E),this.options.dom&&Zn("dom",VE(this.options.dom)),this.options.xhr&&Zn("xhr",YE),this.options.fetch&&Zn("fetch",QE),this.options.history&&Zn("history",JE)}};function VE(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Oo(n.event.target,a):Oo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function $E(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Oh(t.level),message:Qd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Qd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function YE(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function QE(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function JE(t){let e=at(),n=t.from,r=t.to,a=xu(e.location.href),i=xu(n),o=xu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var Uu=at(),Nu;function C0(){if(Nu)return Nu;if(Lh(fetch))return Nu=fetch.bind(Uu);let t=Uu.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Nu=e.bind(Uu)}function i4(t,e){Object.prototype.toString.call(Uu&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):Ph()&&C0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var w0=at(),Ci=class extends Ko{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ei}],version:Ei},super(e),e.sendClientReports&&w0.document&&w0.document.addEventListener("visibilitychange",()=>{w0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return r4(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return a4(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(E0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Pr(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=Wo(this._dsn,this._options),r=qh(e,this._options.tunnel&&Fa(this._dsn));try{i4(n,Cu(r))}catch(a){!1&&Se.error(a)}}};d();d();function Vo(t,e=C0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Go(t,n)}d();var wi="?",ZE=10,XE=20,eC=30,tC=40,nC=50;function $o(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var rC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aC=/\((\S*)(?::(\d+))(?::(\d+))\)/,iC=t=>{let e=rC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=aC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=u4(e[1]||wi,e[2]);return $o(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},D0=[eC,iC],oC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uC=t=>{let e=oC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=sC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||wi;return[a,r]=u4(a,r),$o(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},A0=[nC,uC],lC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cC=t=>{let e=lC.exec(t);return e?$o(e[2],e[1]||wi,+e[3],e[4]?+e[4]:void 0):void 0},k0=[tC,cC],dC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pC=t=>{let e=dC.exec(t);return e?$o(e[2],e[3]||wi,+e[1]):void 0},o4=[ZE,pC],gC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mC=t=>{let e=gC.exec(t);return e?$o(e[5],e[3]||e[4]||wi,+e[1],+e[2]):void 0},s4=[XE,mC],P0=[D0,A0,k0],qu=t0(...P0),u4=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:wi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var L0=0;function _0(){return L0>0}function fC(){L0+=1,setTimeout(()=>{L0-=1})}function Fr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ti(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>Fr(o,e));return t.apply(this,i)}catch(i){throw fC(),xi(o=>{o.addEventProcessor(s=>(e.mechanism&&(qo(s,void 0,void 0),Gr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Si(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}Zd(r,t),No(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var F0={};eu(F0,{Breadcrumbs:()=>$r,Dedupe:()=>Zr,GlobalHandlers:()=>cr,HttpContext:()=>Jr,LinkedErrors:()=>Qr,TryCatch:()=>Yr});d();d();var cr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:hC,onunhandledrejection:bC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(vC(n),r(),this._installFunc[n]=void 0)}}};function hC(){Zn("error",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(_0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Dr(a)?yC(a,i,o,s):l4(zu(n,u||a,void 0,r,!1),i,o,s);l.level="error",c4(e,u,l,"onerror")})}function bC(){Zn("unhandledrejection",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(_0()||a&&a.__sentry_own_request__)return!0;let i=Io(a)?TC(a):zu(n,a,void 0,r,!0);i.level="error",c4(e,a,i,"onunhandledrejection")})}function TC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function yC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=yu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),l4({exception:{values:[{type:o,value:i}]}},e,n,r)}function l4(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Dr(e)&&e.length>0?e:Sh();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function vC(t){!1&&Se.log(`Global Handler attached: ${t}`)}function c4(t,e,n,r){Gr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function d4(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var SC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yr=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=at();this._options.setTimeout&&Qn(e,"setTimeout",p4),this._options.setInterval&&Qn(e,"setInterval",p4),this._options.requestAnimationFrame&&Qn(e,"requestAnimationFrame",xC),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Qn(XMLHttpRequest.prototype,"send",EC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:SC).forEach(CC)}};function p4(t){return function(...e){let n=e[0];return e[0]=Fr(n,{mechanism:{data:{function:Jn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function xC(t){return function(e){return t.apply(this,[Fr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Jn(t)},handled:!0,type:"instrument"}})])}}function EC(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Qn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Jn(i)},handled:!0,type:"instrument"}},s=Ti(i);return s&&(o.mechanism.data.handler=Jn(s)),Fr(i,o)})}),t.apply(this,e)}}function CC(t){let e=at(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Qn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Fr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=Fr(i,{mechanism:{data:{function:"addEventListener",handler:Jn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Qn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var wC="cause",DC=5,Qr=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||wC,this._limit=e.limit||DC}setupOnce(){let e=Le().getClient();e&&lr((n,r)=>{let a=Le().getIntegration(t);return a?AC(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function AC(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!or(a.originalException,Error))return r;let i=g4(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function g4(t,e,n,r,a=[]){if(!or(n[r],Error)||a.length+1>=e)return a;let i=S0(t,n[r]);return g4(t,e,n[r],r,[i,...a])}d();var m4=at(),Jr=class t{static id="HttpContext";name=t.id;setupOnce(){lr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!m4.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=m4.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var Zr=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(kC(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function kC(t,e){return e?!!(PC(t,e)||LC(t,e)):!1}function PC(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!T4(t,e)||!b4(t,e))}function LC(t,e){let n=f4(e),r=f4(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!T4(t,e)||!b4(t,e))}function b4(t,e){let n=h4(t),r=h4(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(y4(n),Zn("history",({from:r,to:a})=>{r===void 0||r===a||y4(Le())}))}var k4={},B0=at();B0.Sentry&&B0.Sentry.Integrations&&(k4=B0.Sentry.Integrations);var FC={...k4,...za,...F0};var MC=du.alert;d();d();d();var P4={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${Ou(t)}`),!0)}function OE(t,e){return!e||!e.length?!1:UE(t).some(n=>e.some(r=>Su(n,r)))}function zE(t,e){if(!e||!e.length)return!1;let n=Ou(t);return n?e.some(r=>Su(n,r)):!1}function NE(t,e){if(!e||!e.length)return!0;let n=Ou(t);return n?e.some(r=>Su(n,r)):!0}function UE(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Pr(t)}`),[]}return[]}function qE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function jE(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Ou(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?jE(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Pr(t)}`),null}}d();d();function v0(t,e){let n=S0(t,e),r={type:e&&e.name,value:GE(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HE(t,e,n,r){let a={exception:{values:[{type:Oo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Ah(e)}`}]},extra:{__serialized__:i0(e)}};if(n){let i=S0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function T0(t,e){return{exception:{values:[v0(t,e)]}}}function S0(t,e){let n=e.stacktrace||e.stack||"",r=KE(e);try{return t(n,r)}catch{}return[]}var WE=/Minified React error #\d+;/i;function KE(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(WE.test(t.message))return 1}return 0}function GE(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function r4(t,e,n,r){let a=n&&n.syntheticException||void 0,i=zu(t,e,a,r);return Gr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Sn(i)}function a4(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=y0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Sn(o)}function zu(t,e,n,r,a){let i;if(yu(e)&&e.error)return T0(t,e.error);if(hh(e)){let o=e;if("stack"in e)i=T0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=y0(t,u,n,r),jo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Tu(e)?T0(t,e):Yn(e)||Oo(e)?(i=HE(t,e,n,a),Gr(i,{synthetic:!0}),i):(i=y0(t,e,n,r),jo(i,`${e}`,void 0),Gr(i,{synthetic:!0}),i)}function y0(t,e,n,r){let a={message:e};if(r&&n){let i=S0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var x0="Breadcrumbs",Vr=class t{static id=x0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Zn("console",VE),this.options.dom&&Zn("dom",$E(this.options.dom)),this.options.xhr&&Zn("xhr",YE),this.options.fetch&&Zn("fetch",QE),this.options.history&&Zn("history",JE)}};function $E(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?zo(n.event.target,a):zo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function VE(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Oh(t.level),message:Yd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Yd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function YE(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function QE(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function JE(t){let e=it(),n=t.from,r=t.to,a=xu(e.location.href),i=xu(n),o=xu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var Uu=it(),Nu;function E0(){if(Nu)return Nu;if(Lh(fetch))return Nu=fetch.bind(Uu);let t=Uu.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Nu=e.bind(Uu)}function i4(t,e){Object.prototype.toString.call(Uu&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):Ph()&&E0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var C0=it(),Ci=class extends Go{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ei}],version:Ei},super(e),e.sendClientReports&&C0.document&&C0.document.addEventListener("visibilitychange",()=>{C0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return r4(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return a4(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(x0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Pr(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=Ko(this._dsn,this._options),r=qh(e,this._options.tunnel&&Fa(this._dsn));try{i4(n,Cu(r))}catch(a){!1&&Se.error(a)}}};d();d();function Vo(t,e=E0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return $o(t,n)}d();var wi="?",ZE=10,XE=20,eC=30,tC=40,nC=50;function Yo(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var rC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aC=/\((\S*)(?::(\d+))(?::(\d+))\)/,iC=t=>{let e=rC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=aC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=u4(e[1]||wi,e[2]);return Yo(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},w0=[eC,iC],oC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uC=t=>{let e=oC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=sC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||wi;return[a,r]=u4(a,r),Yo(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},D0=[nC,uC],lC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cC=t=>{let e=lC.exec(t);return e?Yo(e[2],e[1]||wi,+e[3],e[4]?+e[4]:void 0):void 0},A0=[tC,cC],dC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pC=t=>{let e=dC.exec(t);return e?Yo(e[2],e[3]||wi,+e[1]):void 0},o4=[ZE,pC],gC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mC=t=>{let e=gC.exec(t);return e?Yo(e[5],e[3]||e[4]||wi,+e[1],+e[2]):void 0},s4=[XE,mC],k0=[w0,D0,A0],qu=e0(...k0),u4=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:wi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var P0=0;function L0(){return P0>0}function fC(){P0+=1,setTimeout(()=>{P0-=1})}function Fr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ti(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>Fr(o,e));return t.apply(this,i)}catch(i){throw fC(),xi(o=>{o.addEventProcessor(s=>(e.mechanism&&(jo(s,void 0,void 0),Gr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Si(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}Jd(r,t),Uo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var _0={};eu(_0,{Breadcrumbs:()=>Vr,Dedupe:()=>Zr,GlobalHandlers:()=>cr,HttpContext:()=>Jr,LinkedErrors:()=>Qr,TryCatch:()=>Yr});d();d();var cr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:hC,onunhandledrejection:bC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(vC(n),r(),this._installFunc[n]=void 0)}}};function hC(){Zn("error",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(L0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Dr(a)?yC(a,i,o,s):l4(zu(n,u||a,void 0,r,!1),i,o,s);l.level="error",c4(e,u,l,"onerror")})}function bC(){Zn("unhandledrejection",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(L0()||a&&a.__sentry_own_request__)return!0;let i=Ro(a)?TC(a):zu(n,a,void 0,r,!0);i.level="error",c4(e,a,i,"onunhandledrejection")})}function TC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function yC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=yu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),l4({exception:{values:[{type:o,value:i}]}},e,n,r)}function l4(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Dr(e)&&e.length>0?e:Sh();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function vC(t){!1&&Se.log(`Global Handler attached: ${t}`)}function c4(t,e,n,r){Gr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function d4(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var SC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yr=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=it();this._options.setTimeout&&Qn(e,"setTimeout",p4),this._options.setInterval&&Qn(e,"setInterval",p4),this._options.requestAnimationFrame&&Qn(e,"requestAnimationFrame",xC),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Qn(XMLHttpRequest.prototype,"send",EC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:SC).forEach(CC)}};function p4(t){return function(...e){let n=e[0];return e[0]=Fr(n,{mechanism:{data:{function:Jn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function xC(t){return function(e){return t.apply(this,[Fr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Jn(t)},handled:!0,type:"instrument"}})])}}function EC(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Qn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Jn(i)},handled:!0,type:"instrument"}},s=Ti(i);return s&&(o.mechanism.data.handler=Jn(s)),Fr(i,o)})}),t.apply(this,e)}}function CC(t){let e=it(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Qn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Fr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=Fr(i,{mechanism:{data:{function:"addEventListener",handler:Jn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Qn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var wC="cause",DC=5,Qr=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||wC,this._limit=e.limit||DC}setupOnce(){let e=Le().getClient();e&&lr((n,r)=>{let a=Le().getIntegration(t);return a?AC(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function AC(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!or(a.originalException,Error))return r;let i=g4(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function g4(t,e,n,r,a=[]){if(!or(n[r],Error)||a.length+1>=e)return a;let i=v0(t,n[r]);return g4(t,e,n[r],r,[i,...a])}d();var m4=it(),Jr=class t{static id="HttpContext";name=t.id;setupOnce(){lr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!m4.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=m4.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var Zr=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(kC(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function kC(t,e){return e?!!(PC(t,e)||LC(t,e)):!1}function PC(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!T4(t,e)||!b4(t,e))}function LC(t,e){let n=f4(e),r=f4(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!T4(t,e)||!b4(t,e))}function b4(t,e){let n=h4(t),r=h4(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(y4(n),Zn("history",({from:r,to:a})=>{r===void 0||r===a||y4(Le())}))}var k4={},M0=it();M0.Sentry&&M0.Sentry.Integrations&&(k4=M0.Sentry.Integrations);var FC={...k4,...za,..._0};var MC=du.alert;d();d();d();var P4={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5256,13 +5256,13 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var H4=[{code:"zh-CN",messages:P4},{code:"zh-TW",messages:L4},{code:"en",messages:_4},{code:"ja",messages:F4},{code:"ar",messages:M4},{code:"de",messages:B4},{code:"es",messages:I4},{code:"fa",messages:R4},{code:"fr",messages:O4},{code:"hi",messages:z4},{code:"it",messages:N4},{code:"ru",messages:U4},{code:"ko",messages:q4},{code:"pt",messages:j4}];var I0="immersiveTranslateBingGlobalState",R0="immersiveTranslateYandexGlobalState",zt={};for(let t of H4)zt[t.code]=t.messages;var Ua="Immersive Translate",Q="immersive-translate";var me="immersiveTranslate";var K4=me+"GoogleAccessToken",G4=me+"AuthFlow";var $C=me+"AuthState",ju=me+"IframeMessage",BO=me+"WaitForRateLimit",Hu=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",qa=me+"showError",V4=me+"DocumentMessageThirdPartyTell",$4=me+"DocumentMessageEventUpload",Wu=me+"DocumentMessageHandler",Ku=`${me}Share`,Yo=`${me}ToggleMouseHoverTranslateDirectly`,Y4=`${me}ReqDraft`,Q4=`${me}ResDraft`,YC=`${me}Container`,J4=`${me}SpecifiedContainer`,Xr="buildinConfig",Qo="localConfig",O0="openOptionsPage",z0="openAboutPage";var N0="openEbookViewer",U0="openEbookBuilder";var ja=`${me}PageTranslatedStatus`,IO=`${me}PageUrlChanged`,Mr=`${me}ReceiveCommand`,Z4=me+"LastUseMouseHoverTime",Gu=me+"LastUseInputTime",Xn=me+"LastUseManualTranslatePageTime",RO=`${me}PopupReceiveMessage`,QC="immersivetranslate.com",JC="config.immersivetranslate.com",OO=`https://${QC}/`,Jo=`https://${JC}/default_config.json`,zO=`${me}Mark`,xn=`${me}Root`,X4=`${me}Walked`,NO=`data-${Q}-walked`,eb=`${me}Paragraph`,tb=`data-${Q}-paragraph`,dr=`data-${Q}-translation-element-mark`,nb=`${me}TranslationElementMark`,UO=`${me}TranslatedMark`,rb=`${me}LoadingId`,q0=`data-${Q}-loading-id`,ab=`${me}ErrorId`,Vu=`data-${Q}-error-id`,ZC=`${me}AtomicBlockMark`,ib=`${me}ExcludeMark`,qO=`data-${Q}-exclude-mark`,XC=`${me}StayOriginalMark`,jO=`${me}PreWhitespaceMark`,$u=`${me}InlineMark`,ob=`${me}BlockMark`,HO=`${me}Left`,WO=`${me}Right`,KO=`${me}Width`,GO=`${me}Height`,VO=`${me}Top`,$O=`${me}FontSize`,Zo="lastRunTime",YO=`${me}GlobalStyleMark`,Xo=["@","#"],Yu=" --- ",sb=` -`,yt=`${Q}-target-wrapper`,QO=`${Q}-pdf-target-container`,Qu=`${Q}-target-inner`,JO=`${Q}-source-wrapper`,j0=`${Q}-target-translation-block-wrapper`,ZO=`${Q}-root-translation-theme`,Di=`${me}RootTranslationTheme`,ub=`${Q}-target-translation-vertical-block-wrapper`,XO=`${Q}-target-translation-pdf-block-wrapper`,lb=`${Q}-target-translation-pre-whitespace`,H0=`${Q}-target-translation-inline-wrapper`;var cb={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},kn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],db={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},pb={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},gb={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var mb=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],fb=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],pr="zh-CN";var W4=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Ju=["caiyun","cai"],gr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var H4=[{code:"zh-CN",messages:P4},{code:"zh-TW",messages:L4},{code:"en",messages:_4},{code:"ja",messages:F4},{code:"ar",messages:M4},{code:"de",messages:B4},{code:"es",messages:I4},{code:"fa",messages:R4},{code:"fr",messages:O4},{code:"hi",messages:z4},{code:"it",messages:N4},{code:"ru",messages:U4},{code:"ko",messages:q4},{code:"pt",messages:j4}];var B0="immersiveTranslateBingGlobalState",I0="immersiveTranslateYandexGlobalState",Nt={};for(let t of H4)Nt[t.code]=t.messages;var Ua="Immersive Translate",Q="immersive-translate";var me="immersiveTranslate";var K4=me+"GoogleAccessToken",G4=me+"AuthFlow";var VC=me+"AuthState",ju=me+"IframeMessage",BO=me+"WaitForRateLimit",Hu=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",qa=me+"showError",$4=me+"DocumentMessageThirdPartyTell",V4=me+"DocumentMessageEventUpload",Wu=me+"DocumentMessageHandler",Ku=`${me}Share`,Qo=`${me}ToggleMouseHoverTranslateDirectly`,Y4=`${me}ReqDraft`,Q4=`${me}ResDraft`,YC=`${me}Container`,J4=`${me}SpecifiedContainer`,Xr="buildinConfig",Jo="localConfig",R0="openOptionsPage",O0="openAboutPage";var z0="openEbookViewer",N0="openEbookBuilder";var ja=`${me}PageTranslatedStatus`,IO=`${me}PageUrlChanged`,Mr=`${me}ReceiveCommand`,Z4=me+"LastUseMouseHoverTime",Gu=me+"LastUseInputTime",Xn=me+"LastUseManualTranslatePageTime",RO=`${me}PopupReceiveMessage`,QC="immersivetranslate.com",JC="config.immersivetranslate.com",OO=`https://${QC}/`,Zo=`https://${JC}/default_config.json`,zO=`${me}Mark`,xn=`${me}Root`,X4=`${me}Walked`,NO=`data-${Q}-walked`,eb=`${me}Paragraph`,tb=`data-${Q}-paragraph`,dr=`data-${Q}-translation-element-mark`,nb=`${me}TranslationElementMark`,UO=`${me}TranslatedMark`,rb=`${me}LoadingId`,U0=`data-${Q}-loading-id`,ab=`${me}ErrorId`,$u=`data-${Q}-error-id`,ZC=`${me}AtomicBlockMark`,ib=`${me}ExcludeMark`,qO=`data-${Q}-exclude-mark`,XC=`${me}StayOriginalMark`,jO=`${me}PreWhitespaceMark`,Vu=`${me}InlineMark`,ob=`${me}BlockMark`,HO=`${me}Left`,WO=`${me}Right`,KO=`${me}Width`,GO=`${me}Height`,$O=`${me}Top`,VO=`${me}FontSize`,Xo="lastRunTime",YO=`${me}GlobalStyleMark`,es=["@","#"],Yu=" --- ",sb=` +`,yt=`${Q}-target-wrapper`,QO=`${Q}-pdf-target-container`,Qu=`${Q}-target-inner`,JO=`${Q}-source-wrapper`,q0=`${Q}-target-translation-block-wrapper`,ZO=`${Q}-root-translation-theme`,Di=`${me}RootTranslationTheme`,ub=`${Q}-target-translation-vertical-block-wrapper`,XO=`${Q}-target-translation-pdf-block-wrapper`,lb=`${Q}-target-translation-pre-whitespace`,j0=`${Q}-target-translation-inline-wrapper`;var cb={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},kn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],db={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},pb={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},gb={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var mb=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],fb=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],pr="zh-CN";var W4=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Ju=["caiyun","cai"],gr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Xo,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...W4,{type:"password",name:"apikey",required:!0}],props:W4},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Zu={type:me+"ChildFrameToRootFrameIdentifier"},W0=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],es=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],hb=["ctrl","alt","shift","cmd","command","option","control"];var ez=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",K0="user_from_plugin",Ft="user_info",ts=Qt()||Rn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",bb=Qt()||Rn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",Tb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Xu=Qt()||Rn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ai=Qt()||Rn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",ew=Qt()||Rn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",tw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",nw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",tz=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",nz=ew+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",vb=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",el=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Sb=tw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xb=nw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eb=Xu+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Cb="https://immersivetranslate.com/docs/usage/";var wb=Me().TRANSLATE_FILE_URL,rz=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Db=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var ki=console,G0=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=On.green;r>1e4?a=On.red:r>1e3&&(a=On.yellow),ki.debug(On.dim(Ua+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},ns=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&ki.log(On.dim(Ua+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&ki.log(On.green(Ua+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&ki.warn(On.yellow(Ua+" WARN:"),...e)}error(...e){this.#e<=3&&ki.error(On.red(Ua+" ERROR:"),...e)}fatal(...e){this.#e<=4&&ki.error(On.red(Ua+" FATAL:"),...e)}timing(){return this.level===0?new G0:{reset:()=>{},stop:()=>{}}}},B=new ns;d();d();d();var V0=/iPhone/i,Ab=/iPod/i,kb=/iPad/i,Pb=/\biOS-universal(?:.+)Mac\b/i,$0=/\bAndroid(?:.+)Mobile\b/i,Lb=/Android/i,Pi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,tl=/Silk/i,Br=/Windows Phone/i,_b=/\bWindows(?:.+)ARM\b/i,Fb=/BlackBerry/i,Mb=/BB10/i,Bb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rb=/Mobile(?:.+)Firefox\b/i,Ob=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function rw(t){return e=>e.test(t)}function ut(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=rw(n),i={apple:{phone:a(V0)&&!a(Br),ipod:a(Ab),tablet:!a(V0)&&(a(kb)||Ob(e))&&!a(Br),universal:a(Pb),device:(a(V0)||a(Ab)||a(kb)||a(Pb)||Ob(e))&&!a(Br)},amazon:{phone:a(Pi),tablet:!a(Pi)&&a(tl),device:a(Pi)||a(tl)},android:{phone:!a(Br)&&a(Pi)||!a(Br)&&a($0),tablet:!a(Br)&&!a(Pi)&&!a($0)&&(a(tl)||a(Lb)),device:!a(Br)&&(a(Pi)||a(tl)||a($0)||a(Lb))||a(/\bokhttp\b/i)},windows:{phone:a(Br),tablet:a(_b),device:a(Br)||a(_b)},other:{blackberry:a(Fb),blackberry10:a(Mb),opera:a(Bb),firefox:a(Rb),chrome:a(Ib),device:a(Fb)||a(Mb)||a(Bb)||a(Rb)||a(Ib)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Y0="DENO",nl="CHROME",rl="FIREFOX";function zb(t){let e=nl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=rl:/deno/i.test(n)&&(e=Y0)}catch{}return t===nl&&e===nl||t===rl&&e===rl||t===Y0&&e===Y0}function aw(){return zb(nl)}function Nb(){return typeof Deno<"u"}function Ir(){return zb(rl)}function al(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function rs(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function Ub(){return ye()?"monkey":aw()?"chrome":Ir()?"firefox":et()?"safari":null}d();var qb={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jb={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:qb,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:qb,query:()=>{},sendMessage:()=>{}}};var oe;Nb()?oe=jb:oe=globalThis.immersiveTranslateBrowserAPI;d();d();d();d();d();var Dz=Wb(2),Hb=Wb(3);function Wb(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var iw=/\s+/g,ow=/[\t\n\v\f\r ]+/g;function Kb(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?sw:uw;return String(t).replace(e.style==="html"?ow:iw,e.trim?lw(n):n)}function sw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function uw(){return" "}function lw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var Gb={}.hasOwnProperty;function cw(t){return t==null?"":Kb(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function dw(t){return Hb(" "+cw(t)+" ")}function pw(t){let e=dw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function yw(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function vw(t,e,n,r){e=xw(e,n,r);let a=[],i;if(e)for(i in e)il.call(e,i)&&a.push([i,Sw(t,e[i])]);return a.length===0?J0():a.sort(Ew)}function Sw(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of Mw){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?e3(t)?"zh-TW":"zh-CN":e:"auto"}var n3=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Z0=new Map(n3),Bw=new Map(n3.map(([t,e])=>[e,t]));function r3(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>Bw.get(s));!e&&e!==0&&(e=25);let a=sl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Z0.keys()]},o=Yb(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&m<.95)break;return Z0.get(p)}}let[s,u]=o[0],l=Z0.get(s);if(l&&u>.9)return l}}catch(r){B.error(r)}return"auto"}d();d();function Te(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=kn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":kn[a]}else return"auto";else return kn[r]}function ht(){return Te(document?.documentElement?.lang||"en")}d();function Jt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function a3(t){if(t){let e=new Date(t.createTime),n=Iw(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function Iw(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var i3=me+"SyncStoreKey_";function At(t,e){let n=i3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Xe(t,e){let n=i3+t;return oe.storage.sync.set({[n]:e})}d();var o3=me+"StoreKey_";function Rr(t,e){let n=o3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function s3(t,e){let n=o3+t;return oe.storage.local.set({[n]:e})}d();var Ha=me+"CacheKey_";function X0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function Rw(){let t=oe.storage.local.refresh;t&&t()}function ep(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Ha)).filter(r=>r!==Ha+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:X0,set:np,getExpired:ep,setExpired:tp,remove:rp,clear:u3,refresh:Rw};d();d();d();d();function l3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function ap(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Ow(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),m=Object.keys(o).filter(g=>g!=="tag").map(g=>`${g}="${o[g]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${m}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function is(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function mr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=is(t,n,e);return i===e&&n!==r&&(i=is(t,r,e)),ap(i,a)}function Ow(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return mr(zt,e,t.config.interfaceLanguage,"en",n)}d();function c3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function d3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:es,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...W4,{type:"password",name:"apikey",required:!0}],props:W4},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Zu={type:me+"ChildFrameToRootFrameIdentifier"},H0=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],ts=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],hb=["ctrl","alt","shift","cmd","command","option","control"];var ez=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",W0="user_from_plugin",Ft="user_info",ns=Qt()||Rn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",bb=Qt()||Rn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",Tb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Xu=Qt()||Rn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ai=Qt()||Rn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",ew=Qt()||Rn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",tw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",nw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",tz=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",nz=ew+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",vb=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",el=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Sb=tw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xb=nw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eb=Xu+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Cb="https://immersivetranslate.com/docs/usage/";var wb=Me().TRANSLATE_FILE_URL,rz=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Db=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var ki=console,K0=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=On.green;r>1e4?a=On.red:r>1e3&&(a=On.yellow),ki.debug(On.dim(Ua+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},rs=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&ki.log(On.dim(Ua+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&ki.log(On.green(Ua+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&ki.warn(On.yellow(Ua+" WARN:"),...e)}error(...e){this.#e<=3&&ki.error(On.red(Ua+" ERROR:"),...e)}fatal(...e){this.#e<=4&&ki.error(On.red(Ua+" FATAL:"),...e)}timing(){return this.level===0?new K0:{reset:()=>{},stop:()=>{}}}},B=new rs;d();d();d();var G0=/iPhone/i,Ab=/iPod/i,kb=/iPad/i,Pb=/\biOS-universal(?:.+)Mac\b/i,$0=/\bAndroid(?:.+)Mobile\b/i,Lb=/Android/i,Pi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,tl=/Silk/i,Br=/Windows Phone/i,_b=/\bWindows(?:.+)ARM\b/i,Fb=/BlackBerry/i,Mb=/BB10/i,Bb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rb=/Mobile(?:.+)Firefox\b/i,Ob=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function rw(t){return e=>e.test(t)}function ut(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=rw(n),i={apple:{phone:a(G0)&&!a(Br),ipod:a(Ab),tablet:!a(G0)&&(a(kb)||Ob(e))&&!a(Br),universal:a(Pb),device:(a(G0)||a(Ab)||a(kb)||a(Pb)||Ob(e))&&!a(Br)},amazon:{phone:a(Pi),tablet:!a(Pi)&&a(tl),device:a(Pi)||a(tl)},android:{phone:!a(Br)&&a(Pi)||!a(Br)&&a($0),tablet:!a(Br)&&!a(Pi)&&!a($0)&&(a(tl)||a(Lb)),device:!a(Br)&&(a(Pi)||a(tl)||a($0)||a(Lb))||a(/\bokhttp\b/i)},windows:{phone:a(Br),tablet:a(_b),device:a(Br)||a(_b)},other:{blackberry:a(Fb),blackberry10:a(Mb),opera:a(Bb),firefox:a(Rb),chrome:a(Ib),device:a(Fb)||a(Mb)||a(Bb)||a(Rb)||a(Ib)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var V0="DENO",nl="CHROME",rl="FIREFOX";function zb(t){let e=nl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=rl:/deno/i.test(n)&&(e=V0)}catch{}return t===nl&&e===nl||t===rl&&e===rl||t===V0&&e===V0}function aw(){return zb(nl)}function Nb(){return typeof Deno<"u"}function Ir(){return zb(rl)}function al(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function as(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function Ub(){return ye()?"monkey":aw()?"chrome":Ir()?"firefox":tt()?"safari":null}d();var qb={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jb={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:qb,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:qb,query:()=>{},sendMessage:()=>{}}};var oe;Nb()?oe=jb:oe=globalThis.immersiveTranslateBrowserAPI;d();d();d();d();d();var Dz=Wb(2),Hb=Wb(3);function Wb(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var iw=/\s+/g,ow=/[\t\n\v\f\r ]+/g;function Kb(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?sw:uw;return String(t).replace(e.style==="html"?ow:iw,e.trim?lw(n):n)}function sw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function uw(){return" "}function lw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var Gb={}.hasOwnProperty;function cw(t){return t==null?"":Kb(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function dw(t){return Hb(" "+cw(t)+" ")}function pw(t){let e=dw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function yw(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function vw(t,e,n,r){e=xw(e,n,r);let a=[],i;if(e)for(i in e)il.call(e,i)&&a.push([i,Sw(t,e[i])]);return a.length===0?Q0():a.sort(Ew)}function Sw(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of Mw){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?e3(t)?"zh-TW":"zh-CN":e:"auto"}var n3=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],J0=new Map(n3),Bw=new Map(n3.map(([t,e])=>[e,t]));function r3(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>Bw.get(s));!e&&e!==0&&(e=25);let a=sl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...J0.keys()]},o=Yb(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&m<.95)break;return J0.get(p)}}let[s,u]=o[0],l=J0.get(s);if(l&&u>.9)return l}}catch(r){B.error(r)}return"auto"}d();d();function he(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=kn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":kn[a]}else return"auto";else return kn[r]}function ht(){return he(document?.documentElement?.lang||"en")}d();function Jt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function a3(t){if(t){let e=new Date(t.createTime),n=Iw(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function Iw(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var i3=me+"SyncStoreKey_";function At(t,e){let n=i3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function et(t,e){let n=i3+t;return oe.storage.sync.set({[n]:e})}d();var o3=me+"StoreKey_";function Rr(t,e){let n=o3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function s3(t,e){let n=o3+t;return oe.storage.local.set({[n]:e})}d();var Ha=me+"CacheKey_";function Z0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function Rw(){let t=oe.storage.local.refresh;t&&t()}function X0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Ha)).filter(r=>r!==Ha+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Z0,set:tp,getExpired:X0,setExpired:ep,remove:np,clear:u3,refresh:Rw};d();d();d();d();function l3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function rp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Ow(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),m=Object.keys(o).filter(g=>g!=="tag").map(g=>`${g}="${o[g]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${m}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function os(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function mr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=os(t,n,e);return i===e&&n!==r&&(i=os(t,r,e)),rp(i,a)}function Ow(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return mr(Nt,e,t.config.interfaceLanguage,"en",n)}d();function c3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function d3(t){return new Date(t).getTime()}var V=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",m=this.data?.translationService=="deepl"?"Deepl":"OpenAI",g=n("errorReason",{message:r});if(i=="onetime_7day")g+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:el});else{let f="";m=="OpenAI"?f=Sb:f=xb,o?g+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:Eb}):g+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:m}),!o&&(a.cancelAtPeriodEnd==="false"||d3(u)>s)&&(g+=n("proQuotaExceededError.resetTime",{resetTime:c3(s,"YYYY-MM-DD HH:mm:ss")}))}return g}}};async function Wa(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Sd(p3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await p3(t);return e}async function p3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){B.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of zw(s.body)){let p=new TextDecoder().decode(c);u+=p;let m;for(;(m=u.indexOf(` -`))>=0;){let g=u.slice(0,m).trim();if(u=u.slice(m+1),g.startsWith("event:")||g==="")continue;let f="";if(g.startsWith("data:")&&(f=g.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){B.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(g){B.error("parse response failed",g)}u&&B.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,m=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),m&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*zw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Nw=new Map;function ul(t){let e=Uw(64),n=new CustomEvent(Hu,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Nw.set(e,(i,o)=>{i?a(i):r(o)})})}function Uw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var jw="";function Nt(){return jw||ll.version}function ip(){return oe.runtime.getManifest().version}d();function He(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var os=new Map,ea=class{fromType;logger;constructor(e,n=!1){this.logger=new ns,n&&this.logger.setLevel("debug"),this.fromType=e,os.has(e)||(os.set(e,new Map),oe.runtime.onMessage.addListener((r,a,i)=>{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=sp(s),{type:m,name:g}=p;if(m!==e)return!1;let f=sp(o),b=os.get(m).get(g);if(!b)return this.logger.debug(`no message handler for ${m}:${s}, but it's ok`),!1;let{messageHandler:h,sync:E}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(E){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=os.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new op(`${i}:${e}`,this.logger);return os.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},op=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=sp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return g3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return g3(o,s,this.logger)}}};function g3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function sp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var Hw="";function Li(){return Hw||globalThis.navigator.userAgent}function up(){return Li().includes("ImtFxiOS")}function m3(){let e=Li().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function Ww(){return Li().includes("ImtFxAndroid")}function f3(){let t=Li();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function h3(){let e=Li().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function ss(){let t=Li();if(up()||Ww()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var cl;function Kw(){return cl||(cl=new ea("content_script",!1).getConnection("pure_main",()=>{}),cl)}var b3="G-MKMD9LWFTR";async function us(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(ss()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=He(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Rr("fakeUserId",""),u&&await Xe("fakeUserId",u));let l=Nt(),c=new Date,p=await At("installedAt","");p||(p=await Rr("installedAt",""),p&&await Xe("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Xe("installedAt",p)):(u=Gw(32),await Xe("fakeUserId",u)),p||(p=c.toISOString(),await Xe("installedAt",p));let m=new Date(p),g=T3(m),f=T3(c),T=g===f,b=c.getTime()-m.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${b3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${b3}&api_secret=${s}`);let E="";typeof navigator<"u"&&(E=window.navigator.userAgent);let D=mi.parse(E),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let L=ss();L&&(y.browser_name=L.name,y.browser_version=L.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),g&&(y.install_day=Vw(m)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),I=await dl({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Gw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",m=this.data?.translationService=="deepl"?"Deepl":"OpenAI",g=n("errorReason",{message:r});if(i=="onetime_7day")g+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:el});else{let f="";m=="OpenAI"?f=Sb:f=xb,o?g+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:Eb}):g+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:m}),!o&&(a.cancelAtPeriodEnd==="false"||d3(u)>s)&&(g+=n("proQuotaExceededError.resetTime",{resetTime:c3(s,"YYYY-MM-DD HH:mm:ss")}))}return g}}};async function Wa(t){let e;if(t&&t.retry&&t.retry>0)try{e=await vd(p3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await p3(t);return e}async function p3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){B.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new V("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of zw(s.body)){let p=new TextDecoder().decode(c);u+=p;let m;for(;(m=u.indexOf(` +`))>=0;){let g=u.slice(0,m).trim();if(u=u.slice(m+1),g.startsWith("event:")||g==="")continue;let f="";if(g.startsWith("data:")&&(f=g.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){B.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(g){B.error("parse response failed",g)}u&&B.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,m=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),m&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new V("fetchError",c).initNetWork(s.status)}}async function*zw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Nw=new Map;function ul(t){let e=Uw(64),n=new CustomEvent(Hu,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Nw.set(e,(i,o)=>{i?a(i):r(o)})})}function Uw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var jw="";function Ut(){return jw||ll.version}function ap(){return oe.runtime.getManifest().version}d();function He(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var ss=new Map,ea=class{fromType;logger;constructor(e,n=!1){this.logger=new rs,n&&this.logger.setLevel("debug"),this.fromType=e,ss.has(e)||(ss.set(e,new Map),oe.runtime.onMessage.addListener((r,a,i)=>{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=op(s),{type:m,name:g}=p;if(m!==e)return!1;let f=op(o),b=ss.get(m).get(g);if(!b)return this.logger.debug(`no message handler for ${m}:${s}, but it's ok`),!1;let{messageHandler:h,sync:E}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(E){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=ss.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new ip(`${i}:${e}`,this.logger);return ss.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},ip=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=op(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return g3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return g3(o,s,this.logger)}}};function g3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new V(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new V("noResponse","Unknown error")}function op(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var Hw="";function Li(){return Hw||globalThis.navigator.userAgent}function sp(){return Li().includes("ImtFxiOS")}function m3(){let e=Li().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function Ww(){return Li().includes("ImtFxAndroid")}function f3(){let t=Li();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function h3(){let e=Li().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function us(){let t=Li();if(sp()||Ww()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var cl;function Kw(){return cl||(cl=new ea("content_script",!1).getConnection("pure_main",()=>{}),cl)}var b3="G-MKMD9LWFTR";async function ls(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(us()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=He(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Rr("fakeUserId",""),u&&await et("fakeUserId",u));let l=Ut(),c=new Date,p=await At("installedAt","");p||(p=await Rr("installedAt",""),p&&await et("installedAt",p)),u?p||(p=new Date(0).toISOString(),await et("installedAt",p)):(u=Gw(32),await et("fakeUserId",u)),p||(p=c.toISOString(),await et("installedAt",p));let m=new Date(p),g=T3(m),f=T3(c),T=g===f,b=c.getTime()-m.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${b3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${b3}&api_secret=${s}`);let E="";typeof navigator<"u"&&(E=window.navigator.userAgent);let D=mi.parse(E),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let L=us();L&&(y.browser_name=L.name,y.browser_version=L.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),g&&(y.install_day=$w(m)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),I=await dl({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Gw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5418,44 +5418,44 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function pl(t){if(t.beta)return!1;if(et()&&t.spVersion)return ls(ip(),t.spVersion);if(f3()&&t.gspVersion){let e=h3();if(e)return ls(e,t.gspVersion)}if(up()&&t.ispVersion){let e=m3();if(e)return ls(e,t.ispVersion)}return!1}function ls(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function lp(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function gl(t){return Array.isArray(t)?t:t?[t]:[]}function ml(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function fl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function hl(t,e){let n={...t};return x3(n,e),Qw(n,e),n}function S3(t,e,n){let r={...e};return Ka({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ka({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function Qw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;x3(t,a)}function Ka({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Jw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=gl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!y3(s))return;c=cp(l,u)}else if(o=="remove_v"){if(!y3(s))return;c=v3(l,u)}else o==="add"?c=cp(l,u):o=="remove"&&(c=v3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=cp(l,u):c=u,r(i,c)})}function x3(t,e){return Ka({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function cp(t,e){let n;if(Array.isArray(t)){let r=gl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Jw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function y3(t){let e=Nt();return t&&ls(e,t)}function v3(t,e){if(Array.isArray(t)){let n=gl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}function E3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Zt(){let t=await oe.storage.local.get(Qo);if(t[Qo]){let e=t[Qo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Xt(i),i}else return{}}async function Xt(t){await oe.storage.local.set({[Qo]:t})}async function C3(t){await oe.storage.local.set({[Xr]:t})}async function w3(){let t=await oe.storage.local.get(Xr),n={...await dp(),..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let r=t[Xr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Pn(){let t=await oe.storage.local.get(Xr),e={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let C=t[Xr];if(C&&C.buildinConfigUpdatedAt){let P=new Date(C.buildinConfigUpdatedAt),U=new Date(e.buildinConfigUpdatedAt);P>U&&(e=C)}}let n=await eD(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let C=await oe.commands.getAll();for(let P of C)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await dp(),o=E3(),s=await Or(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Zt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let C=await Zw();p.interfaceLanguage=C}let m=p.interfaceLanguage==="en",g=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!m&&!g&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,E=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(E=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(E.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,I=await At("installedAt",""),S=Number(await Rr("translage_page_daily",0)),y=Number(await At(Xn,0)),L;y>0&&(Date.now()-y0&&(Date.now()-S0){let C=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(C.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],U=Array.isArray(P)?P:[P],H=Array.from(new Set(U.concat(C.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let _=Object.assign(i,e);Ka({rule:e,valueIsArray:C=>Array.isArray(i[C]),getMergedValue:C=>i[C],onMergedResult:(C,P)=>{C!="generalRule"&&(_[C]=P)}});let k=Jt(r),N={};p.translationServices&&p.translationServices.deepl&&(N=p.translationServices.deepl);let z={};p.translationServices&&p.translationServices.openai&&(z=p.translationServices.openai),!k&&N.authKey&&!N.provider?(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="custom"):N&&N.provider||(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="pro"),!k&&z.APIKEY&&!z.provider?(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="custom"):z&&z.provider||(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="pro");let q=Object.keys(_),F=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let C of q){let P=C;if(P==="generalRule")typeof p[P]=="object"&&(_[P]=hl(i[P],p[P]));else if(P==="translationServices")tD(p,_);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&F.includes(P))p[P]&&(_[P]=Object.assign(_[P],p[P])),P==="shortcuts"&&(ye()||et()?_[P]={..._[P],...a}:_[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let U=_.rules||[],H={};for(let W of U)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?S3(e.generalRule,H[W.id],W):W);_[P]=[...j,..._[P]]}if(we.PROD==="0"&&we.DEV_RULES){let U=JSON.parse(we.DEV_RULES);_[P]=[...U,..._[P]]}}else p[P]!==void 0&&(_[P]=p[P])}return _.donateUrl=e.donateUrl,_.minVersion=e.minVersion,_.feedbackUrl=e.feedbackUrl,_.rawUserConfig=s,_}async function Or(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function cs(t){await oe.storage.sync.set({userConfig:t})}async function ds(t,e){await oe.storage.local.set({[t]:e})}async function bl(t){return(await oe.storage.local.get(t))[t]||""}var Zw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){B.warn("get browser language error:",r)}let n=t.map(r=>Te(r)).find(r=>zt[r]);return n||"en"},dp=async()=>{let t={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:pr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Xw(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function eD(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return pr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ka({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ka({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();function ta(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function nD(t,e){return t<>>32-e}function yl(t,e,n,r,a,i){return ta(nD(ta(ta(e,t),ta(r,i)),a),n)}function en(t,e,n,r,a,i,o){return yl(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return yl(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return yl(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return yl(n^(e|~r),t,e,a,i,o)}function Tl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function pp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Tl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Tl(a.concat(pp(e)),512+e.length*8),D3(Tl(i.concat(o),512+128))}function A3(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function gp(t){return unescape(encodeURIComponent(t))}function k3(t){return rD(gp(t))}function iD(t){return A3(k3(t))}function P3(t,e){return aD(gp(t),gp(e))}function oD(t,e){return A3(P3(t,e))}function Ln(t,e,n){return e?n?P3(e,t):oD(e,t):n?k3(t):iD(t)}d();function L3(t,e,n){let r=sD(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function sD(t,e){let n=[],r=[];for(let a=0;a0?T"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function pl(t){if(t.beta)return!1;if(tt()&&t.spVersion)return cs(ap(),t.spVersion);if(f3()&&t.gspVersion){let e=h3();if(e)return cs(e,t.gspVersion)}if(sp()&&t.ispVersion){let e=m3();if(e)return cs(e,t.ispVersion)}return!1}function cs(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function up(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function gl(t){return Array.isArray(t)?t:t?[t]:[]}function ml(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function fl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function hl(t,e){let n={...t};return x3(n,e),Qw(n,e),n}function S3(t,e,n){let r={...e};return Ka({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ka({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function Qw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;x3(t,a)}function Ka({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Jw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=gl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!y3(s))return;c=lp(l,u)}else if(o=="remove_v"){if(!y3(s))return;c=v3(l,u)}else o==="add"?c=lp(l,u):o=="remove"&&(c=v3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=lp(l,u):c=u,r(i,c)})}function x3(t,e){return Ka({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function lp(t,e){let n;if(Array.isArray(t)){let r=gl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Jw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function y3(t){let e=Ut();return t&&cs(e,t)}function v3(t,e){if(Array.isArray(t)){let n=gl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}function E3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Zt(){let t=await oe.storage.local.get(Jo);if(t[Jo]){let e=t[Jo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Xt(i),i}else return{}}async function Xt(t){await oe.storage.local.set({[Jo]:t})}async function C3(t){await oe.storage.local.set({[Xr]:t})}async function w3(){let t=await oe.storage.local.get(Xr),n={...await cp(),..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let r=t[Xr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Pn(){let t=await oe.storage.local.get(Xr),e={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let C=t[Xr];if(C&&C.buildinConfigUpdatedAt){let P=new Date(C.buildinConfigUpdatedAt),U=new Date(e.buildinConfigUpdatedAt);P>U&&(e=C)}}let n=await eD(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let C=await oe.commands.getAll();for(let P of C)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await cp(),o=E3(),s=await Or(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Zt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let C=await Zw();p.interfaceLanguage=C}let m=p.interfaceLanguage==="en",g=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!m&&!g&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,E=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(E=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(E.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,I=await At("installedAt",""),S=Number(await Rr("translage_page_daily",0)),y=Number(await At(Xn,0)),L;y>0&&(Date.now()-y0&&(Date.now()-S0){let C=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(C.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],U=Array.isArray(P)?P:[P],H=Array.from(new Set(U.concat(C.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let _=Object.assign(i,e);Ka({rule:e,valueIsArray:C=>Array.isArray(i[C]),getMergedValue:C=>i[C],onMergedResult:(C,P)=>{C!="generalRule"&&(_[C]=P)}});let k=Jt(r),N={};p.translationServices&&p.translationServices.deepl&&(N=p.translationServices.deepl);let z={};p.translationServices&&p.translationServices.openai&&(z=p.translationServices.openai),!k&&N.authKey&&!N.provider?(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="custom"):N&&N.provider||(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="pro"),!k&&z.APIKEY&&!z.provider?(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="custom"):z&&z.provider||(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="pro");let q=Object.keys(_),F=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let C of q){let P=C;if(P==="generalRule")typeof p[P]=="object"&&(_[P]=hl(i[P],p[P]));else if(P==="translationServices")tD(p,_);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&F.includes(P))p[P]&&(_[P]=Object.assign(_[P],p[P])),P==="shortcuts"&&(ye()||tt()?_[P]={..._[P],...a}:_[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let U=_.rules||[],H={};for(let W of U)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?S3(e.generalRule,H[W.id],W):W);_[P]=[...j,..._[P]]}if(we.PROD==="0"&&we.DEV_RULES){let U=JSON.parse(we.DEV_RULES);_[P]=[...U,..._[P]]}}else p[P]!==void 0&&(_[P]=p[P])}return _.donateUrl=e.donateUrl,_.minVersion=e.minVersion,_.feedbackUrl=e.feedbackUrl,_.rawUserConfig=s,_}async function Or(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function ds(t){await oe.storage.sync.set({userConfig:t})}async function ps(t,e){await oe.storage.local.set({[t]:e})}async function bl(t){return(await oe.storage.local.get(t))[t]||""}var Zw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){B.warn("get browser language error:",r)}let n=t.map(r=>he(r)).find(r=>Nt[r]);return n||"en"},cp=async()=>{let t={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:pr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Xw(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function eD(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return pr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ka({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ka({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();function ta(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function nD(t,e){return t<>>32-e}function yl(t,e,n,r,a,i){return ta(nD(ta(ta(e,t),ta(r,i)),a),n)}function en(t,e,n,r,a,i,o){return yl(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return yl(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return yl(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return yl(n^(e|~r),t,e,a,i,o)}function Tl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function dp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Tl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Tl(a.concat(dp(e)),512+e.length*8),D3(Tl(i.concat(o),512+128))}function A3(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function pp(t){return unescape(encodeURIComponent(t))}function k3(t){return rD(pp(t))}function iD(t){return A3(k3(t))}function P3(t,e){return aD(pp(t),pp(e))}function oD(t,e){return A3(P3(t,e))}function Ln(t,e,n){return e?n?P3(e,t):oD(e,t):n?k3(t):iD(t)}d();function L3(t,e,n){let r=sD(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function sD(t,e){let n=[],r=[];for(let a=0;a0?Te){let E=[];mp(b,e,E);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&mp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?g.push(T):m.push(T))});let f=g.concat(m).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:g,explicitProps:m}}var ps=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Jt(s),l=Object.keys(gr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=gr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&et())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let m=!!p.canary,g=!!p.alpha,f=!!p.beta;return c===t[e]||m&&i||g&&(r||i)||f&&(a||r||i)?!0:!g&&!f&&!m}).map(c=>vl(e,c,t))};function gs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function _3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}var Fi=[];async function Sl(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function F3(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await cD(e,t)}async function M3(t){let e=Ln(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await lD(n,e)}async function lD(t,e){let n=await Sl(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function cD(t,e){let n=await Sl(t);return(await pD()).includes(t)||await dD(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function dD(t){let e="cache_list",n=await Sl(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Fi.push(t)},a.onerror=i=>{n.close()}}async function pD(){if(Fi&&Fi.length>0)return Fi;let t=await Sl(Q+"-cacheList","cache_list");return Fi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Fi}d();d();var fp="Original";function Qe(){return fp}function gn(t){fp=t,B3(fp)}d();var R3="auto",xl="auto",I3="auto";function O3(t){R3=t}function qn(t){xl=t}function vt(){return xl!=="auto"?xl:I3!=="auto"?I3:R3}function El(){return xl}d();function Ga(t){return t?.id?.endsWith("pdfWebPage")||!1}function ra(t){try{if(!t||!Ga(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Je={},aa=async function(t,e){let{method:n,data:r}=t,a=await Je.updateGlobalContext(),i=Date.now();if(B.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Je.translateTheWholePage(r),Xe(Xn,i);else if(n==="translateTheMainPage")await Je.translateTheMainPage(r),Xe(Xn,i);else if(n==="translateToThePageEndImmediately")await Je.translateToThePageEndImmediately(r),Xe(Xn,i);else if(n==="toggleTranslatePage")await Je.toggleTranslatePage(r),Xe(Xn,i);else if(n==="toggleTranslateTheWholePage")await Je.toggleTranslateTheWholePage(r),Xe(Xn,i);else if(n==="toggleTranslateTheMainPage")await Je.toggleTranslateTheMainPage(r),Xe(Xn,i);else if(n==="toggleOnlyTransation")await Je.ensureSwitchTranslationMode(r),Xe(Xn,i);else if(n==="translatePage")await Je.translatePage(a,r),Xe(Xn,i);else if(n==="toggleTranslationMask")await Je.toggleTranslationMask(r);else if(n==="restorePage")Je.restorePage();else if(n==="retryFailedParagraphs")Je.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Je.switchTranslationMode(r.mode),await Je.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Je.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Ku,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Je.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Yo,{detail:r}));else if(n==="translateWithOpenAI")await Je.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Je.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Je.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Je.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Je.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Je.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Je.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")He()||await Je.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!He())return JSON.stringify(a)}};function z3(t){Object.assign(Je,t)}function N3(t){Object.assign(Je,t)}function U3(t){Object.assign(Je,t)}var gD=function(t,e){let{method:n,data:r}=t;if(B.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Qe();if(n==="getCurrentPageLanguage"){let a=vt();return Je.detectCurrentPageLanguage().catch(i=>{B.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return qn(r),vt();if(n==="getContextString"){let a=Je.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Je.getPureGlobalContext();return ra(a?.rule)}}},Cl,wl;function q3(){let t=Dl();He()||mD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Dl(){return Cl||(Cl=new ea("content_script",!1).getConnection("main",aa),Cl)}function mD(){return wl||(wl=new ea("content_script",!1).getConnection("main_sync",gD,{sync:!0}),wl)}d();var hp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Al="https://transmart.qq.com/api/imt",zr=class t{static langMapReverse=new Map(hp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await ce({url:Al,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function fD(t,e){return Math.floor(Math.random()*(e-t+1))+t}var hD=30,bp="RATE_LIMITER_TICKS",Mi=class t{static strictTicks={};static clearStrictTicks(){ds(bp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await bl(bp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){B.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await ds(bp,JSON.stringify(this.strictTicks))}catch(a){B.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=fD(4,hD);await vr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function St(t){return await Dl().sendMessage("background:main",t)}function ce(t){return au()?ul({method:"request",data:t}):ye()||ru()?(t.fetchPolyfill=globalThis.GM_fetch,Wa(t)):St({method:"fetch",data:t})}function an(){return ye()?Pn():St({method:"getConfig"})}function mn(t){return ye()?cs(t):St({method:"setUserConfig",data:t})}function fn(){return ye()?Or():St({method:"getUserConfig"})}function ms(){return ye()?Zt():St({method:"getLocalConfig"})}function kl(t){return ye()?Xt(t):St({method:"setLocalConfig",data:t})}function j3(t){return ye()?C3(t):St({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=sl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||et()){if(t.translateService&&!Ju.includes(t.translateService))return Promise.resolve("auto");let r=r3(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await St({method:"detectLanguage",data:t});return Promise.resolve(e)}function H3(){return St({method:"detectTabLanguage"})}async function Pl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||et()){let n=t.substring(0,200);e=await zr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function B3(t){let e=new CustomEvent(ja,{detail:t});if(document.dispatchEvent(e),ye())return;Dl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function W3(t){return ye()?M3(t):St({method:"queryParagraphCache",data:t})}async function K3(t){if(ye()){await F3(t);return}return St({method:"setParagraphCache",data:t})}async function G3(){if(ye())return Promise.resolve();await St({method:"mockRequest"})}function Bi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):St({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function Ii(t=""){return ye()||et()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function V3(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Ll(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):St({method:"openAboutPage"})}function Ri(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):St({method:"openInTab",data:t})}function $3(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):St({method:"openEbookViewerPage"})}function Y3(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):St({method:"openEbookBuilderPage"})}function _l(t){et()}function Oi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):St({method:"openPdfViewerPage",data:{url:e}})}function Q3(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):St({method:"openSubtitleBuilderPage"})}function zi(t){return ye()?Promise.resolve():St({method:"setBadge",data:{text:t}})}function J3(){return ye()?(B.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):St({method:"autoSyncLatestConfig"})}function Fl(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function Z3(t,e){return ye()?Mi.getDelay(t,e):St({method:"getDelay",data:{key:t,options:e}})}var X3="G-MKMD9LWFTR";async function it(t,e,n){try{let r=ss(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=He(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let A=await Rr(l,0),v=Ml(new Date(A)),O=Date.now(),_=Ml(new Date(O));if(v===_)return;await s3(l,O)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",m=await At("fakeUserId","");m||(m=await Rr("fakeUserId",""),m&&await Xe("fakeUserId",m));let g=Nt(),f=new Date,T=await At("installedAt","");T||(T=await Rr("installedAt",""),T&&await Xe("installedAt",T)),m?T||(T=new Date(0).toISOString(),await Xe("installedAt",T)):(m=bD(32),await Xe("fakeUserId",m)),T||(T=f.toISOString(),await Xe("installedAt",T));let b=new Date(T),h=Ml(b),E=Ml(f),D=h===E,M=f.getTime()-b.getTime()<7*24*60*60*1e3,I=`https://www.google-analytics.com/mp/collect?measurement_id=${X3}&api_secret=${p}`;u||(I=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${X3}&api_secret=${p}`);let S=mi.parse(window.navigator.userAgent),y=e.map(A=>{let v=A.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",g&&(v.version=g),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=TD(b)),n.user){let _=a3(n.user);_&&Object.keys(_).forEach(k=>{v[k]=_[k]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),v.page_type=O,s?v.main_frame=0:v.main_frame=1,!c){let _=n.url;try{let k=new URL(_);v.site_host=k.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...A,params:v}});if(i)return;let L=await ce({responseType:"text",url:I,method:"POST",body:JSON.stringify({client_id:m,user_id:m,events:y})})}catch{}}function bD(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;ae.removeEventListener("message",n)),t.length=0}function xD(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vD(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function ED(t,e,n,r){let a=i=>{let o=i.data;a1(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function e1(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(a1(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yD(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CD(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(r1(e,"tell",n,i,r),a)}async function t1(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),m=await xD(t,n,r,s);clearTimeout(p),l(m)});return e.postMessage(r1(n,"ask",r,s,a),i),u}var oa=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;e1(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ia(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await t1(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(ED(this.thisWindow,this.protocol,e,n))}tell(e,n){CD(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(e1(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return t1(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SD(this.listeners)}};var i1;async function o1(){if(He()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=oa.iframe(Zu,"*",{targetWindow:e});i1=n,await oa.connect(n).catch(r=>{B.error("connect with parent frame error",r)})}}function s1(){return i1}d();function u1(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();d();d();d();function l1(t){return t.replace(//g,">")}d();var Bl=!1,wD=ye();function c1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function DD(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&d1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(sa(i,$u)){if(a===!0)return!0;continue}if(fs(i.nodeName,e.inlineTags))return!0;if(!Tp(i,e))return!1}}return!0}function yp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(fs(t.nodeName,n)||Tp(t,e)){if(sa(t,ob)||fs(t.nodeName,["BR"]))return!1;if(sa(t,$u))return!0;if(Tp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return DD(t,e)}else return sa(t,$u);return!1}function d1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&sa(t,ib,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&sa(t,J4))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||fs(t.nodeName,i))}function Ni(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!g1(r)&&r.length>=n}function p1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(g1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function g1(t){for(let e=0;e127)return!1;return!0}function m1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function f1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function h1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function b1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function T1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function sa(t,e,n=!1){return vp(t,e,"1",n)}function vp(t,e,n,r=!1){return Bl&&!r?t[xn]?!!(t[xn]&&t[xn][e]===n):!1:t.dataset[e]===n}function Ui(t){return(t.innerText||t.textContent||"").trim()}function Sp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Il(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function lt(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(Bl&&!r?(t[xn]||(t[xn]={}),t[xn][e]||(t[xn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Rl(t,e,n=!1){if(Bl&&!n){if(!t[xn]||!t[xn][e])return;delete t[xn][e]}else delete t.dataset[e]}function qi(t,e,n=!1){return Bl&&!n?!t[xn]||!t[xn][e]?void 0:t[xn][e]:t.dataset[e]}function Tp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!fs(t.nodeName,n)}function Ee(){if(!globalThis||!globalThis.location)return"https://example.com";if(!He())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function En(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){B.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else B.warn("injectCSS failed, rootDocument does not have head node",t)}function ji(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(wD){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function fs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function y1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function v1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||d1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return B.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function S1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();d();d();var ql,Fe,D1,AD,hs,x1,A1,zl={},k1=[],kD=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(t,e){for(var n in e)t[n]=e[n];return t}function P1(t){var e=t.parentNode;e&&e.removeChild(t)}function Ep(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ql.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return Ol(t,o,r,a,null)}function Ol(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++D1};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function qt(t){return t.children}function Hi(t,e){this.props=t,this.context=e}function Wi(t,e){if(e==null)return t.__?Wi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?Ol(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null){if(g.__=n,g.__b=n.__b+1,(m=h[c])===null||m&&g.key==m.key&&g.type===m.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:jl}),n.__[t]}function se(t){return bs=1,FD(G1,t)}function FD(t,e,n){var r=Wl(Ts++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):G1(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=wt,!wt.u)){wt.u=!0;var a=wt.shouldComponentUpdate;wt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ae(t,e){var n=Wl(Ts++,3);!Fe.__s&&K1(n.__H,e)&&(n.__=t,n.i=e,wt.__H.__h.push(n))}function Ve(t){return bs=5,Ue(function(){return{current:t}},[])}function Ue(t,e){var n=Wl(Ts++,7);return K1(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function $e(t,e){return bs=8,Ue(function(){return t},e)}function Kl(t){var e=wt.context[t.__c],n=Wl(Ts++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(wt)),e.props.value):t.__}function MD(){for(var t;t=W1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Hl),t.__H.__h.forEach(Dp),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===qt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),wt=null,z1&&z1(t)},Fe.__r=function(t){N1&&N1(t),Ts=0;var e=(wt=t.__c).__H;e&&(wp===wt?(e.__h=[],wt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jl,n.__N=n.i=void 0})):(e.__h.forEach(Hl),e.__h.forEach(Dp),e.__h=[])),wp=wt},Fe.diffed=function(t){U1&&U1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(W1.push(e)!==1&&O1===Fe.requestAnimationFrame||((O1=Fe.requestAnimationFrame)||BD)(MD)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jl&&(n.__=n.__V),n.i=void 0,n.__V=jl})),wp=wt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Hl),n.__h=n.__h.filter(function(r){return!r.__||Dp(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),q1&&q1(t,e)},Fe.unmount=function(t){j1&&j1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hl(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var H1=typeof requestAnimationFrame=="function";function BD(t){var e,n=function(){clearTimeout(r),H1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);H1&&(e=requestAnimationFrame(n))}function Hl(t){var e=wt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),wt=e}function Dp(t){var e=wt;t.__c=t.__(),wt=e}function K1(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function G1(t,e){return typeof e=="function"?e(t):e}d();var V1=["*://*/*","*","*://*"],Y1="immersive-translate-wildcard-placeholder.com";function Ap(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>V1.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(V1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return RD(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,Y1),m;try{m=new URL(p)}catch{return B.debug("invalid match pattern",p,"raw match value:",c),!1}let g=m.host,f=m.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=ID(l+":",$1(g),$1(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function $1(t){return t.replaceAll(Y1,"*")}function ID(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function dt(t,e){return Ap(t,e)!==null}function RD(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var OD=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Cn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(Cn(t,i))return!1;if(Cn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!Cn(t,o)),c;function p(){return n&&n.display?!!OD.includes(n.display):Cn(t,r)}}var Kt=Cn;function $a(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function ys(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function fr(t,e=!1){let n=Xo;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Va(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return fr(n,e)}function Vi(t,e){return na(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function kp(t){let{rule:e}=t,n=zD(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function zD(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function vs(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),lt(r,rb,e.toString());let a=kp(t);return r.append(Ye.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function $i(t,e){return t.querySelector(`[${q0}='${e}']`)}function Q1(){document.querySelectorAll(`[${q0}]`).forEach(e=>{e.remove()})}function J1(){document.querySelectorAll(`.${yt}-error`).forEach(e=>{e.remove()})}function Z1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{ji(n)&&e.push(n)}),e}function Pp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},m=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),g=new RegExp(a.replace("{word}",m.map(f=>f.k).join("|")),"g");l=l.replace(g,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let m=new RegExp(p,"gi");l=l.replace(m,(g,f)=>{let T=c++;return e[`${T}`]=l1(f),o.length>2?g.replace(f,`<${o[2]}${T}>`):g.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){B.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function Ss(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||T1(s)||m1(s)||b1(s)||f1(s)||h1(s)||UD(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ni(i,n,r)}function Nr(t){return t.nodeType===Node.ELEMENT_NODE}function X1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Lp(){return await At("fakeUserId","")}async function ND(){return await At("installedAt","")}async function Gl(t){let n=Me().INSTALL_FROM,r=Nt(),a=await ND(),i=await Lp(),o=await Pn(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function e2(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await Fp(t,e);r(a)})()},[t,e,r]),n}async function Fp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!et()&&ye()||ut().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>dt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>dt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}d();function Mp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(lb),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${H0}-theme-${t}`):a.push(`${j0}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(H0):a.push(j0),a}function Bp(t){let e=["notranslate",Qu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function a2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Va(n,!0),m="afterend",g=p[0],f=p[1],T=`${g}(\\d+)${f}`,b=new RegExp(T,"g"),h=Ye.sanitize(u);o.length>0&&(h=h.replace(b,I=>{let S=h.indexOf(I),y=h[S-1]===" ",L=h[S+I.length]===" ",v=I.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),O=Number(v);if(isNaN(O))return I;let _=o[O];if(_&&_.type==="element"){let k=_.value.outerHTML;return y||(k=" "+k),L||(k=k+" "),k}else B.error("variable type not supported",_,I);return I}));let E=Mp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&E.push(ub);let D=Bp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${E.join(" ")}" ${dr}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${dr}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${dr}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:m}}function Vl(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";m&&(T=ca(Ip(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Kt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let E=Rp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",I=ys(E+D+M),S=I[0]+h+I[1];if(E===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=ys(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Rp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);m&&(b=ca(Ip(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",E=ys(T+b+h),D=E[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+E[1];if(T===" ")D=D.trimStart();else{let M=ys(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Rp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Ip(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(m=s[c-1].text),c/g,">"))}t.targetText=Ye.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Va(e);if(l.length>2){let c=l[2];return qD({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=a2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Ip(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function qD(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=Ye.sanitize(p);let m=p,g=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(m=m.replace(g,E=>{let D=m.indexOf(E),M=m[D-1]===" ",I=m[D+E.length]===" ",S=E.match(f);if(!S)return E;let y=S[1],L=Number(y);if(isNaN(L))return E;let A=o[Number(L)];if(A&&A.type==="element"){let v=A.value.outerHTML;return M||(v=" "+v),I||(v=v+" "),v}else if(A&&A.type==="text"){let v=A.value;return M||(v=" "+v),I||(v=v+" "),v}else B.error("variable type not supported",A,E);return E}));let T=Mp(l,n,r||[],s),b=Bp(l),h="";return c&&(h=`style="${c}"`),m=`<${a} ${h} class="${T.join(" ")}" ${dr}="1"><${a} class="${b.join(" ")}" ${dr}="1">${m}`,n||(i==="smart"?m=`
${m}`:m=`${i}${m}`),n&&(i!=="smart"?m=`${i}${m}`:m=`<${a} class="notranslate" ${dr}="1"> ${m}`),u==="smart"?m=`${m}`:m=`${m}${u}`,{html:m,position:"afterend"}}function Rp(t){let e=t[t.length-1];return e?e.text:""}function Op(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let m=p[1],g=Number(m);if(isNaN(g))return c;let f=r[m];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=L3(a,c,p)}catch(b){if(r)for(let h=0;hb));let m=[],g=[],f=(b,h,E)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),g[b]||(g[b]=h,g[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),g[b].hasError)return;if(E){let S=E instanceof $?new $(E.name,E.message).initNetWork(E.status).initData(E.data):E;g[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}g[b].translatedTexts[h.partIndex]=D;let M=g[b],I=0;for(let S=0;S{let I=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(I=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:I,to:h.to,url:E,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=sb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],A=fr(this.serviceConfig);if(h.tempSentences.forEach((q,F)=>{let C=Pp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:A,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(C&&C.text&&C.text.trim().lengthF.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:I,to:h.to})}let v="";y&&y.length>=2?v=L.map((q,F)=>{let{item:C}=q;return F===L.length-1?C.text:C.text+y[0]+(F+1)+y[1]}).join(""):v=L.map(({item:q})=>q.text).join(S);let O=await this.translate({text:v,from:I,to:h.to,url:E,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:_}=O,k=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let F=new RegExp(q,"g");k=_.split(F)}else k=_.split(S);let N=[];if(k.length>L.length){for(let q=0;qq.text);return A=fr(this.serviceConfig,!0),N.forEach((q,F)=>{let C=L[F],P=C.index,U=C.variables||{};Object.keys(U).length>0&&(q=Op({text:q,delimiters:A,variables:U})),z[P]=q}),{sourceTempSentences:h.tempSentences,text:z,from:O.from,to:O.to}}};m.push(M().then(I=>{let{text:S,sourceTempSentences:y}=I;for(let L=0;L{if(I instanceof $&&I.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=fr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,m)=>{let g=Pp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[m]!==!0&&(g&&g.text&&g.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){B.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=fr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let m=p.index,g=p.variables,f=Object.keys(g);u[m]=l,f.length>0&&(u[m]=Op({text:l,delimiters:i,variables:g}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[vt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};d();d();var Qi="input is invalid type",zp=typeof window=="object",da=zp?window:{};da.JS_SHA256_NO_WINDOW&&(zp=!1);var jD=!zp&&typeof self=="object",HD=!da.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;HD?da=global:jD&&(da=self);var jH=!da.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,HH=typeof define=="function"&&define.amd,xs=!da.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),WD=[-2147483648,8388608,32768,128],er=[24,16,8,0],$l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Yl=["hex","array","digest","arrayBuffer"],jt=[];(da.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});xs&&(da.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var o2=function(t,e){return function(n){return new Ht(e,!0).update(n)[t]()}},u2=function(t){var e=o2("hex",t);e.create=function(){return new Ht(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Ht.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=WD[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};Ht.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,m,g,f,T,b,h,E,D;for(l=16;l<64;++l)g=u[l-15],c=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=u[l-2],p=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,g=u[0]-1413257819,s=g-150054599<<0,r=g+24177077<<0):(b=704751109,g=u[0]-210244248,s=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,m=b^t&n^D,T=a&i^~a&o,g=s+p+T+$l[l]+u[l],f=c+m,s=r+g<<0,r=g+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,m=h^r&e^b,T=s&a^~s&i,g=o+p+T+$l[l+1]+u[l+1],f=c+m,o=n+g<<0,n=g+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),E=n&r,m=E^n&t^h,T=o&s^~o&a,g=i+p+T+$l[l+2]+u[l+2],f=c+m,i=e+g<<0,e=g+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,m=D^e&r^E,T=i&o^~i&s,g=a+p+T+$l[l+3]+u[l+3],f=c+m,a=t+g<<0,t=g+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};Ht.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};Ht.prototype.toString=Ht.prototype.hex;Ht.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};Ht.prototype.array=Ht.prototype.digest;Ht.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Ql(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Qi);if(xs&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!xs||!ArrayBuffer.isView(t)))throw new Error(Qi)}else throw new Error(Qi);t.length>64&&(t=new Ht(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}Ht.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Ql.prototype=new Ht;Ql.prototype.finalize=function(){if(Ht.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Ht.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Ht.prototype.finalize.call(this)}};var Ji=u2();Ji.sha256=Ji;Ji.sha224=u2(!0);Ji.sha256.hmac=l2();Ji.sha224.hmac=l2(!0);var c2=Ji;var d2=c2.sha256;function tr(t){return Promise.resolve(d2(t))}function Jl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function pa(t,e){let n=d2.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function p2(t,e){let n=await pa(t,e);return Jl(n)}async function Zl(t,e){let n=KD(e),r=await pa(t,n);return Jl(r)}function KD(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}var g2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Es=class t extends De{static langMap=new Map(g2);maxTextGroupLength=50;static langMapReverse=new Map(g2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await tr(a)].join(` +`;continue}else if(b.length>e){let E=[];gp(b,e,E);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&gp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?g.push(T):m.push(T))});let f=g.concat(m).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:g,explicitProps:m}}var gs=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Jt(s),l=Object.keys(gr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=gr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&tt())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let m=!!p.canary,g=!!p.alpha,f=!!p.beta;return c===t[e]||m&&i||g&&(r||i)||f&&(a||r||i)?!0:!g&&!f&&!m}).map(c=>vl(e,c,t))};function ms(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function _3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}var Fi=[];async function Sl(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function F3(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await cD(e,t)}async function M3(t){let e=Ln(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await lD(n,e)}async function lD(t,e){let n=await Sl(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function cD(t,e){let n=await Sl(t);return(await pD()).includes(t)||await dD(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function dD(t){let e="cache_list",n=await Sl(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Fi.push(t)},a.onerror=i=>{n.close()}}async function pD(){if(Fi&&Fi.length>0)return Fi;let t=await Sl(Q+"-cacheList","cache_list");return Fi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Fi}d();d();var mp="Original";function Qe(){return mp}function gn(t){mp=t,B3(mp)}d();var R3="auto",xl="auto",I3="auto";function O3(t){R3=t}function qn(t){xl=t}function vt(){return xl!=="auto"?xl:I3!=="auto"?I3:R3}function El(){return xl}d();function Ga(t){return t?.id?.endsWith("pdfWebPage")||!1}function ra(t){try{if(!t||!Ga(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Je={},aa=async function(t,e){let{method:n,data:r}=t,a=await Je.updateGlobalContext(),i=Date.now();if(B.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Je.translateTheWholePage(r),et(Xn,i);else if(n==="translateTheMainPage")await Je.translateTheMainPage(r),et(Xn,i);else if(n==="translateToThePageEndImmediately")await Je.translateToThePageEndImmediately(r),et(Xn,i);else if(n==="toggleTranslatePage")await Je.toggleTranslatePage(r),et(Xn,i);else if(n==="toggleTranslateTheWholePage")await Je.toggleTranslateTheWholePage(r),et(Xn,i);else if(n==="toggleTranslateTheMainPage")await Je.toggleTranslateTheMainPage(r),et(Xn,i);else if(n==="toggleOnlyTransation")await Je.ensureSwitchTranslationMode(r),et(Xn,i);else if(n==="translatePage")await Je.translatePage(a,r),et(Xn,i);else if(n==="toggleTranslationMask")await Je.toggleTranslationMask(r);else if(n==="restorePage")Je.restorePage();else if(n==="retryFailedParagraphs")Je.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Je.switchTranslationMode(r.mode),await Je.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Je.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Ku,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Je.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Qo,{detail:r}));else if(n==="translateWithOpenAI")await Je.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Je.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Je.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Je.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Je.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Je.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Je.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")He()||await Je.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!He())return JSON.stringify(a)}};function z3(t){Object.assign(Je,t)}function N3(t){Object.assign(Je,t)}function U3(t){Object.assign(Je,t)}var gD=function(t,e){let{method:n,data:r}=t;if(B.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Qe();if(n==="getCurrentPageLanguage"){let a=vt();return Je.detectCurrentPageLanguage().catch(i=>{B.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return qn(r),vt();if(n==="getContextString"){let a=Je.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Je.getPureGlobalContext();return ra(a?.rule)}}},Cl,wl;function q3(){let t=Dl();He()||mD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Dl(){return Cl||(Cl=new ea("content_script",!1).getConnection("main",aa),Cl)}function mD(){return wl||(wl=new ea("content_script",!1).getConnection("main_sync",gD,{sync:!0}),wl)}d();var fp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Al="https://transmart.qq.com/api/imt",zr=class t{static langMapReverse=new Map(fp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await ce({url:Al,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function fD(t,e){return Math.floor(Math.random()*(e-t+1))+t}var hD=30,hp="RATE_LIMITER_TICKS",Mi=class t{static strictTicks={};static clearStrictTicks(){ps(hp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await bl(hp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){B.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await ps(hp,JSON.stringify(this.strictTicks))}catch(a){B.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=fD(4,hD);await vr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function St(t){return await Dl().sendMessage("background:main",t)}function ce(t){return au()?ul({method:"request",data:t}):ye()||ru()?(t.fetchPolyfill=globalThis.GM_fetch,Wa(t)):St({method:"fetch",data:t})}function an(){return ye()?Pn():St({method:"getConfig"})}function mn(t){return ye()?ds(t):St({method:"setUserConfig",data:t})}function fn(){return ye()?Or():St({method:"getUserConfig"})}function fs(){return ye()?Zt():St({method:"getLocalConfig"})}function kl(t){return ye()?Xt(t):St({method:"setLocalConfig",data:t})}function j3(t){return ye()?C3(t):St({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=sl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||tt()){if(t.translateService&&!Ju.includes(t.translateService))return Promise.resolve("auto");let r=r3(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await St({method:"detectLanguage",data:t});return Promise.resolve(e)}function H3(){return St({method:"detectTabLanguage"})}async function Pl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||tt()){let n=t.substring(0,200);e=await zr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function B3(t){let e=new CustomEvent(ja,{detail:t});if(document.dispatchEvent(e),ye())return;Dl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function W3(t){return ye()?M3(t):St({method:"queryParagraphCache",data:t})}async function K3(t){if(ye()){await F3(t);return}return St({method:"setParagraphCache",data:t})}async function G3(){if(ye())return Promise.resolve();await St({method:"mockRequest"})}function Bi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):St({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function Ii(t=""){return ye()||tt()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function $3(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Ll(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):St({method:"openAboutPage"})}function Ri(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):St({method:"openInTab",data:t})}function V3(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):St({method:"openEbookViewerPage"})}function Y3(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):St({method:"openEbookBuilderPage"})}function _l(t){tt()}function Oi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):St({method:"openPdfViewerPage",data:{url:e}})}function Q3(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):St({method:"openSubtitleBuilderPage"})}function zi(t){return ye()?Promise.resolve():St({method:"setBadge",data:{text:t}})}function J3(){return ye()?(B.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):St({method:"autoSyncLatestConfig"})}function Fl(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function Z3(t,e){return ye()?Mi.getDelay(t,e):St({method:"getDelay",data:{key:t,options:e}})}var X3="G-MKMD9LWFTR";async function ot(t,e,n){try{let r=us(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=He(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let A=await Rr(l,0),v=Ml(new Date(A)),O=Date.now(),_=Ml(new Date(O));if(v===_)return;await s3(l,O)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",m=await At("fakeUserId","");m||(m=await Rr("fakeUserId",""),m&&await et("fakeUserId",m));let g=Ut(),f=new Date,T=await At("installedAt","");T||(T=await Rr("installedAt",""),T&&await et("installedAt",T)),m?T||(T=new Date(0).toISOString(),await et("installedAt",T)):(m=bD(32),await et("fakeUserId",m)),T||(T=f.toISOString(),await et("installedAt",T));let b=new Date(T),h=Ml(b),E=Ml(f),D=h===E,M=f.getTime()-b.getTime()<7*24*60*60*1e3,I=`https://www.google-analytics.com/mp/collect?measurement_id=${X3}&api_secret=${p}`;u||(I=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${X3}&api_secret=${p}`);let S=mi.parse(window.navigator.userAgent),y=e.map(A=>{let v=A.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",g&&(v.version=g),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=TD(b)),n.user){let _=a3(n.user);_&&Object.keys(_).forEach(k=>{v[k]=_[k]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),v.page_type=O,s?v.main_frame=0:v.main_frame=1,!c){let _=n.url;try{let k=new URL(_);v.site_host=k.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...A,params:v}});if(i)return;let L=await ce({responseType:"text",url:I,method:"POST",body:JSON.stringify({client_id:m,user_id:m,events:y})})}catch{}}function bD(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;ae.removeEventListener("message",n)),t.length=0}function xD(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vD(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function ED(t,e,n,r){let a=i=>{let o=i.data;a1(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function e1(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(a1(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yD(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CD(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(r1(e,"tell",n,i,r),a)}async function t1(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),m=await xD(t,n,r,s);clearTimeout(p),l(m)});return e.postMessage(r1(n,"ask",r,s,a),i),u}var oa=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;e1(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ia(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await t1(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(ED(this.thisWindow,this.protocol,e,n))}tell(e,n){CD(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(e1(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return t1(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SD(this.listeners)}};var i1;async function o1(){if(He()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=oa.iframe(Zu,"*",{targetWindow:e});i1=n,await oa.connect(n).catch(r=>{B.error("connect with parent frame error",r)})}}function s1(){return i1}d();function u1(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();d();d();d();function l1(t){return t.replace(//g,">")}d();var Bl=!1,wD=ye();function c1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function DD(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&d1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(sa(i,Vu)){if(a===!0)return!0;continue}if(hs(i.nodeName,e.inlineTags))return!0;if(!bp(i,e))return!1}}return!0}function Tp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(hs(t.nodeName,n)||bp(t,e)){if(sa(t,ob)||hs(t.nodeName,["BR"]))return!1;if(sa(t,Vu))return!0;if(bp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return DD(t,e)}else return sa(t,Vu);return!1}function d1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&sa(t,ib,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&sa(t,J4))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||hs(t.nodeName,i))}function Ni(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!g1(r)&&r.length>=n}function p1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(g1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function g1(t){for(let e=0;e127)return!1;return!0}function m1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function f1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function h1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function b1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function T1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function sa(t,e,n=!1){return yp(t,e,"1",n)}function yp(t,e,n,r=!1){return Bl&&!r?t[xn]?!!(t[xn]&&t[xn][e]===n):!1:t.dataset[e]===n}function Ui(t){return(t.innerText||t.textContent||"").trim()}function vp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Il(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function lt(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(Bl&&!r?(t[xn]||(t[xn]={}),t[xn][e]||(t[xn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Rl(t,e,n=!1){if(Bl&&!n){if(!t[xn]||!t[xn][e])return;delete t[xn][e]}else delete t.dataset[e]}function qi(t,e,n=!1){return Bl&&!n?!t[xn]||!t[xn][e]?void 0:t[xn][e]:t.dataset[e]}function bp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!hs(t.nodeName,n)}function Ee(){if(!globalThis||!globalThis.location)return"https://example.com";if(!He())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function En(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){B.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else B.warn("injectCSS failed, rootDocument does not have head node",t)}function ji(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(wD){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function hs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function y1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function v1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||d1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return B.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function S1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();d();d();var ql,Fe,D1,AD,bs,x1,A1,zl={},k1=[],kD=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(t,e){for(var n in e)t[n]=e[n];return t}function P1(t){var e=t.parentNode;e&&e.removeChild(t)}function xp(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ql.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return Ol(t,o,r,a,null)}function Ol(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++D1};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function jt(t){return t.children}function Hi(t,e){this.props=t,this.context=e}function Wi(t,e){if(e==null)return t.__?Wi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?Ol(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null){if(g.__=n,g.__b=n.__b+1,(m=h[c])===null||m&&g.key==m.key&&g.type===m.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:jl}),n.__[t]}function se(t){return Ts=1,FD(G1,t)}function FD(t,e,n){var r=Wl(ys++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):G1(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=wt,!wt.u)){wt.u=!0;var a=wt.shouldComponentUpdate;wt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ae(t,e){var n=Wl(ys++,3);!Fe.__s&&K1(n.__H,e)&&(n.__=t,n.i=e,wt.__H.__h.push(n))}function $e(t){return Ts=5,Ue(function(){return{current:t}},[])}function Ue(t,e){var n=Wl(ys++,7);return K1(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return Ts=8,Ue(function(){return t},e)}function Kl(t){var e=wt.context[t.__c],n=Wl(ys++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(wt)),e.props.value):t.__}function MD(){for(var t;t=W1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Hl),t.__H.__h.forEach(wp),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===jt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),wt=null,z1&&z1(t)},Fe.__r=function(t){N1&&N1(t),ys=0;var e=(wt=t.__c).__H;e&&(Cp===wt?(e.__h=[],wt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jl,n.__N=n.i=void 0})):(e.__h.forEach(Hl),e.__h.forEach(wp),e.__h=[])),Cp=wt},Fe.diffed=function(t){U1&&U1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(W1.push(e)!==1&&O1===Fe.requestAnimationFrame||((O1=Fe.requestAnimationFrame)||BD)(MD)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jl&&(n.__=n.__V),n.i=void 0,n.__V=jl})),Cp=wt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Hl),n.__h=n.__h.filter(function(r){return!r.__||wp(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),q1&&q1(t,e)},Fe.unmount=function(t){j1&&j1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hl(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var H1=typeof requestAnimationFrame=="function";function BD(t){var e,n=function(){clearTimeout(r),H1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);H1&&(e=requestAnimationFrame(n))}function Hl(t){var e=wt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),wt=e}function wp(t){var e=wt;t.__c=t.__(),wt=e}function K1(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function G1(t,e){return typeof e=="function"?e(t):e}d();var $1=["*://*/*","*","*://*"],Y1="immersive-translate-wildcard-placeholder.com";function Dp(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>$1.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if($1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return RD(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,Y1),m;try{m=new URL(p)}catch{return B.debug("invalid match pattern",p,"raw match value:",c),!1}let g=m.host,f=m.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=ID(l+":",V1(g),V1(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function V1(t){return t.replaceAll(Y1,"*")}function ID(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function dt(t,e){return Dp(t,e)!==null}function RD(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var OD=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Cn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(Cn(t,i))return!1;if(Cn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!Cn(t,o)),c;function p(){return n&&n.display?!!OD.includes(n.display):Cn(t,r)}}var Gt=Cn;function Va(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function vs(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function fr(t,e=!1){let n=es;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function $a(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return fr(n,e)}function $i(t,e){return na(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function Ap(t){let{rule:e}=t,n=zD(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function zD(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function Ss(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),lt(r,rb,e.toString());let a=Ap(t);return r.append(Ye.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Vi(t,e){return t.querySelector(`[${U0}='${e}']`)}function Q1(){document.querySelectorAll(`[${U0}]`).forEach(e=>{e.remove()})}function J1(){document.querySelectorAll(`.${yt}-error`).forEach(e=>{e.remove()})}function Z1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{ji(n)&&e.push(n)}),e}function kp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},m=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),g=new RegExp(a.replace("{word}",m.map(f=>f.k).join("|")),"g");l=l.replace(g,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let m=new RegExp(p,"gi");l=l.replace(m,(g,f)=>{let T=c++;return e[`${T}`]=l1(f),o.length>2?g.replace(f,`<${o[2]}${T}>`):g.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){B.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function xs(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||T1(s)||m1(s)||b1(s)||f1(s)||h1(s)||UD(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ni(i,n,r)}function Nr(t){return t.nodeType===Node.ELEMENT_NODE}function X1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Pp(){return await At("fakeUserId","")}async function ND(){return await At("installedAt","")}async function Gl(t){let n=Me().INSTALL_FROM,r=Ut(),a=await ND(),i=await Pp(),o=await Pn(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function e2(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await _p(t,e);r(a)})()},[t,e,r]),n}async function _p(t,e){if(!t||!e)return;let n=!1,r,a=!0;!tt()&&ye()||ut().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>dt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>dt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}d();function Fp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(lb),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${j0}-theme-${t}`):a.push(`${q0}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(j0):a.push(q0),a}function Mp(t){let e=["notranslate",Qu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function a2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=$a(n,!0),m="afterend",g=p[0],f=p[1],T=`${g}(\\d+)${f}`,b=new RegExp(T,"g"),h=Ye.sanitize(u);o.length>0&&(h=h.replace(b,I=>{let S=h.indexOf(I),y=h[S-1]===" ",L=h[S+I.length]===" ",v=I.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),O=Number(v);if(isNaN(O))return I;let _=o[O];if(_&&_.type==="element"){let k=_.value.outerHTML;return y||(k=" "+k),L||(k=k+" "),k}else B.error("variable type not supported",_,I);return I}));let E=Fp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&E.push(ub);let D=Mp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${E.join(" ")}" ${dr}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${dr}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${dr}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:m}}function $l(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";m&&(T=ca(Bp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Gt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let E=Ip(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",I=vs(E+D+M),S=I[0]+h+I[1];if(E===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=vs(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Ip(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);m&&(b=ca(Bp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",E=vs(T+b+h),D=E[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+E[1];if(T===" ")D=D.trimStart();else{let M=vs(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Ip(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Bp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(m=s[c-1].text),c/g,">"))}t.targetText=Ye.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=$a(e);if(l.length>2){let c=l[2];return qD({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=a2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Bp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function qD(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=Ye.sanitize(p);let m=p,g=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(m=m.replace(g,E=>{let D=m.indexOf(E),M=m[D-1]===" ",I=m[D+E.length]===" ",S=E.match(f);if(!S)return E;let y=S[1],L=Number(y);if(isNaN(L))return E;let A=o[Number(L)];if(A&&A.type==="element"){let v=A.value.outerHTML;return M||(v=" "+v),I||(v=v+" "),v}else if(A&&A.type==="text"){let v=A.value;return M||(v=" "+v),I||(v=v+" "),v}else B.error("variable type not supported",A,E);return E}));let T=Fp(l,n,r||[],s),b=Mp(l),h="";return c&&(h=`style="${c}"`),m=`<${a} ${h} class="${T.join(" ")}" ${dr}="1"><${a} class="${b.join(" ")}" ${dr}="1">${m}`,n||(i==="smart"?m=`
${m}`:m=`${i}${m}`),n&&(i!=="smart"?m=`${i}${m}`:m=`<${a} class="notranslate" ${dr}="1"> ${m}`),u==="smart"?m=`${m}`:m=`${m}${u}`,{html:m,position:"afterend"}}function Ip(t){let e=t[t.length-1];return e?e.text:""}function Rp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let m=p[1],g=Number(m);if(isNaN(g))return c;let f=r[m];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=L3(a,c,p)}catch(b){if(r)for(let h=0;hb));let m=[],g=[],f=(b,h,E)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),g[b]||(g[b]=h,g[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),g[b].hasError)return;if(E){let S=E instanceof V?new V(E.name,E.message).initNetWork(E.status).initData(E.data):E;g[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}g[b].translatedTexts[h.partIndex]=D;let M=g[b],I=0;for(let S=0;S{let I=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(I=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:I,to:h.to,url:E,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=sb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],A=fr(this.serviceConfig);if(h.tempSentences.forEach((q,F)=>{let C=kp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:A,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(C&&C.text&&C.text.trim().lengthF.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:I,to:h.to})}let v="";y&&y.length>=2?v=L.map((q,F)=>{let{item:C}=q;return F===L.length-1?C.text:C.text+y[0]+(F+1)+y[1]}).join(""):v=L.map(({item:q})=>q.text).join(S);let O=await this.translate({text:v,from:I,to:h.to,url:E,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:_}=O,k=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let F=new RegExp(q,"g");k=_.split(F)}else k=_.split(S);let N=[];if(k.length>L.length){for(let q=0;qq.text);return A=fr(this.serviceConfig,!0),N.forEach((q,F)=>{let C=L[F],P=C.index,U=C.variables||{};Object.keys(U).length>0&&(q=Rp({text:q,delimiters:A,variables:U})),z[P]=q}),{sourceTempSentences:h.tempSentences,text:z,from:O.from,to:O.to}}};m.push(M().then(I=>{let{text:S,sourceTempSentences:y}=I;for(let L=0;L{if(I instanceof V&&I.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=fr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,m)=>{let g=kp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[m]!==!0&&(g&&g.text&&g.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){B.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=fr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let m=p.index,g=p.variables,f=Object.keys(g);u[m]=l,f.length>0&&(u[m]=Rp({text:l,delimiters:i,variables:g}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[vt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};d();d();var Qi="input is invalid type",Op=typeof window=="object",da=Op?window:{};da.JS_SHA256_NO_WINDOW&&(Op=!1);var jD=!Op&&typeof self=="object",HD=!da.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;HD?da=global:jD&&(da=self);var jH=!da.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,HH=typeof define=="function"&&define.amd,Es=!da.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",be="0123456789abcdef".split(""),WD=[-2147483648,8388608,32768,128],er=[24,16,8,0],Vl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Yl=["hex","array","digest","arrayBuffer"],Ht=[];(da.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});Es&&(da.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var o2=function(t,e){return function(n){return new Wt(e,!0).update(n)[t]()}},u2=function(t){var e=o2("hex",t);e.create=function(){return new Wt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Wt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=WD[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};Wt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,m,g,f,T,b,h,E,D;for(l=16;l<64;++l)g=u[l-15],c=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=u[l-2],p=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,g=u[0]-1413257819,s=g-150054599<<0,r=g+24177077<<0):(b=704751109,g=u[0]-210244248,s=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,m=b^t&n^D,T=a&i^~a&o,g=s+p+T+Vl[l]+u[l],f=c+m,s=r+g<<0,r=g+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,m=h^r&e^b,T=s&a^~s&i,g=o+p+T+Vl[l+1]+u[l+1],f=c+m,o=n+g<<0,n=g+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),E=n&r,m=E^n&t^h,T=o&s^~o&a,g=i+p+T+Vl[l+2]+u[l+2],f=c+m,i=e+g<<0,e=g+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,m=D^e&r^E,T=i&o^~i&s,g=a+p+T+Vl[l+3]+u[l+3],f=c+m,a=t+g<<0,t=g+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};Wt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=be[t>>28&15]+be[t>>24&15]+be[t>>20&15]+be[t>>16&15]+be[t>>12&15]+be[t>>8&15]+be[t>>4&15]+be[t&15]+be[e>>28&15]+be[e>>24&15]+be[e>>20&15]+be[e>>16&15]+be[e>>12&15]+be[e>>8&15]+be[e>>4&15]+be[e&15]+be[n>>28&15]+be[n>>24&15]+be[n>>20&15]+be[n>>16&15]+be[n>>12&15]+be[n>>8&15]+be[n>>4&15]+be[n&15]+be[r>>28&15]+be[r>>24&15]+be[r>>20&15]+be[r>>16&15]+be[r>>12&15]+be[r>>8&15]+be[r>>4&15]+be[r&15]+be[a>>28&15]+be[a>>24&15]+be[a>>20&15]+be[a>>16&15]+be[a>>12&15]+be[a>>8&15]+be[a>>4&15]+be[a&15]+be[i>>28&15]+be[i>>24&15]+be[i>>20&15]+be[i>>16&15]+be[i>>12&15]+be[i>>8&15]+be[i>>4&15]+be[i&15]+be[o>>28&15]+be[o>>24&15]+be[o>>20&15]+be[o>>16&15]+be[o>>12&15]+be[o>>8&15]+be[o>>4&15]+be[o&15];return this.is224||(u+=be[s>>28&15]+be[s>>24&15]+be[s>>20&15]+be[s>>16&15]+be[s>>12&15]+be[s>>8&15]+be[s>>4&15]+be[s&15]),u};Wt.prototype.toString=Wt.prototype.hex;Wt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};Wt.prototype.array=Wt.prototype.digest;Wt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Ql(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Qi);if(Es&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!Es||!ArrayBuffer.isView(t)))throw new Error(Qi)}else throw new Error(Qi);t.length>64&&(t=new Wt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}Wt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Ql.prototype=new Wt;Ql.prototype.finalize=function(){if(Wt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Wt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Wt.prototype.finalize.call(this)}};var Ji=u2();Ji.sha256=Ji;Ji.sha224=u2(!0);Ji.sha256.hmac=l2();Ji.sha224.hmac=l2(!0);var c2=Ji;var d2=c2.sha256;function tr(t){return Promise.resolve(d2(t))}function Jl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function pa(t,e){let n=d2.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function p2(t,e){let n=await pa(t,e);return Jl(n)}async function Zl(t,e){let n=KD(e),r=await pa(t,n);return Jl(r)}function KD(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}var g2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Cs=class t extends De{static langMap=new Map(g2);maxTextGroupLength=50;static langMapReverse=new Map(g2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new V("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await tr(a)].join(` `),p=t.getUTCDate(u),m=["TC3-HMAC-SHA256",l,`${p}/${i}/tc3_request`,await tr(c)].join(` -`),g=await p2(p,`TC3${n}`),f=await Zl(i,g),T=await Zl("tc3_request",f),b=await Zl(m,T),h=await ce({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var m2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],GD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Cs=class t extends De{static langMap=new Map(m2);static langMapReverse=new Map(m2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await ce({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:GD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var f2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ya=class t extends De{static langMap=new Map(f2);static langMapReverse=new Map(f2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function VD(t,e){return e?t+(e-t%e):t}function $D(t,e){return t.split(e).length-1}function Np(t){let e=Date.now(),n=1;for(let r of t)n+=$D(r,"i");return VD(e,n)}function YD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Up(){return YD(1e6,1e8)}d();d();d();var qp="https://www2.deepl.com/jsonrpc",jp="auto",h2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function QD(t=h2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Hp(t){return QD()[t.toLowerCase()]}var JD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function ZD(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function XD(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function eA(t,e,n,r,a,i,o){let s=Up(),u=XD(r,n),l=[];e.forEach(m=>{l.push({text:m,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Np(e);let c=await ce({retry:2,method:"POST",url:t,body:ZD(u),headers:JD}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(m=>{p.text.push(m.text)}),p}async function b2(t,e,n,r=jp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:eA(t,e,Hp(n),Hp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var T2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Zi=class t extends De{static langMap=new Map(T2);static langMapReverse=new Map(T2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=qp;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=Ut(qp,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await b2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var ws=class t extends De{static langMap=new Map(hp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=zr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=y2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await ce({url:Al,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=y2()),r.length===1){let g=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[g.text],from:g.from,to:g.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),m=await ce({url:Al,body:p,method:"POST"});if(m.header.ret_code!=="succ")throw new $(m.message||m.header.ret_code);return{text:m.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function y2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Wp(){return Math.random()>=.1}var Xi=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Wp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await G3(),!Wp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var S2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Kp=new Map(S2),v2=new Map(S2.map(([t,e])=>[e,t])),Gp=class t extends De{static langMap=Kp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Kp.get(r)||"auto",target_lang:Kp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:v2.get(o.source_lang),to:v2.get(o.target_lang)}}else throw new $(i.msg)}},Xl=Gp;d();var x2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ds=new Map(x2),tA=new Map(x2.map(([t,e])=>[e,t])),Vp=class extends De{static langMap=Ds;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=Ut(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=Ut(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=Ut(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=Ut(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=Ut(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:Ds.get(n)||"",target_lang:Ds.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:Ds.get(n)||"auto",target_lang:Ds.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let m,g={};e.refresh&&(g={"X-Refresh":"True"}),e.debug&&(g={...g,"X-Debug":"True"}),this.provider==="pro"?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):m=await ce({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(m,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let E=await new Ya(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` +`),g=await p2(p,`TC3${n}`),f=await Zl(i,g),T=await Zl("tc3_request",f),b=await Zl(m,T),h=await ce({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new V(h.Response.Error.Message);return h}};d();var m2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],GD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},ws=class t extends De{static langMap=new Map(m2);static langMapReverse=new Map(m2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await ce({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:GD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var f2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ya=class t extends De{static langMap=new Map(f2);static langMapReverse=new Map(f2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new V("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new V("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new V("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new V("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function $D(t,e){return e?t+(e-t%e):t}function VD(t,e){return t.split(e).length-1}function zp(t){let e=Date.now(),n=1;for(let r of t)n+=VD(r,"i");return $D(e,n)}function YD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Np(){return YD(1e6,1e8)}d();d();d();var Up="https://www2.deepl.com/jsonrpc",qp="auto",h2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function QD(t=h2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function jp(t){return QD()[t.toLowerCase()]}var JD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function ZD(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function XD(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function eA(t,e,n,r,a,i,o){let s=Np(),u=XD(r,n),l=[];e.forEach(m=>{l.push({text:m,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=zp(e);let c=await ce({retry:2,method:"POST",url:t,body:ZD(u),headers:JD}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(m=>{p.text.push(m.text)}),p}async function b2(t,e,n,r=qp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:eA(t,e,jp(n),jp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var T2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Zi=class t extends De{static langMap=new Map(T2);static langMapReverse=new Map(T2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Up;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=qt(Up,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await b2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var Ds=class t extends De{static langMap=new Map(fp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=zr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=y2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await ce({url:Al,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new V(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=y2()),r.length===1){let g=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[g.text],from:g.from,to:g.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),m=await ce({url:Al,body:p,method:"POST"});if(m.header.ret_code!=="succ")throw new V(m.message||m.header.ret_code);return{text:m.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function y2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Hp(){return Math.random()>=.1}var Xi=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Hp())throw new V("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await G3(),!Hp())throw new V("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var S2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Wp=new Map(S2),v2=new Map(S2.map(([t,e])=>[e,t])),Kp=class t extends De{static langMap=Wp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new V("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Wp.get(r)||"auto",target_lang:Wp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:v2.get(o.source_lang),to:v2.get(o.target_lang)}}else throw new V(i.msg)}},Xl=Kp;d();var x2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],As=new Map(x2),tA=new Map(x2.map(([t,e])=>[e,t])),Gp=class extends De{static langMap=As;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new V("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new V("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new V("authKey are required");if(!this.authKey)throw new V("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=qt(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=qt(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=qt(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=qt(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=qt(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:As.get(n)||"",target_lang:As.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:As.get(n)||"auto",target_lang:As.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let m,g={};e.refresh&&(g={"X-Refresh":"True"}),e.debug&&(g={...g,"X-Debug":"True"}),this.provider==="pro"?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):m=await ce({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(m,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let E=await new Ya(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` `),url:"",options:{}});E&&E.text&&(T=E.text.split(` -`))}return{text:T,from:f[0]&&tA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},E2=Vp;d();var nA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],$p=new Map(nA),Yp=class extends De{static langMap=$p;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:$p.get(r)||r,to:$p.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},C2=Yp;d();var rA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Qp=new Map(rA),Jp=class extends De{static langMap=Qp;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Qp.get(a)||a};r!=="auto"&&(i.from=Qp.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(m=>({text:m}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((m,g)=>{o.append(g,m)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await ce(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(m=>m.translations.map(f=>f.text).join(" "))}}},w2=Jp;d();var aA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],eo=new Map(aA),Zp=class extends De{static langMap=eo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:T,from:f[0]&&tA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},E2=Gp;d();var nA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],$p=new Map(nA),Vp=class extends De{static langMap=$p;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new V("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:$p.get(r)||r,to:$p.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new V(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},C2=Vp;d();var rA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Yp=new Map(rA),Qp=class extends De{static langMap=Yp;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new V("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Yp.get(a)||a};r!=="auto"&&(i.from=Yp.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(m=>({text:m}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((m,g)=>{o.append(g,m)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await ce(c);if(p.length===0)throw new V("server response invalid");return{from:r,to:a,text:p.map(m=>m.translations.map(f=>f.text).join(" "))}}},w2=Qp;d();var aA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],eo=new Map(aA),Jp=class extends De{static langMap=eo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!eo.get(r)?(i=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||eo.get(r)||r,target:eo.get(a)||a})):u.body=JSON.stringify({text:s,source:eo.get(r),target:eo.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},D2=Zp;d();function k2(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function hn(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:m,sourceLanguageUrlPattern:g,immediateTranslationPattern:f}=n,T=m||"zh-CN",b=to(e,o),h=to(e,f),E=s,D=Object.keys(u);for(let ne of D){let re=u[ne];if(to(e,re)){E=ne;break}}let M=l,I=Object.keys(c);for(let ne of I){let re=c[ne];if(re&&to(e,re)){M=ne;break}}let S=to(e,p),y=A2(e,p);y||(y=dt(e,fb)),y||(y=dt(e,n.blockUrls));let L=A2(e,n.inputTranslationUrlPattern);L||(L=dt(e,n.inputTranslationBlockUrls));let A=dt(e,n.mutationBlockUrls),v=Object.keys(g),O={};for(let ne of v){let re=g[ne];if(re&&re.matches)for(let xe of re.matches)O[xe]=ne}let _=Object.keys(O),k=Ap(e,_);k&&(i=O[k]??"auto",O[k]&&O[k]!=="auto"&&qn(O[k]));let N=a.hostname,z=await tr(N),q=a.pathname+a.search+a.hash,F=await tr(q),C=`https://${z}.com/${F}`,P=await Zt(),U=await w3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=E;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=E;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=E;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ue=await Mt.get(Ft,null),ae=!1;ue&&(ae=Jt(ue));let J={targetLanguage:T,config:n,translationService:E,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:A,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:e,encryptedUrl:C,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};ue&&(J.user=ue,ae?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(ne=>!J.config.generalRule.bodyTranslateTags.includes(ne)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[J.translationService]||{};ie.immediateTranslationTextCount!==void 0&&iA(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),J.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&J.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(J.state.translationDebounce=ie.translationDebounce);let ge=U.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>to(e,ne)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let be=n.generalRule;if(Y&&(J.rule=hl(be,Y)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(ne=>!J.rule.bodyTranslateTags.includes(ne)&&!J.rule.forceTranslateTags.includes(ne))),J.rule.mainFrameSelector){let ne=document.querySelector(J.rule.mainFrameSelector);ne&&(J.mainFrame=ne)}return J}function to(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&dt(t,r)?!1:n&&n.length>0&&dt(t,n)?!0:i&&i.length>0&&Il(i)?!1:!!(a&&a.length>0&&Il(a))}function A2(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&dt(t,n)||r&&r.length>0&&Il(r))}function iA(t){return typeof t=="number"}d();d();d();function P2(t){let e=t.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!eo.get(r)?(i=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||eo.get(r)||r,target:eo.get(a)||a})):u.body=JSON.stringify({text:s,source:eo.get(r),target:eo.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new V("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},D2=Jp;d();function k2(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function hn(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:m,sourceLanguageUrlPattern:g,immediateTranslationPattern:f}=n,T=m||"zh-CN",b=to(e,o),h=to(e,f),E=s,D=Object.keys(u);for(let ne of D){let re=u[ne];if(to(e,re)){E=ne;break}}let M=l,I=Object.keys(c);for(let ne of I){let re=c[ne];if(re&&to(e,re)){M=ne;break}}let S=to(e,p),y=A2(e,p);y||(y=dt(e,fb)),y||(y=dt(e,n.blockUrls));let L=A2(e,n.inputTranslationUrlPattern);L||(L=dt(e,n.inputTranslationBlockUrls));let A=dt(e,n.mutationBlockUrls),v=Object.keys(g),O={};for(let ne of v){let re=g[ne];if(re&&re.matches)for(let xe of re.matches)O[xe]=ne}let _=Object.keys(O),k=Dp(e,_);k&&(i=O[k]??"auto",O[k]&&O[k]!=="auto"&&qn(O[k]));let N=a.hostname,z=await tr(N),q=a.pathname+a.search+a.hash,F=await tr(q),C=`https://${z}.com/${F}`,P=await Zt(),U=await w3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=E;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=E;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let $=E;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&($=n.subtitleTranslateService);let ue=await Mt.get(Ft,null),ae=!1;ue&&(ae=Jt(ue));let J={targetLanguage:T,config:n,translationService:E,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:$,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:A,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:e,encryptedUrl:C,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};ue&&(J.user=ue,ae?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(ne=>!J.config.generalRule.bodyTranslateTags.includes(ne)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[J.translationService]||{};ie.immediateTranslationTextCount!==void 0&&iA(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),J.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&J.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(J.state.translationDebounce=ie.translationDebounce);let ge=U.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>to(e,ne)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Te=n.generalRule;if(Y&&(J.rule=hl(Te,Y)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(ne=>!J.rule.bodyTranslateTags.includes(ne)&&!J.rule.forceTranslateTags.includes(ne))),J.rule.mainFrameSelector){let ne=document.querySelector(J.rule.mainFrameSelector);ne&&(J.mainFrame=ne)}return J}function to(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&dt(t,r)?!1:n&&n.length>0&&dt(t,n)?!0:i&&i.length>0&&Il(i)?!1:!!(a&&a.length>0&&Il(a))}function A2(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&dt(t,n)||r&&r.length>0&&Il(r))}function iA(t){return typeof t=="number"}d();d();d();function P2(t){let e=t.split(` `),n=[],r,a="",i="";for(let o of e){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Xp=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Zp=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(e,n,r){if(super(e,n,r),e||(e={}),e.APIKEY){let a=e.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(e.ignoreResRegexs)&&(this.ignoreResReges=e.ignoreResRegexs),e.translationTextSeparator&&(this.translationTextSeparator=e.translationTextSeparator),e.model&&(this.model=e.model),e.systemPrompt&&(this.systemPrompt=e.systemPrompt),e.prompt&&(this.prompt=e.prompt),e.multiplePrompt&&(this.multiplePrompt=e.multiplePrompt),e.subtitlePrompt&&(this.subtitlePrompt=e.subtitlePrompt),e.bodyConfigs&&(this.bodyConfigs=e.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a,options:i}=e;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},p=i?.sourceProgram,m=["subtitle","videoSubtitle"].includes(p),g=[n];i?.rawTextArrayLength&&(g=n.split(this.translationTextSeparator)),g.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),m&&this.subtitlePrompt&&g.length>1&&(s=this.subtitlePrompt);let f="",T="",b=s.includes("{{json}}"),h=s.includes("{{yaml}}");if(b){let I=[],S=c.imt_json_item||"";m&&(S=c.imt_subtitle_json_item||S);for(let y=0;yS==="from"?u:S==="to"?l+" Language":S==="text"?n:S=="json"?f:S=="yaml"?T:c[S]||I).replace(/{{(.+?)}}/g,(I,S)=>c[S]||I);let E=await this.handleOptions(s,e);B.debug("request options",E);let D=await ce(E),M=this.parseResponse(D);if(M=this.filterContent(n,M,s,g),B.debug("filterContent after",M),!b&&!h||!M)return{from:r,to:a,text:M||n};M=oA(n,M),M=_3(M);try{let I={};if(b){B.debug("extractValidJson before",M);let L=this.extractValidJson(M);B.debug("parse before",M),I=uu.parse(L)}else if(h){B.debug("parseYAML before",M);let L=this.extractValidYaml(M);I=P2(L)}let S=c.imt_trans_field;m&&(S=c.imt_sub_trans_field||S);let y=c.imt_source_field;return m&&(y=c.imt_sub_source_field||y),M=this.restoreText(g,I,S,this.translationTextSeparator,y),{from:r,to:a,text:M}}catch(I){return B.error("parse response failed",M,I),{from:r,to:a,text:M}}}extractValidJson(e){let n=e.indexOf("["),r=e.lastIndexOf("]");return n!==-1&&r!==-1?e.slice(n,r+1):""}extractValidYaml(e){let n=e.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=e)}catch(o){B.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},no=Xp;function oA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var sA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],L2=new Map(sA),eg=class extends no{static langMap=L2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=Ut(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=Ut(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return L2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},_2=eg;d();var B2=u6(F2());var M2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],ks=class t extends De{static langMap=new Map(M2);static langMapReverse=new Map(M2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new B2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(E=>`${this.encode(E)}=${this.encode(T[E])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),m=this.SHA1.b64_hmac(`${n}&`,p),g=new URLSearchParams(Object.assign({},l,{Signature:m})).toString(),f=await ce({retry:this.retry,url:`https://${i}.aliyuncs.com?${g}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var uA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},tg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},ng=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=tg(e);if(r)return Array.isArray(n)?`${r}=${n.map(tg).sort().join(`&${r}=`)}`:`${r}=${tg(n)}`}).filter(e=>e).join("&"),ro=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,ng(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await tr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return Jl(await pa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=ng(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} +`)}restoreText(e,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=e)}catch(o){B.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},no=Zp;function oA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var sA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],L2=new Map(sA),Xp=class extends no{static langMap=L2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new V("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new V("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=qt(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=qt(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return L2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},_2=Xp;d();var B2=u6(F2());var M2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Ps=class t extends De{static langMap=new Map(M2);static langMapReverse=new Map(M2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new V("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new B2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(E=>`${this.encode(E)}=${this.encode(T[E])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),m=this.SHA1.b64_hmac(`${n}&`,p),g=new URLSearchParams(Object.assign({},l,{Signature:m})).toString(),f=await ce({retry:this.retry,url:`https://${i}.aliyuncs.com?${g}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new V(f.Message);return f}};d();d();var uA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},eg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},tg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=eg(e);if(r)return Array.isArray(n)?`${r}=${n.map(eg).sort().join(`&${r}=`)}`:`${r}=${eg(n)}`}).filter(e=>e).join("&"),ro=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,tg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await tr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return Jl(await pa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=tg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} `),e.push(this.signedHeaders()),e.push(await this.hexEncodedBodyHash()),e.join(` -`)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new $(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await tr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(ng(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return uA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await pa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await pa(r,i),s=await pa(a,o);return pa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var I2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],rg=new Map(I2),lA=new Map(I2.map(([t,e])=>[e,t])),ag=class extends De{static langMap=rg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new ro(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=rg.get(r),o={TargetLanguage:rg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ro(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(g=>g.Translation),m=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(m=lA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:m,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},R2=ag;d();var O2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ig=new Map(O2),cA=new Map(O2.map(([t,e])=>[e,t])),Ps=class extends De{static langMap=ig;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=ig.get(r)||"detect",o=ig.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=cA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var dA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],og=new Map(dA),Ls=class extends De{static langMap=og;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await ce({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:og.get(r)||r,target_lang:og.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var sg="https://{s}bing.com",j2=sg+"/translator",pA=sg+"/ttranslatev3",gA=sg+"/tspellcheckv3",tc="bingGlobalConfig",H2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],z2=new Map(H2),N2=new Map(H2.map(([t,e])=>[e,t])),U2=1e3,nr,ao;function ug(t,e){return t.replace("{s}",e?e+".":"")}async function mA(){if(!nr){let n=await oe.storage.local.get(tc);return n&&(nr=n[tc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=nr;return Date.now()-t>e}async function q2(){let t,e,n,r,a,i,o,s,u,l;try{let c=ug(j2,t),p=await ce({retry:2,url:c,responseType:"raw"}),{body:m,headers:g,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=g["set-cookie"],e=m.match(/IG:"([^"]+)"/)[1],n=m.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(m.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return nr={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[tc]:nr}),nr}function fA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=nr;return ug(t?gA:pA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+nr.count++:"")}function hA(t,e,n,r){let{token:a,key:i}=nr,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function W2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>U2)throw new Error(`The supported maximum length of text is ${U2}. Please shorten the text.`);ao||(ao=q2()),await ao,await mA()&&(ao=q2(),await ao),e=e||"auto",n=n||"zh-CN",e=z2.get(e)||e,n=z2.get(n)||n;let a=fA(!1),i=hA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:ug(j2,nr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(nr=null,ao=null,await oe.storage.local.remove(tc),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new V(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` +`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await tr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(tg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return uA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await pa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await pa(r,i),s=await pa(a,o);return pa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var I2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ng=new Map(I2),lA=new Map(I2.map(([t,e])=>[e,t])),rg=class extends De{static langMap=ng;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new V("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new ro(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new V(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new V(s.Code,s.Message)}else throw new V("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=ng.get(r),o={TargetLanguage:ng.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ro(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(g=>g.Translation),m=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(m=lA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:m,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new V(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new V(p.Code,p.Message)}else throw new V("response: "+JSON.stringify(c))}},R2=rg;d();var O2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ag=new Map(O2),cA=new Map(O2.map(([t,e])=>[e,t])),Ls=class extends De{static langMap=ag;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=ag.get(r)||"detect",o=ag.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=cA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new V(l.status_code.toString(),l.status_message)}}};d();var dA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ig=new Map(dA),_s=class extends De{static langMap=ig;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new V("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await ce({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:ig.get(r)||r,target_lang:ig.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new V(s.message||s.message||"API Error")}};d();d();var og="https://{s}bing.com",j2=og+"/translator",pA=og+"/ttranslatev3",gA=og+"/tspellcheckv3",tc="bingGlobalConfig",H2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],z2=new Map(H2),N2=new Map(H2.map(([t,e])=>[e,t])),U2=1e3,nr,ao;function sg(t,e){return t.replace("{s}",e?e+".":"")}async function mA(){if(!nr){let n=await oe.storage.local.get(tc);return n&&(nr=n[tc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=nr;return Date.now()-t>e}async function q2(){let t,e,n,r,a,i,o,s,u,l;try{let c=sg(j2,t),p=await ce({retry:2,url:c,responseType:"raw"}),{body:m,headers:g,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=g["set-cookie"],e=m.match(/IG:"([^"]+)"/)[1],n=m.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(m.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return nr={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[tc]:nr}),nr}function fA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=nr;return sg(t?gA:pA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+nr.count++:"")}function hA(t,e,n,r){let{token:a,key:i}=nr,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function W2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>U2)throw new Error(`The supported maximum length of text is ${U2}. Please shorten the text.`);ao||(ao=q2()),await ao,await mA()&&(ao=q2(),await ao),e=e||"auto",n=n||"zh-CN",e=z2.get(e)||e,n=z2.get(n)||n;let a=fA(!1),i=hA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:sg(j2,nr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(nr=null,ao=null,await oe.storage.local.remove(tc),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],m=c[0].detectedLanguage;return{text:p.text,from:N2.get(m.language),to:N2.get(p.to)}}d();var nc=new Map;async function lg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=Ln(t.body)),nc.has(e))return nc.get(e);let n=ce(t);nc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{nc.delete(e)},3e3)}}async function K2(t){return lg(t)}async function rc(t){if(He()){let n=s1();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw B.error("can not comunicate with root frame, use strict limiter",r),r}else return lg(t)}else return lg(t)}d();function G2(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function ac(t){await rp(t)}async function ic(t,e){let n=await ep(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return V2(t,e)}return V2(t,e)}async function V2(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await tp(t,n,i-1e3),n}var bA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],cg=new Map(bA),_s=class extends De{static langMap=cg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await ac(I0)}async translate(e){let{text:n,from:r,to:a}=e;return n?await W2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await ic(I0,async()=>{let e=await rc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return G2(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=cg.get(n)||"auto",o=cg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let m of a)u.push({Text:m});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(m=>m.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var $2=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],dg=new Map($2),TA=new Map($2.map(([t,e])=>[e,t])),pg=class extends De{static langMap=dg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=Ln(a+o+n+i);this.domain&&(l=Ln(a+o+n+this.domain+i));let c=new URLSearchParams({from:dg.get(s)||"auto",to:dg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let m=await ce({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(m.error_code)throw new $("API_SERVER_ERROR",m.error_msg);let{trans_result:g,from:f}=m,T=g.map(({dst:h})=>h);return{from:TA.get(f)||f,to:u,text:T.join(` -`)}}},Y2=pg;d();d();var Qa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,m)=>{let[g,f]=m.split(":"),T=o[g];return f==="random"?yA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function yA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var Q2=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],gg=class extends Qa{static langMap=new Map(Q2);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:Q2,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},J2=gg;d();var vA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],oc=new Map(vA),mg=class extends De{static langMap=oc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!oc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${oc.get(r)||"auto"}2${oc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},Z2=mg;d();var X2=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],fg=new Map(X2),SA=new Map(X2.map(([t,e])=>[e,t]));function xA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var hg=class extends De{static langMap=fg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=EA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+xA(n)+i+o+this.appSecret,u=await tr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:fg.get(r)||"auto",to:fg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),m=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!m.translation)throw new $(JSON.stringify(m));let g=m.l,[f,T]=g.split("2");return{text:m.translation.join(` -`),from:SA.get(f),to:a}}};function EA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var Tg=class extends De{static langMap=bg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:bg.get(r)||"auto",to:bg.get(a)||a},o=new URLSearchParams(i),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},nT=Tg;d();var Fs=class extends Qa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Xo,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var rT="immersive-translate-gemini-fake-user-key",CA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],aT=new Map(CA),yg=class extends no{static langMap=aT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return aT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await X0(rT,""),this.fakeId||(this.fakeId=wA(10),await np(rT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function wA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await rc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":Sg.get(r)+"-"}${Sg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var kA={mock:Xi,mock2:Xi,custom:Fs,google:Ya,transmart:ws,deepl:E2,volc:R2,volcAlpha:Ps,bing:_s,tencent:Es,tenAlpha:Cs,baidu:Y2,caiyun:J2,cai:Z2,openl:Xl,youdao:eT,you:nT,d:Zi,dpro:Zi,deeplx:Ls,niu:C2,azure:w2,openai:_2,gemini:iT,claude:sT,papago:D2,aliyun:ks,yandex:Ms},ga={};Object.keys(gr).forEach(t=>{ga[t]={...gr[t],class:kA[t]}});function sc(t,e){let n=kn;if(ga[t]&&ga[t].class&&ga[t].class.langMap&&ga[t].class.langMap.size>0){let r=ga[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return kn}async function ma(t,e,n){if(!t.text)return t;let r=null,a=await tt({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function uT(t,e){for(let n of t)try{return await ma({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function xg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Jt(t.user);await new ga[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function PA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function tt(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=k2(p,{sourceLanguage:PA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let m=a.beta,g=o.cache===!1&&m,f=a.debug===!0&&m;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(g&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,E=-1,D=Jt(e.user),M;try{M=new ga[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let L={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let A of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||L):y;n(v,null,A)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){E++;let L=l;l==="openl"&&(L=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let A=M.getCacheKeyPrefix();A&&(L=A+"-"+L);let v=null;try{v=await iu(W3({originalText:y.text,from:y.from,to:y.to,service:L}),200)}catch(O){B.warn("query cache DB error, but it's ok",O)}if(v){let O={...y,text:v.translatedText};b.sentences[E]=O,n&&n(null,O,y)}else T.push(y)}else T.push(...t.sentences);let I=T.length;if(h-I>0&&B.debug(`use ${h-I} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,L,A)=>{if(n&&n(y,L,A),!y&&L&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let O=M.getCacheKeyPrefix();O&&(v=O+"-"+v),o.cache&&iu(K3({translatedText:L.text,from:A.from,to:A.to,detectedFrom:L.from,key:Ln(A.text),service:v}),3e3).catch(_=>{B.warn("set cache DB error",_)})}});for(let y of S?.sentences||[]){let L=b.sentences.findIndex(A=>!A);if(L===-1)throw new $("translateFailed","can not match the result");b.sentences[L]=y}return b}d();d();function lT(t){let e=null,n=null,r=t.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:e,articleNode:n};if(r.bodySelector&&(e=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),e||n)return B.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:e,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return B.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new bu(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=LA(s.content,s.textContent),e&&(n=dT(r,e))}catch(i){B.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function cT(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&B.debug("update article node",n),t.articleNode=n)}function Eg(t,e){return e&&t?.contains(e)||!1}function LA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=_A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function _A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function dT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let C=q(F);return C==NodeFilter.FILTER_ACCEPT?pt.mark(F,k,T):C==NodeFilter.FILTER_REJECT,C}),z=v;if(q(z)===NodeFilter.FILTER_REJECT)return;for(pt.mark(z,k,T);z;){if(s=Eg(i,z),c&&c.length>0){let{currentNode:F,isMatchedSelection:C}=M(N,z,c);if(F)z=F;else break;if(!C)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let F=z;if(F.nodeName==="IFRAME"){O&&O(F),I(),Cg(b,!0),z=N.nextNode();continue}F.nodeType===Node.ELEMENT_NODE&&(l&&Dg(F,l),g&&kg(F,g));let C=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},F.immersiveTranslateComputedStyle||null);if(C&&n.paragraphFirstLetterFontSize>0&&F.childNodes.length==1&&F.childNodes[0].nodeType===Node.TEXT_NODE&&F.innerText?.length==1&&F?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(C=!1),Kt(F,u)&&!C){S(F);let H=null;for(;!(H=N.nextSibling())&&N.parentNode(););z=H;continue}let P=$a(F);if(!pT(b,F)||C){I(F);let H=C?F:F.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&F.shadowRoot?.mode==="open"&&(C?O?.(F.shadowRoot):D({...A,container:F.shadowRoot})),F.nodeType===Node.ELEMENT_NODE&&F.nodeName==="PRE"&&p&&OA(F)}else if(z.nodeType===Node.TEXT_NODE)S(z);else throw new Error("should not be here");z=N.nextNode(),b.commonAncestorContainer&&z&&z.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(z)}function q(F){if(F.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Nr(F)){if(g){let H=Object.keys(g);if(H.length>0&&Kt(F,H))for(let W of H){let V=g[W];if(F.matches(W)){let ue=g[W],ae=Object.keys(ue);for(let J of ae){let ie=ue[J];F.getAttribute(J)!==ie&&(ie===null?F.removeAttribute(J):F.setAttribute(J,ie))}break}}}if(!A.force&&pt.isMarked(F,k)||X1(F,k)||lc(F,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||F.nodeName==="IFRAME"&&!ji(F))return NodeFilter.FILTER_REJECT;if(F.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(F);if(F.immersiveTranslateComputedStyle=H,Ag(H))return _&&_(F),NodeFilter.FILTER_REJECT;let j=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Kt(F,u)&&j)return NodeFilter.FILTER_REJECT}let C=F.getBoundingClientRect(),{width:P,height:U}=C;return F.nodeName==="IMG"&&(P>48&&U>48?F.immersiveTranslateComputedStyle={display:"block"}:P>0&&U>0&&f!==!1&&(F.setAttribute("width",P),F.setAttribute("height",U))),!F.childNodes||F.childNodes&&F.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||U>0&&U<4)&&(F.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(F.nodeType===Node.TEXT_NODE){let C=F.textContent?.trim();if(!C)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=F.parentNode;if(P.getBoundingClientRect){let{width:U,height:H}=P.getBoundingClientRect();if(U>0&&U<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return m>0&&C.length>=m&&wg(F,m),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&I();function M(A,v,O){let _=v.immersiveTranslateComputedStyle||null;if(E){if(!E.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function I(A){if(A&&A.nodeName==="BR"){b.commonAncestorContainer=A.parentNode;let O=[...b.flatNodes],_=b.flatNodes.filter(k=>A.parentNode?.contains(k));_.length>0&&O.length!=_.length&&(b.flatNodes=_,b.flatNodes.original=O)}let v=RA(b,a,n);v&&(v.xpath=e2(r,s,v.commonAncestorContainer,i),e&&e(v)),Cg(b)}function S(A){if(!pT(b,A)){I(),Cg(b);let v=A.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(A)}function y(A,v,O){A.commonAncestorContainer=v;let _=L(O);A.isPreWhitespace=_}function L(A){return A&&A.whiteSpace&&A.whiteSpace.startsWith("pre")||A&&A.whiteSpace==="break-spaces"||!1}}function pT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=$a(e));let r=IA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function MA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function BA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Dg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function IA(t){return t&&t._currentStacks?t._currentStacks.some(e=>$a(e)):!1}function RA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(g=>g.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=zA(r,a,n);o||(o=a);let s=[];for(let g of r){let f=BA(t,o,g);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,m=0;for(;p&&(c.push(p),p!==l);){if(m++,m>FA){B.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Cg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Ag(t){return t.display==="none"}var pt={_marked_key:X4,isMarked(t,e){return vp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||$a(t)))return Rl(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)pt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||$a(t)))return lt(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=qi(t,"markWalk")||"";return lt(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||$a(t)):!1}};function OA(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function zA(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Cn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function wg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&wg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=c1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function mT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let m of c){let g=l[m];if(m==="translate"&&g==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||NA(p,a,i,o)||!p1(T,n,r))continue}p.getAttribute(m)!==g&&(g===null?p.removeAttribute(m):p.setAttribute(m,g))}}}function kg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function lc(t,e){return Kt(t,e.excludeSelectors||[])?Kt(t,e.selectors||[])?!1:!Kt(t,e.stayOriginalSelectors||[]):!1}function uc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Kt(t,e.concat(n))}function NA(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&lc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ni(o,e,n))return!0}}return!1}d();d();d();function fT(t,e,n,r,a){let i=e,o=cb[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let m=n[p];if(["borderRadius"].includes(p)&&(m+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${m}; + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],m=c[0].detectedLanguage;return{text:p.text,from:N2.get(m.language),to:N2.get(p.to)}}d();var nc=new Map;async function ug(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=Ln(t.body)),nc.has(e))return nc.get(e);let n=ce(t);nc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{nc.delete(e)},3e3)}}async function K2(t){return ug(t)}async function rc(t){if(He()){let n=s1();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw B.error("can not comunicate with root frame, use strict limiter",r),r}else return ug(t)}else return ug(t)}d();function G2(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function ac(t){await np(t)}async function ic(t,e){let n=await X0(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return $2(t,e)}return $2(t,e)}async function $2(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await ep(t,n,i-1e3),n}var bA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],lg=new Map(bA),Fs=class extends De{static langMap=lg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await ac(B0)}async translate(e){let{text:n,from:r,to:a}=e;return n?await W2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await ic(B0,async()=>{let e=await rc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return G2(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=lg.get(n)||"auto",o=lg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let m of a)u.push({Text:m});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(m=>m.translations[0]?.text||""),from:n,to:r};throw new V("Microsoft translate error "+JSON.stringify(p))}};d();var V2=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],cg=new Map(V2),TA=new Map(V2.map(([t,e])=>[e,t])),dg=class extends De{static langMap=cg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new V("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=Ln(a+o+n+i);this.domain&&(l=Ln(a+o+n+this.domain+i));let c=new URLSearchParams({from:cg.get(s)||"auto",to:cg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let m=await ce({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(m.error_code)throw new V("API_SERVER_ERROR",m.error_msg);let{trans_result:g,from:f}=m,T=g.map(({dst:h})=>h);return{from:TA.get(f)||f,to:u,text:T.join(` +`)}}},Y2=dg;d();d();var Qa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new V(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new V("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new V(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,m)=>{let[g,f]=m.split(":"),T=o[g];return f==="random"?yA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function yA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var Q2=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],pg=class extends Qa{static langMap=new Map(Q2);constructor(e,n,r){if(!e?.token)throw new V("token are required");super({...e,isSupportList:!0,langs:Q2,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},J2=pg;d();var vA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],oc=new Map(vA),gg=class extends De{static langMap=oc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!oc.get(a))throw new V(`Unsupported language: ${a}`);if(r==="auto")throw new V("Unsupported language: auto");let o=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${oc.get(r)||"auto"}2${oc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},Z2=gg;d();var X2=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],mg=new Map(X2),SA=new Map(X2.map(([t,e])=>[e,t]));function xA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var fg=class extends De{static langMap=mg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new V("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=EA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+xA(n)+i+o+this.appSecret,u=await tr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:mg.get(r)||"auto",to:mg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),m=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!m.translation)throw new V(JSON.stringify(m));let g=m.l,[f,T]=g.split("2");return{text:m.translation.join(` +`),from:SA.get(f),to:a}}};function EA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var bg=class extends De{static langMap=hg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:hg.get(r)||"auto",to:hg.get(a)||a},o=new URLSearchParams(i),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new V("Youdao translation failed: "+JSON.stringify(s))}},nT=bg;d();var Ms=class extends Qa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||es,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var rT="immersive-translate-gemini-fake-user-key",CA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],aT=new Map(CA),Tg=class extends no{static langMap=aT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return aT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Z0(rT,""),this.fakeId||(this.fakeId=wA(10),await tp(rT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function wA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await rc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":vg.get(r)+"-"}${vg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var kA={mock:Xi,mock2:Xi,custom:Ms,google:Ya,transmart:Ds,deepl:E2,volc:R2,volcAlpha:Ls,bing:Fs,tencent:Cs,tenAlpha:ws,baidu:Y2,caiyun:J2,cai:Z2,openl:Xl,youdao:eT,you:nT,d:Zi,dpro:Zi,deeplx:_s,niu:C2,azure:w2,openai:_2,gemini:iT,claude:sT,papago:D2,aliyun:Ps,yandex:Bs},ga={};Object.keys(gr).forEach(t=>{ga[t]={...gr[t],class:kA[t]}});function sc(t,e){let n=kn;if(ga[t]&&ga[t].class&&ga[t].class.langMap&&ga[t].class.langMap.size>0){let r=ga[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return kn}async function ma(t,e,n){if(!t.text)return t;let r=null,a=await Ze({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new V("translateFailed","translate failed")}async function uT(t,e){for(let n of t)try{return await ma({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Sg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Jt(t.user);await new ga[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function PA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Ze(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=k2(p,{sourceLanguage:PA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let m=a.beta,g=o.cache===!1&&m,f=a.debug===!0&&m;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(g&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,E=-1,D=Jt(e.user),M;try{M=new ga[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let L={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let A of T){let v=y instanceof V?new V(y.name,y.message).initNetWork(y.status).initData(y.data||L):y;n(v,null,A)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){E++;let L=l;l==="openl"&&(L=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let A=M.getCacheKeyPrefix();A&&(L=A+"-"+L);let v=null;try{v=await iu(W3({originalText:y.text,from:y.from,to:y.to,service:L}),200)}catch(O){B.warn("query cache DB error, but it's ok",O)}if(v){let O={...y,text:v.translatedText};b.sentences[E]=O,n&&n(null,O,y)}else T.push(y)}else T.push(...t.sentences);let I=T.length;if(h-I>0&&B.debug(`use ${h-I} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,L,A)=>{if(n&&n(y,L,A),!y&&L&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let O=M.getCacheKeyPrefix();O&&(v=O+"-"+v),o.cache&&iu(K3({translatedText:L.text,from:A.from,to:A.to,detectedFrom:L.from,key:Ln(A.text),service:v}),3e3).catch(_=>{B.warn("set cache DB error",_)})}});for(let y of S?.sentences||[]){let L=b.sentences.findIndex(A=>!A);if(L===-1)throw new V("translateFailed","can not match the result");b.sentences[L]=y}return b}d();d();function lT(t){let e=null,n=null,r=t.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:e,articleNode:n};if(r.bodySelector&&(e=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),e||n)return B.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:e,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return B.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new bu(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=LA(s.content,s.textContent),e&&(n=dT(r,e))}catch(i){B.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function cT(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&B.debug("update article node",n),t.articleNode=n)}function xg(t,e){return e&&t?.contains(e)||!1}function LA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=_A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function _A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function dT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let C=q(F);return C==NodeFilter.FILTER_ACCEPT?pt.mark(F,k,T):C==NodeFilter.FILTER_REJECT,C}),z=v;if(q(z)===NodeFilter.FILTER_REJECT)return;for(pt.mark(z,k,T);z;){if(s=xg(i,z),c&&c.length>0){let{currentNode:F,isMatchedSelection:C}=M(N,z,c);if(F)z=F;else break;if(!C)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let F=z;if(F.nodeName==="IFRAME"){O&&O(F),I(),Eg(b,!0),z=N.nextNode();continue}F.nodeType===Node.ELEMENT_NODE&&(l&&wg(F,l),g&&Ag(F,g));let C=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},F.immersiveTranslateComputedStyle||null);if(C&&n.paragraphFirstLetterFontSize>0&&F.childNodes.length==1&&F.childNodes[0].nodeType===Node.TEXT_NODE&&F.innerText?.length==1&&F?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(C=!1),Gt(F,u)&&!C){S(F);let H=null;for(;!(H=N.nextSibling())&&N.parentNode(););z=H;continue}let P=Va(F);if(!pT(b,F)||C){I(F);let H=C?F:F.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&F.shadowRoot?.mode==="open"&&(C?O?.(F.shadowRoot):D({...A,container:F.shadowRoot})),F.nodeType===Node.ELEMENT_NODE&&F.nodeName==="PRE"&&p&&OA(F)}else if(z.nodeType===Node.TEXT_NODE)S(z);else throw new Error("should not be here");z=N.nextNode(),b.commonAncestorContainer&&z&&z.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(z)}function q(F){if(F.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Nr(F)){if(g){let H=Object.keys(g);if(H.length>0&&Gt(F,H))for(let W of H){let $=g[W];if(F.matches(W)){let ue=g[W],ae=Object.keys(ue);for(let J of ae){let ie=ue[J];F.getAttribute(J)!==ie&&(ie===null?F.removeAttribute(J):F.setAttribute(J,ie))}break}}}if(!A.force&&pt.isMarked(F,k)||X1(F,k)||lc(F,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||F.nodeName==="IFRAME"&&!ji(F))return NodeFilter.FILTER_REJECT;if(F.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(F);if(F.immersiveTranslateComputedStyle=H,Dg(H))return _&&_(F),NodeFilter.FILTER_REJECT;let j=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Gt(F,u)&&j)return NodeFilter.FILTER_REJECT}let C=F.getBoundingClientRect(),{width:P,height:U}=C;return F.nodeName==="IMG"&&(P>48&&U>48?F.immersiveTranslateComputedStyle={display:"block"}:P>0&&U>0&&f!==!1&&(F.setAttribute("width",P),F.setAttribute("height",U))),!F.childNodes||F.childNodes&&F.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||U>0&&U<4)&&(F.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(F.nodeType===Node.TEXT_NODE){let C=F.textContent?.trim();if(!C)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=F.parentNode;if(P.getBoundingClientRect){let{width:U,height:H}=P.getBoundingClientRect();if(U>0&&U<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return m>0&&C.length>=m&&Cg(F,m),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&I();function M(A,v,O){let _=v.immersiveTranslateComputedStyle||null;if(E){if(!E.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function I(A){if(A&&A.nodeName==="BR"){b.commonAncestorContainer=A.parentNode;let O=[...b.flatNodes],_=b.flatNodes.filter(k=>A.parentNode?.contains(k));_.length>0&&O.length!=_.length&&(b.flatNodes=_,b.flatNodes.original=O)}let v=RA(b,a,n);v&&(v.xpath=e2(r,s,v.commonAncestorContainer,i),e&&e(v)),Eg(b)}function S(A){if(!pT(b,A)){I(),Eg(b);let v=A.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(A)}function y(A,v,O){A.commonAncestorContainer=v;let _=L(O);A.isPreWhitespace=_}function L(A){return A&&A.whiteSpace&&A.whiteSpace.startsWith("pre")||A&&A.whiteSpace==="break-spaces"||!1}}function pT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Va(e));let r=IA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function MA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function BA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function wg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function IA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Va(e)):!1}function RA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(g=>g.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=zA(r,a,n);o||(o=a);let s=[];for(let g of r){let f=BA(t,o,g);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,m=0;for(;p&&(c.push(p),p!==l);){if(m++,m>FA){B.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Eg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Dg(t){return t.display==="none"}var pt={_marked_key:X4,isMarked(t,e){return yp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Va(t)))return Rl(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)pt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Va(t)))return lt(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=qi(t,"markWalk")||"";return lt(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Va(t)):!1}};function OA(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function zA(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Cn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Cg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Cg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=c1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function mT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let m of c){let g=l[m];if(m==="translate"&&g==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||NA(p,a,i,o)||!p1(T,n,r))continue}p.getAttribute(m)!==g&&(g===null?p.removeAttribute(m):p.setAttribute(m,g))}}}function Ag(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function lc(t,e){return Gt(t,e.excludeSelectors||[])?Gt(t,e.selectors||[])?!1:!Gt(t,e.stayOriginalSelectors||[]):!1}function uc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Gt(t,e.concat(n))}function NA(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&lc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ni(o,e,n))return!0}}return!1}d();d();d();function fT(t,e,n,r,a){let i=e,o=cb[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let m=n[p];if(["borderRadius"].includes(p)&&(m+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${m}; `,e==="marker"&&p==="backgroundColor"&&typeof m=="string"){let{r:g,g:f,b:T}=y1(m);s+=`--immersive-translate-theme-${i}-${p}-rgb: ${g}, ${f}, ${T}; `}}}),r||(r="inherit"),t&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5469,9 +5469,9 @@ ${s}} `):e.rule.injectedCss&&(s+=e.rule.injectedCss),e.rule.additionalInjectedCss&&Array.isArray(e.rule.additionalInjectedCss)&&e.rule.additionalInjectedCss.length>0?s+=` `+e.rule.additionalInjectedCss.join(` `):e.rule.additionalInjectedCss&&(s+=` -`+e.rule.additionalInjectedCss)),s&&En(t,s,"immersive-translate-dynamic-injected-css")}d();async function hT(){let t="auto",e=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Ui(document.body),pageLangs:e})),t}d();d();function bT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Yu)||Pg(t).catch(i=>{B.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var cc="";async function Pg(t){let e=document.title;if(!e||e.includes(Yu))return;cc!==e&&(cc=e);let n=await Ie({text:e,pageLangs:[vt(),"en"]});if(!Vi(t,n))try{let r=await ma({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Yu+cc)}catch(r){throw r}}function TT(t){t.rule.isTranslateTitle&&(document.title=cc)}function oo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function on(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var UA={sanitize:t=>t};function Mg(t,e){if(t.interruptEffectDOM)return;let n=on(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:Za.bind(null,t),onFrame:r=>{_g(t,r,!0)},onIgnoreElement:r=>{pt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),di&<(e,"consumeContainer",t.id)}function _g(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!ji(e))return;B.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(Ja(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else B.debug("onFrame shadowRoot",e.host),Ja(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ja(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=on(e.ctx),i=0;if(u(e,t,n))return;if(Nr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(Nr(c)&&(r&&Dg(c,r),a&&kg(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){pt.clearMark(l),i++,e.immediateTranslateCapacity>=0?Mg(e,l):(di&<(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return _g(e,l.shadowRoot,n),!1;if(c==="iframe")return _g(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return uc(l,p.selectors);if(p.pageHeight){let m=l.scrollHeight;if(m>0&&m0)return!0}return!1}function u(l,c,p){if(cT(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&pt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let g=on(l.ctx);return!!lc(c,{excludeSelectors:g.excludeSelectors,selectors:g.selectors,stayOriginalSelectors:g.stayOriginalSelectors})}}function Bs(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!pt.isSkipMarkEle(r)&&!pt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(dc(t.rootNodes),vT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Lg(t.rootNodes);if(dc(t.rootNodes),yT(o))return;so(o,r,t.targetNodes||[]),vT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];so(o,r,t.rootNodes||[]),ST(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Lg(t.rootNodes);if(yT(o))return;so(o,r,t.targetNodes||[]),ST(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Lg(t.targetNodes);dc(t.targetNodes),so(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&dc(t.targetNodes),Rg(t)}catch(o){B.error(o)}}}function yT(t){return!t||!Nr(t)?!1:t.classList.contains(yt)}function vT(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{lt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ST(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=qi(r,"immersiveTranslateClassBak");Rl(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Lg(t){return t?t[t.length-1].nextSibling:null}function dc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function so(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var qA=ko(pc,300);async function Za(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||jA(e.rootNodes)||e.stepState>=2)return;e.stepState=2,di&<(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Va(i),u=Vl(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:$A(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Ig(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:fr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(B.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),HA(t,e.text),Bg(t,e,r)):(di&<(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function jA(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?Nr(e)&&e.classList.contains(yt):!1}function HA(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Bg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),di&<(e.commonAncestorContainer,"consumeParagraph",t.id),lt(e.commonAncestorContainer,eb,"1",!0),n=="hover"){pc.call(t,t.ctx);return}qA.call(t,t.ctx)}async function pc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await tt(r,e,(a,i,o)=>{let s=o.id,u=WA(t,s.toString());u&&KA.call(null,a,i,o,u,e,n)})}catch(a){B.error("translateCurrentQueue error",a);return}}function WA(t,e){return t.find(n=>n.id===e)}function KA(t,e,n,r,a,i){let o=!1,s=r;if($i(s.commonAncestorContainer,n.id)?.remove(),Rg(r),s&&(t||!e)){t||(B.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);lt(c,ab,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(so(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let m=GA(a,t).replaceAll(` +`+e.rule.additionalInjectedCss)),s&&En(t,s,"immersive-translate-dynamic-injected-css")}d();async function hT(){let t="auto",e=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Ui(document.body),pageLangs:e})),t}d();d();function bT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Yu)||kg(t).catch(i=>{B.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var cc="";async function kg(t){let e=document.title;if(!e||e.includes(Yu))return;cc!==e&&(cc=e);let n=await Ie({text:e,pageLangs:[vt(),"en"]});if(!$i(t,n))try{let r=await ma({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Yu+cc)}catch(r){throw r}}function TT(t){t.rule.isTranslateTitle&&(document.title=cc)}function oo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function on(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var UA={sanitize:t=>t};function Fg(t,e){if(t.interruptEffectDOM)return;let n=on(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:Za.bind(null,t),onFrame:r=>{Lg(t,r,!0)},onIgnoreElement:r=>{pt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),di&<(e,"consumeContainer",t.id)}function Lg(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!ji(e))return;B.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(Ja(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else B.debug("onFrame shadowRoot",e.host),Ja(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ja(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=on(e.ctx),i=0;if(u(e,t,n))return;if(Nr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(Nr(c)&&(r&&wg(c,r),a&&Ag(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){pt.clearMark(l),i++,e.immediateTranslateCapacity>=0?Fg(e,l):(di&<(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Lg(e,l.shadowRoot,n),!1;if(c==="iframe")return Lg(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return uc(l,p.selectors);if(p.pageHeight){let m=l.scrollHeight;if(m>0&&m0)return!0}return!1}function u(l,c,p){if(cT(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&pt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let g=on(l.ctx);return!!lc(c,{excludeSelectors:g.excludeSelectors,selectors:g.selectors,stayOriginalSelectors:g.stayOriginalSelectors})}}function Is(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!pt.isSkipMarkEle(r)&&!pt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(dc(t.rootNodes),vT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Pg(t.rootNodes);if(dc(t.rootNodes),yT(o))return;so(o,r,t.targetNodes||[]),vT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];so(o,r,t.rootNodes||[]),ST(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Pg(t.rootNodes);if(yT(o))return;so(o,r,t.targetNodes||[]),ST(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Pg(t.targetNodes);dc(t.targetNodes),so(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&dc(t.targetNodes),Ig(t)}catch(o){B.error(o)}}}function yT(t){return!t||!Nr(t)?!1:t.classList.contains(yt)}function vT(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{lt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ST(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=qi(r,"immersiveTranslateClassBak");Rl(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Pg(t){return t?t[t.length-1].nextSibling:null}function dc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function so(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var qA=Po(pc,300);async function Za(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||jA(e.rootNodes)||e.stepState>=2)return;e.stepState=2,di&<(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=$a(i),u=$l(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:VA(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Bg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:fr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(B.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),HA(t,e.text),Mg(t,e,r)):(di&<(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function jA(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?Nr(e)&&e.classList.contains(yt):!1}function HA(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Mg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),di&<(e.commonAncestorContainer,"consumeParagraph",t.id),lt(e.commonAncestorContainer,eb,"1",!0),n=="hover"){pc.call(t,t.ctx);return}qA.call(t,t.ctx)}async function pc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Ze(r,e,(a,i,o)=>{let s=o.id,u=WA(t,s.toString());u&&KA.call(null,a,i,o,u,e,n)})}catch(a){B.error("translateCurrentQueue error",a);return}}function WA(t,e){return t.find(n=>n.id===e)}function KA(t,e,n,r,a,i){let o=!1,s=r;if(Vi(s.commonAncestorContainer,n.id)?.remove(),Ig(r),s&&(t||!e)){t||(B.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);lt(c,ab,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(so(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let m=GA(a,t).replaceAll(` `,"").replaceAll('"',"""),g=t.message.replaceAll(` -`,"").replaceAll('"',"""),f=mr(zt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=mr(zt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+g,b=mr(zt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=mr(zt,"error.reason",a.config.interfaceLanguage,"zh-CN"),E=`<${u.targetWrapperTag} class="${Q}-error notranslate"> +`,"").replaceAll('"',"""),f=mr(Nt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=mr(Nt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+g,b=mr(Nt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=mr(Nt,"error.reason",a.config.interfaceLanguage,"zh-CN"),E=`<${u.targetWrapperTag} class="${Q}-error notranslate"> <${u.targetWrapperTag} class="${Q}-error-wrapper"> @@ -5486,17 +5486,17 @@ ${s}} ${h} - `;c.innerHTML=Ye.sanitize(E)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=i2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",yt),oo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(dr,"1");let p=UA.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Bs(r,i)}o=!0}else B.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Ig(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[vt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!Ss({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=El();n.isDetectParagraphLanguage&&(u="auto");let l=vt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Ju.includes(t.translationService)&&(ye()||et())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return na(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>na(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function Is(){Fg=0}var Fg=0;function GA(t,e){Fg+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),Fg!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(qa,{detail:r}))}return n}function Rg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,VA(e,`[${tb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function VA(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function $A(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();var YA=[];function xT(t){YA.push(t)}d();var Og;function ET(t){let e=t.ctx.rule.aiRule;if(B.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=on(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{Rs(t,i,e,r)}),Og=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Cn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||Ng(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Rs(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Yi(r,u.parentElement);c&&(pt.clearToParentMark(u,c),Rs(t,c,e,r));continue}Rs(t,u,e,r)}catch(u){B.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{pt.isMarked(o,t.id)||Rs(t,o,e,r)})}),Og.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Rs(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&zg(e),Ur({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{Za(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function CT(){Og?.disconnect()}d();d();d();d();d();d();var uo={},QA={root:"",lang:"en",fallbackLang:"en"};function Ug(t,e){let n=Object.assign({},QA,t);uo=e||uo;let[r,a]=se(n.lang),[i,o]=se(uo),[s,u]=se(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let m=l3(n.root||"",p);n.getUrl&&(m=n.getUrl(n.root||"",p),fetch(m).then(g=>g.json()).then(g=>{uo[p]=g,o({...uo}),u(!0)}).catch(g=>{o({...uo}),u(!0)}))};return Ae(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,m)=>{if(!i.hasOwnProperty(r))return p;let g=is(i,r,p);return g===p&&r!==n.fallbackLang&&(g=is(i,n.fallbackLang,p)),ap(g,m)},isReady:s}}d();d();var JA=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--JA,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var jg=Gi(null),qg={root:"assets",lang:"en",fallbackLang:"en"},mc=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Ug({root:t.root||qg.root,lang:t.lang||qg.lang,fallbackLang:t.fallbackLang||qg.fallbackLang,getUrl:t.getUrl},t.translations);return w(jg.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function Ce(){return Kl(jg)}d();function fc({parent:t,ctx:e,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||Q+n.name;t.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&En(l,a),t.appendChild(u),Ki(w(mc,{lang:e.config.interfaceLanguage,fallbackLang:"zh-CN",translations:zt,children:w(n,{...r})}),l)}d();d();d();function lo(t){return fa(t).subtitles}function fa(t){let e=[],n=t.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${tm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`${n}`,r},Ik=t=>/]*>[\s\S]*]*>/.test(t),ay=Wt({name:ry,build:Bk,detect:Ik,helper:tm,parse:Mk});d();var Rk="srt",Us={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Ok=(t,e)=>{let n=[],r=e.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${e.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${tm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`
${n}`,r},Ik=t=>/]*>[\s\S]*]*>/.test(t),ay=Kt({name:ry,build:Bk,detect:Ik,helper:tm,parse:Mk});d();var Rk="srt",Us={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Ok=(t,e)=>{let n=[],r=e.eol||`\r `,a=t.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Us.toMilliseconds(s[2]),u.end=Us.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}e.verbose}return n},zk=(t,e)=>{let n="",r=e.eol||`\r -`;for(let a=0;a ${Us.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},Nk=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),iy=Wt({name:Rk,build:zk,detect:Nk,helper:Us,parse:Ok});d();var Uk="sub",nm=25,qk=(t,e)=>{e.fps||=nm;let n=e.fps>0?e.fps:nm,r=[],a=e.eol||`\r +`;for(let a=0;a ${Us.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},Nk=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),iy=Kt({name:Rk,build:zk,detect:Nk,helper:Us,parse:Ok});d();var Uk="sub",nm=25,qk=(t,e)=>{e.fps||=nm;let n=e.fps>0?e.fps:nm,r=[],a=e.eol||`\r `,i=t.split(/\r?\n/g);for(let o=0;o{let n=(e.fps||0)>0?e.fps:nm,r="",a=e.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Hk=t=>/^\{\d+\}\{\d+\}.*/.test(t),oy=Wt({name:Uk,build:jk,detect:Hk,parse:qk});d();var Wk="vtt",qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Kk=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=qs.toMilliseconds(s[2]),l.end=qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},Gk=(t,e)=>{let n=e.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},Vk=t=>/^\s*WEBVTT\r?\n/.test(t),sy=Wt({name:Wk,build:Gk,detect:Vk,helper:qs,parse:Kk});var $k={vtt:sy,lrc:ty,smi:ay,ssa:ZT,ass:XT,sub:oy,srt:iy,sbv:ny,json:ey},uy=$k;var Yk=t=>JSON.parse(JSON.stringify(t)),rm=class{format=uy;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` -`),pageLangs:[ht(),"en"]});if(ot(Te(o),this.ctx.targetLanguage))return null;qe(this.ctx,Te(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),js.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};d();var Oc=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` -`),pageLangs:[ht(),"en"]});return ot(Te(o),this.ctx.targetLanguage)?null:(qe(this.ctx,Te(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),Te(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var zc=class extends je{hasSubtitle=!1;async mutationVideoChange(){let e=Qk(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,qr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await ce({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return js.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){B.error("fetchSubtitle",n);return}}};function Qk(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var Jk={youtube:xc,netflix:Ec,webvtt:po,khanacademy:Cc,bilibili:wc,udemy:Dc,hulu:Mc,text_track:ba,text_track_dynamic:mo,general:Ac,live:go,ebutt:Lc,disneyplus:_c,"fmp4.xml":Fc,multi_attach_vtt:Bc,twitter:Ic,subsrt:Rc,xml:Oc,av:zc},Nc;function cy(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=Jk[e.type];if(!n)return;Nc=new n(t)}catch(e){B.error(e)}}async function am(){Nc?.onPageStatusChange()}async function Zk(t,e){if(Nc?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&He())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),it("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function Xk(){Nc?.onTranslationModeChanged()}U3({autoEnableSubtitleChanged:Zk,reloadSubtitleWithTranslationModeChanged:Xk});var pe=null;function Hs(){return pe||null}function fo(t){e5(t),s5(t),a5(t),o5(t),io(document,t),gn("Translated"),i5(pe),r5(pe),xT(ti),t5(pe),am(),f5()}function e5(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=on(t);mT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}oo(t)&<(document.documentElement,me+"_rtl",t.targetLanguage)}function t5(t){ET(t)}function n5(){CT()}function r5(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=lT(t.ctx);if(B.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&Ja(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Ja(i,t)})}async function a5(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Zt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Xt({...e,tempTranslationUrlMatches:[...i]})}}function i5(t){t.ctx.rule.isTranslateTitle&&(Pg(t.ctx),t.titleDynamicObserver=bT(t.ctx))}function o5(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function im(t){if(!pe)return;let e=on(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function s5(t){let e=gs();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],im(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||g5(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||m5(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||c5(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||d5(pe),pe.injectCssToDocument=Uc,pe.walkContainer=Ur,pe.allInlineWindows=[window],window.onerror=l5(pe,t),window.immersiveTranslateSwitchTranslateState=sm.bind(pe)}function my(t,e){e.getRootNode()instanceof ShadowRoot?Uc(e.getRootNode(),t):Uc(e.ownerDocument,t),u5(t)}function u5(t){pe||(pe={},pe.ctx=t,pe.id=gs(),om(pe,t))}function om(t,e){t.paragraphQueue=[],t.injectCssToDocument=Uc;let n=on(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=sm.bind(t),t}function ti(t=!0){pe&&(gn("Original"),am(),n5(),Is(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),TT(pe.ctx),Q1(),J1(),t&&sm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function l5(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),ti(),n=setTimeout(()=>{fo(e)},t.urlChangeDelay||2e3)),!0}}function c5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(Mg(t,r.target),n.unobserve(r.target))})})}function d5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Bg(t,o)}),n.unobserve(a)}})})}var dy;function p5(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(dy),t.translateState=="original"?!1:(ti(t.urlChangeDelay>20),dy=setTimeout(()=>{let a=t.ctx;fo(a)},t.urlChangeDelay),!0)):!1}function g5(t){let e=t.ctx.rule,n=on(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&p5(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!Cn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&Cn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Qu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&py(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&Ng(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&py(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!pt.isSkipMarkEle(a.target)&&!pt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Yi(n,i.parentElement);u&&(pt.clearToParentMark(i,u),gy(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Kt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:i.contains(u)).length&&gy(t,a.target)}catch(i){B.error(i)}}})}function py(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Kt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{zg(n),Ur({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{Za(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function gy(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;pt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Ja(e,t,n),i.timer=null},a)}function zg(t){t.paragraphs=[],pt.clearMark(t),t.querySelectorAll("."+yt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,pt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function Ng(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Kt(n,["."+yt]))).length==0}function m5(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Ag(i)||(n.unobserve(r.target),pt.clearMark(a),Ja(a,t))}})}function sm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Bs(e,t)}),t=="original"&&document.querySelectorAll(`.${yt}`).forEach(e=>e.remove())}function Uc(t,e){if(t instanceof HTMLIFrameElement){io(t.contentDocument,e);return}io(t,e)}async function fy(t){let e=He(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Sp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Ui(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ht(),"en"]}))}else if(e)n=await Ie({text:Ui(t.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Sp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await H3();return n==="auto"&&(n=await hT()),O3(n),n}async function hy(){if(!pe)return;Is(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${Vu}='${n}']`);i&&i.remove()}}pc.call(pe,pe.ctx)}async function um(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),it("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:vt()});let r=pe?.ctx||e,a=await Zt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(g=>{[...i?.querySelectorAll(g),...s?.querySelectorAll(g)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?n2():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(g=>{p+=`${g}="${globalThis.document.documentElement.getAttribute(g)}" `});let m="";globalThis.document.body.getAttributeNames().forEach(g=>{m+=`${g}="${globalThis.document.body.getAttribute(g)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Hk=t=>/^\{\d+\}\{\d+\}.*/.test(t),oy=Kt({name:Uk,build:jk,detect:Hk,parse:qk});d();var Wk="vtt",qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Kk=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=qs.toMilliseconds(s[2]),l.end=qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},Gk=(t,e)=>{let n=e.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},$k=t=>/^\s*WEBVTT\r?\n/.test(t),sy=Kt({name:Wk,build:Gk,detect:$k,helper:qs,parse:Kk});var Vk={vtt:sy,lrc:ty,smi:ay,ssa:ZT,ass:XT,sub:oy,srt:iy,sbv:ny,json:ey},uy=Vk;var Yk=t=>JSON.parse(JSON.stringify(t)),rm=class{format=uy;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` +`),pageLangs:[ht(),"en"]});if(nt(he(o),this.ctx.targetLanguage))return null;qe(this.ctx,he(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),js.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};d();var Rc=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` +`),pageLangs:[ht(),"en"]});return nt(he(o),this.ctx.targetLanguage)?null:(qe(this.ctx,he(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),he(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var Oc=class extends je{hasSubtitle=!1;async mutationVideoChange(){let e=Qk(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,qr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await ce({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return js.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){B.error("fetchSubtitle",n);return}}};function Qk(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var Jk={youtube:Sc,netflix:xc,webvtt:go,khanacademy:Ec,bilibili:Cc,udemy:wc,hulu:Fc,text_track:ba,text_track_dynamic:fo,general:Dc,live:mo,ebutt:Pc,disneyplus:Lc,"fmp4.xml":_c,multi_attach_vtt:Mc,twitter:Bc,subsrt:Ic,xml:Rc,av:Oc},zc;function cy(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=Jk[e.type];if(!n)return;zc=new n(t)}catch(e){B.error(e)}}async function am(){zc?.onPageStatusChange()}async function Zk(t,e){if(zc?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&He())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),ot("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function Xk(){zc?.onTranslationModeChanged()}U3({autoEnableSubtitleChanged:Zk,reloadSubtitleWithTranslationModeChanged:Xk});var pe=null;function Hs(){return pe||null}function ho(t){e5(t),s5(t),a5(t),o5(t),io(document,t),gn("Translated"),i5(pe),r5(pe),xT(ti),t5(pe),am(),f5()}function e5(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=on(t);mT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}oo(t)&<(document.documentElement,me+"_rtl",t.targetLanguage)}function t5(t){ET(t)}function n5(){CT()}function r5(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=lT(t.ctx);if(B.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&Ja(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Ja(i,t)})}async function a5(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Zt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Xt({...e,tempTranslationUrlMatches:[...i]})}}function i5(t){t.ctx.rule.isTranslateTitle&&(kg(t.ctx),t.titleDynamicObserver=bT(t.ctx))}function o5(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function im(t){if(!pe)return;let e=on(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function s5(t){let e=ms();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],im(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||g5(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||m5(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||c5(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||d5(pe),pe.injectCssToDocument=Nc,pe.walkContainer=Ur,pe.allInlineWindows=[window],window.onerror=l5(pe,t),window.immersiveTranslateSwitchTranslateState=sm.bind(pe)}function my(t,e){e.getRootNode()instanceof ShadowRoot?Nc(e.getRootNode(),t):Nc(e.ownerDocument,t),u5(t)}function u5(t){pe||(pe={},pe.ctx=t,pe.id=ms(),om(pe,t))}function om(t,e){t.paragraphQueue=[],t.injectCssToDocument=Nc;let n=on(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=sm.bind(t),t}function ti(t=!0){pe&&(gn("Original"),am(),n5(),Rs(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),TT(pe.ctx),Q1(),J1(),t&&sm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function l5(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),ti(),n=setTimeout(()=>{ho(e)},t.urlChangeDelay||2e3)),!0}}function c5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(Fg(t,r.target),n.unobserve(r.target))})})}function d5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Mg(t,o)}),n.unobserve(a)}})})}var dy;function p5(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(dy),t.translateState=="original"?!1:(ti(t.urlChangeDelay>20),dy=setTimeout(()=>{let a=t.ctx;ho(a)},t.urlChangeDelay),!0)):!1}function g5(t){let e=t.ctx.rule,n=on(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&p5(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!Cn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&Cn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Qu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&py(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&zg(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&py(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!pt.isSkipMarkEle(a.target)&&!pt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Yi(n,i.parentElement);u&&(pt.clearToParentMark(i,u),gy(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Gt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:i.contains(u)).length&&gy(t,a.target)}catch(i){B.error(i)}}})}function py(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Gt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Og(n),Ur({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{Za(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function gy(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;pt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Ja(e,t,n),i.timer=null},a)}function Og(t){t.paragraphs=[],pt.clearMark(t),t.querySelectorAll("."+yt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,pt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function zg(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Gt(n,["."+yt]))).length==0}function m5(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Dg(i)||(n.unobserve(r.target),pt.clearMark(a),Ja(a,t))}})}function sm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Is(e,t)}),t=="original"&&document.querySelectorAll(`.${yt}`).forEach(e=>e.remove())}function Nc(t,e){if(t instanceof HTMLIFrameElement){io(t.contentDocument,e);return}io(t,e)}async function fy(t){let e=He(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=vp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Ui(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ht(),"en"]}))}else if(e)n=await Ie({text:Ui(t.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=vp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await H3();return n==="auto"&&(n=await hT()),O3(n),n}async function hy(){if(!pe)return;Rs(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${$u}='${n}']`);i&&i.remove()}}pc.call(pe,pe.ctx)}async function um(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),ot("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:vt()});let r=pe?.ctx||e,a=await Zt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(g=>{[...i?.querySelectorAll(g),...s?.querySelectorAll(g)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?n2():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(g=>{p+=`${g}="${globalThis.document.documentElement.getAttribute(g)}" `});let m="";globalThis.document.body.getAttributeNames().forEach(g=>{m+=`${g}="${globalThis.document.body.getAttribute(g)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Xt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Ri(f)}catch(g){B.error(g)}}async function by(){let t=await Zt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Q4,{detail:JSON.stringify(t.draft)}))}async function f5(){try{if(await bl("reportActive"))return;B.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Lp();await ce({url:ts+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),ds("reportActive","1")}catch(t){B.error(t)}}d();d();var Ty={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},yy={...zt,"zh-CN":{...Ty["zh-CN"],...zt["zh-CN"]},"zh-TW":{...Ty["zh-TW"],...zt["zh-TW"]}},vy=yy;function ho(t,e,n){return mr(yy,t,e,pr,n)}var Ta=(t,e,n,r)=>{let a=db[t]||t,i=pb[t],o=gb[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();function lm(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&vn(o,s=>{s.preventDefault();let u=r[i];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var Sy=`${Q}-float-ball`;function ya(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${Sy}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${Sy}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function xy(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let m of p)a[m]||(a[m]=[]),a[m].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Ey(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var qc="DROP_DOWN_DEFAULT_VALUE";function cm(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=Ve(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:qc,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==qc){s.current.value=qc,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:qc,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function bo(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var h5=({date:t})=>{let{t:e}=Ce(),[n,r]=se(!1);return Ae(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},b5=({minVersion:t})=>{let{t:e}=Ce();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},T5=()=>{let{t}=Ce();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},y5=({message:t,handleSyncing:e,date:n})=>{let{t:r}=Ce();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function dm(t){let{isShowError:e,request:n}=t,[r,a]=se(null),{t:i}=Ce(),[o,s]=se(null),[u,l]=se(null),[c,p]=se(""),[m,g]=se(!1),[f,T]=se(!1),[b,h]=se(!1),[E,D]=se(null),[M,I]=se(null),S=Nt(),y=async()=>{p("");let L=o;if(o===null)try{let A=await n({url:Jo});A?(s(A),L=A,g(!0)):(p(i("unknownError")),l(null))}catch(A){l(null),p(A.message);return}L!==null?(t.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ae(()=>{Pn().then(L=>{let A=L.buildinConfigUpdatedAt;D(L);let v=new Date(A);if(a(A),S==="0.0.0"){h(!0);return}n({url:Jo}).then(O=>{let _=O,k=_.minVersion,N=S;s(_);let z=_.latestVersion;if(z&&(bo(N,z)?I(!0):I(!1)),bo(N,k)){let q=_.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(O=>{l(null),p(O.message)})})},[]),Ae(()=>{Pn().then(L=>{D(L)})},[r]),E?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(T5,{}):c?e===!1?null:w(y5,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(b5,{minVersion:o.minVersion}):u===null||u===!0?null:m?w(h5,{date:r}):null}):null}d();function v5(){return navigator.userAgent.indexOf("Mac")!==-1}var Cy={Alt:"\u2325"};function jc(t=""){return v5()?Object.keys(Cy).reduce((e,n)=>e.replace(n,Cy[n]),t):t}d();function wy({config:t,isLogin:e,isProUser:n}){let{t:r}=Ce();return pl(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?Xu:yb,children:[w("img",{src:e?WT:HT}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Xu:vb,children:w("img",{src:n?qT:jT})})]})}d();function Dy({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=Ce();if(!e)return null;let i=sc(e.config.translationService,e.config.targetLanguage),o=kn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(S5,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:KT,style:{maxWidth:"unset"},class:"mx-2"}),w(x5,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function S5(t){let{t:e}=Ce(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=Ta(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=Ta(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function x5(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=Ta(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=Ce();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function Ay(t){let{t:e}=Ce(),{translationServiceItems:n,translationServiceOptions:r}=D5(t);return n.length?w(qt,{children:[w(ky,{class:"mt-3",label:e("popupService"),items:r}),w(E5,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function ky(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function E5({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=Ce(),a=w5(t),i=C5(t),o=$e((u,l)=>{e(c=>{let p=c.translationServices||{},m=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...m,[u]:l}}}})},[]),s=Ue(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(qt,{children:s.map(({label:u,items:l},c)=>w(ky,{class:"mt-2",label:u,items:l},"field-"+c))})}function C5(t){return Ue(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function w5(t){return Ue(()=>{let{translationService:n}=t.config;if(gr[n])return vl("translationService",n,t)},[gr,vl,t])}function D5({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=Ce(),u=Ue(()=>e?ps(e,"translationService"):[],[ps,e]),l=$e(p=>{let m=u.find(g=>g.id===p.value);if(m.ok){if(n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;m.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ue(()=>{let p=et();return u.filter(g=>e.config.showUnconfiguredTranslationServiceInPopup===!1?g.ok:!0).map(g=>({label:`${s("translationServices."+g.id)}${g.ok?"":" "+(" "+(!t&&!p&&g.providers&&g.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:g.id,selected:g.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function Py(t){let e;try{e=new URL(t)}catch{return!1}let n=V3(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(A5(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function A5(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function Ly(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function _y(t){let{t:e}=Ce(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=k5(t),[o,s]=se(()=>a?"excludeMatches":"matches"),u=Ue(()=>r||a||!1,[r,a]),l=$e(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function k5({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,m=null,g=null,{translationUrlPattern:f}=e.config;if(l=Ue(()=>new URL(t||""),[t]),e.config&&t&&Py(t)){c=Ly(t);let{matches:h,excludeMatches:E}=f;p=!!h.find(D=>dt(t,D)),m=!!E.find(D=>dt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:E}=h;E.includes(n)?g=!0:g=!1}let T=$e(()=>{let h=l.hostname,E=e.localConfig.tempTranslationUrlMatches||[],D=E.filter(I=>I.match!==h),M=!1;D.length!==E.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=$e((h,E)=>{if(h==="default"){s(I=>{let S={...I.translationUrlPattern};return{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,matches:pm(t,S.matches),excludeMatches:pm(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(I=>{let S={...I.translationUrlPattern};return S[M]=pm(t,S[M]),S[D]=ml(E,S[D]),{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:m,isAlwaysTranslateLang:g,handleTranslationUrlPatternSelected:b}}function pm(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!dt(t,n)):e):[]}d();d();d();var P5=new AbortController,{signal:L5}=P5,Hc=0,Wc=0,To=!1,ni,Fy=0,Sa=[];function yo(t,e){_5();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(B.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(B.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(Yo,s),Sa.push(()=>{document.removeEventListener(Yo,s)});let u=Kn(m=>{if(!(Math.abs(m.clientX-Hc)+Math.abs(m.clientY-Wc)<=3)&&(Hc=m.clientX,Wc=m.clientY,o||To&&!ni)){let g=Ry(n.rule,e);if(g){if(hm(g))return;fm(n,!1,g)}}},o?700:300),l=m=>{let g=m.target;hm(g)||fm(n,!0)},c=m=>{let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=vn.getPressedKeyCodes();if(f.length>1&&vn[g]&&(Fy=Date.now(),To=!1),f.length===1&&vn[g]){let T=Date.now();To=!0,ni&&clearTimeout(ni),ni=setTimeout(()=>{let b=Fy-T;b>0&&b<=i?To=!1:l(m),ni=void 0},i)}};if(Sa.push(()=>{ni&&clearTimeout(ni)}),a)return;gm("mousemove",u,e),Sa.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():To=!1}if(gm("blur",p,e),Sa.push(()=>{e.removeEventListener("blur",p)}),!o){let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",g=hb;gm("keyup",My,e),Sa.push(()=>{e.removeEventListener("keyup",My)}),g.includes(m)?vn("*","mouseHover",c):vn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),vn.setScope("mouseHover"),Sa.push(()=>{vn.deleteScope("mouseHover")})}}function _5(){Sa.forEach(t=>t()),Sa=[],vn.setScope("all")}function My(t){To=!1}function gm(t,e,n=window){return n.addEventListener(t,e,{signal:L5})}function fm(t,e,n,r=window){if(n=n||Ry(t.rule,r),!n){B.debug("can not find selection part!");return}if(M5(n,e))return;if(hm(n)){B.debug("exclude dom");return}my(t,n);let i=Hs();i&&(i.setupMouseHoverListener=yo);let o=on(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=om({...i},t);Ur({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Za(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Xe(Z4,p),it("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function Ry(t,e){return F5(Hc,Wc,t,e)}function F5(t,e,n,r){let a=v1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=S1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:Iy(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){B.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{I5(r)}),!0}function B5(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function I5(t){let e=Hs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Bs(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function mm(t){return!!(t.host&&t.mode)}function By(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||mm(n))return t;for(;n&&n.nodeName!=="BODY"&&!mm(n)&&yp(n,e);){let r=n.parentNode;if(r&&mm(r))break;n=r}return n}function Iy(t,e){return t.nodeType===Node.TEXT_NODE||yp(t,e)?By(t,e):t}function Oy(t,e){Hc=e.clientX,Wc=e.clientY,fm(t,!0)}var Ws=[];function bm(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Ws.push(()=>{document.removeEventListener("click",i)})}function zy(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Ws.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function Kc(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ws.push(()=>{document.removeEventListener("touchstart",r)})}var Tm={touchShortcutsOff:()=>{},"multipleClick.2":bm,"multipleClick.3":bm,"multipleClick.4":bm,"slide.left":zy,"slide.right":zy,"fingers.2":Kc,"fingers.3":Kc,"fingers.4":Kc,"fingers.5":Kc};async function Uy(t){try{q5();let e=await Or(),n=mb.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=R5(t,e,r.command),i=Tm[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{U5(r.command,t,u)})})}catch(e){B.error(e)}}function R5(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var O5=()=>{ym();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},z5=()=>{Sm();let t=new CustomEvent(Mr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},N5=()=>{vm();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},Ny=0,U5=(t,e,n)=>{new Date().getTime()-Ny<200||(Ny=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?O5():t==="touchShortcutsToggleTranslationMask"?N5():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?z5():t==="touchShortcutsToggleTranslateTouchElement"&&Oy(e,n))};function q5(){Ws.forEach(t=>{t()}),Ws=[]}function qy(t){let{t:e}=Ce(),{ctx:n,setSettings:r}=t,a=j5(t);return rs(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||es[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(H5,{...t})}function j5({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=Ce(),a=Ue(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ue(()=>es.filter(s=>!(s==="Off"||es.includes(a)&&s==="OtherCustom")),[t,a]);return Ue(()=>i.map(s=>{let u=r("mouseHoldKey",{key:jc(s)}),l=es.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(m=>{let g={...m.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(g.mouseHoverHoldKey=p.value),{...m,generalRule:g}})}}}),[i,a])}function H5(t){let{ctx:e,setSettings:n}=t,{t:r}=Ce(),a=e.config.generalRule,i=Object.keys(Tm).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(m=>{let g={...m.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(g.touchShortcutsToggleTranslateTouchElement=p.value),{...m,generalRule:g}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let m=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?m:"touchShortcutsOff"}}})}})]})}d();function jy(t){let{isAlwaysTranslateLang:e}=W5({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=Ce();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Ta(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:fl(t.currentLang,u.matches),excludeMatches:fl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=ml(t.currentLang,u[i]),u[o]=fl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function W5({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var K5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:m})=>{let[g,f]=se(!1),T=Ve(null),b=Ve(null),h=()=>{u||!l&&ut().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),m?.()},s))},E=()=>{ut().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ue(()=>{let I={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(I.maxWidth="200px",o&&(I.width=o+"px"),I.whiteSpace="normal"),n){case"top":return{...I,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...I,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...I,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...I,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&E()},children:e}),g&&w("div",{style:M,role:"tooltip",children:t})]})},xa=K5;d();var Hy=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Wy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ky=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),Gy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),Vy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),$y=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Yy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function Jy({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=Ce(),a=Me(),i=Math.round((_i.supportedVideoSubtitleSites||[]).length/10),o=Ue(()=>[{title:r("widget.translateFile"),icon:Hy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Wy,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:Ky,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(Cb)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(xa,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(Qy,{...s})}):w(Qy,{...s}))})}function Qy(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function xm(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=se(""),[l,c]=se(i),[p,m]=se(null),[g,f]=se(null);Ae(()=>{Mt.get(Ft,null).then(E=>{E?(m(E),f(Jt(E))):f(!1)}).catch(E=>{f(!1)})},[]);let T=!0,b=et();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=pl(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(wy,{isLogin:!!p,isProUser:!!g,config:n}),w(J5,{openSharePage:r})]}),w(Dy,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(Ay,{isProUser:!!g,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(V5,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(Y5,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(dm,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(_y,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(qy,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(jy,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(G5,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(Jy,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w($5,{...t,isProUser:!!g,isShowPricing:T,setMessage:u})]})}function G5(t){let{t:e}=Ce(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ue(()=>!n.rule.subtitleRule.disabled&&W0.includes(n.rule.subtitleRule.type||""),[n,W0])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function V5(t){let{t:e}=Ce(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(xa,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?Vy:$y})})}function $5(t){let{t:e,lang:n}=Ce(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[Gy,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(Q5,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(cm,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:g=>{g.value==="openPremium"?(globalThis.open(Ai),t.onClose()):g.value==="changeToOnlyTranslationMode"?c("translation"):g.value==="changeToDualTranslationMode"?c("dual"):g.value==="translateTheWholePage"?t.onTranslateTheWholePage():g.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():g.value==="translateTheMainPage"?t.onTranslateTheMainPage():g.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):g.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):g.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):g.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):g.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):g.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):g.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):g.value==="options"?(t.openOptionsPage(),t.onClose()):g.value==="changeToTranslateTheWholePage"?p():g.value==="changeToTranslateTheMainPage"?m():g.value==="about"?t.openAboutPage():g.value==="toggleEnabled"?t.onToggleEnabled():g.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):g.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):g.value==="goPro"&&t.onOpenUrl(Ai,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(g){g.preventDefault(),t.openOptionsPage()}function c(g){t.setSettings(f=>({...f,translationMode:g})),t.onSwitchTranslationMode(g)}function p(){t.setSettings(g=>({...g,translationArea:"body"})),t.onTranslateTheWholePage()}function m(){t.setSettings(g=>({...g,translationArea:"main"})),t.onTranslateTheMainPage()}}function Y5({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=Ce(),l=r.config,c=Ue(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Ga(r?.rule)&&!p&&(p=!0);let m=s("translate");e==="Translated"||e==="Error"?m=s("show-original"):e==="Original"?p?Ir()&&c.protocol==="file:"||o?m=s("translate-firefox-local-pdf"):ye()?m=s("noSupportTranslate-pdf"):m=s("translate-pdf"):m=s("translate"):m=s(e);let g=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(al()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(m+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):m+=` (${jc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(g+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:m})}function Q5({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=Ce(),o=Nt();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Ey(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function J5(t){let{t:e}=Ce();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),Yy]})}d();d();d();d();var Em={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Gc(t,e,n){let[r]=se(()=>typeof e=="function"?e():e),[a]=se(n),[i,o]=se(r),[s,u]=se(!1),[l,c]=se("");Ae(()=>{Em.get(t,r,a).then(m=>{m[t]&&o(m[t]),u(!0),c("")}).catch(m=>{u(!1),c(m)})},[t,r,a]);let p=$e(m=>{let g=typeof m=="function"?m(i):m;B.debug("new settings",g),Em.set(t,g,a).then(()=>{o(g),u(!0),c("")}).catch(f=>{o(g),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Cm(t,e,n){let r=[];return function(){let[i,o,s,u]=Gc(t,e,n),l=$e(c=>{for(let p of r)p(c)},[]);return Ae(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Zy(t,e){return Cm(t,e,"sync")}var Z5="userConfig",X5=null,e8=Zy(Z5,X5);function jr(t){let[e,n,r,a]=e8(),i=$e(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();async function Vc(t){try{let e=new Date;B.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Zo]:e.toISOString()}),await t8(),ye()||await J3()}catch(e){B.error("run cron task failed",e)}}async function Xy(){let e=(await an()).interval;if(e){let n=await oe.storage.local.get(Zo);if(n&&n[Zo]){let r=n[Zo];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:e}),B.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),aa({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{B.error("send content message request failed from cron task",u)})):B.debug(`no need to sync rules, latest: ${r}`):B.info(`local version is too old, please update to ${o} or later`)}catch(t){B.error("sync rules error: ",t)}}d();d();d();d();d();d();var wm;function Im(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function uv(t,e=","){return t.map(Im).join(e)}var lv=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Yc(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Qc(t,e="@media "){return e+Mn(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Mn(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function n8(){}var Vt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function cv(t){return t.match(/[-=:;]/g)?.length||0}function _m(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(cv(t),15)<<18}var r8=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Rm({n:t,i:e,v:n=[]},r,a,i){t&&(t=Im({n:t,i:e,v:n})),i=[...Mn(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Mn(u&&Qc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|_m(l):s=="dark"?1073741824:l[0]=="@"?_m(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~r8.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var Om=new Map;function ev(t){if(t.d){let e=[],n=Dm(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Dm(r,i=>Dm(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Am(i,o)}return Am(o,i)})):r,"&"),r=>Am(r,t.n?"."+lv(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Dm(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Am(t,e){return t.replace(/&/g,e)}var tv=new Intl.Collator("en",{numeric:!0});function a8(t,e){for(var n=0,r=t.length;n>1;0>=dv(t[a],e)?n=a+1:r=a}return r}function dv(t,e){let n=t.p&Vt.o;return n==(e.p&Vt.o)&&(n==Vt.b||n==Vt.o)?0:t.p-e.p||t.o-e.o||tv.compare(nv(t.n),nv(e.n))||tv.compare(rv(t.n),rv(e.n))}function nv(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function rv(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function km(t,e){return Math.round(parseInt(t,16)*e)}function Ea(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[km(t.substr(1,i),o),km(t.substr(1+i,i),o),km(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function pv(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let m=[],g="",f=0,T=0;for(let E in o||{}){var b,h;let D=o[E];if(E[0]=="@"){if(!D)continue;if(E[1]=="a"){m.push(...mv(s,u,Nm(""+D),p,u,l,c,!0));continue}if(E[1]=="l"){for(let M of Mn(D))m.push(...i(M,{n:s,p:(b=Vt[E[7]],u&~Vt.o|b),r:E[7]=="d"?[]:l,i:c},p));continue}if(E[1]=="i"){m.push(...Mn(D).map(M=>({p:-1,o:0,r:[],d:E+" "+M})));continue}if(E[1]=="k"){m.push({p:Vt.d,o:0,r:[E],d:i(D,{p:Vt.d},p).map(ev).join("")});continue}if(E[1]=="f"){m.push(...Mn(D).map(M=>({p:Vt.d,o:0,r:[E],d:i(M,{p:Vt.d},p).map(ev).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))E=="label"&&D?s=D+Yc(JSON.stringify([u,c,o])):(D||D===0)&&(E=E.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=E)[0]=="-"?0:cv(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+Mn(D).map(M=>p.s(E,gv(""+M,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let M=u;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(I,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Qc(y,"")):I}),M|=_m(E)),m.push(...i(D,{n:s,p:M,r:[...l,E],i:c},p))}else m.push(...i(D,{p:u,r:[...l,E]},p))}return m.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:g}),m.sort(dv)}(t,Rm(e,n,r,a),n)}function gv(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Ea(s):""+Mn(s).filter(u=>Object(u)!==u)})}function zm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function Fm(t,e,n=Vt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,m){u={...u,i:u.i||m};let g=function(f,T){let b=Om.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return g?typeof g=="string"?({r:p,p:c}=Rm(u,l,c,p),zm(Fm(Nm(g),l,c,p,u.i),u.n)):Array.isArray(g)?g.map(f=>{var T,b;return{o:0,...f,r:[...Mn(p),...Mn(f.r)],p:(T=c,b=f.p??c,T&~Vt.o|b)}}):pv(g,u,l,c,p):[{c:Im(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(a8(i,s),0,s);return i}function mv(t,e,n,r,a,i,o,s){return zm((s?n.flatMap(u=>Fm([u],r,a,i,o)):Fm(n,r,a,i,o)).map(u=>u.p&Vt.o&&(u.n||e==Vt.b)?{...u,p:u.p&~Vt.o|e,o:0}:u),t)}function i8(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Rm(i,o,e);return n&&mv(s,e,n,o,u,l,c,r)},Om.set(t,a),t}function Pm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(o8),i:a}))}}function o8(t,e,n){return n.indexOf(t)==e}var av=new Map;function Nm(t){let e=av.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&Pm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Yc(JSON.stringify([p,m])):p+"("+uv(m)+")",Vt.a,m,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),av.set(t,e=r[0])}return e}function fv(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function hv(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?fv(t,e,n=>Lm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+Lm(r),t?Lm(t):"")}function Lm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=hv(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var lse=bv("@"),cse=bv("~");function bv(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return uv(Nm(n+t+"("+hv(r,a)+")"))}}function Mm(t,e){return Array.isArray(t)?iv(fv(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?iv(t):[t]}var s8=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function iv(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=s8.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function Tv(t,...e){var n;let r=Mm(t,e),a=(r.find(i=>i.label)?.label||"css")+Yc(JSON.stringify(r));return n=(i,o)=>zm(r.flatMap(s=>pv(s,i,o,Vt.o)),a),Om.set(a,n),a}var dse=new Proxy(function(t,e){return ov("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ov(e,n,r)}}});function ov(t,e,n){return{toString(){return Tv({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function X(t,e,n){return[t,u8(e,n)]}function u8(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):Bm(n,1)}):n=>t||{[n[1]]:Bm(n,2)}}function Bm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function te(t,e,n,r){return[t,l8(e,n,r)]}function l8(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=yv(t||a[1]),s=i.theme(o,a.$$)??vo(a.$$,o,i);if(s!=null)return a._=Bm(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,c8(e,n)]}function c8(t={},e){return(n,r)=>{let{section:a=yv(n[0]).replace("-","")+"Color"}=t,[i,o]=d8(n.$$);if(!i)return;let s=r.theme(a,i)||vo(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,m=r.theme(l,o||"DEFAULT")||o&&vo(o,l,r),g=e||(({_:T})=>{let b=Ks(c,T);return p?{[p]:b}:b});n._={value:Ea(s,{opacityVariable:u||void 0,opacityValue:m||void 0}),color:T=>Ea(s,T),opacityVariable:u||void 0,opacityValue:m||void 0};let f=g(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:Ea(T,{opacityVariable:u||void 0,opacityValue:m||"1"}),color:b=>Ea(T,b),opacityVariable:u||void 0,opacityValue:m||void 0},f={"&":f,[r.v("dark")]:g(n,r)})}return f}}function d8(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ks(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function vo(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=$c(gv(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function yv(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function $c(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>$c(n)+r+$c(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var pse=Symbol();var vv=new Proxy(n8,{apply(t,e,n){return wm(n[0])},get(t,e){let n=wm[e];return typeof n=="function"?function(){return n.apply(wm,arguments)}:n}});var gse=function t(e){return new Proxy(function(n,...r){return sv(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return sv(e,r,a,i)}}})}();function sv(t,e,n,r){return{toString(){let a=Mm(n,r),i=lv(e+Yc(JSON.stringify([e,a])));return(typeof t=="function"?t:vv)(Tv({[`@keyframes ${i}`]:Mm(n,r)})),i}}}d();d();d();d();d();var Sv={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Bn(4,"rem",4,.5,.5),...Bn(12,"rem",4,5),14:"3.5rem",...Bn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ke("blur"),backdropBrightness:Ke("brightness"),backdropContrast:Ke("contrast"),backdropGrayscale:Ke("grayscale"),backdropHueRotate:Ke("hueRotate"),backdropInvert:Ke("invert"),backdropOpacity:Ke("opacity"),backdropSaturate:Ke("saturate"),backdropSepia:Ke("sepia"),backgroundColor:Ke("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ke("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Bn(200,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:Ke("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ke("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ke("colors"),caretColor:Ke("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Bn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ke("borderColor"),divideOpacity:Ke("borderOpacity"),divideWidth:Ke("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Gs(2,6),...Gs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ke("spacing"),gradientColorStops:Ke("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Gs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Gs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Bn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Bn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ke("spacing"),placeholderColor:Ke("colors"),placeholderOpacity:Ke("opacity"),outlineColor:Ke("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ke("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:Bn(200,"",100,0,50),scale:{...Bn(150,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ke("spacing"),scrollPadding:Ke("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:Ke("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Bn(2),textColor:Ke("colors"),textDecorationColor:Ke("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:Ke("spacing"),textOpacity:Ke("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:Ke("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Gs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Bn(50,"",1,0,10),auto:"auto"}};function Gs(t,e){let n={};do for(var r=1;re(t)}var _se={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Sv.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Sv.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},Mse=[X("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:vo(`[${e}]`,"",n)}}})),X("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),te("aspect-","aspectRatio"),X("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Qc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),X("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),X("box-(border|content)","boxSizing",({1:t})=>t+"-box"),X("hidden",{display:"none"}),X("table-(auto|fixed)","tableLayout"),X(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",X("isolate","isolation"),X("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),X("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Jc),X("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),X("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),te("-?(top|bottom|left|right)(?:$|-)","inset"),X("(visible|collapse)","visibility"),X("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),X("flex-((row|col)(-reverse)?)","flexDirection",xv),X("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),X("grid-cols-(\\d+)","gridTemplateColumns",Dv),te("col-","gridColumn"),X("col-(span)-(\\d+)","gridColumn",wv),te("col-start-","gridColumnStart"),X("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),X("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),X("grid-rows-(\\d+)","gridTemplateRows",Dv),te("row-","gridRow"),X("row-(span)-(\\d+)","gridRow",wv),te("row-start-","gridRowStart"),X("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),X("row-end-(auto|\\d+)","gridRowEnd"),X("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Jc(xv(t))),X("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",X("justify-","justifyContent",Ev),X("(content|items|self)-",t=>({["align-"+t[1]]:Ev(t)})),X("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),te("p([xytrbl])?(?:$|-)","padding",So("padding")),te("-?m([xytrbl])?(?:$|-)","margin",So("margin")),te("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),X("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:t})=>typeof(t=Mn(t))[1]=="string"?{fontFamily:rr(t)}:{fontFamily:rr(t[0]),...t[1]}),X("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),X("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),X("italic","fontStyle"),X("not-italic",{fontStyle:"normal"}),X("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),X("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),X("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),X("text-(left|center|right|justify|start|end)","textAlign"),X("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),te("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),te("indent-","textIndent"),X("(overline|underline|line-through)","textDecorationLine"),X("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),X("decoration-","textDecorationStyle"),X("(uppercase|lowercase|capitalize)","textTransform"),X("normal-case",{textTransform:"none"}),X("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),X("align-","verticalAlign"),X("whitespace-","whiteSpace"),X("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),X("break-words",{overflowWrap:"break-word"}),X("break-all",{wordBreak:"break-all"}),X("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),X("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ri(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),X("bg-(fixed|local|scroll)","backgroundAttachment"),X("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),X(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),X("bg-blend-","backgroundBlendMode"),X("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),X("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Jc),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ri(n[0])}-radius`]:e,[`border-${ri(n[1])}-radius`]:e}}),X("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),X("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},So("border","Color")),Bt("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",So("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),X("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),X("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ri(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ri(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),X("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Ea(e("ringOffsetColor","","#fff")),"--tw-ring-color":Ea(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:t})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(t),"--tw-shadow-colored":rr(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),X("mix-blend-","mixBlendMode"),...Cv(),...Cv("backdrop-"),te("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:rr(t),transitionTimingFunction:t._=="none"?void 0:rr(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:rr(e("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",rr),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),te("delay(?:$|-)","transitionDelay","transitionDelay",rr),te("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=rr(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",X("transform",qm),X("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Av(t=="gpu")})),te("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...qm()})),te("-?(rotate)-","rotate",Um),te("-?(translate-[xy])-","translate",Um),te("-?(skew-[xy])-","skew",Um),X("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Jc),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",X("snap-(none)","scroll-snap-type"),X("snap-(x|y|both)",({1:t})=>({...Ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),X("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),X("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),X("snap-(normal|always)","scroll-snap-stop"),X("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",So("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",So("scroll-margin")),X("touch-(auto|none|manipulation)","touch-action"),X("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),X("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),X("outline",{outlineStyle:"solid"}),X("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],X("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),X("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),X("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Jc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function xv(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ri(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function rr(t){return t&&""+(t._||t)}function Ev({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function So(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ks(t+"-"+ri(a[0])+e,r),...Ks(t+"-"+ri(a[1])+e,r)}:Ks(t+e,r)}}function Cv(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ca(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,X(`${t}filter`,n),...e.map(r=>te(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Mn(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Um({1:t,_:e}){return{["--tw-"+t]:e,...qm()}}function qm(){return{...Ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Av()}),transform:"var(--tw-transform)"}}function Av(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function wv({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Dv({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ca(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Zc=globalThis||(typeof window<"u"?window:self),m8=Object.create,Hm=Object.defineProperty,f8=Object.getOwnPropertyDescriptor,h8=Object.getOwnPropertyNames,b8=Object.getPrototypeOf,T8=Object.prototype.hasOwnProperty,y8=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),v8=(t,e)=>{for(var n in e)Hm(t,n,{get:e[n],enumerable:!0})},jm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of h8(e))!T8.call(t,a)&&a!==n&&Hm(t,a,{get:()=>e[a],enumerable:!(r=f8(e,a))||r.enumerable});return t},S8=(t,e,n)=>(jm(t,e,"default"),n&&jm(n,e,"default")),Pv=(t,e,n)=>(n=t!=null?m8(b8(t)):{},jm(e||!t||!t.__esModule?Hm(n,"default",{value:t,enumerable:!0}):n,t)),Lv=y8((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var m=new XMLHttpRequest;m.open("GET",l),m.responseType="blob",m.onload=function(){u(m.response,c,p)},m.onerror=function(){},m.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Zc=="object"&&Zc.global===Zc?Zc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var m=o.URL||o.webkitURL,g=document.createElement("a");c=c||l.name||"download",g.download=c,g.rel="noopener",typeof l=="string"?(g.href=l,g.origin===location.origin?i(g):a(g.href)?r(l,c,p):i(g,g.target="_blank")):(g.href=m.createObjectURL(l),setTimeout(function(){m.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var m=document.createElement("a");m.href=l,m.target="_blank",setTimeout(function(){i(m)})}}:function(l,c,p,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var g=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=D:location=D,m=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,E=h.createObjectURL(l);m?m.location=E:location.href=E,m=null,setTimeout(function(){h.revokeObjectURL(E)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),_v={};v8(_v,{default:()=>Xc});var x8=Pv(Lv());S8(_v,Pv(Lv()));var{default:kv,...E8}=x8,Xc=kv!==void 0?kv:E8;d();d();d();d();d();d();var yue=Me().REDIRECT_URL;d();var Jue=Gi([]);function Bv(t){let[e,n]=se(null);return Ae(()=>{Pn().then(r=>{n(r),B.debug("current config",r)})},[]),Ae(()=>{Pn().then(r=>{n(r)})},[t]),e}function Iv(t){let[e,n]=se(null);return Ae(()=>{t&&hn({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function Rv(){let[t,e]=se(null);return Ae(()=>{Zt().then(r=>{e(r)})},[]),[t,r=>{e(r),Xt(r)}]}d();async function _8(t,e,n){try{if(e===null)return"noupdate";let r=await Zt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await Wm(t,e),await Xt(r),"upload"}let a=await zv(t);r.accountLastSyncedAt=Date.now(),B.debug("settings",e),B.debug("local settings.updatedAt",e.updatedAt),B.debug("remote settings.updatedAt",a.updatedAt),B.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),B.debug("isUpload",i),i)return await Wm(t,e),await Xt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||F8(n)&&_8(n.token,t,e).then(i=>{B.debug("syncUserSetting result",i)})},[t,n])}function F8(t){return Jt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function zv(t){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ts+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function Wm(t,e){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ts+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function td(t){let{onClose:e}=t,[n,r]=se("Original"),[a,i,o,s]=jr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});ed(a,i);let[u,l]=se(null),[c,p]=se(globalThis.location.href),[m,g]=se("auto"),[f,T]=se(null),b=O=>{r(O.detail)};if(Ae(()=>(document.addEventListener(ja,b,!1),an().then(O=>{l(O);let _=vt();g(_);let k=Qe();r(k),Vc(O.interval)}),document.addEventListener("urlChange",E),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",E)}),[]),Ae(()=>{an().then(O=>{l(O)})},[a]),Ae(()=>{c&&u&&Km().then(O=>{T(O)})},[c,u]),!u||!f)return null;return w(xm,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:O=>{D("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:M,onToggleEnabled:I,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ra(f.rule)||c)},openAboutPage:A,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:m,onSetLocalConfig:kl,onSetBuildinConfig:j3,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(O){g(O);let _=xy(c,O,u.sourceLanguageUrlPattern);i(k=>({...k,sourceLanguageUrlPattern:_})),qn(O)}function E(){p(globalThis.location.href)}function D(O,_,k={}){let N={trigger:"page_popup",...k};return()=>{_n({method:O,data:N}),_&&e()}}function M(){e()}function I(){i(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{M()},50)}function S(O,_){let k=O;_&&(k=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${_}`),Fl(k,!0),setTimeout(()=>{M()},50)}function y(O){O&&(Oi(!1,O),setTimeout(()=>{M()},50))}function L(O=""){Bi(!0,O),setTimeout(()=>{e()},50)}function A(){Ll(),setTimeout(()=>{e()},50)}function v(){Q3(),setTimeout(()=>{e()},50)}}d();function jv(){let[t,e]=se("Original");return Ae(()=>{let n=Qe();e(n);let r=a=>{e(a.detail)};return document.addEventListener(ja,r),()=>{document.removeEventListener(ja,r)}},[]),{pageStatus:t}}var Nv=6,B8={position:"right",top:335};function Hv({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=Ve(null),o=Ve(null),[s,u]=se(!1),l=Ve(null),c=Ve(!1),p=Ve(n.floatBallConfig||B8),m=Ve(0),g=Ve(0),f=Ve(0),T=Ve(!1),b=Ve(0),h=Ve(0),E=Ve(0),D=Ve(0),M=Ve(!1),I=$e(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},ut().any?3e3:0))},[u,l,T,a]);return Ae(()=>{a||u(!1)},[a]),Ae(()=>{if(i.current&&p.current){let S=Gm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ae(()=>{if(!o.current||!i.current)return;let S=k=>{k.preventDefault&&k.preventDefault(),m.current=k.clientX,g.current=k.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),I(!0),E.current=k.clientX,D.current=k.clientY,M.current=!1,ut().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Uv({startX:m.current,startY:g.current,endX:E.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",L),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},y=k=>{if(k.preventDefault&&k.preventDefault(),!c.current||!i.current||(E.current=k.clientX,D.current=k.clientY,M.current))return;let N=k.clientY-g.current+f.current,z=Gm(N);i.current.style.top=`${z}px`},L=k=>{if(k.preventDefault&&k.preventDefault(),_(),c.current=!1,clearTimeout(l.current),T.current||I(!1),M.current)return;Uv({startX:m.current,startY:g.current,endX:k.clientX,endY:k.clientY})||(clearTimeout(h.current),t());let z=Gm(k.clientY-30);p.current.top=z;let q=ms();kl({...q,floatBallConfig:p.current})},A=k=>{k.preventDefault&&k.preventDefault(),S(k.changedTouches[0])},v=k=>{k.preventDefault&&k.preventDefault(),y(k.changedTouches[0])},O=k=>{k.preventDefault&&k.preventDefault(),L(k.changedTouches[0])},_=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",A),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",A))}},[e,o,i,l,c,n,I,t]),Ae(()=>{if(ut().any)return;let S=L=>{L.target===i.current&&!T.current||(T.current=!0,I(!0),clearTimeout(l.current))},y=L=>{if(c.current){T.current=!1;return}L.target===i.current&&!T.current||I(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,I,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:I}}function Uv({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>Nv||i>Nv}function Wv(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ue(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ue(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ue(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Kv(){let[t,e]=se(!1);return Ae(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var qv="hasShownFloatingBallGuide",I8="2024-01-06";function Gv(t){let[e,n]=se(!1);Ae(()=>{!t.config.enableShowFloatingBallGuide||vt()==t.targetLanguage||(async()=>{let a=await At(qv,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function Vv(t,e){let n=Ve(0),[r,a]=se(!0),[i,o]=se(!1),s=jr(),[u,l]=s,{t:c}=Ce(),p=$e(()=>{t?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ae(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let m=$e(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return ut().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),g=Ue(()=>ut().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ue(()=>ut().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:Ta(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:g,tooltipText:f,handleShowTooltip:m}}function Gm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ai=`${Q}-float-ball`;function $v(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(R8,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function R8(t){let{t:e}=Ce(),[n,r]=se("UntilNext"),a=Ii()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ai}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ai}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(ya,{type:"modal-close"})})]}),w("div",{class:`${ai}-close-radio-content mt-3`,children:o.map(s=>w(O8,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ri(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ai}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ai}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function O8(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=z8(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ai}-radio-sel`:`${ai}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function z8(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();d();function Yv(t){return we.ASSETS_BASE_URL+t}var ii=`${Q}-float-ball`;function Qv(t){let{t:e}=Ce(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ue(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ii}-guide-container`,style:r,children:[w("img",{class:`${ii}-guide-bg ${t.fixedPosition}`,src:N8}),w("div",{class:`${ii}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ii}-guide-img`,src:Yv("images/float_ball_intro.png")}),w("div",{class:`${ii}-guide-message`,children:[e("floatBall.guideClickToTranslate"),ut().any?` -${e("floatBall.longPress")}`:""]}),w("div",{class:`${ii}-primary-btn ${ii}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var N8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function U8({isVisible:t,onClose:e,children:n}){return w(qt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Jv=U8;var Vs=`${Q}-float-ball`;function Vm(t){let{t:e}=Ce(),n=jr(),[r,a,i,o]=n;ed(r,a);let s=Bv(r),u=Iv(s),{isFullScreen:l}=Kv(),[c,p]=se(!1),[m,g]=se(!0),{pageStatus:f}=jv(),T=_p(u,r),b=$e(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ee();if(Ga(u?.rule)){let U=ra(u.rule);Oi(!0,U||P);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,_n,p]),h=$e(()=>{p(!0)},[p]),E=m&&!!s,{containerRef:D,active:M,ballRef:I,floatBallConfigRef:S,setActive:y}=Hv({handleBallClick:b,handleMobileBallLongPress:h,isShow:E,localConfig:t.localConfig,popupVisible:c}),L=T?.fixedPosition||"right",A=L==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:O}=Gv(t.ctx),{closeTransform:_,logoContainerTransform:k,settingTransform:N}=Wv(T,M||v),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:F,handleShowTooltip:C}=Vv(u,f);return E?w("div",{class:`${Vs}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(q8,{ctx:u,setVisible:g,closeTransform:_,setActive:y,getModalStyle:()=>Zv(S.current.top,300,L)}),w(xa,{enableMobile:!0,text:F,position:A,delay:z,onShow:C,disable:q,children:w("div",{class:`${Vs}-btn ${L} btn-animate `,ref:I,style:{transform:k,opacity:M||v?1:.5},children:w("div",{children:[w(ya,{type:"logo"}),f!=="Original"?w(ya,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:N},class:`${Vs}-more-buttons btn-animate`,children:[w(xa,{text:e("translateFileTooltip"),multiple:!0,width:200,position:A,containerClass:"btn-animate",children:w("div",{class:`${Vs}-more-button`,onClick:()=>{Fl(Db,!0)},children:w(ya,{type:"file"})})}),w(xa,{text:e("floatBall.setting"),position:A,containerClass:"btn-animate",children:w("div",{class:`${Vs}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(ya,{type:"setting"})})})]}),w(j8,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Zv(S.current.top,500,L)}),w(Qv,{visible:v,top:S.current.top,fixedPosition:L,onClose:()=>{O(),y(!1)}})]}):null}function q8(t){let{t:e}=Ce(),[n,r]=se(!1),a=jr(),[i,o,s,u]=a,l=_p(t.ctx,i),c=$e(m=>{t.ctx&&o(g=>t2({...g},m))},[t.ctx,o]),p=$e(m=>{l&&(t.setVisible(!1),m==="AlwaysClose"?c({...l,enable:!1}):m==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(qt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(ya,{type:"close"})}),w($v,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function j8(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Jv,{isVisible:t.visible,onClose:t.onClose,children:w(td,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(td,{onClose:t.onClose})})}):null}function H8(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Zv=(t,e,n)=>{let a=H8().height,i={position:"fixed"},o=0;return xf()&&(t=W8.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},W8={position:"right",right:0,top:335};function K8(t,e){for(let n of e){if(ye()&&!Ir()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $m(){let t=Me(),e=await an(),n=await Or(),r={url:globalThis.location.href,config:e},a=await hn(r),i=await Fp(a,n),o=dt(a.url,i?.blockUrls),s=await Zt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return K8(l,[c]),G8(l,e,s,a)}function G8(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),Ki(w(mc,{lang:e.interfaceLanguage,fallbackLang:"en",translations:vy,children:w(Vm,{localConfig:n,ctx:r})}),a)}var Ym=!1;async function Xv(t){if(!t){let e=await an(),n={url:globalThis.location.href,config:e};t=await hn(n)}t.config.debug&&B.setLevel("debug"),t.isTranslateExcludeUrl?B.debug("detect exclude url, do not inject anything."):(Ym=!0,$m().catch(e=>{B.debug("init popup error",e)}))}async function e9(){Ym||(Ym=!0,$m().catch(t=>{B.error("init popup error",t)}))}var t9=!1,i9=[()=>{vn.unbind()}],n9=[...i9],V8=Kn(async()=>{await Bi()},50),$8=Kn(async()=>{await Ll()},50),Y8=Kn(async()=>{await Y3()},50),Q8=Kn(async()=>{await $3()},50),o9=Kn(t=>{_n({method:t,data:{trigger:"userscript_menu"}})},50);function J8(t,e){let n=t.document;if(t9)return;t9=!0,ye()||q3(),n.addEventListener("securitypolicyviolation",u7),document.addEventListener(me+"DocumentMessageUser",l9),document.addEventListener(me+"DocumentMessageUpdateUser",c9),document.addEventListener(me+"ChangeSuccessService",d9.bind(null,e)),document.addEventListener(me+"ChangeService",p9.bind(null,e)),document.addEventListener(qa,i7.bind(null,e)),n.addEventListener(me+"EbookLoaded",s7),n.addEventListener(V4,o7.bind(null,e)),n.addEventListener($4,l7.bind(null,e)),n.addEventListener(Ku,a=>{He()||um(a,e)}),n.addEventListener(Y4,by),n.addEventListener("click",a=>{e7(a,e)}),He()&&t.addEventListener("message",X8,!1),ye()&&(He()||n.addEventListener(Mr,Z8)),He()||oa.rootIframe(Zu).handleAsk("throttleRequest",K2)}function $s(t,e){c7(),J8(e,t),ye()&&(He()||(lm(t.config),d7(t.config))),al()&&Uy(t),et()&&lm(t.config)}function Z8(t){e9()}function X8(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===ju&&aa(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function e7(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&it(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Qm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}s9(u9.bind(null,e,o,i,s));return}}}async function t7(){let t=await fn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await mn(t)}async function n7(){let t=await fn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await mn(t)}var r9=0;function s9(t){let e=Date.now();if(e-r9<2e3||(r9=e,r7()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let m=document.createElement("div");m.className=Q+"-modal-content notranslate",u.appendChild(m);let g=document.createElement("span");g.textContent="\xD7",g.className=Q+"-close",m.appendChild(g);let f=document.createElement("div");f.className=i+" notranslate",m.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",m.appendChild(T);let b=document.createElement("div");b.className=s,m.appendChild(b),l.appendChild(u),g.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{a7()},100)}function u9(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=Ye.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",m=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),m.setAttribute(`data-${Q}-action`,"retry");let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 16 16"),g.setAttribute("width","20"),g.setAttribute("height","20"),g.innerHTML='',m.appendChild(g),m.onclick=()=>{a.style.display="none",Qm({method:"retryFailedParagraphs"}),wa(m,!0)}}else if(r=="login")p=u("goLogin"),m.onclick=()=>{wa(m,!0),window.open(Tb)};else if(r=="upgrade")p=u("upgradeToPro"),m.onclick=()=>{wa(m,!0),window.open(el)};else if(r=="setting")p=u("goSettings"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)},Zm(t,t.config.translationService,!1).then(g=>{g?(p=u("toggleToService",{service:u("translationServices."+g)}),m.innerHTML=Ye.sanitize(p),m.onclick=()=>{g9(g),wa(m,!0)}):(p=u("goSettings"),m.innerHTML=Ye.sanitize(p))});else if(r=="none")return;m.className="immersive-translate-btn",m.innerHTML+=Ye.sanitize(p),s.appendChild(m)}function r7(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function a7(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function i7(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;s9(u9.bind(null,t,a,i,o))}catch(r){B.warn("parse message error",r)}}async function o7(t,e){let n=e;if(B.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Qm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")_l(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")t7();else if(a.type==="toggleEnableInputTranslation")n7();else if(a.type==="translatePage")p7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ps(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=sc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await g7(a.data,i)}catch(o){a9(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Pl(a.data):a.type==="sharePage"?um({detail:a.data},t):a.type==="switchTranslationMode"?Jm(a.data):o9(a.type);r&&a.id&&a9(a.type,r,a.id)}}catch(a){B.warn("parse message error",a)}}}function s7(t){setTimeout(()=>{nd()},10)}function u7(t){we.HAS_CSP_ERROR="1"}function l7(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&it(n.name,[{name:n.name}],{...t})}function c7(){n9.forEach(t=>{t()}),n9=i9}function d7(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=ll.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ho(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:N0,title:ho("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:U0,title:ho("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:O0,title:ho("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:z0,title:ho("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===O0?V8():i.id===z0?$8():i.id===U0?Y8():i.id===N0?Q8():o9(i.id)},i.key)}}function Qm(t){aa(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{B.error("send content message request failed",t,n)});let e=new CustomEvent(Mr,{detail:t});globalThis.document.dispatchEvent(e)}async function p7(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await We(Ee(),e);Tn(n)}function a9(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function g7({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await tt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var oi={};async function Xm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ht(),"en"]});return qn(n),n}async function m9(t){gn("Translating");let e=vt(),n=El(),r=[...document.querySelectorAll(".source-text")];if(Vi(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return lt(i,"id",o+""),s&&($i(s,o)?.remove(),s.appendChild(vs(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await tt({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=$i(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=Ye.sanitize(`${i.message}`),oi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=Ye.sanitize(o.text),oi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{gn("Translated")}}async function f9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(oi),n=[],r=[];for(let a of e){let i=oi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete oi[a],u.appendChild(vs(t,a)),r.push(i.sentence))}}}try{await tt({sentences:r},t,(a,i,o)=>{let s=o.id,u=$i(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ye.sanitize(`${a.message}`),oi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=Ye.sanitize(i.text),oi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function ef(){gn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var tf={};async function h9(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return qn(n),n}async function b9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(tf),n=[];for(let r of e){let a=tf[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${Vu}='${r}']`);o&&o.remove(),n.push(a)}}try{Is(),await gc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}function T9(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function y9(t){gn("Translating");let e=gs(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;io(u,t);let l=u.body;if(!l)continue;let c=on(t);c.isModifyImage=!1,Ur({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=fr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=Vl(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Ig(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),tf[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await gc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}d();var ar=!1,rd,v9=!1,ad=null;function nf(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){B.debug("exclude url for input");return}if(ad===!1){B.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};kn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();rd&&self.removeEventListener("keydown",rd),rd=u,self.addEventListener("keydown",rd);function u(c){if(ar||ad===!1)return;let p=c,m=p.target||p.srcElement,g=m?.tagName;(m?.isContentEditable||g=="INPUT"||g=="SELECT"||g=="TEXTAREA")&&(A7(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&h7()&&(o=0,f7(c,t,i))}k7(t)}function x9({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function id(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var xo;function E9(t){let e=t.parentElement;if(!e)return;xo=document.createElement("div"),xo.className=Q+"-input",xo.innerHTML=`
`,e.appendChild(xo);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function C9(){xo&&xo.remove()}async function m7(t){if(!ar)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=id(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=x9(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let E=l.slice(s.length+1,l.indexOf(u)).trim();if(c=id(E,i.codeAlias),!c){B.warn("not found alias",E);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};kn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;ar=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=w9(u,i),m=await Ie({text:p,pageLangs:["en"]});B.debug("translateContent",p,m);let g={text:p||"",id:0,from:m,to:c,url:"https://google.com",fromByClient:m,force:!0};if(!g.text||g.text.length>5e3)return;E9(o),Xe(Gu,Date.now());try{let b=await ma(g,{...t,translationService:t.inputTranslationService});A9(t),D9(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:h}))}}finally{ar=!1}}catch(e){throw ar=!1,e}finally{ar=!1,C9()}}async function f7(t,e,n){if(!ar)try{let p=function(){s=e.config.inputTargetLanguage;let g=o.split(" ")[0];g&&g[0]&&(g=g[0].toLowerCase()+g.slice(1)),g.trim()&&n.flatAlias.includes(g)?(s=id(g,n.codeAlias),i=o.slice(g.length+1)):i=o},m=function(){s="";let g=x9(n),f=o.split(g);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=id(T,n.codeAlias),!s){B.warn("not found alias",T);return}},r=document.activeElement;ar=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(m(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=w9(i,n),l=await Ie({text:u,pageLangs:["en"]});B.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!v9){v9=!0;let g=await P7(e);if(t.target&&t.target.focus(),g==="open_settings"){Bi(!0,"#input");return}else if(g==="open_learn_more"){Ri("https://immersivetranslate.com/docs/input/");return}else if(g==="disable_once"||g==="disable_forever"){if(ad=!1,g==="disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="disable_once"){let f=await fn();f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="close_disable_once"||g==="close_disable_forever"){if(ad=!1,g==="close_disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="enable"){let f=await fn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="close_enable"){let f=await fn();f.enableInputTranslation=!0,await mn(f)}}E9(r),Xe(Gu,Date.now());try{let g=await ma(c,{...e,translationService:e.inputTranslationService});A9(e),D9(e,r,a+g.text)}catch(g){if(g instanceof $){let f=g.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:f}))}}finally{ar=!1}}catch(r){throw ar=!1,r}finally{ar=!1,C9()}}function h7(){let t=document.activeElement;if(!t)return!1;if(od(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Xt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Ri(f)}catch(g){B.error(g)}}async function by(){let t=await Zt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Q4,{detail:JSON.stringify(t.draft)}))}async function f5(){try{if(await bl("reportActive"))return;B.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Pp();await ce({url:ns+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),ps("reportActive","1")}catch(t){B.error(t)}}d();d();var Ty={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},yy={...Nt,"zh-CN":{...Ty["zh-CN"],...Nt["zh-CN"]},"zh-TW":{...Ty["zh-TW"],...Nt["zh-TW"]}},vy=yy;function bo(t,e,n){return mr(yy,t,e,pr,n)}var Ta=(t,e,n,r)=>{let a=db[t]||t,i=pb[t],o=gb[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();function lm(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&vn(o,s=>{s.preventDefault();let u=r[i];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var Sy=`${Q}-float-ball`;function ya(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${Sy}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${Sy}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function xy(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let m of p)a[m]||(a[m]=[]),a[m].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Ey(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var Uc="DROP_DOWN_DEFAULT_VALUE";function cm(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=$e(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:Uc,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==Uc){s.current.value=Uc,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:Uc,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function To(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var h5=({date:t})=>{let{t:e}=Ce(),[n,r]=se(!1);return Ae(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},b5=({minVersion:t})=>{let{t:e}=Ce();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},T5=()=>{let{t}=Ce();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},y5=({message:t,handleSyncing:e,date:n})=>{let{t:r}=Ce();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function dm(t){let{isShowError:e,request:n}=t,[r,a]=se(null),{t:i}=Ce(),[o,s]=se(null),[u,l]=se(null),[c,p]=se(""),[m,g]=se(!1),[f,T]=se(!1),[b,h]=se(!1),[E,D]=se(null),[M,I]=se(null),S=Ut(),y=async()=>{p("");let L=o;if(o===null)try{let A=await n({url:Zo});A?(s(A),L=A,g(!0)):(p(i("unknownError")),l(null))}catch(A){l(null),p(A.message);return}L!==null?(t.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ae(()=>{Pn().then(L=>{let A=L.buildinConfigUpdatedAt;D(L);let v=new Date(A);if(a(A),S==="0.0.0"){h(!0);return}n({url:Zo}).then(O=>{let _=O,k=_.minVersion,N=S;s(_);let z=_.latestVersion;if(z&&(To(N,z)?I(!0):I(!1)),To(N,k)){let q=_.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(O=>{l(null),p(O.message)})})},[]),Ae(()=>{Pn().then(L=>{D(L)})},[r]),E?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(T5,{}):c?e===!1?null:w(y5,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(b5,{minVersion:o.minVersion}):u===null||u===!0?null:m?w(h5,{date:r}):null}):null}d();function v5(){return navigator.userAgent.indexOf("Mac")!==-1}var Cy={Alt:"\u2325"};function qc(t=""){return v5()?Object.keys(Cy).reduce((e,n)=>e.replace(n,Cy[n]),t):t}d();function wy({config:t,isLogin:e,isProUser:n}){let{t:r}=Ce();return pl(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?Xu:yb,children:[w("img",{src:e?WT:HT}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Xu:vb,children:w("img",{src:n?qT:jT})})]})}d();function Dy({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=Ce();if(!e)return null;let i=sc(e.config.translationService,e.config.targetLanguage),o=kn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(S5,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:KT,style:{maxWidth:"unset"},class:"mx-2"}),w(x5,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function S5(t){let{t:e}=Ce(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=Ta(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=Ta(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function x5(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=Ta(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=Ce();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function Ay(t){let{t:e}=Ce(),{translationServiceItems:n,translationServiceOptions:r}=D5(t);return n.length?w(jt,{children:[w(ky,{class:"mt-3",label:e("popupService"),items:r}),w(E5,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function ky(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function E5({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=Ce(),a=w5(t),i=C5(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},m=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...m,[u]:l}}}})},[]),s=Ue(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(jt,{children:s.map(({label:u,items:l},c)=>w(ky,{class:"mt-2",label:u,items:l},"field-"+c))})}function C5(t){return Ue(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function w5(t){return Ue(()=>{let{translationService:n}=t.config;if(gr[n])return vl("translationService",n,t)},[gr,vl,t])}function D5({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=Ce(),u=Ue(()=>e?gs(e,"translationService"):[],[gs,e]),l=Ve(p=>{let m=u.find(g=>g.id===p.value);if(m.ok){if(n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;m.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ue(()=>{let p=tt();return u.filter(g=>e.config.showUnconfiguredTranslationServiceInPopup===!1?g.ok:!0).map(g=>({label:`${s("translationServices."+g.id)}${g.ok?"":" "+(" "+(!t&&!p&&g.providers&&g.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:g.id,selected:g.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function Py(t){let e;try{e=new URL(t)}catch{return!1}let n=$3(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(A5(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function A5(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function Ly(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function _y(t){let{t:e}=Ce(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=k5(t),[o,s]=se(()=>a?"excludeMatches":"matches"),u=Ue(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function k5({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,m=null,g=null,{translationUrlPattern:f}=e.config;if(l=Ue(()=>new URL(t||""),[t]),e.config&&t&&Py(t)){c=Ly(t);let{matches:h,excludeMatches:E}=f;p=!!h.find(D=>dt(t,D)),m=!!E.find(D=>dt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:E}=h;E.includes(n)?g=!0:g=!1}let T=Ve(()=>{let h=l.hostname,E=e.localConfig.tempTranslationUrlMatches||[],D=E.filter(I=>I.match!==h),M=!1;D.length!==E.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,E)=>{if(h==="default"){s(I=>{let S={...I.translationUrlPattern};return{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,matches:pm(t,S.matches),excludeMatches:pm(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(I=>{let S={...I.translationUrlPattern};return S[M]=pm(t,S[M]),S[D]=ml(E,S[D]),{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:m,isAlwaysTranslateLang:g,handleTranslationUrlPatternSelected:b}}function pm(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!dt(t,n)):e):[]}d();d();d();var P5=new AbortController,{signal:L5}=P5,jc=0,Hc=0,yo=!1,ni,Fy=0,Sa=[];function vo(t,e){_5();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(B.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,vo(n,e)):(B.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,vo(n,e))}document.addEventListener(Qo,s),Sa.push(()=>{document.removeEventListener(Qo,s)});let u=Kn(m=>{if(!(Math.abs(m.clientX-jc)+Math.abs(m.clientY-Hc)<=3)&&(jc=m.clientX,Hc=m.clientY,o||yo&&!ni)){let g=Ry(n.rule,e);if(g){if(hm(g))return;fm(n,!1,g)}}},o?700:300),l=m=>{let g=m.target;hm(g)||fm(n,!0)},c=m=>{let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=vn.getPressedKeyCodes();if(f.length>1&&vn[g]&&(Fy=Date.now(),yo=!1),f.length===1&&vn[g]){let T=Date.now();yo=!0,ni&&clearTimeout(ni),ni=setTimeout(()=>{let b=Fy-T;b>0&&b<=i?yo=!1:l(m),ni=void 0},i)}};if(Sa.push(()=>{ni&&clearTimeout(ni)}),a)return;gm("mousemove",u,e),Sa.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():yo=!1}if(gm("blur",p,e),Sa.push(()=>{e.removeEventListener("blur",p)}),!o){let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",g=hb;gm("keyup",My,e),Sa.push(()=>{e.removeEventListener("keyup",My)}),g.includes(m)?vn("*","mouseHover",c):vn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),vn.setScope("mouseHover"),Sa.push(()=>{vn.deleteScope("mouseHover")})}}function _5(){Sa.forEach(t=>t()),Sa=[],vn.setScope("all")}function My(t){yo=!1}function gm(t,e,n=window){return n.addEventListener(t,e,{signal:L5})}function fm(t,e,n,r=window){if(n=n||Ry(t.rule,r),!n){B.debug("can not find selection part!");return}if(M5(n,e))return;if(hm(n)){B.debug("exclude dom");return}my(t,n);let i=Hs();i&&(i.setupMouseHoverListener=vo);let o=on(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=om({...i},t);Ur({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Za(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();et(Z4,p),ot("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function Ry(t,e){return F5(jc,Hc,t,e)}function F5(t,e,n,r){let a=v1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=S1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:Iy(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){B.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{I5(r)}),!0}function B5(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function I5(t){let e=Hs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Is(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function mm(t){return!!(t.host&&t.mode)}function By(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||mm(n))return t;for(;n&&n.nodeName!=="BODY"&&!mm(n)&&Tp(n,e);){let r=n.parentNode;if(r&&mm(r))break;n=r}return n}function Iy(t,e){return t.nodeType===Node.TEXT_NODE||Tp(t,e)?By(t,e):t}function Oy(t,e){jc=e.clientX,Hc=e.clientY,fm(t,!0)}var Ws=[];function bm(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Ws.push(()=>{document.removeEventListener("click",i)})}function zy(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Ws.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function Wc(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ws.push(()=>{document.removeEventListener("touchstart",r)})}var Tm={touchShortcutsOff:()=>{},"multipleClick.2":bm,"multipleClick.3":bm,"multipleClick.4":bm,"slide.left":zy,"slide.right":zy,"fingers.2":Wc,"fingers.3":Wc,"fingers.4":Wc,"fingers.5":Wc};async function Uy(t){try{q5();let e=await Or(),n=mb.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=R5(t,e,r.command),i=Tm[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{U5(r.command,t,u)})})}catch(e){B.error(e)}}function R5(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var O5=()=>{ym();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},z5=()=>{Sm();let t=new CustomEvent(Mr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},N5=()=>{vm();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},Ny=0,U5=(t,e,n)=>{new Date().getTime()-Ny<200||(Ny=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?O5():t==="touchShortcutsToggleTranslationMask"?N5():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?z5():t==="touchShortcutsToggleTranslateTouchElement"&&Oy(e,n))};function q5(){Ws.forEach(t=>{t()}),Ws=[]}function qy(t){let{t:e}=Ce(),{ctx:n,setSettings:r}=t,a=j5(t);return as(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||ts[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(H5,{...t})}function j5({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=Ce(),a=Ue(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ue(()=>ts.filter(s=>!(s==="Off"||ts.includes(a)&&s==="OtherCustom")),[t,a]);return Ue(()=>i.map(s=>{let u=r("mouseHoldKey",{key:qc(s)}),l=ts.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(m=>{let g={...m.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(g.mouseHoverHoldKey=p.value),{...m,generalRule:g}})}}}),[i,a])}function H5(t){let{ctx:e,setSettings:n}=t,{t:r}=Ce(),a=e.config.generalRule,i=Object.keys(Tm).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(m=>{let g={...m.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(g.touchShortcutsToggleTranslateTouchElement=p.value),{...m,generalRule:g}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let m=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?m:"touchShortcutsOff"}}})}})]})}d();function jy(t){let{isAlwaysTranslateLang:e}=W5({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=Ce();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Ta(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:fl(t.currentLang,u.matches),excludeMatches:fl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=ml(t.currentLang,u[i]),u[o]=fl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function W5({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var K5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:m})=>{let[g,f]=se(!1),T=$e(null),b=$e(null),h=()=>{u||!l&&ut().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),m?.()},s))},E=()=>{ut().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ue(()=>{let I={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(I.maxWidth="200px",o&&(I.width=o+"px"),I.whiteSpace="normal"),n){case"top":return{...I,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...I,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...I,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...I,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&E()},children:e}),g&&w("div",{style:M,role:"tooltip",children:t})]})},xa=K5;d();var Hy=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Wy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ky=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),Gy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),$y=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Vy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Yy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function Jy({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=Ce(),a=Me(),i=Math.round((_i.supportedVideoSubtitleSites||[]).length/10),o=Ue(()=>[{title:r("widget.translateFile"),icon:Hy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Wy,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:Ky,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(Cb)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(xa,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(Qy,{...s})}):w(Qy,{...s}))})}function Qy(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function xm(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=se(""),[l,c]=se(i),[p,m]=se(null),[g,f]=se(null);Ae(()=>{Mt.get(Ft,null).then(E=>{E?(m(E),f(Jt(E))):f(!1)}).catch(E=>{f(!1)})},[]);let T=!0,b=tt();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=pl(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(wy,{isLogin:!!p,isProUser:!!g,config:n}),w(J5,{openSharePage:r})]}),w(Dy,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(Ay,{isProUser:!!g,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w($5,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(Y5,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(dm,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(_y,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(qy,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(jy,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(G5,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(Jy,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(V5,{...t,isProUser:!!g,isShowPricing:T,setMessage:u})]})}function G5(t){let{t:e}=Ce(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ue(()=>!n.rule.subtitleRule.disabled&&H0.includes(n.rule.subtitleRule.type||""),[n,H0])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function $5(t){let{t:e}=Ce(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(xa,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?$y:Vy})})}function V5(t){let{t:e,lang:n}=Ce(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[Gy,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(Q5,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(cm,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:g=>{g.value==="openPremium"?(globalThis.open(Ai),t.onClose()):g.value==="changeToOnlyTranslationMode"?c("translation"):g.value==="changeToDualTranslationMode"?c("dual"):g.value==="translateTheWholePage"?t.onTranslateTheWholePage():g.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():g.value==="translateTheMainPage"?t.onTranslateTheMainPage():g.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):g.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):g.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):g.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):g.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):g.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):g.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):g.value==="options"?(t.openOptionsPage(),t.onClose()):g.value==="changeToTranslateTheWholePage"?p():g.value==="changeToTranslateTheMainPage"?m():g.value==="about"?t.openAboutPage():g.value==="toggleEnabled"?t.onToggleEnabled():g.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):g.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):g.value==="goPro"&&t.onOpenUrl(Ai,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(g){g.preventDefault(),t.openOptionsPage()}function c(g){t.setSettings(f=>({...f,translationMode:g})),t.onSwitchTranslationMode(g)}function p(){t.setSettings(g=>({...g,translationArea:"body"})),t.onTranslateTheWholePage()}function m(){t.setSettings(g=>({...g,translationArea:"main"})),t.onTranslateTheMainPage()}}function Y5({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=Ce(),l=r.config,c=Ue(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Ga(r?.rule)&&!p&&(p=!0);let m=s("translate");e==="Translated"||e==="Error"?m=s("show-original"):e==="Original"?p?Ir()&&c.protocol==="file:"||o?m=s("translate-firefox-local-pdf"):ye()?m=s("noSupportTranslate-pdf"):m=s("translate-pdf"):m=s("translate"):m=s(e);let g=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(al()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(m+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):m+=` (${qc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(g+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:m})}function Q5({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=Ce(),o=Ut();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Ey(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function J5(t){let{t:e}=Ce();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),Yy]})}d();d();d();d();var Em={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Kc(t,e,n){let[r]=se(()=>typeof e=="function"?e():e),[a]=se(n),[i,o]=se(r),[s,u]=se(!1),[l,c]=se("");Ae(()=>{Em.get(t,r,a).then(m=>{m[t]&&o(m[t]),u(!0),c("")}).catch(m=>{u(!1),c(m)})},[t,r,a]);let p=Ve(m=>{let g=typeof m=="function"?m(i):m;B.debug("new settings",g),Em.set(t,g,a).then(()=>{o(g),u(!0),c("")}).catch(f=>{o(g),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Cm(t,e,n){let r=[];return function(){let[i,o,s,u]=Kc(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ae(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Zy(t,e){return Cm(t,e,"sync")}var Z5="userConfig",X5=null,e8=Zy(Z5,X5);function jr(t){let[e,n,r,a]=e8(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();async function Gc(t){try{let e=new Date;B.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Xo]:e.toISOString()}),await t8(),ye()||await J3()}catch(e){B.error("run cron task failed",e)}}async function Xy(){let e=(await an()).interval;if(e){let n=await oe.storage.local.get(Xo);if(n&&n[Xo]){let r=n[Xo];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:e}),B.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),aa({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{B.error("send content message request failed from cron task",u)})):B.debug(`no need to sync rules, latest: ${r}`):B.info(`local version is too old, please update to ${o} or later`)}catch(t){B.error("sync rules error: ",t)}}d();d();d();d();d();d();var wm;function Im(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function uv(t,e=","){return t.map(Im).join(e)}var lv=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Vc(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Yc(t,e="@media "){return e+Mn(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Mn(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function n8(){}var $t={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function cv(t){return t.match(/[-=:;]/g)?.length||0}function _m(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(cv(t),15)<<18}var r8=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Rm({n:t,i:e,v:n=[]},r,a,i){t&&(t=Im({n:t,i:e,v:n})),i=[...Mn(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Mn(u&&Yc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|_m(l):s=="dark"?1073741824:l[0]=="@"?_m(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~r8.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var Om=new Map;function ev(t){if(t.d){let e=[],n=Dm(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Dm(r,i=>Dm(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Am(i,o)}return Am(o,i)})):r,"&"),r=>Am(r,t.n?"."+lv(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Dm(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Am(t,e){return t.replace(/&/g,e)}var tv=new Intl.Collator("en",{numeric:!0});function a8(t,e){for(var n=0,r=t.length;n>1;0>=dv(t[a],e)?n=a+1:r=a}return r}function dv(t,e){let n=t.p&$t.o;return n==(e.p&$t.o)&&(n==$t.b||n==$t.o)?0:t.p-e.p||t.o-e.o||tv.compare(nv(t.n),nv(e.n))||tv.compare(rv(t.n),rv(e.n))}function nv(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function rv(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function km(t,e){return Math.round(parseInt(t,16)*e)}function Ea(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[km(t.substr(1,i),o),km(t.substr(1+i,i),o),km(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function pv(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let m=[],g="",f=0,T=0;for(let E in o||{}){var b,h;let D=o[E];if(E[0]=="@"){if(!D)continue;if(E[1]=="a"){m.push(...mv(s,u,Nm(""+D),p,u,l,c,!0));continue}if(E[1]=="l"){for(let M of Mn(D))m.push(...i(M,{n:s,p:(b=$t[E[7]],u&~$t.o|b),r:E[7]=="d"?[]:l,i:c},p));continue}if(E[1]=="i"){m.push(...Mn(D).map(M=>({p:-1,o:0,r:[],d:E+" "+M})));continue}if(E[1]=="k"){m.push({p:$t.d,o:0,r:[E],d:i(D,{p:$t.d},p).map(ev).join("")});continue}if(E[1]=="f"){m.push(...Mn(D).map(M=>({p:$t.d,o:0,r:[E],d:i(M,{p:$t.d},p).map(ev).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))E=="label"&&D?s=D+Vc(JSON.stringify([u,c,o])):(D||D===0)&&(E=E.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=E)[0]=="-"?0:cv(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+Mn(D).map(M=>p.s(E,gv(""+M,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let M=u;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(I,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Yc(y,"")):I}),M|=_m(E)),m.push(...i(D,{n:s,p:M,r:[...l,E],i:c},p))}else m.push(...i(D,{p:u,r:[...l,E]},p))}return m.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:g}),m.sort(dv)}(t,Rm(e,n,r,a),n)}function gv(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Ea(s):""+Mn(s).filter(u=>Object(u)!==u)})}function zm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function Fm(t,e,n=$t.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,m){u={...u,i:u.i||m};let g=function(f,T){let b=Om.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return g?typeof g=="string"?({r:p,p:c}=Rm(u,l,c,p),zm(Fm(Nm(g),l,c,p,u.i),u.n)):Array.isArray(g)?g.map(f=>{var T,b;return{o:0,...f,r:[...Mn(p),...Mn(f.r)],p:(T=c,b=f.p??c,T&~$t.o|b)}}):pv(g,u,l,c,p):[{c:Im(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(a8(i,s),0,s);return i}function mv(t,e,n,r,a,i,o,s){return zm((s?n.flatMap(u=>Fm([u],r,a,i,o)):Fm(n,r,a,i,o)).map(u=>u.p&$t.o&&(u.n||e==$t.b)?{...u,p:u.p&~$t.o|e,o:0}:u),t)}function i8(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Rm(i,o,e);return n&&mv(s,e,n,o,u,l,c,r)},Om.set(t,a),t}function Pm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(o8),i:a}))}}function o8(t,e,n){return n.indexOf(t)==e}var av=new Map;function Nm(t){let e=av.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&Pm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Vc(JSON.stringify([p,m])):p+"("+uv(m)+")",$t.a,m,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),av.set(t,e=r[0])}return e}function fv(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function hv(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?fv(t,e,n=>Lm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+Lm(r),t?Lm(t):"")}function Lm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=hv(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var dse=bv("@"),pse=bv("~");function bv(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return uv(Nm(n+t+"("+hv(r,a)+")"))}}function Mm(t,e){return Array.isArray(t)?iv(fv(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?iv(t):[t]}var s8=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function iv(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=s8.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function Tv(t,...e){var n;let r=Mm(t,e),a=(r.find(i=>i.label)?.label||"css")+Vc(JSON.stringify(r));return n=(i,o)=>zm(r.flatMap(s=>pv(s,i,o,$t.o)),a),Om.set(a,n),a}var gse=new Proxy(function(t,e){return ov("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ov(e,n,r)}}});function ov(t,e,n){return{toString(){return Tv({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function X(t,e,n){return[t,u8(e,n)]}function u8(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):Bm(n,1)}):n=>t||{[n[1]]:Bm(n,2)}}function Bm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function te(t,e,n,r){return[t,l8(e,n,r)]}function l8(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=yv(t||a[1]),s=i.theme(o,a.$$)??So(a.$$,o,i);if(s!=null)return a._=Bm(a,0,s),r(a,i,o)}}function It(t,e={},n){return[t,c8(e,n)]}function c8(t={},e){return(n,r)=>{let{section:a=yv(n[0]).replace("-","")+"Color"}=t,[i,o]=d8(n.$$);if(!i)return;let s=r.theme(a,i)||So(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,m=r.theme(l,o||"DEFAULT")||o&&So(o,l,r),g=e||(({_:T})=>{let b=Ks(c,T);return p?{[p]:b}:b});n._={value:Ea(s,{opacityVariable:u||void 0,opacityValue:m||void 0}),color:T=>Ea(s,T),opacityVariable:u||void 0,opacityValue:m||void 0};let f=g(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:Ea(T,{opacityVariable:u||void 0,opacityValue:m||"1"}),color:b=>Ea(T,b),opacityVariable:u||void 0,opacityValue:m||void 0},f={"&":f,[r.v("dark")]:g(n,r)})}return f}}function d8(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ks(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function So(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=$c(gv(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function yv(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function $c(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>$c(n)+r+$c(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var mse=Symbol();var vv=new Proxy(n8,{apply(t,e,n){return wm(n[0])},get(t,e){let n=wm[e];return typeof n=="function"?function(){return n.apply(wm,arguments)}:n}});var fse=function t(e){return new Proxy(function(n,...r){return sv(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return sv(e,r,a,i)}}})}();function sv(t,e,n,r){return{toString(){let a=Mm(n,r),i=lv(e+Vc(JSON.stringify([e,a])));return(typeof t=="function"?t:vv)(Tv({[`@keyframes ${i}`]:Mm(n,r)})),i}}}d();d();d();d();d();var Sv={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Bn(4,"rem",4,.5,.5),...Bn(12,"rem",4,5),14:"3.5rem",...Bn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ke("blur"),backdropBrightness:Ke("brightness"),backdropContrast:Ke("contrast"),backdropGrayscale:Ke("grayscale"),backdropHueRotate:Ke("hueRotate"),backdropInvert:Ke("invert"),backdropOpacity:Ke("opacity"),backdropSaturate:Ke("saturate"),backdropSepia:Ke("sepia"),backgroundColor:Ke("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ke("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Bn(200,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:Ke("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ke("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ke("colors"),caretColor:Ke("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Bn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ke("borderColor"),divideOpacity:Ke("borderOpacity"),divideWidth:Ke("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Gs(2,6),...Gs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ke("spacing"),gradientColorStops:Ke("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Gs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Gs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Bn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Bn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ke("spacing"),placeholderColor:Ke("colors"),placeholderOpacity:Ke("opacity"),outlineColor:Ke("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ke("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:Bn(200,"",100,0,50),scale:{...Bn(150,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ke("spacing"),scrollPadding:Ke("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:Ke("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Bn(2),textColor:Ke("colors"),textDecorationColor:Ke("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:Ke("spacing"),textOpacity:Ke("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:Ke("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Gs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Bn(50,"",1,0,10),auto:"auto"}};function Gs(t,e){let n={};do for(var r=1;re(t)}var Mse={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Sv.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Sv.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},Ise=[X("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:So(`[${e}]`,"",n)}}})),X("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),te("aspect-","aspectRatio"),X("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Yc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),X("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),X("box-(border|content)","boxSizing",({1:t})=>t+"-box"),X("hidden",{display:"none"}),X("table-(auto|fixed)","tableLayout"),X(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",X("isolate","isolation"),X("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),X("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Qc),X("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),X("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),te("-?(top|bottom|left|right)(?:$|-)","inset"),X("(visible|collapse)","visibility"),X("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),X("flex-((row|col)(-reverse)?)","flexDirection",xv),X("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),X("grid-cols-(\\d+)","gridTemplateColumns",Dv),te("col-","gridColumn"),X("col-(span)-(\\d+)","gridColumn",wv),te("col-start-","gridColumnStart"),X("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),X("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),X("grid-rows-(\\d+)","gridTemplateRows",Dv),te("row-","gridRow"),X("row-(span)-(\\d+)","gridRow",wv),te("row-start-","gridRowStart"),X("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),X("row-end-(auto|\\d+)","gridRowEnd"),X("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Qc(xv(t))),X("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",X("justify-","justifyContent",Ev),X("(content|items|self)-",t=>({["align-"+t[1]]:Ev(t)})),X("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),te("p([xytrbl])?(?:$|-)","padding",xo("padding")),te("-?m([xytrbl])?(?:$|-)","margin",xo("margin")),te("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),X("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:t})=>typeof(t=Mn(t))[1]=="string"?{fontFamily:rr(t)}:{fontFamily:rr(t[0]),...t[1]}),X("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),X("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),X("italic","fontStyle"),X("not-italic",{fontStyle:"normal"}),X("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),X("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),X("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),It("placeholder-",{property:"color",selector:"&::placeholder"}),X("text-(left|center|right|justify|start|end)","textAlign"),X("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),It("text-",{property:"color"}),te("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),te("indent-","textIndent"),X("(overline|underline|line-through)","textDecorationLine"),X("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),It("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),X("decoration-","textDecorationStyle"),X("(uppercase|lowercase|capitalize)","textTransform"),X("normal-case",{textTransform:"none"}),X("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),X("align-","verticalAlign"),X("whitespace-","whiteSpace"),X("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),X("break-words",{overflowWrap:"break-word"}),X("break-all",{wordBreak:"break-all"}),X("break-keep",{wordBreak:"keep-all"}),It("caret-",{opacityVariable:!1,opacitySection:"opacity"}),It("accent-",{opacityVariable:!1,opacitySection:"opacity"}),X("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ri(t," ")},var(--tw-gradient-stops))`),It("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),It("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),It("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),X("bg-(fixed|local|scroll)","backgroundAttachment"),X("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),X(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),X("bg-blend-","backgroundBlendMode"),X("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),It("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),X("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Qc),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ri(n[0])}-radius`]:e,[`border-${ri(n[1])}-radius`]:e}}),X("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),X("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),It("border-([xytrbl])-",{section:"borderColor"},xo("border","Color")),It("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",xo("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),X("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),X("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ri(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ri(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),It("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),It("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),X("ring-inset",{"--tw-ring-inset":"inset"}),It("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Ea(e("ringOffsetColor","","#fff")),"--tw-ring-color":Ea(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),It("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:t})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(t),"--tw-shadow-colored":rr(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),X("mix-blend-","mixBlendMode"),...Cv(),...Cv("backdrop-"),te("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:rr(t),transitionTimingFunction:t._=="none"?void 0:rr(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:rr(e("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",rr),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),te("delay(?:$|-)","transitionDelay","transitionDelay",rr),te("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=rr(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",X("transform",qm),X("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Av(t=="gpu")})),te("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...qm()})),te("-?(rotate)-","rotate",Um),te("-?(translate-[xy])-","translate",Um),te("-?(skew-[xy])-","skew",Um),X("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Qc),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",X("snap-(none)","scroll-snap-type"),X("snap-(x|y|both)",({1:t})=>({...Ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),X("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),X("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),X("snap-(normal|always)","scroll-snap-stop"),X("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",xo("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",xo("scroll-margin")),X("touch-(auto|none|manipulation)","touch-action"),X("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),X("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),X("outline",{outlineStyle:"solid"}),X("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),It("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],X("select-(none|text|all|auto)","userSelect"),It("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),It("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),X("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),X("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Qc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function xv(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ri(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function rr(t){return t&&""+(t._||t)}function Ev({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function xo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ks(t+"-"+ri(a[0])+e,r),...Ks(t+"-"+ri(a[1])+e,r)}:Ks(t+e,r)}}function Cv(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ca(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,X(`${t}filter`,n),...e.map(r=>te(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Mn(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Um({1:t,_:e}){return{["--tw-"+t]:e,...qm()}}function qm(){return{...Ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Av()}),transform:"var(--tw-transform)"}}function Av(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function wv({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Dv({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ca(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Jc=globalThis||(typeof window<"u"?window:self),m8=Object.create,Hm=Object.defineProperty,f8=Object.getOwnPropertyDescriptor,h8=Object.getOwnPropertyNames,b8=Object.getPrototypeOf,T8=Object.prototype.hasOwnProperty,y8=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),v8=(t,e)=>{for(var n in e)Hm(t,n,{get:e[n],enumerable:!0})},jm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of h8(e))!T8.call(t,a)&&a!==n&&Hm(t,a,{get:()=>e[a],enumerable:!(r=f8(e,a))||r.enumerable});return t},S8=(t,e,n)=>(jm(t,e,"default"),n&&jm(n,e,"default")),Pv=(t,e,n)=>(n=t!=null?m8(b8(t)):{},jm(e||!t||!t.__esModule?Hm(n,"default",{value:t,enumerable:!0}):n,t)),Lv=y8((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var m=new XMLHttpRequest;m.open("GET",l),m.responseType="blob",m.onload=function(){u(m.response,c,p)},m.onerror=function(){},m.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Jc=="object"&&Jc.global===Jc?Jc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var m=o.URL||o.webkitURL,g=document.createElement("a");c=c||l.name||"download",g.download=c,g.rel="noopener",typeof l=="string"?(g.href=l,g.origin===location.origin?i(g):a(g.href)?r(l,c,p):i(g,g.target="_blank")):(g.href=m.createObjectURL(l),setTimeout(function(){m.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var m=document.createElement("a");m.href=l,m.target="_blank",setTimeout(function(){i(m)})}}:function(l,c,p,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var g=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=D:location=D,m=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,E=h.createObjectURL(l);m?m.location=E:location.href=E,m=null,setTimeout(function(){h.revokeObjectURL(E)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),_v={};v8(_v,{default:()=>Zc});var x8=Pv(Lv());S8(_v,Pv(Lv()));var{default:kv,...E8}=x8,Zc=kv!==void 0?kv:E8;d();d();d();d();d();d();var Sue=Me().REDIRECT_URL;d();var Xue=Gi([]);function Bv(t){let[e,n]=se(null);return Ae(()=>{Pn().then(r=>{n(r),B.debug("current config",r)})},[]),Ae(()=>{Pn().then(r=>{n(r)})},[t]),e}function Iv(t){let[e,n]=se(null);return Ae(()=>{t&&hn({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function Rv(){let[t,e]=se(null);return Ae(()=>{Zt().then(r=>{e(r)})},[]),[t,r=>{e(r),Xt(r)}]}d();async function _8(t,e,n){try{if(e===null)return"noupdate";let r=await Zt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await Wm(t,e),await Xt(r),"upload"}let a=await zv(t);r.accountLastSyncedAt=Date.now(),B.debug("settings",e),B.debug("local settings.updatedAt",e.updatedAt),B.debug("remote settings.updatedAt",a.updatedAt),B.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),B.debug("isUpload",i),i)return await Wm(t,e),await Xt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||F8(n)&&_8(n.token,t,e).then(i=>{B.debug("syncUserSetting result",i)})},[t,n])}function F8(t){return Jt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function zv(t){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ns+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function Wm(t,e){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ns+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function ed(t){let{onClose:e}=t,[n,r]=se("Original"),[a,i,o,s]=jr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});Xc(a,i);let[u,l]=se(null),[c,p]=se(globalThis.location.href),[m,g]=se("auto"),[f,T]=se(null),b=O=>{r(O.detail)};if(Ae(()=>(document.addEventListener(ja,b,!1),an().then(O=>{l(O);let _=vt();g(_);let k=Qe();r(k),Gc(O.interval)}),document.addEventListener("urlChange",E),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",E)}),[]),Ae(()=>{an().then(O=>{l(O)})},[a]),Ae(()=>{c&&u&&Km().then(O=>{T(O)})},[c,u]),!u||!f)return null;return w(xm,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:O=>{D("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:M,onToggleEnabled:I,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ra(f.rule)||c)},openAboutPage:A,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:m,onSetLocalConfig:kl,onSetBuildinConfig:j3,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(O){g(O);let _=xy(c,O,u.sourceLanguageUrlPattern);i(k=>({...k,sourceLanguageUrlPattern:_})),qn(O)}function E(){p(globalThis.location.href)}function D(O,_,k={}){let N={trigger:"page_popup",...k};return()=>{_n({method:O,data:N}),_&&e()}}function M(){e()}function I(){i(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{M()},50)}function S(O,_){let k=O;_&&(k=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${_}`),Fl(k,!0),setTimeout(()=>{M()},50)}function y(O){O&&(Oi(!1,O),setTimeout(()=>{M()},50))}function L(O=""){Bi(!0,O),setTimeout(()=>{e()},50)}function A(){Ll(),setTimeout(()=>{e()},50)}function v(){Q3(),setTimeout(()=>{e()},50)}}d();function jv(){let[t,e]=se("Original");return Ae(()=>{let n=Qe();e(n);let r=a=>{e(a.detail)};return document.addEventListener(ja,r),()=>{document.removeEventListener(ja,r)}},[]),{pageStatus:t}}var Nv=6,B8={position:"right",top:335};function Hv({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=$e(null),o=$e(null),[s,u]=se(!1),l=$e(null),c=$e(!1),p=$e(n.floatBallConfig||B8),m=$e(0),g=$e(0),f=$e(0),T=$e(!1),b=$e(0),h=$e(0),E=$e(0),D=$e(0),M=$e(!1),I=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},ut().any?3e3:0))},[u,l,T,a]);return Ae(()=>{a||u(!1)},[a]),Ae(()=>{if(i.current&&p.current){let S=Gm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ae(()=>{if(!o.current||!i.current)return;let S=k=>{k.preventDefault&&k.preventDefault(),m.current=k.clientX,g.current=k.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),I(!0),E.current=k.clientX,D.current=k.clientY,M.current=!1,ut().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Uv({startX:m.current,startY:g.current,endX:E.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",L),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},y=k=>{if(k.preventDefault&&k.preventDefault(),!c.current||!i.current||(E.current=k.clientX,D.current=k.clientY,M.current))return;let N=k.clientY-g.current+f.current,z=Gm(N);i.current.style.top=`${z}px`},L=k=>{if(k.preventDefault&&k.preventDefault(),_(),c.current=!1,clearTimeout(l.current),T.current||I(!1),M.current)return;Uv({startX:m.current,startY:g.current,endX:k.clientX,endY:k.clientY})||(clearTimeout(h.current),t());let z=Gm(k.clientY-30);p.current.top=z;let q=fs();kl({...q,floatBallConfig:p.current})},A=k=>{k.preventDefault&&k.preventDefault(),S(k.changedTouches[0])},v=k=>{k.preventDefault&&k.preventDefault(),y(k.changedTouches[0])},O=k=>{k.preventDefault&&k.preventDefault(),L(k.changedTouches[0])},_=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",A),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",A))}},[e,o,i,l,c,n,I,t]),Ae(()=>{if(ut().any)return;let S=L=>{L.target===i.current&&!T.current||(T.current=!0,I(!0),clearTimeout(l.current))},y=L=>{if(c.current){T.current=!1;return}L.target===i.current&&!T.current||I(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,I,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:I}}function Uv({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>Nv||i>Nv}function Wv(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ue(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ue(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ue(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Kv(){let[t,e]=se(!1);return Ae(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var qv="hasShownFloatingBallGuide",I8="2024-01-06";function Gv(t){let[e,n]=se(!1);Ae(()=>{!t.config.enableShowFloatingBallGuide||vt()==t.targetLanguage||(async()=>{let a=await At(qv,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function $v(t,e){let n=$e(0),[r,a]=se(!0),[i,o]=se(!1),s=jr(),[u,l]=s,{t:c}=Ce(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ae(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let m=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return ut().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),g=Ue(()=>ut().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ue(()=>ut().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:Ta(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:g,tooltipText:f,handleShowTooltip:m}}function Gm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ai=`${Q}-float-ball`;function Vv(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(R8,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function R8(t){let{t:e}=Ce(),[n,r]=se("UntilNext"),a=Ii()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ai}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ai}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(ya,{type:"modal-close"})})]}),w("div",{class:`${ai}-close-radio-content mt-3`,children:o.map(s=>w(O8,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ri(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ai}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ai}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function O8(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=z8(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ai}-radio-sel`:`${ai}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function z8(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();d();function Yv(t){return we.ASSETS_BASE_URL+t}var ii=`${Q}-float-ball`;function Qv(t){let{t:e}=Ce(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ue(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ii}-guide-container`,style:r,children:[w("img",{class:`${ii}-guide-bg ${t.fixedPosition}`,src:N8}),w("div",{class:`${ii}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ii}-guide-img`,src:Yv("images/float_ball_intro.png")}),w("div",{class:`${ii}-guide-message`,children:[e("floatBall.guideClickToTranslate"),ut().any?` +${e("floatBall.longPress")}`:""]}),w("div",{class:`${ii}-primary-btn ${ii}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var N8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function U8({isVisible:t,onClose:e,children:n}){return w(jt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Jv=U8;var $s=`${Q}-float-ball`;function $m(t){let{t:e}=Ce(),n=jr(),[r,a,i,o]=n;Xc(r,a);let s=Bv(r),u=Iv(s),{isFullScreen:l}=Kv(),[c,p]=se(!1),[m,g]=se(!0),{pageStatus:f}=jv(),T=Lp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ee();if(Ga(u?.rule)){let U=ra(u.rule);Oi(!0,U||P);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,_n,p]),h=Ve(()=>{p(!0)},[p]),E=m&&!!s,{containerRef:D,active:M,ballRef:I,floatBallConfigRef:S,setActive:y}=Hv({handleBallClick:b,handleMobileBallLongPress:h,isShow:E,localConfig:t.localConfig,popupVisible:c}),L=T?.fixedPosition||"right",A=L==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:O}=Gv(t.ctx),{closeTransform:_,logoContainerTransform:k,settingTransform:N}=Wv(T,M||v),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:F,handleShowTooltip:C}=$v(u,f);return E?w("div",{class:`${$s}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(q8,{ctx:u,setVisible:g,closeTransform:_,setActive:y,getModalStyle:()=>Zv(S.current.top,300,L)}),w(xa,{enableMobile:!0,text:F,position:A,delay:z,onShow:C,disable:q,children:w("div",{class:`${$s}-btn ${L} btn-animate `,ref:I,style:{transform:k,opacity:M||v?1:.5},children:w("div",{children:[w(ya,{type:"logo"}),f!=="Original"?w(ya,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:N},class:`${$s}-more-buttons btn-animate`,children:[w(xa,{text:e("translateFileTooltip"),multiple:!0,width:200,position:A,containerClass:"btn-animate",children:w("div",{class:`${$s}-more-button`,onClick:()=>{Fl(Db,!0)},children:w(ya,{type:"file"})})}),w(xa,{text:e("floatBall.setting"),position:A,containerClass:"btn-animate",children:w("div",{class:`${$s}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(ya,{type:"setting"})})})]}),w(j8,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Zv(S.current.top,500,L)}),w(Qv,{visible:v,top:S.current.top,fixedPosition:L,onClose:()=>{O(),y(!1)}})]}):null}function q8(t){let{t:e}=Ce(),[n,r]=se(!1),a=jr(),[i,o,s,u]=a,l=Lp(t.ctx,i),c=Ve(m=>{t.ctx&&o(g=>t2({...g},m))},[t.ctx,o]),p=Ve(m=>{l&&(t.setVisible(!1),m==="AlwaysClose"?c({...l,enable:!1}):m==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(jt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(ya,{type:"close"})}),w(Vv,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function j8(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Jv,{isVisible:t.visible,onClose:t.onClose,children:w(ed,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(ed,{onClose:t.onClose})})}):null}function H8(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Zv=(t,e,n)=>{let a=H8().height,i={position:"fixed"},o=0;return xf()&&(t=W8.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},W8={position:"right",right:0,top:335};function K8(t,e){for(let n of e){if(ye()&&!Ir()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function Vm(){let t=Me(),e=await an(),n=await Or(),r={url:globalThis.location.href,config:e},a=await hn(r),i=await _p(a,n),o=dt(a.url,i?.blockUrls),s=await Zt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return K8(l,[c]),G8(l,e,s,a)}function G8(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),Ki(w(mc,{lang:e.interfaceLanguage,fallbackLang:"en",translations:vy,children:w($m,{localConfig:n,ctx:r})}),a)}var Ym=!1;async function Xv(t){if(!t){let e=await an(),n={url:globalThis.location.href,config:e};t=await hn(n)}t.config.debug&&B.setLevel("debug"),t.isTranslateExcludeUrl?B.debug("detect exclude url, do not inject anything."):(Ym=!0,Vm().catch(e=>{B.debug("init popup error",e)}))}async function e9(){Ym||(Ym=!0,Vm().catch(t=>{B.error("init popup error",t)}))}var t9=!1,i9=[()=>{vn.unbind()}],n9=[...i9],$8=Kn(async()=>{await Bi()},50),V8=Kn(async()=>{await Ll()},50),Y8=Kn(async()=>{await Y3()},50),Q8=Kn(async()=>{await V3()},50),o9=Kn(t=>{_n({method:t,data:{trigger:"userscript_menu"}})},50);function J8(t,e){let n=t.document;if(t9)return;t9=!0,ye()||q3(),n.addEventListener("securitypolicyviolation",u7),document.addEventListener(me+"DocumentMessageUser",l9),document.addEventListener(me+"DocumentMessageUpdateUser",c9),document.addEventListener(me+"ChangeSuccessService",d9.bind(null,e)),document.addEventListener(me+"ChangeService",p9.bind(null,e)),document.addEventListener(qa,i7.bind(null,e)),n.addEventListener(me+"EbookLoaded",s7),n.addEventListener($4,o7.bind(null,e)),n.addEventListener(V4,l7.bind(null,e)),n.addEventListener(Ku,a=>{He()||um(a,e)}),n.addEventListener(Y4,by),n.addEventListener("click",a=>{e7(a,e)}),He()&&t.addEventListener("message",X8,!1),ye()&&(He()||n.addEventListener(Mr,Z8)),He()||oa.rootIframe(Zu).handleAsk("throttleRequest",K2)}function Vs(t,e){c7(),J8(e,t),ye()&&(He()||(lm(t.config),d7(t.config))),al()&&Uy(t),tt()&&lm(t.config)}function Z8(t){e9()}function X8(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===ju&&aa(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function e7(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ot(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Qm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}s9(u9.bind(null,e,o,i,s));return}}}async function t7(){let t=await fn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await mn(t)}async function n7(){let t=await fn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await mn(t)}var r9=0;function s9(t){let e=Date.now();if(e-r9<2e3||(r9=e,r7()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let m=document.createElement("div");m.className=Q+"-modal-content notranslate",u.appendChild(m);let g=document.createElement("span");g.textContent="\xD7",g.className=Q+"-close",m.appendChild(g);let f=document.createElement("div");f.className=i+" notranslate",m.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",m.appendChild(T);let b=document.createElement("div");b.className=s,m.appendChild(b),l.appendChild(u),g.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{a7()},100)}function u9(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=Ye.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",m=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),m.setAttribute(`data-${Q}-action`,"retry");let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 16 16"),g.setAttribute("width","20"),g.setAttribute("height","20"),g.innerHTML='',m.appendChild(g),m.onclick=()=>{a.style.display="none",Qm({method:"retryFailedParagraphs"}),wa(m,!0)}}else if(r=="login")p=u("goLogin"),m.onclick=()=>{wa(m,!0),window.open(Tb)};else if(r=="upgrade")p=u("upgradeToPro"),m.onclick=()=>{wa(m,!0),window.open(el)};else if(r=="setting")p=u("goSettings"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)},Zm(t,t.config.translationService,!1).then(g=>{g?(p=u("toggleToService",{service:u("translationServices."+g)}),m.innerHTML=Ye.sanitize(p),m.onclick=()=>{g9(g),wa(m,!0)}):(p=u("goSettings"),m.innerHTML=Ye.sanitize(p))});else if(r=="none")return;m.className="immersive-translate-btn",m.innerHTML+=Ye.sanitize(p),s.appendChild(m)}function r7(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function a7(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function i7(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;s9(u9.bind(null,t,a,i,o))}catch(r){B.warn("parse message error",r)}}async function o7(t,e){let n=e;if(B.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Qm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")_l(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")t7();else if(a.type==="toggleEnableInputTranslation")n7();else if(a.type==="translatePage")p7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=gs(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=sc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await g7(a.data,i)}catch(o){a9(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Pl(a.data):a.type==="sharePage"?um({detail:a.data},t):a.type==="switchTranslationMode"?Jm(a.data):o9(a.type);r&&a.id&&a9(a.type,r,a.id)}}catch(a){B.warn("parse message error",a)}}}function s7(t){setTimeout(()=>{td()},10)}function u7(t){we.HAS_CSP_ERROR="1"}function l7(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ot(n.name,[{name:n.name}],{...t})}function c7(){n9.forEach(t=>{t()}),n9=i9}function d7(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=ll.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=bo(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:z0,title:bo("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:N0,title:bo("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:R0,title:bo("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:O0,title:bo("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===R0?$8():i.id===O0?V8():i.id===N0?Y8():i.id===z0?Q8():o9(i.id)},i.key)}}function Qm(t){aa(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{B.error("send content message request failed",t,n)});let e=new CustomEvent(Mr,{detail:t});globalThis.document.dispatchEvent(e)}async function p7(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await We(Ee(),e);Tn(n)}function a9(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function g7({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Ze({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var oi={};async function Xm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ht(),"en"]});return qn(n),n}async function m9(t){gn("Translating");let e=vt(),n=El(),r=[...document.querySelectorAll(".source-text")];if($i(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return lt(i,"id",o+""),s&&(Vi(s,o)?.remove(),s.appendChild(Ss(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Ze({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Vi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=Ye.sanitize(`${i.message}`),oi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=Ye.sanitize(o.text),oi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{gn("Translated")}}async function f9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(oi),n=[],r=[];for(let a of e){let i=oi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete oi[a],u.appendChild(Ss(t,a)),r.push(i.sentence))}}}try{await Ze({sentences:r},t,(a,i,o)=>{let s=o.id,u=Vi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ye.sanitize(`${a.message}`),oi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=Ye.sanitize(i.text),oi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function ef(){gn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var tf={};async function h9(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return qn(n),n}async function b9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(tf),n=[];for(let r of e){let a=tf[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${$u}='${r}']`);o&&o.remove(),n.push(a)}}try{Rs(),await gc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}function T9(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function y9(t){gn("Translating");let e=ms(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;io(u,t);let l=u.body;if(!l)continue;let c=on(t);c.isModifyImage=!1,Ur({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=fr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=$l(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Bg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),tf[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await gc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}d();var ar=!1,nd,v9=!1,rd=null;function nf(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){B.debug("exclude url for input");return}if(rd===!1){B.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};kn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();nd&&self.removeEventListener("keydown",nd),nd=u,self.addEventListener("keydown",nd);function u(c){if(ar||rd===!1)return;let p=c,m=p.target||p.srcElement,g=m?.tagName;(m?.isContentEditable||g=="INPUT"||g=="SELECT"||g=="TEXTAREA")&&(A7(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&h7()&&(o=0,f7(c,t,i))}k7(t)}function x9({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function ad(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var Eo;function E9(t){let e=t.parentElement;if(!e)return;Eo=document.createElement("div"),Eo.className=Q+"-input",Eo.innerHTML=`
`,e.appendChild(Eo);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function C9(){Eo&&Eo.remove()}async function m7(t){if(!ar)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=ad(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=x9(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let E=l.slice(s.length+1,l.indexOf(u)).trim();if(c=ad(E,i.codeAlias),!c){B.warn("not found alias",E);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};kn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;ar=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=w9(u,i),m=await Ie({text:p,pageLangs:["en"]});B.debug("translateContent",p,m);let g={text:p||"",id:0,from:m,to:c,url:"https://google.com",fromByClient:m,force:!0};if(!g.text||g.text.length>5e3)return;E9(o),et(Gu,Date.now());try{let b=await ma(g,{...t,translationService:t.inputTranslationService});A9(t),D9(t,o,s+b.text)}catch(b){if(b instanceof V){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:h}))}}finally{ar=!1}}catch(e){throw ar=!1,e}finally{ar=!1,C9()}}async function f7(t,e,n){if(!ar)try{let p=function(){s=e.config.inputTargetLanguage;let g=o.split(" ")[0];g&&g[0]&&(g=g[0].toLowerCase()+g.slice(1)),g.trim()&&n.flatAlias.includes(g)?(s=ad(g,n.codeAlias),i=o.slice(g.length+1)):i=o},m=function(){s="";let g=x9(n),f=o.split(g);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=ad(T,n.codeAlias),!s){B.warn("not found alias",T);return}},r=document.activeElement;ar=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(m(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=w9(i,n),l=await Ie({text:u,pageLangs:["en"]});B.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!v9){v9=!0;let g=await P7(e);if(t.target&&t.target.focus(),g==="open_settings"){Bi(!0,"#input");return}else if(g==="open_learn_more"){Ri("https://immersivetranslate.com/docs/input/");return}else if(g==="disable_once"||g==="disable_forever"){if(rd=!1,g==="disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="disable_once"){let f=await fn();f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="close_disable_once"||g==="close_disable_forever"){if(rd=!1,g==="close_disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="enable"){let f=await fn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="close_enable"){let f=await fn();f.enableInputTranslation=!0,await mn(f)}}E9(r),et(Gu,Date.now());try{let g=await ma(c,{...e,translationService:e.inputTranslationService});A9(e),D9(e,r,a+g.text)}catch(g){if(g instanceof V){let f=g.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:f}))}}finally{ar=!1}}catch(r){throw ar=!1,r}finally{ar=!1,C9()}}function h7(){let t=document.activeElement;if(!t)return!1;if(id(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` `).reverse()[0].trim(),i=n<=e;return B.debug("cursorPosition",e,"textLength",n),B.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let e=window.getSelection();if(!e)return B.debug("No active selection found."),!1;if(e.rangeCount>0){let n=e.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=b7(r,t);B.debug("Current text node:",r.textContent),B.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=t.innerText?.split(` -`).reverse(),s=et()?o[0]||o[1]:o[0];return B.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else B.debug("Cursor is not within a text node.")}}return!1}function b7(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function w9(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function T7(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function S9(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function y7(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function v7(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function S7(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function x7(t,e){od(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var E7=[y7.bind(null,["plain"])];function C7(t){let e;od(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function od(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function w7(t){if(od(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function D9(t,e,n){await w7(e),await Aa(50);let r=t.rule.inputConfig,a=T7(n,e);try{r?.clearContentEnable&&C7(e),await Aa(50),r?.execCommandDeleteEnable&&!Ir()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),B.debug("clearContent",Da(e))}catch(i){B.error(i)}for(let i of[...E7,S7,x7,v7]){await i(a,e);let o=D7();if(!o)return;if(B.debug("setContent",i.name,S9(a,o),Da(o),a),S9(a,o))break}}function D7(){return document.activeElement}function A9(t){it("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function A7(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function k7(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Gu,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{L7()},100),new Promise(p=>{let m=p;if(o){let A=o.shadowRoot;if(!A)return;s=A.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),O=s.querySelector(`.${i}`),_=s.querySelector(`.${a}`)}else{let A=document.createElement("div");A.setAttribute("translate","no"),A.className="no-translate immersive-translate-error-modal-input-shadow-root",A.id=e,A.style.all="initial",A.style.zIndex="2147483647",document.body.appendChild(A);let v=A.attachShadow({mode:"open"}),O=document.createElement("style"),_=Me();O.textContent=_.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let k=document.createElement("div");k.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(k);let N=document.createElement("span");N.textContent="\xD7",N.className=Q+"-close",k.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",k.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",k.appendChild(c),l=document.createElement("div"),l.className=i,k.appendChild(l),v.appendChild(s),N.onclick=function(){I(),p("close")},v.addEventListener("click",z=>{z.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",L);let g=kt.bind(null,t);u.innerHTML=`
${Sc} ${g("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=g("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=Ye.sanitize(g("disableInputTranslationTips",{option:`${g("option")}`,learnMore:`${g("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:g("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:g("disableOnce")},{id:"disable-global",value:"global",text:g("disableGlobal")}];for(let A=0;Al===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:_7,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=rf(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=rf(s.denyUrls)),s?.allowUrls&&(u.allowUrls=rf(s.allowUrls)),u.release=`${n}@${e}`,Na.init(u),ud()}catch{}}async function ud(){try{let t=await Mt.get(Ft,null);if(!Ys||!t)return;Na.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function P9(t,e){try{if(!Ys)return;Na.setContext(t,e)}catch{}}function L9(t){try{if(!Ys)return;Na.setTags(t)}catch{}}function rf(t){return t.map(e=>new RegExp(e))}var fe=null,ld={},Eo,_9=!1;async function nd(){Mi.clearStrictTicks();let t=await We(Ee(),{}),e=await ms();if(B.debug("init page ctx",t),cy(t),t.rule.pageType=="subtitleBuilder"){Xm();return}if(t.rule.pageType=="ebookBuilder"){h9();return}if(Eo||(Eo=t.state.translationTheme),t.rule.urlChangeDelay&&await vr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await j7(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=Ii(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){B.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&gT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){Tn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&dt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let g=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(g)try{let h=g.split(".")[0],E=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${E}-${D}-27`),I=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}_9||(_9=!0,He()&&t.rule.useIframePostMessage&&await o1());let n=t.sourceLanguage;n==="auto"?n=await F9():qn(n);let r=r2(t,n);if(r&&(t=await We(Ee(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await Gl(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=wo(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){B.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(B.debug(`detect page language: ${t.url} ${n}`),na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||u1(n,t.config.translationLanguagePattern)&&(o=!0,B.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&rs(e)&&yo(t,window),o)fe.state.isAutoTranslate=!0,Tn(fe);else if(B.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(ld[t.translationService]||(ld[t.translationService]=!0,He()||xg(t).catch(s=>{B.warn("init translation engine error",s)})))}}async function ym(t){if(Qe()==="Original"){let e={};Eo&&(e.translationTheme=Eo),fe&&(e={...fe.state,...e});let n=await We(Ee(),e);if(t?.trigger=="right_menu"&&Ga(n?.rule)){let r=ra(n.rule);Oi(!0,r||Ee());return}await Tn(fe,t)}else(Qe()==="Translated"||Qe()==="Error")&&si()}async function F7(){if(fe=await We(Ee(),{}),fe.rule.pageType=="ebookBuilder")return b9(fe);if(fe.rule.pageType=="subtitleBuilder")return f9(fe);hy()}async function vm(t){if(Qe()==="Original"){fe=await We(Ee(),{}),Eo||(Eo=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await We(Ee(),{translationTheme:e}),await Tn(fe,t)}else if(Qe()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=Z1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=qi(i,Di,!0);a==="mask"||a==="opacity"?o!=="none"?lt(i,Di,"none",!0):lt(i,Di,e,!0):o!=="mask"&&o!=="opacity"?lt(i,Di,e,!0):lt(i,Di,"none",!0)}}}async function F9(){let t=await We(Ee(),{});return t.rule.pageType=="subtitleBuilder"?Xm():fy(t)}function M7(t){Qe()==="Original"?k9(t):ti()}function B7(t){Qe()==="Original"?m9(t):ef()}function I7(t){Qe()==="Original"?fo(t):ti()}async function si(){zi(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await We(Ee(),{});if(t.rule.pageType=="subtitleBuilder"){ef();return}else t.rule.pageType=="ebookBuilder"&&T9();ti()}async function Tn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&sd(t.config?.sentryConfig);let n=Qe(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};P9("translatePage",r),L9(r),n!=="Original"&&await si(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),ld[t.translationService]||(ld[t.translationService]=!0,He()||xg(t).catch(i=>{B.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),it("translage_page_daily",[{name:"translage_page_daily",params:a}],t),it("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:vt()}),t.rule.pageType=="subtitleBuilder"){B7(t),zi("yes");return}if(t.rule.pageType=="ebookBuilder"){y9(t),zi("yes");return}if(t.rule.pageType==="pdfReader"){M7(t),zi("yes");return}I7(t),zi("yes")}async function R7(t,e){let n=fe?.translationService;if(Qe()==="Original"||n!=t){fe=await We(Ee(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);nu({text:r}),await Tn(fe,e)}else{si();let r=await an(),a={url:Ee(),config:r,state:{}},i=await hn(a);fe=await We(Ee(),{translationService:i.translationService})}}async function O7(t){Qe()==="Original"?await af(t):(Qe()==="Translated"||Qe()==="Error")&&(fe=await We(Ee(),{}),fe.state.translationArea!=="main"?await af(t):si())}async function af(t){fe=await We(Ee(),{translationArea:"main"}),await Tn(fe,t)}async function M9(t){fe=await We(Ee(),{translationArea:"body"}),await Tn(fe,t)}async function Sm(t){let e=await We(Ee(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await We(Ee(),{translationMode:n}),Qe()==="Original"){Tn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function Jm(t){if(fe=await We(Ee(),{translationMode:t}),it("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),Qe()==="Original"){Tn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function z7(t){if(Qe()==="Original")await M9(t);else if(Qe()==="Translated"||Qe()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await We(Ee(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await We(Ee(),fe.state),await Tn(fe,t)):si()}}async function B9(t){fe=await We(Ee(),{translationStartMode:"immediate"}),await Tn(fe,t)}async function N7(t){Qe()==="Original"?await B9(t):(Qe()==="Translated"||Qe()==="Error")&&si()}async function I9(){let t=await We(Ee(),{});if(!dt(t.url,t.config.inputStyleBlockUrls)){let n=Me().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;En(document,n,"immersive-translate-input-injected-css")}t.rule.pageType&&t.rule.pageType!=="html"||t.config.enableInputTranslation&&nf(t)}function U7(){return fe}async function We(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await hn(r)}else{let r=await an(),a=e;n.length===0&&(a=void 0),fe=await hn({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function q7(){let t=await fn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await mn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?nu({text:kt(fe,"videoSubtitlePreTranslationOn")}):nu({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Km(){let t=await an(),e=await ms(),n;fe&&fe.state&&(n=fe.state);let r={url:Ee(),config:t,state:n},a=await hn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,im(fe);let i=Hs(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{$s(a,s),rs(e)&&yo(a,s),nf(a)}),a}function j7(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function l9(t){let e=t.detail,n=fn();await Ov(e.token,n,mn),Mt.set(Ft,e);let r=await Mt.get(K0,!1);Mt.set(K0,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),ud()}function c9(t){B.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),ud()}async function d9(t){let e=await fn();if(e.translationService)return;let n=t.config.translationService,r=await Zm(t,n);if(t.translationService!==r){if(!r){us([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,mn(e),t.translationService=r,us([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function p9(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await fn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),mn(i)}async function Zm(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await uT(r,t)}async function g9(t){let e=await fn();e.translationService=t,await mn(e);let n=await We(Ee(),{});n.translationService=t,await Tn(n)}z3({detectCurrentPageLanguage:F9,ensureSwitchTranslationMode:Sm,restorePage:si,retryFailedParagraphs:F7,switchTranslationMode:Jm,toggleTranslatePage:ym,toggleTranslateTheMainPage:O7,toggleTranslateTheWholePage:z7,toggleTranslationMask:vm,toggleVideoSubtitlePreTranslation:q7,translatePage:Tn,translatePageWithTranslationService:R7,translateTheMainPage:af,translateTheWholePage:M9,translateToThePageEndImmediately:B9,toggleTranslateToThePageEndImmediately:N7,updateGlobalContext:Km,getPureGlobalContext:U7});async function R9(t){if(!t){let n=await an();t=await hn({config:n,url:Ee()})}if(t.config.debug?B.setLevel("debug"):B.setLevel("info"),!t.isTranslateExcludeUrl){if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){if(t.rule.isInjectMeta){try{let n=await Gl("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=wo(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){B.warn("inject meta failed",n)}if(t.rule.isInjectOptionsUrl){let n=Ii(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject options url failed",a)}}if(t.rule.isInjectVersion){let n=Nt(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject version failed",a)}}}}else await nd();He()||await Xv().catch(n=>{B.error(`init popup page error: ${n}`)}),He()||Xy()}await I9()}d();var Qs={capture:!0,once:!0,passive:!0},N9=()=>document.readyState==="interactive"||document.readyState==="complete",H7=t=>document.readyState===t,Js=(t,e)=>H7(t)||N9()?(e(t),!0):!1,W7=()=>new Promise(t=>{Js("loading",t)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&t("loading")},Qs)}),K7=()=>new Promise(t=>{Js("interactive",t)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&t("interactive")},Qs)}),G7=()=>new Promise(t=>{Js("complete",t)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t("complete")},Qs)}),O9=()=>new Promise(t=>{Js("domready",t)||document.addEventListener("DOMContentLoaded",()=>{t("domready")},Qs)}),z9=()=>new Promise(t=>{Js("load",t)||window.addEventListener("load",()=>{t("load")},Qs)}),U9={};Object.defineProperties(U9,{state:{get:function(){return document.readyState}},loading:{get:function(){return W7()}},interactive:{get:function(){return K7()}},complete:{get:function(){return G7()}},window:{get:function(){return z9()}},load:{get:function(){return z9()}},domready:{get:function(){return O9()}},dom:{get:function(){return O9()}},ready:{get:function(){return N9()}}});var q9=U9;d();d();var j9={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function V7(t){return()=>Promise.resolve().then(()=>t()).catch(e=>{throw e})}function $7(t){if(typeof t!="function")throw new Error(j9.NOT_FUNCTION)}var of=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:e=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:i=1,backoffMaxInterval:o,message:s=""}={}){this._interval=e,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=i,this._backoffMaxInterval=o||n,this.start=+Date.now()}tryEvery(e){return this._interval=e,this}stopAfter(e){return this._timeout=e,this}execute(e){return this._applyPromiseHandlers(),$7(e),this._executeFn=V7(e),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(e){return this._stopOnFailure=e,this}_applyPromiseHandlers(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let e=this._interval,n=e*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),e)}_failedToWait(){let e=`${j9.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(e=`${e}: ${this._userMessage}`),this._lastError){this._lastError.message=`${e} +`).reverse(),s=tt()?o[0]||o[1]:o[0];return B.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else B.debug("Cursor is not within a text node.")}}return!1}function b7(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function w9(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function T7(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function S9(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function y7(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function v7(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function S7(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function x7(t,e){id(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var E7=[y7.bind(null,["plain"])];function C7(t){let e;id(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function id(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function w7(t){if(id(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function D9(t,e,n){await w7(e),await Aa(50);let r=t.rule.inputConfig,a=T7(n,e);try{r?.clearContentEnable&&C7(e),await Aa(50),r?.execCommandDeleteEnable&&!Ir()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),B.debug("clearContent",Da(e))}catch(i){B.error(i)}for(let i of[...E7,S7,x7,v7]){await i(a,e);let o=D7();if(!o)return;if(B.debug("setContent",i.name,S9(a,o),Da(o),a),S9(a,o))break}}function D7(){return document.activeElement}function A9(t){ot("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function A7(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function k7(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Gu,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{L7()},100),new Promise(p=>{let m=p;if(o){let A=o.shadowRoot;if(!A)return;s=A.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),O=s.querySelector(`.${i}`),_=s.querySelector(`.${a}`)}else{let A=document.createElement("div");A.setAttribute("translate","no"),A.className="no-translate immersive-translate-error-modal-input-shadow-root",A.id=e,A.style.all="initial",A.style.zIndex="2147483647",document.body.appendChild(A);let v=A.attachShadow({mode:"open"}),O=document.createElement("style"),_=Me();O.textContent=_.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let k=document.createElement("div");k.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(k);let N=document.createElement("span");N.textContent="\xD7",N.className=Q+"-close",k.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",k.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",k.appendChild(c),l=document.createElement("div"),l.className=i,k.appendChild(l),v.appendChild(s),N.onclick=function(){I(),p("close")},v.addEventListener("click",z=>{z.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",L);let g=kt.bind(null,t);u.innerHTML=`
${vc} ${g("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=g("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=Ye.sanitize(g("disableInputTranslationTips",{option:`${g("option")}`,learnMore:`${g("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:g("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:g("disableOnce")},{id:"disable-global",value:"global",text:g("disableGlobal")}];for(let A=0;Al===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:_7,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=rf(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=rf(s.denyUrls)),s?.allowUrls&&(u.allowUrls=rf(s.allowUrls)),u.release=`${n}@${e}`,Na.init(u),sd()}catch{}}async function sd(){try{let t=await Mt.get(Ft,null);if(!Ys||!t)return;Na.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function P9(t,e){try{if(!Ys)return;Na.setContext(t,e)}catch{}}function L9(t){try{if(!Ys)return;Na.setTags(t)}catch{}}function rf(t){return t.map(e=>new RegExp(e))}var fe=null,ud={},Co,_9=!1;async function td(){Mi.clearStrictTicks();let t=await We(Ee(),{}),e=await fs();if(B.debug("init page ctx",t),cy(t),t.rule.pageType=="subtitleBuilder"){Xm();return}if(t.rule.pageType=="ebookBuilder"){h9();return}if(Co||(Co=t.state.translationTheme),t.rule.urlChangeDelay&&await vr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await j7(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=Ii(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){B.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&gT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){Tn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&dt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let g=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(g)try{let h=g.split(".")[0],E=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${E}-${D}-27`),I=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}_9||(_9=!0,He()&&t.rule.useIframePostMessage&&await o1());let n=t.sourceLanguage;n==="auto"?n=await F9():qn(n);let r=r2(t,n);if(r&&(t=await We(Ee(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await Gl(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=Do(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){B.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(B.debug(`detect page language: ${t.url} ${n}`),na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||u1(n,t.config.translationLanguagePattern)&&(o=!0,B.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&as(e)&&vo(t,window),o)fe.state.isAutoTranslate=!0,Tn(fe);else if(B.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(ud[t.translationService]||(ud[t.translationService]=!0,He()||Sg(t).catch(s=>{B.warn("init translation engine error",s)})))}}async function ym(t){if(Qe()==="Original"){let e={};Co&&(e.translationTheme=Co),fe&&(e={...fe.state,...e});let n=await We(Ee(),e);if(t?.trigger=="right_menu"&&Ga(n?.rule)){let r=ra(n.rule);Oi(!0,r||Ee());return}await Tn(fe,t)}else(Qe()==="Translated"||Qe()==="Error")&&si()}async function F7(){if(fe=await We(Ee(),{}),fe.rule.pageType=="ebookBuilder")return b9(fe);if(fe.rule.pageType=="subtitleBuilder")return f9(fe);hy()}async function vm(t){if(Qe()==="Original"){fe=await We(Ee(),{}),Co||(Co=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await We(Ee(),{translationTheme:e}),await Tn(fe,t)}else if(Qe()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=Z1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=qi(i,Di,!0);a==="mask"||a==="opacity"?o!=="none"?lt(i,Di,"none",!0):lt(i,Di,e,!0):o!=="mask"&&o!=="opacity"?lt(i,Di,e,!0):lt(i,Di,"none",!0)}}}async function F9(){let t=await We(Ee(),{});return t.rule.pageType=="subtitleBuilder"?Xm():fy(t)}function M7(t){Qe()==="Original"?k9(t):ti()}function B7(t){Qe()==="Original"?m9(t):ef()}function I7(t){Qe()==="Original"?ho(t):ti()}async function si(){zi(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await We(Ee(),{});if(t.rule.pageType=="subtitleBuilder"){ef();return}else t.rule.pageType=="ebookBuilder"&&T9();ti()}async function Tn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&od(t.config?.sentryConfig);let n=Qe(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};P9("translatePage",r),L9(r),n!=="Original"&&await si(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),ud[t.translationService]||(ud[t.translationService]=!0,He()||Sg(t).catch(i=>{B.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),ot("translage_page_daily",[{name:"translage_page_daily",params:a}],t),ot("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:vt()}),t.rule.pageType=="subtitleBuilder"){B7(t),zi("yes");return}if(t.rule.pageType=="ebookBuilder"){y9(t),zi("yes");return}if(t.rule.pageType==="pdfReader"){M7(t),zi("yes");return}I7(t),zi("yes")}async function R7(t,e){let n=fe?.translationService;if(Qe()==="Original"||n!=t){fe=await We(Ee(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);nu({text:r}),await Tn(fe,e)}else{si();let r=await an(),a={url:Ee(),config:r,state:{}},i=await hn(a);fe=await We(Ee(),{translationService:i.translationService})}}async function O7(t){Qe()==="Original"?await af(t):(Qe()==="Translated"||Qe()==="Error")&&(fe=await We(Ee(),{}),fe.state.translationArea!=="main"?await af(t):si())}async function af(t){fe=await We(Ee(),{translationArea:"main"}),await Tn(fe,t)}async function M9(t){fe=await We(Ee(),{translationArea:"body"}),await Tn(fe,t)}async function Sm(t){let e=await We(Ee(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await We(Ee(),{translationMode:n}),Qe()==="Original"){Tn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function Jm(t){if(fe=await We(Ee(),{translationMode:t}),ot("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),Qe()==="Original"){Tn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function z7(t){if(Qe()==="Original")await M9(t);else if(Qe()==="Translated"||Qe()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await We(Ee(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await We(Ee(),fe.state),await Tn(fe,t)):si()}}async function B9(t){fe=await We(Ee(),{translationStartMode:"immediate"}),await Tn(fe,t)}async function N7(t){Qe()==="Original"?await B9(t):(Qe()==="Translated"||Qe()==="Error")&&si()}async function I9(){let t=await We(Ee(),{});if(!dt(t.url,t.config.inputStyleBlockUrls)){let n=Me().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;En(document,n,"immersive-translate-input-injected-css")}t.rule.pageType&&t.rule.pageType!=="html"||t.config.enableInputTranslation&&nf(t)}function U7(){return fe}async function We(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await hn(r)}else{let r=await an(),a=e;n.length===0&&(a=void 0),fe=await hn({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function q7(){let t=await fn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await mn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?nu({text:kt(fe,"videoSubtitlePreTranslationOn")}):nu({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Km(){let t=await an(),e=await fs(),n;fe&&fe.state&&(n=fe.state);let r={url:Ee(),config:t,state:n},a=await hn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,im(fe);let i=Hs(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{Vs(a,s),as(e)&&vo(a,s),nf(a)}),a}function j7(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function l9(t){let e=t.detail,n=fn();await Ov(e.token,n,mn),Mt.set(Ft,e);let r=await Mt.get(W0,!1);Mt.set(W0,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),sd()}function c9(t){B.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),sd()}async function d9(t){let e=await fn();if(e.translationService)return;let n=t.config.translationService,r=await Zm(t,n);if(t.translationService!==r){if(!r){ls([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,mn(e),t.translationService=r,ls([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function p9(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await fn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),mn(i)}async function Zm(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await uT(r,t)}async function g9(t){let e=await fn();e.translationService=t,await mn(e);let n=await We(Ee(),{});n.translationService=t,await Tn(n)}z3({detectCurrentPageLanguage:F9,ensureSwitchTranslationMode:Sm,restorePage:si,retryFailedParagraphs:F7,switchTranslationMode:Jm,toggleTranslatePage:ym,toggleTranslateTheMainPage:O7,toggleTranslateTheWholePage:z7,toggleTranslationMask:vm,toggleVideoSubtitlePreTranslation:q7,translatePage:Tn,translatePageWithTranslationService:R7,translateTheMainPage:af,translateTheWholePage:M9,translateToThePageEndImmediately:B9,toggleTranslateToThePageEndImmediately:N7,updateGlobalContext:Km,getPureGlobalContext:U7});async function R9(t){if(!t){let n=await an();t=await hn({config:n,url:Ee()})}if(t.config.debug?B.setLevel("debug"):B.setLevel("info"),!t.isTranslateExcludeUrl){if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){if(t.rule.isInjectMeta){try{let n=await Gl("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=Do(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){B.warn("inject meta failed",n)}if(t.rule.isInjectOptionsUrl){let n=Ii(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject options url failed",a)}}if(t.rule.isInjectVersion){let n=Ut(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject version failed",a)}}}}else await td();He()||await Xv().catch(n=>{B.error(`init popup page error: ${n}`)}),He()||Xy()}await I9()}d();var Qs={capture:!0,once:!0,passive:!0},N9=()=>document.readyState==="interactive"||document.readyState==="complete",H7=t=>document.readyState===t,Js=(t,e)=>H7(t)||N9()?(e(t),!0):!1,W7=()=>new Promise(t=>{Js("loading",t)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&t("loading")},Qs)}),K7=()=>new Promise(t=>{Js("interactive",t)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&t("interactive")},Qs)}),G7=()=>new Promise(t=>{Js("complete",t)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t("complete")},Qs)}),O9=()=>new Promise(t=>{Js("domready",t)||document.addEventListener("DOMContentLoaded",()=>{t("domready")},Qs)}),z9=()=>new Promise(t=>{Js("load",t)||window.addEventListener("load",()=>{t("load")},Qs)}),U9={};Object.defineProperties(U9,{state:{get:function(){return document.readyState}},loading:{get:function(){return W7()}},interactive:{get:function(){return K7()}},complete:{get:function(){return G7()}},window:{get:function(){return z9()}},load:{get:function(){return z9()}},domready:{get:function(){return O9()}},dom:{get:function(){return O9()}},ready:{get:function(){return N9()}}});var q9=U9;d();d();var j9={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function $7(t){return()=>Promise.resolve().then(()=>t()).catch(e=>{throw e})}function V7(t){if(typeof t!="function")throw new Error(j9.NOT_FUNCTION)}var of=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:e=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:i=1,backoffMaxInterval:o,message:s=""}={}){this._interval=e,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=i,this._backoffMaxInterval=o||n,this.start=+Date.now()}tryEvery(e){return this._interval=e,this}stopAfter(e){return this._timeout=e,this}execute(e){return this._applyPromiseHandlers(),V7(e),this._executeFn=$7(e),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(e){return this._stopOnFailure=e,this}_applyPromiseHandlers(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let e=this._interval,n=e*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),e)}_failedToWait(){let e=`${j9.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(e=`${e}: ${this._userMessage}`),this._lastError){this._lastError.message=`${e} ${this._lastError.message}`;let n=this.originalStacktraceError.stack;n&&(this._lastError.stack+=n.substring(n.indexOf(` -`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=e;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(e=>{if(e===!1){this._log(`then execute again with result: ${e}`),this._executeAgain();return}this.resolve?.(e),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${e}`)}).catch(e=>this._stopOnFailure?(this._log(`stopped on failure with err: ${e}`),this.reject?.(e)):(this._lastError=e,this._log(`catch with err: ${e}`),this._executeAgain()))}_log(e){this._verbose&&this._Console&&this._Console.log&&this._Console.log(e)}},H9=(t,e)=>new of(e).execute(t);async function W9(t){try{let e=t.config.domReadyDetectTimeout;return await H9(()=>{let r=t.mainFrame.innerText||"";if(Ni(r,t.rule.mainFrameMinTextCount,t.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:e!==void 0?e:3e3}),!0}catch(e){if(He())throw e;return B.debug("check dom element ready failed:",e,t),!0}}d();function K9(){let t=document.querySelector("meta[name=immersive-translate-options]");return!!(t&&t.getAttribute("content")==="true")}d();async function V9(){if(!document.getElementById("immersive-translate-status")){B.error("Could not find status element");return}await G9("local"),await G9("sync"),Q7();let e=document.getElementById("immersive-translate-page-ready");e&&setTimeout(()=>{e.value="true",e.dispatchEvent(new Event("change"))},100)}async function Y7(t,e){let n;try{n=JSON.parse(t.detail)}catch(a){B.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},i=await e(a),o={id:r,ok:!0,data:i};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...o,type:"answer"})}))}catch(a){let i={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...i,id:r,type:"answer"})}))}}function Q7(){document.addEventListener(Hu,r=>{let a=r;if(B.debug("document message",a),a&&a.detail){let i;try{i=JSON.parse(a.detail)}catch(o){B.error("parse detail failed",o);return}i.type==="ask"?i.method==="request"&&Y7(a,ce):i.type==="tell"&&i.method==="updateCommands"&&_l(i.data)}});let t=document.getElementById("immersive-translate-manifest");if(!t){B.error("Could not find manifest element");return}let e=oe.runtime.getManifest();et()&&(e._isSafari=!0),t.value=JSON.stringify(e),t.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){B.error("parse message error",a)}})}async function G9(t){let e=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${t}-storage`);if(n){B.debug("init storage");let r=await oe.storage[t].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let i=JSON.parse(a.target.value);oe.storage[t].set(i)}catch(i){B.error("save to storage error",i)}}),n.addEventListener("refresh-"+t,async a=>{let i=await oe.storage[t].get(null);n.value=JSON.stringify(i),B.debug("refresh ",t,"storage")})}else{B.error(`Could not find storage ${t} element`),e.innerText="Could not find storage local input element";return}}var $9=["textarea","input","button","select","option","iframe","strong","form","body"];async function J7(){let t=await Pn();t.sentryConfig?.contentInitTime=="init"&&sd(t.sentryConfig),t.excludeTranslationHtmlTags&&($9=t.excludeTranslationHtmlTags),Ye.addHook("beforeSanitizeElements",function(r,a,i){let o=(r.nodeName||"").toLowerCase();if($9.includes(o)){let u=`<${o}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ye.addHook("uponSanitizeElement",function(r,a){let i=r.nodeName||"";/\d+$/.test(i)&&(a.allowedTags[a.tagName]=!0)});let e=Ee(),n=await hn({config:t,url:e});it("init_page_daily",[{name:"init_page_daily"}],n),q9.domready.then(()=>{if(n.isTranslateExcludeUrl&&K9())B.debug("detect web options page"),$s(n,window),V9();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Nt(),i=document.createElement("meta");i.name="immersive-translate-version",i.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(i)}catch(o){B.warn("inject version failed",o)}}if(dt(n.url,n.config.blockUrls))return;$s(n,window),W9(n).then(()=>{R9(n).catch(a=>{a&&B.debug("translate page error",a.name,a.message,a)})}).catch(a=>{B.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&B.debug("translate dom ready detect error",r)})}J7().catch(t=>{B.debug("init error",t)});})(); +`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=e;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(e=>{if(e===!1){this._log(`then execute again with result: ${e}`),this._executeAgain();return}this.resolve?.(e),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${e}`)}).catch(e=>this._stopOnFailure?(this._log(`stopped on failure with err: ${e}`),this.reject?.(e)):(this._lastError=e,this._log(`catch with err: ${e}`),this._executeAgain()))}_log(e){this._verbose&&this._Console&&this._Console.log&&this._Console.log(e)}},H9=(t,e)=>new of(e).execute(t);async function W9(t){try{let e=t.config.domReadyDetectTimeout;return await H9(()=>{let r=t.mainFrame.innerText||"";if(Ni(r,t.rule.mainFrameMinTextCount,t.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:e!==void 0?e:3e3}),!0}catch(e){if(He())throw e;return B.debug("check dom element ready failed:",e,t),!0}}d();function K9(){let t=document.querySelector("meta[name=immersive-translate-options]");return!!(t&&t.getAttribute("content")==="true")}d();async function $9(){if(!document.getElementById("immersive-translate-status")){B.error("Could not find status element");return}await G9("local"),await G9("sync"),Q7();let e=document.getElementById("immersive-translate-page-ready");e&&setTimeout(()=>{e.value="true",e.dispatchEvent(new Event("change"))},100)}async function Y7(t,e){let n;try{n=JSON.parse(t.detail)}catch(a){B.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},i=await e(a),o={id:r,ok:!0,data:i};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...o,type:"answer"})}))}catch(a){let i={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...i,id:r,type:"answer"})}))}}function Q7(){document.addEventListener(Hu,r=>{let a=r;if(B.debug("document message",a),a&&a.detail){let i;try{i=JSON.parse(a.detail)}catch(o){B.error("parse detail failed",o);return}i.type==="ask"?i.method==="request"&&Y7(a,ce):i.type==="tell"&&i.method==="updateCommands"&&_l(i.data)}});let t=document.getElementById("immersive-translate-manifest");if(!t){B.error("Could not find manifest element");return}let e=oe.runtime.getManifest();tt()&&(e._isSafari=!0),t.value=JSON.stringify(e),t.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){B.error("parse message error",a)}})}async function G9(t){let e=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${t}-storage`);if(n){B.debug("init storage");let r=await oe.storage[t].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let i=JSON.parse(a.target.value);oe.storage[t].set(i)}catch(i){B.error("save to storage error",i)}}),n.addEventListener("refresh-"+t,async a=>{let i=await oe.storage[t].get(null);n.value=JSON.stringify(i),B.debug("refresh ",t,"storage")})}else{B.error(`Could not find storage ${t} element`),e.innerText="Could not find storage local input element";return}}var V9=["textarea","input","button","select","option","iframe","strong","form","body"];async function J7(){let t=await Pn();t.sentryConfig?.contentInitTime=="init"&&od(t.sentryConfig),t.excludeTranslationHtmlTags&&(V9=t.excludeTranslationHtmlTags),Ye.addHook("beforeSanitizeElements",function(r,a,i){let o=(r.nodeName||"").toLowerCase();if(V9.includes(o)){let u=`<${o}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ye.addHook("uponSanitizeElement",function(r,a){let i=r.nodeName||"";/\d+$/.test(i)&&(a.allowedTags[a.tagName]=!0)});let e=Ee(),n=await hn({config:t,url:e});ot("init_page_daily",[{name:"init_page_daily"}],n),q9.domready.then(()=>{if(n.isTranslateExcludeUrl&&K9())B.debug("detect web options page"),Vs(n,window),$9();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Ut(),i=document.createElement("meta");i.name="immersive-translate-version",i.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(i)}catch(o){B.warn("inject version failed",o)}}if(dt(n.url,n.config.blockUrls))return;Vs(n,window),W9(n).then(()=>{R9(n).catch(a=>{a&&B.debug("translate page error",a.name,a.message,a)})}).catch(a=>{B.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&B.debug("translate dom ready detect error",r)})}J7().catch(t=>{B.debug("init error",t)});})(); /*! * Toastify js 1.12.0 * https://github.com/apvarun/toastify-js diff --git a/dist/chrome/content_start.js b/dist/chrome/content_start.js index 46aaf2b..13e720e 100644 --- a/dist/chrome/content_start.js +++ b/dist/chrome/content_start.js @@ -1,4 +1,4 @@ -(()=>{var nu=Object.defineProperty;var qn=(t,e)=>{for(var r in e)nu(t,r,{get:e[r],enumerable:!0})};var b={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var nu=Object.defineProperty;var qn=(t,e)=>{for(var r in e)nu(t,r,{get:e[r],enumerable:!0})};var b={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -5162,7 +5162,7 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda {{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Us,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...Rs,{type:"password",name:"apikey",required:!0}],props:Rs},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},TD={type:V+"ChildFrameToRootFrameIdentifier"};var vD=Je()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general";var Ft="user_info",yD=Je()||St()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",js=Je()||St()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",SD=js+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xD=js+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Fm=Je()||St()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ha=Je()||St()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",Bm=Je()||St()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",Im=Je()||St()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",zm=Je()||St()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",wD=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",AD=Bm+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",DD=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Ws=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Ks=Im+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Gs=zm+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Vs=Fm+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true";var $s=Oe().TRANSLATE_FILE_URL,ED=$s+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",_D=$s+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var cr=console,ja=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let r=performance.now(),n=Math.round(r-this.#e),a=Ye.green;n>1e4?a=Ye.red:n>1e3&&(a=Ye.yellow),cr.debug(Ye.dim(Vt+" TIMING:"),e,"in",a(n+"ms")),this.#e=r}},Hr=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&cr.log(Ye.dim(Vt+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&cr.log(Ye.green(Vt+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&cr.warn(Ye.yellow(Vt+" WARN:"),...e)}error(...e){this.#e<=3&&cr.error(Ye.red(Vt+" ERROR:"),...e)}fatal(...e){this.#e<=4&&cr.error(Ye.red(Vt+" FATAL:"),...e)}timing(){return this.level===0?new ja:{reset:()=>{},stop:()=>{}}}},$e=new Hr;function Sn(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let r=yn.map(a=>a.toLowerCase()),n=r.indexOf(e);if(n===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=r.indexOf(e);return a===-1?"auto":yn[a]}else return"auto";else return yn[n]}function dr(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}var Qs=V+"SyncStoreKey_";function Bt(t,e){let r=Qs+t;return se.storage.sync.get(r).then(n=>n[r]===void 0?e:n[r])}function pr(t,e){let r=Qs+t;return se.storage.sync.set({[r]:e})}var Mm=V+"StoreKey_";function jr(t,e){let r=Mm+t;return se.storage.local.get(r).then(n=>n[r]===void 0?e:n[r])}var Qt=V+"CacheKey_";function Om(t,e){let r=Qt+t;return se.storage.local.get(r).then(n=>n[r]===void 0?e:n[r])}function Rm(){let t=se.storage.local.refresh;t&&t()}function Nm(t,e){let r=Qt+t;return se.storage.local.get(r).then(n=>{if(n[r]===void 0)return e;let{value:a,expired:i}=n[r];return i&&in.startsWith(Qt)).filter(n=>n!==Qt+Ft);if(r.length>0)return se.storage.local.remove(r)}}var mr={get:Om,set:Um,getExpired:Nm,setExpired:qm,remove:Hm,clear:jm,refresh:Rm};function Wm(t,e){let r=t;return e&&Object.keys(e).forEach(n=>{let a=e[n];if(a===void 0)return;let i=Gm(n);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let l=`<${n}>`,s=r.indexOf(l);if(s!==-1){let u=o.tag||"a",c=r.indexOf(``);if(c!==-1){let d=r.substring(s+l.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");r=r.replace(`${l}${d}`,`<${u} ${g}>${d}`)}}}else if(a){let o=new RegExp("{"+n+"}","gm");r=r.replace(o,a.toString())}}),r}function Ys(t,e,r){let n=t[e];if(!n)return r;if(!r)return"";let a=r.split("."),i="";do{i+=a.shift();let o=n[i];o!==void 0&&(typeof o=="object"||!a.length)?(n=o,i=""):a.length?i+=".":n=r}while(a.length);return n}function Km(t,e,r,n,a){if(!t.hasOwnProperty(r))return e;let i=Ys(t,r,e);return i===e&&r!==n&&(i=Ys(t,n,e)),Wm(i,a)}function Gm(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function It(t,e,r){return Km(qr,e,t.config.interfaceLanguage,"en",r)}function Xs(t,e){let r=new Date(t),n=r.getFullYear().toString(),a=(r.getMonth()+1).toString().padStart(2,"0"),i=r.getDate().toString().padStart(2,"0"),o=r.getHours().toString().padStart(2,"0"),l=r.getMinutes().toString().padStart(2,"0"),s=r.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",n).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",l).replace("ss",s)}function Zs(t){return new Date(t).getTime()}var zt=class extends Error{status;constructor(e,r){if(e&&r){super(r),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let r=null;if(r=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!r){let n=It.bind(null,e),a=this.getErrorMsg();r={type:"error",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:a}),action:"changeService"}}return r}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let r=It.bind(null,e),n=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(n||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let r=It.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:r("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+r("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let r=It.bind(null,e),n="retry",a="network",i=r("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${r("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${r("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${r("error.openAIExceededQuota")}

${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${r("error.gemini.429")}

${o}`:o=`${r("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${r("error.claude.403")}

${o}`:o=`${r("error.403")}

${o}`:this.status===400?o=`${r("error.400")}

${o}`:this.status===502?o=`${r("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${r("error.subscriptionExpired")}

${o}`,n="setting",a="configError",i=r("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:n}}handleFetchError(e){let r=It.bind(null,e);if(this.status!==-999)return;let n=this.getErrorMsg();return{type:"network",title:"",errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:n}),action:"changeService"}}handleProUser(e){let r=It.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:r("upgradeToProErrorTitle"),errMsg:r("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let r=It.bind(null,e);this.message=this.message.replace("ProQuota:","");let n=this.message;try{n=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:l,subscriptionTo:s}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let d=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=r("errorReason",{message:n});if(i=="onetime_7day")m+=r("proQuotaExceededError.onetime7day",{anotherService:d,brandId:ke,href:Ws});else{let T="";g=="OpenAI"?T=Ks:T=Gs,o?m+=r("proQuotaExceededError.trial",{anotherService:d,brandId:ke,href:Vs}):m+=r("proQuotaExceededError.nonTrial",{anotherService:d,brandId:ke,href:T,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||Zs(s)>l)&&(m+=r("proQuotaExceededError.resetTime",{resetTime:Xs(l,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function el(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Kn(Js.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(r){throw r&&r.name==="RetryError"&&r.cause?r.cause:r}else e=await Js(t);return e}async function Js(t){t.body;let{url:e,responseType:r,...n}=t;r||(r="json"),n={mode:"cors",...n};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let s=new AbortController,u=s.signal;setTimeout(()=>{s.abort()},o),n.signal=u}let l;try{l=await i(e,n)}catch(s){$e.debug("fetch error",e,s);let u=s.message||"Unknown Error";throw new zt("fetchError",u).initNetWork(-999).initStack(s.stack)}if(l.ok&&l.status>=200&&l.status<400){if(r==="json")return await l.json();if(r==="text")return await l.text();if(r==="raw"){let s=await l.text(),u=Object.fromEntries([...l.headers.entries()]),c=l.url;return c||(l.headers.get("X-Final-URL")?c=l.headers.get("X-Final-URL"):c=e),{body:s,headers:u,status:l.status,statusText:l.statusText,url:c}}else if(r==="stream"){let s="",u;if(l.body&&l.body instanceof ReadableStream)for await(let c of Vm(l.body)){let d=new TextDecoder().decode(c);s+=d;let g;for(;(g=s.indexOf(` -`))>=0;){let m=s.slice(0,g).trim();if(s=s.slice(g+1),m.startsWith("event:")||m==="")continue;let T="";if(m.startsWith("data:")&&(T=m.slice(5).trim()),T==="[DONE]")break;let j;try{j=JSON.parse(T??"")}catch(k){$e.debug("json error",k);continue}u=j}}return u}}else{let s;try{s=await l.text()}catch(m){$e.error("parse response failed",m)}s&&$e.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),g&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new zt("fetchError",c).initNetWork(l.status)}}async function*Vm(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}var $m=new Map;function tl(t){let e=Qm(64),r=new CustomEvent(Ns,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((n,a)=>{$m.set(e,(i,o)=>{i?a(i):n(o)})})}function Qm(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var Xm="";function Wr(){return Xm||rl.version}function xn(){try{let t=[Oe().EBOOK_BUILDER_URL,Oe().EBOOK_VIEWER_URL,Oe().SUBTITLE_BUILDER_URL,Oe().HTML_VIEWER_URL,Oe().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Je()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var Kr=new Map,Gr=class{fromType;logger;constructor(e,r=!1){this.logger=new Hr,r&&this.logger.setLevel("debug"),this.fromType=e,Kr.has(e)||(Kr.set(e,new Map),se.runtime.onMessage.addListener((n,a,i)=>{let o=n.from,l=n.to,s,u,c;a.tab&&a.tab.id&&(s=a.tab.id,o=`${o}:${s}`,u=a.tab.url,c=a.tab.active),this.logger.debug(`${n.to} received message [${n.payload.method}] from ${n.from}`,n.payload.data?n.payload.data:" ");let d=Ka(l),{type:g,name:m}=d;if(g!==e)return!1;let T=Ka(o),k=Kr.get(g).get(m);if(!k)return this.logger.debug(`no message handler for ${g}:${l}, but it's ok`),!1;let{messageHandler:h,sync:Q}=k,P={type:e,name:T.name,id:s,url:u,active:c};if(Q){try{let $=h(n.payload,P);i({ok:!0,data:$})}catch($){i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.details,errorStatus:$.status})}return!1}else return h(n.payload,P).then($=>{i({ok:!0,data:$})}).catch($=>{i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.message,errorStatus:$.status})}),!0}))}getConnection(e,r,n){let a=!1;n&&n.sync&&(a=!0);let i=this.fromType,o=Kr.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Wa(`${i}:${e}`,this.logger);return Kr.get(i).set(e,{messageHandler:r,sync:a,connectionInstance:l}),l}}},Wa=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let n=Ka(e),{type:a,id:i}=n;if(a!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await se.runtime.sendMessage(o);return nl(o,l,this.logger)}catch(l){if(a==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await se.tabs.sendMessage(i,o);return nl(o,l,this.logger)}}};function nl(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new zt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new zt("noResponse","Unknown error")}function Ka(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let n=parseInt(e[2]);if(!isNaN(n))r.id=n;else throw new Error("tab id not a valid number")}return r}var Zm="";function Ga(){return Zm||globalThis.navigator.userAgent}function al(){return Ga().includes("ImtFxiOS")}function Jm(){return Ga().includes("ImtFxAndroid")}function Va(){let t=Ga();if(al()||Jm()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),n=r[0];return r[2]&&(n+="_"+r[2]),{name:n,version:r[1]}}}return null}var wn;function $a(){return wn||(wn=new Gr("content_script",!1).getConnection("pure_main",()=>{}),wn)}var il="G-MKMD9LWFTR";async function sl(t){try{let e=Oe(),r=e.INSTALL_FROM==="firefox_store";if(Va()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let a=Ge(),i=xn(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Bt("fakeUserId","");s||(s=await jr("fakeUserId",""),s&&await pr("fakeUserId",s));let u=Wr(),c=new Date,d=await Bt("installedAt","");d||(d=await jr("installedAt",""),d&&await pr("installedAt",d)),s?d||(d=new Date(0).toISOString(),await pr("installedAt",d)):(s=eg(32),await pr("fakeUserId",s)),d||(d=c.toISOString(),await pr("installedAt",d));let g=new Date(d),m=ol(g),T=ol(c),j=m===T,k=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${il}&api_secret=${l}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${il}&api_secret=${l}`);let Q="";typeof navigator<"u"&&(Q=window.navigator.userAgent);let P=nn.parse(Q),$=t.map(A=>{let f=A.params||{};if(P.os&&(f.os_name=P.os.name||"unknown",f.os_version=P.os.version||"unknown",f.os_version_name=P.os.versionName||"unknown"),P.browser){f.browser_name=P.browser.name||"unknown",f.browser_version=P.browser.version||"unknown";let y=Va();y&&(f.browser_name=y.name,f.browser_version=y.version)}return P.platform&&(f.platform_type=P.platform.type||"unknown"),P.engine&&(f.engine_name=P.engine.name||"unknown",f.engine_version=P.engine.version||"unknown"),u&&(f.version=u),e.INSTALL_FROM&&(f.install_from=e.INSTALL_FROM),m&&(f.install_day=tg(g)),f.userscript=a.toString(),j?f.is_new_user_today="1":f.is_new_user_today="0",k?f.is_new_user_this_week="1":f.is_new_user_this_week="0",i?f.main_frame=0:f.main_frame=1,{...A,params:f}}),oe=await ng({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:$})})}catch{}}function eg(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} +`))>=0;){let m=s.slice(0,g).trim();if(s=s.slice(g+1),m.startsWith("event:")||m==="")continue;let T="";if(m.startsWith("data:")&&(T=m.slice(5).trim()),T==="[DONE]")break;let j;try{j=JSON.parse(T??"")}catch(k){$e.debug("json error",k);continue}u=j}}return u}}else{let s;try{s=await l.text()}catch(m){$e.error("parse response failed",m)}s&&$e.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),g&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new zt("fetchError",c).initNetWork(l.status)}}async function*Vm(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}var $m=new Map;function tl(t){let e=Qm(64),r=new CustomEvent(Ns,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((n,a)=>{$m.set(e,(i,o)=>{i?a(i):n(o)})})}function Qm(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var Xm="";function Wr(){return Xm||rl.version}function xn(){try{let t=[Oe().EBOOK_BUILDER_URL,Oe().EBOOK_VIEWER_URL,Oe().SUBTITLE_BUILDER_URL,Oe().HTML_VIEWER_URL,Oe().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Je()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var Kr=new Map,Gr=class{fromType;logger;constructor(e,r=!1){this.logger=new Hr,r&&this.logger.setLevel("debug"),this.fromType=e,Kr.has(e)||(Kr.set(e,new Map),se.runtime.onMessage.addListener((n,a,i)=>{let o=n.from,l=n.to,s,u,c;a.tab&&a.tab.id&&(s=a.tab.id,o=`${o}:${s}`,u=a.tab.url,c=a.tab.active),this.logger.debug(`${n.to} received message [${n.payload.method}] from ${n.from}`,n.payload.data?n.payload.data:" ");let d=Ka(l),{type:g,name:m}=d;if(g!==e)return!1;let T=Ka(o),k=Kr.get(g).get(m);if(!k)return this.logger.debug(`no message handler for ${g}:${l}, but it's ok`),!1;let{messageHandler:h,sync:Q}=k,P={type:e,name:T.name,id:s,url:u,active:c};if(Q){try{let $=h(n.payload,P);i({ok:!0,data:$})}catch($){i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.details,errorStatus:$.status})}return!1}else return h(n.payload,P).then($=>{i({ok:!0,data:$})}).catch($=>{i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.message,errorStatus:$.status})}),!0}))}getConnection(e,r,n){let a=!1;n&&n.sync&&(a=!0);let i=this.fromType,o=Kr.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Wa(`${i}:${e}`,this.logger);return Kr.get(i).set(e,{messageHandler:r,sync:a,connectionInstance:l}),l}}},Wa=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let n=Ka(e),{type:a,id:i}=n;if(a!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await se.runtime.sendMessage(o);return nl(o,l,this.logger)}catch(l){if(a==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await se.tabs.sendMessage(i,o);return nl(o,l,this.logger)}}};function nl(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new zt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new zt("noResponse","Unknown error")}function Ka(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let n=parseInt(e[2]);if(!isNaN(n))r.id=n;else throw new Error("tab id not a valid number")}return r}var Zm="";function Ga(){return Zm||globalThis.navigator.userAgent}function al(){return Ga().includes("ImtFxiOS")}function Jm(){return Ga().includes("ImtFxAndroid")}function Va(){let t=Ga();if(al()||Jm()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),n=r[0];return r[2]&&(n+="_"+r[2]),{name:n,version:r[1]}}}return null}var wn;function $a(){return wn||(wn=new Gr("content_script",!1).getConnection("pure_main",()=>{}),wn)}var il="G-MKMD9LWFTR";async function sl(t){try{let e=Oe(),r=e.INSTALL_FROM==="firefox_store";if(Va()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let a=Ge(),i=xn(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Bt("fakeUserId","");s||(s=await jr("fakeUserId",""),s&&await pr("fakeUserId",s));let u=Wr(),c=new Date,d=await Bt("installedAt","");d||(d=await jr("installedAt",""),d&&await pr("installedAt",d)),s?d||(d=new Date(0).toISOString(),await pr("installedAt",d)):(s=eg(32),await pr("fakeUserId",s)),d||(d=c.toISOString(),await pr("installedAt",d));let g=new Date(d),m=ol(g),T=ol(c),j=m===T,k=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${il}&api_secret=${l}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${il}&api_secret=${l}`);let Q="";typeof navigator<"u"&&(Q=window.navigator.userAgent);let P=nn.parse(Q),$=t.map(A=>{let f=A.params||{};if(P.os&&(f.os_name=P.os.name||"unknown",f.os_version=P.os.version||"unknown",f.os_version_name=P.os.versionName||"unknown"),P.browser){f.browser_name=P.browser.name||"unknown",f.browser_version=P.browser.version||"unknown";let y=Va();y&&(f.browser_name=y.name,f.browser_version=y.version)}return P.platform&&(f.platform_type=P.platform.type||"unknown"),P.engine&&(f.engine_name=P.engine.name||"unknown",f.engine_version=P.engine.version||"unknown"),u&&(f.version=u),e.INSTALL_FROM&&(f.install_from=e.INSTALL_FROM),m&&(f.install_day=tg(g)),f.userscript=a.toString(),j?f.is_new_user_today="1":f.is_new_user_today="0",k?f.is_new_user_this_week="1":f.is_new_user_this_week="0",i?f.main_frame=0:f.main_frame=1,{...A,params:f}}),oe=await ng({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:$})})}catch{}}function eg(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 diff --git a/dist/chrome/manifest.json b/dist/chrome/manifest.json index a679f03..543479d 100644 --- a/dist/chrome/manifest.json +++ b/dist/chrome/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "__MSG_brandName__", "description": "__MSG_brandDescription__", - "version": "1.4.4", + "version": "1.4.5", "default_locale": "en", "background": { "service_worker": "background.js" diff --git a/dist/chrome/options.js b/dist/chrome/options.js index 50283c0..3621441 100644 --- a/dist/chrome/options.js +++ b/dist/chrome/options.js @@ -1,4 +1,4 @@ -(()=>{var GS=Object.create;var yd=Object.defineProperty;var VS=Object.getOwnPropertyDescriptor;var $S=Object.getOwnPropertyNames;var YS=Object.getPrototypeOf,QS=Object.prototype.hasOwnProperty;var ZS=(e,t)=>()=>(e&&(t=e(e=0)),t);var JS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ol=(e,t)=>{for(var n in t)yd(e,n,{get:t[n],enumerable:!0})},XS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $S(t))!QS.call(e,a)&&a!==n&&yd(e,a,{get:()=>t[a],enumerable:!(r=VS(t,a))||r.enumerable});return e};var eC=(e,t,n)=>(n=e!=null?GS(YS(e)):{},XS(t||!e||!e.__esModule?yd(n,"default",{value:e,enumerable:!0}):n,e));var E,p=ZS(()=>{E={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var GS=Object.create;var bd=Object.defineProperty;var VS=Object.getOwnPropertyDescriptor;var $S=Object.getOwnPropertyNames;var YS=Object.getPrototypeOf,QS=Object.prototype.hasOwnProperty;var ZS=(e,t)=>()=>(e&&(t=e(e=0)),t);var JS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ol=(e,t)=>{for(var n in t)bd(e,n,{get:t[n],enumerable:!0})},XS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $S(t))!QS.call(e,a)&&a!==n&&bd(e,a,{get:()=>t[a],enumerable:!(r=VS(t,a))||r.enumerable});return e};var eC=(e,t,n)=>(n=e!=null?GS(YS(e)):{},XS(t||!e||!e.__esModule?bd(n,"default",{value:e,enumerable:!0}):n,e));var E,p=ZS(()=>{E={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,35 +4936,35 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var YT=JS((g0,Mu)=>{p();(function(){var e;function t(h){var y,T,b="",x=-1,w;if(h&&h.length)for(w=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,T,b,x,w,L=[],M;if(y=T=b=x=w=0,h&&h.length)for(M=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),L[T]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),w=h.charCodeAt(y+2),L[T]=String.fromCharCode((b&15)<<12|(x&63)<<6|w&63),y+=3);return L.join("")}function r(h,y){var T=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(T>>16);return b<<16|T&65535}function a(h,y){return h<>>32-y}function i(h,y){for(var T=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,w=0,L=h.length;w>>4&15)+T.charAt(x&15);return b}function o(h){var y,T=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,T=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,T=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function f(h,y){var T=y.length,b=Array(),x,w,L,M,C,v,A,D;for(v=Array(Math.ceil(h.length/2)),M=v.length,x=0;x0;){for(C=Array(),L=0,x=0;x0||w>0)&&(C[C.length]=w);b[b.length]=L,v=C}for(A="",x=b.length-1;x>=0;x--)A+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=A.length;xh.length*8?b+=y:b+=T.charAt(M>>>6*(3-L)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",T=!1,b=!0;this.encode=function(x){var w,L,M,C="";for(y=y||"=",x=b?t(x):x,len=x.length,w=0;wlen*8?C+=y:C+=h.charAt(M>>>6*(3-L)&63);return C},this.decode=function(x){var w,L,M,C,v,A,D,S,N,F,P="",O=[];if(!x)return x;w=F=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(w++)),A=h.indexOf(x.charAt(w++)),D=h.indexOf(x.charAt(w++)),S=h.indexOf(x.charAt(w++)),N=v<<18|A<<12|D<<6|S,L=N>>16&255,M=N>>8&255,C=N&255,F+=1,D===64?O[F]=String.fromCharCode(L):S===64?O[F]=String.fromCharCode(L,M):O[F]=String.fromCharCode(L,M,C);while(w>>8^T;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(S){return i(x(S,b),y)},this.b64=function(S){return m(x(S),T)},this.any=function(S,N){return f(x(S,b),N)},this.raw=function(S){return x(S,b)},this.hex_hmac=function(S,N){return i(w(S,N),y)},this.b64_hmac=function(S,N){return m(w(S,N),T)},this.any_hmac=function(S,N,F){return f(w(S,N),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(S){return typeof S=="boolean"&&(y=S),this},this.setPad=function(S){return T=S||T,this},this.setUTF8=function(S){return typeof S=="boolean"&&(b=S),this};function x(S){return S=b?t(S):S,l(L(c(S),S.length*8))}function w(S,N){var F,P,O,z,q;for(S=b?t(S):S,N=b?t(N):N,F=c(S),F.length>16&&(F=L(F,S.length*8)),P=Array(16),O=Array(16),q=0;q<16;q+=1)P[q]=F[q]^909522486,O[q]=F[q]^1549556828;return z=L(P.concat(c(N)),512+N.length*8),l(L(O.concat(z),512+128))}function L(S,N){var F,P,O,z,q,I=1732584193,k=-271733879,_=-1732584194,B=271733878;for(S[N>>5]|=128<>>9<<4)+14]=N,F=0;F16&&(D=L(D,v.length*8)),S=Array(16),N=Array(16),F=0;F<16;F+=1)S[F]=D[F]^909522486,N[F]=D[F]^1549556828;return P=L(S.concat(g(A)),512+A.length*8),u(L(N.concat(P),512+160))}function L(v,A){var D,S,N,F,P,O,z,q,I=Array(80),k=1732584193,_=-271733879,B=-1732584194,H=271733878,j=-1009589776;for(v[A>>5]|=128<<24-A%32,v[(A+64>>9<<4)+15]=A,D=0;D16&&(j=I(j,k.length*8));H<16;H+=1)G[H]=j[H]^909522486,V[H]=j[H]^1549556828;return B=I(G.concat(g(_)),512+_.length*8),u(I(V.concat(B),512+256))}function M(k,_){return k>>>_|k<<32-_}function C(k,_){return k>>>_}function v(k,_,B){return k&_^~k&B}function A(k,_,B){return k&_^k&B^_&B}function D(k){return M(k,2)^M(k,13)^M(k,22)}function S(k){return M(k,6)^M(k,11)^M(k,25)}function N(k){return M(k,7)^M(k,18)^C(k,3)}function F(k){return M(k,17)^M(k,19)^C(k,10)}function P(k){return M(k,28)^M(k,34)^M(k,39)}function O(k){return M(k,14)^M(k,18)^M(k,41)}function z(k){return M(k,1)^M(k,8)^C(k,7)}function q(k){return M(k,19)^M(k,61)^C(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function I(k,_){var B=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,G,V,ie,te,J,ce,he,ae,X,Se,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=M(k,O.length*8));I<32;I+=1)_[I]=k[I]^909522486,B[I]=k[I]^1549556828;return q=M(_.concat(g(z)),1024+z.length*8),u(M(B.concat(q),1024+512))}function M(O,z){var q,I,k,_=new Array(80),B=new Array(16),H=[new C(1779033703,-205731576),new C(-1150833019,-2067093701),new C(1013904242,-23791573),new C(-1521486534,1595750129),new C(1359893119,-1377402159),new C(-1694144372,725511199),new C(528734635,-79577749),new C(1541459225,327033209)],j=new C(0,0),G=new C(0,0),V=new C(0,0),ie=new C(0,0),te=new C(0,0),J=new C(0,0),ce=new C(0,0),he=new C(0,0),ae=new C(0,0),X=new C(0,0),Se=new C(0,0),se=new C(0,0),ue=new C(0,0),ke=new C(0,0),We=new C(0,0),Re=new C(0,0),me=new C(0,0);for(x===void 0&&(x=[new C(1116352408,-685199838),new C(1899447441,602891725),new C(-1245643825,-330482897),new C(-373957723,-2121671748),new C(961987163,-213338824),new C(1508970993,-1241133031),new C(-1841331548,-1357295717),new C(-1424204075,-630357736),new C(-670586216,-1560083902),new C(310598401,1164996542),new C(607225278,1323610764),new C(1426881987,-704662302),new C(1925078388,-226784913),new C(-2132889090,991336113),new C(-1680079193,633803317),new C(-1046744716,-815192428),new C(-459576895,-1628353838),new C(-272742522,944711139),new C(264347078,-1953704523),new C(604807628,2007800933),new C(770255983,1495990901),new C(1249150122,1856431235),new C(1555081692,-1119749164),new C(1996064986,-2096016459),new C(-1740746414,-295247957),new C(-1473132947,766784016),new C(-1341970488,-1728372417),new C(-1084653625,-1091629340),new C(-958395405,1034457026),new C(-710438585,-1828018395),new C(113926993,-536640913),new C(338241895,168717936),new C(666307205,1188179964),new C(773529912,1546045734),new C(1294757372,1522805485),new C(1396182291,-1651133473),new C(1695183700,-1951439906),new C(1986661051,1014477480),new C(-2117940946,1206759142),new C(-1838011259,344077627),new C(-1564481375,1290863460),new C(-1474664885,-1136513023),new C(-1035236496,-789014639),new C(-949202525,106217008),new C(-778901479,-688958952),new C(-694614492,1432725776),new C(-200395387,1467031594),new C(275423344,851169720),new C(430227734,-1194143544),new C(506948616,1363258195),new C(659060556,-544281703),new C(883997877,-509917016),new C(958139571,-976659869),new C(1322822218,-482243893),new C(1537002063,2003034995),new C(1747873779,-692930397),new C(1955562222,1575990012),new C(2024104815,1125592928),new C(-2067236844,-1578062990),new C(-1933114872,442776044),new C(-1866530822,593698344),new C(-1538233109,-561857047),new C(-1090935817,-1295615723),new C(-965641998,-479046869),new C(-903397682,-366583396),new C(-779700025,566280711),new C(-354779690,-840897762),new C(-176337025,-294727304),new C(116418474,1914138554),new C(174292421,-1563912026),new C(289380356,-1090974290),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,-1676669620),new C(1288033470,-885112138),new C(1501505948,-60457430),new C(1607167915,987167468),new C(1816402316,1246189591)]),I=0;I<80;I+=1)_[I]=new C(0,0);for(O[z>>5]|=128<<24-(z&31),O[(z+128>>10<<5)+31]=z,k=O.length,I=0;I>>q|z.h<<32-q,O.h=z.h>>>q|z.l<<32-q}function D(O,z,q){O.l=z.h>>>q|z.l<<32-q,O.h=z.l>>>q|z.h<<32-q}function S(O,z,q){O.l=z.l>>>q|z.h<<32-q,O.h=z.h>>>q}function N(O,z,q){var I=(z.l&65535)+(q.l&65535),k=(z.l>>>16)+(q.l>>>16)+(I>>>16),_=(z.h&65535)+(q.h&65535)+(k>>>16),B=(z.h>>>16)+(q.h>>>16)+(_>>>16);O.l=I&65535|k<<16,O.h=_&65535|B<<16}function F(O,z,q,I,k){var _=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535),B=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_>>>16),H=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(B>>>16),j=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(H>>>16);O.l=_&65535|B<<16,O.h=H&65535|j<<16}function P(O,z,q,I,k,_){var B=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535)+(_.l&65535),H=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_.l>>>16)+(B>>>16),j=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(_.h&65535)+(H>>>16),G=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(_.h>>>16)+(j>>>16);O.l=B&65535|H<<16,O.h=j&65535|G<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],L=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(P){return i(C(P,b))},this.b64=function(P){return m(C(P,b),T)},this.any=function(P,O){return f(C(P,b),O)},this.raw=function(P){return C(P,b)},this.hex_hmac=function(P,O){return i(v(P,O))},this.b64_hmac=function(P,O){return m(v(P,O),T)},this.any_hmac=function(P,O,z){return f(v(P,O),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(P){return typeof P=="boolean"&&(y=P),this},this.setPad=function(P){return typeof P<"u"&&(T=P),this},this.setUTF8=function(P){return typeof P=="boolean"&&(b=P),this};function C(P){return P=b?t(P):P,A(D(c(P),P.length*8))}function v(P,O){P=b?t(P):P,O=b?t(O):O;var z,q,I=c(P),k=Array(16),_=Array(16);for(I.length>16&&(I=D(I,P.length*8)),z=0;z<16;z+=1)k[z]=I[z]^909522486,_[z]=I[z]^1549556828;return q=D(k.concat(c(O)),512+O.length*8),A(D(_.concat(q),512+160))}function A(P){var O,z="",q=P.length*32;for(O=0;O>5]>>>O%32&255);return z}function D(P,O){var z,q,I,k,_=1732584193,B=4023233417,H=2562383102,j=271733878,G=3285377520,V,ie,te,J,ce,he,ae,X,Se,se;for(P[O>>5]|=128<>>9<<4)+14]=O,k=P.length,I=0;Ifunction(){return t||(0,e[Jh(e)[0]])((t={exports:{}}).exports,t),t.exports},sC=(e,t)=>{for(var n in t)vd(e,n,{get:t[n],enumerable:!0})},Td=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jh(t))!iC.call(e,a)&&a!==n&&vd(e,a,{get:()=>t[a],enumerable:!(r=rC(t,a))||r.enumerable});return e},uC=(e,t,n)=>(Td(e,t,"default"),n&&Td(n,t,"default")),Xh=(e,t,n)=>(n=e!=null?nC(aC(e)):{},Td(t||!e||!e.__esModule?vd(n,"default",{value:e,enumerable:!0}):n,e)),e4=oC({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(e,t){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof e<"u")r(t);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:e,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(v,A=void 0){super(A),this.createItem=v}get(v){return this.has(v)||this.set(v,this.createItem(v)),super.get(v)}}let u=C=>C&&typeof C=="object"&&typeof C.then=="function",l=(C,v)=>(...A)=>{i.runtime.lastError?C.reject(new Error(i.runtime.lastError.message)):v.singleCallbackArg||A.length<=1&&v.singleCallbackArg!==!1?C.resolve(A[0]):C.resolve(A)},c=C=>C==1?"argument":"arguments",g=(C,v)=>function(D,...S){if(S.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${S.length}`);return new Promise((N,F)=>{if(v.fallbackToNoCallback)try{D[C](...S,l({resolve:N,reject:F},v))}catch{D[C](...S),v.fallbackToNoCallback=!1,v.noCallback=!0,N()}else v.noCallback?(D[C](...S),N()):D[C](...S,l({resolve:N,reject:F},v))})},f=(C,v,A)=>new Proxy(v,{apply(D,S,N){return A.call(S,C,...N)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),h=(C,v={},A={})=>{let D=Object.create(null),S={has(F,P){return P in C||P in D},get(F,P,O){if(P in D)return D[P];if(!(P in C))return;let z=C[P];if(typeof z=="function")if(typeof v[P]=="function")z=f(C,C[P],v[P]);else if(m(A,P)){let q=g(P,A[P]);z=f(C,C[P],q)}else z=z.bind(C);else if(typeof z=="object"&&z!==null&&(m(v,P)||m(A,P)))z=h(z,v[P],A[P]);else if(m(A,"*"))z=h(z,v[P],A["*"]);else return Object.defineProperty(D,P,{configurable:!0,enumerable:!0,get(){return C[P]},set(q){C[P]=q}}),z;return D[P]=z,z},set(F,P,O,z){return P in D?D[P]=O:C[P]=O,!0},defineProperty(F,P,O){return Reflect.defineProperty(D,P,O)},deleteProperty(F,P){return Reflect.deleteProperty(D,P)}},N=Object.create(C);return new Proxy(N,S)},y=C=>({addListener(v,A,...D){v.addListener(C.get(A),...D)},hasListener(v,A){return v.hasListener(C.get(A))},removeListener(v,A){v.removeListener(C.get(A))}}),T=new s(C=>typeof C!="function"?C:function(A){let D=h(A,{},{getContent:{minArgs:0,maxArgs:0}});C(D)}),b=new s(C=>typeof C!="function"?C:function(A,D,S){let N=!1,F,P=new Promise(I=>{F=function(k){N=!0,I(k)}}),O;try{O=C(A,D,F)}catch(I){O=Promise.reject(I)}let z=O!==!0&&u(O);if(O!==!0&&!z&&!N)return!1;let q=I=>{I.then(k=>{S(k)},k=>{let _;k&&(k instanceof Error||typeof k.message=="string")?_=k.message:_="An unexpected error occurred",S({__mozWebExtensionPolyfillReject__:!0,message:_})}).catch(k=>{})};return q(z?O:P),!0}),x=({reject:C,resolve:v},A)=>{i.runtime.lastError?i.runtime.lastError.message===r?v():C(new Error(i.runtime.lastError.message)):A&&A.__mozWebExtensionPolyfillReject__?C(new Error(A.message)):v(A)},w=(C,v,A,...D)=>{if(D.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${D.length}`);return new Promise((S,N)=>{let F=x.bind(null,{resolve:S,reject:N});D.push(F),A.sendMessage(...D)})},L={devtools:{network:{onRequestFinished:y(T)}},runtime:{onMessage:y(b),onMessageExternal:y(b),sendMessage:w.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:w.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},M={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":M},services:{"*":M},websites:{"*":M}},h(i,L,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),t4={};sC(t4,{default:()=>sl});var lC=Xh(e4());uC(t4,Xh(e4()));var{default:Zh,...cC}=lC,sl=Zh!==void 0?Zh:cC;globalThis.immersiveTranslateBrowserAPI=sl;p();p();p();p();var gl,Oe,o4,dC,Ss,n4,s4,ll={},u4=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ya(e,t){for(var n in t)e[n]=t[n];return e}function l4(e){var t=e.parentNode;t&&t.removeChild(e)}function Cs(e,t,n){var r,a,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?gl.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ul(e,o,r,a,null)}function ul(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++o4};return a==null&&Oe.vnode!=null&&Oe.vnode(i),i}function xe(e){return e.children}function pi(e,t){this.props=e,this.context=t}function io(e,t){if(t==null)return e.__?io(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?ul(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(f=b[c])===null||f&&m.key==f.key&&m.type===f.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:pl}),n.__[e]}function K(e){return xs=1,hC(D4,e)}function hC(e,t,n){var r=fl(Es++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):D4(void 0,t),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){It.u=!0;var a=It.shouldComponentUpdate;It.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function le(e,t){var n=fl(Es++,3);!Oe.__s&&w4(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function Ve(e){return xs=5,ze(function(){return{current:e}},[])}function ze(e,t){var n=fl(Es++,7);return w4(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qe(e,t){return xs=8,ze(function(){return e},t)}function Me(e){var t=It.context[e.__c],n=fl(Es++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function bC(){for(var e;e=E4.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ml),e.__H.__h.forEach(Ed),e.__H.__h=[]}catch(t){e.__H.__h=[],Oe.__e(t,e.__v)}}Oe.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),It=null,y4&&y4(e)},Oe.__r=function(e){T4&&T4(e),Es=0;var t=(It=e.__c).__H;t&&(xd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=pl,n.__N=n.i=void 0})):(t.__h.forEach(ml),t.__h.forEach(Ed),t.__h=[])),xd=It},Oe.diffed=function(e){v4&&v4(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E4.push(t)!==1&&b4===Oe.requestAnimationFrame||((b4=Oe.requestAnimationFrame)||yC)(bC)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==pl&&(n.__=n.__V),n.i=void 0,n.__V=pl})),xd=It=null},Oe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ml),n.__h=n.__h.filter(function(r){return!r.__||Ed(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Oe.__e(r,n.__v)}}),S4&&S4(e,t)},Oe.unmount=function(e){C4&&C4(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ml(r)}catch(a){t=a}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var x4=typeof requestAnimationFrame=="function";function yC(e){var t,n=function(){clearTimeout(r),x4&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);x4&&(t=requestAnimationFrame(n))}function ml(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function Ed(e){var t=It;e.__c=e.__(),It=t}function w4(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function D4(e,t){return typeof t=="function"?t(e):t}p();p();p();var ws;function Rd(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function R4(e,t=","){return e.map(Rd).join(t)}var Od=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function so(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function bl(e,t="@media "){return t+dt(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function dt(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function A4(e){return e}function As(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function O4(e){return e.match(/[-=:;]/g)?.length||0}function Ld(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(O4(e),15)<<18}var TC=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function zd({n:e,i:t,v:n=[]},r,a,i){e&&(e=Rd({n:e,i:t,v:n})),i=[...dt(i)];for(let s of n){let u=r.theme("screens",s);for(let l of dt(u&&bl(u)||r.v(s))){var o;i.push(l),a|=u?67108864|Ld(l):s=="dark"?1073741824:l[0]=="@"?Ld(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~TC.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:i,i:t}}var Nd=new Map;function _d(e){if(e.d){let t=[],n=wd(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?wd(r,i=>wd(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Dd(i,o)}return Dd(o,i)})):r,"&"),r=>Dd(r,e.n?"."+Od(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function wd(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function Dd(e,t){return e.replace(/&/g,t)}var k4=new Intl.Collator("en",{numeric:!0});function z4(e,t){for(var n=0,r=e.length;n>1;0>=N4(e[a],t)?n=a+1:r=a}return r}function N4(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||k4.compare(P4(e.n),P4(t.n))||k4.compare(L4(e.n),L4(t.n))}function P4(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function L4(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Ad(e,t){return Math.round(parseInt(e,16)*t)}function Gr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let i=(e.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[Ad(e.substr(1,i),o),Ad(e.substr(1+i,i),o),Ad(e.substr(1+2*i,i),o),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Ud(e,t,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},g){let f=[],m="",h=0,y=0;for(let x in o||{}){var T,b;let w=o[x];if(x[0]=="@"){if(!w)continue;if(x[1]=="a"){f.push(...Hd(s,u,Ds(""+w),g,u,l,c,!0));continue}if(x[1]=="l"){for(let L of dt(w))f.push(...i(L,{n:s,p:(T=Nt[x[7]],u&~Nt.o|T),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){f.push(...dt(w).map(L=>({p:-1,o:0,r:[],d:x+" "+L})));continue}if(x[1]=="k"){f.push({p:Nt.d,o:0,r:[x],d:i(w,{p:Nt.d},g).map(_d).join("")});continue}if(x[1]=="f"){f.push(...dt(w).map(L=>({p:Nt.d,o:0,r:[x],d:i(L,{p:Nt.d},g).map(_d).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))x=="label"&&w?s=w+so(JSON.stringify([u,c,o])):(w||w===0)&&(x=x.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:O4(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+dt(w).map(L=>g.s(x,qd(""+L,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let L=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(M,C)=>{let v=g.theme("screens",C);return v?(L|=67108864,bl(v,"")):M}),L|=Ld(x)),f.push(...i(w,{n:s,p:L,r:[...l,x],i:c},g))}else f.push(...i(w,{p:u,r:[...l,x]},g))}return f.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:m}),f.sort(N4)}(e,zd(t,n,r,a),n)}function qd(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=t(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Gr(s):""+dt(s).filter(u=>Object(u)!==u)})}function jd(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function hl(e,t,n=Nt.u,r,a){let i=[];for(let o of e)for(let s of function(u,l,c,g,f){u={...u,i:u.i||f};let m=function(h,y){let T=Nd.get(h.n);return T?T(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:g,p:c}=zd(u,l,c,g),jd(hl(Ds(m),l,c,g,u.i),u.n)):Array.isArray(m)?m.map(h=>{var y,T;return{o:0,...h,r:[...dt(g),...dt(h.r)],p:(y=c,T=h.p??c,y&~Nt.o|T)}}):Ud(m,u,l,c,g):[{c:Rd(u),p:0,o:0,r:[]}]}(o,t,n,r,a))i.splice(z4(i,s),0,s);return i}function Hd(e,t,n,r,a,i,o,s){return jd((s?n.flatMap(u=>hl([u],r,a,i,o)):hl(n,r,a,i,o)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function vC(e,t,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=zd(i,o,t);return n&&Hd(s,t,n,o,u,l,c,r)},Nd.set(e,a),e}function kd(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),t[0].push({n:o,v:r.filter(SC),i:a}))}}function SC(e,t,n){return n.indexOf(e)==t}var _4=new Map;function Ds(e){let t=_4.get(e);if(!t){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&kd(n,r)),a=s+1};for(;s1?g.slice(0,-1)+so(JSON.stringify([g,f])):g+"("+R4(f)+")",Nt.a,f,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),_4.set(e,t=r[0])}return t}function U4(e,t,n){return t.reduce((r,a,i)=>r+n(a)+e[i+1],e[0])}function q4(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?U4(e,t,n=>Pd(n).trim()):t.filter(Boolean).reduce((n,r)=>n+Pd(r),e?Pd(e):"")}function Pd(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=q4(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var oF=j4("@"),sF=j4("~");function j4(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return t(r,a,i)}}});function t(n,r,a){return R4(Ds(n+e+"("+q4(r,a)+")"))}}function Md(e,t){return Array.isArray(e)?M4(U4(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?M4(e):[e]}var CC=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function M4(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CC.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][t[1]]=t[2]);return r}function H4(e,...t){var n;let r=Md(e,t),a=(r.find(i=>i.label)?.label||"css")+so(JSON.stringify(r));return n=(i,o)=>jd(r.flatMap(s=>Ud(s,i,o,Nt.o)),a),Nd.set(a,n),a}var uF=new Proxy(function(e,t){return F4("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return F4(t,n,r)}}});function F4(e,t,n){return{toString(){return H4({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Fd(t,n)]}function Fd(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Bd(n,1)}):n=>e||{[n[1]]:Bd(n,2)}}function Bd(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function oe(e,t,n,r){return[e,xC(t,n,r)]}function xC(e,t,n){let r=typeof t=="string"?(a,i)=>({[t]:n?n(a,i):a._}):t||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=W4(e||a[1]),s=i.theme(o,a.$$)??Ar(a.$$,o,i);if(s!=null)return a._=Bd(a,0,s),r(a,i,o)}}function $t(e,t={},n){return[e,EC(t,n)]}function EC(e={},t){return(n,r)=>{let{section:a=W4(n[0]).replace("-","")+"Color"}=e,[i,o]=wC(n.$$);if(!i)return;let s=r.theme(a,i)||Ar(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,f=r.theme(l,o||"DEFAULT")||o&&Ar(o,l,r),m=t||(({_:y})=>{let T=ks(c,y);return g?{[g]:T}:T});n._={value:Gr(s,{opacityVariable:u||void 0,opacityValue:f||void 0}),color:y=>Gr(s,y),opacityVariable:u||void 0,opacityValue:f||void 0};let h=m(n,r);if(!n.dark){let y=r.d(a,i,s);y&&y!==s&&(n._={value:Gr(y,{opacityVariable:u||void 0,opacityValue:f||"1"}),color:T=>Gr(y,T),opacityVariable:u||void 0,opacityValue:f||void 0},h={"&":h,[r.v("dark")]:m(n,r)})}return h}}function wC(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ks(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function Ar(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=uo(qd(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function W4(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function uo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>uo(n)+r+uo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var lF=Symbol();function Ps({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:dt(t.variants),rules:dt(t.rules),ignorelist:dt(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of dt([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&dt(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:i=n.darkMode,darkColor:o=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:f=n.stringify,finalize:m}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...dt(a)],darkMode:i,darkColor:o,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...dt(u)],rules:[...n.rules,...dt(l)],ignorelist:[...n.ignorelist,...dt(c)],hash:g,stringify:f,finalize:[...n.finalize,...dt(m)]}}return n}function B4(e,t,n,r,a,i){for(let o of t){let s=n.get(o);s||n.set(o,s=r(o));let u=s(e,a,i);if(u)return u}}function DC(e){var t;return Id(e[0],typeof(t=e[1])=="function"?t:()=>t)}function AC(e){var t,n;return Array.isArray(e)?Id(e[0],Fd(e[1],e[2])):Id(e,Fd(t,n))}function Id(e,t){return K4(e,(n,r,a,i)=>{let o=r.exec(n);if(o)return o.$$=n.slice(o[0].length),o.dark=i,t(o,a)})}function K4(e,t){let n=dt(e).map(kC);return(r,a,i)=>{for(let o of n){let s=t(r,o,a,i);if(s)return s}}}function kC(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function PC(e,t){let n=Ps(e),r=function({theme:u,darkMode:l,darkColor:c=As,variants:g,rules:f,hash:m,stringify:h,ignorelist:y,finalize:T}){let b=new Map,x=new Map,w=new Map,L=new Map,M=K4(y,(A,D)=>D.test(A));g.push(["dark",Array.isArray(l)||l=="class"?`${dt(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let C=typeof m=="function"?A=>m(A,so):m?so:A4;C!==A4&&T.push(A=>({...A,n:A.n&&C(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,S)=>"--"+C(S).replace("#",""))}));let v={theme:function({extend:A={},...D}){let S={},N={get colors(){return F("colors")},theme:F,negative(){return{}},breakpoints(O){let z={};for(let q in O)typeof O[q]=="string"&&(z["screen-"+q]=O[q]);return z}};return F;function F(O,z,q,I){if(O){if({1:O,2:I}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let H=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(j,G,V=G)=>H.push(V)),O=H.shift(),q=z,z=H.join("-")}let _=S[O]||Object.assign(Object.assign(S[O]={},P(D,O)),P(A,O));if(z==null)return _;z||="DEFAULT";let B=_[z]??z.split("-").reduce((H,j)=>H?.[j],_)??q;return I?Gr(B,{opacityValue:qd(I,F)}):B}let k={};for(let _ of[...Object.keys(D),...Object.keys(A)])k[_]=F(_);return k}function P(O,z){let q=O[z];return typeof q=="function"&&(q=q(N)),q&&/color|fill|stroke/i.test(z)?function I(k,_=[]){let B={};for(let H in k){let j=k[H],G=[..._,H];B[G.join("-")]=j,H=="DEFAULT"&&(G=_,B[_.join("-")]=j),typeof j=="object"&&Object.assign(B,I(j,G))}return B}(q):q}}(u),e:Od,h:C,s(A,D){return h(A,D,v)},d(A,D,S){return c(A,D,v,S)},v(A){return b.has(A)||b.set(A,B4(A,g,x,DC,v)||"&:"+A),b.get(A)},r(A,D){let S=JSON.stringify([A,D]);return w.has(S)||w.set(S,!M(A,v)&&B4(A,f,L,AC,v,D)),w.get(S)},f(A){return T.reduce((D,S)=>S(D,v),A)}};return v}(n),a=new Map,i=[],o=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,i.length,l),i.push(l),o.add(u)});function s(u){let l=r.f(u),c=_d(l);if(c&&!o.has(c)){o.add(c);let g=z4(i,u);t.insert(c,g,u),i.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of dt(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?Hd("",Nt.b,Ds(c),r,Nt.b,[],!1,!0):Ud(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of hl(Ds(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(o),c=new Map(a),g=[...i];return()=>{u(),o=l,a=c,i=g}},clear(){t.clear(),o=new Set,a=new Map,i=[]},destroy(){this.clear(),t.destroy()}}))}function LC(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function _C(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:i,target:o}of a)if(i[0]=="a")r(o);else for(let s of o.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let i,o=a.getAttribute?.("class");o&&LC(o,i=e(o))&&a.setAttribute("class",i)}}function MC(e=Wd,t=typeof document<"u"&&document.documentElement){if(t){let n=_C(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function G4(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function FC(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:G4(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:As}}function BC(e){let t=e&&typeof e!="string"?e:G4(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:As}}function IC(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:As}}function V4(e,t){let n=typeof document>"u"?IC(!t):e?BC():FC();return t||(n.resume=OC),n}function RC(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):dt(e)).join("")}function OC(e,t){let n=RC(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let i;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let o of document.querySelectorAll("[class]"))e(o.getAttribute("class"));for(;a=r.exec(n),i&&t(n.slice(i.index+i[0].length,a?.index),{p:parseInt(i[1],36),o:parseInt(i[2],36)/2,n:i[3]}),i=a;);}}var Wd=new Proxy(As,{apply(e,t,n){return ws(n[0])},get(e,t){let n=ws[t];return typeof n=="function"?function(){return n.apply(ws,arguments)}:n}});function $4(e={},t=V4,n){return ws?.destroy(),ws=MC(PC(e,typeof t=="function"?t():t),n)}function Kd(e,t=!0){let n=Ps(e);return $4({...n,hash:n.hash??t},()=>V4(!t))}var cF=function e(t){return new Proxy(function(n,...r){return I4(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...i){return I4(t,r,a,i)}}})}();function I4(e,t,n,r){return{toString(){let a=Md(n,r),i=Od(t+so(JSON.stringify([t,a])));return(typeof e=="function"?e:Wd)(H4({[`@keyframes ${i}`]:Md(n,r)})),i}}}p();p();p();var zC=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Y4(e){return zC.get(e)}function Q4(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Z4(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var NC=[["-webkit-",1],["-moz-",2],["-ms-",4]];function yl(){return({stringify:e})=>({stringify(t,n,r){let a="",i=Y4(t);i&&(a+=e(i,n,r)+";");let o=Q4(t),s=Z4(t,n);for(let u of NC)o&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}p();p();var Vd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Hn(4,"rem",4,.5,.5),...Hn(12,"rem",4,5),14:"3.5rem",...Hn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ze("blur"),backdropBrightness:Ze("brightness"),backdropContrast:Ze("contrast"),backdropGrayscale:Ze("grayscale"),backdropHueRotate:Ze("hueRotate"),backdropInvert:Ze("invert"),backdropOpacity:Ze("opacity"),backdropSaturate:Ze("saturate"),backdropSepia:Ze("sepia"),backgroundColor:Ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Hn(200,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ze("spacing"),borderWidth:{DEFAULT:"1px",...Qn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ze("colors"),caretColor:Ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Hn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ze("borderColor"),divideOpacity:Ze("borderOpacity"),divideWidth:Ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Ls(2,6),...Ls(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ze("spacing"),gradientColorStops:Ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Ls(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Ls(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Hn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Hn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ze("spacing"),placeholderColor:Ze("colors"),placeholderOpacity:Ze("opacity"),outlineColor:Ze("colors"),outlineOffset:Qn(8,"px"),outlineWidth:Qn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ze("colors"),ringOffsetWidth:Qn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Qn(8,"px")},rotate:{...Qn(2,"deg"),...Qn(12,"deg",3),...Qn(180,"deg",45)},saturate:Hn(200,"",100,0,50),scale:{...Hn(150,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ze("spacing"),scrollPadding:Ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Qn(2,"deg"),...Qn(12,"deg",3)},space:Ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Hn(2),textColor:Ze("colors"),textDecorationColor:Ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Qn(8,"px")},textUnderlineOffset:{auto:"auto",...Qn(8,"px")},textIndent:Ze("spacing"),textOpacity:Ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Ls(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Hn(50,"",1,0,10),auto:"auto"}};function Ls(e,t){let n={};do for(var r=1;rt(e)}var UC={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Vd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Vd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},qC=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:Ar(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),oe("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[bl(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),oe("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),oe("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Tl),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),oe("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),oe("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),oe("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",J4),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),oe("(flex-(?:grow|shrink))(?:$|-)"),oe("(flex)-"),oe("grow(?:$|-)","flexGrow"),oe("shrink(?:$|-)","flexShrink"),oe("basis-","flexBasis"),oe("-?(order)-"),"-?(order)-(\\d+)",oe("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",n3),oe("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",t3),oe("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),oe("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),oe("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",n3),oe("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",t3),oe("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),oe("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Tl(J4(e))),re("grid-flow-(dense)","gridAutoFlow"),oe("auto-cols-","gridAutoColumns"),oe("auto-rows-","gridAutoRows"),oe("gap-x(?:$|-)","gap","columnGap"),oe("gap-y(?:$|-)","gap","rowGap"),oe("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",X4),re("(content|items|self)-",e=>({["align-"+e[1]]:X4(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),oe("p([xytrbl])?(?:$|-)","padding",lo("padding")),oe("-?m([xytrbl])?(?:$|-)","margin",lo("margin")),oe("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),oe("w-","width"),oe("min-w-","minWidth"),oe("max-w-","maxWidth"),oe("h-","height"),oe("min-h-","minHeight"),oe("max-h-","maxHeight"),oe("font-","fontWeight"),oe("font-","fontFamily",({_:e})=>typeof(e=dt(e))[1]=="string"?{fontFamily:ur(e)}:{fontFamily:ur(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...va({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),oe("tracking-","letterSpacing"),oe("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),oe("list-","listStyleType"),re("list-","listStyleType"),oe("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),$t("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),oe("text-opacity-","textOpacity","--tw-text-opacity"),$t("text-",{property:"color"}),oe("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),oe("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),oe("underline-offset-","textUnderlineOffset"),$t("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),oe("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),$t("caret-",{opacityVariable:!1,opacitySection:"opacity"}),$t("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${mi(e," ")},var(--tw-gradient-stops))`),$t("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),$t("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),$t("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),oe("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),$t("bg-",{section:"backgroundColor"}),oe("bg-","backgroundImage"),oe("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Tl),oe("bg-","backgroundSize"),oe("rounded(?:$|-)","borderRadius"),oe("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${mi(n[0])}-radius`]:t,[`border-${mi(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),oe("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),oe("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...va({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),$t("border-([xytrbl])-",{section:"borderColor"},lo("border","Color")),$t("border-"),oe("border-([xytrbl])(?:$|-)","borderWidth",lo("border","Width")),oe("border(?:$|-)","borderWidth"),oe("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),oe("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${mi(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${mi(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),$t("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),oe("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),$t("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),oe("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),$t("ring-",{property:"--tw-ring-color"}),oe("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Gr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Gr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),$t("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),oe("shadow(?:$|-)","boxShadow",({_:e})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ur(e),"--tw-shadow-colored":ur(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),oe("(opacity)-"),re("mix-blend-","mixBlendMode"),...e3(),...e3("backdrop-"),oe("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ur(e),transitionTimingFunction:e._=="none"?void 0:ur(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ur(t("transitionDuration",""))})),oe("duration(?:$|-)","transitionDuration","transitionDuration",ur),oe("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ur),oe("delay(?:$|-)","transitionDelay","transitionDelay",ur),oe("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=ur(e),i=a.split(" "),o=t("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",$d),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":r3(e=="gpu")})),oe("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...$d()})),oe("-?(rotate)-","rotate",Gd),oe("-?(translate-[xy])-","translate",Gd),oe("-?(skew-[xy])-","skew",Gd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Tl),"(appearance)-",oe("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",oe("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...va({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),oe("scroll-p([xytrbl])?(?:$|-)","padding",lo("scroll-padding")),oe("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",lo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...va({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),oe("-?(outline-offset)-"),$t("outline-",{opacityVariable:!1,opacitySection:"opacity"}),oe("outline-","outlineWidth"),"(pointer-events)-",oe("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),$t("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),$t("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),oe("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Tl(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function J4(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function mi(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function ur(e){return e&&""+(e._||e)}function X4({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function lo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...ks(e+"-"+mi(a[0])+t,r),...ks(e+"-"+mi(a[1])+t,r)}:ks(e+t,r)}}function e3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...va(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>oe(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:dt(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Gd({1:e,_:t}){return{["--tw-"+e]:t,...$d()}}function $d(){return{...va({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":r3()}),transform:"var(--tw-transform)"}}function r3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function t3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function n3({1:e}){return`repeat(${e},minmax(0,1fr))`}function va(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jC=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||Ar(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:i,h:o,v:s})=>{let u=uo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${i(o(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||Ar(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||Ar(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=Ar(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&uo(e).replace(/[}]+$/,"").split("{")]];function HC({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:UC,theme:{...Vd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jC,rules:qC,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var WC={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},KC={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},GC={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},VC={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$C={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},YC={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},QC={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ZC={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},JC={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},XC={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ex={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},tx={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},nx={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},rx={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ax={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ix={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},ox={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},sx={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ux={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},lx={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},cx={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},dx={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},gx={__proto__:null,slate:WC,gray:KC,zinc:GC,neutral:VC,stone:$C,red:YC,orange:QC,amber:ZC,yellow:JC,lime:XC,green:ex,emerald:tx,teal:nx,cyan:rx,sky:ax,blue:ix,indigo:ox,violet:sx,purple:ux,fuchsia:lx,pink:cx,rose:dx};function vl({disablePreflight:e}={}){return HC({colors:gx,disablePreflight:e})}p();p();var Sl=globalThis||(typeof window<"u"?window:self),px=Object.create,Qd=Object.defineProperty,mx=Object.getOwnPropertyDescriptor,fx=Object.getOwnPropertyNames,hx=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty,yx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tx=(e,t)=>{for(var n in t)Qd(e,n,{get:t[n],enumerable:!0})},Yd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fx(t))!bx.call(e,a)&&a!==n&&Qd(e,a,{get:()=>t[a],enumerable:!(r=mx(t,a))||r.enumerable});return e},vx=(e,t,n)=>(Yd(e,t,"default"),n&&Yd(n,t,"default")),i3=(e,t,n)=>(n=e!=null?px(hx(e)):{},Yd(t||!e||!e.__esModule?Qd(n,"default",{value:e,enumerable:!0}):n,e)),o3=yx((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var f=new XMLHttpRequest;f.open("GET",l),f.responseType="blob",f.onload=function(){u(f.response,c,g)},f.onerror=function(){},f.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Sl=="object"&&Sl.global===Sl?Sl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var f=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,g):i(m,m.target="_blank")):(m.href=f.createObjectURL(l),setTimeout(function(){f.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var f=document.createElement("a");f.href=l,f.target="_blank",setTimeout(function(){i(f)})}}:function(l,c,g,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var m=l.type==="application/octet-stream",h=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&h||s)&&typeof FileReader<"u"){var T=new FileReader;T.onloadend=function(){var w=T.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},T.readAsDataURL(l)}else{var b=o.URL||o.webkitURL,x=b.createObjectURL(l);f?f.location=x:location.href=x,f=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});o.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),s3={};Tx(s3,{default:()=>fi});var Sx=i3(o3());vx(s3,i3(o3()));var{default:a3,...Cx}=Sx,fi=a3!==void 0?a3:Cx;p();p();p();p();p();p();p();function co(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(i){await i,t="fulfilled",r(i)},reject(i){t="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}p();var Zd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Cl(e,t){let n=co(),r=setTimeout(()=>n.reject(new Zd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}p();p();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},e);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}p();var u3=class{#e=0;#t=[];#n=[];#r=co();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tYx,bgBlue:()=>Xx,bgBrightBlack:()=>rE,bgBrightBlue:()=>sE,bgBrightCyan:()=>lE,bgBrightGreen:()=>iE,bgBrightMagenta:()=>uE,bgBrightRed:()=>aE,bgBrightWhite:()=>cE,bgBrightYellow:()=>oE,bgCyan:()=>tE,bgGreen:()=>Zx,bgMagenta:()=>eE,bgRed:()=>Qx,bgRgb24:()=>mE,bgRgb8:()=>gE,bgWhite:()=>nE,bgYellow:()=>Jx,black:()=>Fx,blue:()=>Ox,bold:()=>Dx,brightBlack:()=>d3,brightBlue:()=>Kx,brightCyan:()=>Vx,brightGreen:()=>Hx,brightMagenta:()=>Gx,brightRed:()=>jx,brightWhite:()=>$x,brightYellow:()=>Wx,cyan:()=>Nx,dim:()=>Ax,getColorEnabled:()=>Ex,gray:()=>qx,green:()=>Ix,hidden:()=>_x,inverse:()=>Lx,italic:()=>kx,magenta:()=>zx,red:()=>Bx,reset:()=>wx,rgb24:()=>pE,rgb8:()=>dE,setColorEnabled:()=>xx,strikethrough:()=>Mx,stripColor:()=>hE,underline:()=>Px,white:()=>Ux,yellow:()=>Rx});p();var{Deno:l3}=globalThis,c3=typeof l3?.noColor=="boolean"?l3.noColor:!0,Jd=!c3;function xx(e){c3||(Jd=e)}function Ex(){return Jd}function Fe(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Be(e,t){return Jd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function wx(e){return Be(e,Fe([0],0))}function Dx(e){return Be(e,Fe([1],22))}function Ax(e){return Be(e,Fe([2],22))}function kx(e){return Be(e,Fe([3],23))}function Px(e){return Be(e,Fe([4],24))}function Lx(e){return Be(e,Fe([7],27))}function _x(e){return Be(e,Fe([8],28))}function Mx(e){return Be(e,Fe([9],29))}function Fx(e){return Be(e,Fe([30],39))}function Bx(e){return Be(e,Fe([31],39))}function Ix(e){return Be(e,Fe([32],39))}function Rx(e){return Be(e,Fe([33],39))}function Ox(e){return Be(e,Fe([34],39))}function zx(e){return Be(e,Fe([35],39))}function Nx(e){return Be(e,Fe([36],39))}function Ux(e){return Be(e,Fe([37],39))}function qx(e){return d3(e)}function d3(e){return Be(e,Fe([90],39))}function jx(e){return Be(e,Fe([91],39))}function Hx(e){return Be(e,Fe([92],39))}function Wx(e){return Be(e,Fe([93],39))}function Kx(e){return Be(e,Fe([94],39))}function Gx(e){return Be(e,Fe([95],39))}function Vx(e){return Be(e,Fe([96],39))}function $x(e){return Be(e,Fe([97],39))}function Yx(e){return Be(e,Fe([40],49))}function Qx(e){return Be(e,Fe([41],49))}function Zx(e){return Be(e,Fe([42],49))}function Jx(e){return Be(e,Fe([43],49))}function Xx(e){return Be(e,Fe([44],49))}function eE(e){return Be(e,Fe([45],49))}function tE(e){return Be(e,Fe([46],49))}function nE(e){return Be(e,Fe([47],49))}function rE(e){return Be(e,Fe([100],49))}function aE(e){return Be(e,Fe([101],49))}function iE(e){return Be(e,Fe([102],49))}function oE(e){return Be(e,Fe([103],49))}function sE(e){return Be(e,Fe([104],49))}function uE(e){return Be(e,Fe([105],49))}function lE(e){return Be(e,Fe([106],49))}function cE(e){return Be(e,Fe([107],49))}function Sa(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function dE(e,t){return Be(e,Fe([38,5,Sa(t)],39))}function gE(e,t){return Be(e,Fe([48,5,Sa(t)],49))}function pE(e,t){return typeof t=="number"?Be(e,Fe([38,2,t>>16&255,t>>8&255,t&255],39)):Be(e,Fe([38,2,Sa(t.r),Sa(t.g),Sa(t.b)],39))}function mE(e,t){return typeof t=="number"?Be(e,Fe([48,2,t>>16&255,t>>8&255,t&255],49)):Be(e,Fe([48,2,Sa(t.r),Sa(t.g),Sa(t.b)],49))}var fE=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function hE(e){return e.replace(fE,"")}p();p();var Xd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},bE={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function eg(e,t){let n={...bE,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new Xd(a,n.maxAttempts)}p();var Vr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function tg(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2|t[r]>>6],n+=Vr[t[r]&63];return r===a+1&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2],n+="="),n}p();p();var yE=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,TE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,vE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ng={Space_Separator:yE,ID_Start:TE,ID_Continue:vE},Rt={isSpaceSeparator(e){return typeof e=="string"&&ng.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||ng.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||ng.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},ag,En,Yr,El,Ca,lr,en,sg,Ms,SE=function(e,t){ag=String(e),En="start",Yr=[],El=0,Ca=1,lr=0,en=void 0,sg=void 0,Ms=void 0;do en=CE(),wE[En]();while(en.type!=="eof");return typeof t=="function"?ig({"":Ms},"",t):Ms};function ig(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var YT=JS((g0,Fu)=>{p();(function(){var e;function t(h){var y,T,b="",x=-1,w;if(h&&h.length)for(w=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,T,b,x,w,L=[],M;if(y=T=b=x=w=0,h&&h.length)for(M=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),L[T]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),w=h.charCodeAt(y+2),L[T]=String.fromCharCode((b&15)<<12|(x&63)<<6|w&63),y+=3);return L.join("")}function r(h,y){var T=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(T>>16);return b<<16|T&65535}function a(h,y){return h<>>32-y}function i(h,y){for(var T=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,w=0,L=h.length;w>>4&15)+T.charAt(x&15);return b}function o(h){var y,T=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,T=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,T=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function f(h,y){var T=y.length,b=Array(),x,w,L,M,C,v,A,D;for(v=Array(Math.ceil(h.length/2)),M=v.length,x=0;x0;){for(C=Array(),L=0,x=0;x0||w>0)&&(C[C.length]=w);b[b.length]=L,v=C}for(A="",x=b.length-1;x>=0;x--)A+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=A.length;xh.length*8?b+=y:b+=T.charAt(M>>>6*(3-L)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",T=!1,b=!0;this.encode=function(x){var w,L,M,C="";for(y=y||"=",x=b?t(x):x,len=x.length,w=0;wlen*8?C+=y:C+=h.charAt(M>>>6*(3-L)&63);return C},this.decode=function(x){var w,L,M,C,v,A,D,S,N,F,P="",O=[];if(!x)return x;w=F=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(w++)),A=h.indexOf(x.charAt(w++)),D=h.indexOf(x.charAt(w++)),S=h.indexOf(x.charAt(w++)),N=v<<18|A<<12|D<<6|S,L=N>>16&255,M=N>>8&255,C=N&255,F+=1,D===64?O[F]=String.fromCharCode(L):S===64?O[F]=String.fromCharCode(L,M):O[F]=String.fromCharCode(L,M,C);while(w>>8^T;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(S){return i(x(S,b),y)},this.b64=function(S){return m(x(S),T)},this.any=function(S,N){return f(x(S,b),N)},this.raw=function(S){return x(S,b)},this.hex_hmac=function(S,N){return i(w(S,N),y)},this.b64_hmac=function(S,N){return m(w(S,N),T)},this.any_hmac=function(S,N,F){return f(w(S,N),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(S){return typeof S=="boolean"&&(y=S),this},this.setPad=function(S){return T=S||T,this},this.setUTF8=function(S){return typeof S=="boolean"&&(b=S),this};function x(S){return S=b?t(S):S,l(L(c(S),S.length*8))}function w(S,N){var F,P,O,z,q;for(S=b?t(S):S,N=b?t(N):N,F=c(S),F.length>16&&(F=L(F,S.length*8)),P=Array(16),O=Array(16),q=0;q<16;q+=1)P[q]=F[q]^909522486,O[q]=F[q]^1549556828;return z=L(P.concat(c(N)),512+N.length*8),l(L(O.concat(z),512+128))}function L(S,N){var F,P,O,z,q,I=1732584193,k=-271733879,_=-1732584194,B=271733878;for(S[N>>5]|=128<>>9<<4)+14]=N,F=0;F16&&(D=L(D,v.length*8)),S=Array(16),N=Array(16),F=0;F<16;F+=1)S[F]=D[F]^909522486,N[F]=D[F]^1549556828;return P=L(S.concat(g(A)),512+A.length*8),u(L(N.concat(P),512+160))}function L(v,A){var D,S,N,F,P,O,z,q,I=Array(80),k=1732584193,_=-271733879,B=-1732584194,H=271733878,j=-1009589776;for(v[A>>5]|=128<<24-A%32,v[(A+64>>9<<4)+15]=A,D=0;D16&&(j=I(j,k.length*8));H<16;H+=1)G[H]=j[H]^909522486,V[H]=j[H]^1549556828;return B=I(G.concat(g(_)),512+_.length*8),u(I(V.concat(B),512+256))}function M(k,_){return k>>>_|k<<32-_}function C(k,_){return k>>>_}function v(k,_,B){return k&_^~k&B}function A(k,_,B){return k&_^k&B^_&B}function D(k){return M(k,2)^M(k,13)^M(k,22)}function S(k){return M(k,6)^M(k,11)^M(k,25)}function N(k){return M(k,7)^M(k,18)^C(k,3)}function F(k){return M(k,17)^M(k,19)^C(k,10)}function P(k){return M(k,28)^M(k,34)^M(k,39)}function O(k){return M(k,14)^M(k,18)^M(k,41)}function z(k){return M(k,1)^M(k,8)^C(k,7)}function q(k){return M(k,19)^M(k,61)^C(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function I(k,_){var B=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,G,V,ie,te,J,ce,he,ae,X,Se,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=M(k,O.length*8));I<32;I+=1)_[I]=k[I]^909522486,B[I]=k[I]^1549556828;return q=M(_.concat(g(z)),1024+z.length*8),u(M(B.concat(q),1024+512))}function M(O,z){var q,I,k,_=new Array(80),B=new Array(16),H=[new C(1779033703,-205731576),new C(-1150833019,-2067093701),new C(1013904242,-23791573),new C(-1521486534,1595750129),new C(1359893119,-1377402159),new C(-1694144372,725511199),new C(528734635,-79577749),new C(1541459225,327033209)],j=new C(0,0),G=new C(0,0),V=new C(0,0),ie=new C(0,0),te=new C(0,0),J=new C(0,0),ce=new C(0,0),he=new C(0,0),ae=new C(0,0),X=new C(0,0),Se=new C(0,0),se=new C(0,0),ue=new C(0,0),ke=new C(0,0),We=new C(0,0),Re=new C(0,0),me=new C(0,0);for(x===void 0&&(x=[new C(1116352408,-685199838),new C(1899447441,602891725),new C(-1245643825,-330482897),new C(-373957723,-2121671748),new C(961987163,-213338824),new C(1508970993,-1241133031),new C(-1841331548,-1357295717),new C(-1424204075,-630357736),new C(-670586216,-1560083902),new C(310598401,1164996542),new C(607225278,1323610764),new C(1426881987,-704662302),new C(1925078388,-226784913),new C(-2132889090,991336113),new C(-1680079193,633803317),new C(-1046744716,-815192428),new C(-459576895,-1628353838),new C(-272742522,944711139),new C(264347078,-1953704523),new C(604807628,2007800933),new C(770255983,1495990901),new C(1249150122,1856431235),new C(1555081692,-1119749164),new C(1996064986,-2096016459),new C(-1740746414,-295247957),new C(-1473132947,766784016),new C(-1341970488,-1728372417),new C(-1084653625,-1091629340),new C(-958395405,1034457026),new C(-710438585,-1828018395),new C(113926993,-536640913),new C(338241895,168717936),new C(666307205,1188179964),new C(773529912,1546045734),new C(1294757372,1522805485),new C(1396182291,-1651133473),new C(1695183700,-1951439906),new C(1986661051,1014477480),new C(-2117940946,1206759142),new C(-1838011259,344077627),new C(-1564481375,1290863460),new C(-1474664885,-1136513023),new C(-1035236496,-789014639),new C(-949202525,106217008),new C(-778901479,-688958952),new C(-694614492,1432725776),new C(-200395387,1467031594),new C(275423344,851169720),new C(430227734,-1194143544),new C(506948616,1363258195),new C(659060556,-544281703),new C(883997877,-509917016),new C(958139571,-976659869),new C(1322822218,-482243893),new C(1537002063,2003034995),new C(1747873779,-692930397),new C(1955562222,1575990012),new C(2024104815,1125592928),new C(-2067236844,-1578062990),new C(-1933114872,442776044),new C(-1866530822,593698344),new C(-1538233109,-561857047),new C(-1090935817,-1295615723),new C(-965641998,-479046869),new C(-903397682,-366583396),new C(-779700025,566280711),new C(-354779690,-840897762),new C(-176337025,-294727304),new C(116418474,1914138554),new C(174292421,-1563912026),new C(289380356,-1090974290),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,-1676669620),new C(1288033470,-885112138),new C(1501505948,-60457430),new C(1607167915,987167468),new C(1816402316,1246189591)]),I=0;I<80;I+=1)_[I]=new C(0,0);for(O[z>>5]|=128<<24-(z&31),O[(z+128>>10<<5)+31]=z,k=O.length,I=0;I>>q|z.h<<32-q,O.h=z.h>>>q|z.l<<32-q}function D(O,z,q){O.l=z.h>>>q|z.l<<32-q,O.h=z.l>>>q|z.h<<32-q}function S(O,z,q){O.l=z.l>>>q|z.h<<32-q,O.h=z.h>>>q}function N(O,z,q){var I=(z.l&65535)+(q.l&65535),k=(z.l>>>16)+(q.l>>>16)+(I>>>16),_=(z.h&65535)+(q.h&65535)+(k>>>16),B=(z.h>>>16)+(q.h>>>16)+(_>>>16);O.l=I&65535|k<<16,O.h=_&65535|B<<16}function F(O,z,q,I,k){var _=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535),B=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_>>>16),H=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(B>>>16),j=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(H>>>16);O.l=_&65535|B<<16,O.h=H&65535|j<<16}function P(O,z,q,I,k,_){var B=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535)+(_.l&65535),H=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_.l>>>16)+(B>>>16),j=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(_.h&65535)+(H>>>16),G=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(_.h>>>16)+(j>>>16);O.l=B&65535|H<<16,O.h=j&65535|G<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],L=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(P){return i(C(P,b))},this.b64=function(P){return m(C(P,b),T)},this.any=function(P,O){return f(C(P,b),O)},this.raw=function(P){return C(P,b)},this.hex_hmac=function(P,O){return i(v(P,O))},this.b64_hmac=function(P,O){return m(v(P,O),T)},this.any_hmac=function(P,O,z){return f(v(P,O),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(P){return typeof P=="boolean"&&(y=P),this},this.setPad=function(P){return typeof P<"u"&&(T=P),this},this.setUTF8=function(P){return typeof P=="boolean"&&(b=P),this};function C(P){return P=b?t(P):P,A(D(c(P),P.length*8))}function v(P,O){P=b?t(P):P,O=b?t(O):O;var z,q,I=c(P),k=Array(16),_=Array(16);for(I.length>16&&(I=D(I,P.length*8)),z=0;z<16;z+=1)k[z]=I[z]^909522486,_[z]=I[z]^1549556828;return q=D(k.concat(c(O)),512+O.length*8),A(D(_.concat(q),512+160))}function A(P){var O,z="",q=P.length*32;for(O=0;O>5]>>>O%32&255);return z}function D(P,O){var z,q,I,k,_=1732584193,B=4023233417,H=2562383102,j=271733878,G=3285377520,V,ie,te,J,ce,he,ae,X,Se,se;for(P[O>>5]|=128<>>9<<4)+14]=O,k=P.length,I=0;Ifunction(){return t||(0,e[Jh(e)[0]])((t={exports:{}}).exports,t),t.exports},sC=(e,t)=>{for(var n in t)Td(e,n,{get:t[n],enumerable:!0})},yd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jh(t))!iC.call(e,a)&&a!==n&&Td(e,a,{get:()=>t[a],enumerable:!(r=rC(t,a))||r.enumerable});return e},uC=(e,t,n)=>(yd(e,t,"default"),n&&yd(n,t,"default")),Xh=(e,t,n)=>(n=e!=null?nC(aC(e)):{},yd(t||!e||!e.__esModule?Td(n,"default",{value:e,enumerable:!0}):n,e)),e4=oC({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(e,t){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof e<"u")r(t);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:e,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(v,A=void 0){super(A),this.createItem=v}get(v){return this.has(v)||this.set(v,this.createItem(v)),super.get(v)}}let u=C=>C&&typeof C=="object"&&typeof C.then=="function",l=(C,v)=>(...A)=>{i.runtime.lastError?C.reject(new Error(i.runtime.lastError.message)):v.singleCallbackArg||A.length<=1&&v.singleCallbackArg!==!1?C.resolve(A[0]):C.resolve(A)},c=C=>C==1?"argument":"arguments",g=(C,v)=>function(D,...S){if(S.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${S.length}`);return new Promise((N,F)=>{if(v.fallbackToNoCallback)try{D[C](...S,l({resolve:N,reject:F},v))}catch{D[C](...S),v.fallbackToNoCallback=!1,v.noCallback=!0,N()}else v.noCallback?(D[C](...S),N()):D[C](...S,l({resolve:N,reject:F},v))})},f=(C,v,A)=>new Proxy(v,{apply(D,S,N){return A.call(S,C,...N)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),h=(C,v={},A={})=>{let D=Object.create(null),S={has(F,P){return P in C||P in D},get(F,P,O){if(P in D)return D[P];if(!(P in C))return;let z=C[P];if(typeof z=="function")if(typeof v[P]=="function")z=f(C,C[P],v[P]);else if(m(A,P)){let q=g(P,A[P]);z=f(C,C[P],q)}else z=z.bind(C);else if(typeof z=="object"&&z!==null&&(m(v,P)||m(A,P)))z=h(z,v[P],A[P]);else if(m(A,"*"))z=h(z,v[P],A["*"]);else return Object.defineProperty(D,P,{configurable:!0,enumerable:!0,get(){return C[P]},set(q){C[P]=q}}),z;return D[P]=z,z},set(F,P,O,z){return P in D?D[P]=O:C[P]=O,!0},defineProperty(F,P,O){return Reflect.defineProperty(D,P,O)},deleteProperty(F,P){return Reflect.deleteProperty(D,P)}},N=Object.create(C);return new Proxy(N,S)},y=C=>({addListener(v,A,...D){v.addListener(C.get(A),...D)},hasListener(v,A){return v.hasListener(C.get(A))},removeListener(v,A){v.removeListener(C.get(A))}}),T=new s(C=>typeof C!="function"?C:function(A){let D=h(A,{},{getContent:{minArgs:0,maxArgs:0}});C(D)}),b=new s(C=>typeof C!="function"?C:function(A,D,S){let N=!1,F,P=new Promise(I=>{F=function(k){N=!0,I(k)}}),O;try{O=C(A,D,F)}catch(I){O=Promise.reject(I)}let z=O!==!0&&u(O);if(O!==!0&&!z&&!N)return!1;let q=I=>{I.then(k=>{S(k)},k=>{let _;k&&(k instanceof Error||typeof k.message=="string")?_=k.message:_="An unexpected error occurred",S({__mozWebExtensionPolyfillReject__:!0,message:_})}).catch(k=>{})};return q(z?O:P),!0}),x=({reject:C,resolve:v},A)=>{i.runtime.lastError?i.runtime.lastError.message===r?v():C(new Error(i.runtime.lastError.message)):A&&A.__mozWebExtensionPolyfillReject__?C(new Error(A.message)):v(A)},w=(C,v,A,...D)=>{if(D.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${D.length}`);return new Promise((S,N)=>{let F=x.bind(null,{resolve:S,reject:N});D.push(F),A.sendMessage(...D)})},L={devtools:{network:{onRequestFinished:y(T)}},runtime:{onMessage:y(b),onMessageExternal:y(b),sendMessage:w.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:w.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},M={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":M},services:{"*":M},websites:{"*":M}},h(i,L,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),t4={};sC(t4,{default:()=>sl});var lC=Xh(e4());uC(t4,Xh(e4()));var{default:Zh,...cC}=lC,sl=Zh!==void 0?Zh:cC;globalThis.immersiveTranslateBrowserAPI=sl;p();p();p();p();var gl,Oe,o4,dC,Cs,n4,s4,ll={},u4=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ya(e,t){for(var n in t)e[n]=t[n];return e}function l4(e){var t=e.parentNode;t&&t.removeChild(e)}function xs(e,t,n){var r,a,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?gl.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ul(e,o,r,a,null)}function ul(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++o4};return a==null&&Oe.vnode!=null&&Oe.vnode(i),i}function xe(e){return e.children}function pi(e,t){this.props=e,this.context=t}function io(e,t){if(t==null)return e.__?io(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?ul(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(f=b[c])===null||f&&m.key==f.key&&m.type===f.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:pl}),n.__[e]}function K(e){return Es=1,hC(D4,e)}function hC(e,t,n){var r=fl(ws++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):D4(void 0,t),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){It.u=!0;var a=It.shouldComponentUpdate;It.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function le(e,t){var n=fl(ws++,3);!Oe.__s&&w4(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function $e(e){return Es=5,ze(function(){return{current:e}},[])}function ze(e,t){var n=fl(ws++,7);return w4(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qe(e,t){return Es=8,ze(function(){return e},t)}function Me(e){var t=It.context[e.__c],n=fl(ws++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function bC(){for(var e;e=E4.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ml),e.__H.__h.forEach(xd),e.__H.__h=[]}catch(t){e.__H.__h=[],Oe.__e(t,e.__v)}}Oe.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),It=null,y4&&y4(e)},Oe.__r=function(e){T4&&T4(e),ws=0;var t=(It=e.__c).__H;t&&(Cd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=pl,n.__N=n.i=void 0})):(t.__h.forEach(ml),t.__h.forEach(xd),t.__h=[])),Cd=It},Oe.diffed=function(e){v4&&v4(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E4.push(t)!==1&&b4===Oe.requestAnimationFrame||((b4=Oe.requestAnimationFrame)||yC)(bC)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==pl&&(n.__=n.__V),n.i=void 0,n.__V=pl})),Cd=It=null},Oe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ml),n.__h=n.__h.filter(function(r){return!r.__||xd(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Oe.__e(r,n.__v)}}),S4&&S4(e,t)},Oe.unmount=function(e){C4&&C4(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ml(r)}catch(a){t=a}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var x4=typeof requestAnimationFrame=="function";function yC(e){var t,n=function(){clearTimeout(r),x4&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);x4&&(t=requestAnimationFrame(n))}function ml(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function xd(e){var t=It;e.__c=e.__(),It=t}function w4(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function D4(e,t){return typeof t=="function"?t(e):t}p();p();p();var Ds;function Id(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function R4(e,t=","){return e.map(Id).join(t)}var Rd=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function so(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function bl(e,t="@media "){return t+gt(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function gt(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function A4(e){return e}function ks(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function O4(e){return e.match(/[-=:;]/g)?.length||0}function Pd(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(O4(e),15)<<18}var TC=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Od({n:e,i:t,v:n=[]},r,a,i){e&&(e=Id({n:e,i:t,v:n})),i=[...gt(i)];for(let s of n){let u=r.theme("screens",s);for(let l of gt(u&&bl(u)||r.v(s))){var o;i.push(l),a|=u?67108864|Pd(l):s=="dark"?1073741824:l[0]=="@"?Pd(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~TC.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:i,i:t}}var zd=new Map;function Ld(e){if(e.d){let t=[],n=Ed(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?Ed(r,i=>Ed(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):wd(i,o)}return wd(o,i)})):r,"&"),r=>wd(r,e.n?"."+Rd(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function Ed(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function wd(e,t){return e.replace(/&/g,t)}var k4=new Intl.Collator("en",{numeric:!0});function z4(e,t){for(var n=0,r=e.length;n>1;0>=N4(e[a],t)?n=a+1:r=a}return r}function N4(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||k4.compare(P4(e.n),P4(t.n))||k4.compare(L4(e.n),L4(t.n))}function P4(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function L4(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Dd(e,t){return Math.round(parseInt(e,16)*t)}function Gr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let i=(e.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[Dd(e.substr(1,i),o),Dd(e.substr(1+i,i),o),Dd(e.substr(1+2*i,i),o),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Nd(e,t,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},g){let f=[],m="",h=0,y=0;for(let x in o||{}){var T,b;let w=o[x];if(x[0]=="@"){if(!w)continue;if(x[1]=="a"){f.push(...jd(s,u,As(""+w),g,u,l,c,!0));continue}if(x[1]=="l"){for(let L of gt(w))f.push(...i(L,{n:s,p:(T=Nt[x[7]],u&~Nt.o|T),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){f.push(...gt(w).map(L=>({p:-1,o:0,r:[],d:x+" "+L})));continue}if(x[1]=="k"){f.push({p:Nt.d,o:0,r:[x],d:i(w,{p:Nt.d},g).map(Ld).join("")});continue}if(x[1]=="f"){f.push(...gt(w).map(L=>({p:Nt.d,o:0,r:[x],d:i(L,{p:Nt.d},g).map(Ld).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))x=="label"&&w?s=w+so(JSON.stringify([u,c,o])):(w||w===0)&&(x=x.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:O4(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+gt(w).map(L=>g.s(x,Ud(""+L,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let L=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(M,C)=>{let v=g.theme("screens",C);return v?(L|=67108864,bl(v,"")):M}),L|=Pd(x)),f.push(...i(w,{n:s,p:L,r:[...l,x],i:c},g))}else f.push(...i(w,{p:u,r:[...l,x]},g))}return f.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:m}),f.sort(N4)}(e,Od(t,n,r,a),n)}function Ud(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=t(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Gr(s):""+gt(s).filter(u=>Object(u)!==u)})}function qd(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function hl(e,t,n=Nt.u,r,a){let i=[];for(let o of e)for(let s of function(u,l,c,g,f){u={...u,i:u.i||f};let m=function(h,y){let T=zd.get(h.n);return T?T(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:g,p:c}=Od(u,l,c,g),qd(hl(As(m),l,c,g,u.i),u.n)):Array.isArray(m)?m.map(h=>{var y,T;return{o:0,...h,r:[...gt(g),...gt(h.r)],p:(y=c,T=h.p??c,y&~Nt.o|T)}}):Nd(m,u,l,c,g):[{c:Id(u),p:0,o:0,r:[]}]}(o,t,n,r,a))i.splice(z4(i,s),0,s);return i}function jd(e,t,n,r,a,i,o,s){return qd((s?n.flatMap(u=>hl([u],r,a,i,o)):hl(n,r,a,i,o)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function vC(e,t,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Od(i,o,t);return n&&jd(s,t,n,o,u,l,c,r)},zd.set(e,a),e}function Ad(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),t[0].push({n:o,v:r.filter(SC),i:a}))}}function SC(e,t,n){return n.indexOf(e)==t}var _4=new Map;function As(e){let t=_4.get(e);if(!t){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Ad(n,r)),a=s+1};for(;s1?g.slice(0,-1)+so(JSON.stringify([g,f])):g+"("+R4(f)+")",Nt.a,f,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),_4.set(e,t=r[0])}return t}function U4(e,t,n){return t.reduce((r,a,i)=>r+n(a)+e[i+1],e[0])}function q4(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?U4(e,t,n=>kd(n).trim()):t.filter(Boolean).reduce((n,r)=>n+kd(r),e?kd(e):"")}function kd(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=q4(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var oF=j4("@"),sF=j4("~");function j4(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return t(r,a,i)}}});function t(n,r,a){return R4(As(n+e+"("+q4(r,a)+")"))}}function _d(e,t){return Array.isArray(e)?M4(U4(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?M4(e):[e]}var CC=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function M4(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CC.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][t[1]]=t[2]);return r}function H4(e,...t){var n;let r=_d(e,t),a=(r.find(i=>i.label)?.label||"css")+so(JSON.stringify(r));return n=(i,o)=>qd(r.flatMap(s=>Nd(s,i,o,Nt.o)),a),zd.set(a,n),a}var uF=new Proxy(function(e,t){return F4("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return F4(t,n,r)}}});function F4(e,t,n){return{toString(){return H4({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Md(t,n)]}function Md(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Fd(n,1)}):n=>e||{[n[1]]:Fd(n,2)}}function Fd(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function oe(e,t,n,r){return[e,xC(t,n,r)]}function xC(e,t,n){let r=typeof t=="string"?(a,i)=>({[t]:n?n(a,i):a._}):t||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=W4(e||a[1]),s=i.theme(o,a.$$)??Ar(a.$$,o,i);if(s!=null)return a._=Fd(a,0,s),r(a,i,o)}}function $t(e,t={},n){return[e,EC(t,n)]}function EC(e={},t){return(n,r)=>{let{section:a=W4(n[0]).replace("-","")+"Color"}=e,[i,o]=wC(n.$$);if(!i)return;let s=r.theme(a,i)||Ar(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,f=r.theme(l,o||"DEFAULT")||o&&Ar(o,l,r),m=t||(({_:y})=>{let T=Ps(c,y);return g?{[g]:T}:T});n._={value:Gr(s,{opacityVariable:u||void 0,opacityValue:f||void 0}),color:y=>Gr(s,y),opacityVariable:u||void 0,opacityValue:f||void 0};let h=m(n,r);if(!n.dark){let y=r.d(a,i,s);y&&y!==s&&(n._={value:Gr(y,{opacityVariable:u||void 0,opacityValue:f||"1"}),color:T=>Gr(y,T),opacityVariable:u||void 0,opacityValue:f||void 0},h={"&":h,[r.v("dark")]:m(n,r)})}return h}}function wC(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ps(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function Ar(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=uo(Ud(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function W4(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function uo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>uo(n)+r+uo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var lF=Symbol();function Ls({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:gt(t.variants),rules:gt(t.rules),ignorelist:gt(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of gt([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&>(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:i=n.darkMode,darkColor:o=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:f=n.stringify,finalize:m}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...gt(a)],darkMode:i,darkColor:o,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...gt(u)],rules:[...n.rules,...gt(l)],ignorelist:[...n.ignorelist,...gt(c)],hash:g,stringify:f,finalize:[...n.finalize,...gt(m)]}}return n}function B4(e,t,n,r,a,i){for(let o of t){let s=n.get(o);s||n.set(o,s=r(o));let u=s(e,a,i);if(u)return u}}function DC(e){var t;return Bd(e[0],typeof(t=e[1])=="function"?t:()=>t)}function AC(e){var t,n;return Array.isArray(e)?Bd(e[0],Md(e[1],e[2])):Bd(e,Md(t,n))}function Bd(e,t){return K4(e,(n,r,a,i)=>{let o=r.exec(n);if(o)return o.$$=n.slice(o[0].length),o.dark=i,t(o,a)})}function K4(e,t){let n=gt(e).map(kC);return(r,a,i)=>{for(let o of n){let s=t(r,o,a,i);if(s)return s}}}function kC(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function PC(e,t){let n=Ls(e),r=function({theme:u,darkMode:l,darkColor:c=ks,variants:g,rules:f,hash:m,stringify:h,ignorelist:y,finalize:T}){let b=new Map,x=new Map,w=new Map,L=new Map,M=K4(y,(A,D)=>D.test(A));g.push(["dark",Array.isArray(l)||l=="class"?`${gt(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let C=typeof m=="function"?A=>m(A,so):m?so:A4;C!==A4&&T.push(A=>({...A,n:A.n&&C(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,S)=>"--"+C(S).replace("#",""))}));let v={theme:function({extend:A={},...D}){let S={},N={get colors(){return F("colors")},theme:F,negative(){return{}},breakpoints(O){let z={};for(let q in O)typeof O[q]=="string"&&(z["screen-"+q]=O[q]);return z}};return F;function F(O,z,q,I){if(O){if({1:O,2:I}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let H=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(j,G,V=G)=>H.push(V)),O=H.shift(),q=z,z=H.join("-")}let _=S[O]||Object.assign(Object.assign(S[O]={},P(D,O)),P(A,O));if(z==null)return _;z||="DEFAULT";let B=_[z]??z.split("-").reduce((H,j)=>H?.[j],_)??q;return I?Gr(B,{opacityValue:Ud(I,F)}):B}let k={};for(let _ of[...Object.keys(D),...Object.keys(A)])k[_]=F(_);return k}function P(O,z){let q=O[z];return typeof q=="function"&&(q=q(N)),q&&/color|fill|stroke/i.test(z)?function I(k,_=[]){let B={};for(let H in k){let j=k[H],G=[..._,H];B[G.join("-")]=j,H=="DEFAULT"&&(G=_,B[_.join("-")]=j),typeof j=="object"&&Object.assign(B,I(j,G))}return B}(q):q}}(u),e:Rd,h:C,s(A,D){return h(A,D,v)},d(A,D,S){return c(A,D,v,S)},v(A){return b.has(A)||b.set(A,B4(A,g,x,DC,v)||"&:"+A),b.get(A)},r(A,D){let S=JSON.stringify([A,D]);return w.has(S)||w.set(S,!M(A,v)&&B4(A,f,L,AC,v,D)),w.get(S)},f(A){return T.reduce((D,S)=>S(D,v),A)}};return v}(n),a=new Map,i=[],o=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,i.length,l),i.push(l),o.add(u)});function s(u){let l=r.f(u),c=Ld(l);if(c&&!o.has(c)){o.add(c);let g=z4(i,u);t.insert(c,g,u),i.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of gt(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?jd("",Nt.b,As(c),r,Nt.b,[],!1,!0):Nd(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of hl(As(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(o),c=new Map(a),g=[...i];return()=>{u(),o=l,a=c,i=g}},clear(){t.clear(),o=new Set,a=new Map,i=[]},destroy(){this.clear(),t.destroy()}}))}function LC(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function _C(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:i,target:o}of a)if(i[0]=="a")r(o);else for(let s of o.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let i,o=a.getAttribute?.("class");o&&LC(o,i=e(o))&&a.setAttribute("class",i)}}function MC(e=Hd,t=typeof document<"u"&&document.documentElement){if(t){let n=_C(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function G4(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function FC(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:G4(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:ks}}function BC(e){let t=e&&typeof e!="string"?e:G4(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:ks}}function IC(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:ks}}function V4(e,t){let n=typeof document>"u"?IC(!t):e?BC():FC();return t||(n.resume=OC),n}function RC(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):gt(e)).join("")}function OC(e,t){let n=RC(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let i;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let o of document.querySelectorAll("[class]"))e(o.getAttribute("class"));for(;a=r.exec(n),i&&t(n.slice(i.index+i[0].length,a?.index),{p:parseInt(i[1],36),o:parseInt(i[2],36)/2,n:i[3]}),i=a;);}}var Hd=new Proxy(ks,{apply(e,t,n){return Ds(n[0])},get(e,t){let n=Ds[t];return typeof n=="function"?function(){return n.apply(Ds,arguments)}:n}});function $4(e={},t=V4,n){return Ds?.destroy(),Ds=MC(PC(e,typeof t=="function"?t():t),n)}function Wd(e,t=!0){let n=Ls(e);return $4({...n,hash:n.hash??t},()=>V4(!t))}var cF=function e(t){return new Proxy(function(n,...r){return I4(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...i){return I4(t,r,a,i)}}})}();function I4(e,t,n,r){return{toString(){let a=_d(n,r),i=Rd(t+so(JSON.stringify([t,a])));return(typeof e=="function"?e:Hd)(H4({[`@keyframes ${i}`]:_d(n,r)})),i}}}p();p();p();var zC=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Y4(e){return zC.get(e)}function Q4(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Z4(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var NC=[["-webkit-",1],["-moz-",2],["-ms-",4]];function yl(){return({stringify:e})=>({stringify(t,n,r){let a="",i=Y4(t);i&&(a+=e(i,n,r)+";");let o=Q4(t),s=Z4(t,n);for(let u of NC)o&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}p();p();var Gd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Hn(4,"rem",4,.5,.5),...Hn(12,"rem",4,5),14:"3.5rem",...Hn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ze("blur"),backdropBrightness:Ze("brightness"),backdropContrast:Ze("contrast"),backdropGrayscale:Ze("grayscale"),backdropHueRotate:Ze("hueRotate"),backdropInvert:Ze("invert"),backdropOpacity:Ze("opacity"),backdropSaturate:Ze("saturate"),backdropSepia:Ze("sepia"),backgroundColor:Ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Hn(200,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ze("spacing"),borderWidth:{DEFAULT:"1px",...Qn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ze("colors"),caretColor:Ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Hn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ze("borderColor"),divideOpacity:Ze("borderOpacity"),divideWidth:Ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),..._s(2,6),..._s(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ze("spacing"),gradientColorStops:Ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),..._s(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),..._s(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Hn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Hn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ze("spacing"),placeholderColor:Ze("colors"),placeholderOpacity:Ze("opacity"),outlineColor:Ze("colors"),outlineOffset:Qn(8,"px"),outlineWidth:Qn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ze("colors"),ringOffsetWidth:Qn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Qn(8,"px")},rotate:{...Qn(2,"deg"),...Qn(12,"deg",3),...Qn(180,"deg",45)},saturate:Hn(200,"",100,0,50),scale:{...Hn(150,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ze("spacing"),scrollPadding:Ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Qn(2,"deg"),...Qn(12,"deg",3)},space:Ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Hn(2),textColor:Ze("colors"),textDecorationColor:Ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Qn(8,"px")},textUnderlineOffset:{auto:"auto",...Qn(8,"px")},textIndent:Ze("spacing"),textOpacity:Ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),..._s(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Hn(50,"",1,0,10),auto:"auto"}};function _s(e,t){let n={};do for(var r=1;rt(e)}var UC={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Gd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Gd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},qC=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:Ar(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),oe("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[bl(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),oe("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),oe("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Tl),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),oe("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),oe("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),oe("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",J4),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),oe("(flex-(?:grow|shrink))(?:$|-)"),oe("(flex)-"),oe("grow(?:$|-)","flexGrow"),oe("shrink(?:$|-)","flexShrink"),oe("basis-","flexBasis"),oe("-?(order)-"),"-?(order)-(\\d+)",oe("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",n3),oe("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",t3),oe("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),oe("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),oe("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",n3),oe("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",t3),oe("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),oe("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Tl(J4(e))),re("grid-flow-(dense)","gridAutoFlow"),oe("auto-cols-","gridAutoColumns"),oe("auto-rows-","gridAutoRows"),oe("gap-x(?:$|-)","gap","columnGap"),oe("gap-y(?:$|-)","gap","rowGap"),oe("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",X4),re("(content|items|self)-",e=>({["align-"+e[1]]:X4(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),oe("p([xytrbl])?(?:$|-)","padding",lo("padding")),oe("-?m([xytrbl])?(?:$|-)","margin",lo("margin")),oe("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),oe("w-","width"),oe("min-w-","minWidth"),oe("max-w-","maxWidth"),oe("h-","height"),oe("min-h-","minHeight"),oe("max-h-","maxHeight"),oe("font-","fontWeight"),oe("font-","fontFamily",({_:e})=>typeof(e=gt(e))[1]=="string"?{fontFamily:ur(e)}:{fontFamily:ur(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...va({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),oe("tracking-","letterSpacing"),oe("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),oe("list-","listStyleType"),re("list-","listStyleType"),oe("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),$t("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),oe("text-opacity-","textOpacity","--tw-text-opacity"),$t("text-",{property:"color"}),oe("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),oe("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),oe("underline-offset-","textUnderlineOffset"),$t("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),oe("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),$t("caret-",{opacityVariable:!1,opacitySection:"opacity"}),$t("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${mi(e," ")},var(--tw-gradient-stops))`),$t("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),$t("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),$t("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),oe("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),$t("bg-",{section:"backgroundColor"}),oe("bg-","backgroundImage"),oe("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Tl),oe("bg-","backgroundSize"),oe("rounded(?:$|-)","borderRadius"),oe("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${mi(n[0])}-radius`]:t,[`border-${mi(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),oe("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),oe("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...va({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),$t("border-([xytrbl])-",{section:"borderColor"},lo("border","Color")),$t("border-"),oe("border-([xytrbl])(?:$|-)","borderWidth",lo("border","Width")),oe("border(?:$|-)","borderWidth"),oe("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),oe("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${mi(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${mi(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),$t("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),oe("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),$t("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),oe("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),$t("ring-",{property:"--tw-ring-color"}),oe("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Gr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Gr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),$t("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),oe("shadow(?:$|-)","boxShadow",({_:e})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ur(e),"--tw-shadow-colored":ur(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),oe("(opacity)-"),re("mix-blend-","mixBlendMode"),...e3(),...e3("backdrop-"),oe("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ur(e),transitionTimingFunction:e._=="none"?void 0:ur(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ur(t("transitionDuration",""))})),oe("duration(?:$|-)","transitionDuration","transitionDuration",ur),oe("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ur),oe("delay(?:$|-)","transitionDelay","transitionDelay",ur),oe("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=ur(e),i=a.split(" "),o=t("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",Vd),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":r3(e=="gpu")})),oe("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Vd()})),oe("-?(rotate)-","rotate",Kd),oe("-?(translate-[xy])-","translate",Kd),oe("-?(skew-[xy])-","skew",Kd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Tl),"(appearance)-",oe("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",oe("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...va({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),oe("scroll-p([xytrbl])?(?:$|-)","padding",lo("scroll-padding")),oe("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",lo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...va({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),oe("-?(outline-offset)-"),$t("outline-",{opacityVariable:!1,opacitySection:"opacity"}),oe("outline-","outlineWidth"),"(pointer-events)-",oe("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),$t("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),$t("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),oe("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Tl(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function J4(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function mi(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function ur(e){return e&&""+(e._||e)}function X4({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function lo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ps(e+"-"+mi(a[0])+t,r),...Ps(e+"-"+mi(a[1])+t,r)}:Ps(e+t,r)}}function e3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...va(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>oe(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:gt(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Kd({1:e,_:t}){return{["--tw-"+e]:t,...Vd()}}function Vd(){return{...va({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":r3()}),transform:"var(--tw-transform)"}}function r3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function t3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function n3({1:e}){return`repeat(${e},minmax(0,1fr))`}function va(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jC=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||Ar(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:i,h:o,v:s})=>{let u=uo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${i(o(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||Ar(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||Ar(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=Ar(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&uo(e).replace(/[}]+$/,"").split("{")]];function HC({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:UC,theme:{...Gd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jC,rules:qC,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var WC={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},KC={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},GC={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},VC={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$C={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},YC={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},QC={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ZC={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},JC={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},XC={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ex={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},tx={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},nx={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},rx={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ax={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ix={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},ox={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},sx={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ux={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},lx={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},cx={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},dx={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},gx={__proto__:null,slate:WC,gray:KC,zinc:GC,neutral:VC,stone:$C,red:YC,orange:QC,amber:ZC,yellow:JC,lime:XC,green:ex,emerald:tx,teal:nx,cyan:rx,sky:ax,blue:ix,indigo:ox,violet:sx,purple:ux,fuchsia:lx,pink:cx,rose:dx};function vl({disablePreflight:e}={}){return HC({colors:gx,disablePreflight:e})}p();p();var Sl=globalThis||(typeof window<"u"?window:self),px=Object.create,Yd=Object.defineProperty,mx=Object.getOwnPropertyDescriptor,fx=Object.getOwnPropertyNames,hx=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty,yx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tx=(e,t)=>{for(var n in t)Yd(e,n,{get:t[n],enumerable:!0})},$d=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fx(t))!bx.call(e,a)&&a!==n&&Yd(e,a,{get:()=>t[a],enumerable:!(r=mx(t,a))||r.enumerable});return e},vx=(e,t,n)=>($d(e,t,"default"),n&&$d(n,t,"default")),i3=(e,t,n)=>(n=e!=null?px(hx(e)):{},$d(t||!e||!e.__esModule?Yd(n,"default",{value:e,enumerable:!0}):n,e)),o3=yx((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var f=new XMLHttpRequest;f.open("GET",l),f.responseType="blob",f.onload=function(){u(f.response,c,g)},f.onerror=function(){},f.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Sl=="object"&&Sl.global===Sl?Sl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var f=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,g):i(m,m.target="_blank")):(m.href=f.createObjectURL(l),setTimeout(function(){f.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var f=document.createElement("a");f.href=l,f.target="_blank",setTimeout(function(){i(f)})}}:function(l,c,g,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var m=l.type==="application/octet-stream",h=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&h||s)&&typeof FileReader<"u"){var T=new FileReader;T.onloadend=function(){var w=T.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},T.readAsDataURL(l)}else{var b=o.URL||o.webkitURL,x=b.createObjectURL(l);f?f.location=x:location.href=x,f=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});o.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),s3={};Tx(s3,{default:()=>fi});var Sx=i3(o3());vx(s3,i3(o3()));var{default:a3,...Cx}=Sx,fi=a3!==void 0?a3:Cx;p();p();p();p();p();p();p();function co(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(i){await i,t="fulfilled",r(i)},reject(i){t="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}p();var Qd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Cl(e,t){let n=co(),r=setTimeout(()=>n.reject(new Qd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}p();p();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},e);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}p();var u3=class{#e=0;#t=[];#n=[];#r=co();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tYx,bgBlue:()=>Xx,bgBrightBlack:()=>rE,bgBrightBlue:()=>sE,bgBrightCyan:()=>lE,bgBrightGreen:()=>iE,bgBrightMagenta:()=>uE,bgBrightRed:()=>aE,bgBrightWhite:()=>cE,bgBrightYellow:()=>oE,bgCyan:()=>tE,bgGreen:()=>Zx,bgMagenta:()=>eE,bgRed:()=>Qx,bgRgb24:()=>mE,bgRgb8:()=>gE,bgWhite:()=>nE,bgYellow:()=>Jx,black:()=>Fx,blue:()=>Ox,bold:()=>Dx,brightBlack:()=>d3,brightBlue:()=>Kx,brightCyan:()=>Vx,brightGreen:()=>Hx,brightMagenta:()=>Gx,brightRed:()=>jx,brightWhite:()=>$x,brightYellow:()=>Wx,cyan:()=>Nx,dim:()=>Ax,getColorEnabled:()=>Ex,gray:()=>qx,green:()=>Ix,hidden:()=>_x,inverse:()=>Lx,italic:()=>kx,magenta:()=>zx,red:()=>Bx,reset:()=>wx,rgb24:()=>pE,rgb8:()=>dE,setColorEnabled:()=>xx,strikethrough:()=>Mx,stripColor:()=>hE,underline:()=>Px,white:()=>Ux,yellow:()=>Rx});p();var{Deno:l3}=globalThis,c3=typeof l3?.noColor=="boolean"?l3.noColor:!0,Zd=!c3;function xx(e){c3||(Zd=e)}function Ex(){return Zd}function Fe(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Be(e,t){return Zd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function wx(e){return Be(e,Fe([0],0))}function Dx(e){return Be(e,Fe([1],22))}function Ax(e){return Be(e,Fe([2],22))}function kx(e){return Be(e,Fe([3],23))}function Px(e){return Be(e,Fe([4],24))}function Lx(e){return Be(e,Fe([7],27))}function _x(e){return Be(e,Fe([8],28))}function Mx(e){return Be(e,Fe([9],29))}function Fx(e){return Be(e,Fe([30],39))}function Bx(e){return Be(e,Fe([31],39))}function Ix(e){return Be(e,Fe([32],39))}function Rx(e){return Be(e,Fe([33],39))}function Ox(e){return Be(e,Fe([34],39))}function zx(e){return Be(e,Fe([35],39))}function Nx(e){return Be(e,Fe([36],39))}function Ux(e){return Be(e,Fe([37],39))}function qx(e){return d3(e)}function d3(e){return Be(e,Fe([90],39))}function jx(e){return Be(e,Fe([91],39))}function Hx(e){return Be(e,Fe([92],39))}function Wx(e){return Be(e,Fe([93],39))}function Kx(e){return Be(e,Fe([94],39))}function Gx(e){return Be(e,Fe([95],39))}function Vx(e){return Be(e,Fe([96],39))}function $x(e){return Be(e,Fe([97],39))}function Yx(e){return Be(e,Fe([40],49))}function Qx(e){return Be(e,Fe([41],49))}function Zx(e){return Be(e,Fe([42],49))}function Jx(e){return Be(e,Fe([43],49))}function Xx(e){return Be(e,Fe([44],49))}function eE(e){return Be(e,Fe([45],49))}function tE(e){return Be(e,Fe([46],49))}function nE(e){return Be(e,Fe([47],49))}function rE(e){return Be(e,Fe([100],49))}function aE(e){return Be(e,Fe([101],49))}function iE(e){return Be(e,Fe([102],49))}function oE(e){return Be(e,Fe([103],49))}function sE(e){return Be(e,Fe([104],49))}function uE(e){return Be(e,Fe([105],49))}function lE(e){return Be(e,Fe([106],49))}function cE(e){return Be(e,Fe([107],49))}function Sa(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function dE(e,t){return Be(e,Fe([38,5,Sa(t)],39))}function gE(e,t){return Be(e,Fe([48,5,Sa(t)],49))}function pE(e,t){return typeof t=="number"?Be(e,Fe([38,2,t>>16&255,t>>8&255,t&255],39)):Be(e,Fe([38,2,Sa(t.r),Sa(t.g),Sa(t.b)],39))}function mE(e,t){return typeof t=="number"?Be(e,Fe([48,2,t>>16&255,t>>8&255,t&255],49)):Be(e,Fe([48,2,Sa(t.r),Sa(t.g),Sa(t.b)],49))}var fE=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function hE(e){return e.replace(fE,"")}p();p();var Jd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},bE={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Xd(e,t){let n={...bE,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new Jd(a,n.maxAttempts)}p();var Vr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function eg(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2|t[r]>>6],n+=Vr[t[r]&63];return r===a+1&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2],n+="="),n}p();p();var yE=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,TE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,vE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,tg={Space_Separator:yE,ID_Start:TE,ID_Continue:vE},Rt={isSpaceSeparator(e){return typeof e=="string"&&tg.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||tg.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||tg.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},rg,En,Yr,El,Ca,lr,tn,og,Fs,SE=function(e,t){rg=String(e),En="start",Yr=[],El=0,Ca=1,lr=0,tn=void 0,og=void 0,Fs=void 0;do tn=CE(),wE[En]();while(tn.type!=="eof");return typeof t=="function"?ag({"":Fs},"",t):Fs};function ag(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Qr();if(!Rt.isHexDigit(n))throw St($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var wE={start(){if(en.type==="eof")throw bi();rg()},beforePropertyName(){switch(en.type){case"identifier":case"string":sg=en.value,En="afterPropertyName";return;case"punctuator":xl();return;case"eof":throw bi()}},afterPropertyName(){if(en.type==="eof")throw bi();En="beforePropertyValue"},beforePropertyValue(){if(en.type==="eof")throw bi();rg()},beforeArrayValue(){if(en.type==="eof")throw bi();if(en.type==="punctuator"&&en.value==="]"){xl();return}rg()},afterPropertyValue(){if(en.type==="eof")throw bi();switch(en.value){case",":En="beforePropertyName";return;case"}":xl()}},afterArrayValue(){if(en.type==="eof")throw bi();switch(en.value){case",":En="beforeArrayValue";return;case"]":xl()}},end(){}};function rg(){let e;switch(en.type){case"punctuator":switch(en.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=en.value;break}if(Ms===void 0)Ms=e;else{let t=Yr[Yr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,sg,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Yr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Yr[Yr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function xl(){Yr.pop();let e=Yr[Yr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function St(e){return ug(e===void 0?`JSON5: invalid end of input at ${Ca}:${lr}`:`JSON5: invalid character '${DE(e)}' at ${Ca}:${lr}`)}function bi(){return ug(`JSON5: invalid end of input at ${Ca}:${lr}`)}function g3(){return lr-=5,ug(`JSON5: invalid identifier character at ${Ca}:${lr}`)}function DE(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function ug(e){let t=new SyntaxError(e);return t.lineNumber=Ca,t.columnNumber=lr,t}var AE=function(e,t,n){let r=[],a="",i,o,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")o=t;else if(Array.isArray(t)){i=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let T=y[h];switch(T!=null&&(typeof T.toJSON5=="function"?T=T.toJSON5(h):typeof T.toJSON=="function"&&(T=T.toJSON(h))),o&&(T=o.call(y,h,T)),T instanceof Number?T=Number(T):T instanceof String?T=String(T):T instanceof Boolean&&(T=T.valueOf()),T){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof T=="string")return c(T,!1);if(typeof T=="number")return String(T);if(typeof T=="object")return Array.isArray(T)?m(T):g(T)}function c(h){let y={"'":.1,'"':.2},T={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=i||Object.keys(h),b=[];for(let w of T){let L=l(w,h);if(L!==void 0){let M=f(w)+":";s!==""&&(M+=" "),M+=L,b.push(M)}}let x;if(b.length===0)x="{}";else{let w;if(s==="")w=b.join(","),x="{"+w+"}";else{let L=`, +`&&$(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw St($());case void 0:throw St($())}return $()}function EE(){let e="",t=Qr();if(!Rt.isHexDigit(t)||(e+=$(),t=Qr(),!Rt.isHexDigit(t)))throw St($());return e+=$(),String.fromCodePoint(parseInt(e,16))}function ig(){let e="",t=4;for(;t-- >0;){let n=Qr();if(!Rt.isHexDigit(n))throw St($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var wE={start(){if(tn.type==="eof")throw bi();ng()},beforePropertyName(){switch(tn.type){case"identifier":case"string":og=tn.value,En="afterPropertyName";return;case"punctuator":xl();return;case"eof":throw bi()}},afterPropertyName(){if(tn.type==="eof")throw bi();En="beforePropertyValue"},beforePropertyValue(){if(tn.type==="eof")throw bi();ng()},beforeArrayValue(){if(tn.type==="eof")throw bi();if(tn.type==="punctuator"&&tn.value==="]"){xl();return}ng()},afterPropertyValue(){if(tn.type==="eof")throw bi();switch(tn.value){case",":En="beforePropertyName";return;case"}":xl()}},afterArrayValue(){if(tn.type==="eof")throw bi();switch(tn.value){case",":En="beforeArrayValue";return;case"]":xl()}},end(){}};function ng(){let e;switch(tn.type){case"punctuator":switch(tn.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=tn.value;break}if(Fs===void 0)Fs=e;else{let t=Yr[Yr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,og,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Yr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Yr[Yr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function xl(){Yr.pop();let e=Yr[Yr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function St(e){return sg(e===void 0?`JSON5: invalid end of input at ${Ca}:${lr}`:`JSON5: invalid character '${DE(e)}' at ${Ca}:${lr}`)}function bi(){return sg(`JSON5: invalid end of input at ${Ca}:${lr}`)}function g3(){return lr-=5,sg(`JSON5: invalid identifier character at ${Ca}:${lr}`)}function DE(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function sg(e){let t=new SyntaxError(e);return t.lineNumber=Ca,t.columnNumber=lr,t}var AE=function(e,t,n){let r=[],a="",i,o,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")o=t;else if(Array.isArray(t)){i=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let T=y[h];switch(T!=null&&(typeof T.toJSON5=="function"?T=T.toJSON5(h):typeof T.toJSON=="function"&&(T=T.toJSON(h))),o&&(T=o.call(y,h,T)),T instanceof Number?T=Number(T):T instanceof String?T=String(T):T instanceof Boolean&&(T=T.valueOf()),T){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof T=="string")return c(T,!1);if(typeof T=="number")return String(T);if(typeof T=="object")return Array.isArray(T)?m(T):g(T)}function c(h){let y={"'":.1,'"':.2},T={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=i||Object.keys(h),b=[];for(let w of T){let L=l(w,h);if(L!==void 0){let M=f(w)+":";s!==""&&(M+=" "),M+=L,b.push(M)}}let x;if(b.length===0)x="{}";else{let w;if(s==="")w=b.join(","),x="{"+w+"}";else{let L=`, `+a;w=b.join(L),x=`{ `+a+w+`, `+y+"}"}}return r.pop(),a=y,x}function f(h){if(h.length===0)return c(h,!0);let y=String.fromCodePoint(h.codePointAt(0));if(!Rt.isIdStartChar(y))return c(h,!0);for(let T=y.length;T=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=[];for(let x=0;x()=>(t||e((t={exports:{}}).exports,t),t.exports),OE=(e,t)=>{for(var n in t)cg(e,n,{get:t[n],enumerable:!0})},lg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of FE(t))!IE.call(e,a)&&a!==n&&cg(e,a,{get:()=>t[a],enumerable:!(r=ME(t,a))||r.enumerable});return e},zE=(e,t,n)=>(lg(e,t,"default"),n&&lg(n,t,"default")),f3=(e,t,n)=>(n=e!=null?_E(BE(e)):{},lg(t||!e||!e.__esModule?cg(n,"default",{value:e,enumerable:!0}):n,e)),h3=RE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Dl=="object"&&Dl&&Dl.Object===Object&&Dl,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(A,D,S){var N,F,P,O,z,q,I=0,k=!1,_=!1,B=!0;if(typeof A!="function")throw new TypeError(n);D=v(D)||0,L(S)&&(k=!!S.leading,_="maxWait"in S,P=_?y(v(S.maxWait)||0,D):P,B="trailing"in S?!!S.trailing:B);function H(ae){var X=N,Se=F;return N=F=void 0,I=ae,O=A.apply(Se,X),O}function j(ae){return I=ae,z=setTimeout(ie,D),k?H(ae):O}function G(ae){var X=ae-q,Se=ae-I,se=D-X;return _?T(se,P-Se):se}function V(ae){var X=ae-q,Se=ae-I;return q===void 0||X>=D||X<0||_&&Se>=P}function ie(){var ae=b();if(V(ae))return te(ae);z=setTimeout(ie,G(ae))}function te(ae){return z=void 0,B&&N?H(ae):(N=F=void 0,O)}function J(){z!==void 0&&clearTimeout(z),I=0,N=q=F=z=void 0}function ce(){return z===void 0?O:te(b())}function he(){var ae=b(),X=V(ae);if(N=arguments,F=this,q=ae,X){if(z===void 0)return j(q);if(_)return z=setTimeout(ie,D),H(q)}return z===void 0&&(z=setTimeout(ie,D)),O}return he.cancel=J,he.flush=ce,he}function w(A,D,S){var N=!0,F=!0;if(typeof A!="function")throw new TypeError(n);return L(S)&&(N="leading"in S?!!S.leading:N,F="trailing"in S?!!S.trailing:F),x(A,D,{leading:N,maxWait:D,trailing:F})}function L(A){var D=typeof A;return!!A&&(D=="object"||D=="function")}function M(A){return!!A&&typeof A=="object"}function C(A){return typeof A=="symbol"||M(A)&&h.call(A)==a}function v(A){if(typeof A=="number")return A;if(C(A))return r;if(L(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=L(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=A.replace(i,"");var S=s.test(A);return S||u.test(A)?l(A.slice(2),S?2:8):o.test(A)?r:+A}t.exports=w}),b3={};OE(b3,{default:()=>cr});var NE=f3(h3());zE(b3,f3(h3()));var{default:m3,...UE}=NE,cr=m3!==void 0?m3:UE;p();p();var Al=globalThis||(typeof window<"u"?window:self),qE=Object.create,gg=Object.defineProperty,jE=Object.getOwnPropertyDescriptor,HE=Object.getOwnPropertyNames,WE=Object.getPrototypeOf,KE=Object.prototype.hasOwnProperty,GE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VE=(e,t)=>{for(var n in t)gg(e,n,{get:t[n],enumerable:!0})},dg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HE(t))!KE.call(e,a)&&a!==n&&gg(e,a,{get:()=>t[a],enumerable:!(r=jE(t,a))||r.enumerable});return e},$E=(e,t,n)=>(dg(e,t,"default"),n&&dg(n,t,"default")),T3=(e,t,n)=>(n=e!=null?qE(WE(e)):{},dg(t||!e||!e.__esModule?gg(n,"default",{value:e,enumerable:!0}):n,e)),v3=GE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Al=="object"&&Al&&Al.Object===Object&&Al,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(v,A,D){var S,N,F,P,O,z,q=0,I=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);A=C(A)||0,w(D)&&(I=!!D.leading,k="maxWait"in D,F=k?y(C(D.maxWait)||0,A):F,_="trailing"in D?!!D.trailing:_);function B(he){var ae=S,X=N;return S=N=void 0,q=he,P=v.apply(X,ae),P}function H(he){return q=he,O=setTimeout(V,A),I?B(he):P}function j(he){var ae=he-z,X=he-q,Se=A-ae;return k?T(Se,F-X):Se}function G(he){var ae=he-z,X=he-q;return z===void 0||ae>=A||ae<0||k&&X>=F}function V(){var he=b();if(G(he))return ie(he);O=setTimeout(V,j(he))}function ie(he){return O=void 0,_&&S?B(he):(S=N=void 0,P)}function te(){O!==void 0&&clearTimeout(O),q=0,S=z=N=O=void 0}function J(){return O===void 0?P:ie(b())}function ce(){var he=b(),ae=G(he);if(S=arguments,N=this,z=he,ae){if(O===void 0)return H(z);if(k)return O=setTimeout(V,A),B(z)}return O===void 0&&(O=setTimeout(V,A)),P}return ce.cancel=te,ce.flush=J,ce}function w(v){var A=typeof v;return!!v&&(A=="object"||A=="function")}function L(v){return!!v&&typeof v=="object"}function M(v){return typeof v=="symbol"||L(v)&&h.call(v)==a}function C(v){if(typeof v=="number")return v;if(M(v))return r;if(w(v)){var A=typeof v.valueOf=="function"?v.valueOf():v;v=w(A)?A+"":A}if(typeof v!="string")return v===0?v:+v;v=v.replace(i,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):o.test(v)?r:+v}t.exports=x}),S3={};VE(S3,{default:()=>Fs});var YE=T3(v3());$E(S3,T3(v3()));var{default:y3,...QE}=YE,Fs=y3!==void 0?y3:QE;p();p();var ZE=Object.create,mg=Object.defineProperty,JE=Object.getOwnPropertyDescriptor,XE=Object.getOwnPropertyNames,ew=Object.getPrototypeOf,tw=Object.prototype.hasOwnProperty,nw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rw=(e,t)=>{for(var n in t)mg(e,n,{get:t[n],enumerable:!0})},pg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of XE(t))!tw.call(e,a)&&a!==n&&mg(e,a,{get:()=>t[a],enumerable:!(r=JE(t,a))||r.enumerable});return e},aw=(e,t,n)=>(pg(e,t,"default"),n&&pg(n,t,"default")),x3=(e,t,n)=>(n=e!=null?ZE(ew(e)):{},pg(t||!e||!e.__esModule?mg(n,"default",{value:e,enumerable:!0}):n,e)),E3=nw((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(i)==="object"?i.exports=g():(s=[],o=g,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function g(m){if(f[m])return f[m].exports;var h=f[m]={i:m,l:!1,exports:{}};return c[m].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var f={};return g.m=c,g.c=f,g.i=function(m){return m},g.d=function(m,h,y){g.o(m,h)||Object.defineProperty(m,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(m){var h=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(h,"a",h),h},g.o=function(m,h){return Object.prototype.hasOwnProperty.call(m,h)},g.p="",g(g.s=0)}([function(c,g,f){function m(j,G){var V={};for(var ie in j)G.indexOf(ie)>=0||Object.prototype.hasOwnProperty.call(j,ie)&&(V[ie]=j[ie]);return V}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},y=Object.assign||function(j){for(var G=1;G'+ie+"
",Se.onclick=function(){return F(se,X)},Se.listener=function(ue){(D(ue)||S(ue))&&z()},N(Se,X),J&&J<1&&(J=1),!he&&J&&L(J).then(function(){return F(se,X)})},I=g.force=function(j,G){var V=j.type,ie=V===void 0?5:V,te=j.text,J=j.buttonText,ce=J===void 0?"OK":J,he=j.callback,ae=j.position,X=ae===void 0?b.positions.force||X.top:ae;M(),z();var Se=document.createElement("div"),se=C();Se.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var ke=document.createElement("div");ke.classList.add(b.classes.button),ke.classList.add(v[ie]),ke.innerHTML=ce,ke.onclick=function(){F(se,X),O(),he?he():G&&G()},Se.appendChild(ue),Se.appendChild(ke),Se.listener=function(We){D(We)&&ke.click()},N(Se,X),P()},k=g.confirm=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Yes":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.confirm||se.top:Se;M(),z();var ue=document.createElement("div"),ke=C();ue.id=ke;var We=document.createElement("div");We.classList.add(b.classes.textbox),We.classList.add(b.classes.backgroundInfo),We.innerHTML='
'+ie+"
";var Re=document.createElement("div");Re.classList.add(b.classes.button),Re.classList.add(b.classes.elementHalf),Re.classList.add(b.classes.backgroundSuccess),Re.innerHTML=J,Re.onclick=function(){F(ke,se),O(),ae?ae():G&&G()};var me=document.createElement("div");me.classList.add(b.classes.button),me.classList.add(b.classes.elementHalf),me.classList.add(b.classes.backgroundError),me.innerHTML=he,me.onclick=function(){F(ke,se),O(),X?X():V&&V()},ue.appendChild(We),ue.appendChild(Re),ue.appendChild(me),ue.listener=function(Et){D(Et)?Re.click():S(Et)&&me.click()},N(ue,se),P(ue,se)},_=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Submit":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.input||se.top:Se,ue=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);M(),z();var ke=document.createElement("div"),We=C();ke.id=We;var Re=document.createElement("div");Re.classList.add(b.classes.textbox),Re.classList.add(b.classes.backgroundInfo),Re.innerHTML='
'+ie+"
";var me=document.createElement("input");me.classList.add(b.classes.inputField),me.setAttribute("autocapitalize",ue.autocapitalize||"none"),me.setAttribute("autocomplete",ue.autocomplete||"off"),me.setAttribute("autocorrect",ue.autocorrect||"off"),me.setAttribute("autofocus",ue.autofocus||"true"),me.setAttribute("inputmode",ue.inputmode||"verbatim"),me.setAttribute("max",ue.max||""),me.setAttribute("maxlength",ue.maxlength||""),me.setAttribute("min",ue.min||""),me.setAttribute("minlength",ue.minlength||""),me.setAttribute("placeholder",ue.placeholder||""),me.setAttribute("spellcheck",ue.spellcheck||"default"),me.setAttribute("step",ue.step||"any"),me.setAttribute("type",ue.type||"text"),me.value=ue.value||"",ue.allowed&&(me.oninput=function(){var kt=void 0;if(Array.isArray(ue.allowed)){for(var Bt="",vn=ue.allowed,Yn=0;Yn'+V+"",X.appendChild(se),ce.forEach(function(ke,We){var Re=ke.type,me=Re===void 0?1:Re,Et=ke.text,Gt=ke.handler,kt=document.createElement("div");kt.classList.add(v[me]),kt.classList.add(b.classes.button),kt.classList.add(b.classes.selectChoice);var Bt=ce[We+1];Bt&&!Bt.type&&(Bt.type=1),Bt&&Bt.type===me&&kt.classList.add(b.classes.selectChoiceRepeated),kt.innerHTML=Et,kt.onclick=function(){F(Se,ae),O(),Gt()},X.appendChild(kt)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){F(Se,ae),O(),J?J():G&&G()},X.appendChild(ue),X.listener=function(ke){S(ke)&&ue.click()},N(X,ae),P(X,ae)},H=g.date=function(j,G,V){var ie=j.value,te=ie===void 0?new Date:ie,J=j.submitText,ce=J===void 0?"OK":J,he=j.cancelText,ae=he===void 0?"Cancel":he,X=j.submitCallback,Se=j.cancelCallback,se=j.position,ue=se===void 0?b.positions.date||ue.top:se;M(),z();var ke="▾",We=document.createElement("div"),Re=document.createElement("div"),me=document.createElement("div"),Et=function(wt){We.innerHTML=b.dateMonths[wt.getMonth()],Re.innerHTML=wt.getDate(),me.innerHTML=wt.getFullYear()},Gt=function(wt){var nt=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),jn=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(jn)>nt&&(jn=nt.toString()),wt.target.textContent=jn,Number(jn)<1&&(jn="1"),te.setDate(Number(jn))},kt=function(wt){var nt=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);wt.target.textContent=nt,te.setFullYear(Number(nt))},Bt=function(wt){Et(te)},vn=function(wt){var nt=new Date(te.getFullYear(),te.getMonth()+wt+1,0).getDate();te.getDate()>nt&&te.setDate(nt),te.setMonth(te.getMonth()+wt),Et(te)},Yn=function(wt){te.setDate(te.getDate()+wt),Et(te)},vs=function(wt){var nt=te.getFullYear()+wt;nt<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+wt),Et(te)},Dr=document.createElement("div"),di=C();Dr.id=di;var no=document.createElement("div");no.classList.add(b.classes.backgroundInfo);var dn=document.createElement("div");dn.classList.add(b.classes.dateSelectorInner);var sr=document.createElement("div");sr.classList.add(b.classes.button),sr.classList.add(b.classes.elementThird),sr.classList.add(b.classes.dateSelectorUp),sr.innerHTML=ke;var gn=document.createElement("div");gn.classList.add(b.classes.button),gn.classList.add(b.classes.elementThird),gn.classList.add(b.classes.dateSelectorUp),gn.innerHTML=ke;var qn=document.createElement("div");qn.classList.add(b.classes.button),qn.classList.add(b.classes.elementThird),qn.classList.add(b.classes.dateSelectorUp),qn.innerHTML=ke,We.classList.add(b.classes.element),We.classList.add(b.classes.elementThird),We.innerHTML=b.dateMonths[te.getMonth()],Re.classList.add(b.classes.element),Re.classList.add(b.classes.elementThird),Re.setAttribute("contentEditable",!0),Re.addEventListener("input",Gt),Re.addEventListener("blur",Bt),Re.innerHTML=te.getDate(),me.classList.add(b.classes.element),me.classList.add(b.classes.elementThird),me.setAttribute("contentEditable",!0),me.addEventListener("input",kt),me.addEventListener("blur",Bt),me.innerHTML=te.getFullYear();var jr=document.createElement("div");jr.classList.add(b.classes.button),jr.classList.add(b.classes.elementThird),jr.innerHTML=ke;var Hr=document.createElement("div");Hr.classList.add(b.classes.button),Hr.classList.add(b.classes.elementThird),Hr.innerHTML=ke;var gi=document.createElement("div");gi.classList.add(b.classes.button),gi.classList.add(b.classes.elementThird),gi.innerHTML=ke,sr.onclick=function(){return vn(1)},gn.onclick=function(){return Yn(1)},qn.onclick=function(){return vs(1)},jr.onclick=function(){return vn(-1)},Hr.onclick=function(){return Yn(-1)},gi.onclick=function(){return vs(-1)};var Sn=document.createElement("div");Sn.classList.add(b.classes.button),Sn.classList.add(b.classes.elementHalf),Sn.classList.add(b.classes.backgroundSuccess),Sn.innerHTML=ce,Sn.onclick=function(){F(di,ue),O(),X?X(te):G&&G(te)};var Wr=document.createElement("div");Wr.classList.add(b.classes.button),Wr.classList.add(b.classes.elementHalf),Wr.classList.add(b.classes.backgroundError),Wr.innerHTML=ae,Wr.onclick=function(){F(di,ue),O(),Se?Se(te):V&&V(te)},dn.appendChild(sr),dn.appendChild(gn),dn.appendChild(qn),dn.appendChild(We),dn.appendChild(Re),dn.appendChild(me),dn.appendChild(jr),dn.appendChild(Hr),dn.appendChild(gi),no.appendChild(dn),Dr.appendChild(no),Dr.appendChild(Sn),Dr.appendChild(Wr),Dr.listener=function(wt){D(wt)?Sn.click():S(wt)&&Wr.click()},N(Dr,ue),P(Dr,ue)};g.default={alert:q,force:I,confirm:k,input:_,select:B,date:H,setOptions:x,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),w3={};rw(w3,{default:()=>kl});var iw=x3(E3());aw(w3,x3(E3()));var{default:C3,...ow}=iw,kl=C3!==void 0?C3:ow;p();p();var Pl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Bs(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function fg(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function D3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let i=0;igo[e.toLowerCase()]||dr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),sw=e=>Object.keys(go).find(t=>go[t]===e),uw=e=>Object.keys(dr).find(t=>dr[t]===e);function M3(e){L3=e||"all"}function Is(){return L3||"all"}function lw(){return gt.slice(0)}function cw(){return gt.map(e=>sw(e)||uw(e)||String.fromCharCode(e))}function dw(){let e=[];return Object.keys(Dt).forEach(t=>{Dt[t].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{e.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Rs(o))})})}),e}function gw(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function pw(e){return typeof e=="string"&&(e=Rs(e)),gt.indexOf(e)!==-1}function mw(e,t){let n,r;e||(e=Is());for(let a in Dt)if(Object.prototype.hasOwnProperty.call(Dt,a))for(n=Dt[a],r=0;r=0&>.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&>.splice(0,gt.length),(t===93||t===224)&&(t=91),t in tn){tn[t]=!1;for(let r in dr)dr[r]===t&&(Zr[r]=!1)}}function F3(e,...t){if(typeof e>"u")Object.keys(Dt).forEach(n=>delete Dt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&bg(n)});else if(typeof e=="object")e.key&&bg(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),bg({key:e,scope:n,method:r,splitKey:"+"})}}var bg=({key:e,scope:t,method:n,splitKey:r="+"})=>{hg(e).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Rs(u);if(!Dt[l])return;t||(t=Is());let c=s>1?fg(dr,o):[];Dt[l]=Dt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&D3(g.mods,c)))})};function k3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let i in tn)Object.prototype.hasOwnProperty.call(tn,i)&&(!tn[i]&&t.mods.indexOf(+i)>-1||tn[i]&&t.mods.indexOf(+i)===-1)&&(a=!1);(t.mods.length===0&&!tn[16]&&!tn[18]&&!tn[17]&&!tn[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(gt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function P3(e,t){let n=Dt["*"],r=e.keyCode||e.which||e.charCode;if(!Zr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),gt.indexOf(r)===-1&&r!==229&>.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=Ll[i];e[i]&>.indexOf(o)===-1?gt.push(o):!e[i]&>.indexOf(o)>-1?gt.splice(gt.indexOf(o),1):i==="metaKey"&&e[i]&>.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(gt=gt.slice(gt.indexOf(o))))}),r in tn){tn[r]=!0;for(let i in dr)dr[i]===r&&(Zr[i]=!0);if(!n)return}for(let i in tn)Object.prototype.hasOwnProperty.call(tn,i)&&(tn[i]=e[Ll[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(gt.indexOf(17)===-1&>.push(17),gt.indexOf(18)===-1&>.push(18),tn[17]=!0,tn[18]=!0);let a=Is();if(n)for(let i=0;i-1}function Zr(e,t,n){gt=[];let r=hg(e),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",g=!1,f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(o=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(f=!0)),typeof t=="string"&&(i=t),f&&F3(e,i);s1&&(a=fg(dr,e)),e=e[e.length-1],e=e==="*"?"*":Rs(e),e in Dt||(Dt[e]=[]),Dt[e].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!hw(o)&&window&&(_3.push(o),Bs(o,"keydown",m=>{P3(m,o)},g),A3||(A3=!0,Bs(window,"focus",()=>{gt=[]},g),Bs(window,"click",()=>{gt=[]},!1)),Bs(o,"keyup",m=>{P3(m,o),fw(m)},g))}function bw(e,t="all"){Object.keys(Dt).forEach(n=>{Dt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var yg={getPressedKeyString:cw,setScope:M3,getScope:Is,deleteScope:mw,getPressedKeyCodes:lw,getAllKeyCodes:dw,isPressed:pw,filter:gw,trigger:bw,unbind:F3,keyMap:go,modifier:dr,modifierMap:Ll};for(let e in yg)Object.prototype.hasOwnProperty.call(yg,e)&&(Zr[e]=yg[e]);if(typeof window<"u"){let e=window.hotkeys;Zr.noConflict=t=>(t&&window.hotkeys===Zr&&(window.hotkeys=e),Zr),window.hotkeys=Zr}var Ut=Zr;p();p();var yw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ot={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},wn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),i=Math.max(r,a),o=0,s=Y.map([e,t],u=>{let l=i-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return e}static getBrowserAlias(e){return yw[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},pt=/version\/(\d+(\.?_?\d+)+)/i,Tw=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],vw=Tw,Sw=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:wn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:wn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:wn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:wn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:wn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:wn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:wn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:wn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:wn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:wn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:wn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:wn.Linux}}},{test:[/CrOS/],describe(){return{name:wn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:wn.PlayStation4,version:t}}}],Cw=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ot.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ot.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ot.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ot.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ot.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ot.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ot.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ot.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ot.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ot.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ot.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ot.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ot.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ot.tv}}}],xw=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:xa.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:xa.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:xa.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:xa.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:xa.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xa.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:xa.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Ew=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(vw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Sw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Cw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(xw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(i=>{let o=e[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(t[i]=o,n+=1)}),n>0){let i=Object.keys(t),o=Y.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(t[o]);if(u!==void 0)return u}let s=Y.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=Y.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},B3=Ew,ww=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new B3(e,t)}static parse(e){return new B3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return xa}static get OS_MAP(){return wn}static get PLATFORMS_MAP(){return Ot}},po=ww;p();p();var{entries:H3,setPrototypeOf:R3,isFrozen:Dw,getPrototypeOf:Aw,getOwnPropertyDescriptor:kw}=Object,{freeze:Dn,seal:pr,create:Pw}=Object,{apply:Eg,construct:wg}=typeof Reflect<"u"&&Reflect;Eg||(Eg=function(e,t,n){return e.apply(t,n)});Dn||(Dn=function(e){return e});pr||(pr=function(e){return e});wg||(wg=function(e,t){return new e(...t)});var Lw=Jn(Array.prototype.forEach),O3=Jn(Array.prototype.pop),Os=Jn(Array.prototype.push),Fl=Jn(String.prototype.toLowerCase),Tg=Jn(String.prototype.toString),_w=Jn(String.prototype.match),gr=Jn(String.prototype.replace),Mw=Jn(String.prototype.indexOf),Fw=Jn(String.prototype.trim),Wn=Jn(RegExp.prototype.test),zs=Bw(TypeError);function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Nw=pr(/\${[\w\W]*}/gm),Uw=pr(/^data-[\-\w.\u00B7-\uFFFF]/),qw=pr(/^aria-[\-\w]+$/),W3=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=pr(/^(?:\w+script|data):/i),Hw=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K3=pr(/^html$/i),j3=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ow,ERB_EXPR:zw,TMPLIT_EXPR:Nw,DATA_ATTR:Uw,ARIA_ATTR:qw,IS_ALLOWED_URI:W3,IS_SCRIPT_OR_DATA:jw,ATTR_WHITESPACE:Hw,DOCTYPE_NAME:K3}),Ww=()=>typeof window>"u"?null:window,Kw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function G3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww(),t=U=>G3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:f,trustedTypes:m}=e,h=u.prototype,y=_l(h,"cloneNode"),T=_l(h,"nextSibling"),b=_l(h,"childNodes"),x=_l(h,"parentNode");if(typeof o=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let w,L="",{implementation:M,createNodeIterator:C,createDocumentFragment:v,getElementsByTagName:A}=a,{importNode:D}=n,S={};t.isSupported=typeof H3=="function"&&typeof x=="function"&&M&&M.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:F,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:I}=j3,{IS_ALLOWED_URI:k}=j3,_=null,B=He({},[...z3,...vg,...Sg,...Cg,...N3]),H=null,j=He({},[...U3,...xg,...q3,...Ml]),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ie=null,te=!0,J=!0,ce=!1,he=!0,ae=!1,X=!1,Se=!1,se=!1,ue=!1,ke=!1,We=!1,Re=!0,me=!1,Et="user-content-",Gt=!0,kt=!1,Bt={},vn=null,Yn=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),vs=null,Dr=He({},["audio","video","img","source","image","track"]),di=null,no=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml",qn=gn,jr=!1,Hr=null,gi=He({},[dn,sr,gn],Tg),Sn,Wr=["application/xhtml+xml","text/html"],wt="text/html",nt,jn=null,qS=a.createElement("form"),qh=function(U){return U instanceof RegExp||U instanceof Function},fd=function(U){if(!(jn&&jn===U)){if((!U||typeof U!="object")&&(U={}),U=mo(U),Sn=Wr.indexOf(U.PARSER_MEDIA_TYPE)===-1?Sn=wt:Sn=U.PARSER_MEDIA_TYPE,nt=Sn==="application/xhtml+xml"?Tg:Fl,_="ALLOWED_TAGS"in U?He({},U.ALLOWED_TAGS,nt):B,H="ALLOWED_ATTR"in U?He({},U.ALLOWED_ATTR,nt):j,Hr="ALLOWED_NAMESPACES"in U?He({},U.ALLOWED_NAMESPACES,Tg):gi,di="ADD_URI_SAFE_ATTR"in U?He(mo(no),U.ADD_URI_SAFE_ATTR,nt):no,vs="ADD_DATA_URI_TAGS"in U?He(mo(Dr),U.ADD_DATA_URI_TAGS,nt):Dr,vn="FORBID_CONTENTS"in U?He({},U.FORBID_CONTENTS,nt):Yn,V="FORBID_TAGS"in U?He({},U.FORBID_TAGS,nt):{},ie="FORBID_ATTR"in U?He({},U.FORBID_ATTR,nt):{},Bt="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,J=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,ke=U.RETURN_DOM_FRAGMENT||!1,We=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Re=U.SANITIZE_DOM!==!1,me=U.SANITIZE_NAMED_PROPS||!1,Gt=U.KEEP_CONTENT!==!1,kt=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||W3,qn=U.NAMESPACE||gn,G=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(J=!1),ke&&(ue=!0),Bt&&(_=He({},[...N3]),H=[],Bt.html===!0&&(He(_,z3),He(H,U3)),Bt.svg===!0&&(He(_,vg),He(H,xg),He(H,Ml)),Bt.svgFilters===!0&&(He(_,Sg),He(H,xg),He(H,Ml)),Bt.mathMl===!0&&(He(_,Cg),He(H,q3),He(H,Ml))),U.ADD_TAGS&&(_===B&&(_=mo(_)),He(_,U.ADD_TAGS,nt)),U.ADD_ATTR&&(H===j&&(H=mo(H)),He(H,U.ADD_ATTR,nt)),U.ADD_URI_SAFE_ATTR&&He(di,U.ADD_URI_SAFE_ATTR,nt),U.FORBID_CONTENTS&&(vn===Yn&&(vn=mo(vn)),He(vn,U.FORBID_CONTENTS,nt)),Gt&&(_["#text"]=!0),X&&He(_,["html","head","body"]),_.table&&(He(_,["tbody"]),delete V.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw zs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=U.TRUSTED_TYPES_POLICY,L=w.createHTML("")}else w===void 0&&(w=Kw(m,r)),w!==null&&typeof L=="string"&&(L=w.createHTML(""));Dn&&Dn(U),jn=U}},jh=He({},["mi","mo","mn","ms","mtext"]),Hh=He({},["foreignobject","desc","title","annotation-xml"]),jS=He({},["title","style","font","a","script"]),al=He({},vg);He(al,Sg),He(al,Iw);let hd=He({},Cg);He(hd,Rw);let HS=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:qn,tagName:"template"});let ne=Fl(U.tagName),Xe=Fl(ge.tagName);return Hr[U.namespaceURI]?U.namespaceURI===sr?ge.namespaceURI===gn?ne==="svg":ge.namespaceURI===dn?ne==="svg"&&(Xe==="annotation-xml"||jh[Xe]):!!al[ne]:U.namespaceURI===dn?ge.namespaceURI===gn?ne==="math":ge.namespaceURI===sr?ne==="math"&&Hh[Xe]:!!hd[ne]:U.namespaceURI===gn?ge.namespaceURI===sr&&!Hh[Xe]||ge.namespaceURI===dn&&!jh[Xe]?!1:!hd[ne]&&(jS[ne]||!al[ne]):!!(Sn==="application/xhtml+xml"&&Hr[U.namespaceURI]):!1},ro=function(U){Os(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},bd=function(U,ge){try{Os(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{Os(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!H[U])if(ue||ke)try{ro(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Wh=function(U){let ge,ne;if(se)U=""+U;else{let Cn=_w(U,/^[\r\n\t ]+/);ne=Cn&&Cn[0]}Sn==="application/xhtml+xml"&&qn===gn&&(U=''+U+"");let Xe=w?w.createHTML(U):U;if(qn===gn)try{ge=new f().parseFromString(Xe,Sn)}catch{}if(!ge||!ge.documentElement){ge=M.createDocument(qn,"template",null);try{ge.documentElement.innerHTML=jr?L:Xe}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),qn===gn?A.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},Kh=function(U){return C.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},WS=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},il=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Kr=function(U,ge,ne){S[U]&&Lw(S[U],Xe=>{Xe.call(t,ge,ne,jn)})},Gh=function(U){let ge;if(Kr("beforeSanitizeElements",U,null),WS(U))return ro(U),!0;let ne=nt(U.nodeName);if(Kr("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!il(U.firstElementChild)&&(!il(U.content)||!il(U.content.firstElementChild))&&Wn(/<[/\w]/g,U.innerHTML)&&Wn(/<[/\w]/g,U.textContent))return ro(U),!0;if(!_[ne]||V[ne]){if(!V[ne]&&$h(ne)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne)))return!1;if(Gt&&!vn[ne]){let Xe=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Xe){let Cn=Vt.length;for(let Fn=Cn-1;Fn>=0;--Fn)Xe.insertBefore(y(Vt[Fn],!0),T(U))}}return ro(U),!0}return U instanceof u&&!HS(U)||(ne==="noscript"||ne==="noembed")&&Wn(/<\/no(script|embed)/i,U.innerHTML)?(ro(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=gr(ge,N," "),ge=gr(ge,F," "),ge=gr(ge,P," "),U.textContent!==ge&&(Os(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Kr("afterSanitizeElements",U,null),!1)},Vh=function(U,ge,ne){if(Re&&(ge==="id"||ge==="name")&&(ne in a||ne in qS))return!1;if(!(J&&!ie[ge]&&Wn(O,ge))&&!(te&&Wn(z,ge))){if(!H[ge]||ie[ge]){if(!($h(U)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))&&(G.attributeNameCheck instanceof RegExp&&Wn(G.attributeNameCheck,ge)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(ge))||ge==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne))))return!1}else if(!di[ge]&&!Wn(k,gr(ne,I,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&Mw(ne,"data:")===0&&vs[U])&&!(ce&&!Wn(q,gr(ne,I,"")))&&ne)return!1}return!0},$h=function(U){return U.indexOf("-")>0},Yh=function(U){let ge,ne,Xe,Vt;Kr("beforeSanitizeAttributes",U,null);let{attributes:Cn}=U;if(!Cn)return;let Fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Vt=Cn.length;Vt--;){ge=Cn[Vt];let{name:Xt,namespaceURI:ao}=ge;if(ne=Xt==="value"?ge.value:Fw(ge.value),Xe=nt(Xt),Fn.attrName=Xe,Fn.attrValue=ne,Fn.keepAttr=!0,Fn.forceKeepAttr=void 0,Kr("uponSanitizeAttribute",U,Fn),ne=Fn.attrValue,Fn.forceKeepAttr||(bd(Xt,U),!Fn.keepAttr))continue;if(!he&&Wn(/\/>/i,ne)){bd(Xt,U);continue}ae&&(ne=gr(ne,N," "),ne=gr(ne,F," "),ne=gr(ne,P," "));let Qh=nt(U.nodeName);if(Vh(Qh,Xe,ne)){if(me&&(Xe==="id"||Xe==="name")&&(bd(Xt,U),ne=Et+ne),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ao)switch(m.getAttributeType(Qh,Xe)){case"TrustedHTML":{ne=w.createHTML(ne);break}case"TrustedScriptURL":{ne=w.createScriptURL(ne);break}}try{ao?U.setAttributeNS(ao,Xt,ne):U.setAttribute(Xt,ne),O3(t.removed)}catch{}}}Kr("afterSanitizeAttributes",U,null)},KS=function U(ge){let ne,Xe=Kh(ge);for(Kr("beforeSanitizeShadowDOM",ge,null);ne=Xe.nextNode();)Kr("uponSanitizeShadowNode",ne,null),!Gh(ne)&&(ne.content instanceof i&&U(ne.content),Yh(ne));Kr("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Xe,Vt,Cn;if(jr=!U,jr&&(U=""),typeof U!="string"&&!il(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw zs("dirty is not a string, aborting")}else throw zs("toString is not a function");if(!t.isSupported)return U;if(Se||fd(ge),t.removed=[],typeof U=="string"&&(kt=!1),kt){if(U.nodeName){let ao=nt(U.nodeName);if(!_[ao]||V[ao])throw zs("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Wh(""),Xe=ne.ownerDocument.importNode(U,!0),Xe.nodeType===1&&Xe.nodeName==="BODY"||Xe.nodeName==="HTML"?ne=Xe:ne.appendChild(Xe);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return w&&We?w.createHTML(U):U;if(ne=Wh(U),!ne)return ue?null:We?L:""}ne&&se&&ro(ne.firstChild);let Fn=Kh(kt?U:ne);for(;Vt=Fn.nextNode();)Gh(Vt)||(Vt.content instanceof i&&KS(Vt.content),Yh(Vt));if(kt)return U;if(ue){if(ke)for(Cn=v.call(ne.ownerDocument);ne.firstChild;)Cn.appendChild(ne.firstChild);else Cn=ne;return(H.shadowroot||H.shadowrootmod)&&(Cn=D.call(n,Cn,!0)),Cn}let Xt=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Wn(K3,ne.ownerDocument.doctype.name)&&(Xt=" -`+Xt),ae&&(Xt=gr(Xt,N," "),Xt=gr(Xt,F," "),Xt=gr(Xt,P," ")),w&&We?w.createHTML(Xt):Xt},t.setConfig=function(U){fd(U),Se=!0},t.clearConfig=function(){jn=null,Se=!1},t.isValidAttribute=function(U,ge,ne){jn||fd({});let Xe=nt(U),Vt=nt(ge);return Vh(Xe,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(S[U]=S[U]||[],Os(S[U],ge))},t.removeHook=function(U){if(S[U])return O3(S[U])},t.removeHooks=function(U){S[U]&&(S[U]=[])},t.removeAllHooks=function(){S={}},t}var rt=G3();p();p();var Gw=Object.create,Ag=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,$w=Object.getOwnPropertyNames,Yw=Object.getPrototypeOf,Qw=Object.prototype.hasOwnProperty,kg=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zw=(e,t)=>{for(var n in t)Ag(e,n,{get:t[n],enumerable:!0})},Dg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $w(t))!Qw.call(e,a)&&a!==n&&Ag(e,a,{get:()=>t[a],enumerable:!(r=Vw(t,a))||r.enumerable});return e},Jw=(e,t,n)=>(Dg(e,t,"default"),n&&Dg(n,t,"default")),$3=(e,t,n)=>(n=e!=null?Gw(Yw(e)):{},Dg(t||!e||!e.__esModule?Ag(n,"default",{value:e,enumerable:!0}):n,e)),Xw=kg((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var f=this._doc.createElement("span");l.firstChild;)f.appendChild(l.firstChild);l.parentNode.replaceChild(f,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),f=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),g&&l.setAttribute("poster",o(g)),f){var m=f.replace(this.REGEXPS.srcsetUrl,function(h,y,T,b){return o(y)+(T||"")+b});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var f=s(a);return f<=4&&(!o||f!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,f=l.firstChild;f;){var m=f.nextSibling;if(this._isPhrasingContent(f))g!==null?g.appendChild(f):this._isWhitespace(f)||(g=a.createElement("p"),l.replaceChild(g,f),g.appendChild(f));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}f=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var ke=this._getInnerText(ue);if(!(ke.length<25)){var We=this._getNodeAncestors(ue,5);if(We.length!==0){var Re=0;Re+=1,Re+=ke.split(",").length,Re+=Math.min(Math.floor(ke.length/100),3),this._forEachNode(We,function(me,Et){if(!(!me.tagName||!me.parentNode||typeof me.parentNode.tagName>"u")){if(typeof me.readability>"u"&&(this._initializeNode(me),y.push(me)),Et===0)var Gt=1;else Et===1?Gt=2:Gt=Et*3;me.readability.contentScore+=Re/Gt}})}}}});for(var T=[],b=0,x=y.length;bC.readability.contentScore){T.splice(M,0,w),T.length>this._nbTopCandidates&&T.pop();break}}}var v=T[0]||null,A=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),A=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var S=[],N=1;N=.75&&S.push(this._getNodeAncestors(T[N]));var F=3;if(S.length>=F)for(D=v.parentNode;D.tagName!=="BODY";){for(var P=0,O=0;O=F){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var z=v.readability.contentScore,q=z/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var I=D.readability.contentScore;if(Iz){v=D;break}z=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");i&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var B=D.children,H=0,j=B.length;H=_)V=!0;else if(G.nodeName==="P"){var te=this._getLinkDensity(G),J=this._getInnerText(G),ce=J.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",G),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)===-1&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),k.appendChild(G),B=D.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),A)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(f){return(f["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(f){return f&&typeof f.name=="string"}).map(function(f){return f.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(f){this.log(f.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),f=l.getAttribute("content");if(f){var m=null,h=null;g&&(m=g.match(s),m&&(h=m[0].toLowerCase().replace(/\s/g,""),i[h]=f.trim())),!m&&c&&u.test(c)&&(h=c,f&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[h]=f.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],f=function(h){return!!o.getElementsByTagName(h)[0]};if(g.some(f)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var g=0;if(c+g<0)return!0;if(this._getCharCount(i,",")<10){for(var f=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,h=i.getElementsByTagName("li").length-100,y=i.getElementsByTagName("input").length,T=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(i,["object","embed","iframe"]),w=0;w1&&f/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&h>f||y>Math.floor(f/3)||!s&&T<.9&&C<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&M>.2||c>=25&&M>.5||b===1&&C<75||b>1;if(s&&v){for(var A=0;A1)return v;let D=i.getElementsByTagName("li").length;if(m==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),e5=kg((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(f){c.add(f.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(f){if(!o.visibilityChecker(f))return!1;var m=f.className+" "+f.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||f.matches("li p"))return!1;var h=f.textContent.trim().length;return ho.minScore)})}typeof t=="object"&&(t.exports=a)}),Y3=kg((e,t)=>{var n=Xw(),r=e5();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Zw(Q3,{Readability:()=>Bl,default:()=>X3,isProbablyReaderable:()=>J3});var Z3=$3(Y3());Jw(Q3,$3(Y3()));var{Readability:Bl,isProbablyReaderable:J3}=Z3,{default:V3,...t5}=Z3,X3=V3!==void 0?V3:t5;var wi={};ol(wi,{Breadcrumbs:()=>Da,BrowserClient:()=>xo,Dedupe:()=>La,FunctionToString:()=>Ci,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,Hub:()=>ra,InboundFilters:()=>xi,Integrations:()=>I8,LinkedErrors:()=>ka,SDK_VERSION:()=>Co,Scope:()=>Xn,TryCatch:()=>Aa,addBreadcrumb:()=>Gl,addGlobalEventProcessor:()=>_r,captureEvent:()=>Wl,captureException:()=>vo,captureMessage:()=>Hl,chromeStackLineParser:()=>op,close:()=>db,configureScope:()=>Kl,createTransport:()=>Zs,defaultIntegrations:()=>pp,defaultStackLineParsers:()=>lp,defaultStackParser:()=>ac,flush:()=>cb,forceLoad:()=>ub,geckoStackLineParser:()=>sp,getCurrentHub:()=>Ie,getHubFromCarrier:()=>er,init:()=>ib,lastEventId:()=>sb,makeFetchTransport:()=>Js,makeMain:()=>To,onLoad:()=>lb,opera10StackLineParser:()=>K2,opera11StackLineParser:()=>G2,setContext:()=>Vl,setExtra:()=>Yl,setExtras:()=>$l,setTag:()=>Zl,setTags:()=>Ql,setUser:()=>Jl,showReportDialog:()=>ob,startTransaction:()=>Xl,winjsStackLineParser:()=>up,withScope:()=>So,wrap:()=>gb});p();p();p();p();p();p();p();p();p();var e2=Object.prototype.toString;function Il(e){switch(e2.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return kr(e,Error)}}function Ns(e,t){return e2.call(e)===`[object ${t}]`}function Rl(e){return Ns(e,"ErrorEvent")}function t2(e){return Ns(e,"DOMException")}function Jr(e){return Ns(e,"String")}function Us(e){return e===null||typeof e!="object"&&typeof e!="function"}function mr(e){return Ns(e,"Object")}function qs(e){return typeof Event<"u"&&kr(e,Event)}function n2(e){return!1}function r2(e){return Ns(e,"RegExp")}function fo(e){return!!(e&&e.then&&typeof e.then=="function")}function a2(e){return mr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function i2(e){return typeof e=="number"&&e!==e}function kr(e,t){try{return e instanceof t}catch{return!1}}function js(e,t){try{let n=e,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function n5(e,t){let n=e,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Jr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let g=l.match(/^\d+/);g&&(l=g[0])}return s2({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function s2(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function o5(e){if(!!1)return;let{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!e[i])throw new Pt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Pt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!a5(r))throw new Pt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Pt(`Invalid Sentry Dsn: Invalid port ${t}`);return!0}function Ol(e){let t=typeof e=="string"?i5(e):s2(e);return o5(t),t}p();var s5={};function mt(){return typeof window<"u"?window:typeof self<"u"?self:s5}function ho(e,t,n){let r=n||mt(),a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}p();p();var Hs=["debug","info","warn","error","log","assert","trace"];function Pg(e){if(!("console"in mt()))return e();let n=console,r={};Hs.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function u2(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Hs.forEach(n=>{t[n]=(...r)=>{e&&Pg(()=>{})}}):Hs.forEach(n=>{t[n]=()=>{}}),t}var Ee;!1?Ee=ho("logger",u2):Ee=u2();p();p();function Ti(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Lg(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Fg(e){if(Il(e))return{message:e.message,name:e.name,stack:e.stack,...c2(e)};if(qs(e)){let t={type:e.type,target:l2(e.target),currentTarget:l2(e.currentTarget),...c2(e)};return typeof CustomEvent<"u"&&kr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function l2(e){try{return n2(e)?js(e):Object.prototype.toString.call(e)}catch{return""}}function c2(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function g2(e,t=40){let n=Object.keys(Fg(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Ti(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:Ti(a,t)}return""}function vi(e){return _g(e,new Map)}function _g(e,t){if(mr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=_g(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(_g(a,t))}),r}return e}p();var u5=50;function Ig(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of t){let s=o(i);if(s){a.push(s);break}}return l5(a)}}function p2(e){return Array.isArray(e)?Ig(...e):e}function l5(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,u5).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Bg="";function hr(e){try{return!e||typeof e!="function"?Bg:e.name||Bg}catch{return Bg}}p();function m2(){if(!("fetch"in mt()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function f2(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function h2(){return!0}var Xr=mt(),Ks={},b2={};function c5(e){if(!b2[e])switch(b2[e]=!0,e){case"console":d5();break;case"fetch":g5();break;case"error":f5();break;case"unhandledrejection":h5();break;default:!1&&Ee.warn("unknown instrumentation type:",e);return}}function br(e,t){Ks[e]=Ks[e]||[],Ks[e].push(t),c5(e)}function yo(e,t){if(!(!e||!Ks[e]))for(let n of Ks[e]||[])try{n(t)}catch(r){!1&&Ee.error(`Error while triggering instrumentation handler. +`+y+"]"}return r.pop(),a=y,b}},kE={parse:SE,stringify:AE},PE=kE,wl=PE;p();p();var UB=Number.isNaN||function(e){return typeof e=="number"&&e!==e};p();p();var Dl=globalThis||(typeof window<"u"?window:self),_E=Object.create,lg=Object.defineProperty,ME=Object.getOwnPropertyDescriptor,FE=Object.getOwnPropertyNames,BE=Object.getPrototypeOf,IE=Object.prototype.hasOwnProperty,RE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),OE=(e,t)=>{for(var n in t)lg(e,n,{get:t[n],enumerable:!0})},ug=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of FE(t))!IE.call(e,a)&&a!==n&&lg(e,a,{get:()=>t[a],enumerable:!(r=ME(t,a))||r.enumerable});return e},zE=(e,t,n)=>(ug(e,t,"default"),n&&ug(n,t,"default")),f3=(e,t,n)=>(n=e!=null?_E(BE(e)):{},ug(t||!e||!e.__esModule?lg(n,"default",{value:e,enumerable:!0}):n,e)),h3=RE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Dl=="object"&&Dl&&Dl.Object===Object&&Dl,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(A,D,S){var N,F,P,O,z,q,I=0,k=!1,_=!1,B=!0;if(typeof A!="function")throw new TypeError(n);D=v(D)||0,L(S)&&(k=!!S.leading,_="maxWait"in S,P=_?y(v(S.maxWait)||0,D):P,B="trailing"in S?!!S.trailing:B);function H(ae){var X=N,Se=F;return N=F=void 0,I=ae,O=A.apply(Se,X),O}function j(ae){return I=ae,z=setTimeout(ie,D),k?H(ae):O}function G(ae){var X=ae-q,Se=ae-I,se=D-X;return _?T(se,P-Se):se}function V(ae){var X=ae-q,Se=ae-I;return q===void 0||X>=D||X<0||_&&Se>=P}function ie(){var ae=b();if(V(ae))return te(ae);z=setTimeout(ie,G(ae))}function te(ae){return z=void 0,B&&N?H(ae):(N=F=void 0,O)}function J(){z!==void 0&&clearTimeout(z),I=0,N=q=F=z=void 0}function ce(){return z===void 0?O:te(b())}function he(){var ae=b(),X=V(ae);if(N=arguments,F=this,q=ae,X){if(z===void 0)return j(q);if(_)return z=setTimeout(ie,D),H(q)}return z===void 0&&(z=setTimeout(ie,D)),O}return he.cancel=J,he.flush=ce,he}function w(A,D,S){var N=!0,F=!0;if(typeof A!="function")throw new TypeError(n);return L(S)&&(N="leading"in S?!!S.leading:N,F="trailing"in S?!!S.trailing:F),x(A,D,{leading:N,maxWait:D,trailing:F})}function L(A){var D=typeof A;return!!A&&(D=="object"||D=="function")}function M(A){return!!A&&typeof A=="object"}function C(A){return typeof A=="symbol"||M(A)&&h.call(A)==a}function v(A){if(typeof A=="number")return A;if(C(A))return r;if(L(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=L(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=A.replace(i,"");var S=s.test(A);return S||u.test(A)?l(A.slice(2),S?2:8):o.test(A)?r:+A}t.exports=w}),b3={};OE(b3,{default:()=>cr});var NE=f3(h3());zE(b3,f3(h3()));var{default:m3,...UE}=NE,cr=m3!==void 0?m3:UE;p();p();var Al=globalThis||(typeof window<"u"?window:self),qE=Object.create,dg=Object.defineProperty,jE=Object.getOwnPropertyDescriptor,HE=Object.getOwnPropertyNames,WE=Object.getPrototypeOf,KE=Object.prototype.hasOwnProperty,GE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VE=(e,t)=>{for(var n in t)dg(e,n,{get:t[n],enumerable:!0})},cg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HE(t))!KE.call(e,a)&&a!==n&&dg(e,a,{get:()=>t[a],enumerable:!(r=jE(t,a))||r.enumerable});return e},$E=(e,t,n)=>(cg(e,t,"default"),n&&cg(n,t,"default")),T3=(e,t,n)=>(n=e!=null?qE(WE(e)):{},cg(t||!e||!e.__esModule?dg(n,"default",{value:e,enumerable:!0}):n,e)),v3=GE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Al=="object"&&Al&&Al.Object===Object&&Al,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(v,A,D){var S,N,F,P,O,z,q=0,I=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);A=C(A)||0,w(D)&&(I=!!D.leading,k="maxWait"in D,F=k?y(C(D.maxWait)||0,A):F,_="trailing"in D?!!D.trailing:_);function B(he){var ae=S,X=N;return S=N=void 0,q=he,P=v.apply(X,ae),P}function H(he){return q=he,O=setTimeout(V,A),I?B(he):P}function j(he){var ae=he-z,X=he-q,Se=A-ae;return k?T(Se,F-X):Se}function G(he){var ae=he-z,X=he-q;return z===void 0||ae>=A||ae<0||k&&X>=F}function V(){var he=b();if(G(he))return ie(he);O=setTimeout(V,j(he))}function ie(he){return O=void 0,_&&S?B(he):(S=N=void 0,P)}function te(){O!==void 0&&clearTimeout(O),q=0,S=z=N=O=void 0}function J(){return O===void 0?P:ie(b())}function ce(){var he=b(),ae=G(he);if(S=arguments,N=this,z=he,ae){if(O===void 0)return H(z);if(k)return O=setTimeout(V,A),B(z)}return O===void 0&&(O=setTimeout(V,A)),P}return ce.cancel=te,ce.flush=J,ce}function w(v){var A=typeof v;return!!v&&(A=="object"||A=="function")}function L(v){return!!v&&typeof v=="object"}function M(v){return typeof v=="symbol"||L(v)&&h.call(v)==a}function C(v){if(typeof v=="number")return v;if(M(v))return r;if(w(v)){var A=typeof v.valueOf=="function"?v.valueOf():v;v=w(A)?A+"":A}if(typeof v!="string")return v===0?v:+v;v=v.replace(i,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):o.test(v)?r:+v}t.exports=x}),S3={};VE(S3,{default:()=>Bs});var YE=T3(v3());$E(S3,T3(v3()));var{default:y3,...QE}=YE,Bs=y3!==void 0?y3:QE;p();p();var ZE=Object.create,pg=Object.defineProperty,JE=Object.getOwnPropertyDescriptor,XE=Object.getOwnPropertyNames,ew=Object.getPrototypeOf,tw=Object.prototype.hasOwnProperty,nw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rw=(e,t)=>{for(var n in t)pg(e,n,{get:t[n],enumerable:!0})},gg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of XE(t))!tw.call(e,a)&&a!==n&&pg(e,a,{get:()=>t[a],enumerable:!(r=JE(t,a))||r.enumerable});return e},aw=(e,t,n)=>(gg(e,t,"default"),n&&gg(n,t,"default")),x3=(e,t,n)=>(n=e!=null?ZE(ew(e)):{},gg(t||!e||!e.__esModule?pg(n,"default",{value:e,enumerable:!0}):n,e)),E3=nw((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(i)==="object"?i.exports=g():(s=[],o=g,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function g(m){if(f[m])return f[m].exports;var h=f[m]={i:m,l:!1,exports:{}};return c[m].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var f={};return g.m=c,g.c=f,g.i=function(m){return m},g.d=function(m,h,y){g.o(m,h)||Object.defineProperty(m,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(m){var h=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(h,"a",h),h},g.o=function(m,h){return Object.prototype.hasOwnProperty.call(m,h)},g.p="",g(g.s=0)}([function(c,g,f){function m(j,G){var V={};for(var ie in j)G.indexOf(ie)>=0||Object.prototype.hasOwnProperty.call(j,ie)&&(V[ie]=j[ie]);return V}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},y=Object.assign||function(j){for(var G=1;G'+ie+"",Se.onclick=function(){return F(se,X)},Se.listener=function(ue){(D(ue)||S(ue))&&z()},N(Se,X),J&&J<1&&(J=1),!he&&J&&L(J).then(function(){return F(se,X)})},I=g.force=function(j,G){var V=j.type,ie=V===void 0?5:V,te=j.text,J=j.buttonText,ce=J===void 0?"OK":J,he=j.callback,ae=j.position,X=ae===void 0?b.positions.force||X.top:ae;M(),z();var Se=document.createElement("div"),se=C();Se.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var ke=document.createElement("div");ke.classList.add(b.classes.button),ke.classList.add(v[ie]),ke.innerHTML=ce,ke.onclick=function(){F(se,X),O(),he?he():G&&G()},Se.appendChild(ue),Se.appendChild(ke),Se.listener=function(We){D(We)&&ke.click()},N(Se,X),P()},k=g.confirm=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Yes":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.confirm||se.top:Se;M(),z();var ue=document.createElement("div"),ke=C();ue.id=ke;var We=document.createElement("div");We.classList.add(b.classes.textbox),We.classList.add(b.classes.backgroundInfo),We.innerHTML='
'+ie+"
";var Re=document.createElement("div");Re.classList.add(b.classes.button),Re.classList.add(b.classes.elementHalf),Re.classList.add(b.classes.backgroundSuccess),Re.innerHTML=J,Re.onclick=function(){F(ke,se),O(),ae?ae():G&&G()};var me=document.createElement("div");me.classList.add(b.classes.button),me.classList.add(b.classes.elementHalf),me.classList.add(b.classes.backgroundError),me.innerHTML=he,me.onclick=function(){F(ke,se),O(),X?X():V&&V()},ue.appendChild(We),ue.appendChild(Re),ue.appendChild(me),ue.listener=function(Et){D(Et)?Re.click():S(Et)&&me.click()},N(ue,se),P(ue,se)},_=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Submit":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.input||se.top:Se,ue=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);M(),z();var ke=document.createElement("div"),We=C();ke.id=We;var Re=document.createElement("div");Re.classList.add(b.classes.textbox),Re.classList.add(b.classes.backgroundInfo),Re.innerHTML='
'+ie+"
";var me=document.createElement("input");me.classList.add(b.classes.inputField),me.setAttribute("autocapitalize",ue.autocapitalize||"none"),me.setAttribute("autocomplete",ue.autocomplete||"off"),me.setAttribute("autocorrect",ue.autocorrect||"off"),me.setAttribute("autofocus",ue.autofocus||"true"),me.setAttribute("inputmode",ue.inputmode||"verbatim"),me.setAttribute("max",ue.max||""),me.setAttribute("maxlength",ue.maxlength||""),me.setAttribute("min",ue.min||""),me.setAttribute("minlength",ue.minlength||""),me.setAttribute("placeholder",ue.placeholder||""),me.setAttribute("spellcheck",ue.spellcheck||"default"),me.setAttribute("step",ue.step||"any"),me.setAttribute("type",ue.type||"text"),me.value=ue.value||"",ue.allowed&&(me.oninput=function(){var kt=void 0;if(Array.isArray(ue.allowed)){for(var Bt="",vn=ue.allowed,Yn=0;Yn'+V+"",X.appendChild(se),ce.forEach(function(ke,We){var Re=ke.type,me=Re===void 0?1:Re,Et=ke.text,Gt=ke.handler,kt=document.createElement("div");kt.classList.add(v[me]),kt.classList.add(b.classes.button),kt.classList.add(b.classes.selectChoice);var Bt=ce[We+1];Bt&&!Bt.type&&(Bt.type=1),Bt&&Bt.type===me&&kt.classList.add(b.classes.selectChoiceRepeated),kt.innerHTML=Et,kt.onclick=function(){F(Se,ae),O(),Gt()},X.appendChild(kt)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){F(Se,ae),O(),J?J():G&&G()},X.appendChild(ue),X.listener=function(ke){S(ke)&&ue.click()},N(X,ae),P(X,ae)},H=g.date=function(j,G,V){var ie=j.value,te=ie===void 0?new Date:ie,J=j.submitText,ce=J===void 0?"OK":J,he=j.cancelText,ae=he===void 0?"Cancel":he,X=j.submitCallback,Se=j.cancelCallback,se=j.position,ue=se===void 0?b.positions.date||ue.top:se;M(),z();var ke="▾",We=document.createElement("div"),Re=document.createElement("div"),me=document.createElement("div"),Et=function(wt){We.innerHTML=b.dateMonths[wt.getMonth()],Re.innerHTML=wt.getDate(),me.innerHTML=wt.getFullYear()},Gt=function(wt){var rt=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),jn=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(jn)>rt&&(jn=rt.toString()),wt.target.textContent=jn,Number(jn)<1&&(jn="1"),te.setDate(Number(jn))},kt=function(wt){var rt=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);wt.target.textContent=rt,te.setFullYear(Number(rt))},Bt=function(wt){Et(te)},vn=function(wt){var rt=new Date(te.getFullYear(),te.getMonth()+wt+1,0).getDate();te.getDate()>rt&&te.setDate(rt),te.setMonth(te.getMonth()+wt),Et(te)},Yn=function(wt){te.setDate(te.getDate()+wt),Et(te)},Ss=function(wt){var rt=te.getFullYear()+wt;rt<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+wt),Et(te)},Dr=document.createElement("div"),di=C();Dr.id=di;var no=document.createElement("div");no.classList.add(b.classes.backgroundInfo);var dn=document.createElement("div");dn.classList.add(b.classes.dateSelectorInner);var sr=document.createElement("div");sr.classList.add(b.classes.button),sr.classList.add(b.classes.elementThird),sr.classList.add(b.classes.dateSelectorUp),sr.innerHTML=ke;var gn=document.createElement("div");gn.classList.add(b.classes.button),gn.classList.add(b.classes.elementThird),gn.classList.add(b.classes.dateSelectorUp),gn.innerHTML=ke;var qn=document.createElement("div");qn.classList.add(b.classes.button),qn.classList.add(b.classes.elementThird),qn.classList.add(b.classes.dateSelectorUp),qn.innerHTML=ke,We.classList.add(b.classes.element),We.classList.add(b.classes.elementThird),We.innerHTML=b.dateMonths[te.getMonth()],Re.classList.add(b.classes.element),Re.classList.add(b.classes.elementThird),Re.setAttribute("contentEditable",!0),Re.addEventListener("input",Gt),Re.addEventListener("blur",Bt),Re.innerHTML=te.getDate(),me.classList.add(b.classes.element),me.classList.add(b.classes.elementThird),me.setAttribute("contentEditable",!0),me.addEventListener("input",kt),me.addEventListener("blur",Bt),me.innerHTML=te.getFullYear();var jr=document.createElement("div");jr.classList.add(b.classes.button),jr.classList.add(b.classes.elementThird),jr.innerHTML=ke;var Hr=document.createElement("div");Hr.classList.add(b.classes.button),Hr.classList.add(b.classes.elementThird),Hr.innerHTML=ke;var gi=document.createElement("div");gi.classList.add(b.classes.button),gi.classList.add(b.classes.elementThird),gi.innerHTML=ke,sr.onclick=function(){return vn(1)},gn.onclick=function(){return Yn(1)},qn.onclick=function(){return Ss(1)},jr.onclick=function(){return vn(-1)},Hr.onclick=function(){return Yn(-1)},gi.onclick=function(){return Ss(-1)};var Sn=document.createElement("div");Sn.classList.add(b.classes.button),Sn.classList.add(b.classes.elementHalf),Sn.classList.add(b.classes.backgroundSuccess),Sn.innerHTML=ce,Sn.onclick=function(){F(di,ue),O(),X?X(te):G&&G(te)};var Wr=document.createElement("div");Wr.classList.add(b.classes.button),Wr.classList.add(b.classes.elementHalf),Wr.classList.add(b.classes.backgroundError),Wr.innerHTML=ae,Wr.onclick=function(){F(di,ue),O(),Se?Se(te):V&&V(te)},dn.appendChild(sr),dn.appendChild(gn),dn.appendChild(qn),dn.appendChild(We),dn.appendChild(Re),dn.appendChild(me),dn.appendChild(jr),dn.appendChild(Hr),dn.appendChild(gi),no.appendChild(dn),Dr.appendChild(no),Dr.appendChild(Sn),Dr.appendChild(Wr),Dr.listener=function(wt){D(wt)?Sn.click():S(wt)&&Wr.click()},N(Dr,ue),P(Dr,ue)};g.default={alert:q,force:I,confirm:k,input:_,select:B,date:H,setOptions:x,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),w3={};rw(w3,{default:()=>kl});var iw=x3(E3());aw(w3,x3(E3()));var{default:C3,...ow}=iw,kl=C3!==void 0?C3:ow;p();p();var Pl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Is(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function mg(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function D3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let i=0;igo[e.toLowerCase()]||dr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),sw=e=>Object.keys(go).find(t=>go[t]===e),uw=e=>Object.keys(dr).find(t=>dr[t]===e);function M3(e){L3=e||"all"}function Rs(){return L3||"all"}function lw(){return pt.slice(0)}function cw(){return pt.map(e=>sw(e)||uw(e)||String.fromCharCode(e))}function dw(){let e=[];return Object.keys(Dt).forEach(t=>{Dt[t].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{e.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Os(o))})})}),e}function gw(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function pw(e){return typeof e=="string"&&(e=Os(e)),pt.indexOf(e)!==-1}function mw(e,t){let n,r;e||(e=Rs());for(let a in Dt)if(Object.prototype.hasOwnProperty.call(Dt,a))for(n=Dt[a],r=0;r=0&&pt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&pt.splice(0,pt.length),(t===93||t===224)&&(t=91),t in nn){nn[t]=!1;for(let r in dr)dr[r]===t&&(Zr[r]=!1)}}function F3(e,...t){if(typeof e>"u")Object.keys(Dt).forEach(n=>delete Dt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&hg(n)});else if(typeof e=="object")e.key&&hg(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),hg({key:e,scope:n,method:r,splitKey:"+"})}}var hg=({key:e,scope:t,method:n,splitKey:r="+"})=>{fg(e).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Os(u);if(!Dt[l])return;t||(t=Rs());let c=s>1?mg(dr,o):[];Dt[l]=Dt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&D3(g.mods,c)))})};function k3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let i in nn)Object.prototype.hasOwnProperty.call(nn,i)&&(!nn[i]&&t.mods.indexOf(+i)>-1||nn[i]&&t.mods.indexOf(+i)===-1)&&(a=!1);(t.mods.length===0&&!nn[16]&&!nn[18]&&!nn[17]&&!nn[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(pt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function P3(e,t){let n=Dt["*"],r=e.keyCode||e.which||e.charCode;if(!Zr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),pt.indexOf(r)===-1&&r!==229&&pt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=Ll[i];e[i]&&pt.indexOf(o)===-1?pt.push(o):!e[i]&&pt.indexOf(o)>-1?pt.splice(pt.indexOf(o),1):i==="metaKey"&&e[i]&&pt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(pt=pt.slice(pt.indexOf(o))))}),r in nn){nn[r]=!0;for(let i in dr)dr[i]===r&&(Zr[i]=!0);if(!n)return}for(let i in nn)Object.prototype.hasOwnProperty.call(nn,i)&&(nn[i]=e[Ll[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(pt.indexOf(17)===-1&&pt.push(17),pt.indexOf(18)===-1&&pt.push(18),nn[17]=!0,nn[18]=!0);let a=Rs();if(n)for(let i=0;i-1}function Zr(e,t,n){pt=[];let r=fg(e),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",g=!1,f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(o=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(f=!0)),typeof t=="string"&&(i=t),f&&F3(e,i);s1&&(a=mg(dr,e)),e=e[e.length-1],e=e==="*"?"*":Os(e),e in Dt||(Dt[e]=[]),Dt[e].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!hw(o)&&window&&(_3.push(o),Is(o,"keydown",m=>{P3(m,o)},g),A3||(A3=!0,Is(window,"focus",()=>{pt=[]},g),Is(window,"click",()=>{pt=[]},!1)),Is(o,"keyup",m=>{P3(m,o),fw(m)},g))}function bw(e,t="all"){Object.keys(Dt).forEach(n=>{Dt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var bg={getPressedKeyString:cw,setScope:M3,getScope:Rs,deleteScope:mw,getPressedKeyCodes:lw,getAllKeyCodes:dw,isPressed:pw,filter:gw,trigger:bw,unbind:F3,keyMap:go,modifier:dr,modifierMap:Ll};for(let e in bg)Object.prototype.hasOwnProperty.call(bg,e)&&(Zr[e]=bg[e]);if(typeof window<"u"){let e=window.hotkeys;Zr.noConflict=t=>(t&&window.hotkeys===Zr&&(window.hotkeys=e),Zr),window.hotkeys=Zr}var Ut=Zr;p();p();var yw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ot={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},wn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),i=Math.max(r,a),o=0,s=Y.map([e,t],u=>{let l=i-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return e}static getBrowserAlias(e){return yw[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},mt=/version\/(\d+(\.?_?\d+)+)/i,Tw=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],vw=Tw,Sw=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:wn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:wn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:wn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:wn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:wn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:wn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:wn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:wn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:wn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:wn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:wn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:wn.Linux}}},{test:[/CrOS/],describe(){return{name:wn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:wn.PlayStation4,version:t}}}],Cw=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ot.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ot.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ot.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ot.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ot.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ot.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ot.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ot.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ot.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ot.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ot.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ot.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ot.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ot.tv}}}],xw=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:xa.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:xa.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:xa.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:xa.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:xa.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xa.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:xa.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Ew=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(vw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Sw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Cw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(xw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(i=>{let o=e[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(t[i]=o,n+=1)}),n>0){let i=Object.keys(t),o=Y.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(t[o]);if(u!==void 0)return u}let s=Y.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=Y.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},B3=Ew,ww=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new B3(e,t)}static parse(e){return new B3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return xa}static get OS_MAP(){return wn}static get PLATFORMS_MAP(){return Ot}},po=ww;p();p();var{entries:H3,setPrototypeOf:R3,isFrozen:Dw,getPrototypeOf:Aw,getOwnPropertyDescriptor:kw}=Object,{freeze:Dn,seal:pr,create:Pw}=Object,{apply:xg,construct:Eg}=typeof Reflect<"u"&&Reflect;xg||(xg=function(e,t,n){return e.apply(t,n)});Dn||(Dn=function(e){return e});pr||(pr=function(e){return e});Eg||(Eg=function(e,t){return new e(...t)});var Lw=Jn(Array.prototype.forEach),O3=Jn(Array.prototype.pop),zs=Jn(Array.prototype.push),Fl=Jn(String.prototype.toLowerCase),yg=Jn(String.prototype.toString),_w=Jn(String.prototype.match),gr=Jn(String.prototype.replace),Mw=Jn(String.prototype.indexOf),Fw=Jn(String.prototype.trim),Wn=Jn(RegExp.prototype.test),Ns=Bw(TypeError);function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Nw=pr(/\${[\w\W]*}/gm),Uw=pr(/^data-[\-\w.\u00B7-\uFFFF]/),qw=pr(/^aria-[\-\w]+$/),W3=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=pr(/^(?:\w+script|data):/i),Hw=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K3=pr(/^html$/i),j3=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ow,ERB_EXPR:zw,TMPLIT_EXPR:Nw,DATA_ATTR:Uw,ARIA_ATTR:qw,IS_ALLOWED_URI:W3,IS_SCRIPT_OR_DATA:jw,ATTR_WHITESPACE:Hw,DOCTYPE_NAME:K3}),Ww=()=>typeof window>"u"?null:window,Kw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function G3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww(),t=U=>G3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:f,trustedTypes:m}=e,h=u.prototype,y=_l(h,"cloneNode"),T=_l(h,"nextSibling"),b=_l(h,"childNodes"),x=_l(h,"parentNode");if(typeof o=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let w,L="",{implementation:M,createNodeIterator:C,createDocumentFragment:v,getElementsByTagName:A}=a,{importNode:D}=n,S={};t.isSupported=typeof H3=="function"&&typeof x=="function"&&M&&M.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:F,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:I}=j3,{IS_ALLOWED_URI:k}=j3,_=null,B=He({},[...z3,...Tg,...vg,...Sg,...N3]),H=null,j=He({},[...U3,...Cg,...q3,...Ml]),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ie=null,te=!0,J=!0,ce=!1,he=!0,ae=!1,X=!1,Se=!1,se=!1,ue=!1,ke=!1,We=!1,Re=!0,me=!1,Et="user-content-",Gt=!0,kt=!1,Bt={},vn=null,Yn=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ss=null,Dr=He({},["audio","video","img","source","image","track"]),di=null,no=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml",qn=gn,jr=!1,Hr=null,gi=He({},[dn,sr,gn],yg),Sn,Wr=["application/xhtml+xml","text/html"],wt="text/html",rt,jn=null,qS=a.createElement("form"),qh=function(U){return U instanceof RegExp||U instanceof Function},md=function(U){if(!(jn&&jn===U)){if((!U||typeof U!="object")&&(U={}),U=mo(U),Sn=Wr.indexOf(U.PARSER_MEDIA_TYPE)===-1?Sn=wt:Sn=U.PARSER_MEDIA_TYPE,rt=Sn==="application/xhtml+xml"?yg:Fl,_="ALLOWED_TAGS"in U?He({},U.ALLOWED_TAGS,rt):B,H="ALLOWED_ATTR"in U?He({},U.ALLOWED_ATTR,rt):j,Hr="ALLOWED_NAMESPACES"in U?He({},U.ALLOWED_NAMESPACES,yg):gi,di="ADD_URI_SAFE_ATTR"in U?He(mo(no),U.ADD_URI_SAFE_ATTR,rt):no,Ss="ADD_DATA_URI_TAGS"in U?He(mo(Dr),U.ADD_DATA_URI_TAGS,rt):Dr,vn="FORBID_CONTENTS"in U?He({},U.FORBID_CONTENTS,rt):Yn,V="FORBID_TAGS"in U?He({},U.FORBID_TAGS,rt):{},ie="FORBID_ATTR"in U?He({},U.FORBID_ATTR,rt):{},Bt="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,J=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,ke=U.RETURN_DOM_FRAGMENT||!1,We=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Re=U.SANITIZE_DOM!==!1,me=U.SANITIZE_NAMED_PROPS||!1,Gt=U.KEEP_CONTENT!==!1,kt=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||W3,qn=U.NAMESPACE||gn,G=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(J=!1),ke&&(ue=!0),Bt&&(_=He({},[...N3]),H=[],Bt.html===!0&&(He(_,z3),He(H,U3)),Bt.svg===!0&&(He(_,Tg),He(H,Cg),He(H,Ml)),Bt.svgFilters===!0&&(He(_,vg),He(H,Cg),He(H,Ml)),Bt.mathMl===!0&&(He(_,Sg),He(H,q3),He(H,Ml))),U.ADD_TAGS&&(_===B&&(_=mo(_)),He(_,U.ADD_TAGS,rt)),U.ADD_ATTR&&(H===j&&(H=mo(H)),He(H,U.ADD_ATTR,rt)),U.ADD_URI_SAFE_ATTR&&He(di,U.ADD_URI_SAFE_ATTR,rt),U.FORBID_CONTENTS&&(vn===Yn&&(vn=mo(vn)),He(vn,U.FORBID_CONTENTS,rt)),Gt&&(_["#text"]=!0),X&&He(_,["html","head","body"]),_.table&&(He(_,["tbody"]),delete V.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ns('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ns('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=U.TRUSTED_TYPES_POLICY,L=w.createHTML("")}else w===void 0&&(w=Kw(m,r)),w!==null&&typeof L=="string"&&(L=w.createHTML(""));Dn&&Dn(U),jn=U}},jh=He({},["mi","mo","mn","ms","mtext"]),Hh=He({},["foreignobject","desc","title","annotation-xml"]),jS=He({},["title","style","font","a","script"]),al=He({},Tg);He(al,vg),He(al,Iw);let fd=He({},Sg);He(fd,Rw);let HS=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:qn,tagName:"template"});let ne=Fl(U.tagName),Xe=Fl(ge.tagName);return Hr[U.namespaceURI]?U.namespaceURI===sr?ge.namespaceURI===gn?ne==="svg":ge.namespaceURI===dn?ne==="svg"&&(Xe==="annotation-xml"||jh[Xe]):!!al[ne]:U.namespaceURI===dn?ge.namespaceURI===gn?ne==="math":ge.namespaceURI===sr?ne==="math"&&Hh[Xe]:!!fd[ne]:U.namespaceURI===gn?ge.namespaceURI===sr&&!Hh[Xe]||ge.namespaceURI===dn&&!jh[Xe]?!1:!fd[ne]&&(jS[ne]||!al[ne]):!!(Sn==="application/xhtml+xml"&&Hr[U.namespaceURI]):!1},ro=function(U){zs(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},hd=function(U,ge){try{zs(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{zs(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!H[U])if(ue||ke)try{ro(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Wh=function(U){let ge,ne;if(se)U=""+U;else{let Cn=_w(U,/^[\r\n\t ]+/);ne=Cn&&Cn[0]}Sn==="application/xhtml+xml"&&qn===gn&&(U=''+U+"");let Xe=w?w.createHTML(U):U;if(qn===gn)try{ge=new f().parseFromString(Xe,Sn)}catch{}if(!ge||!ge.documentElement){ge=M.createDocument(qn,"template",null);try{ge.documentElement.innerHTML=jr?L:Xe}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),qn===gn?A.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},Kh=function(U){return C.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},WS=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},il=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Kr=function(U,ge,ne){S[U]&&Lw(S[U],Xe=>{Xe.call(t,ge,ne,jn)})},Gh=function(U){let ge;if(Kr("beforeSanitizeElements",U,null),WS(U))return ro(U),!0;let ne=rt(U.nodeName);if(Kr("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!il(U.firstElementChild)&&(!il(U.content)||!il(U.content.firstElementChild))&&Wn(/<[/\w]/g,U.innerHTML)&&Wn(/<[/\w]/g,U.textContent))return ro(U),!0;if(!_[ne]||V[ne]){if(!V[ne]&&$h(ne)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne)))return!1;if(Gt&&!vn[ne]){let Xe=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Xe){let Cn=Vt.length;for(let Fn=Cn-1;Fn>=0;--Fn)Xe.insertBefore(y(Vt[Fn],!0),T(U))}}return ro(U),!0}return U instanceof u&&!HS(U)||(ne==="noscript"||ne==="noembed")&&Wn(/<\/no(script|embed)/i,U.innerHTML)?(ro(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=gr(ge,N," "),ge=gr(ge,F," "),ge=gr(ge,P," "),U.textContent!==ge&&(zs(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Kr("afterSanitizeElements",U,null),!1)},Vh=function(U,ge,ne){if(Re&&(ge==="id"||ge==="name")&&(ne in a||ne in qS))return!1;if(!(J&&!ie[ge]&&Wn(O,ge))&&!(te&&Wn(z,ge))){if(!H[ge]||ie[ge]){if(!($h(U)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))&&(G.attributeNameCheck instanceof RegExp&&Wn(G.attributeNameCheck,ge)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(ge))||ge==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne))))return!1}else if(!di[ge]&&!Wn(k,gr(ne,I,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&Mw(ne,"data:")===0&&Ss[U])&&!(ce&&!Wn(q,gr(ne,I,"")))&&ne)return!1}return!0},$h=function(U){return U.indexOf("-")>0},Yh=function(U){let ge,ne,Xe,Vt;Kr("beforeSanitizeAttributes",U,null);let{attributes:Cn}=U;if(!Cn)return;let Fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Vt=Cn.length;Vt--;){ge=Cn[Vt];let{name:en,namespaceURI:ao}=ge;if(ne=en==="value"?ge.value:Fw(ge.value),Xe=rt(en),Fn.attrName=Xe,Fn.attrValue=ne,Fn.keepAttr=!0,Fn.forceKeepAttr=void 0,Kr("uponSanitizeAttribute",U,Fn),ne=Fn.attrValue,Fn.forceKeepAttr||(hd(en,U),!Fn.keepAttr))continue;if(!he&&Wn(/\/>/i,ne)){hd(en,U);continue}ae&&(ne=gr(ne,N," "),ne=gr(ne,F," "),ne=gr(ne,P," "));let Qh=rt(U.nodeName);if(Vh(Qh,Xe,ne)){if(me&&(Xe==="id"||Xe==="name")&&(hd(en,U),ne=Et+ne),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ao)switch(m.getAttributeType(Qh,Xe)){case"TrustedHTML":{ne=w.createHTML(ne);break}case"TrustedScriptURL":{ne=w.createScriptURL(ne);break}}try{ao?U.setAttributeNS(ao,en,ne):U.setAttribute(en,ne),O3(t.removed)}catch{}}}Kr("afterSanitizeAttributes",U,null)},KS=function U(ge){let ne,Xe=Kh(ge);for(Kr("beforeSanitizeShadowDOM",ge,null);ne=Xe.nextNode();)Kr("uponSanitizeShadowNode",ne,null),!Gh(ne)&&(ne.content instanceof i&&U(ne.content),Yh(ne));Kr("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Xe,Vt,Cn;if(jr=!U,jr&&(U=""),typeof U!="string"&&!il(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw Ns("dirty is not a string, aborting")}else throw Ns("toString is not a function");if(!t.isSupported)return U;if(Se||md(ge),t.removed=[],typeof U=="string"&&(kt=!1),kt){if(U.nodeName){let ao=rt(U.nodeName);if(!_[ao]||V[ao])throw Ns("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Wh(""),Xe=ne.ownerDocument.importNode(U,!0),Xe.nodeType===1&&Xe.nodeName==="BODY"||Xe.nodeName==="HTML"?ne=Xe:ne.appendChild(Xe);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return w&&We?w.createHTML(U):U;if(ne=Wh(U),!ne)return ue?null:We?L:""}ne&&se&&ro(ne.firstChild);let Fn=Kh(kt?U:ne);for(;Vt=Fn.nextNode();)Gh(Vt)||(Vt.content instanceof i&&KS(Vt.content),Yh(Vt));if(kt)return U;if(ue){if(ke)for(Cn=v.call(ne.ownerDocument);ne.firstChild;)Cn.appendChild(ne.firstChild);else Cn=ne;return(H.shadowroot||H.shadowrootmod)&&(Cn=D.call(n,Cn,!0)),Cn}let en=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Wn(K3,ne.ownerDocument.doctype.name)&&(en=" +`+en),ae&&(en=gr(en,N," "),en=gr(en,F," "),en=gr(en,P," ")),w&&We?w.createHTML(en):en},t.setConfig=function(U){md(U),Se=!0},t.clearConfig=function(){jn=null,Se=!1},t.isValidAttribute=function(U,ge,ne){jn||md({});let Xe=rt(U),Vt=rt(ge);return Vh(Xe,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(S[U]=S[U]||[],zs(S[U],ge))},t.removeHook=function(U){if(S[U])return O3(S[U])},t.removeHooks=function(U){S[U]&&(S[U]=[])},t.removeAllHooks=function(){S={}},t}var at=G3();p();p();var Gw=Object.create,Dg=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,$w=Object.getOwnPropertyNames,Yw=Object.getPrototypeOf,Qw=Object.prototype.hasOwnProperty,Ag=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zw=(e,t)=>{for(var n in t)Dg(e,n,{get:t[n],enumerable:!0})},wg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $w(t))!Qw.call(e,a)&&a!==n&&Dg(e,a,{get:()=>t[a],enumerable:!(r=Vw(t,a))||r.enumerable});return e},Jw=(e,t,n)=>(wg(e,t,"default"),n&&wg(n,t,"default")),$3=(e,t,n)=>(n=e!=null?Gw(Yw(e)):{},wg(t||!e||!e.__esModule?Dg(n,"default",{value:e,enumerable:!0}):n,e)),Xw=Ag((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var f=this._doc.createElement("span");l.firstChild;)f.appendChild(l.firstChild);l.parentNode.replaceChild(f,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),f=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),g&&l.setAttribute("poster",o(g)),f){var m=f.replace(this.REGEXPS.srcsetUrl,function(h,y,T,b){return o(y)+(T||"")+b});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var f=s(a);return f<=4&&(!o||f!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,f=l.firstChild;f;){var m=f.nextSibling;if(this._isPhrasingContent(f))g!==null?g.appendChild(f):this._isWhitespace(f)||(g=a.createElement("p"),l.replaceChild(g,f),g.appendChild(f));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}f=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var ke=this._getInnerText(ue);if(!(ke.length<25)){var We=this._getNodeAncestors(ue,5);if(We.length!==0){var Re=0;Re+=1,Re+=ke.split(",").length,Re+=Math.min(Math.floor(ke.length/100),3),this._forEachNode(We,function(me,Et){if(!(!me.tagName||!me.parentNode||typeof me.parentNode.tagName>"u")){if(typeof me.readability>"u"&&(this._initializeNode(me),y.push(me)),Et===0)var Gt=1;else Et===1?Gt=2:Gt=Et*3;me.readability.contentScore+=Re/Gt}})}}}});for(var T=[],b=0,x=y.length;bC.readability.contentScore){T.splice(M,0,w),T.length>this._nbTopCandidates&&T.pop();break}}}var v=T[0]||null,A=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),A=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var S=[],N=1;N=.75&&S.push(this._getNodeAncestors(T[N]));var F=3;if(S.length>=F)for(D=v.parentNode;D.tagName!=="BODY";){for(var P=0,O=0;O=F){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var z=v.readability.contentScore,q=z/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var I=D.readability.contentScore;if(Iz){v=D;break}z=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");i&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var B=D.children,H=0,j=B.length;H=_)V=!0;else if(G.nodeName==="P"){var te=this._getLinkDensity(G),J=this._getInnerText(G),ce=J.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",G),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)===-1&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),k.appendChild(G),B=D.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),A)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(f){return(f["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(f){return f&&typeof f.name=="string"}).map(function(f){return f.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(f){this.log(f.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),f=l.getAttribute("content");if(f){var m=null,h=null;g&&(m=g.match(s),m&&(h=m[0].toLowerCase().replace(/\s/g,""),i[h]=f.trim())),!m&&c&&u.test(c)&&(h=c,f&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[h]=f.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],f=function(h){return!!o.getElementsByTagName(h)[0]};if(g.some(f)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var g=0;if(c+g<0)return!0;if(this._getCharCount(i,",")<10){for(var f=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,h=i.getElementsByTagName("li").length-100,y=i.getElementsByTagName("input").length,T=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(i,["object","embed","iframe"]),w=0;w1&&f/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&h>f||y>Math.floor(f/3)||!s&&T<.9&&C<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&M>.2||c>=25&&M>.5||b===1&&C<75||b>1;if(s&&v){for(var A=0;A1)return v;let D=i.getElementsByTagName("li").length;if(m==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),e5=Ag((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(f){c.add(f.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(f){if(!o.visibilityChecker(f))return!1;var m=f.className+" "+f.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||f.matches("li p"))return!1;var h=f.textContent.trim().length;return ho.minScore)})}typeof t=="object"&&(t.exports=a)}),Y3=Ag((e,t)=>{var n=Xw(),r=e5();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Zw(Q3,{Readability:()=>Bl,default:()=>X3,isProbablyReaderable:()=>J3});var Z3=$3(Y3());Jw(Q3,$3(Y3()));var{Readability:Bl,isProbablyReaderable:J3}=Z3,{default:V3,...t5}=Z3,X3=V3!==void 0?V3:t5;var wi={};ol(wi,{Breadcrumbs:()=>Da,BrowserClient:()=>xo,Dedupe:()=>La,FunctionToString:()=>Ci,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,Hub:()=>ra,InboundFilters:()=>xi,Integrations:()=>I8,LinkedErrors:()=>ka,SDK_VERSION:()=>Co,Scope:()=>Xn,TryCatch:()=>Aa,addBreadcrumb:()=>Gl,addGlobalEventProcessor:()=>_r,captureEvent:()=>Wl,captureException:()=>vo,captureMessage:()=>Hl,chromeStackLineParser:()=>ip,close:()=>db,configureScope:()=>Kl,createTransport:()=>Js,defaultIntegrations:()=>gp,defaultStackLineParsers:()=>up,defaultStackParser:()=>ac,flush:()=>cb,forceLoad:()=>ub,geckoStackLineParser:()=>op,getCurrentHub:()=>Ie,getHubFromCarrier:()=>er,init:()=>ib,lastEventId:()=>sb,makeFetchTransport:()=>Xs,makeMain:()=>To,onLoad:()=>lb,opera10StackLineParser:()=>K2,opera11StackLineParser:()=>G2,setContext:()=>Vl,setExtra:()=>Yl,setExtras:()=>$l,setTag:()=>Zl,setTags:()=>Ql,setUser:()=>Jl,showReportDialog:()=>ob,startTransaction:()=>Xl,winjsStackLineParser:()=>sp,withScope:()=>So,wrap:()=>gb});p();p();p();p();p();p();p();p();p();var e2=Object.prototype.toString;function Il(e){switch(e2.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return kr(e,Error)}}function Us(e,t){return e2.call(e)===`[object ${t}]`}function Rl(e){return Us(e,"ErrorEvent")}function t2(e){return Us(e,"DOMException")}function Jr(e){return Us(e,"String")}function qs(e){return e===null||typeof e!="object"&&typeof e!="function"}function mr(e){return Us(e,"Object")}function js(e){return typeof Event<"u"&&kr(e,Event)}function n2(e){return!1}function r2(e){return Us(e,"RegExp")}function fo(e){return!!(e&&e.then&&typeof e.then=="function")}function a2(e){return mr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function i2(e){return typeof e=="number"&&e!==e}function kr(e,t){try{return e instanceof t}catch{return!1}}function Hs(e,t){try{let n=e,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function n5(e,t){let n=e,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Jr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let g=l.match(/^\d+/);g&&(l=g[0])}return s2({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function s2(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function o5(e){if(!!1)return;let{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!e[i])throw new Pt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Pt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!a5(r))throw new Pt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Pt(`Invalid Sentry Dsn: Invalid port ${t}`);return!0}function Ol(e){let t=typeof e=="string"?i5(e):s2(e);return o5(t),t}p();var s5={};function ft(){return typeof window<"u"?window:typeof self<"u"?self:s5}function ho(e,t,n){let r=n||ft(),a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}p();p();var Ws=["debug","info","warn","error","log","assert","trace"];function kg(e){if(!("console"in ft()))return e();let n=console,r={};Ws.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function u2(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Ws.forEach(n=>{t[n]=(...r)=>{e&&kg(()=>{})}}):Ws.forEach(n=>{t[n]=()=>{}}),t}var Ee;!1?Ee=ho("logger",u2):Ee=u2();p();p();function Ti(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Pg(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Mg(e){if(Il(e))return{message:e.message,name:e.name,stack:e.stack,...c2(e)};if(js(e)){let t={type:e.type,target:l2(e.target),currentTarget:l2(e.currentTarget),...c2(e)};return typeof CustomEvent<"u"&&kr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function l2(e){try{return n2(e)?Hs(e):Object.prototype.toString.call(e)}catch{return""}}function c2(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function g2(e,t=40){let n=Object.keys(Mg(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Ti(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:Ti(a,t)}return""}function vi(e){return Lg(e,new Map)}function Lg(e,t){if(mr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=Lg(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(Lg(a,t))}),r}return e}p();var u5=50;function Bg(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of t){let s=o(i);if(s){a.push(s);break}}return l5(a)}}function p2(e){return Array.isArray(e)?Bg(...e):e}function l5(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,u5).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Fg="";function hr(e){try{return!e||typeof e!="function"?Fg:e.name||Fg}catch{return Fg}}p();function m2(){if(!("fetch"in ft()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function f2(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function h2(){return!0}var Xr=ft(),Gs={},b2={};function c5(e){if(!b2[e])switch(b2[e]=!0,e){case"console":d5();break;case"fetch":g5();break;case"error":f5();break;case"unhandledrejection":h5();break;default:!1&&Ee.warn("unknown instrumentation type:",e);return}}function br(e,t){Gs[e]=Gs[e]||[],Gs[e].push(t),c5(e)}function yo(e,t){if(!(!e||!Gs[e]))for(let n of Gs[e]||[])try{n(t)}catch(r){!1&&Ee.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${hr(n)} -Error:`,r)}}function d5(){"console"in Xr&&Hs.forEach(function(e){e in console&&fr(console,e,function(t){return function(...n){yo("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function g5(){h2()&&fr(Xr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:p5(t),url:m5(t)},startTimestamp:Date.now()};return yo("fetch",{...n}),e.apply(Xr,t).then(r=>(yo("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yo("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function p5(e=[]){return"Request"in Xr&&kr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function m5(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Xr&&kr(e[0],Request)?e[0].url:String(e[0])}var Rg=null;function f5(){Rg=Xr.onerror,Xr.onerror=function(e,t,n,r,a){return yo("error",{column:r,error:a,line:n,msg:e,url:t}),Rg?Rg.apply(this,arguments):!1}}var Og=null;function h5(){Og=Xr.onunhandledrejection,Xr.onunhandledrejection=function(e){return yo("unhandledrejection",e),Og?Og.apply(this,arguments):!0}}p();function y2(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function Nl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function T2(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ta(e){let{message:t,event_id:n}=e;if(t)return t;let r=T2(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Gs(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ea(e,t){let n=T2(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let i={...a&&a.data,...t.data};n.mechanism.data=i}}function zg(e){if(e&&e.__sentry_captured__)return!0;try{Ws(e,"__sentry_captured__",!0)}catch{}return!1}p();function v2(){return!1}p();function na(e,t=1/0,n=1/0){try{return Ng("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ug(e,t=3,n=100*1024){let r=na(e,t);return T5(r)>n?Ug(e,t-1,n):r}function Ng(e,t,n=1/0,r=1/0,a=y2()){let[i,o]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!i2(t))return t;let s=b5(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return Ng("",f,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Fg(t);for(let f in g){if(!Object.prototype.hasOwnProperty.call(g,f))continue;if(c>=r){l[f]="[MaxProperties ~]";break}let m=g[f];l[f]=Ng(f,m,n-1,r,a),c+=1}return o(t),l}function b5(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":a2(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${hr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function y5(e){return~-encodeURI(e).split(/%..|./).length}function T5(e){return y5(JSON.stringify(e))}p();p();p();function Bn(e){return new Pr(t=>{t(e)})}function Vs(e){return new Pr((t,n)=>{n(e)})}var Pr=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,t&&t()},o=>{i=!0,a=o,t&&t()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(fo(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function S2(e){let t=[];function n(){return e===void 0||t.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new Pr((s,u)=>{let l=t.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(g=>{Bn(g).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:i}}p();p();var v5=["fatal","error","warning","log","info","debug"];function C2(e){return e==="warn"?"warning":v5.includes(e)?e:"log"}p();var jg={nowSeconds:()=>Date.now()/1e3};function S5(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var qg=S5(),x2=qg===void 0?jg:{nowSeconds:()=>(qg.timeOrigin+qg.now())/1e3},wa=jg.nowSeconds.bind(jg),Hg=x2.nowSeconds.bind(x2);var Ul,sO=(()=>{if(!performance||!performance.now){Ul="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r{let a=r[0].type;t(r,a)})}function Wg(e,t){return(t||new TextEncoder).encode(e)}function ql(e,t){let[n,r]=e,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[Wg(a,t),o]:a.push(typeof o=="string"?Wg(o,t):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function d5(){"console"in Xr&&Ws.forEach(function(e){e in console&&fr(console,e,function(t){return function(...n){yo("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function g5(){h2()&&fr(Xr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:p5(t),url:m5(t)},startTimestamp:Date.now()};return yo("fetch",{...n}),e.apply(Xr,t).then(r=>(yo("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yo("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function p5(e=[]){return"Request"in Xr&&kr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function m5(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Xr&&kr(e[0],Request)?e[0].url:String(e[0])}var Ig=null;function f5(){Ig=Xr.onerror,Xr.onerror=function(e,t,n,r,a){return yo("error",{column:r,error:a,line:n,msg:e,url:t}),Ig?Ig.apply(this,arguments):!1}}var Rg=null;function h5(){Rg=Xr.onunhandledrejection,Xr.onunhandledrejection=function(e){return yo("unhandledrejection",e),Rg?Rg.apply(this,arguments):!0}}p();function y2(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function Nl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function T2(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ta(e){let{message:t,event_id:n}=e;if(t)return t;let r=T2(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Vs(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ea(e,t){let n=T2(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let i={...a&&a.data,...t.data};n.mechanism.data=i}}function Og(e){if(e&&e.__sentry_captured__)return!0;try{Ks(e,"__sentry_captured__",!0)}catch{}return!1}p();function v2(){return!1}p();function na(e,t=1/0,n=1/0){try{return zg("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ng(e,t=3,n=100*1024){let r=na(e,t);return T5(r)>n?Ng(e,t-1,n):r}function zg(e,t,n=1/0,r=1/0,a=y2()){let[i,o]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!i2(t))return t;let s=b5(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return zg("",f,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Mg(t);for(let f in g){if(!Object.prototype.hasOwnProperty.call(g,f))continue;if(c>=r){l[f]="[MaxProperties ~]";break}let m=g[f];l[f]=zg(f,m,n-1,r,a),c+=1}return o(t),l}function b5(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":a2(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${hr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function y5(e){return~-encodeURI(e).split(/%..|./).length}function T5(e){return y5(JSON.stringify(e))}p();p();p();function Bn(e){return new Pr(t=>{t(e)})}function $s(e){return new Pr((t,n)=>{n(e)})}var Pr=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,t&&t()},o=>{i=!0,a=o,t&&t()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(fo(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function S2(e){let t=[];function n(){return e===void 0||t.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new Pr((s,u)=>{let l=t.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(g=>{Bn(g).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:i}}p();p();var v5=["fatal","error","warning","log","info","debug"];function C2(e){return e==="warn"?"warning":v5.includes(e)?e:"log"}p();var qg={nowSeconds:()=>Date.now()/1e3};function S5(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var Ug=S5(),x2=Ug===void 0?qg:{nowSeconds:()=>(Ug.timeOrigin+Ug.now())/1e3},wa=qg.nowSeconds.bind(qg),jg=x2.nowSeconds.bind(x2);var Ul,sO=(()=>{if(!performance||!performance.now){Ul="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r{let a=r[0].type;t(r,a)})}function Hg(e,t){return(t||new TextEncoder).encode(e)}function ql(e,t){let[n,r]=e,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[Hg(a,t),o]:a.push(typeof o=="string"?Hg(o,t):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:C5(a)}function C5(e){let t=e.reduce((a,i)=>a+i.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function w2(e,t){let n=typeof e.data=="string"?Wg(e.data,t):e.data;return[vi({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var x5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Gg(e){return x5[e]}p();function D2(e,t,n){let r=[{type:"client_report"},{timestamp:n||wa(),discarded_events:e}];return Si(t?{dsn:t}:{},[r])}p();var E5=60*1e3;function w5(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?E5:r-t}function D5(e,t){return e[t]||e.all||0}function A2(e,t,n=Date.now()){return D5(e,t)>n}function k2(e,{statusCode:t,headers:n},r=Date.now()){let a={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),g=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+g;else for(let f of l.split(";"))a[f]=r+g}else o?a.all=r+w5(o,r):t===429&&(a.all=r+60*1e3);return a}p();function P2(e){return e[0]}p();function Vg(e){let t=Hg(),n={sid:ea(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>A5(n)};return e&&Lr(n,e),n}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Hg(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ea()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function $g(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Lr(e,n)}function A5(e){return vi({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var L2=100,Xn=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Lr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):mr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,L2):L2;if(r<=0)return this;let a={timestamp:wa(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([..._2(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new Pr((i,o)=>{let s=t[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Ee.log(`Event processor "${s.id}" dropped event`),fo(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(t,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function _2(){return ho("globalEventProcessors",()=>[])}function _r(e){_2().push(e)}p();p();var Yg=4,k5=100,ra=class{constructor(t,n=new Xn,r=Yg){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:ea(),i=new Error(t);return this._withClient((o,s)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:ea();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=k5}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:wa(),...t},l=i?Pg(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=To(this);try{t(this)}finally{To(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&$g(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=mt(),{userAgent:s}=o.navigator||{},u=Vg({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Lr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=$s().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Ee.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function $s(){let e=mt();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function To(e){let t=$s(),n=er(t);return jl(t,e),n}function Ie(){let e=$s();return(!M2(e)||er(e).isOlderThan(Yg))&&jl(e,new ra),v2()?P5(e):er(e)}function P5(e){try{let t=$s().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return er(e);if(!M2(n)||er(n).isOlderThan(Yg)){let r=er(e).getStackTop();jl(n,new ra(r.client,Xn.clone(r.scope)))}return er(n)}catch{return er(e)}}function M2(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function er(e){return ho("hub",()=>new ra,e)}function jl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}p();function vo(e,t){return Ie().captureException(e,{captureContext:t})}function Hl(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ie().captureMessage(e,n,r)}function Wl(e,t){return Ie().captureEvent(e,t)}function Kl(e){Ie().configureScope(e)}function Gl(e){Ie().addBreadcrumb(e)}function Vl(e,t){Ie().setContext(e,t)}function $l(e){Ie().setExtras(e)}function Yl(e,t){Ie().setExtra(e,t)}function Ql(e){Ie().setTags(e)}function Zl(e,t){Ie().setTag(e,t)}function Jl(e){Ie().setUser(e)}function So(e){Ie().withScope(e)}function Xl(e,t){return Ie().startTransaction({metadata:{source:"custom"},...e},t)}p();var L5="7";function F2(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function _5(e){return`${F2(e)}${e.projectId}/envelope/`}function M5(e,t){return d2({sentry_key:e.publicKey,sentry_version:L5,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ys(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${_5(e)}?${M5(e,r)}`}function Qg(e,t){let n=Ol(e),r=`${F2(n)}embed/error-page/`,a=`dsn=${yi(n)}`;for(let i in t)if(i!=="dsn")if(i==="user"){let o=t.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${a}`}p();p();function B2(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function F5(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function I2(e,t,n,r){let a=B2(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:yi(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return Si(i,[o])}function R2(e,t,n,r){let a=B2(n),i=e.type||"event",{transactionSampling:o}=e.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};F5(e,n&&n.sdk);let l=B5(e,a,r,t);return delete e.sdkProcessingMetadata,Si(l,[[{type:i,sample_rates:[{id:s,rate:u}]},e]])}function B5(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,i=a&&P2(a);return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:yi(r)},...e.type==="transaction"&&i&&{trace:vi({...i})}}}p();var O2=[];function z2(e){return e.reduce((t,n)=>(t.every(r=>n.name!==r.name)&&t.push(n),t),[])}function Zg(e){let t=e.defaultIntegrations&&[...e.defaultIntegrations]||[],n=e.integrations,r=[...z2(t)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...z2(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function N2(e){let t={};return e.forEach(n=>{t[n.name]=n,O2.indexOf(n.name)===-1&&(n.setupOnce(_r,Ie),O2.push(n.name),!1&&Ee.log(`Integration installed: ${n.name}`))}),t}var U2="Not capturing exception because it's already been captured.",Qs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(t){if(this._options=t,t.dsn){this._dsn=Ol(t.dsn);let n=Ys(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}else!1&&Ee.warn("No DSN provided, client will not do anything.")}captureException(t,n,r){if(zg(t)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(t,n,r,a){let i=r&&r.event_id,o=Us(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(t,n,r){if(n&&n.originalException&&zg(n.originalException)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{a=i})),a}captureSession(t){if(!this._isEnabled()){!1&&Ee.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?!1&&Ee.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Lr(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(t){let n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(a=>r&&a)):Bn(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=N2(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}sendEvent(t,n={}){if(this._dsn){let r=R2(t,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=E2(r,w2(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(t){if(this._dsn){let n=I2(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(t,n){if(this._options.sendClientReports){let r=`${t}:${n}`;!1&&Ee.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(t,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Lr(t,{...r&&{status:"crashed"},errors:t.errors||Number(a||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,t&&r>=t&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...t,event_id:t.event_id||n.event_id||ea(),timestamp:t.timestamp||wa()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Xn.clone(s).update(n.captureContext));let u=Bn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(t,n,r){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:na(i.data,n,r)}}))},...t.user&&{user:na(t.user,n,r)},...t.contexts&&{contexts:na(t.contexts,n,r)},...t.extra&&{extra:na(t.extra,n,r)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=na(t.contexts.trace.data,n,r))),t.spans&&(a.spans=t.spans.map(i=>(i.data&&(i.data=na(i.data,n,r)),i))),a}_applyClientOptions(t){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in t||(t.environment="environment"in n?r:"production"),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Ti(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Ti(s.value,o));let u=t.request;u&&u.url&&(u.url=Ti(u.url,o))}_applyIntegrationsMetadata(t){let n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(a=>a.event_id,a=>{!1&&Ee.warn(a)})}_processEvent(t,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Vs(new Pt("SDK not enabled, will not capture event."));let o=t.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),Vs(new Pt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(t,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",t.type||"error"),new Pt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return I5(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",t.type||"error"),new Pt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Pt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(t){this._numProcessing+=1,t.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(t){this._transport&&this._dsn?this._transport.send(t).then(null,n=>{!1&&Ee.error("Error while sending event:",n)}):!1&&Ee.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:t[n]}})}};function I5(e){let t="`beforeSend` method has to return `null` or a valid event.";if(fo(e))return e.then(n=>{if(!(mr(n)||n===null))throw new Pt(t);return n},n=>{throw new Pt(`beforeSend rejected with ${n}`)});if(!(mr(e)||e===null))throw new Pt(t);return e}p();function Jg(e,t){t.debug===!0&&!1&&Ee.enable();let n=Ie(),r=n.getScope();r&&r.update(t.initialScope);let a=new e(t);n.bindClient(a)}p();var R5=30;function Zs(e,t,n=S2(e.bufferSize||R5)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(Kg(o,(g,f)=>{let m=Gg(f);A2(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):s.push(g)}),s.length===0)return Bn();let u=Si(o[0],s),l=g=>{Kg(u,(f,m)=>{e.recordDroppedEvent(g,Gg(m))})},c=()=>t({body:ql(u,e.textEncoder)}).then(g=>{g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&!1&&Ee.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),r=k2(r,g)},g=>{!1&&Ee.error("Failed while sending event:",g),l("network_error")});return n.add(c).then(g=>g,g=>{if(g instanceof Pt)return!1&&Ee.error("Skipped sending event due to full buffer"),l("queue_overflow"),Bn();throw g})}return{send:i,flush:a}}p();var Co="7.7.0";var Ei={};ol(Ei,{FunctionToString:()=>Ci,InboundFilters:()=>xi});p();p();var q2,Ci=class e{static id="FunctionToString";name=e.id;setupOnce(){q2=Function.prototype.toString,Function.prototype.toString=function(...t){let n=bo(this)||this;return q2.apply(n,t)}}};p();var O5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],xi=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(e);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=z5(o._options,u);return N5(a,l)?null:a}}return a};r.id=this.name,t(r)}};function z5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...O5],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function N5(e,t){return t.ignoreInternal&&W5(e)?(!1&&Ee.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:C5(a)}function C5(e){let t=e.reduce((a,i)=>a+i.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function w2(e,t){let n=typeof e.data=="string"?Hg(e.data,t):e.data;return[vi({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var x5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Kg(e){return x5[e]}p();function D2(e,t,n){let r=[{type:"client_report"},{timestamp:n||wa(),discarded_events:e}];return Si(t?{dsn:t}:{},[r])}p();var E5=60*1e3;function w5(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?E5:r-t}function D5(e,t){return e[t]||e.all||0}function A2(e,t,n=Date.now()){return D5(e,t)>n}function k2(e,{statusCode:t,headers:n},r=Date.now()){let a={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),g=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+g;else for(let f of l.split(";"))a[f]=r+g}else o?a.all=r+w5(o,r):t===429&&(a.all=r+60*1e3);return a}p();function P2(e){return e[0]}p();function Gg(e){let t=jg(),n={sid:ea(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>A5(n)};return e&&Lr(n,e),n}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||jg(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ea()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vg(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Lr(e,n)}function A5(e){return vi({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var L2=100,Xn=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Lr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):mr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,L2):L2;if(r<=0)return this;let a={timestamp:wa(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([..._2(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new Pr((i,o)=>{let s=t[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Ee.log(`Event processor "${s.id}" dropped event`),fo(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(t,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function _2(){return ho("globalEventProcessors",()=>[])}function _r(e){_2().push(e)}p();p();var $g=4,k5=100,ra=class{constructor(t,n=new Xn,r=$g){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:ea(),i=new Error(t);return this._withClient((o,s)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:ea();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=k5}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:wa(),...t},l=i?kg(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=To(this);try{t(this)}finally{To(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&Vg(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=ft(),{userAgent:s}=o.navigator||{},u=Gg({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Lr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Ys().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Ee.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Ys(){let e=ft();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function To(e){let t=Ys(),n=er(t);return jl(t,e),n}function Ie(){let e=Ys();return(!M2(e)||er(e).isOlderThan($g))&&jl(e,new ra),v2()?P5(e):er(e)}function P5(e){try{let t=Ys().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return er(e);if(!M2(n)||er(n).isOlderThan($g)){let r=er(e).getStackTop();jl(n,new ra(r.client,Xn.clone(r.scope)))}return er(n)}catch{return er(e)}}function M2(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function er(e){return ho("hub",()=>new ra,e)}function jl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}p();function vo(e,t){return Ie().captureException(e,{captureContext:t})}function Hl(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ie().captureMessage(e,n,r)}function Wl(e,t){return Ie().captureEvent(e,t)}function Kl(e){Ie().configureScope(e)}function Gl(e){Ie().addBreadcrumb(e)}function Vl(e,t){Ie().setContext(e,t)}function $l(e){Ie().setExtras(e)}function Yl(e,t){Ie().setExtra(e,t)}function Ql(e){Ie().setTags(e)}function Zl(e,t){Ie().setTag(e,t)}function Jl(e){Ie().setUser(e)}function So(e){Ie().withScope(e)}function Xl(e,t){return Ie().startTransaction({metadata:{source:"custom"},...e},t)}p();var L5="7";function F2(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function _5(e){return`${F2(e)}${e.projectId}/envelope/`}function M5(e,t){return d2({sentry_key:e.publicKey,sentry_version:L5,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Qs(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${_5(e)}?${M5(e,r)}`}function Yg(e,t){let n=Ol(e),r=`${F2(n)}embed/error-page/`,a=`dsn=${yi(n)}`;for(let i in t)if(i!=="dsn")if(i==="user"){let o=t.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${a}`}p();p();function B2(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function F5(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function I2(e,t,n,r){let a=B2(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:yi(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return Si(i,[o])}function R2(e,t,n,r){let a=B2(n),i=e.type||"event",{transactionSampling:o}=e.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};F5(e,n&&n.sdk);let l=B5(e,a,r,t);return delete e.sdkProcessingMetadata,Si(l,[[{type:i,sample_rates:[{id:s,rate:u}]},e]])}function B5(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,i=a&&P2(a);return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:yi(r)},...e.type==="transaction"&&i&&{trace:vi({...i})}}}p();var O2=[];function z2(e){return e.reduce((t,n)=>(t.every(r=>n.name!==r.name)&&t.push(n),t),[])}function Qg(e){let t=e.defaultIntegrations&&[...e.defaultIntegrations]||[],n=e.integrations,r=[...z2(t)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...z2(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function N2(e){let t={};return e.forEach(n=>{t[n.name]=n,O2.indexOf(n.name)===-1&&(n.setupOnce(_r,Ie),O2.push(n.name),!1&&Ee.log(`Integration installed: ${n.name}`))}),t}var U2="Not capturing exception because it's already been captured.",Zs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(t){if(this._options=t,t.dsn){this._dsn=Ol(t.dsn);let n=Qs(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}else!1&&Ee.warn("No DSN provided, client will not do anything.")}captureException(t,n,r){if(Og(t)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(t,n,r,a){let i=r&&r.event_id,o=qs(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(t,n,r){if(n&&n.originalException&&Og(n.originalException)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{a=i})),a}captureSession(t){if(!this._isEnabled()){!1&&Ee.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?!1&&Ee.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Lr(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(t){let n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(a=>r&&a)):Bn(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=N2(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}sendEvent(t,n={}){if(this._dsn){let r=R2(t,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=E2(r,w2(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(t){if(this._dsn){let n=I2(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(t,n){if(this._options.sendClientReports){let r=`${t}:${n}`;!1&&Ee.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(t,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Lr(t,{...r&&{status:"crashed"},errors:t.errors||Number(a||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,t&&r>=t&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...t,event_id:t.event_id||n.event_id||ea(),timestamp:t.timestamp||wa()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Xn.clone(s).update(n.captureContext));let u=Bn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(t,n,r){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:na(i.data,n,r)}}))},...t.user&&{user:na(t.user,n,r)},...t.contexts&&{contexts:na(t.contexts,n,r)},...t.extra&&{extra:na(t.extra,n,r)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=na(t.contexts.trace.data,n,r))),t.spans&&(a.spans=t.spans.map(i=>(i.data&&(i.data=na(i.data,n,r)),i))),a}_applyClientOptions(t){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in t||(t.environment="environment"in n?r:"production"),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Ti(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Ti(s.value,o));let u=t.request;u&&u.url&&(u.url=Ti(u.url,o))}_applyIntegrationsMetadata(t){let n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(a=>a.event_id,a=>{!1&&Ee.warn(a)})}_processEvent(t,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return $s(new Pt("SDK not enabled, will not capture event."));let o=t.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),$s(new Pt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(t,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",t.type||"error"),new Pt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return I5(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",t.type||"error"),new Pt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Pt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(t){this._numProcessing+=1,t.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(t){this._transport&&this._dsn?this._transport.send(t).then(null,n=>{!1&&Ee.error("Error while sending event:",n)}):!1&&Ee.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:t[n]}})}};function I5(e){let t="`beforeSend` method has to return `null` or a valid event.";if(fo(e))return e.then(n=>{if(!(mr(n)||n===null))throw new Pt(t);return n},n=>{throw new Pt(`beforeSend rejected with ${n}`)});if(!(mr(e)||e===null))throw new Pt(t);return e}p();function Zg(e,t){t.debug===!0&&!1&&Ee.enable();let n=Ie(),r=n.getScope();r&&r.update(t.initialScope);let a=new e(t);n.bindClient(a)}p();var R5=30;function Js(e,t,n=S2(e.bufferSize||R5)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(Wg(o,(g,f)=>{let m=Kg(f);A2(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):s.push(g)}),s.length===0)return Bn();let u=Si(o[0],s),l=g=>{Wg(u,(f,m)=>{e.recordDroppedEvent(g,Kg(m))})},c=()=>t({body:ql(u,e.textEncoder)}).then(g=>{g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&!1&&Ee.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),r=k2(r,g)},g=>{!1&&Ee.error("Failed while sending event:",g),l("network_error")});return n.add(c).then(g=>g,g=>{if(g instanceof Pt)return!1&&Ee.error("Skipped sending event due to full buffer"),l("queue_overflow"),Bn();throw g})}return{send:i,flush:a}}p();var Co="7.7.0";var Ei={};ol(Ei,{FunctionToString:()=>Ci,InboundFilters:()=>xi});p();p();var q2,Ci=class e{static id="FunctionToString";name=e.id;setupOnce(){q2=Function.prototype.toString,Function.prototype.toString=function(...t){let n=bo(this)||this;return q2.apply(n,t)}}};p();var O5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],xi=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(e);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=z5(o._options,u);return N5(a,l)?null:a}}return a};r.id=this.name,t(r)}};function z5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...O5],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function N5(e,t){return t.ignoreInternal&&W5(e)?(!1&&Ee.warn(`Event dropped due to being internal Sentry Error. Event: ${ta(e)}`),!0):U5(e,t.ignoreErrors)?(!1&&Ee.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${ta(e)}`),!0):q5(e,t.denyUrls)?(!1&&Ee.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${ta(e)}. Url: ${ec(e)}`),!0):j5(e,t.allowUrls)?!1:(!1&&Ee.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${ta(e)}. -Url: ${ec(e)}`),!0)}function U5(e,t){return!t||!t.length?!1:H5(e).some(n=>t.some(r=>zl(n,r)))}function q5(e,t){if(!t||!t.length)return!1;let n=ec(e);return n?t.some(r=>zl(n,r)):!1}function j5(e,t){if(!t||!t.length)return!0;let n=ec(e);return n?t.some(r=>zl(n,r)):!0}function H5(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Ee.error(`Cannot extract message for event ${ta(e)}`),[]}return[]}function W5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function K5(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ec(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?K5(t):null}catch{return!1&&Ee.error(`Cannot extract url for event ${ta(e)}`),null}}p();p();function tp(e,t){let n=np(e,t),r={type:t&&t.name,value:Y5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function G5(e,t,n,r){let a={exception:{values:[{type:qs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${g2(t)}`}]},extra:{__serialized__:Ug(t)}};if(n){let i=np(e,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function Xg(e,t){return{exception:{values:[tp(e,t)]}}}function np(e,t){let n=t.stacktrace||t.stack||"",r=$5(t);try{return e(n,r)}catch{}return[]}var V5=/Minified React error #\d+;/i;function $5(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(V5.test(e.message))return 1}return 0}function Y5(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function j2(e,t,n,r){let a=n&&n.syntheticException||void 0,i=tc(e,t,a,r);return Ea(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Bn(i)}function H2(e,t,n="info",r,a){let i=r&&r.syntheticException||void 0,o=ep(e,t,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Bn(o)}function tc(e,t,n,r,a){let i;if(Rl(t)&&t.error)return Xg(e,t.error);if(t2(t)){let o=t;if("stack"in t)i=Xg(e,t);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=ep(e,u,n,r),Gs(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Il(t)?Xg(e,t):mr(t)||qs(t)?(i=G5(e,t,n,a),Ea(i,{synthetic:!0}),i):(i=ep(e,t,n,r),Gs(i,`${t}`,void 0),Ea(i,{synthetic:!0}),i)}function ep(e,t,n,r){let a={message:t};if(r&&n){let i=np(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}p();var rp="Breadcrumbs",Da=class e{static id=rp;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&br("console",Z5),this.options.dom&&br("dom",Q5(this.options.dom)),this.options.xhr&&br("xhr",J5),this.options.fetch&&br("fetch",X5),this.options.history&&br("history",e8)}};function Q5(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?js(n.event.target,a):js(n.event,a)}catch{r=""}r.length!==0&&Ie().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Z5(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:C2(e.level),message:Lg(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Lg(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;Ie().addBreadcrumb(t,{input:e.args,level:e.level})}function J5(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};Ie().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function X5(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?Ie().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Ie().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function e8(e){let t=mt(),n=e.from,r=e.to,a=Nl(t.location.href),i=Nl(n),o=Nl(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Ie().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}p();var rc=mt(),nc;function ap(){if(nc)return nc;if(f2(fetch))return nc=fetch.bind(rc);let e=rc.document,t=fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){!1&&Ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nc=t.bind(rc)}function W2(e,t){Object.prototype.toString.call(rc&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(e,t):m2()&&ap()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Ee.error(i)})}var ip=mt(),xo=class extends Qs{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Co}],version:Co},super(t),t.sendClientReports&&ip.document&&ip.document.addEventListener("visibilitychange",()=>{ip.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return j2(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return H2(this._options.stackParser,t,n,r,this._options.attachStacktrace)}sendEvent(t,n){let r=this.getIntegrationById(rp);r&&r.options&&r.options.sentry&&Ie().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:ta(t)},{event:t}),super.sendEvent(t,n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){!1&&Ee.log("No outcomes to send");return}if(!this._dsn){!1&&Ee.log("No dsn provided, will not send outcomes");return}!1&&Ee.log("Sending outcomes:",t);let n=Ys(this._dsn,this._options),r=D2(t,this._options.tunnel&&yi(this._dsn));try{W2(n,ql(r))}catch(a){!1&&Ee.error(a)}}};p();p();function Js(e,t=ap()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:e.headers,...e.fetchOptions};return t(e.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Zs(e,n)}p();var Eo="?",t8=10,n8=20,r8=30,a8=40,i8=50;function Xs(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var o8=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s8=/\((\S*)(?::(\d+))(?::(\d+))\)/,u8=e=>{let t=o8.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=s8.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,a]=V2(t[1]||Eo,t[2]);return Xs(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},op=[r8,u8],l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d8=e=>{let t=l8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=c8.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],a=t[1]||Eo;return[a,r]=V2(a,r),Xs(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sp=[i8,d8],g8=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p8=e=>{let t=g8.exec(e);return t?Xs(t[2],t[1]||Eo,+t[3],t[4]?+t[4]:void 0):void 0},up=[a8,p8],m8=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f8=e=>{let t=m8.exec(e);return t?Xs(t[2],t[3]||Eo,+t[1]):void 0},K2=[t8,f8],h8=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,b8=e=>{let t=h8.exec(e);return t?Xs(t[5],t[3]||t[4]||Eo,+t[1],+t[2]):void 0},G2=[n8,b8],lp=[op,sp,up],ac=Ig(...lp),V2=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Eo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};p();p();var cp=0;function dp(){return cp>0}function y8(){cp+=1,setTimeout(()=>{cp-=1})}function aa(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(bo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>aa(o,t));return e.apply(this,i)}catch(i){throw y8(),So(o=>{o.addEventProcessor(s=>(t.mechanism&&(Gs(s,void 0,void 0),Ea(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),vo(i)}),i}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Mg(r,e),Ws(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var gp={};ol(gp,{Breadcrumbs:()=>Da,Dedupe:()=>La,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,LinkedErrors:()=>ka,TryCatch:()=>Aa});p();p();var Mr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:T8,onunhandledrejection:v8};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(x8(n),r(),this._installFunc[n]=void 0)}}};function T8(){br("error",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let{msg:a,url:i,line:o,column:s,error:u}=e;if(dp()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Jr(a)?C8(a,i,o,s):$2(tc(n,u||a,void 0,r,!1),i,o,s);l.level="error",Y2(t,u,l,"onerror")})}function v8(){br("unhandledrejection",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(dp()||a&&a.__sentry_own_request__)return!0;let i=Us(a)?S8(a):tc(n,a,void 0,r,!0);i.level="error",Y2(t,a,i,"onunhandledrejection")})}function S8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function C8(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Rl(e)?e.message:e,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),$2({exception:{values:[{type:o,value:i}]}},t,n,r)}function $2(e,t,n,r){let a=e.exception=e.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Jr(t)&&t.length>0?t:o2();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function x8(e){!1&&Ee.log(`Global Handler attached: ${e}`)}function Y2(e,t,n,r){Ea(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Q2(){let e=Ie(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}p();var E8=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Aa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=mt();this._options.setTimeout&&fr(t,"setTimeout",Z2),this._options.setInterval&&fr(t,"setInterval",Z2),this._options.requestAnimationFrame&&fr(t,"requestAnimationFrame",w8),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&fr(XMLHttpRequest.prototype,"send",D8);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:E8).forEach(A8)}};function Z2(e){return function(...t){let n=t[0];return t[0]=aa(n,{mechanism:{data:{function:hr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function w8(e){return function(t){return e.apply(this,[aa(t,{mechanism:{data:{function:"requestAnimationFrame",handler:hr(e)},handled:!0,type:"instrument"}})])}}function D8(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&fr(n,a,function(i){let o={mechanism:{data:{function:a,handler:hr(i)},handled:!0,type:"instrument"}},s=bo(i);return s&&(o.mechanism.data.handler=hr(s)),aa(i,o)})}),e.apply(this,t)}}function A8(e){let t=mt(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fr(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=aa(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:hr(i),target:e},handled:!0,type:"instrument"}}))}catch{}let s=aa(i,{mechanism:{data:{function:"addEventListener",handler:hr(i),target:e},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),fr(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}p();var k8="cause",P8=5,ka=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||k8,this._limit=t.limit||P8}setupOnce(){let t=Ie().getClient();t&&_r((n,r)=>{let a=Ie().getIntegration(e);return a?L8(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function L8(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!kr(a.originalException,Error))return r;let i=J2(e,n,a.originalException,t);return r.exception.values=[...i,...r.exception.values],r}function J2(e,t,n,r,a=[]){if(!kr(n[r],Error)||a.length+1>=t)return a;let i=tp(e,n[r]);return J2(e,t,n[r],r,[i,...a])}p();var X2=mt(),Pa=class e{static id="HttpContext";name=e.id;setupOnce(){_r(t=>{if(Ie().getIntegration(e)){if(!navigator&&!location&&!X2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=X2.document||{},{userAgent:a}=navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...t,request:o}}return t})}};p();var La=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let i=n().getIntegration(e);if(i){try{if(_8(a,i._previousEvent))return!1&&Ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,t(r)}};function _8(e,t){return t?!!(M8(e,t)||F8(e,t)):!1}function M8(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rb(e,t)||!nb(e,t))}function F8(e,t){let n=eb(t),r=eb(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rb(e,t)||!nb(e,t))}function nb(e,t){let n=tb(e),r=tb(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Ee.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Ie();n.captureSession&&(ab(n),br("history",({from:r,to:a})=>{r===void 0||r===a||ab(Ie())}))}var pb={},mp=mt();mp.Sentry&&mp.Sentry.Integrations&&(pb=mp.Sentry.Integrations);var I8={...pb,...Ei,...gp};var fp=kl.alert;p();p();p();function Le(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():E}var De=Le();function pe(){return De.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function mb(){return De.BETA==="1"}function pn(){return De.PROD==="1"}function tr(){return De.PROD_API==="1"}function fb(){return De.HAS_CSP_ERROR=="1"}function Ge(){if(De.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function wo(){return De.IMMERSIVE_TRANSLATE_SAFARI==="1"}function ic(){return typeof Deno<"u"}var Rq=Le().PROD==="1",Do=Le().PROD!=="1";function oc(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function eu(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}p();var hb={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${ec(e)}`),!0)}function U5(e,t){return!t||!t.length?!1:H5(e).some(n=>t.some(r=>zl(n,r)))}function q5(e,t){if(!t||!t.length)return!1;let n=ec(e);return n?t.some(r=>zl(n,r)):!1}function j5(e,t){if(!t||!t.length)return!0;let n=ec(e);return n?t.some(r=>zl(n,r)):!0}function H5(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Ee.error(`Cannot extract message for event ${ta(e)}`),[]}return[]}function W5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function K5(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ec(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?K5(t):null}catch{return!1&&Ee.error(`Cannot extract url for event ${ta(e)}`),null}}p();p();function ep(e,t){let n=tp(e,t),r={type:t&&t.name,value:Y5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function G5(e,t,n,r){let a={exception:{values:[{type:js(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${g2(t)}`}]},extra:{__serialized__:Ng(t)}};if(n){let i=tp(e,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function Jg(e,t){return{exception:{values:[ep(e,t)]}}}function tp(e,t){let n=t.stacktrace||t.stack||"",r=$5(t);try{return e(n,r)}catch{}return[]}var V5=/Minified React error #\d+;/i;function $5(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(V5.test(e.message))return 1}return 0}function Y5(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function j2(e,t,n,r){let a=n&&n.syntheticException||void 0,i=tc(e,t,a,r);return Ea(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Bn(i)}function H2(e,t,n="info",r,a){let i=r&&r.syntheticException||void 0,o=Xg(e,t,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Bn(o)}function tc(e,t,n,r,a){let i;if(Rl(t)&&t.error)return Jg(e,t.error);if(t2(t)){let o=t;if("stack"in t)i=Jg(e,t);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=Xg(e,u,n,r),Vs(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Il(t)?Jg(e,t):mr(t)||js(t)?(i=G5(e,t,n,a),Ea(i,{synthetic:!0}),i):(i=Xg(e,t,n,r),Vs(i,`${t}`,void 0),Ea(i,{synthetic:!0}),i)}function Xg(e,t,n,r){let a={message:t};if(r&&n){let i=tp(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}p();var np="Breadcrumbs",Da=class e{static id=np;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&br("console",Z5),this.options.dom&&br("dom",Q5(this.options.dom)),this.options.xhr&&br("xhr",J5),this.options.fetch&&br("fetch",X5),this.options.history&&br("history",e8)}};function Q5(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Hs(n.event.target,a):Hs(n.event,a)}catch{r=""}r.length!==0&&Ie().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Z5(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:C2(e.level),message:Pg(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Pg(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;Ie().addBreadcrumb(t,{input:e.args,level:e.level})}function J5(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};Ie().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function X5(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?Ie().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Ie().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function e8(e){let t=ft(),n=e.from,r=e.to,a=Nl(t.location.href),i=Nl(n),o=Nl(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Ie().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}p();var rc=ft(),nc;function rp(){if(nc)return nc;if(f2(fetch))return nc=fetch.bind(rc);let e=rc.document,t=fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){!1&&Ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nc=t.bind(rc)}function W2(e,t){Object.prototype.toString.call(rc&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(e,t):m2()&&rp()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Ee.error(i)})}var ap=ft(),xo=class extends Zs{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Co}],version:Co},super(t),t.sendClientReports&&ap.document&&ap.document.addEventListener("visibilitychange",()=>{ap.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return j2(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return H2(this._options.stackParser,t,n,r,this._options.attachStacktrace)}sendEvent(t,n){let r=this.getIntegrationById(np);r&&r.options&&r.options.sentry&&Ie().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:ta(t)},{event:t}),super.sendEvent(t,n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){!1&&Ee.log("No outcomes to send");return}if(!this._dsn){!1&&Ee.log("No dsn provided, will not send outcomes");return}!1&&Ee.log("Sending outcomes:",t);let n=Qs(this._dsn,this._options),r=D2(t,this._options.tunnel&&yi(this._dsn));try{W2(n,ql(r))}catch(a){!1&&Ee.error(a)}}};p();p();function Xs(e,t=rp()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:e.headers,...e.fetchOptions};return t(e.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Js(e,n)}p();var Eo="?",t8=10,n8=20,r8=30,a8=40,i8=50;function eu(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var o8=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s8=/\((\S*)(?::(\d+))(?::(\d+))\)/,u8=e=>{let t=o8.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=s8.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,a]=V2(t[1]||Eo,t[2]);return eu(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},ip=[r8,u8],l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d8=e=>{let t=l8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=c8.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],a=t[1]||Eo;return[a,r]=V2(a,r),eu(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},op=[i8,d8],g8=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p8=e=>{let t=g8.exec(e);return t?eu(t[2],t[1]||Eo,+t[3],t[4]?+t[4]:void 0):void 0},sp=[a8,p8],m8=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f8=e=>{let t=m8.exec(e);return t?eu(t[2],t[3]||Eo,+t[1]):void 0},K2=[t8,f8],h8=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,b8=e=>{let t=h8.exec(e);return t?eu(t[5],t[3]||t[4]||Eo,+t[1],+t[2]):void 0},G2=[n8,b8],up=[ip,op,sp],ac=Bg(...up),V2=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Eo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};p();p();var lp=0;function cp(){return lp>0}function y8(){lp+=1,setTimeout(()=>{lp-=1})}function aa(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(bo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>aa(o,t));return e.apply(this,i)}catch(i){throw y8(),So(o=>{o.addEventProcessor(s=>(t.mechanism&&(Vs(s,void 0,void 0),Ea(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),vo(i)}),i}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}_g(r,e),Ks(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var dp={};ol(dp,{Breadcrumbs:()=>Da,Dedupe:()=>La,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,LinkedErrors:()=>ka,TryCatch:()=>Aa});p();p();var Mr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:T8,onunhandledrejection:v8};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(x8(n),r(),this._installFunc[n]=void 0)}}};function T8(){br("error",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let{msg:a,url:i,line:o,column:s,error:u}=e;if(cp()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Jr(a)?C8(a,i,o,s):$2(tc(n,u||a,void 0,r,!1),i,o,s);l.level="error",Y2(t,u,l,"onerror")})}function v8(){br("unhandledrejection",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(cp()||a&&a.__sentry_own_request__)return!0;let i=qs(a)?S8(a):tc(n,a,void 0,r,!0);i.level="error",Y2(t,a,i,"onunhandledrejection")})}function S8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function C8(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Rl(e)?e.message:e,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),$2({exception:{values:[{type:o,value:i}]}},t,n,r)}function $2(e,t,n,r){let a=e.exception=e.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Jr(t)&&t.length>0?t:o2();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function x8(e){!1&&Ee.log(`Global Handler attached: ${e}`)}function Y2(e,t,n,r){Ea(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Q2(){let e=Ie(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}p();var E8=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Aa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=ft();this._options.setTimeout&&fr(t,"setTimeout",Z2),this._options.setInterval&&fr(t,"setInterval",Z2),this._options.requestAnimationFrame&&fr(t,"requestAnimationFrame",w8),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&fr(XMLHttpRequest.prototype,"send",D8);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:E8).forEach(A8)}};function Z2(e){return function(...t){let n=t[0];return t[0]=aa(n,{mechanism:{data:{function:hr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function w8(e){return function(t){return e.apply(this,[aa(t,{mechanism:{data:{function:"requestAnimationFrame",handler:hr(e)},handled:!0,type:"instrument"}})])}}function D8(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&fr(n,a,function(i){let o={mechanism:{data:{function:a,handler:hr(i)},handled:!0,type:"instrument"}},s=bo(i);return s&&(o.mechanism.data.handler=hr(s)),aa(i,o)})}),e.apply(this,t)}}function A8(e){let t=ft(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fr(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=aa(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:hr(i),target:e},handled:!0,type:"instrument"}}))}catch{}let s=aa(i,{mechanism:{data:{function:"addEventListener",handler:hr(i),target:e},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),fr(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}p();var k8="cause",P8=5,ka=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||k8,this._limit=t.limit||P8}setupOnce(){let t=Ie().getClient();t&&_r((n,r)=>{let a=Ie().getIntegration(e);return a?L8(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function L8(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!kr(a.originalException,Error))return r;let i=J2(e,n,a.originalException,t);return r.exception.values=[...i,...r.exception.values],r}function J2(e,t,n,r,a=[]){if(!kr(n[r],Error)||a.length+1>=t)return a;let i=ep(e,n[r]);return J2(e,t,n[r],r,[i,...a])}p();var X2=ft(),Pa=class e{static id="HttpContext";name=e.id;setupOnce(){_r(t=>{if(Ie().getIntegration(e)){if(!navigator&&!location&&!X2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=X2.document||{},{userAgent:a}=navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...t,request:o}}return t})}};p();var La=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let i=n().getIntegration(e);if(i){try{if(_8(a,i._previousEvent))return!1&&Ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,t(r)}};function _8(e,t){return t?!!(M8(e,t)||F8(e,t)):!1}function M8(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rb(e,t)||!nb(e,t))}function F8(e,t){let n=eb(t),r=eb(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rb(e,t)||!nb(e,t))}function nb(e,t){let n=tb(e),r=tb(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Ee.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Ie();n.captureSession&&(ab(n),br("history",({from:r,to:a})=>{r===void 0||r===a||ab(Ie())}))}var pb={},pp=ft();pp.Sentry&&pp.Sentry.Integrations&&(pb=pp.Sentry.Integrations);var I8={...pb,...Ei,...dp};var mp=kl.alert;p();p();p();function Le(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():E}var De=Le();function pe(){return De.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function mb(){return De.BETA==="1"}function pn(){return De.PROD==="1"}function tr(){return De.PROD_API==="1"}function fb(){return De.HAS_CSP_ERROR=="1"}function Ge(){if(De.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function wo(){return De.IMMERSIVE_TRANSLATE_SAFARI==="1"}function ic(){return typeof Deno<"u"}var Rq=Le().PROD==="1",Do=Le().PROD!=="1";function oc(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function tu(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}p();var hb={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5173,16 +5173,16 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Lb=[{code:"zh-CN",messages:hb},{code:"zh-TW",messages:bb},{code:"en",messages:yb},{code:"ja",messages:Tb},{code:"ar",messages:vb},{code:"de",messages:Sb},{code:"es",messages:Cb},{code:"fa",messages:xb},{code:"fr",messages:Eb},{code:"hi",messages:wb},{code:"it",messages:Db},{code:"ru",messages:Ab},{code:"ko",messages:kb},{code:"pt",messages:Pb}];var Mb="immersiveTranslateDeeplGlobalState",hp="immersiveTranslateBingGlobalState",bp="immersiveTranslateYandexGlobalState",nn={};for(let e of Lb)nn[e.code]=e.messages;var Di="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",sc="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",_a=be+"GoogleAccessToken",tu=be+"AuthFlow",uc="immersive-translate-config-latest.json",yp=be+"AuthState",lc=be+"IframeMessage",bj=be+"WaitForRateLimit",Fb=be+"DocumentMessageAsk",Yt=be+"DocumentMessageTellThirdParty",Ai=be+"showError",Bb=be+"DocumentMessageThirdPartyTell",Ib=be+"DocumentMessageEventUpload",Q8=be+"DocumentMessageHandler",cc=`${be}Share`,nu=`${be}ToggleMouseHoverTranslateDirectly`,Rb=`${be}ReqDraft`,Ob=`${be}ResDraft`,Z8=`${be}Container`,zb=`${be}SpecifiedContainer`,ia="buildinConfig",Ao="localConfig",ru="openOptionsPage",Tp="openAboutPage",Nb="translateLocalPdfFile";var au="openEbookViewer",iu="openEbookBuilder";var ki=`${be}PageTranslatedStatus`,yj=`${be}PageUrlChanged`,oa=`${be}ReceiveCommand`,Ub=be+"LastUseMouseHoverTime",dc=be+"LastUseInputTime",yr=be+"LastUseManualTranslatePageTime",Tj=`${be}PopupReceiveMessage`,J8="immersivetranslate.com",X8="config.immersivetranslate.com",vj=`https://${J8}/`,Ma=`https://${X8}/default_config.json`,Sj=`${be}Mark`,In=`${be}Root`,qb=`${be}Walked`,Cj=`data-${ee}-walked`,jb=`${be}Paragraph`,Hb=`data-${ee}-paragraph`,Fr=`data-${ee}-translation-element-mark`,Wb=`${be}TranslationElementMark`,xj=`${be}TranslatedMark`,Kb=`${be}LoadingId`,vp=`data-${ee}-loading-id`,Gb=`${be}ErrorId`,gc=`data-${ee}-error-id`,e7=`${be}AtomicBlockMark`,Vb=`${be}ExcludeMark`,Ej=`data-${ee}-exclude-mark`,t7=`${be}StayOriginalMark`,wj=`${be}PreWhitespaceMark`,pc=`${be}InlineMark`,$b=`${be}BlockMark`,Dj=`${be}Left`,Aj=`${be}Right`,kj=`${be}Width`,Pj=`${be}Height`,Lj=`${be}Top`,_j=`${be}FontSize`,Yb="lastRunTime",Mj=`${be}GlobalStyleMark`,ou=["@","#"],mc=" --- ",Qb=` -`,Lt=`${ee}-target-wrapper`,Fj=`${ee}-pdf-target-container`,fc=`${ee}-target-inner`,Bj=`${ee}-source-wrapper`,Sp=`${ee}-target-translation-block-wrapper`,Ij=`${ee}-root-translation-theme`,ko=`${be}RootTranslationTheme`,Zb=`${ee}-target-translation-vertical-block-wrapper`,Rj=`${ee}-target-translation-pdf-block-wrapper`,Jb=`${ee}-target-translation-pre-whitespace`,Cp=`${ee}-target-translation-inline-wrapper`,xp=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],su={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Rn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Xb={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},e1={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},t1={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var hc=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],n1=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Br="zh-CN",bc="https://immersivetranslate.com/docs/communities/",_b=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],yc=["caiyun","cai"],nr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Lb=[{code:"zh-CN",messages:hb},{code:"zh-TW",messages:bb},{code:"en",messages:yb},{code:"ja",messages:Tb},{code:"ar",messages:vb},{code:"de",messages:Sb},{code:"es",messages:Cb},{code:"fa",messages:xb},{code:"fr",messages:Eb},{code:"hi",messages:wb},{code:"it",messages:Db},{code:"ru",messages:Ab},{code:"ko",messages:kb},{code:"pt",messages:Pb}];var Mb="immersiveTranslateDeeplGlobalState",fp="immersiveTranslateBingGlobalState",hp="immersiveTranslateYandexGlobalState",rn={};for(let e of Lb)rn[e.code]=e.messages;var Di="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",sc="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",_a=be+"GoogleAccessToken",nu=be+"AuthFlow",uc="immersive-translate-config-latest.json",bp=be+"AuthState",lc=be+"IframeMessage",bj=be+"WaitForRateLimit",Fb=be+"DocumentMessageAsk",Yt=be+"DocumentMessageTellThirdParty",Ai=be+"showError",Bb=be+"DocumentMessageThirdPartyTell",Ib=be+"DocumentMessageEventUpload",Q8=be+"DocumentMessageHandler",cc=`${be}Share`,ru=`${be}ToggleMouseHoverTranslateDirectly`,Rb=`${be}ReqDraft`,Ob=`${be}ResDraft`,Z8=`${be}Container`,zb=`${be}SpecifiedContainer`,ia="buildinConfig",Ao="localConfig",au="openOptionsPage",yp="openAboutPage",Nb="translateLocalPdfFile";var iu="openEbookViewer",ou="openEbookBuilder";var ki=`${be}PageTranslatedStatus`,yj=`${be}PageUrlChanged`,oa=`${be}ReceiveCommand`,Ub=be+"LastUseMouseHoverTime",dc=be+"LastUseInputTime",yr=be+"LastUseManualTranslatePageTime",Tj=`${be}PopupReceiveMessage`,J8="immersivetranslate.com",X8="config.immersivetranslate.com",vj=`https://${J8}/`,Ma=`https://${X8}/default_config.json`,Sj=`${be}Mark`,In=`${be}Root`,qb=`${be}Walked`,Cj=`data-${ee}-walked`,jb=`${be}Paragraph`,Hb=`data-${ee}-paragraph`,Fr=`data-${ee}-translation-element-mark`,Wb=`${be}TranslationElementMark`,xj=`${be}TranslatedMark`,Kb=`${be}LoadingId`,Tp=`data-${ee}-loading-id`,Gb=`${be}ErrorId`,gc=`data-${ee}-error-id`,e7=`${be}AtomicBlockMark`,Vb=`${be}ExcludeMark`,Ej=`data-${ee}-exclude-mark`,t7=`${be}StayOriginalMark`,wj=`${be}PreWhitespaceMark`,pc=`${be}InlineMark`,$b=`${be}BlockMark`,Dj=`${be}Left`,Aj=`${be}Right`,kj=`${be}Width`,Pj=`${be}Height`,Lj=`${be}Top`,_j=`${be}FontSize`,Yb="lastRunTime",Mj=`${be}GlobalStyleMark`,su=["@","#"],mc=" --- ",Qb=` +`,Lt=`${ee}-target-wrapper`,Fj=`${ee}-pdf-target-container`,fc=`${ee}-target-inner`,Bj=`${ee}-source-wrapper`,vp=`${ee}-target-translation-block-wrapper`,Ij=`${ee}-root-translation-theme`,ko=`${be}RootTranslationTheme`,Zb=`${ee}-target-translation-vertical-block-wrapper`,Rj=`${ee}-target-translation-pdf-block-wrapper`,Jb=`${ee}-target-translation-pre-whitespace`,Sp=`${ee}-target-translation-inline-wrapper`,Cp=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],uu={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Rn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Xb={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},e1={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},t1={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var hc=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],n1=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Br="zh-CN",bc="https://immersivetranslate.com/docs/communities/",_b=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],yc=["caiyun","cai"],nr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:ou,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[..._b,{type:"password",name:"apikey",required:!0}],props:_b},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Tc={type:be+"ChildFrameToRootFrameIdentifier"},Ep=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],sa=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],r1=["ctrl","alt","shift","cmd","command","option","control"],vc=[{key:"/"},{key:"="},{key:";"},{key:","},{key:"."},{key:":"},{key:"space",labelKey:"spaceKey",skipForStarting:!0},{key:"none",labelKey:"noneKey",skipForTrailing:!0}],Oj=pn()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",uu="user_from_plugin",ht="user_info",Pi=pn()||tr()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",Sc=pn()||tr()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",a1=Sc+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",i1=Sc+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Li=pn()||tr()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Fa=pn()||tr()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",n7=pn()||tr()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",r7=pn()||tr()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",a7=pn()||tr()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",zj=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",o1=n7+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",s1=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Cc=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",u1=r7+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",l1=a7+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",c1=Li+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",xc="https://immersivetranslate.com/docs/usage/",d1="https://immersivetranslate.com/docs/communities/",g1=Le().TRANSLATE_FILE_URL,p1=g1+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",m1=g1+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var Po=console,wp=class{#e=performance.now();reset(){this.#e=performance.now()}stop(t){let n=performance.now(),r=Math.round(n-this.#e),a=Zn.green;r>1e4?a=Zn.red:r>1e3&&(a=Zn.yellow),Po.debug(Zn.dim(Di+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},lu=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&Po.log(Zn.dim(Di+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&Po.log(Zn.green(Di+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&Po.warn(Zn.yellow(Di+" WARN:"),...t)}error(...t){this.#e<=3&&Po.error(Zn.red(Di+" ERROR:"),...t)}fatal(...t){this.#e<=4&&Po.error(Zn.red(Di+" FATAL:"),...t)}timing(){return this.level===0?new wp:{reset:()=>{},stop:()=>{}}}},R=new lu;p();function ot(){try{let e=[Le().EBOOK_BUILDER_URL,Le().EBOOK_VIEWER_URL,Le().SUBTITLE_BUILDER_URL,Le().HTML_VIEWER_URL,Le().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];pn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&t.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}p();p();var Ec={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.4",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};p();p();p();var Dp=/iPhone/i,f1=/iPod/i,h1=/iPad/i,b1=/\biOS-universal(?:.+)Mac\b/i,Ap=/\bAndroid(?:.+)Mobile\b/i,y1=/Android/i,Lo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,wc=/Silk/i,ua=/Windows Phone/i,T1=/\bWindows(?:.+)ARM\b/i,v1=/BlackBerry/i,S1=/BB10/i,C1=/Opera Mini/i,x1=/\b(CriOS|Chrome)(?:.+)Mobile/i,E1=/Mobile(?:.+)Firefox\b/i,w1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function o7(e){return t=>t.test(e)}function st(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=o7(n),i={apple:{phone:a(Dp)&&!a(ua),ipod:a(f1),tablet:!a(Dp)&&(a(h1)||w1(t))&&!a(ua),universal:a(b1),device:(a(Dp)||a(f1)||a(h1)||a(b1)||w1(t))&&!a(ua)},amazon:{phone:a(Lo),tablet:!a(Lo)&&a(wc),device:a(Lo)||a(wc)},android:{phone:!a(ua)&&a(Lo)||!a(ua)&&a(Ap),tablet:!a(ua)&&!a(Lo)&&!a(Ap)&&(a(wc)||a(y1)),device:!a(ua)&&(a(Lo)||a(wc)||a(Ap)||a(y1))||a(/\bokhttp\b/i)},windows:{phone:a(ua),tablet:a(T1),device:a(ua)||a(T1)},other:{blackberry:a(v1),blackberry10:a(S1),opera:a(C1),firefox:a(E1),chrome:a(x1),device:a(v1)||a(S1)||a(C1)||a(E1)||a(x1)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var kp="DENO",Dc="CHROME",Ac="FIREFOX";function D1(e){let t=Dc;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Ac:/deno/i.test(n)&&(t=kp)}catch{}return e===Dc&&t===Dc||e===Ac&&t===Ac||e===kp&&t===kp}function Pp(){return D1(Dc)}function A1(){return typeof Deno<"u"}function rr(){return D1(Ac)}function Ba(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function k1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function _i(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function P1(){return pe()?"monkey":Pp()?"chrome":rr()?"firefox":Ge()?"safari":null}p();var L1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},_1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:L1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:L1,query:()=>{},sendMessage:()=>{}}};var Z;A1()?Z=_1:Z=globalThis.immersiveTranslateBrowserAPI;var s7="";function On(){return s7||Ec.version}function Ir(){return Z.runtime.getManifest().version}p();function M1(e){return e.replace(//g,">")}p();function Qt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function F1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function B1(e){if(e){let t=new Date(e.createTime),n=u7(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function u7(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}p();p();function ve(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Rn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Rn[a]}else return"auto";else return Rn[r]}function At(){return ve(document?.documentElement?.lang||"en")}function cu(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+o.text.length>t||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function l7(e,t){let n=[],r=[];for(let a=0;a0?y1e4?a=Zn.red:r>1e3&&(a=Zn.yellow),Po.debug(Zn.dim(Di+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},cu=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&Po.log(Zn.dim(Di+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&Po.log(Zn.green(Di+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&Po.warn(Zn.yellow(Di+" WARN:"),...t)}error(...t){this.#e<=3&&Po.error(Zn.red(Di+" ERROR:"),...t)}fatal(...t){this.#e<=4&&Po.error(Zn.red(Di+" FATAL:"),...t)}timing(){return this.level===0?new Ep:{reset:()=>{},stop:()=>{}}}},R=new cu;p();function st(){try{let e=[Le().EBOOK_BUILDER_URL,Le().EBOOK_VIEWER_URL,Le().SUBTITLE_BUILDER_URL,Le().HTML_VIEWER_URL,Le().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];pn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&t.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}p();p();var Ec={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.5",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};p();p();p();var wp=/iPhone/i,f1=/iPod/i,h1=/iPad/i,b1=/\biOS-universal(?:.+)Mac\b/i,Dp=/\bAndroid(?:.+)Mobile\b/i,y1=/Android/i,Lo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,wc=/Silk/i,ua=/Windows Phone/i,T1=/\bWindows(?:.+)ARM\b/i,v1=/BlackBerry/i,S1=/BB10/i,C1=/Opera Mini/i,x1=/\b(CriOS|Chrome)(?:.+)Mobile/i,E1=/Mobile(?:.+)Firefox\b/i,w1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function o7(e){return t=>t.test(e)}function ut(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=o7(n),i={apple:{phone:a(wp)&&!a(ua),ipod:a(f1),tablet:!a(wp)&&(a(h1)||w1(t))&&!a(ua),universal:a(b1),device:(a(wp)||a(f1)||a(h1)||a(b1)||w1(t))&&!a(ua)},amazon:{phone:a(Lo),tablet:!a(Lo)&&a(wc),device:a(Lo)||a(wc)},android:{phone:!a(ua)&&a(Lo)||!a(ua)&&a(Dp),tablet:!a(ua)&&!a(Lo)&&!a(Dp)&&(a(wc)||a(y1)),device:!a(ua)&&(a(Lo)||a(wc)||a(Dp)||a(y1))||a(/\bokhttp\b/i)},windows:{phone:a(ua),tablet:a(T1),device:a(ua)||a(T1)},other:{blackberry:a(v1),blackberry10:a(S1),opera:a(C1),firefox:a(E1),chrome:a(x1),device:a(v1)||a(S1)||a(C1)||a(E1)||a(x1)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Ap="DENO",Dc="CHROME",Ac="FIREFOX";function D1(e){let t=Dc;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Ac:/deno/i.test(n)&&(t=Ap)}catch{}return e===Dc&&t===Dc||e===Ac&&t===Ac||e===Ap&&t===Ap}function kp(){return D1(Dc)}function A1(){return typeof Deno<"u"}function rr(){return D1(Ac)}function Ba(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function k1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function _i(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function P1(){return pe()?"monkey":kp()?"chrome":rr()?"firefox":Ge()?"safari":null}p();var L1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},_1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:L1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:L1,query:()=>{},sendMessage:()=>{}}};var Z;A1()?Z=_1:Z=globalThis.immersiveTranslateBrowserAPI;var s7="";function On(){return s7||Ec.version}function Ir(){return Z.runtime.getManifest().version}p();function M1(e){return e.replace(//g,">")}p();function Qt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function F1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function B1(e){if(e){let t=new Date(e.createTime),n=u7(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function u7(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}p();p();function ye(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Rn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Rn[a]}else return"auto";else return Rn[r]}function At(){return ye(document?.documentElement?.lang||"en")}function du(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+o.text.length>t||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function l7(e,t){let n=[],r=[];for(let a=0;a0?yt){let x=[];Lp(T,t,x);for(let w=0;w0&&y{let s=e.lastIndexOf(o,t);return s>i?s:i},-1);if(a===-1){let i=e.slice(0,t);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),e.length>t&&Lp(e.slice(t),t,n)}else{let i=e.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?m.push(y):f.push(y))});let h=m.concat(f).filter(y=>y.required);if(h.length>0){for(let y of h)if(!i[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:m,explicitProps:f}}var Mi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=e.user,u=Qt(s),l=Object.keys(nr);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=nr[c];if(c.startsWith("mock"))return o?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&Ge())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let f=!!g.canary,m=!!g.alpha,h=!!g.beta;return c===e[t]||f&&i||m&&(r||i)||h&&(a||r||i)?!0:!m&&!h&&!f}).map(c=>_o(t,c,e))};function du(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function R1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}p();var O1=be+"SyncStoreKey_";function qt(e,t){let n=O1+e;return Z.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function at(e,t){let n=O1+e;return Z.storage.sync.set({[n]:t})}p();var Fi=be+"CacheKey_";function _p(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function c7(){let e=Z.storage.local.refresh;e&&e()}function Mp(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Fi)).filter(r=>r!==Fi+ht);if(n.length>0)return Z.storage.local.remove(n)}}var it={get:_p,set:Bp,getExpired:Mp,setExpired:Fp,remove:Ip,clear:Rp,refresh:c7};p();var z1=["*://*/*","*","*://*"],U1="immersive-translate-wildcard-placeholder.com";function Op(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>z1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(z1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,g=l.port===o;return l.port?c&&g:c}else return g7(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let T=u.split("://");l=T[0],l==="*"&&T.length>1&&(l="*",u="https://"+T[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,U1),f;try{f=new URL(g)}catch{return R.debug("invalid match pattern",g,"raw match value:",c),!1}let m=f.host,h=f.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=d7(l+":",N1(m),N1(h));if(y){let T=new URL(a);return y.test(T.href)}else return!1}});if(s)return s}return null}catch{return null}}function N1(e){return e.replaceAll(U1,"*")}function d7(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return Op(e,t)!==null}function g7(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}p();p();var q1=be+"StoreKey_";function la(e,t){let n=q1+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function j1(e,t){let n=q1+e;return Z.storage.local.set({[n]:t})}p();p();p();p();function H1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function zp(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let i=p7(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),f=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${f}>${g}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function gu(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function Rr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let i=gu(e,n,t);return i===t&&n!==r&&(i=gu(e,r,t)),zp(i,a)}function p7(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function jt(e,t,n){return Rr(nn,t,e.config.interfaceLanguage,"en",n)}p();function W1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K1(e){return new Date(e).getTime()}var Q=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=jt.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=jt.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=jt.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=jt.bind(null,t),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+`;continue}else if(T.length>t){let x=[];Pp(T,t,x);for(let w=0;w0&&y{let s=e.lastIndexOf(o,t);return s>i?s:i},-1);if(a===-1){let i=e.slice(0,t);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),e.length>t&&Pp(e.slice(t),t,n)}else{let i=e.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?m.push(y):f.push(y))});let h=m.concat(f).filter(y=>y.required);if(h.length>0){for(let y of h)if(!i[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:m,explicitProps:f}}var Mi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=e.user,u=Qt(s),l=Object.keys(nr);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=nr[c];if(c.startsWith("mock"))return o?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&Ge())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let f=!!g.canary,m=!!g.alpha,h=!!g.beta;return c===e[t]||f&&i||m&&(r||i)||h&&(a||r||i)?!0:!m&&!h&&!f}).map(c=>_o(t,c,e))};function gu(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function R1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}p();var O1=be+"SyncStoreKey_";function qt(e,t){let n=O1+e;return Z.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function it(e,t){let n=O1+e;return Z.storage.sync.set({[n]:t})}p();var Fi=be+"CacheKey_";function Lp(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function c7(){let e=Z.storage.local.refresh;e&&e()}function _p(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Fi)).filter(r=>r!==Fi+bt);if(n.length>0)return Z.storage.local.remove(n)}}var ot={get:Lp,set:Fp,getExpired:_p,setExpired:Mp,remove:Bp,clear:Ip,refresh:c7};p();var z1=["*://*/*","*","*://*"],U1="immersive-translate-wildcard-placeholder.com";function Rp(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>z1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(z1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,g=l.port===o;return l.port?c&&g:c}else return g7(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let T=u.split("://");l=T[0],l==="*"&&T.length>1&&(l="*",u="https://"+T[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,U1),f;try{f=new URL(g)}catch{return R.debug("invalid match pattern",g,"raw match value:",c),!1}let m=f.host,h=f.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=d7(l+":",N1(m),N1(h));if(y){let T=new URL(a);return y.test(T.href)}else return!1}});if(s)return s}return null}catch{return null}}function N1(e){return e.replaceAll(U1,"*")}function d7(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return Rp(e,t)!==null}function g7(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}p();p();var q1=be+"StoreKey_";function la(e,t){let n=q1+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function j1(e,t){let n=q1+e;return Z.storage.local.set({[n]:t})}p();p();p();p();function H1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function Op(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let i=p7(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),f=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${f}>${g}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function pu(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function Rr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let i=pu(e,n,t);return i===t&&n!==r&&(i=pu(e,r,t)),Op(i,a)}function p7(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function jt(e,t,n){return Rr(rn,t,e.config.interfaceLanguage,"en",n)}p();function W1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K1(e){return new Date(e).getTime()}var Q=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=jt.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=jt.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=jt.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=jt.bind(null,t),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(t){let n=jt.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=jt.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=jt.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",f=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Cc});else{let h="";f=="OpenAI"?h=u1:h=l1,o?m+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:c1}):m+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:f}),!o&&(a.cancelAtPeriodEnd==="false"||K1(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W1(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Tr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await eg(G1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await G1(e);return t}async function G1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let i=e.fetchPolyfill||fetch,o=3e4;if(e.timeout&&(o=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(t,r)}catch(u){R.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new Q("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of m7(s.body)){let g=new TextDecoder().decode(c);u+=g;let f;for(;(f=u.indexOf(` -`))>=0;){let m=u.slice(0,f).trim();if(u=u.slice(f+1),m.startsWith("event:")||m==="")continue;let h="";if(m.startsWith("data:")&&(h=m.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(T){R.debug("json error",T);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(m){R.error("parse response failed",m)}u&&R.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,f=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),f&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new Q("fetchError",c).initNetWork(s.status)}}async function*m7(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}p();var f7=new Map;function kc(e){let t=h7(64),n=new CustomEvent(Fb,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{f7.set(t,(i,o)=>{i?a(i):r(o)})})}function h7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=Up(s),{type:f,name:m}=g;if(f!==t)return!1;let h=Up(o),T=pu.get(f).get(m);if(!T)return this.logger.debug(`no message handler for ${f}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=T,w={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let L=b(r.payload,w);i({ok:!0,data:L})}catch(L){i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.details,errorStatus:L.status})}return!1}else return b(r.payload,w).then(L=>{i({ok:!0,data:L})}).catch(L=>{i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.message,errorStatus:L.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=pu.get(i);if(o.has(t))return o.get(t).connectionInstance;{let s=new Np(`${i}:${t}`,this.logger);return pu.get(i).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},Np=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=Up(t),{type:a,id:i}=r;if(a!=="content_script"){let o={to:t,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await Z.runtime.sendMessage(o);return V1(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:t,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await Z.tabs.sendMessage(i,o);return V1(o,s,this.logger)}}};function V1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new Q(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new Q("noResponse","Unknown error")}function Up(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}p();var b7="";function Mo(){return b7||globalThis.navigator.userAgent}function qp(){return Mo().includes("ImtFxiOS")}function $1(){let t=Mo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function y7(){return Mo().includes("ImtFxAndroid")}function Y1(){let e=Mo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Q1(){let t=Mo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function mu(){let e=Mo();if(qp()||y7()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Pc;function T7(){return Pc||(Pc=new ca("content_script",!1).getConnection("pure_main",()=>{}),Pc)}var Z1="G-MKMD9LWFTR";async function Bi(e){try{let t=Le(),n=t.INSTALL_FROM==="firefox_store";if(mu()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=pe(),i=ot(),o=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await qt("fakeUserId","");u||(u=await la("fakeUserId",""),u&&await at("fakeUserId",u));let l=On(),c=new Date,g=await qt("installedAt","");g||(g=await la("installedAt",""),g&&await at("installedAt",g)),u?g||(g=new Date(0).toISOString(),await at("installedAt",g)):(u=v7(32),await at("fakeUserId",u)),g||(g=c.toISOString(),await at("installedAt",g));let f=new Date(g),m=J1(f),h=J1(c),y=m===h,T=c.getTime()-f.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${Z1}&api_secret=${s}`;o||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Z1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let w=po.parse(x),L=e.map(C=>{let v=C.params||{};if(w.os&&(v.os_name=w.os.name||"unknown",v.os_version=w.os.version||"unknown",v.os_version_name=w.os.versionName||"unknown"),w.browser){v.browser_name=w.browser.name||"unknown",v.browser_version=w.browser.version||"unknown";let A=mu();A&&(v.browser_name=A.name,v.browser_version=A.version)}return w.platform&&(v.platform_type=w.platform.type||"unknown"),w.engine&&(v.engine_name=w.engine.name||"unknown",v.engine_version=w.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),m&&(v.install_day=S7(f)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",T?v.is_new_user_this_week="1":v.is_new_user_this_week="0",i?v.main_frame=0:v.main_frame=1,{...C,params:v}}),M=await Lc({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:L})})}catch{}}function v7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(t){let n=jt.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=jt.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=jt.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",f=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Cc});else{let h="";f=="OpenAI"?h=u1:h=l1,o?m+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:c1}):m+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:f}),!o&&(a.cancelAtPeriodEnd==="false"||K1(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W1(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Tr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await Xd(G1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await G1(e);return t}async function G1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let i=e.fetchPolyfill||fetch,o=3e4;if(e.timeout&&(o=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(t,r)}catch(u){R.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new Q("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of m7(s.body)){let g=new TextDecoder().decode(c);u+=g;let f;for(;(f=u.indexOf(` +`))>=0;){let m=u.slice(0,f).trim();if(u=u.slice(f+1),m.startsWith("event:")||m==="")continue;let h="";if(m.startsWith("data:")&&(h=m.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(T){R.debug("json error",T);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(m){R.error("parse response failed",m)}u&&R.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,f=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),f&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new Q("fetchError",c).initNetWork(s.status)}}async function*m7(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}p();var f7=new Map;function kc(e){let t=h7(64),n=new CustomEvent(Fb,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{f7.set(t,(i,o)=>{i?a(i):r(o)})})}function h7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=Np(s),{type:f,name:m}=g;if(f!==t)return!1;let h=Np(o),T=mu.get(f).get(m);if(!T)return this.logger.debug(`no message handler for ${f}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=T,w={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let L=b(r.payload,w);i({ok:!0,data:L})}catch(L){i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.details,errorStatus:L.status})}return!1}else return b(r.payload,w).then(L=>{i({ok:!0,data:L})}).catch(L=>{i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.message,errorStatus:L.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=mu.get(i);if(o.has(t))return o.get(t).connectionInstance;{let s=new zp(`${i}:${t}`,this.logger);return mu.get(i).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},zp=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=Np(t),{type:a,id:i}=r;if(a!=="content_script"){let o={to:t,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await Z.runtime.sendMessage(o);return V1(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:t,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await Z.tabs.sendMessage(i,o);return V1(o,s,this.logger)}}};function V1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new Q(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new Q("noResponse","Unknown error")}function Np(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}p();var b7="";function Mo(){return b7||globalThis.navigator.userAgent}function Up(){return Mo().includes("ImtFxiOS")}function $1(){let t=Mo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function y7(){return Mo().includes("ImtFxAndroid")}function Y1(){let e=Mo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Q1(){let t=Mo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function fu(){let e=Mo();if(Up()||y7()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Pc;function T7(){return Pc||(Pc=new ca("content_script",!1).getConnection("pure_main",()=>{}),Pc)}var Z1="G-MKMD9LWFTR";async function Bi(e){try{let t=Le(),n=t.INSTALL_FROM==="firefox_store";if(fu()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=pe(),i=st(),o=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await qt("fakeUserId","");u||(u=await la("fakeUserId",""),u&&await it("fakeUserId",u));let l=On(),c=new Date,g=await qt("installedAt","");g||(g=await la("installedAt",""),g&&await it("installedAt",g)),u?g||(g=new Date(0).toISOString(),await it("installedAt",g)):(u=v7(32),await it("fakeUserId",u)),g||(g=c.toISOString(),await it("installedAt",g));let f=new Date(g),m=J1(f),h=J1(c),y=m===h,T=c.getTime()-f.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${Z1}&api_secret=${s}`;o||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Z1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let w=po.parse(x),L=e.map(C=>{let v=C.params||{};if(w.os&&(v.os_name=w.os.name||"unknown",v.os_version=w.os.version||"unknown",v.os_version_name=w.os.versionName||"unknown"),w.browser){v.browser_name=w.browser.name||"unknown",v.browser_version=w.browser.version||"unknown";let A=fu();A&&(v.browser_name=A.name,v.browser_version=A.version)}return w.platform&&(v.platform_type=w.platform.type||"unknown"),w.engine&&(v.engine_name=w.engine.name||"unknown",v.engine_version=w.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),m&&(v.install_day=S7(f)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",T?v.is_new_user_this_week="1":v.is_new_user_this_week="0",i?v.main_frame=0:v.main_frame=1,{...C,params:v}}),M=await Lc({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:L})})}catch{}}function v7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5338,7 +5338,7 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};p();p();function da(e){if(e.beta)return!1;if(Ge()&&e.spVersion)return fu(Ir(),e.spVersion);if(Y1()&&e.gspVersion){let t=Q1();if(t)return fu(t,e.gspVersion)}if(qp()&&e.ispVersion){let t=$1();if(t)return fu(t,e.ispVersion)}return!1}function fu(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function hu(e){e.message?.indexOf("token invalid")>=0&&it.remove(ht)}p();function _c(e){return Array.isArray(e)?e:e?[e]:[]}function zn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Ht(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function Mc(e,t){let n={...e};return ny(n,t),E7(n,t),n}function ty(e,t,n){let r={...t};return Ii({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,i)=>r[a]=i}),Ii({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function E7(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;ny(e,a)}function Ii({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[i,o,s]=w7(a);if(!i||e[a]===void 0)return;let u=e[a];n(i)&&(u=_c(e[a]));let l=t(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!X1(s))return;c=jp(l,u)}else if(o=="remove_v"){if(!X1(s))return;c=ey(l,u)}else o==="add"?c=jp(l,u):o=="remove"&&(c=ey(l,u));if(c){r(i,c);return}Array.isArray(e[i])&&i.startsWith("additional")?c=jp(l,u):c=u,r(i,c)})}function ny(e,t){return Ii({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function jp(e,t){let n;if(Array.isArray(e)){let r=_c(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function w7(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function X1(e){let t=On();return e&&fu(t,e)}function ey(e,t){if(Array.isArray(e)){let n=_c(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function Ri(){if(De.PROD==="1")return{};let e={};if(De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(De.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=De.DEEPL_PROXY_ENDPOINT),De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}De.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=De.IMMERSIVE_TRANSLATE_SERVICE);let t={};return De.DEBUG==="1"&&(t.debug=!0,t.cache=!1),De.MOCK==="1"&&(t.translationService="mock"),t}async function Wt(){let e=await Z.storage.local.get(Ao);if(e[Ao]){let t=e[Ao],n=t.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...t,tempTranslationUrlMatches:[...n]};return a&&await Kt(i),i}else return{}}async function Kt(e){await Z.storage.local.set({[Ao]:e})}async function ry(e){await Z.storage.local.set({[ia]:e})}async function Ra(){await Z.storage.local.set({[ia]:{}})}async function Oa(){await Z.storage.local.set({[Ao]:{}})}async function ay(){let e=await Z.storage.local.get(ia),n={...await Hp(),...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let r=e[ia];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function bt(){let e=await Z.storage.local.get(ia),t={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let k=e[ia];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),B=new Date(t.buildinConfigUpdatedAt);_>B&&(t=k)}}let n=await k7(t);t.targetLanguage=n;let r=await it.get(ht,null),a={};if(!pe()&&Z.commands&&Z.commands.getAll){let k=await Z.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let i=await Hp(),o=Ri(),s=await vr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Wt(),c=new Date,g=Object.assign({},u,o,s);if(!g.interfaceLanguage){let k=await D7();g.interfaceLanguage=k}let f=g.interfaceLanguage==="en",m=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!f&&!m&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let T=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(T=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let w=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,w=!0);let L=(g?.translationLanguagePattern?.matches?.length||0)>0,M=await qt("installedAt",""),C=Number(await la("translage_page_daily",0)),v=Number(await qt(yr,0)),A;v>0&&(Date.now()-v0&&(Date.now()-C0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],B=Array.isArray(_)?_:[_],H=Array.from(new Set(B.concat(k.map(j=>j.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:H}}}let F=Object.assign(i,t);Ii({rule:t,valueIsArray:k=>Array.isArray(i[k]),getMergedValue:k=>i[k],onMergedResult:(k,_)=>{k!="generalRule"&&(F[k]=_)}});let P=Qt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let z={};g.translationServices&&g.translationServices.openai&&(z=g.translationServices.openai),!P&&O.authKey&&!O.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):O&&O.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!P&&z.APIKEY&&!z.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):z&&z.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),I=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of q){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(F[_]=Mc(i[_],g[_]));else if(_==="translationServices")P7(g,F);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&I.includes(_))g[_]&&(F[_]=Object.assign(F[_],g[_])),_==="shortcuts"&&(pe()||Ge()?F[_]={...F[_],...a}:F[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let B=F.rules||[],H={};for(let G of B)G.id&&(H[G.id]=G);let j=g[_].map(G=>G.id&&H[G.id]?ty(t.generalRule,H[G.id],G):G);F[_]=[...j,...F[_]]}if(De.PROD==="0"&&De.DEV_RULES){let B=JSON.parse(De.DEV_RULES);F[_]=[...B,...F[_]]}}else g[_]!==void 0&&(F[_]=g[_])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function vr(){return(await Z.storage.sync.get("userConfig")||{}).userConfig||{}}async function Oi(e){await Z.storage.sync.set({userConfig:e})}async function bu(e,t){await Z.storage.local.set({[e]:t})}async function Fc(e){return(await Z.storage.local.get(e))[e]||""}var D7=async()=>{let e=["zh-CN"];try{e=await Z.i18n.getAcceptLanguages()}catch(r){R.warn("get browser language error:",r)}let n=e.map(r=>ve(r)).find(r=>nn[r]);return n||"en"},Hp=async()=>{let e={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};return{...e,targetLanguage:Br,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function A7(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function k7(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Br;let n=await qt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ii({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ii({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>o.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var L7=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Nn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function za(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=t;if(Nn(e,i))return!1;if(Nn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!Nn(e,o)),c;function g(){return n&&n.display?!!L7.includes(n.display):Nn(e,r)}}var ln=Nn;function zi(e){return!!e.shadowRoot}function Na(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function yu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Or(e,t=!1){let n=ou;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ni(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Or(n,t)}function Bo(e,t){return Ia(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Wp(e){let{rule:t}=e,n=_7(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _7(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function Tu(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),vt(r,Kb,t.toString());let a=Wp(e);return r.append(rt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Io(e,t){return e.querySelector(`[${vp}='${t}']`)}function iy(){document.querySelectorAll(`[${vp}]`).forEach(t=>{t.remove()})}function oy(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function sy(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{Oo(n)&&t.push(n)}),t}function Kp(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=e,l=i,c=1001;try{if(r&&r.length>0){let g={},f=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),m=new RegExp(a.replace("{word}",f.map(h=>h.k).join("|")),"g");l=l.replace(m,(h,y)=>{let T=c++;return t[`${T}`]=g[y]||y,o.length>2?h.replace(y,`<${o[2]}${T}>`):h.replace(y,`${o[0]}${T}${o[1]}`)})}s&&s.length>0&&s.forEach(g=>{let f=new RegExp(g,"gi");l=l.replace(f,(m,h)=>{let y=c++;return t[`${y}`]=M1(h),o.length>2?m.replace(h,`<${o[2]}${y}>`):m.replace(h,`${o[0]}${y}${o[1]}`)})})}catch(g){R.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function vu(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:i}=e,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||yy(s)||my(s)||by(s)||fy(s)||hy(s)||F7(s)||o.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ic(i,n,r)}function ga(e){return e.nodeType===Node.ELEMENT_NODE}function uy(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function ly(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),i=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${i}:${o}:${s}`}async function Gp(){return await qt("fakeUserId","")}async function M7(){return await qt("installedAt","")}async function cy(e){let n=Le().INSTALL_FROM,r=On(),a=await M7(),i=await Gp(),o=await bt(),s=!1,u=await it.get(ht,null),l=!1;return u&&Qt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function dy(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!e||!t||(async()=>{let a=await Vp(e,t);r(a)})()},[e,t,r]),n}async function Vp(e,t){if(!e||!t)return;let n=!1,r,a=!0;!Ge()&&pe()||st().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await qt("installedAt","");new Date(i).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var Rc=!1,B7=pe();function Ty(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let i of a)n.push(i)}return n}function I7(e,t){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&vy(i,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(Ua(i,pc)){if(a===!0)return!0;continue}if(Cu(i.nodeName,t.inlineTags))return!0;if(!$p(i,t))return!1}}return!0}function Yp(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(Cu(e.nodeName,n)||$p(e,t)){if(Ua(e,$b)||Cu(e.nodeName,["BR"]))return!1;if(Ua(e,pc))return!0;if($p(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return I7(e,t)}else return Ua(e,pc);return!1}function vy(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Ua(e,Vb,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Ua(e,zb))return!1;let{stayOriginalTags:r,excludeTags:a}=t,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||Cu(e.nodeName,i))}function Ic(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(o=>o.trim()!=="").length>=n||!Cy(r)&&r.length>=n}function Sy(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(Cy(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function Cy(e){for(let t=0;t127)return!1;return!0}function my(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function fy(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function hy(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function by(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function yy(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Ua(e,t,n=!1){return Qp(e,t,"1",n)}function Qp(e,t,n,r=!1){return Rc&&!r?e[In]?!!(e[In]&&e[In][t]===n):!1:e.dataset[t]===n}function zo(e){return(e.innerText||e.textContent||"").trim()}function Zp(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Oc(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function vt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Rc&&!r?(e[In]||(e[In]={}),e[In][t]||(e[In][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function zc(e,t,n=!1){if(Rc&&!n){if(!e[In]||!e[In][t])return;delete e[In][t]}else delete e.dataset[t]}function No(e,t,n=!1){return Rc&&!n?!e[In]||!e[In][t]?void 0:e[In][t]:e.dataset[t]}function $p(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!Cu(e.nodeName,n)}function _e(){if(!globalThis||!globalThis.location)return"https://example.com";if(!ot())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Kn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){R.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else R.warn("injectCSS failed, rootDocument does not have head node",e)}function Oo(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(B7){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function Cu(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function xy(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function Ey(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||vy(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return R.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function wy(e,t,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(e,t,n)}p();function Ui(e,t,n,r,a){let i=t,o=su[i]||[],s="";e&&o&&o.length>0&&o.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let f=n[g];if(["borderRadius"].includes(g)&&(f+="px"),s+=`--immersive-translate-theme-${i}-${g}: ${f}; +`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};p();p();function da(e){if(e.beta)return!1;if(Ge()&&e.spVersion)return hu(Ir(),e.spVersion);if(Y1()&&e.gspVersion){let t=Q1();if(t)return hu(t,e.gspVersion)}if(Up()&&e.ispVersion){let t=$1();if(t)return hu(t,e.ispVersion)}return!1}function hu(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function bu(e){e.message?.indexOf("token invalid")>=0&&ot.remove(bt)}p();function _c(e){return Array.isArray(e)?e:e?[e]:[]}function zn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Ht(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function Mc(e,t){let n={...e};return ny(n,t),E7(n,t),n}function ty(e,t,n){let r={...t};return Ii({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,i)=>r[a]=i}),Ii({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function E7(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;ny(e,a)}function Ii({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[i,o,s]=w7(a);if(!i||e[a]===void 0)return;let u=e[a];n(i)&&(u=_c(e[a]));let l=t(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!X1(s))return;c=qp(l,u)}else if(o=="remove_v"){if(!X1(s))return;c=ey(l,u)}else o==="add"?c=qp(l,u):o=="remove"&&(c=ey(l,u));if(c){r(i,c);return}Array.isArray(e[i])&&i.startsWith("additional")?c=qp(l,u):c=u,r(i,c)})}function ny(e,t){return Ii({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function qp(e,t){let n;if(Array.isArray(e)){let r=_c(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function w7(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function X1(e){let t=On();return e&&hu(t,e)}function ey(e,t){if(Array.isArray(e)){let n=_c(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function Ri(){if(De.PROD==="1")return{};let e={};if(De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(De.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=De.DEEPL_PROXY_ENDPOINT),De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}De.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=De.IMMERSIVE_TRANSLATE_SERVICE);let t={};return De.DEBUG==="1"&&(t.debug=!0,t.cache=!1),De.MOCK==="1"&&(t.translationService="mock"),t}async function Wt(){let e=await Z.storage.local.get(Ao);if(e[Ao]){let t=e[Ao],n=t.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...t,tempTranslationUrlMatches:[...n]};return a&&await Kt(i),i}else return{}}async function Kt(e){await Z.storage.local.set({[Ao]:e})}async function ry(e){await Z.storage.local.set({[ia]:e})}async function Ra(){await Z.storage.local.set({[ia]:{}})}async function Oa(){await Z.storage.local.set({[Ao]:{}})}async function ay(){let e=await Z.storage.local.get(ia),n={...await jp(),...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let r=e[ia];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function yt(){let e=await Z.storage.local.get(ia),t={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let k=e[ia];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),B=new Date(t.buildinConfigUpdatedAt);_>B&&(t=k)}}let n=await k7(t);t.targetLanguage=n;let r=await ot.get(bt,null),a={};if(!pe()&&Z.commands&&Z.commands.getAll){let k=await Z.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let i=await jp(),o=Ri(),s=await vr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Wt(),c=new Date,g=Object.assign({},u,o,s);if(!g.interfaceLanguage){let k=await D7();g.interfaceLanguage=k}let f=g.interfaceLanguage==="en",m=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!f&&!m&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let T=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(T=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let w=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,w=!0);let L=(g?.translationLanguagePattern?.matches?.length||0)>0,M=await qt("installedAt",""),C=Number(await la("translage_page_daily",0)),v=Number(await qt(yr,0)),A;v>0&&(Date.now()-v0&&(Date.now()-C0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],B=Array.isArray(_)?_:[_],H=Array.from(new Set(B.concat(k.map(j=>j.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:H}}}let F=Object.assign(i,t);Ii({rule:t,valueIsArray:k=>Array.isArray(i[k]),getMergedValue:k=>i[k],onMergedResult:(k,_)=>{k!="generalRule"&&(F[k]=_)}});let P=Qt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let z={};g.translationServices&&g.translationServices.openai&&(z=g.translationServices.openai),!P&&O.authKey&&!O.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):O&&O.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!P&&z.APIKEY&&!z.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):z&&z.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),I=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of q){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(F[_]=Mc(i[_],g[_]));else if(_==="translationServices")P7(g,F);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&I.includes(_))g[_]&&(F[_]=Object.assign(F[_],g[_])),_==="shortcuts"&&(pe()||Ge()?F[_]={...F[_],...a}:F[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let B=F.rules||[],H={};for(let G of B)G.id&&(H[G.id]=G);let j=g[_].map(G=>G.id&&H[G.id]?ty(t.generalRule,H[G.id],G):G);F[_]=[...j,...F[_]]}if(De.PROD==="0"&&De.DEV_RULES){let B=JSON.parse(De.DEV_RULES);F[_]=[...B,...F[_]]}}else g[_]!==void 0&&(F[_]=g[_])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function vr(){return(await Z.storage.sync.get("userConfig")||{}).userConfig||{}}async function Oi(e){await Z.storage.sync.set({userConfig:e})}async function yu(e,t){await Z.storage.local.set({[e]:t})}async function Fc(e){return(await Z.storage.local.get(e))[e]||""}var D7=async()=>{let e=["zh-CN"];try{e=await Z.i18n.getAcceptLanguages()}catch(r){R.warn("get browser language error:",r)}let n=e.map(r=>ye(r)).find(r=>rn[r]);return n||"en"},jp=async()=>{let e={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};return{...e,targetLanguage:Br,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function A7(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function k7(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Br;let n=await qt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ii({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ii({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>o.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var L7=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Nn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function za(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=t;if(Nn(e,i))return!1;if(Nn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!Nn(e,o)),c;function g(){return n&&n.display?!!L7.includes(n.display):Nn(e,r)}}var cn=Nn;function zi(e){return!!e.shadowRoot}function Na(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function Tu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Or(e,t=!1){let n=su;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ni(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Or(n,t)}function Bo(e,t){return Ia(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Hp(e){let{rule:t}=e,n=_7(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _7(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function vu(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),vt(r,Kb,t.toString());let a=Hp(e);return r.append(at.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Io(e,t){return e.querySelector(`[${Tp}='${t}']`)}function iy(){document.querySelectorAll(`[${Tp}]`).forEach(t=>{t.remove()})}function oy(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function sy(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{Oo(n)&&t.push(n)}),t}function Wp(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=e,l=i,c=1001;try{if(r&&r.length>0){let g={},f=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),m=new RegExp(a.replace("{word}",f.map(h=>h.k).join("|")),"g");l=l.replace(m,(h,y)=>{let T=c++;return t[`${T}`]=g[y]||y,o.length>2?h.replace(y,`<${o[2]}${T}>`):h.replace(y,`${o[0]}${T}${o[1]}`)})}s&&s.length>0&&s.forEach(g=>{let f=new RegExp(g,"gi");l=l.replace(f,(m,h)=>{let y=c++;return t[`${y}`]=M1(h),o.length>2?m.replace(h,`<${o[2]}${y}>`):m.replace(h,`${o[0]}${y}${o[1]}`)})})}catch(g){R.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function Su(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:i}=e,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||yy(s)||my(s)||by(s)||fy(s)||hy(s)||F7(s)||o.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ic(i,n,r)}function ga(e){return e.nodeType===Node.ELEMENT_NODE}function uy(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function ly(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),i=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${i}:${o}:${s}`}async function Kp(){return await qt("fakeUserId","")}async function M7(){return await qt("installedAt","")}async function cy(e){let n=Le().INSTALL_FROM,r=On(),a=await M7(),i=await Kp(),o=await yt(),s=!1,u=await ot.get(bt,null),l=!1;return u&&Qt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function dy(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!e||!t||(async()=>{let a=await Gp(e,t);r(a)})()},[e,t,r]),n}async function Gp(e,t){if(!e||!t)return;let n=!1,r,a=!0;!Ge()&&pe()||ut().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await qt("installedAt","");new Date(i).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var Rc=!1,B7=pe();function Ty(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let i of a)n.push(i)}return n}function I7(e,t){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&vy(i,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(Ua(i,pc)){if(a===!0)return!0;continue}if(xu(i.nodeName,t.inlineTags))return!0;if(!Vp(i,t))return!1}}return!0}function $p(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(xu(e.nodeName,n)||Vp(e,t)){if(Ua(e,$b)||xu(e.nodeName,["BR"]))return!1;if(Ua(e,pc))return!0;if(Vp(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return I7(e,t)}else return Ua(e,pc);return!1}function vy(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Ua(e,Vb,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Ua(e,zb))return!1;let{stayOriginalTags:r,excludeTags:a}=t,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||xu(e.nodeName,i))}function Ic(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(o=>o.trim()!=="").length>=n||!Cy(r)&&r.length>=n}function Sy(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(Cy(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function Cy(e){for(let t=0;t127)return!1;return!0}function my(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function fy(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function hy(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function by(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function yy(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Ua(e,t,n=!1){return Yp(e,t,"1",n)}function Yp(e,t,n,r=!1){return Rc&&!r?e[In]?!!(e[In]&&e[In][t]===n):!1:e.dataset[t]===n}function zo(e){return(e.innerText||e.textContent||"").trim()}function Qp(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Oc(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function vt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Rc&&!r?(e[In]||(e[In]={}),e[In][t]||(e[In][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function zc(e,t,n=!1){if(Rc&&!n){if(!e[In]||!e[In][t])return;delete e[In][t]}else delete e.dataset[t]}function No(e,t,n=!1){return Rc&&!n?!e[In]||!e[In][t]?void 0:e[In][t]:e.dataset[t]}function Vp(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!xu(e.nodeName,n)}function _e(){if(!globalThis||!globalThis.location)return"https://example.com";if(!st())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Kn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){R.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else R.warn("injectCSS failed, rootDocument does not have head node",e)}function Oo(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(B7){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function xu(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function xy(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function Ey(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||vy(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return R.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function wy(e,t,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(e,t,n)}p();function Ui(e,t,n,r,a){let i=t,o=uu[i]||[],s="";e&&o&&o.length>0&&o.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let f=n[g];if(["borderRadius"].includes(g)&&(f+="px"),s+=`--immersive-translate-theme-${i}-${g}: ${f}; `,t==="marker"&&g==="backgroundColor"&&typeof f=="string"){let{r:m,g:h,b:y}=xy(f);s+=`--immersive-translate-theme-${i}-${g}-rgb: ${m}, ${h}, ${y}; `}}}),r||(r="inherit"),e&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5352,53 +5352,53 @@ ${s}} `):t.rule.injectedCss&&(s+=t.rule.injectedCss),t.rule.additionalInjectedCss&&Array.isArray(t.rule.additionalInjectedCss)&&t.rule.additionalInjectedCss.length>0?s+=` `+t.rule.additionalInjectedCss.join(` `):t.rule.additionalInjectedCss&&(s+=` -`+t.rule.additionalInjectedCss)),s&&Kn(e,s,"immersive-translate-dynamic-injected-css")}p();p();p();var R7=0;function d(e,t,n,r,a){var i,o,s={};for(o in t)o=="ref"?i=t[o]:s[o]=t[o];var u={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R7,__source:a,__self:r};if(typeof e=="function"&&(i=e.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Oe.vnode&&Oe.vnode(u),u}function Jp({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}p();function Xp(){let[e,t]=K(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}p();p();p();var Dy={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},Ay={...nn,"zh-CN":{...Dy["zh-CN"],...nn["zh-CN"]},"zh-TW":{...Dy["zh-TW"],...nn["zh-TW"]}},Uo=Ay;function ja(e,t,n){return Rr(Ay,e,t,Br,n)}var Nc=()=>Rn.filter(e=>e!=="auto"),Zt=(e,t,n,r)=>{let a=Xb[e]||e,i=e1[e],o=t1[e],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};p();p();p();p();p();p();p();p();p();p();var zr=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(i=>{throw i});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return R.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=uc){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return R.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw R.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function ky(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${sc}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function Py(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function em(e,t,n,r,a,i,o){if(R.debug(`autoSyncStrategy accessToken: ${e}`),t===null){R.debug("autoSyncStrategy settings is null");return}let s=new zr(e);try{let u=(await s.findByName(uc)).files;R.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:f}=c,m=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(R.debug("remoteUpdatedAt",m,"localUpdatedAt",h),m>h)R.debug("remote is newer, update local config",g),n(g),i&&i(!0);else if(m.getTime()===h.getTime())R.debug("remote and local are the same, do nothing"),i&&i(!1);else if(m(await e.removeAuthInfo(),eu()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Z.storage.local.get(_a);if(t[_a])return t[_a]}static async removeAuthInfo(){return await Z.storage.local.remove(_a)}static setAuthInfo(t){return Z.storage.local.set({[_a]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(R.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await Ly(n.access_token).then(i=>!0).catch(i=>!1))return Promise.resolve(n);let r=ky(this._state,this._redirectUrl);return R.debug(this.CLASSNAME,"auth url: "+r),eu()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Z.storage.local.set({[tu]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,i)=>{let o=()=>{Z.tabs.onUpdated.removeListener(s),Z.tabs.onRemoved.removeListener(u)},s=(f,m,h)=>{if(R.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===f){let y=new URL(h.url||""),T=Py(h.url);y.pathname.startsWith("/auth-done")&&T?.access_token&&(R.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:T.access_token}),r=!0,Z.tabs.remove(f),o())}},u=(f,m)=>{R.debug(this.CLASSNAME,"create tab onRemoved: "+f),(f===n||!r)&&(o(),i(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Z.windows===void 0?g=Z.tabs.create({url:t}).then(f=>{n=f.id}):g=Z.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(f=>{n=f.tabs[0].id}),g.then(()=>{Z.tabs.onUpdated.addListener(s),Z.tabs.onRemoved.addListener(u)}).catch(f=>{R.debug(this.CLASSNAME,"create tab failed: "+f),i(f)})})}};var z7="https://www.googleapis.com/oauth2/v3/tokeninfo",N7=sc,U7=Le().REDIRECT_URL;function Ly(e){if(!e)throw"Authorization failure";let t=`${z7}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((i,o)=>{a.status!=200&&o("Token validation error"),a.json().then(s=>{s.aud&&s.aud===N7?i(e):o("Token validation error")})})}return fetch(n).then(r)}function _y(e,t=!1){let n=U7;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,i=window.location.port;n=`${window.location.protocol}//${a}${i?`:${i}`:""}/auth-done/`}return new Ha(e,n).auth(t)}function tm(e,t=!1){return _y(e,t).then(n=>n.access_token||null)}p();p();p();function Wa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function q7(e,t){return e<>>32-t}function qc(e,t,n,r,a,i){return Wa(q7(Wa(Wa(t,e),Wa(r,i)),a),n)}function mn(e,t,n,r,a,i,o){return qc(t&n|~t&r,e,t,a,i,o)}function fn(e,t,n,r,a,i,o){return qc(t&r|n&~r,e,t,a,i,o)}function hn(e,t,n,r,a,i,o){return qc(t^n^r,e,t,a,i,o)}function bn(e,t,n,r,a,i,o){return qc(n^(t|~r),e,t,a,i,o)}function Uc(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function nm(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=Uc(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Uc(a.concat(nm(t)),512+t.length*8),My(Uc(i.concat(o),512+128))}function Fy(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function rm(e){return unescape(encodeURIComponent(e))}function By(e){return j7(rm(e))}function W7(e){return Fy(By(e))}function Iy(e,t){return H7(rm(e),rm(t))}function K7(e,t){return Fy(Iy(e,t))}function Gn(e,t,n){return t?n?Iy(t,e):K7(t,e):n?By(e):W7(e)}var qo=[];async function xu(e,t){return await new Promise((n,r)=>{let a=e,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function am(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await V7(t,e)}async function im(e){let t=Gn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await G7(n,t)}async function G7(e,t){let n=await xu(e);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function V7(e,t){let n=await xu(e);return(await om()).includes(e)||await $7(e),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function $7(e){let t="cache_list",n=await xu(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=i=>{n.close(),qo.push(e)},a.onerror=i=>{n.close()}}async function om(){if(qo&&qo.length>0)return qo;let e=await xu(ee+"-cacheList","cache_list");return qo=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{e.close(),t(a.result)},a.onerror=i=>{e.close(),t([])}}),qo}async function sm(){try{let e=[];(await om()).forEach(r=>{e.push(Y7(r))});let n=await Promise.all(e);return cu(n.reduce((r,a)=>r+a,0))}catch{return cu(0)}}async function Y7(e){let t=await xu(e),r=[...t.objectStoreNames].reduce((o,s)=>{let u=Q7(t,s);return o.push(u),o},[]),a=await Promise.all(r);return t.close(),a.reduce((o,s)=>o+s,0)}async function Q7(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,i=e.transaction([t]).objectStore(t).openCursor();i.onsuccess=o=>{let s=i.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},i.onerror=o=>r("error in "+t+": "+o)})}async function Ry(){try{let t=(await om()).map(r=>Z7(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function Z7(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}p();function J7(e,t){return Math.floor(Math.random()*(t-e+1))+e}var X7=30,um="RATE_LIMITER_TICKS",qi=class e{static strictTicks={};static clearStrictTicks(){bu(um,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Fc(um);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){R.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await bu(um,JSON.stringify(this.strictTicks))}catch(a){R.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=J7(4,X7);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var Eu=Pp()?["action"]:["browser_action","page_action"],tD=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...Eu]},{id:ru,contexts:Eu},{id:au,contexts:Eu},{id:iu,contexts:Eu},{id:Nb,contexts:Eu}];async function jc(e){e=e||await bt(),R.debug("update ContextMenu",e);for(let t of tD){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=ja(`browser.${t.id}`,e.interfaceLanguage);Z.contextMenus.update(t.id,{title:r,visible:n})}}p();function Oy(e,t){let n=t;n||(n=Le().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,i=new RegExp(a),o=n.match(i);return o?o[1]:""}p();function jo(e,t,n=[],r){let a=["notranslate"];return r&&a.push(Jb),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${Cp}-theme-${e}`):a.push(`${Sp}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Cp):a.push(Sp),a}function Ho(e){let t=["notranslate",fc];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function zy(e,t,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=e;o=o||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ni(n,!0),f="afterend",m=g[0],h=g[1],y=`${m}(\\d+)${h}`,T=new RegExp(y,"g"),b=rt.sanitize(u);o.length>0&&(b=b.replace(T,M=>{let C=b.indexOf(M),v=b[C-1]===" ",A=b[C+M.length]===" ",S=M.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),N=Number(S);if(isNaN(N))return M;let F=o[N];if(F&&F.type==="element"){let P=F.value.outerHTML;return v||(P=" "+P),A||(P=P+" "),P}else R.error("variable type not supported",F,M);return M}));let x=jo(i,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(Zb);let w=Ho(i),L="";return r.translationBlockStyle&&(L=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${L} class="${x.join(" ")}" ${Fr}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${Fr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${Fr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:f}}p();function ut(e){fp({type:"success",text:e})}function an(e){fp({type:"error",text:e})}p();p();p();p();var lm={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Z.storage[n].get(r)},set:(e,t,n)=>Z.storage[n].set({[e]:t})};function Hc(e,t,n){let[r]=K(()=>typeof t=="function"?t():t),[a]=K(n),[i,o]=K(r),[s,u]=K(!1),[l,c]=K("");le(()=>{lm.get(e,r,a).then(f=>{f[e]&&o(f[e]),u(!0),c("")}).catch(f=>{u(!1),c(f)})},[e,r,a]);let g=qe(f=>{let m=typeof f=="function"?f(i):f;R.debug("new settings",m),lm.set(e,m,a).then(()=>{o(m),u(!0),c("")}).catch(h=>{o(m),u(!1),c(h)})},[a,e,i]);return[i,g,s,l]}p();function Wc(e,t,n){let r=[];return function(){let[i,o,s,u]=Hc(e,t,n),l=qe(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Ny(e,t){return Wc(e,t,"local")}function Uy(e,t){return Wc(e,t,"sync")}var nD="userConfig",rD=null,aD=Uy(nD,rD);function $e(e){let[t,n,r,a]=aD(),i=qe(o=>{let s=typeof o=="function"?o(t):o;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,i,r,a,n]}p();p();p();p();function Kc(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=t,s=[],u={};for(let l=0;l2&&(b=`<${i[2]}${T}>`),u[T]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";f&&(y=Na(cm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&ln(c,a)){let T=Object.keys(u).length,b=`${i[0]}${T}${i[1]}`;i.length>2&&(b=`<${i[2]}${T}>`),u[T]=c;let x=dm(s).endsWith(" ")?" ":"",w=Na(c.innerText||c.textContent),L=Na(c.nextSibling).startsWith(" ")?" ":"",M=yu(x+w+L),C=M[0]+b+M[1];if(x===" ")C=C.trimStart();else if(!C.startsWith(" ")){let v=yu(c.previousSibling)[1];v===""&&(v=" "),C=v+C}s.push({text:C,type:"variable"})}else{let y=dm(s).endsWith(" ")?" ":"",T=Na(c.innerText||c.textContent);f&&(T=Na(cm(c)));let b=Na(c.nextSibling).startsWith(" ")?" ":"",x=yu(y+T+b),w=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")w=w.trimStart();else{let L=yu(c.previousSibling)[1];L===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(L=" "),w=L+w}s.push({text:w,type:"text"})}else{let y=dm(s).endsWith(" ")?" ":"",T="";c.textContent&&(T=Na(cm(c))),y===" "&&(T=T.trimStart()),s.push({text:T,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(f=s[c-1].text),c/g,">"))}e.targetText=rt.sanitize(e.targetText);let a=!1,i=e.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ni(t);if(l.length>2){let c=l[2];return iD({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=zy(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function cm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function iD(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;o=o||[];let g=e.targetText;g=rt.sanitize(g);let f=g,m=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);o.length>0&&(f=f.replace(m,x=>{let w=f.indexOf(x),L=f[w-1]===" ",M=f[w+x.length]===" ",C=x.match(h);if(!C)return x;let v=C[1],A=Number(v);if(isNaN(A))return x;let D=o[Number(A)];if(D&&D.type==="element"){let S=D.value.outerHTML;return L||(S=" "+S),M||(S=S+" "),S}else if(D&&D.type==="text"){let S=D.value;return L||(S=" "+S),M||(S=S+" "),S}else R.error("variable type not supported",D,x);return x}));let y=jo(l,n,r||[],s),T=Ho(l),b="";return c&&(b=`style="${c}"`),f=`<${a} ${b} class="${y.join(" ")}" ${Fr}="1"><${a} class="${T.join(" ")}" ${Fr}="1">${f}`,n||(i==="smart"?f=`
${f}`:f=`${i}${f}`),n&&(i!=="smart"?f=`${i}${f}`:f=`<${a} class="notranslate" ${Fr}="1"> ${f}`),u==="smart"?f=`${f}`:f=`${f}${u}`,{html:f,position:"afterend"}}function dm(e){let t=e[e.length-1];return t?t.text:""}function gm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let g=c.match(s);if(!g)return c;let f=g[1],m=Number(f);if(isNaN(m))return c;let h=r[f];return h||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}p();p();p();p();p();p();var H$=Hy(2),jy=Hy(3);function Hy(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-e+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+e);return r}}p();var oD=/\s+/g,sD=/[\t\n\v\f\r ]+/g;function Wy(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?uD:lD;return String(e).replace(t.style==="html"?sD:oD,t.trim?cD(n):n)}function uD(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function lD(){return" "}function cD(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var Ky={}.hasOwnProperty;function dD(e){return e==null?"":Wy(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function gD(e){return jy(" "+dD(e)+" ")}function pD(e){let t=gD(e),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function vD(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function SD(e,t,n,r){t=xD(t,n,r);let a=[],i;if(t)for(i in t)Gc.call(t,i)&&a.push([i,CD(e,t[i])]);return a.length===0?mm():a.sort(ED)}function CD(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharacterso+s.length,0));let i=e.length-r;for(let o of BD){let s=o[1],u=o[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/i>.5?t==="zh-CN"?Xy(e)?"zh-TW":"zh-CN":t:"auto"}var tT=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],fm=new Map(tT),ID=new Map(tT.map(([e,t])=>[t,e]));function nT(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>ID.get(s));!t&&t!==0&&(t=25);let a=$c(e);if(a!=="auto")return a;let i={minLength:t,whitelist:[...fm.keys()]},o=$y(e,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(g=="eng"&&f<.95)break;return fm.get(g)}}let[s,u]=o[0],l=fm.get(s);if(l&&u>.9)return l}}catch(r){R.error(r)}return"auto"}p();p();var hm="Original";function et(){return hm}function An(e){hm=e,rT(hm)}p();var iT="auto",Yc="auto",aT="auto";function oT(e){iT=e}function ar(e){Yc=e}function Mt(){return Yc!=="auto"?Yc:aT!=="auto"?aT:iT}function Qc(){return Yc}p();function ji(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ga(e){try{if(!e||!ji(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";t=o.getAttribute(i)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var tt={},Va=async function(e,t){let{method:n,data:r}=e,a=await tt.updateGlobalContext(),i=Date.now();if(R.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await tt.translateTheWholePage(r),at(yr,i);else if(n==="translateTheMainPage")await tt.translateTheMainPage(r),at(yr,i);else if(n==="translateToThePageEndImmediately")await tt.translateToThePageEndImmediately(r),at(yr,i);else if(n==="toggleTranslatePage")await tt.toggleTranslatePage(r),at(yr,i);else if(n==="toggleTranslateTheWholePage")await tt.toggleTranslateTheWholePage(r),at(yr,i);else if(n==="toggleTranslateTheMainPage")await tt.toggleTranslateTheMainPage(r),at(yr,i);else if(n==="toggleOnlyTransation")await tt.ensureSwitchTranslationMode(r),at(yr,i);else if(n==="translatePage")await tt.translatePage(a,r),at(yr,i);else if(n==="toggleTranslationMask")await tt.toggleTranslationMask(r);else if(n==="restorePage")tt.restorePage();else if(n==="retryFailedParagraphs")tt.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await tt.switchTranslationMode(r.mode),await tt.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")tt.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(cc,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await tt.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(nu,{detail:r}));else if(n==="translateWithOpenAI")await tt.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await tt.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await tt.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await tt.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await tt.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await tt.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await tt.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")ot()||await tt.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!ot())return JSON.stringify(a)}};function sT(e){Object.assign(tt,e)}function uT(e){Object.assign(tt,e)}function lT(e){Object.assign(tt,e)}var RD=function(e,t){let{method:n,data:r}=e;if(R.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return et();if(n==="getCurrentPageLanguage"){let a=Mt();return tt.detectCurrentPageLanguage().catch(i=>{R.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return ar(r),Mt();if(n==="getContextString"){let a=tt.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=tt.getPureGlobalContext();return Ga(a?.rule)}}},Zc,Jc;function cT(){let e=Xc();ot()||OD(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Xc(){return Zc||(Zc=new ca("content_script",!1).getConnection("main",Va),Zc)}function OD(){return Jc||(Jc=new ca("content_script",!1).getConnection("main_sync",RD,{sync:!0}),Jc)}p();var bm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],e0="https://transmart.qq.com/api/imt",pa=class e{static langMapReverse=new Map(bm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:e0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=e.langMapReverse.get(a);return i||a}};async function Ft(e){return await Xc().sendMessage("background:main",e)}function de(e){return oc()?kc({method:"request",data:e}):pe()||ic()?(e.fetchPolyfill=globalThis.GM_fetch,Tr(e)):Ft({method:"fetch",data:e})}function ir(){return pe()?bt():Ft({method:"getConfig"})}function kn(e){return pe()?Oi(e):Ft({method:"setUserConfig",data:e})}function Pn(){return pe()?vr():Ft({method:"getUserConfig"})}function Du(){return pe()?Wt():Ft({method:"getLocalConfig"})}function t0(e){return pe()?Kt(e):Ft({method:"setLocalConfig",data:e})}function dT(e){return pe()?ry(e):Ft({method:"setBuildinConfig",data:e})}async function Ue(e){if(e.text){let n=$c(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(pe()||Ge()){if(e.translateService&&!yc.includes(e.translateService))return Promise.resolve("auto");let r=nT(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Ft({method:"detectLanguage",data:e});return Promise.resolve(t)}function gT(){return Ft({method:"detectTabLanguage"})}async function n0(e){let t=await Ue({text:e,pageLangs:["en"]});try{if(pe()||Ge()){let n=e.substring(0,200);t=await pa.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function rT(e){let t=new CustomEvent(ki,{detail:e});if(document.dispatchEvent(t),pe())return;Xc().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function pT(e){return pe()?im(e):Ft({method:"queryParagraphCache",data:e})}async function mT(e){if(pe()){await am(e);return}return Ft({method:"setParagraphCache",data:e})}async function fT(){if(pe())return Promise.resolve();await Ft({method:"mockRequest"})}function Wo(e=!1,t=""){return pe()?(Z.runtime.openOptionsPage(e,t),Promise.resolve()):Ft({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function r0(e=""){return pe()||Ge()?Le().OPTIONS_URL:Z.runtime.getURL("options.html")}function hT(e=""){return Z&&Z.runtime&&Z.runtime.getURL?Z.runtime.getURL("options.html"):""}function a0(e=!1){return pe()?(Z.extra.openAboutPage(e),Promise.resolve()):Ft({method:"openAboutPage"})}function Ko(e){return pe()?(Z.extra.openInTab(e),Promise.resolve()):Ft({method:"openInTab",data:e})}function bT(e=!1){return pe()?(Z.extra.openEbookViewerPage(e),Promise.resolve()):Ft({method:"openEbookViewerPage"})}function yT(e=!1){return pe()?(Z.extra.openEbookBuilderPage(e),Promise.resolve()):Ft({method:"openEbookBuilderPage"})}function TT(e){Ge()}function Go(e=!1,t){return pe()?(Z.extra.openPdfViewerPage(e),Promise.resolve()):Ft({method:"openPdfViewerPage",data:{url:t}})}function vT(e=!1){return pe()?(Z.extra.openSubtitleBuilderPage(e),Promise.resolve()):Ft({method:"openSubtitleBuilderPage"})}function Vo(e){return pe()?Promise.resolve():Ft({method:"setBadge",data:{text:e}})}function ST(){return pe()?(R.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Ft({method:"autoSyncLatestConfig"})}function i0(e,t=!1){return pe()?Z.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function CT(e,t){return pe()?qi.getDelay(e,t):Ft({method:"getDelay",data:{key:e,options:t}})}var Pe=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,i=!1,o=!1,s=[],u=null,l=new Set;for(let T of a)T.from&&T.from!=="auto"&&l.add(T.from),T.refresh&&(i=!0),T.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=I1(a,c,g)}catch(T){if(r)for(let b=0;bT));let f=[],m=[],h=(T,b,x)=>{let w="";if(b.translatedTexts&&b.translatedTexts[0]&&(w=b.translatedTexts[0]),m[T]||(m[T]=b,m[T].translatedTexts=Array(b.sentenceTotalParts).fill(null)),m[T].hasError)return;if(x){let C=x instanceof Q?new Q(x.name,x.message).initNetWork(x.status).initData(x.data):x;m[T].hasError=!0,b.callback&&b.callback(C,null,b.sentence);return}m[T].translatedTexts[b.partIndex]=w;let L=m[T],M=0;for(let C=0;C{let M=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(M=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:M,to:b.to,url:x,options:n,refresh:i,debug:o}),sourceTempSentences:b.tempSentences};{let C=Qb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(C=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let A=[],D=Or(this.serviceConfig);if(b.tempSentences.forEach((q,I)=>{let k=Kp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});q.force!==!0&&(k&&k.text&&k.text.trim().lengthI.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:q,from:M,to:b.to})}let S="";v&&v.length>=2?S=A.map((q,I)=>{let{item:k}=q;return I===A.length-1?k.text:k.text+v[0]+(I+1)+v[1]}).join(""):S=A.map(({item:q})=>q.text).join(C);let N=await this.translate({text:S,from:M,to:b.to,url:x,options:{...n,rawTextArrayLength:A.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=N,P=[];if(v&&v.length>=2){let q=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(q=v[2]);let I=new RegExp(q,"g");P=F.split(I)}else P=F.split(C);let O=[];if(P.length>A.length){for(let q=0;qq.text);return D=Or(this.serviceConfig,!0),O.forEach((q,I)=>{let k=A[I],_=k.index,B=k.variables||{};Object.keys(B).length>0&&(q=gm({text:q,delimiters:D,variables:B})),z[_]=q}),{sourceTempSentences:b.tempSentences,text:z,from:N.from,to:N.to}}};f.push(L().then(M=>{let{text:C,sourceTempSentences:v}=M;for(let A=0;A{if(M instanceof Q&&M.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let C=0;C{let b=T.sentence.text;return T.translatedTexts&&T.translatedTexts.length>0&&(b=T.translatedTexts.join("")),{...T.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],i=Or(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,f)=>{let m=Kp({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[f]!==!0&&(m&&m.text&&m.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){R.debug("formatAndTranslateList error",t,l)}let o=await this.translateList(n),{text:s}=o,u=t.text.map(l=>l);return i=Or(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let f=g.index,m=g.variables,h=Object.keys(m);u[f]=l,h.length>0&&(u[f]=gm({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(t){return Ue({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};p();p();var $o="input is invalid type",ym=typeof window=="object",$a=ym?window:{};$a.JS_SHA256_NO_WINDOW&&(ym=!1);var zD=!ym&&typeof self=="object",ND=!$a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;ND?$a=global:zD&&($a=self);var pQ=!$a.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,mQ=typeof define=="function"&&define.amd,Au=!$a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Te="0123456789abcdef".split(""),UD=[-2147483648,8388608,32768,128],Sr=[24,16,8,0],o0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s0=["hex","array","digest","arrayBuffer"],on=[];($a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});Au&&($a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var xT=function(e,t){return function(n){return new sn(t,!0).update(n)[e]()}},wT=function(e){var t=xT("hex",e);t.create=function(){return new sn(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};sn.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=UD[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};sn.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,g,f,m,h,y,T,b,x,w;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],g=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(T=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(T=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),T=e&t,f=T^e&n^w,y=a&i^~a&o,m=s+g+y+o0[l]+u[l],h=c+f,s=r+m<<0,r=m+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,f=b^r&t^T,y=s&a^~s&i,m=o+g+y+o0[l+1]+u[l+1],h=c+f,o=n+m<<0,n=m+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),x=n&r,f=x^n&e^b,y=o&s^~o&a,m=i+g+y+o0[l+2]+u[l+2],h=c+f,i=t+m<<0,t=m+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),w=t&n,f=w^t&r^x,y=i&o^~i&s,m=a+g+y+o0[l+3]+u[l+3],h=c+f,a=e+m<<0,e=m+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};sn.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=Te[e>>28&15]+Te[e>>24&15]+Te[e>>20&15]+Te[e>>16&15]+Te[e>>12&15]+Te[e>>8&15]+Te[e>>4&15]+Te[e&15]+Te[t>>28&15]+Te[t>>24&15]+Te[t>>20&15]+Te[t>>16&15]+Te[t>>12&15]+Te[t>>8&15]+Te[t>>4&15]+Te[t&15]+Te[n>>28&15]+Te[n>>24&15]+Te[n>>20&15]+Te[n>>16&15]+Te[n>>12&15]+Te[n>>8&15]+Te[n>>4&15]+Te[n&15]+Te[r>>28&15]+Te[r>>24&15]+Te[r>>20&15]+Te[r>>16&15]+Te[r>>12&15]+Te[r>>8&15]+Te[r>>4&15]+Te[r&15]+Te[a>>28&15]+Te[a>>24&15]+Te[a>>20&15]+Te[a>>16&15]+Te[a>>12&15]+Te[a>>8&15]+Te[a>>4&15]+Te[a&15]+Te[i>>28&15]+Te[i>>24&15]+Te[i>>20&15]+Te[i>>16&15]+Te[i>>12&15]+Te[i>>8&15]+Te[i>>4&15]+Te[i&15]+Te[o>>28&15]+Te[o>>24&15]+Te[o>>20&15]+Te[o>>16&15]+Te[o>>12&15]+Te[o>>8&15]+Te[o>>4&15]+Te[o&15];return this.is224||(u+=Te[s>>28&15]+Te[s>>24&15]+Te[s>>20&15]+Te[s>>16&15]+Te[s>>12&15]+Te[s>>8&15]+Te[s>>4&15]+Te[s&15]),u};sn.prototype.toString=sn.prototype.hex;sn.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};sn.prototype.array=sn.prototype.digest;sn.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function u0(e,t,n){var r,a=typeof e;if(a==="string"){var i=[],o=e.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);e=i}else if(a==="object"){if(e===null)throw new Error($o);if(Au&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!Au||!ArrayBuffer.isView(e)))throw new Error($o)}else throw new Error($o);e.length>64&&(e=new sn(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}sn.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}u0.prototype=new sn;u0.prototype.finalize=function(){if(sn.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();sn.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),sn.prototype.finalize.call(this)}};var Yo=wT();Yo.sha256=Yo;Yo.sha224=wT(!0);Yo.sha256.hmac=DT();Yo.sha224.hmac=DT(!0);var AT=Yo;var kT=AT.sha256;function Cr(e){return Promise.resolve(kT(e))}function l0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Ya(e,t){let n=kT.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function PT(e,t){let n=await Ya(e,t);return l0(n)}async function c0(e,t){let n=qD(t),r=await Ya(e,n);return l0(r)}function qD(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var LT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],ku=class e extends Pe{static langMap=new Map(LT);maxTextGroupLength=50;static langMapReverse=new Map(LT.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new Q("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Cr(a)].join(` +`+t.rule.additionalInjectedCss)),s&&Kn(e,s,"immersive-translate-dynamic-injected-css")}p();p();p();var R7=0;function d(e,t,n,r,a){var i,o,s={};for(o in t)o=="ref"?i=t[o]:s[o]=t[o];var u={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R7,__source:a,__self:r};if(typeof e=="function"&&(i=e.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Oe.vnode&&Oe.vnode(u),u}function Zp({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}p();function Jp(){let[e,t]=K(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}p();p();p();var Dy={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},Ay={...rn,"zh-CN":{...Dy["zh-CN"],...rn["zh-CN"]},"zh-TW":{...Dy["zh-TW"],...rn["zh-TW"]}},Uo=Ay;function ja(e,t,n){return Rr(Ay,e,t,Br,n)}var Nc=()=>Rn.filter(e=>e!=="auto"),Zt=(e,t,n,r)=>{let a=Xb[e]||e,i=e1[e],o=t1[e],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};p();p();p();p();p();p();p();p();p();p();var zr=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(i=>{throw i});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return R.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=uc){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return R.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw R.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function ky(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${sc}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function Py(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function Xp(e,t,n,r,a,i,o){if(R.debug(`autoSyncStrategy accessToken: ${e}`),t===null){R.debug("autoSyncStrategy settings is null");return}let s=new zr(e);try{let u=(await s.findByName(uc)).files;R.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:f}=c,m=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(R.debug("remoteUpdatedAt",m,"localUpdatedAt",h),m>h)R.debug("remote is newer, update local config",g),n(g),i&&i(!0);else if(m.getTime()===h.getTime())R.debug("remote and local are the same, do nothing"),i&&i(!1);else if(m(await e.removeAuthInfo(),tu()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Z.storage.local.get(_a);if(t[_a])return t[_a]}static async removeAuthInfo(){return await Z.storage.local.remove(_a)}static setAuthInfo(t){return Z.storage.local.set({[_a]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(R.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await Ly(n.access_token).then(i=>!0).catch(i=>!1))return Promise.resolve(n);let r=ky(this._state,this._redirectUrl);return R.debug(this.CLASSNAME,"auth url: "+r),tu()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Z.storage.local.set({[nu]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,i)=>{let o=()=>{Z.tabs.onUpdated.removeListener(s),Z.tabs.onRemoved.removeListener(u)},s=(f,m,h)=>{if(R.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===f){let y=new URL(h.url||""),T=Py(h.url);y.pathname.startsWith("/auth-done")&&T?.access_token&&(R.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:T.access_token}),r=!0,Z.tabs.remove(f),o())}},u=(f,m)=>{R.debug(this.CLASSNAME,"create tab onRemoved: "+f),(f===n||!r)&&(o(),i(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Z.windows===void 0?g=Z.tabs.create({url:t}).then(f=>{n=f.id}):g=Z.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(f=>{n=f.tabs[0].id}),g.then(()=>{Z.tabs.onUpdated.addListener(s),Z.tabs.onRemoved.addListener(u)}).catch(f=>{R.debug(this.CLASSNAME,"create tab failed: "+f),i(f)})})}};var z7="https://www.googleapis.com/oauth2/v3/tokeninfo",N7=sc,U7=Le().REDIRECT_URL;function Ly(e){if(!e)throw"Authorization failure";let t=`${z7}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((i,o)=>{a.status!=200&&o("Token validation error"),a.json().then(s=>{s.aud&&s.aud===N7?i(e):o("Token validation error")})})}return fetch(n).then(r)}function _y(e,t=!1){let n=U7;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,i=window.location.port;n=`${window.location.protocol}//${a}${i?`:${i}`:""}/auth-done/`}return new Ha(e,n).auth(t)}function em(e,t=!1){return _y(e,t).then(n=>n.access_token||null)}p();p();p();function Wa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function q7(e,t){return e<>>32-t}function qc(e,t,n,r,a,i){return Wa(q7(Wa(Wa(t,e),Wa(r,i)),a),n)}function mn(e,t,n,r,a,i,o){return qc(t&n|~t&r,e,t,a,i,o)}function fn(e,t,n,r,a,i,o){return qc(t&r|n&~r,e,t,a,i,o)}function hn(e,t,n,r,a,i,o){return qc(t^n^r,e,t,a,i,o)}function bn(e,t,n,r,a,i,o){return qc(n^(t|~r),e,t,a,i,o)}function Uc(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function tm(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=Uc(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Uc(a.concat(tm(t)),512+t.length*8),My(Uc(i.concat(o),512+128))}function Fy(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function nm(e){return unescape(encodeURIComponent(e))}function By(e){return j7(nm(e))}function W7(e){return Fy(By(e))}function Iy(e,t){return H7(nm(e),nm(t))}function K7(e,t){return Fy(Iy(e,t))}function Gn(e,t,n){return t?n?Iy(t,e):K7(t,e):n?By(e):W7(e)}var qo=[];async function Eu(e,t){return await new Promise((n,r)=>{let a=e,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function rm(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await V7(t,e)}async function am(e){let t=Gn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await G7(n,t)}async function G7(e,t){let n=await Eu(e);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function V7(e,t){let n=await Eu(e);return(await im()).includes(e)||await $7(e),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function $7(e){let t="cache_list",n=await Eu(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=i=>{n.close(),qo.push(e)},a.onerror=i=>{n.close()}}async function im(){if(qo&&qo.length>0)return qo;let e=await Eu(ee+"-cacheList","cache_list");return qo=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{e.close(),t(a.result)},a.onerror=i=>{e.close(),t([])}}),qo}async function om(){try{let e=[];(await im()).forEach(r=>{e.push(Y7(r))});let n=await Promise.all(e);return du(n.reduce((r,a)=>r+a,0))}catch{return du(0)}}async function Y7(e){let t=await Eu(e),r=[...t.objectStoreNames].reduce((o,s)=>{let u=Q7(t,s);return o.push(u),o},[]),a=await Promise.all(r);return t.close(),a.reduce((o,s)=>o+s,0)}async function Q7(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,i=e.transaction([t]).objectStore(t).openCursor();i.onsuccess=o=>{let s=i.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},i.onerror=o=>r("error in "+t+": "+o)})}async function Ry(){try{let t=(await im()).map(r=>Z7(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function Z7(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}p();function J7(e,t){return Math.floor(Math.random()*(t-e+1))+e}var X7=30,sm="RATE_LIMITER_TICKS",qi=class e{static strictTicks={};static clearStrictTicks(){yu(sm,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Fc(sm);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){R.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await yu(sm,JSON.stringify(this.strictTicks))}catch(a){R.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=J7(4,X7);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var wu=kp()?["action"]:["browser_action","page_action"],tD=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...wu]},{id:au,contexts:wu},{id:iu,contexts:wu},{id:ou,contexts:wu},{id:Nb,contexts:wu}];async function jc(e){e=e||await yt(),R.debug("update ContextMenu",e);for(let t of tD){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=ja(`browser.${t.id}`,e.interfaceLanguage);Z.contextMenus.update(t.id,{title:r,visible:n})}}p();function Oy(e,t){let n=t;n||(n=Le().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,i=new RegExp(a),o=n.match(i);return o?o[1]:""}p();function jo(e,t,n=[],r){let a=["notranslate"];return r&&a.push(Jb),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${Sp}-theme-${e}`):a.push(`${vp}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Sp):a.push(vp),a}function Ho(e){let t=["notranslate",fc];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function zy(e,t,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=e;o=o||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ni(n,!0),f="afterend",m=g[0],h=g[1],y=`${m}(\\d+)${h}`,T=new RegExp(y,"g"),b=at.sanitize(u);o.length>0&&(b=b.replace(T,M=>{let C=b.indexOf(M),v=b[C-1]===" ",A=b[C+M.length]===" ",S=M.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),N=Number(S);if(isNaN(N))return M;let F=o[N];if(F&&F.type==="element"){let P=F.value.outerHTML;return v||(P=" "+P),A||(P=P+" "),P}else R.error("variable type not supported",F,M);return M}));let x=jo(i,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(Zb);let w=Ho(i),L="";return r.translationBlockStyle&&(L=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${L} class="${x.join(" ")}" ${Fr}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${Fr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${Fr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:f}}p();function lt(e){mp({type:"success",text:e})}function on(e){mp({type:"error",text:e})}p();p();p();p();var um={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Z.storage[n].get(r)},set:(e,t,n)=>Z.storage[n].set({[e]:t})};function Hc(e,t,n){let[r]=K(()=>typeof t=="function"?t():t),[a]=K(n),[i,o]=K(r),[s,u]=K(!1),[l,c]=K("");le(()=>{um.get(e,r,a).then(f=>{f[e]&&o(f[e]),u(!0),c("")}).catch(f=>{u(!1),c(f)})},[e,r,a]);let g=qe(f=>{let m=typeof f=="function"?f(i):f;R.debug("new settings",m),um.set(e,m,a).then(()=>{o(m),u(!0),c("")}).catch(h=>{o(m),u(!1),c(h)})},[a,e,i]);return[i,g,s,l]}p();function Wc(e,t,n){let r=[];return function(){let[i,o,s,u]=Hc(e,t,n),l=qe(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Ny(e,t){return Wc(e,t,"local")}function Uy(e,t){return Wc(e,t,"sync")}var nD="userConfig",rD=null,aD=Uy(nD,rD);function Ye(e){let[t,n,r,a]=aD(),i=qe(o=>{let s=typeof o=="function"?o(t):o;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,i,r,a,n]}p();p();p();p();function Kc(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=t,s=[],u={};for(let l=0;l2&&(b=`<${i[2]}${T}>`),u[T]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";f&&(y=Na(lm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&cn(c,a)){let T=Object.keys(u).length,b=`${i[0]}${T}${i[1]}`;i.length>2&&(b=`<${i[2]}${T}>`),u[T]=c;let x=cm(s).endsWith(" ")?" ":"",w=Na(c.innerText||c.textContent),L=Na(c.nextSibling).startsWith(" ")?" ":"",M=Tu(x+w+L),C=M[0]+b+M[1];if(x===" ")C=C.trimStart();else if(!C.startsWith(" ")){let v=Tu(c.previousSibling)[1];v===""&&(v=" "),C=v+C}s.push({text:C,type:"variable"})}else{let y=cm(s).endsWith(" ")?" ":"",T=Na(c.innerText||c.textContent);f&&(T=Na(lm(c)));let b=Na(c.nextSibling).startsWith(" ")?" ":"",x=Tu(y+T+b),w=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")w=w.trimStart();else{let L=Tu(c.previousSibling)[1];L===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(L=" "),w=L+w}s.push({text:w,type:"text"})}else{let y=cm(s).endsWith(" ")?" ":"",T="";c.textContent&&(T=Na(lm(c))),y===" "&&(T=T.trimStart()),s.push({text:T,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(f=s[c-1].text),c/g,">"))}e.targetText=at.sanitize(e.targetText);let a=!1,i=e.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ni(t);if(l.length>2){let c=l[2];return iD({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=zy(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function lm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function iD(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;o=o||[];let g=e.targetText;g=at.sanitize(g);let f=g,m=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);o.length>0&&(f=f.replace(m,x=>{let w=f.indexOf(x),L=f[w-1]===" ",M=f[w+x.length]===" ",C=x.match(h);if(!C)return x;let v=C[1],A=Number(v);if(isNaN(A))return x;let D=o[Number(A)];if(D&&D.type==="element"){let S=D.value.outerHTML;return L||(S=" "+S),M||(S=S+" "),S}else if(D&&D.type==="text"){let S=D.value;return L||(S=" "+S),M||(S=S+" "),S}else R.error("variable type not supported",D,x);return x}));let y=jo(l,n,r||[],s),T=Ho(l),b="";return c&&(b=`style="${c}"`),f=`<${a} ${b} class="${y.join(" ")}" ${Fr}="1"><${a} class="${T.join(" ")}" ${Fr}="1">${f}`,n||(i==="smart"?f=`
${f}`:f=`${i}${f}`),n&&(i!=="smart"?f=`${i}${f}`:f=`<${a} class="notranslate" ${Fr}="1"> ${f}`),u==="smart"?f=`${f}`:f=`${f}${u}`,{html:f,position:"afterend"}}function cm(e){let t=e[e.length-1];return t?t.text:""}function dm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let g=c.match(s);if(!g)return c;let f=g[1],m=Number(f);if(isNaN(m))return c;let h=r[f];return h||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}p();p();p();p();p();p();var H$=Hy(2),jy=Hy(3);function Hy(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-e+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+e);return r}}p();var oD=/\s+/g,sD=/[\t\n\v\f\r ]+/g;function Wy(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?uD:lD;return String(e).replace(t.style==="html"?sD:oD,t.trim?cD(n):n)}function uD(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function lD(){return" "}function cD(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var Ky={}.hasOwnProperty;function dD(e){return e==null?"":Wy(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function gD(e){return jy(" "+dD(e)+" ")}function pD(e){let t=gD(e),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function vD(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function SD(e,t,n,r){t=xD(t,n,r);let a=[],i;if(t)for(i in t)Gc.call(t,i)&&a.push([i,CD(e,t[i])]);return a.length===0?pm():a.sort(ED)}function CD(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharacterso+s.length,0));let i=e.length-r;for(let o of BD){let s=o[1],u=o[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/i>.5?t==="zh-CN"?Xy(e)?"zh-TW":"zh-CN":t:"auto"}var tT=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],mm=new Map(tT),ID=new Map(tT.map(([e,t])=>[t,e]));function nT(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>ID.get(s));!t&&t!==0&&(t=25);let a=$c(e);if(a!=="auto")return a;let i={minLength:t,whitelist:[...mm.keys()]},o=$y(e,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(g=="eng"&&f<.95)break;return mm.get(g)}}let[s,u]=o[0],l=mm.get(s);if(l&&u>.9)return l}}catch(r){R.error(r)}return"auto"}p();p();var fm="Original";function et(){return fm}function An(e){fm=e,rT(fm)}p();var iT="auto",Yc="auto",aT="auto";function oT(e){iT=e}function ar(e){Yc=e}function Mt(){return Yc!=="auto"?Yc:aT!=="auto"?aT:iT}function Qc(){return Yc}p();function ji(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ga(e){try{if(!e||!ji(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";t=o.getAttribute(i)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var tt={},Va=async function(e,t){let{method:n,data:r}=e,a=await tt.updateGlobalContext(),i=Date.now();if(R.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await tt.translateTheWholePage(r),it(yr,i);else if(n==="translateTheMainPage")await tt.translateTheMainPage(r),it(yr,i);else if(n==="translateToThePageEndImmediately")await tt.translateToThePageEndImmediately(r),it(yr,i);else if(n==="toggleTranslatePage")await tt.toggleTranslatePage(r),it(yr,i);else if(n==="toggleTranslateTheWholePage")await tt.toggleTranslateTheWholePage(r),it(yr,i);else if(n==="toggleTranslateTheMainPage")await tt.toggleTranslateTheMainPage(r),it(yr,i);else if(n==="toggleOnlyTransation")await tt.ensureSwitchTranslationMode(r),it(yr,i);else if(n==="translatePage")await tt.translatePage(a,r),it(yr,i);else if(n==="toggleTranslationMask")await tt.toggleTranslationMask(r);else if(n==="restorePage")tt.restorePage();else if(n==="retryFailedParagraphs")tt.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await tt.switchTranslationMode(r.mode),await tt.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")tt.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(cc,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await tt.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(ru,{detail:r}));else if(n==="translateWithOpenAI")await tt.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await tt.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await tt.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await tt.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await tt.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await tt.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await tt.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")st()||await tt.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!st())return JSON.stringify(a)}};function sT(e){Object.assign(tt,e)}function uT(e){Object.assign(tt,e)}function lT(e){Object.assign(tt,e)}var RD=function(e,t){let{method:n,data:r}=e;if(R.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return et();if(n==="getCurrentPageLanguage"){let a=Mt();return tt.detectCurrentPageLanguage().catch(i=>{R.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return ar(r),Mt();if(n==="getContextString"){let a=tt.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=tt.getPureGlobalContext();return Ga(a?.rule)}}},Zc,Jc;function cT(){let e=Xc();st()||OD(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Xc(){return Zc||(Zc=new ca("content_script",!1).getConnection("main",Va),Zc)}function OD(){return Jc||(Jc=new ca("content_script",!1).getConnection("main_sync",RD,{sync:!0}),Jc)}p();var hm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],e0="https://transmart.qq.com/api/imt",pa=class e{static langMapReverse=new Map(hm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:e0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=e.langMapReverse.get(a);return i||a}};async function Ft(e){return await Xc().sendMessage("background:main",e)}function de(e){return oc()?kc({method:"request",data:e}):pe()||ic()?(e.fetchPolyfill=globalThis.GM_fetch,Tr(e)):Ft({method:"fetch",data:e})}function ir(){return pe()?yt():Ft({method:"getConfig"})}function kn(e){return pe()?Oi(e):Ft({method:"setUserConfig",data:e})}function Pn(){return pe()?vr():Ft({method:"getUserConfig"})}function Au(){return pe()?Wt():Ft({method:"getLocalConfig"})}function t0(e){return pe()?Kt(e):Ft({method:"setLocalConfig",data:e})}function dT(e){return pe()?ry(e):Ft({method:"setBuildinConfig",data:e})}async function Ue(e){if(e.text){let n=$c(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(pe()||Ge()){if(e.translateService&&!yc.includes(e.translateService))return Promise.resolve("auto");let r=nT(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Ft({method:"detectLanguage",data:e});return Promise.resolve(t)}function gT(){return Ft({method:"detectTabLanguage"})}async function n0(e){let t=await Ue({text:e,pageLangs:["en"]});try{if(pe()||Ge()){let n=e.substring(0,200);t=await pa.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function rT(e){let t=new CustomEvent(ki,{detail:e});if(document.dispatchEvent(t),pe())return;Xc().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function pT(e){return pe()?am(e):Ft({method:"queryParagraphCache",data:e})}async function mT(e){if(pe()){await rm(e);return}return Ft({method:"setParagraphCache",data:e})}async function fT(){if(pe())return Promise.resolve();await Ft({method:"mockRequest"})}function Wo(e=!1,t=""){return pe()?(Z.runtime.openOptionsPage(e,t),Promise.resolve()):Ft({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function r0(e=""){return pe()||Ge()?Le().OPTIONS_URL:Z.runtime.getURL("options.html")}function hT(e=""){return Z&&Z.runtime&&Z.runtime.getURL?Z.runtime.getURL("options.html"):""}function a0(e=!1){return pe()?(Z.extra.openAboutPage(e),Promise.resolve()):Ft({method:"openAboutPage"})}function Ko(e){return pe()?(Z.extra.openInTab(e),Promise.resolve()):Ft({method:"openInTab",data:e})}function bT(e=!1){return pe()?(Z.extra.openEbookViewerPage(e),Promise.resolve()):Ft({method:"openEbookViewerPage"})}function yT(e=!1){return pe()?(Z.extra.openEbookBuilderPage(e),Promise.resolve()):Ft({method:"openEbookBuilderPage"})}function TT(e){Ge()}function Go(e=!1,t){return pe()?(Z.extra.openPdfViewerPage(e),Promise.resolve()):Ft({method:"openPdfViewerPage",data:{url:t}})}function vT(e=!1){return pe()?(Z.extra.openSubtitleBuilderPage(e),Promise.resolve()):Ft({method:"openSubtitleBuilderPage"})}function Vo(e){return pe()?Promise.resolve():Ft({method:"setBadge",data:{text:e}})}function ST(){return pe()?(R.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Ft({method:"autoSyncLatestConfig"})}function i0(e,t=!1){return pe()?Z.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function CT(e,t){return pe()?qi.getDelay(e,t):Ft({method:"getDelay",data:{key:e,options:t}})}var Pe=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,i=!1,o=!1,s=[],u=null,l=new Set;for(let T of a)T.from&&T.from!=="auto"&&l.add(T.from),T.refresh&&(i=!0),T.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=I1(a,c,g)}catch(T){if(r)for(let b=0;bT));let f=[],m=[],h=(T,b,x)=>{let w="";if(b.translatedTexts&&b.translatedTexts[0]&&(w=b.translatedTexts[0]),m[T]||(m[T]=b,m[T].translatedTexts=Array(b.sentenceTotalParts).fill(null)),m[T].hasError)return;if(x){let C=x instanceof Q?new Q(x.name,x.message).initNetWork(x.status).initData(x.data):x;m[T].hasError=!0,b.callback&&b.callback(C,null,b.sentence);return}m[T].translatedTexts[b.partIndex]=w;let L=m[T],M=0;for(let C=0;C{let M=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(M=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:M,to:b.to,url:x,options:n,refresh:i,debug:o}),sourceTempSentences:b.tempSentences};{let C=Qb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(C=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let A=[],D=Or(this.serviceConfig);if(b.tempSentences.forEach((q,I)=>{let k=Wp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});q.force!==!0&&(k&&k.text&&k.text.trim().lengthI.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:q,from:M,to:b.to})}let S="";v&&v.length>=2?S=A.map((q,I)=>{let{item:k}=q;return I===A.length-1?k.text:k.text+v[0]+(I+1)+v[1]}).join(""):S=A.map(({item:q})=>q.text).join(C);let N=await this.translate({text:S,from:M,to:b.to,url:x,options:{...n,rawTextArrayLength:A.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=N,P=[];if(v&&v.length>=2){let q=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(q=v[2]);let I=new RegExp(q,"g");P=F.split(I)}else P=F.split(C);let O=[];if(P.length>A.length){for(let q=0;qq.text);return D=Or(this.serviceConfig,!0),O.forEach((q,I)=>{let k=A[I],_=k.index,B=k.variables||{};Object.keys(B).length>0&&(q=dm({text:q,delimiters:D,variables:B})),z[_]=q}),{sourceTempSentences:b.tempSentences,text:z,from:N.from,to:N.to}}};f.push(L().then(M=>{let{text:C,sourceTempSentences:v}=M;for(let A=0;A{if(M instanceof Q&&M.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let C=0;C{let b=T.sentence.text;return T.translatedTexts&&T.translatedTexts.length>0&&(b=T.translatedTexts.join("")),{...T.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],i=Or(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,f)=>{let m=Wp({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[f]!==!0&&(m&&m.text&&m.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){R.debug("formatAndTranslateList error",t,l)}let o=await this.translateList(n),{text:s}=o,u=t.text.map(l=>l);return i=Or(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let f=g.index,m=g.variables,h=Object.keys(m);u[f]=l,h.length>0&&(u[f]=dm({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(t){return Ue({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};p();p();var $o="input is invalid type",bm=typeof window=="object",$a=bm?window:{};$a.JS_SHA256_NO_WINDOW&&(bm=!1);var zD=!bm&&typeof self=="object",ND=!$a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;ND?$a=global:zD&&($a=self);var pQ=!$a.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,mQ=typeof define=="function"&&define.amd,ku=!$a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ve="0123456789abcdef".split(""),UD=[-2147483648,8388608,32768,128],Sr=[24,16,8,0],o0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s0=["hex","array","digest","arrayBuffer"],sn=[];($a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});ku&&($a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var xT=function(e,t){return function(n){return new un(t,!0).update(n)[e]()}},wT=function(e){var t=xT("hex",e);t.create=function(){return new un(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};un.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=UD[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};un.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,g,f,m,h,y,T,b,x,w;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],g=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(T=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(T=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),T=e&t,f=T^e&n^w,y=a&i^~a&o,m=s+g+y+o0[l]+u[l],h=c+f,s=r+m<<0,r=m+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,f=b^r&t^T,y=s&a^~s&i,m=o+g+y+o0[l+1]+u[l+1],h=c+f,o=n+m<<0,n=m+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),x=n&r,f=x^n&e^b,y=o&s^~o&a,m=i+g+y+o0[l+2]+u[l+2],h=c+f,i=t+m<<0,t=m+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),w=t&n,f=w^t&r^x,y=i&o^~i&s,m=a+g+y+o0[l+3]+u[l+3],h=c+f,a=e+m<<0,e=m+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};un.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=ve[e>>28&15]+ve[e>>24&15]+ve[e>>20&15]+ve[e>>16&15]+ve[e>>12&15]+ve[e>>8&15]+ve[e>>4&15]+ve[e&15]+ve[t>>28&15]+ve[t>>24&15]+ve[t>>20&15]+ve[t>>16&15]+ve[t>>12&15]+ve[t>>8&15]+ve[t>>4&15]+ve[t&15]+ve[n>>28&15]+ve[n>>24&15]+ve[n>>20&15]+ve[n>>16&15]+ve[n>>12&15]+ve[n>>8&15]+ve[n>>4&15]+ve[n&15]+ve[r>>28&15]+ve[r>>24&15]+ve[r>>20&15]+ve[r>>16&15]+ve[r>>12&15]+ve[r>>8&15]+ve[r>>4&15]+ve[r&15]+ve[a>>28&15]+ve[a>>24&15]+ve[a>>20&15]+ve[a>>16&15]+ve[a>>12&15]+ve[a>>8&15]+ve[a>>4&15]+ve[a&15]+ve[i>>28&15]+ve[i>>24&15]+ve[i>>20&15]+ve[i>>16&15]+ve[i>>12&15]+ve[i>>8&15]+ve[i>>4&15]+ve[i&15]+ve[o>>28&15]+ve[o>>24&15]+ve[o>>20&15]+ve[o>>16&15]+ve[o>>12&15]+ve[o>>8&15]+ve[o>>4&15]+ve[o&15];return this.is224||(u+=ve[s>>28&15]+ve[s>>24&15]+ve[s>>20&15]+ve[s>>16&15]+ve[s>>12&15]+ve[s>>8&15]+ve[s>>4&15]+ve[s&15]),u};un.prototype.toString=un.prototype.hex;un.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};un.prototype.array=un.prototype.digest;un.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function u0(e,t,n){var r,a=typeof e;if(a==="string"){var i=[],o=e.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);e=i}else if(a==="object"){if(e===null)throw new Error($o);if(ku&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ku||!ArrayBuffer.isView(e)))throw new Error($o)}else throw new Error($o);e.length>64&&(e=new un(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}un.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}u0.prototype=new un;u0.prototype.finalize=function(){if(un.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();un.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),un.prototype.finalize.call(this)}};var Yo=wT();Yo.sha256=Yo;Yo.sha224=wT(!0);Yo.sha256.hmac=DT();Yo.sha224.hmac=DT(!0);var AT=Yo;var kT=AT.sha256;function Cr(e){return Promise.resolve(kT(e))}function l0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Ya(e,t){let n=kT.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function PT(e,t){let n=await Ya(e,t);return l0(n)}async function c0(e,t){let n=qD(t),r=await Ya(e,n);return l0(r)}function qD(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var LT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Pu=class e extends Pe{static langMap=new Map(LT);maxTextGroupLength=50;static langMapReverse=new Map(LT.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new Q("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Cr(a)].join(` `),g=e.getUTCDate(u),f=["TC3-HMAC-SHA256",l,`${g}/${i}/tc3_request`,await Cr(c)].join(` -`),m=await PT(g,`TC3${n}`),h=await c0(i,m),y=await c0("tc3_request",h),T=await c0(f,y),b=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${T}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new Q(b.Response.Error.Message);return b}};p();var _T=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],jD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Pu=class e extends Pe{static langMap=new Map(_T);static langMapReverse=new Map(_T.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:jD,timeout:this.requestTimeout});return{text:o.targetText,from:e.langMapReverse.get(o.source)||r,to:e.langMapReverse.get(o.target)||a}}};p();var MT=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Hi=class e extends Pe{static langMap=new Map(MT);static langMapReverse=new Map(MT.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};p();p();p();function HD(e,t){return t?e+(t-e%t):e}function WD(e,t){return e.split(t).length-1}function Tm(e){let t=Date.now(),n=1;for(let r of e)n+=WD(r,"i");return HD(t,n)}function KD(e,t){return Math.floor(Math.random()*(t-e+1))+e}function vm(){return KD(1e6,1e8)}p();p();p();var Sm="https://www2.deepl.com/jsonrpc",Cm="auto",FT=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];p();function GD(e=FT){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function xm(e){return GD()[e.toLowerCase()]}var VD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function $D(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function YD(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function QD(e,t,n,r,a,i,o){let s=vm(),u=YD(r,n),l=[];t.forEach(f=>{l.push({text:f,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Tm(t);let c=await de({retry:2,method:"POST",url:e,body:$D(u),headers:VD}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(f=>{g.text.push(f.text)}),g}async function BT(e,t,n,r=Cm,a,i,o){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:QD(e,t,xm(n),xm(r)??"auto",a,i,o):{text:[],from:r,to:n}}var IT=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Qo=class e extends Pe{static langMap=new Map(IT);static langMapReverse=new Map(IT.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Sm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=rn(Sm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,i=await BT(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:i.text,from:e.langMapReverse.get(i.from),to:e.langMapReverse.get(i.to)}}};p();var Lu=class e extends Pe{static langMap=new Map(bm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=pa.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),i=e.langMap.get(a)||a,o=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Le(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=RT());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),g=await de({url:e0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new Q(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,i=Le(),o=t.url;if(i.INSTALL_FROM==="firefox_store"&&(o=RT()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:t.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),f=await de({url:e0,body:g,method:"POST"});if(f.header.ret_code!=="succ")throw new Q(f.message||f.header.ret_code);return{text:f.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function RT(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}p();p();function Em(){return Math.random()>=.1}var Zo=class extends Pe{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Em())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await fT(),!Em())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};p();var zT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],wm=new Map(zT),OT=new Map(zT.map(([e,t])=>[t,e])),Dm=class e extends Pe{static langMap=wm;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new Q("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:wm.get(r)||"auto",target_lang:wm.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:OT.get(o.source_lang),to:OT.get(o.target_lang)}}else throw new Q(i.msg)}},d0=Dm;p();var NT=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],_u=new Map(NT),ZD=new Map(NT.map(([e,t])=>[t,e])),Am=class extends Pe{static langMap=_u;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new Q("authKey are required");if(!this.authKey)throw new Q("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=rn(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=rn(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=rn(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=rn(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=rn(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(t),s={source_lang:_u.get(n)||"",target_lang:_u.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(T=>{u.append("text",T)});let l=u.toString(),c={text:i,source_lang:_u.get(n)||"auto",target_lang:_u.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let f,m={};t.refresh&&(m={"X-Refresh":"True"}),t.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):f=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(f,o,!!t.debug),y=h.map(T=>T.text);if(r==="zh-TW"){let T=this.serviceConfig||{};T&&T.googleApiUrl&&(T.apiUrl=T.googleApiUrl);let x=await new Hi(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(w=>w.text).join(` +`),m=await PT(g,`TC3${n}`),h=await c0(i,m),y=await c0("tc3_request",h),T=await c0(f,y),b=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${T}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new Q(b.Response.Error.Message);return b}};p();var _T=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],jD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Lu=class e extends Pe{static langMap=new Map(_T);static langMapReverse=new Map(_T.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:jD,timeout:this.requestTimeout});return{text:o.targetText,from:e.langMapReverse.get(o.source)||r,to:e.langMapReverse.get(o.target)||a}}};p();var MT=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Hi=class e extends Pe{static langMap=new Map(MT);static langMapReverse=new Map(MT.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};p();p();p();function HD(e,t){return t?e+(t-e%t):e}function WD(e,t){return e.split(t).length-1}function ym(e){let t=Date.now(),n=1;for(let r of e)n+=WD(r,"i");return HD(t,n)}function KD(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Tm(){return KD(1e6,1e8)}p();p();p();var vm="https://www2.deepl.com/jsonrpc",Sm="auto",FT=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];p();function GD(e=FT){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function Cm(e){return GD()[e.toLowerCase()]}var VD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function $D(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function YD(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function QD(e,t,n,r,a,i,o){let s=Tm(),u=YD(r,n),l=[];t.forEach(f=>{l.push({text:f,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=ym(t);let c=await de({retry:2,method:"POST",url:e,body:$D(u),headers:VD}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(f=>{g.text.push(f.text)}),g}async function BT(e,t,n,r=Sm,a,i,o){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:QD(e,t,Cm(n),Cm(r)??"auto",a,i,o):{text:[],from:r,to:n}}var IT=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Qo=class e extends Pe{static langMap=new Map(IT);static langMapReverse=new Map(IT.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=vm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=an(vm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,i=await BT(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:i.text,from:e.langMapReverse.get(i.from),to:e.langMapReverse.get(i.to)}}};p();var _u=class e extends Pe{static langMap=new Map(hm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=pa.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),i=e.langMap.get(a)||a,o=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Le(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=RT());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),g=await de({url:e0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new Q(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,i=Le(),o=t.url;if(i.INSTALL_FROM==="firefox_store"&&(o=RT()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:t.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),f=await de({url:e0,body:g,method:"POST"});if(f.header.ret_code!=="succ")throw new Q(f.message||f.header.ret_code);return{text:f.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function RT(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}p();p();function xm(){return Math.random()>=.1}var Zo=class extends Pe{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!xm())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await fT(),!xm())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};p();var zT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Em=new Map(zT),OT=new Map(zT.map(([e,t])=>[t,e])),wm=class e extends Pe{static langMap=Em;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new Q("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Em.get(r)||"auto",target_lang:Em.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:OT.get(o.source_lang),to:OT.get(o.target_lang)}}else throw new Q(i.msg)}},d0=wm;p();var NT=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Mu=new Map(NT),ZD=new Map(NT.map(([e,t])=>[t,e])),Dm=class extends Pe{static langMap=Mu;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new Q("authKey are required");if(!this.authKey)throw new Q("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=an(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=an(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=an(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=an(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=an(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(t),s={source_lang:Mu.get(n)||"",target_lang:Mu.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(T=>{u.append("text",T)});let l=u.toString(),c={text:i,source_lang:Mu.get(n)||"auto",target_lang:Mu.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let f,m={};t.refresh&&(m={"X-Refresh":"True"}),t.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):f=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(f,o,!!t.debug),y=h.map(T=>T.text);if(r==="zh-TW"){let T=this.serviceConfig||{};T&&T.googleApiUrl&&(T.apiUrl=T.googleApiUrl);let x=await new Hi(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(w=>w.text).join(` `),url:"",options:{}});x&&x.text&&(y=x.text.split(` -`))}return{text:y,from:h[0]&&ZD.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!pn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...t,translations:i}}},UT=Am;p();var JD=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],km=new Map(JD),Pm=class extends Pe{static langMap=km;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:km.get(r)||r,to:km.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new Q(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},qT=Pm;p();var XD=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Lm=new Map(XD),_m=class extends Pe{static langMap=Lm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Lm.get(a)||a};r!=="auto"&&(i.from=Lm.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(f=>({text:f}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((f,m)=>{o.append(m,f)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new Q("server response invalid");return{from:r,to:a,text:g.map(f=>f.translations.map(h=>h.text).join(" "))}}},jT=_m;p();var eA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Jo=new Map(eA),Mm=class extends Pe{static langMap=Jo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:y,from:h[0]&&ZD.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!pn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...t,translations:i}}},UT=Dm;p();var JD=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],Am=new Map(JD),km=class extends Pe{static langMap=Am;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:Am.get(r)||r,to:Am.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new Q(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},qT=km;p();var XD=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Pm=new Map(XD),Lm=class extends Pe{static langMap=Pm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Pm.get(a)||a};r!=="auto"&&(i.from=Pm.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(f=>({text:f}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((f,m)=>{o.append(m,f)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new Q("server response invalid");return{from:r,to:a,text:g.map(f=>f.translations.map(h=>h.text).join(" "))}}},jT=Lm;p();var eA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Jo=new Map(eA),_m=class extends Pe{static langMap=Jo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Jo.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||Jo.get(r)||r,target:Jo.get(a)||a})):u.body=JSON.stringify({text:s,source:Jo.get(r),target:Jo.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new Q("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},HT=Mm;p();function KT(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",t.sourceLanguage].includes(o)&&["auto",t.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function yn(e){let{url:t,config:n,state:r}=e,a=new URL(t),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:f,sourceLanguageUrlPattern:m,immediateTranslationPattern:h}=n,y=f||"zh-CN",T=Xo(t,o),b=Xo(t,h),x=s,w=Object.keys(u);for(let se of w){let ue=u[se];if(Xo(t,ue)){x=se;break}}let L=l,M=Object.keys(c);for(let se of M){let ue=c[se];if(ue&&Xo(t,ue)){L=se;break}}let C=Xo(t,g),v=WT(t,g);v||(v=_t(t,n1)),v||(v=_t(t,n.blockUrls));let A=WT(t,n.inputTranslationUrlPattern);A||(A=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),S=Object.keys(m),N={};for(let se of S){let ue=m[se];if(ue&&ue.matches)for(let ke of ue.matches)N[ke]=se}let F=Object.keys(N),P=Op(t,F);P&&(i=N[P]??"auto",N[P]&&N[P]!=="auto"&&ar(N[P]));let O=a.hostname,z=await Cr(O),q=a.pathname+a.search+a.hash,I=await Cr(q),k=`https://${z}.com/${I}`,_=await Wt(),B=await ay(),H=n.translationStartMode;H==="dynamic"&&b&&(H="immediate");let j=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let G=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(G=n.mouseHoverTranslationService);let V=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ie=await it.get(ht,null),te=!1;ie&&(te=Qt(ie));let J={targetLanguage:y,config:n,translationService:x,inputTranslationService:j,mouseHoverTranslationService:G,subtitleTranslateService:V,isTranslateUrl:C,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:A,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},localConfig:_};ie&&(J.user=ie,te?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(se=>!J.config.generalRule.bodyTranslateTags.includes(se)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[J.translationService]||{};ce.immediateTranslationTextCount!==void 0&&tA(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),J.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&J.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(J.state.translationDebounce=ce.translationDebounce);let he=B.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Xo(t,se)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Se=n.generalRule;if(X&&(J.rule=Mc(Se,X)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(se=>!J.rule.bodyTranslateTags.includes(se)&&!J.rule.forceTranslateTags.includes(se))),J.rule.mainFrameSelector){let se=document.querySelector(J.rule.mainFrameSelector);se&&(J.mainFrame=se)}return J}function Xo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:i&&i.length>0&&Oc(i)?!1:!!(a&&a.length>0&&Oc(a))}function WT(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&Oc(r))}function tA(e){return typeof e=="number"}p();p();p();function GT(e){let t=e.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Jo.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||Jo.get(r)||r,target:Jo.get(a)||a})):u.body=JSON.stringify({text:s,source:Jo.get(r),target:Jo.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new Q("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},HT=_m;p();function KT(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",t.sourceLanguage].includes(o)&&["auto",t.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function yn(e){let{url:t,config:n,state:r}=e,a=new URL(t),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:f,sourceLanguageUrlPattern:m,immediateTranslationPattern:h}=n,y=f||"zh-CN",T=Xo(t,o),b=Xo(t,h),x=s,w=Object.keys(u);for(let se of w){let ue=u[se];if(Xo(t,ue)){x=se;break}}let L=l,M=Object.keys(c);for(let se of M){let ue=c[se];if(ue&&Xo(t,ue)){L=se;break}}let C=Xo(t,g),v=WT(t,g);v||(v=_t(t,n1)),v||(v=_t(t,n.blockUrls));let A=WT(t,n.inputTranslationUrlPattern);A||(A=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),S=Object.keys(m),N={};for(let se of S){let ue=m[se];if(ue&&ue.matches)for(let ke of ue.matches)N[ke]=se}let F=Object.keys(N),P=Rp(t,F);P&&(i=N[P]??"auto",N[P]&&N[P]!=="auto"&&ar(N[P]));let O=a.hostname,z=await Cr(O),q=a.pathname+a.search+a.hash,I=await Cr(q),k=`https://${z}.com/${I}`,_=await Wt(),B=await ay(),H=n.translationStartMode;H==="dynamic"&&b&&(H="immediate");let j=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let G=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(G=n.mouseHoverTranslationService);let V=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ie=await ot.get(bt,null),te=!1;ie&&(te=Qt(ie));let J={targetLanguage:y,config:n,translationService:x,inputTranslationService:j,mouseHoverTranslationService:G,subtitleTranslateService:V,isTranslateUrl:C,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:A,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},localConfig:_};ie&&(J.user=ie,te?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(se=>!J.config.generalRule.bodyTranslateTags.includes(se)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[J.translationService]||{};ce.immediateTranslationTextCount!==void 0&&tA(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),J.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&J.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(J.state.translationDebounce=ce.translationDebounce);let he=B.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Xo(t,se)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Se=n.generalRule;if(X&&(J.rule=Mc(Se,X)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(se=>!J.rule.bodyTranslateTags.includes(se)&&!J.rule.forceTranslateTags.includes(se))),J.rule.mainFrameSelector){let se=document.querySelector(J.rule.mainFrameSelector);se&&(J.mainFrame=se)}return J}function Xo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:i&&i.length>0&&Oc(i)?!1:!!(a&&a.length>0&&Oc(a))}function WT(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&Oc(r))}function tA(e){return typeof e=="number"}p();p();p();function GT(e){let t=e.split(` `),n=[],r,a="",i="";for(let o of t){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Fm=class extends Pe{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Mm=class extends Pe{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(t,n,r){if(super(t,n,r),t||(t={}),t.APIKEY){let a=t.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(t.ignoreResRegexs)&&(this.ignoreResReges=t.ignoreResRegexs),t.translationTextSeparator&&(this.translationTextSeparator=t.translationTextSeparator),t.model&&(this.model=t.model),t.systemPrompt&&(this.systemPrompt=t.systemPrompt),t.prompt&&(this.prompt=t.prompt),t.multiplePrompt&&(this.multiplePrompt=t.multiplePrompt),t.subtitlePrompt&&(this.subtitlePrompt=t.subtitlePrompt),t.bodyConfigs&&(this.bodyConfigs=t.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a,options:i}=t;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},g=i?.sourceProgram,f=["subtitle","videoSubtitle"].includes(g),m=[n];i?.rawTextArrayLength&&(m=n.split(this.translationTextSeparator)),m.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),f&&this.subtitlePrompt&&m.length>1&&(s=this.subtitlePrompt);let h="",y="",T=s.includes("{{json}}"),b=s.includes("{{yaml}}");if(T){let M=[],C=c.imt_json_item||"";f&&(C=c.imt_subtitle_json_item||C);for(let v=0;vC==="from"?u:C==="to"?l+" Language":C==="text"?n:C=="json"?h:C=="yaml"?y:c[C]||M).replace(/{{(.+?)}}/g,(M,C)=>c[C]||M);let x=await this.handleOptions(s,t);R.debug("request options",x);let w=await de(x),L=this.parseResponse(w);if(L=this.filterContent(n,L,s,m),R.debug("filterContent after",L),!T&&!b||!L)return{from:r,to:a,text:L||n};L=nA(n,L),L=R1(L);try{let M={};if(T){R.debug("extractValidJson before",L);let A=this.extractValidJson(L);R.debug("parse before",L),M=wl.parse(A)}else if(b){R.debug("parseYAML before",L);let A=this.extractValidYaml(L);M=GT(A)}let C=c.imt_trans_field;f&&(C=c.imt_sub_trans_field||C);let v=c.imt_source_field;return f&&(v=c.imt_sub_source_field||v),L=this.restoreText(m,M,C,this.translationTextSeparator,v),{from:r,to:a,text:L}}catch(M){return R.error("parse response failed",L,M),{from:r,to:a,text:L}}}extractValidJson(t){let n=t.indexOf("["),r=t.lastIndexOf("]");return n!==-1&&r!==-1?t.slice(n,r+1):""}extractValidYaml(t){let n=t.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=t)}catch(o){R.debug("e",o)}return i}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},es=Fm;function nA(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var rA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],VT=new Map(rA),Bm=class extends es{static langMap=VT;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=rn(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=rn(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return VT}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},$T=Bm;p();var ZT=eC(YT());var QT=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Fu=class e extends Pe{static langMap=new Map(QT);static langMapReverse=new Map(QT.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new Q("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new ZT.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),f=this.SHA1.b64_hmac(`${n}&`,g),m=new URLSearchParams(Object.assign({},l,{Signature:f})).toString(),h=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new Q(h.Message);return h}};p();p();var aA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],zt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},Im=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},Rm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=Im(t);if(r)return Array.isArray(n)?`${r}=${n.map(Im).sort().join(`&${r}=`)}`:`${r}=${Im(n)}`}).filter(t=>t).join("&"),ts=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${zt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;t.sessionToken&&(a[zt.tokenHeader]=t.sessionToken),a[zt.dateHeader]=r,a[zt.notSignBody]="",a[zt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[zt.algorithmKey]=zt.algorithm,a[zt.signHeadersKey]="",a[zt.signQueriesKey]=void 0,a[zt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=i,this.request.headers=o,a[zt.signQueriesKey]=Object.keys(a).sort().join(";"),a[zt.signatureKey]=s,Rm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[zt.dateHeader]=n,t.sessionToken&&(this.request.headers[zt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[zt.contentSha256Header]=await Cr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return l0(await Ya(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(zt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=Rm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} +`)}restoreText(t,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=t)}catch(o){R.debug("e",o)}return i}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},es=Mm;function nA(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var rA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],VT=new Map(rA),Fm=class extends es{static langMap=VT;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=an(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=an(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return VT}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},$T=Fm;p();var ZT=eC(YT());var QT=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Bu=class e extends Pe{static langMap=new Map(QT);static langMapReverse=new Map(QT.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new Q("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new ZT.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),f=this.SHA1.b64_hmac(`${n}&`,g),m=new URLSearchParams(Object.assign({},l,{Signature:f})).toString(),h=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new Q(h.Message);return h}};p();p();var aA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],zt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},Bm=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},Im=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=Bm(t);if(r)return Array.isArray(n)?`${r}=${n.map(Bm).sort().join(`&${r}=`)}`:`${r}=${Bm(n)}`}).filter(t=>t).join("&"),ts=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${zt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;t.sessionToken&&(a[zt.tokenHeader]=t.sessionToken),a[zt.dateHeader]=r,a[zt.notSignBody]="",a[zt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[zt.algorithmKey]=zt.algorithm,a[zt.signHeadersKey]="",a[zt.signQueriesKey]=void 0,a[zt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=i,this.request.headers=o,a[zt.signQueriesKey]=Object.keys(a).sort().join(";"),a[zt.signatureKey]=s,Im(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[zt.dateHeader]=n,t.sessionToken&&(this.request.headers[zt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[zt.contentSha256Header]=await Cr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return l0(await Ya(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(zt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=Im(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} `),t.push(this.signedHeaders()),t.push(await this.hexEncodedBodyHash()),t.join(` `)}canonicalHeaders(){let t=[];Object.keys(this.request.headers).forEach(r=>{t.push([r,this.request.headers[r]])}),t.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new Q(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Cr(t)}async hexEncodedBodyHash(){return this.request.headers[zt.contentSha256Header]?this.request.headers[zt.contentSha256Header]:this.request.body?await this.hexEncodedHash(Rm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return aA.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let i=await Ya(n,`${zt.kDatePrefix}${t.secretKey}`),o=await Ya(r,i),s=await Ya(a,o);return Ya(zt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,zt.v4Identifier].join("/")}};var JT=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Om=new Map(JT),iA=new Map(JT.map(([e,t])=>[t,e])),zm=class extends Pe{static langMap=Om;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new Q("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ts(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new Q(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new Q(s.Code,s.Message)}else throw new Q("response: "+JSON.stringify(o))}async translateList(t){let{text:n,from:r,to:a}=t,i=Om.get(r),o={TargetLanguage:Om.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ts(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(m=>m.Translation),f=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(f=iA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:f,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new Q(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new Q(g.Code,g.Message)}else throw new Q("response: "+JSON.stringify(c))}},XT=zm;p();var ev=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Nm=new Map(ev),oA=new Map(ev.map(([e,t])=>[t,e])),Bu=class extends Pe{static langMap=Nm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,i=Nm.get(r)||"detect",o=Nm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=oA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new Q(l.status_code.toString(),l.status_message)}}};p();var sA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Um=new Map(sA),Iu=class extends Pe{static langMap=Um;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new Q("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:Um.get(r)||r,target_lang:Um.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new Q(s.message||s.message||"API Error")}};p();p();var qm="https://{s}bing.com",iv=qm+"/translator",uA=qm+"/ttranslatev3",lA=qm+"/tspellcheckv3",p0="bingGlobalConfig",ov=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],tv=new Map(ov),nv=new Map(ov.map(([e,t])=>[t,e])),rv=1e3,xr,ns;function jm(e,t){return e.replace("{s}",t?t+".":"")}async function cA(){if(!xr){let n=await Z.storage.local.get(p0);return n&&(xr=n[p0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=xr;return Date.now()-e>t}async function av(){let e,t,n,r,a,i,o,s,u,l;try{let c=jm(iv,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:f,headers:m,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],t=f.match(/IG:"([^"]+)"/)[1],n=f.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(f.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return xr={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Z.storage.local.set({[p0]:xr}),xr}function dA(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=xr;return jm(e?lA:uA,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+xr.count++:"")}function gA(e,t,n,r){let{token:a,key:i}=xr,o={fromLang:n,text:t,token:a,key:i};return!e&&r&&(o.to=r),o}async function sv(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>rv)throw new Error(`The supported maximum length of text is ${rv}. Please shorten the text.`);ns||(ns=av()),await ns,await cA()&&(ns=av(),await ns),t=t||"auto",n=n||"zh-CN",t=tv.get(t)||t,n=tv.get(n)||n;let a=dA(!1),i=gA(!1,e,t,n==="auto-detect"?"zh-Hans":n),o={referer:jm(iv,xr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(xr=null,ns=null,await Z.storage.local.remove(p0),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Cr(t)}async hexEncodedBodyHash(){return this.request.headers[zt.contentSha256Header]?this.request.headers[zt.contentSha256Header]:this.request.body?await this.hexEncodedHash(Im(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return aA.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let i=await Ya(n,`${zt.kDatePrefix}${t.secretKey}`),o=await Ya(r,i),s=await Ya(a,o);return Ya(zt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,zt.v4Identifier].join("/")}};var JT=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Rm=new Map(JT),iA=new Map(JT.map(([e,t])=>[t,e])),Om=class extends Pe{static langMap=Rm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new Q("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ts(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new Q(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new Q(s.Code,s.Message)}else throw new Q("response: "+JSON.stringify(o))}async translateList(t){let{text:n,from:r,to:a}=t,i=Rm.get(r),o={TargetLanguage:Rm.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ts(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(m=>m.Translation),f=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(f=iA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:f,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new Q(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new Q(g.Code,g.Message)}else throw new Q("response: "+JSON.stringify(c))}},XT=Om;p();var ev=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],zm=new Map(ev),oA=new Map(ev.map(([e,t])=>[t,e])),Iu=class extends Pe{static langMap=zm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,i=zm.get(r)||"detect",o=zm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=oA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new Q(l.status_code.toString(),l.status_message)}}};p();var sA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Nm=new Map(sA),Ru=class extends Pe{static langMap=Nm;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new Q("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:Nm.get(r)||r,target_lang:Nm.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new Q(s.message||s.message||"API Error")}};p();p();var Um="https://{s}bing.com",iv=Um+"/translator",uA=Um+"/ttranslatev3",lA=Um+"/tspellcheckv3",p0="bingGlobalConfig",ov=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],tv=new Map(ov),nv=new Map(ov.map(([e,t])=>[t,e])),rv=1e3,xr,ns;function qm(e,t){return e.replace("{s}",t?t+".":"")}async function cA(){if(!xr){let n=await Z.storage.local.get(p0);return n&&(xr=n[p0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=xr;return Date.now()-e>t}async function av(){let e,t,n,r,a,i,o,s,u,l;try{let c=qm(iv,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:f,headers:m,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],t=f.match(/IG:"([^"]+)"/)[1],n=f.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(f.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return xr={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Z.storage.local.set({[p0]:xr}),xr}function dA(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=xr;return qm(e?lA:uA,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+xr.count++:"")}function gA(e,t,n,r){let{token:a,key:i}=xr,o={fromLang:n,text:t,token:a,key:i};return!e&&r&&(o.to=r),o}async function sv(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>rv)throw new Error(`The supported maximum length of text is ${rv}. Please shorten the text.`);ns||(ns=av()),await ns,await cA()&&(ns=av(),await ns),t=t||"auto",n=n||"zh-CN",t=tv.get(t)||t,n=tv.get(n)||n;let a=dA(!1),i=gA(!1,e,t,n==="auto-detect"?"zh-Hans":n),o={referer:qm(iv,xr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(xr=null,ns=null,await Z.storage.local.remove(p0),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],f=c[0].detectedLanguage;return{text:g.text,from:nv.get(f.language),to:nv.get(g.to)}}p();p();p();p();p();function Qa(e){return e!=null}function cv(e,t,n){return`${e.type}#${t}#${n}`}function dv(e,t,n,r,a){return{body:a,id:r,type:cv(e,t,n)}}function pA(e,t,n,r){return{id:n,response:r,type:cv(e,"ask",t)}}function gv(e,t,n,r){if(Qa(r)){let a=r.type;if(Qa(a)&&Qa(r.body)){let[i,o,s]=a.split("#");return i===e.type&&o===t&&s===n}else return!1}else return!1}function mA(e,t,n){if(Qa(n)){let r=n.type;if(Qa(r)&&Qa(n.response)){let[a,i,o]=r.split("#");return a===e.type&&i==="ask"&&o===t}else return!1}else return!1}function fA(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function hA(e,t,n,r){return new Promise(a=>{let i=o=>{let s=o.data;mA(t,n,s)&&s.id===r&&(e.removeEventListener("message",i),a(s.response))};e.addEventListener("message",i)})}function bA(e,t,n,r){let a=i=>{let o=i.data;gv(t,"tell",n,o)&&r(o.body)};return e.addEventListener("message",a),[e,a]}function uv(e,t,n,r,a,i){let o=async s=>{let u=s.data;if(gv(n,"ask",r,u)){let l=await i(u.body);t=s.source,t.postMessage(pA(n,r,u.id,l),s.origin)}};return e.addEventListener("message",o),[e,o]}function yA(e,t,n,r,a){let i=Math.random().toString();return e.postMessage(dv(t,"tell",n,i,r),a)}async function lv(e,t,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),f=await hA(e,n,r,s);clearTimeout(g),l(f)});return t.postMessage(dv(n,"ask",r,s,a),i),u}var Za=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;uv(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let i=n.contentWindow;if(Qa(i))return new e(t,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await lv(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(bA(this.thisWindow,this.protocol,t,n))}tell(t,n){yA(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(uv(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return lv(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){fA(this.listeners)}};var pv;async function mv(){if(ot()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=Za.iframe(Tc,"*",{targetWindow:t});pv=n,await Za.connect(n).catch(r=>{R.error("connect with parent frame error",r)})}}function fv(){return pv}var m0=new Map;async function Hm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=Gn(e.body)),m0.has(t))return m0.get(t);let n=de(e);m0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{m0.delete(t)},3e3)}}async function hv(e){return Hm(e)}async function f0(e){if(ot()){let n=fv();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw R.error("can not comunicate with root frame, use strict limiter",r),r}else return Hm(e)}else return Hm(e)}p();function bv(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:e,accessTokenExpiresAt:o.toISOString()}}p();async function h0(e){await Ip(e)}async function b0(e,t){let n=await Mp(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return yv(e,t)}return yv(e,t)}async function yv(e,t){let n=await t(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Fp(e,n,i-1e3),n}var TA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Wm=new Map(TA),Ru=class extends Pe{static langMap=Wm;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await h0(hp)}async translate(t){let{text:n,from:r,to:a}=t;return n?await sv(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await b0(hp,async()=>{let t=await f0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return bv(t)})}async translateList(t){let{from:n,to:r,text:a}=t,i=Wm.get(n)||"auto",o=Wm.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let f of a)u.push({Text:f});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(f=>f.translations[0]?.text||""),from:n,to:r};throw new Q("Microsoft translate error "+JSON.stringify(g))}};p();var Tv=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Km=new Map(Tv),vA=new Map(Tv.map(([e,t])=>[t,e])),Gm=class extends Pe{static langMap=Km;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new Q("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=t,l=Gn(a+o+n+i);this.domain&&(l=Gn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Km.get(s)||"auto",to:Km.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let f=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(f.error_code)throw new Q("API_SERVER_ERROR",f.error_msg);let{trans_result:m,from:h}=f,y=m.map(({dst:b})=>b);return{from:vA.get(h)||h,to:u,text:y.join(` -`)}}},vv=Gm;p();p();var Wi=class extends Pe{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new Q("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,f)=>{let[m,h]=f.split(":"),y=o[m];return h==="random"?SA(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function SA(e){let t=Math.floor(Math.random()*e.length);return e[t]}var Sv=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Vm=class extends Wi{static langMap=new Map(Sv);constructor(t,n,r){if(!t?.token)throw new Q("token are required");super({...t,isSupportList:!0,langs:Sv,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},Cv=Vm;p();var CA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],y0=new Map(CA),$m=class extends Pe{static langMap=y0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!y0.get(a))throw new Q(`Unsupported language: ${a}`);if(r==="auto")throw new Q("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${y0.get(r)||"auto"}2${y0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},xv=$m;p();var Ev=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Ym=new Map(Ev),xA=new Map(Ev.map(([e,t])=>[t,e]));function EA(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var Qm=class extends Pe{static langMap=Ym;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new Q("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i=wA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+EA(n)+i+o+this.appSecret,u=await Cr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:Ym.get(r)||"auto",to:Ym.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),f=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!f.translation)throw new Q(JSON.stringify(f));let m=f.l,[h,y]=m.split("2");return{text:f.translation.join(` -`),from:xA.get(h),to:a}}};function wA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Jm=class extends Pe{static langMap=Zm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i={q:n,from:Zm.get(r)||"auto",to:Zm.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new Q("Youdao translation failed: "+JSON.stringify(s))}},Av=Jm;p();var Ou=class extends Wi{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||ou,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};p();var kv="immersive-translate-gemini-fake-user-key",DA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],Pv=new Map(DA),Xm=class extends es{static langMap=Pv;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return Pv}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await _p(kv,""),this.fakeId||(this.fakeId=AA(10),await Bp(kv,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+t;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let i=super.filterContent(t,n,r);return i.includes(this.fakeId)&&a.length<=1?t:i}};function AA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await f0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":tf.get(r)+"-"}${tf.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var LA={mock:Zo,mock2:Zo,custom:Ou,google:Hi,transmart:Lu,deepl:UT,volc:XT,volcAlpha:Bu,bing:Ru,tencent:ku,tenAlpha:Pu,baidu:vv,caiyun:Cv,cai:xv,openl:d0,youdao:wv,you:Av,d:Qo,dpro:Qo,deeplx:Iu,niu:qT,azure:jT,openai:$T,gemini:Lv,claude:Mv,papago:HT,aliyun:Fu,yandex:zu},Ja={};Object.keys(nr).forEach(e=>{Ja[e]={...nr[e],class:LA[e]}});function Xa(e,t){let n=Rn;if(Ja[e]&&Ja[e].class&&Ja[e].class.langMap&&Ja[e].class.langMap.size>0){let r=Ja[e].class.langMap,a=n.filter(i=>r.get(i));return a.includes(t)||a.unshift("placeholder"),a}else return Rn}async function Nr(e,t,n){if(!e.text)return e;let r=null,a=await lt({sentences:[e]},t,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new Q("translateFailed","translate failed")}async function Fv(e,t){for(let n of e)try{return await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function nf(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,i=n,o=a[i]||{},s=Qt(e.user);await new Ja[i].class(o,r,{translationService:i,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _A(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function lt(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:i,state:o}=t,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=KT(g,{sourceLanguage:_A(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let f=a.beta,m=o.cache===!1&&f,h=a.debug===!0&&f;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(m&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],T={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,w=Qt(t.user),L;try{L=new Ja[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await L.init()}catch(v){if(n){y.push(...e.sentences);let A={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let S=v instanceof Q?new Q(v.name,v.message).initNetWork(v.status).initData(v.data||A):v;n(S,null,D)}}return{sentences:[]}}if(o.cache)for(let v of e.sentences){x++;let A=l;l==="openl"&&(A=l+"-"+g.codename||d0.DEFAULT_CODENAME);let D=L.getCacheKeyPrefix();D&&(A=D+"-"+A);let S=null;try{S=await Cl(pT({originalText:v.text,from:v.from,to:v.to,service:A}),200)}catch(N){R.warn("query cache DB error, but it's ok",N)}if(S){let N={...v,text:S.translatedText};T.sentences[x]=N,n&&n(null,N,v)}else y.push(v)}else y.push(...e.sentences);let M=y.length;if(b-M>0&&R.debug(`use ${b-M} sentences from cache`),!y.length)return T;let C=await L.multipleTranslate({sentences:y},g,(v,A,D)=>{if(n&&n(v,A,D),!v&&A&&!l.startsWith("mock")&&o.cache){let S=l;l==="openl"&&(S=l+"-"+g.codename||d0.DEFAULT_CODENAME);let N=L.getCacheKeyPrefix();N&&(S=N+"-"+S),o.cache&&Cl(mT({translatedText:A.text,from:D.from,to:D.to,detectedFrom:A.from,key:Gn(D.text),service:S}),3e3).catch(F=>{R.warn("set cache DB error",F)})}});for(let v of C?.sentences||[]){let A=T.sentences.findIndex(D=>!D);if(A===-1)throw new Q("translateFailed","can not match the result");T.sentences[A]=v}return T}p();p();p();var rs={},MA={root:"",lang:"en",fallbackLang:"en"};function rf(e,t){let n=Object.assign({},MA,e);rs=t||rs;let[r,a]=K(n.lang),[i,o]=K(rs),[s,u]=K(!1),l=g=>{if(i.hasOwnProperty(g))return;u(!1);let f=H1(n.root||"",g);n.getUrl&&(f=n.getUrl(n.root||"",g),fetch(f).then(m=>m.json()).then(m=>{rs[g]=m,o({...rs}),u(!0)}).catch(m=>{o({...rs}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,f)=>{if(!i.hasOwnProperty(r))return g;let m=gu(i,r,g);return m===g&&r!==n.fallbackLang&&(m=gu(i,n.fallbackLang,g)),zp(m,f)},isReady:s}}var of=oo(null),af={root:"assets",lang:"en",fallbackLang:"en"},as=e=>{let{t,setLang:n,lang:r,isReady:a}=rf({root:e.root||af.root,lang:e.lang||af.lang,fallbackLang:e.fallbackLang||af.fallbackLang,getUrl:e.getUrl},e.translations);return d(of.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Me(of)}p();function Ae(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}p();p();function Ur(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:i}=W();return n=n||(i==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((o,s)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function sf(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:i=>{e.onChange(i.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(i=>i.selected)?.value,onChange:i=>{let o=i.target.value,s=t.find(u=>u.value===o);s&&s.onSelected(s)},children:t.map((i,o)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+o))})}p();function Ki(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=K(e.value),{config:i,field:o,onFinish:s}=e,u=o.name;o.label&&(u=o.label),o.labelKey&&(u=t(o.labelKey));let l={},c={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(c=i.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let f=0;f{let f=g.target.value,m=Array.isArray(r)?f.split(","):f;a(m),e.onChange(m)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function is(e){let{t}=W(),[n,r]=K(!0),[a,i]=K(!1),{config:o,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:f}=e;g=g??(l.default||"");let m={},h={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(h=o.translationServices[e.service]),h.env){let T=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||i(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(sf,{maxWidth:200,items:l.options.map(T=>({label:`${T.label?t(T.label):T.value}`,value:T.value,selected:g===T.value,onSelected:()=>{c(T.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let T=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(sf,{maxWidth:250,items:T.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(T[0]),i(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Ki,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Ki,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Ki,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let T=g,b="";T||(T="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:w}=FA(T);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:L=>{c(L.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:w},onInput:L=>{c(L.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:T=>{c(T.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,m)}}):null]})}):null}}function FA(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}p();function Bv(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let i=Zt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),i]})},"language-"+a)})})]})}function Nu(e){let{selectLanguages:t,languages:n}=e,r=ze(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d(Bv,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,i)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Zt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:o=>{o.preventDefault(),e.onChange(!1,t[i])}})]},"lang-"+i))})]}):null}p();p();function ma(e){let{t}=W(),n=Ve(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:i=>{i.target&&i.target.id==="immersive-translate-overlay"&&r(i)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:i=>{if(i.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function ei(e){let{t}=W(),[n,r]=K([]),[a,i]=K(!1),[o,s]=K(!1);function u(){e.onDeleteUrl(n,e.type),r([]),i(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,f)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[o&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:m=>{m.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:m=>{e.onEditUrl(g,e.type,f)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:m=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+f))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:o?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let m=g.target.checked;r(m?e.urls:[]),i(m)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function Uu(e){let{t}=W(),[n,r]=K(!1),[a,i]=K(""),[o,s]=K(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,f)=>{r(!n),i(c),s(f)},l=(c,g,f,m)=>{e.onSubmitAddUrl?.(c,g,f,m),r(!n),i(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(ma,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:o}):null]}),d(ei,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}p();async function ti(){let e=["bingGlobalConfig","baiduGlobalConfig",Mb,_a];for(let t of e)await Z.storage.local.remove(t);pe()||await Ry(),await Rp()}function Iv(){return pe()?Promise.resolve("0 B"):sm()}p();var T0='',qu="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Rv="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",zv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",Nv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Uv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";p();p();function os(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}p();function BA(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[i,o]=K(!1);function s(u,l){u.preventDefault(),o(!0),new zr(n).delete(l).catch(c=>{an(t("delete"))}).then(()=>a()).finally(()=>o(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":i,children:t("delete")})}function uf(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[i,o,s,u]=$e(),[l,c]=K([]),[g,f]=K(!0),[m,h]=K(!1),[y,T]=K({});le(()=>{n&&x().then(()=>f(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new zr(n).listAll().then(A=>{c(A)}).catch(A=>r())}function w(v){if(v.preventDefault(),l.length>=10)return an(a("maxBackupFiles",{count:10}));h(!0);let A="immersive-translate-config-"+os()+".json";new zr(n).uploadConfig(i,A).catch(D=>{an(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function L(v,A,D){v.preventDefault(),T({[D]:!0}),new zr(n).getConfig(A).then(S=>{o(()=>({...S})),ut(a("importSuccess"))}).catch(S=>{R.error(S),an(a("importFail"))}).finally(()=>T({}))}function M(v,A){new zr(n).getConfig(v).then(D=>{let S=document.createElement("a");S.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),S.setAttribute("download",A),S.style.display="none",document.body.appendChild(S),S.click(),document.body.removeChild(S)}).catch(D=>{R.error("download google config file failed",D),an(a("downloadFail")+": "+D.message)})}function C(v){v.preventDefault(),o({...i,autoSync:!1}),Ha.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,A)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),M(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",cu(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[A],disabled:y[A],onClick:D=>L(D,v.id,A),children:a("import_hint")}),d(BA,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+A))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":m,onClick:w,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:C,disabled:g,children:a("revokeAuth")})]})]})})}p();p();function qr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var we=oo([]);function Jt(e){let[t,n]=K(null);return le(()=>{bt().then(r=>{n(r),R.debug("current config",r)})},[]),le(()=>{bt().then(r=>{n(r)})},[e]),t}function Un(e){let[t,n]=K(null);return le(()=>{e&&yn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function qv(){let[e,t]=K(!1),n=Ir();return le(()=>{pe()&&(!n||n=="0.0.0"||qr(n,"0.9.0")||t(!0))},[n]),[e,t]}function fa(){let[e,t]=K(null);return le(()=>{Wt().then(r=>{t(r)})},[]),[e,r=>{t(r),Kt(r)}]}p();var ct=class extends pi{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(R.error("ErrorBoundary",this.error,this.info),d(IA,{error:this.error,info:this.info})):this.props.children}};function IA({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var lf=R;function RA(){let[e,t]=K(null);return le(()=>{bt().then(n=>{t(n)})},[]),e}function df(){let[e,t,n,r,a]=$e(),i=RA(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!wo()&&d(f,{}),d(m,{config:i})]})});function c(){let h=b=>{b.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(x=>{lf.error("clean local config error",x)}),Ra().catch(x=>{lf.error("clean buildin config error",x)}),ti().catch(x=>{lf.error("clean cache error",x)}),ut(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},T=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=w=>{let L=w.target,M=new FileReader;M.onload=function(){try{let C=JSON.parse(M.result);y(C),ut(o("successImportConfig"))}catch(C){an(`Invalid JSON ${C.message}`)}},M.readAsText(L.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:T,href:"#",role:"button",children:[zA,o("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),wo()){let x=Le();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(x,"immersive-translate-config-"+os()+".txt")}},role:"button",children:[NA,o("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:o("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:o("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function f(){let[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(!1),[L,M]=K("");le(()=>{if(eu()&&n){let P=localStorage.getItem(tu);if(localStorage.removeItem(tu),P){let O=globalThis.localStorage.getItem(yp);R.debug("import_export","rawAuthInfoStr",O);let z={},q={},I="";if(O){globalThis.localStorage.removeItem(yp);try{z=JSON.parse(O),q=z.state||{},I=z.access_token||""}catch(k){R.error("parse state error",k)}}if(I&&q&&(Ha.setAuthInfo({access_token:I}),R.debug("import_export","Google OAuth:",z),z)){let k=z.state;R.debug("state",k),k?.mode==="auto"?(b(!0),N(I)):(w(!0),D(I))}}}},[n]);function C(){b(!0),tm({source:globalThis.location.href,mode:"auto"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&N(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function v(){w(!0),y(!1),tm({source:globalThis.location.href,mode:"manual"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&D(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function A(){M(""),C()}function D(P){M(P),w(!1),y(!0)}function S(P){b(!1),w(!1),y(!1),t({...e,autoSync:!1}),R.error("import_export","Google OAuth error:"+P),an(o("authFail"))}function N(P){b(!0),R.debug("sync latest with drive",P,e),M(P),em(P,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?ut(o("successSyncConfig")):ut(o("successSyncButNoChange"))},O=>an(o("syncFail")+O)).finally(()=>{b(!1)})}function F(P){t({...e,autoSync:P.checked}),P.checked&&C()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:o("syncToCloud")}),d("h6",{class:"!text-sm",children:o("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),C()},"aria-busy":T,href:"#",role:"button",children:[T?d(xe,{}):jv,o("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:P=>{P.preventDefault(),v()},class:"secondary text-sm",children:o("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&o("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(uf,{onClose:()=>y(!1),authExpire:A,accessToken:L}):null]})}function m({config:h}){let y=Wv(),[T,b]=K(!1),[x,w]=K(""),[L,M]=K(""),[C,v]=K(null),{t:A}=W();if(!y||!y.token)return null;let D=Qt(y);async function S(){try{if(T)return;b(!0),M("");let P=await v0(y?.token,e,a),O="";switch(P){case"upload":{O=A("successSyncConfigToAccount");break}case"override":{O=A("successSyncConfigInAccount");break}default:O=A("syncConfigNoUpdate")}w(O)}catch(P){w(""),M(P.message)}finally{b(!1)}}let N=P=>{l({...u,proAutoSync:P})},F=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:A("syncToAccount")}),d("h6",{class:"!text-sm",children:A("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{N(!F)},checked:F}),A("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),S()},"aria-busy":T,href:"#",role:"button",children:[jv," ",A("syncToAccountButton")]}),L?d("p",{class:"text-xs text-red-500",children:L}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&A("lastSyncedAt",{date:ly(u.accountLastSyncedAt)})})]})}}async function v0(e,t,n){try{if(t===null)return"noupdate";let r=await Wt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await cf(e,t),await Kt(r),"upload"}let a=await Kv(e);r.accountLastSyncedAt=Date.now(),R.debug("settings",t),R.debug("local settings.updatedAt",t.updatedAt),R.debug("remote settings.updatedAt",a.updatedAt),R.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&t.updatedAt>a.updatedAt&&(i=!0),R.debug("isUpload",i),i)return await cf(e,t),await Kt(r),"upload";let o=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(o=!0),!o&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||OA(n)&&v0(n.token,e,t).then(i=>{R.debug("syncUserSetting result",i)})},[e,n])}function OA(e){return Qt(e)?!0:new Date(e.createTime){it.get(ht,null).then(n=>{t(n)})},[t]),e}function Kv(e){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function cf(e,t){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var jv=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),zA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),NA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});p();var UA=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Gv=UA;p();var gf="Arial",pf=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===gf.toLowerCase()?!0:Vv(gf,t).join("")!==Vv(e,t).join("")}catch{return!1}};function Vv(e,t){let n=t.length*12,r=20,a=new Date().getTime(),i=document.createElement("canvas"),o=i.getContext("2d");if(!o)return[];i.width=n,i.height=r,o.textAlign="center",o.fillStyle="black",o.textBaseline="middle",o.clearRect(0,0,n,r),o.font="12px "+e+", "+gf,o.fillText(t,n/2,r/2);let s=o.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}p();p();function mf(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:i,onChange:o}=e,s=t(i.descriptionKey,{1:i.descriptionLink1,2:i.descriptionLink2});return!r&&i.descriptionKeyForNormal&&(s=t(i.descriptionKeyForNormal,{1:i.descriptionLink1,2:i.descriptionLink2})),(!n||da(n))&&!r&&i.name=="pro"?null:d("label",{class:"pro-radio-label",for:i.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:i.name,name:i.name,value:i.name,onClick:o,checked:i.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(i.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function ni({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:i}=W(),o=Ge(),[s,u]=K(!1),[l,c]=K(""),[g,f]=K(""),[m,h]=K(null),[y,T]=K(null),[b,x,w,L,M]=Me(we),C=B=>{x(H=>{let j={...H,[n]:B};return n==="translationService"&&(j.translationServiceChangedbyUserAt=new Date().toISOString()),j})},v=t&&Mi(t,n)||[],A=ze(()=>{if(e&&t){let{translationServices:B}=e,H=t[n],j=B?.[H];return j?{...j}:{}}return null},[e,t]),D=ze(()=>{if(e&&t){let B=t[n];if(nr[B])return _o(n,B,t)}return null},[e,t]);if(le(()=>{it.get(ht,null).then(B=>{B?(h(B),T(Qt(B))):T(!1)}).catch(B=>{T(!1)})},[]),y===null)return null;let S=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:r||i("service"),description:a||i("select translation service")}),d(F,{})]}),d(P,{}),d(O,{}),S&&d("article",{children:[d(z,{}),d(q,{}),d(I,{}),d(N,{}),k(),_()]})]});function N(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:i("geminiWarning")}):null}function F(){return d("select",{class:"select",onChange:B=>{B.preventDefault(),c(""),f(""),C(B.target.value)},children:v.map((B,H)=>d("option",{value:B.id,selected:B.id===t?.config?.[n],children:`${i("translationServices."+B.id)}${B.ok?"":" "+(!y&&!o&&B.providers&&B.providers.length>0?i("needLoginAction"):i("needActionForOptions"))}`},"service-item="+H))})}function P(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!A||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:i("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async B=>{B.preventDefault();try{c(""),f(""),u(!0),await xn(500);let H=D.class;H&&H.clearState&&await H.clearState(),await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),f("verified")}catch(H){let j=H.message;try{j=H?.uiConfig?.(t)?.errMsg||H.message}catch{}c(j)}finally{u(!1)}},children:i("verifyService")})]})}function z(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:i("chooseProviderLabel")}),D.providers.map((B,H)=>d(mf,{userConfig:e,isProUser:!!y,provider:B,currentProvider:D.currentProvider,onChange:j=>{j.preventDefault();let V=j.target.value;V&&x(ie=>{let te=ie.translationServices||{},J=te[D.id]||{};return{...ie,translationServices:{...te,[D.id]:{...J,provider:V}}}})}}))]}):null}function q(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:rt.sanitize(i(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function I(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:i(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:i("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:i("KeyAndConfigurationTutorial")})]})}function k(){return!A||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((B,H)=>d("div",{class:"mt-2",children:d(is,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:B,value:A[B.name],onChange:j=>{x(G=>{let V=G.translationServices||{},ie=V[D.id]||{};return{...G,translationServices:{...V,[D.id]:{...ie,[B.name]:j}}}})},onFinish:()=>{ut(i("saved"))}},B.name+D.id)},"service-item-prop-"+B.name+H))})}function _(){return!A||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[i("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((B,H)=>{let j=A[B.name];return B.name==="apiUrl"&&D?.id==="openai"&&A?.APIKEY?.startsWith("immersiveopenai_")&&(B={...B,disabled:!0},j="https://openai-api.immersivetranslate.com/v1/chat/completions"),B.name=="placeholderDelimiters"&&(B.default=A.placeholderDelimiters||B.default),d("div",{class:"mt-2",children:d(is,{config:e,service:D?.id,field:B,value:j,onChange:G=>{x(V=>{let ie=V.translationServices||{},te=ie[D.id]||{};return{...V,translationServices:{...ie,[D.id]:{...te,[B.name]:G}}}})},onFinish:()=>{ut(i("saved"))}},B.name+D.id)},"service-item-optional-prop-"+B.name+H)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:B=>{B.preventDefault(),window.confirm(i("confirmResetToDefaultSettings"))&&(x(j=>{let G=j.translationServices||{};return{...j,translationServices:{...G,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:i("resetToDefaultSettings")})]})})}}var qA=Object.keys(Uo),Yv=Nc();function S0(){let e=$e(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o);Ct(t,n);let[u,l]=qv();return le(()=>()=>{Ut.unbind("esc")},[]),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d(jA,{}),d(QA,{config:o}),d(KA,{config:o}),d(ni,{config:o,ctx:s,serviceType:"translationService"}),d(HA,{config:o}),d(GA,{config:o}),d(VA,{config:o}),d($A,{config:o}),d(YA,{config:o}),d(WA,{config:o,ctx:s}),d(Gv,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function jA(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=s=>{s.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(u=>{R.error("clean local config error",u)}),Ra().catch(u=>{R.error("clean buildin config error",u)}),ti().catch(u=>{R.error("clean cache error",u)}),ut(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:i("general")}),d("a",{class:"text-sm",href:"#",onClick:o,children:i("reset")})]})}function HA({config:e}){let[t,n,r,a,i]=Me(we),{t:o,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(Ae,{title:o("interface language"),description:o("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),pe()||setTimeout(()=>{jc()},200)},children:qA.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Zt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function WA({config:e,ctx:t}){let{t:n}=W(),[r,a]=K(0),[i,o]=K(""),[s,u]=K(!1),l=$e(),c=(w,L,M)=>{u(!s),h(C=>{let v=C.translationThemePatterns||{},A=v[L]||{},D=A.matches||[],S=[...D];return M==="edit"&&(S=Ht(i,D)),S=zn(w,S),{...C,translationThemePatterns:{...v,[L]:{...A,matches:S}}}})},g=(w,L)=>{h(M=>{let C=M.translationThemePatterns||{},v=C[L]||{},D=[...v.matches||[]];return w.forEach(S=>{D=Ht(S,D)}),{...M,translationThemePatterns:{...C,[L]:{...v,matches:D}}}})},f=(w,L,M)=>{u(!s),o(w),a(M)},[m,h,y,T,b]=l,x=w=>{h(L=>{let M={matches:[],excludeMatches:[]};return L&&L.translationThemePatterns&&L.translationThemePatterns[w]&&(M=L.translationThemePatterns[w]),Ui(document,w,M,L.selectTranslationFont),{...L,translationTheme:w}})};return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:w=>{x(w.target.value)},children:xp.map((w,L)=>d("option",{value:w,selected:w===e.translationTheme,children:n(`translationTheme.${w}`)},"theme"+L))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:jo(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ho(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&hf(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[hf(e.translationTheme).map((w,L)=>{w.label=n(`customThemeLabel.${w.name}`);let M=e.translationThemePatterns||{},C=e.translationTheme,v=M[C]||{},A=`theme-${C}-${w.name}`,D=Oy(A)||void 0,S=v[w.name]||D;return d(is,{config:e,field:w,value:S,onChange:N=>{h(F=>{let P=F.translationThemePatterns||{},z={...P[e.translationTheme]||{},[w.name]:N},q={...F,translationThemePatterns:{...P,[e.translationTheme]:z}};return Ui(document,e.translationTheme,z,F.selectTranslationFont),q})}},"theme-prop"+L)}),d("a",{href:"#",class:"text-sm secondary",onClick:w=>{w.preventDefault(),h(L=>{let M=L.translationThemePatterns||{},C={...M[e.translationTheme]};hf(e.translationTheme).forEach(A=>{delete C[A.name]});let v={...L,translationThemePatterns:{...M,[e.translationTheme]:C}};return Ui(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(nk,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),xp.map((w,L)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:w,checked:w===e.translationTheme,onChange:M=>{x(M.target.value)}}),n(`translationTheme.${w}`)]})}),d("p",{children:d("font",{class:jo(w,!1,[],!1).join(" "),children:d("font",{class:Ho(w).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+L))]})]})}),d("div",{class:"nav",children:[d(Ae,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:w=>{w.preventDefault(),u(!s)},children:n("add")})})]}),s?d(ma,{toggleModal:w=>{w.preventDefault(),u(!s)},onAddInterfaceUrl:(w,L)=>{c(w,e.translationTheme,L)},urlValue:i,index:r}):null,d(ei,{urls:tk(e),type:"matches",onDeleteUrl:w=>{g(w,e.translationTheme)},onEditUrl:f})]})}function KA({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("target"),description:o("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Zt(l,e?.interfaceLanguage)},"language"+c))})]})}function GA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(Nu,{title:t("always languages"),description:t("always translate the following languages"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function VA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(Nu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function $A({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];if(f==="edit"){if(!b[c])return m;b[c]=l}return b=zn(l,b),x=Ht(l,T),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await Wt();for(let f of l){let m=f,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==m),T=!1;y.length!==h.length&&(T=!0),T&&Kt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let f=g.translationUrlPattern,m=[];f&&f.matches&&(m=f.matches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Uu,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function YA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];return f==="edit"&&(x[c]=l),b=Ht(l,y),x=zn(l,x),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let f=g.translationUrlPattern,m=[];f&&f.excludeMatches&&(m=f.excludeMatches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Uu,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Qv(e){return{handleTranslationLanguagePatternSelected:qe((n,r)=>{if(!n){e(o=>{let s={...o.translationLanguagePattern};return{...o,translationLanguagePattern:{...o.translationLanguagePattern,matches:Ht(r,s.matches),excludeMatches:Ht(r,s.excludeMatches)}}});return}let a=n,i=a==="matches"?"excludeMatches":"matches";r&&e(o=>{let s={...o.translationLanguagePattern};return s[a]=zn(r,s[a]),s[i]=Ht(r,s[i]),{...o,translationLanguagePattern:{...o.translationLanguagePattern,...s}}})},[e])}}var ff=0,yf;async function Zv(e){if(ff>60*10)return null;ff++,it.refresh(),await xn(300);let t=await it.get(ht,null);R.debug("loopCheckUser",ff,t),t?(clearTimeout(yf),e(t)):yf=setTimeout(Zv.bind(null,e),1500)}function $v(e){let{user:t,lang:n}=e,r=Ge(),a=t&&t.email==="test@immersivetranslate.com",{t:i}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let o=t,s=o.subscription,u=ek(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",f="";if(g){let m="";s.isTrial&&(m=i("autoRenewTrialSuffix")),f=i("currentPlanDescriptionForContinuous",{plan:`${i(l)}${m}`,endAt:u})}else c?f=i("currentPlanDescriptionForOneTime",{plan:i(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):F1(o)?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):f=i("currentPlanDescriptionForAutoRenewCaceling",{plan:i(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:f}})}else return d("span",{class:"info-subtitle",children:r||a?"":i("currentPlanDescriptionForFree")})}function QA({config:e}){let{t}=W(),n=Ge(),[r,a]=K(null),i=!!e.showSponsorOnSafari,[o,s,u,l,c]=Me(we),g=e.interfaceLanguage;le(()=>(it.get(ht,null).then(y=>{y&&(a(y),ZA(y.token).then(T=>{let b=T.data;b.token=y.token,it.set(ht,b),a(b)}).catch(T=>{hu(T),a(null)}))}),()=>{clearTimeout(yf)}),[]);let f=qe(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&JA(r.token).finally(async()=>{await it.remove(ht),await xn(200),await it.refresh(),a(null)})},[r]),m=qe(async y=>{y&&y.preventDefault&&y.preventDefault(),XA(Sc),await it.set(uu,!0),Zv(T=>{v0(T.token,o,s),a(T),Tf?.close(),window.location.reload()})},[a]),h=r?.avatar||Ov;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?da(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d($v,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&i===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${Fa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:qu})]}),d("div",{class:"",children:d("a",{href:`${Li}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:qu})]}),d($v,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Li,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]}):da(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:m,children:t(n?"loginForSafari":"login")})]})}var Jv=Pi;function ZA(e){return de({responseType:"json",url:Jv+"/v1/user",method:"get",headers:{token:e}})}function JA(e){return de({responseType:"json",url:Jv+"/v1/user/logout",method:"delete",headers:{token:e}})}var Tf=null;function XA(e){let r=screen.width/2-230,a=screen.height/2-640/2;return Tf=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),Tf}function ek(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function hf(e){let t=[];return su[e]&&(t=t.concat(su[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function tk(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var bf="";function nk({config:e}){let{t}=W(),[n,r]=K(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(rk,{config:e,isOpen:n})]})}function rk({config:e,isOpen:t}){let{t:n}=W(),[r,a]=K([]),[i,o]=K(!1);le(()=>{if(!t||r.length)return;let m=e.translationFonts.filter(y=>pf(y,n("sampleTargetText").charAt(0)+"a"));m.length&&m.unshift("none");let h=e.selectTranslationFont&&!m.find(y=>y===e.selectTranslationFont);(!m.length||h)&&o(!0),a(m)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Me(we),f=m=>{m!==bf&&!pf(m,n("sampleTargetText").charAt(0)+"a")&&an(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,T={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(T=h.translationThemePatterns[y]),Ui(document,y,T,m),{...h,selectTranslationFont:m}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{o(!i),i&&(r.find(h=>h===e.selectTranslationFont)||f(bf))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:i}),n("translationFont.custom")]}):null,i?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:m=>f(m.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:m=>{f(m.target.value)},children:r.map((m,h)=>{let y=n(`font.${m}`);y.startsWith("font.")&&(y=m);let T=m=="none"?bf:m;return d("option",{value:T,selected:m===e?.selectTranslationFont,children:y},"locale"+h)})})]})}p();var Ln={};vc.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function vf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=K(null),{t:u}=W();if(le(()=>{bt().then(c=>{yn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!o)return d("div",{children:"loading"});let l=o.config;return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(ak,{config:l}),d(ik,{config:l}),d(ok,{config:l}),d(ni,{config:l,ctx:o,serviceType:"inputTranslationService"}),d(sk,{config:l}),d(uk,{config:l}),d(ck,{config:l}),d(lk,{config:l})]})})}function ak({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[o("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?o("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):o("enableInputTranslationDescription",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function ik({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?o("inputTargetLanguageDescriptionForNoneKey"):o("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Zt(l,e.interfaceLanguage)},"language"+c))})]})}function ok({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function sk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(Ae,{title:o("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?o("inputStartingTriggerKeyDescriptionForNoneKey"):o("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}):null}function uk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTrailingTriggerKeyTitle"),description:o("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:o("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function lk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),[s,u]=K(!1),l=b=>{u(!s)},[c,g]=K(0),[f,m]=K(""),h=(b,x,w,L)=>{l(w),n(M=>{let C=M.inputTranslationUrlPattern,v=[],A=[];C&&C.matches&&C.excludeMatches&&(v=C.matches,A=C.excludeMatches);let D=[...v],S=[...A];return L==="edit"&&(w==="matches"?D[x]=b:S[x]=b),w==="matches"?(D=zn(b,D),S=Ht(b,A)):(D=Ht(b,v),S=zn(b,S)),{...M,inputTranslationUrlPattern:{...M.inputTranslationUrlPattern,matches:D,excludeMatches:S}}})},y=(b,x)=>{n(w=>{let L=w.inputTranslationUrlPattern,M=[];x==="matches"?L&&L.matches&&(M=L.matches):L&&L.excludeMatches&&(M=L.excludeMatches);let C=[...M];return b.forEach(v=>{C=Ht(v,C)}),{...w,inputTranslationUrlPattern:{...w.inputTranslationUrlPattern,[x]:C}}})},T=(b,x,w)=>{l(x),m(b),g(w)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTranslationBlockUrlsTitle"),description:o("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:o("add")})}),s?d(ma,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:f,index:c}):null]}),d(ei,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:T})]}):null}function ck({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=()=>st().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>st().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(Ae,{title:o("inputTrailingTriggerKeyTimeout"),description:o("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}p();function Sf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),{t:s}=W(),[u,l]=K({}),[c,g]=K({});return le(()=>{Z.storage.sync.get(null).then(f=>{l(f),Z.storage.local.get(null).then(m=>{g(m)})})},[t]),!o||!t?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(fk,{}),d(mk,{}),d(hk,{}),d(dk,{}),d(gk,{}),d(pk,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(o,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function dk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let f=JSON.parse(c);if(!Array.isArray(f)){an("Invalid rules, rules must be an array");return}g.rules=f}t(()=>g),ut(i("saved"))}catch(c){an(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(i("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),ut(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:o,placeholder:`[{ + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],f=c[0].detectedLanguage;return{text:g.text,from:nv.get(f.language),to:nv.get(g.to)}}p();p();p();p();p();function Qa(e){return e!=null}function cv(e,t,n){return`${e.type}#${t}#${n}`}function dv(e,t,n,r,a){return{body:a,id:r,type:cv(e,t,n)}}function pA(e,t,n,r){return{id:n,response:r,type:cv(e,"ask",t)}}function gv(e,t,n,r){if(Qa(r)){let a=r.type;if(Qa(a)&&Qa(r.body)){let[i,o,s]=a.split("#");return i===e.type&&o===t&&s===n}else return!1}else return!1}function mA(e,t,n){if(Qa(n)){let r=n.type;if(Qa(r)&&Qa(n.response)){let[a,i,o]=r.split("#");return a===e.type&&i==="ask"&&o===t}else return!1}else return!1}function fA(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function hA(e,t,n,r){return new Promise(a=>{let i=o=>{let s=o.data;mA(t,n,s)&&s.id===r&&(e.removeEventListener("message",i),a(s.response))};e.addEventListener("message",i)})}function bA(e,t,n,r){let a=i=>{let o=i.data;gv(t,"tell",n,o)&&r(o.body)};return e.addEventListener("message",a),[e,a]}function uv(e,t,n,r,a,i){let o=async s=>{let u=s.data;if(gv(n,"ask",r,u)){let l=await i(u.body);t=s.source,t.postMessage(pA(n,r,u.id,l),s.origin)}};return e.addEventListener("message",o),[e,o]}function yA(e,t,n,r,a){let i=Math.random().toString();return e.postMessage(dv(t,"tell",n,i,r),a)}async function lv(e,t,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),f=await hA(e,n,r,s);clearTimeout(g),l(f)});return t.postMessage(dv(n,"ask",r,s,a),i),u}var Za=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;uv(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let i=n.contentWindow;if(Qa(i))return new e(t,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await lv(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(bA(this.thisWindow,this.protocol,t,n))}tell(t,n){yA(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(uv(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return lv(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){fA(this.listeners)}};var pv;async function mv(){if(st()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=Za.iframe(Tc,"*",{targetWindow:t});pv=n,await Za.connect(n).catch(r=>{R.error("connect with parent frame error",r)})}}function fv(){return pv}var m0=new Map;async function jm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=Gn(e.body)),m0.has(t))return m0.get(t);let n=de(e);m0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{m0.delete(t)},3e3)}}async function hv(e){return jm(e)}async function f0(e){if(st()){let n=fv();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw R.error("can not comunicate with root frame, use strict limiter",r),r}else return jm(e)}else return jm(e)}p();function bv(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:e,accessTokenExpiresAt:o.toISOString()}}p();async function h0(e){await Bp(e)}async function b0(e,t){let n=await _p(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return yv(e,t)}return yv(e,t)}async function yv(e,t){let n=await t(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Mp(e,n,i-1e3),n}var TA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Hm=new Map(TA),Ou=class extends Pe{static langMap=Hm;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await h0(fp)}async translate(t){let{text:n,from:r,to:a}=t;return n?await sv(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await b0(fp,async()=>{let t=await f0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return bv(t)})}async translateList(t){let{from:n,to:r,text:a}=t,i=Hm.get(n)||"auto",o=Hm.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let f of a)u.push({Text:f});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(f=>f.translations[0]?.text||""),from:n,to:r};throw new Q("Microsoft translate error "+JSON.stringify(g))}};p();var Tv=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Wm=new Map(Tv),vA=new Map(Tv.map(([e,t])=>[t,e])),Km=class extends Pe{static langMap=Wm;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new Q("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=t,l=Gn(a+o+n+i);this.domain&&(l=Gn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Wm.get(s)||"auto",to:Wm.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let f=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(f.error_code)throw new Q("API_SERVER_ERROR",f.error_msg);let{trans_result:m,from:h}=f,y=m.map(({dst:b})=>b);return{from:vA.get(h)||h,to:u,text:y.join(` +`)}}},vv=Km;p();p();var Wi=class extends Pe{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new Q("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,f)=>{let[m,h]=f.split(":"),y=o[m];return h==="random"?SA(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function SA(e){let t=Math.floor(Math.random()*e.length);return e[t]}var Sv=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Gm=class extends Wi{static langMap=new Map(Sv);constructor(t,n,r){if(!t?.token)throw new Q("token are required");super({...t,isSupportList:!0,langs:Sv,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},Cv=Gm;p();var CA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],y0=new Map(CA),Vm=class extends Pe{static langMap=y0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!y0.get(a))throw new Q(`Unsupported language: ${a}`);if(r==="auto")throw new Q("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${y0.get(r)||"auto"}2${y0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},xv=Vm;p();var Ev=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],$m=new Map(Ev),xA=new Map(Ev.map(([e,t])=>[t,e]));function EA(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var Ym=class extends Pe{static langMap=$m;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new Q("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i=wA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+EA(n)+i+o+this.appSecret,u=await Cr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:$m.get(r)||"auto",to:$m.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),f=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!f.translation)throw new Q(JSON.stringify(f));let m=f.l,[h,y]=m.split("2");return{text:f.translation.join(` +`),from:xA.get(h),to:a}}};function wA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Zm=class extends Pe{static langMap=Qm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i={q:n,from:Qm.get(r)||"auto",to:Qm.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new Q("Youdao translation failed: "+JSON.stringify(s))}},Av=Zm;p();var zu=class extends Wi{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||su,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};p();var kv="immersive-translate-gemini-fake-user-key",DA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],Pv=new Map(DA),Jm=class extends es{static langMap=Pv;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return Pv}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Lp(kv,""),this.fakeId||(this.fakeId=AA(10),await Fp(kv,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+t;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let i=super.filterContent(t,n,r);return i.includes(this.fakeId)&&a.length<=1?t:i}};function AA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await f0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":ef.get(r)+"-"}${ef.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var LA={mock:Zo,mock2:Zo,custom:zu,google:Hi,transmart:_u,deepl:UT,volc:XT,volcAlpha:Iu,bing:Ou,tencent:Pu,tenAlpha:Lu,baidu:vv,caiyun:Cv,cai:xv,openl:d0,youdao:wv,you:Av,d:Qo,dpro:Qo,deeplx:Ru,niu:qT,azure:jT,openai:$T,gemini:Lv,claude:Mv,papago:HT,aliyun:Bu,yandex:Nu},Ja={};Object.keys(nr).forEach(e=>{Ja[e]={...nr[e],class:LA[e]}});function Xa(e,t){let n=Rn;if(Ja[e]&&Ja[e].class&&Ja[e].class.langMap&&Ja[e].class.langMap.size>0){let r=Ja[e].class.langMap,a=n.filter(i=>r.get(i));return a.includes(t)||a.unshift("placeholder"),a}else return Rn}async function Nr(e,t,n){if(!e.text)return e;let r=null,a=await nt({sentences:[e]},t,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new Q("translateFailed","translate failed")}async function Fv(e,t){for(let n of e)try{return await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function tf(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,i=n,o=a[i]||{},s=Qt(e.user);await new Ja[i].class(o,r,{translationService:i,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _A(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function nt(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:i,state:o}=t,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=KT(g,{sourceLanguage:_A(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let f=a.beta,m=o.cache===!1&&f,h=a.debug===!0&&f;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(m&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],T={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,w=Qt(t.user),L;try{L=new Ja[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await L.init()}catch(v){if(n){y.push(...e.sentences);let A={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let S=v instanceof Q?new Q(v.name,v.message).initNetWork(v.status).initData(v.data||A):v;n(S,null,D)}}return{sentences:[]}}if(o.cache)for(let v of e.sentences){x++;let A=l;l==="openl"&&(A=l+"-"+g.codename||d0.DEFAULT_CODENAME);let D=L.getCacheKeyPrefix();D&&(A=D+"-"+A);let S=null;try{S=await Cl(pT({originalText:v.text,from:v.from,to:v.to,service:A}),200)}catch(N){R.warn("query cache DB error, but it's ok",N)}if(S){let N={...v,text:S.translatedText};T.sentences[x]=N,n&&n(null,N,v)}else y.push(v)}else y.push(...e.sentences);let M=y.length;if(b-M>0&&R.debug(`use ${b-M} sentences from cache`),!y.length)return T;let C=await L.multipleTranslate({sentences:y},g,(v,A,D)=>{if(n&&n(v,A,D),!v&&A&&!l.startsWith("mock")&&o.cache){let S=l;l==="openl"&&(S=l+"-"+g.codename||d0.DEFAULT_CODENAME);let N=L.getCacheKeyPrefix();N&&(S=N+"-"+S),o.cache&&Cl(mT({translatedText:A.text,from:D.from,to:D.to,detectedFrom:A.from,key:Gn(D.text),service:S}),3e3).catch(F=>{R.warn("set cache DB error",F)})}});for(let v of C?.sentences||[]){let A=T.sentences.findIndex(D=>!D);if(A===-1)throw new Q("translateFailed","can not match the result");T.sentences[A]=v}return T}p();p();p();var rs={},MA={root:"",lang:"en",fallbackLang:"en"};function nf(e,t){let n=Object.assign({},MA,e);rs=t||rs;let[r,a]=K(n.lang),[i,o]=K(rs),[s,u]=K(!1),l=g=>{if(i.hasOwnProperty(g))return;u(!1);let f=H1(n.root||"",g);n.getUrl&&(f=n.getUrl(n.root||"",g),fetch(f).then(m=>m.json()).then(m=>{rs[g]=m,o({...rs}),u(!0)}).catch(m=>{o({...rs}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,f)=>{if(!i.hasOwnProperty(r))return g;let m=pu(i,r,g);return m===g&&r!==n.fallbackLang&&(m=pu(i,n.fallbackLang,g)),Op(m,f)},isReady:s}}var af=oo(null),rf={root:"assets",lang:"en",fallbackLang:"en"},as=e=>{let{t,setLang:n,lang:r,isReady:a}=nf({root:e.root||rf.root,lang:e.lang||rf.lang,fallbackLang:e.fallbackLang||rf.fallbackLang,getUrl:e.getUrl},e.translations);return d(af.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Me(af)}p();function Ae(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}p();p();function Ur(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:i}=W();return n=n||(i==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((o,s)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function of(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:i=>{e.onChange(i.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(i=>i.selected)?.value,onChange:i=>{let o=i.target.value,s=t.find(u=>u.value===o);s&&s.onSelected(s)},children:t.map((i,o)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+o))})}p();function Ki(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=K(e.value),{config:i,field:o,onFinish:s}=e,u=o.name;o.label&&(u=o.label),o.labelKey&&(u=t(o.labelKey));let l={},c={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(c=i.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let f=0;f{let f=g.target.value,m=Array.isArray(r)?f.split(","):f;a(m),e.onChange(m)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function is(e){let{t}=W(),[n,r]=K(!0),[a,i]=K(!1),{config:o,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:f}=e;g=g??(l.default||"");let m={},h={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(h=o.translationServices[e.service]),h.env){let T=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||i(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(of,{maxWidth:200,items:l.options.map(T=>({label:`${T.label?t(T.label):T.value}`,value:T.value,selected:g===T.value,onSelected:()=>{c(T.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let T=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(of,{maxWidth:250,items:T.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(T[0]),i(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Ki,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Ki,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Ki,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let T=g,b="";T||(T="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:w}=FA(T);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:L=>{c(L.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:w},onInput:L=>{c(L.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:T=>{c(T.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,m)}}):null]})}):null}}function FA(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}p();function Bv(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let i=Zt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),i]})},"language-"+a)})})]})}function Uu(e){let{selectLanguages:t,languages:n}=e,r=ze(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d(Bv,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,i)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Zt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:o=>{o.preventDefault(),e.onChange(!1,t[i])}})]},"lang-"+i))})]}):null}p();p();function ma(e){let{t}=W(),n=$e(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:i=>{i.target&&i.target.id==="immersive-translate-overlay"&&r(i)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:i=>{if(i.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function ei(e){let{t}=W(),[n,r]=K([]),[a,i]=K(!1),[o,s]=K(!1);function u(){e.onDeleteUrl(n,e.type),r([]),i(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,f)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[o&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:m=>{m.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:m=>{e.onEditUrl(g,e.type,f)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:m=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+f))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:o?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let m=g.target.checked;r(m?e.urls:[]),i(m)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function qu(e){let{t}=W(),[n,r]=K(!1),[a,i]=K(""),[o,s]=K(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,f)=>{r(!n),i(c),s(f)},l=(c,g,f,m)=>{e.onSubmitAddUrl?.(c,g,f,m),r(!n),i(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(ma,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:o}):null]}),d(ei,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}p();async function ti(){let e=["bingGlobalConfig","baiduGlobalConfig",Mb,_a];for(let t of e)await Z.storage.local.remove(t);pe()||await Ry(),await Ip()}function Iv(){return pe()?Promise.resolve("0 B"):om()}p();var T0='',ju="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Rv="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",zv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",Nv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Uv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";p();p();function os(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}p();function BA(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[i,o]=K(!1);function s(u,l){u.preventDefault(),o(!0),new zr(n).delete(l).catch(c=>{on(t("delete"))}).then(()=>a()).finally(()=>o(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":i,children:t("delete")})}function sf(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[i,o,s,u]=Ye(),[l,c]=K([]),[g,f]=K(!0),[m,h]=K(!1),[y,T]=K({});le(()=>{n&&x().then(()=>f(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new zr(n).listAll().then(A=>{c(A)}).catch(A=>r())}function w(v){if(v.preventDefault(),l.length>=10)return on(a("maxBackupFiles",{count:10}));h(!0);let A="immersive-translate-config-"+os()+".json";new zr(n).uploadConfig(i,A).catch(D=>{on(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function L(v,A,D){v.preventDefault(),T({[D]:!0}),new zr(n).getConfig(A).then(S=>{o(()=>({...S})),lt(a("importSuccess"))}).catch(S=>{R.error(S),on(a("importFail"))}).finally(()=>T({}))}function M(v,A){new zr(n).getConfig(v).then(D=>{let S=document.createElement("a");S.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),S.setAttribute("download",A),S.style.display="none",document.body.appendChild(S),S.click(),document.body.removeChild(S)}).catch(D=>{R.error("download google config file failed",D),on(a("downloadFail")+": "+D.message)})}function C(v){v.preventDefault(),o({...i,autoSync:!1}),Ha.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,A)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),M(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",du(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[A],disabled:y[A],onClick:D=>L(D,v.id,A),children:a("import_hint")}),d(BA,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+A))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":m,onClick:w,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:C,disabled:g,children:a("revokeAuth")})]})]})})}p();p();function qr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var we=oo([]);function Jt(e){let[t,n]=K(null);return le(()=>{yt().then(r=>{n(r),R.debug("current config",r)})},[]),le(()=>{yt().then(r=>{n(r)})},[e]),t}function Un(e){let[t,n]=K(null);return le(()=>{e&&yn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function qv(){let[e,t]=K(!1),n=Ir();return le(()=>{pe()&&(!n||n=="0.0.0"||qr(n,"0.9.0")||t(!0))},[n]),[e,t]}function fa(){let[e,t]=K(null);return le(()=>{Wt().then(r=>{t(r)})},[]),[e,r=>{t(r),Kt(r)}]}p();var ct=class extends pi{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(R.error("ErrorBoundary",this.error,this.info),d(IA,{error:this.error,info:this.info})):this.props.children}};function IA({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var uf=R;function RA(){let[e,t]=K(null);return le(()=>{yt().then(n=>{t(n)})},[]),e}function cf(){let[e,t,n,r,a]=Ye(),i=RA(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!wo()&&d(f,{}),d(m,{config:i})]})});function c(){let h=b=>{b.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(x=>{uf.error("clean local config error",x)}),Ra().catch(x=>{uf.error("clean buildin config error",x)}),ti().catch(x=>{uf.error("clean cache error",x)}),lt(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},T=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=w=>{let L=w.target,M=new FileReader;M.onload=function(){try{let C=JSON.parse(M.result);y(C),lt(o("successImportConfig"))}catch(C){on(`Invalid JSON ${C.message}`)}},M.readAsText(L.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:T,href:"#",role:"button",children:[zA,o("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),wo()){let x=Le();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(x,"immersive-translate-config-"+os()+".txt")}},role:"button",children:[NA,o("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:o("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:o("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function f(){let[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(!1),[L,M]=K("");le(()=>{if(tu()&&n){let P=localStorage.getItem(nu);if(localStorage.removeItem(nu),P){let O=globalThis.localStorage.getItem(bp);R.debug("import_export","rawAuthInfoStr",O);let z={},q={},I="";if(O){globalThis.localStorage.removeItem(bp);try{z=JSON.parse(O),q=z.state||{},I=z.access_token||""}catch(k){R.error("parse state error",k)}}if(I&&q&&(Ha.setAuthInfo({access_token:I}),R.debug("import_export","Google OAuth:",z),z)){let k=z.state;R.debug("state",k),k?.mode==="auto"?(b(!0),N(I)):(w(!0),D(I))}}}},[n]);function C(){b(!0),em({source:globalThis.location.href,mode:"auto"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&N(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function v(){w(!0),y(!1),em({source:globalThis.location.href,mode:"manual"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&D(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function A(){M(""),C()}function D(P){M(P),w(!1),y(!0)}function S(P){b(!1),w(!1),y(!1),t({...e,autoSync:!1}),R.error("import_export","Google OAuth error:"+P),on(o("authFail"))}function N(P){b(!0),R.debug("sync latest with drive",P,e),M(P),Xp(P,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?lt(o("successSyncConfig")):lt(o("successSyncButNoChange"))},O=>on(o("syncFail")+O)).finally(()=>{b(!1)})}function F(P){t({...e,autoSync:P.checked}),P.checked&&C()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:o("syncToCloud")}),d("h6",{class:"!text-sm",children:o("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),C()},"aria-busy":T,href:"#",role:"button",children:[T?d(xe,{}):jv,o("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:P=>{P.preventDefault(),v()},class:"secondary text-sm",children:o("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&o("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(sf,{onClose:()=>y(!1),authExpire:A,accessToken:L}):null]})}function m({config:h}){let y=Wv(),[T,b]=K(!1),[x,w]=K(""),[L,M]=K(""),[C,v]=K(null),{t:A}=W();if(!y||!y.token)return null;let D=Qt(y);async function S(){try{if(T)return;b(!0),M("");let P=await v0(y?.token,e,a),O="";switch(P){case"upload":{O=A("successSyncConfigToAccount");break}case"override":{O=A("successSyncConfigInAccount");break}default:O=A("syncConfigNoUpdate")}w(O)}catch(P){w(""),M(P.message)}finally{b(!1)}}let N=P=>{l({...u,proAutoSync:P})},F=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:A("syncToAccount")}),d("h6",{class:"!text-sm",children:A("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{N(!F)},checked:F}),A("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),S()},"aria-busy":T,href:"#",role:"button",children:[jv," ",A("syncToAccountButton")]}),L?d("p",{class:"text-xs text-red-500",children:L}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&A("lastSyncedAt",{date:ly(u.accountLastSyncedAt)})})]})}}async function v0(e,t,n){try{if(t===null)return"noupdate";let r=await Wt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await lf(e,t),await Kt(r),"upload"}let a=await Kv(e);r.accountLastSyncedAt=Date.now(),R.debug("settings",t),R.debug("local settings.updatedAt",t.updatedAt),R.debug("remote settings.updatedAt",a.updatedAt),R.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&t.updatedAt>a.updatedAt&&(i=!0),R.debug("isUpload",i),i)return await lf(e,t),await Kt(r),"upload";let o=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(o=!0),!o&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||OA(n)&&v0(n.token,e,t).then(i=>{R.debug("syncUserSetting result",i)})},[e,n])}function OA(e){return Qt(e)?!0:new Date(e.createTime){ot.get(bt,null).then(n=>{t(n)})},[t]),e}function Kv(e){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function lf(e,t){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var jv=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),zA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),NA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});p();var UA=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Gv=UA;p();var df="Arial",gf=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===df.toLowerCase()?!0:Vv(df,t).join("")!==Vv(e,t).join("")}catch{return!1}};function Vv(e,t){let n=t.length*12,r=20,a=new Date().getTime(),i=document.createElement("canvas"),o=i.getContext("2d");if(!o)return[];i.width=n,i.height=r,o.textAlign="center",o.fillStyle="black",o.textBaseline="middle",o.clearRect(0,0,n,r),o.font="12px "+e+", "+df,o.fillText(t,n/2,r/2);let s=o.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}p();p();function pf(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:i,onChange:o}=e,s=t(i.descriptionKey,{1:i.descriptionLink1,2:i.descriptionLink2});return!r&&i.descriptionKeyForNormal&&(s=t(i.descriptionKeyForNormal,{1:i.descriptionLink1,2:i.descriptionLink2})),(!n||da(n))&&!r&&i.name=="pro"?null:d("label",{class:"pro-radio-label",for:i.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:i.name,name:i.name,value:i.name,onClick:o,checked:i.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(i.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function ni({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:i}=W(),o=Ge(),[s,u]=K(!1),[l,c]=K(""),[g,f]=K(""),[m,h]=K(null),[y,T]=K(null),[b,x,w,L,M]=Me(we),C=B=>{x(H=>{let j={...H,[n]:B};return n==="translationService"&&(j.translationServiceChangedbyUserAt=new Date().toISOString()),j})},v=t&&Mi(t,n)||[],A=ze(()=>{if(e&&t){let{translationServices:B}=e,H=t[n],j=B?.[H];return j?{...j}:{}}return null},[e,t]),D=ze(()=>{if(e&&t){let B=t[n];if(nr[B])return _o(n,B,t)}return null},[e,t]);if(le(()=>{ot.get(bt,null).then(B=>{B?(h(B),T(Qt(B))):T(!1)}).catch(B=>{T(!1)})},[]),y===null)return null;let S=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:r||i("service"),description:a||i("select translation service")}),d(F,{})]}),d(P,{}),d(O,{}),S&&d("article",{children:[d(z,{}),d(q,{}),d(I,{}),d(N,{}),k(),_()]})]});function N(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:i("geminiWarning")}):null}function F(){return d("select",{class:"select",onChange:B=>{B.preventDefault(),c(""),f(""),C(B.target.value)},children:v.map((B,H)=>d("option",{value:B.id,selected:B.id===t?.config?.[n],children:`${i("translationServices."+B.id)}${B.ok?"":" "+(!y&&!o&&B.providers&&B.providers.length>0?i("needLoginAction"):i("needActionForOptions"))}`},"service-item="+H))})}function P(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!A||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:i("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async B=>{B.preventDefault();try{c(""),f(""),u(!0),await xn(500);let H=D.class;H&&H.clearState&&await H.clearState(),await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),f("verified")}catch(H){let j=H.message;try{j=H?.uiConfig?.(t)?.errMsg||H.message}catch{}c(j)}finally{u(!1)}},children:i("verifyService")})]})}function z(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:i("chooseProviderLabel")}),D.providers.map((B,H)=>d(pf,{userConfig:e,isProUser:!!y,provider:B,currentProvider:D.currentProvider,onChange:j=>{j.preventDefault();let V=j.target.value;V&&x(ie=>{let te=ie.translationServices||{},J=te[D.id]||{};return{...ie,translationServices:{...te,[D.id]:{...J,provider:V}}}})}}))]}):null}function q(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:at.sanitize(i(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function I(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:i(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:i("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:i("KeyAndConfigurationTutorial")})]})}function k(){return!A||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((B,H)=>d("div",{class:"mt-2",children:d(is,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:B,value:A[B.name],onChange:j=>{x(G=>{let V=G.translationServices||{},ie=V[D.id]||{};return{...G,translationServices:{...V,[D.id]:{...ie,[B.name]:j}}}})},onFinish:()=>{lt(i("saved"))}},B.name+D.id)},"service-item-prop-"+B.name+H))})}function _(){return!A||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[i("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((B,H)=>{let j=A[B.name];return B.name==="apiUrl"&&D?.id==="openai"&&A?.APIKEY?.startsWith("immersiveopenai_")&&(B={...B,disabled:!0},j="https://openai-api.immersivetranslate.com/v1/chat/completions"),B.name=="placeholderDelimiters"&&(B.default=A.placeholderDelimiters||B.default),d("div",{class:"mt-2",children:d(is,{config:e,service:D?.id,field:B,value:j,onChange:G=>{x(V=>{let ie=V.translationServices||{},te=ie[D.id]||{};return{...V,translationServices:{...ie,[D.id]:{...te,[B.name]:G}}}})},onFinish:()=>{lt(i("saved"))}},B.name+D.id)},"service-item-optional-prop-"+B.name+H)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:B=>{B.preventDefault(),window.confirm(i("confirmResetToDefaultSettings"))&&(x(j=>{let G=j.translationServices||{};return{...j,translationServices:{...G,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:i("resetToDefaultSettings")})]})})}}var qA=Object.keys(Uo),Yv=Nc();function S0(){let e=Ye(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o);Ct(t,n);let[u,l]=qv();return le(()=>()=>{Ut.unbind("esc")},[]),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d(jA,{}),d(QA,{config:o}),d(KA,{config:o}),d(ni,{config:o,ctx:s,serviceType:"translationService"}),d(HA,{config:o}),d(GA,{config:o}),d(VA,{config:o}),d($A,{config:o}),d(YA,{config:o}),d(WA,{config:o,ctx:s}),d(Gv,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function jA(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=s=>{s.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(u=>{R.error("clean local config error",u)}),Ra().catch(u=>{R.error("clean buildin config error",u)}),ti().catch(u=>{R.error("clean cache error",u)}),lt(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:i("general")}),d("a",{class:"text-sm",href:"#",onClick:o,children:i("reset")})]})}function HA({config:e}){let[t,n,r,a,i]=Me(we),{t:o,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(Ae,{title:o("interface language"),description:o("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),pe()||setTimeout(()=>{jc()},200)},children:qA.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Zt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function WA({config:e,ctx:t}){let{t:n}=W(),[r,a]=K(0),[i,o]=K(""),[s,u]=K(!1),l=Ye(),c=(w,L,M)=>{u(!s),h(C=>{let v=C.translationThemePatterns||{},A=v[L]||{},D=A.matches||[],S=[...D];return M==="edit"&&(S=Ht(i,D)),S=zn(w,S),{...C,translationThemePatterns:{...v,[L]:{...A,matches:S}}}})},g=(w,L)=>{h(M=>{let C=M.translationThemePatterns||{},v=C[L]||{},D=[...v.matches||[]];return w.forEach(S=>{D=Ht(S,D)}),{...M,translationThemePatterns:{...C,[L]:{...v,matches:D}}}})},f=(w,L,M)=>{u(!s),o(w),a(M)},[m,h,y,T,b]=l,x=w=>{h(L=>{let M={matches:[],excludeMatches:[]};return L&&L.translationThemePatterns&&L.translationThemePatterns[w]&&(M=L.translationThemePatterns[w]),Ui(document,w,M,L.selectTranslationFont),{...L,translationTheme:w}})};return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:w=>{x(w.target.value)},children:Cp.map((w,L)=>d("option",{value:w,selected:w===e.translationTheme,children:n(`translationTheme.${w}`)},"theme"+L))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:jo(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ho(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&ff(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[ff(e.translationTheme).map((w,L)=>{w.label=n(`customThemeLabel.${w.name}`);let M=e.translationThemePatterns||{},C=e.translationTheme,v=M[C]||{},A=`theme-${C}-${w.name}`,D=Oy(A)||void 0,S=v[w.name]||D;return d(is,{config:e,field:w,value:S,onChange:N=>{h(F=>{let P=F.translationThemePatterns||{},z={...P[e.translationTheme]||{},[w.name]:N},q={...F,translationThemePatterns:{...P,[e.translationTheme]:z}};return Ui(document,e.translationTheme,z,F.selectTranslationFont),q})}},"theme-prop"+L)}),d("a",{href:"#",class:"text-sm secondary",onClick:w=>{w.preventDefault(),h(L=>{let M=L.translationThemePatterns||{},C={...M[e.translationTheme]};ff(e.translationTheme).forEach(A=>{delete C[A.name]});let v={...L,translationThemePatterns:{...M,[e.translationTheme]:C}};return Ui(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(nk,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),Cp.map((w,L)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:w,checked:w===e.translationTheme,onChange:M=>{x(M.target.value)}}),n(`translationTheme.${w}`)]})}),d("p",{children:d("font",{class:jo(w,!1,[],!1).join(" "),children:d("font",{class:Ho(w).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+L))]})]})}),d("div",{class:"nav",children:[d(Ae,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:w=>{w.preventDefault(),u(!s)},children:n("add")})})]}),s?d(ma,{toggleModal:w=>{w.preventDefault(),u(!s)},onAddInterfaceUrl:(w,L)=>{c(w,e.translationTheme,L)},urlValue:i,index:r}):null,d(ei,{urls:tk(e),type:"matches",onDeleteUrl:w=>{g(w,e.translationTheme)},onEditUrl:f})]})}function KA({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("target"),description:o("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Zt(l,e?.interfaceLanguage)},"language"+c))})]})}function GA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(Uu,{title:t("always languages"),description:t("always translate the following languages"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function VA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(Uu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function $A({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];if(f==="edit"){if(!b[c])return m;b[c]=l}return b=zn(l,b),x=Ht(l,T),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await Wt();for(let f of l){let m=f,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==m),T=!1;y.length!==h.length&&(T=!0),T&&Kt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let f=g.translationUrlPattern,m=[];f&&f.matches&&(m=f.matches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(qu,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function YA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];return f==="edit"&&(x[c]=l),b=Ht(l,y),x=zn(l,x),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let f=g.translationUrlPattern,m=[];f&&f.excludeMatches&&(m=f.excludeMatches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(qu,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Qv(e){return{handleTranslationLanguagePatternSelected:qe((n,r)=>{if(!n){e(o=>{let s={...o.translationLanguagePattern};return{...o,translationLanguagePattern:{...o.translationLanguagePattern,matches:Ht(r,s.matches),excludeMatches:Ht(r,s.excludeMatches)}}});return}let a=n,i=a==="matches"?"excludeMatches":"matches";r&&e(o=>{let s={...o.translationLanguagePattern};return s[a]=zn(r,s[a]),s[i]=Ht(r,s[i]),{...o,translationLanguagePattern:{...o.translationLanguagePattern,...s}}})},[e])}}var mf=0,bf;async function Zv(e){if(mf>60*10)return null;mf++,ot.refresh(),await xn(300);let t=await ot.get(bt,null);R.debug("loopCheckUser",mf,t),t?(clearTimeout(bf),e(t)):bf=setTimeout(Zv.bind(null,e),1500)}function $v(e){let{user:t,lang:n}=e,r=Ge(),a=t&&t.email==="test@immersivetranslate.com",{t:i}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let o=t,s=o.subscription,u=ek(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",f="";if(g){let m="";s.isTrial&&(m=i("autoRenewTrialSuffix")),f=i("currentPlanDescriptionForContinuous",{plan:`${i(l)}${m}`,endAt:u})}else c?f=i("currentPlanDescriptionForOneTime",{plan:i(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):F1(o)?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):f=i("currentPlanDescriptionForAutoRenewCaceling",{plan:i(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:f}})}else return d("span",{class:"info-subtitle",children:r||a?"":i("currentPlanDescriptionForFree")})}function QA({config:e}){let{t}=W(),n=Ge(),[r,a]=K(null),i=!!e.showSponsorOnSafari,[o,s,u,l,c]=Me(we),g=e.interfaceLanguage;le(()=>(ot.get(bt,null).then(y=>{y&&(a(y),ZA(y.token).then(T=>{let b=T.data;b.token=y.token,ot.set(bt,b),a(b)}).catch(T=>{bu(T),a(null)}))}),()=>{clearTimeout(bf)}),[]);let f=qe(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&JA(r.token).finally(async()=>{await ot.remove(bt),await xn(200),await ot.refresh(),a(null)})},[r]),m=qe(async y=>{y&&y.preventDefault&&y.preventDefault(),XA(Sc),await ot.set(lu,!0),Zv(T=>{v0(T.token,o,s),a(T),yf?.close(),window.location.reload()})},[a]),h=r?.avatar||Ov;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?da(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d($v,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&i===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${Fa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:ju})]}),d("div",{class:"",children:d("a",{href:`${Li}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:ju})]}),d($v,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Li,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]}):da(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:m,children:t(n?"loginForSafari":"login")})]})}var Jv=Pi;function ZA(e){return de({responseType:"json",url:Jv+"/v1/user",method:"get",headers:{token:e}})}function JA(e){return de({responseType:"json",url:Jv+"/v1/user/logout",method:"delete",headers:{token:e}})}var yf=null;function XA(e){let r=screen.width/2-230,a=screen.height/2-640/2;return yf=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),yf}function ek(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function ff(e){let t=[];return uu[e]&&(t=t.concat(uu[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function tk(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var hf="";function nk({config:e}){let{t}=W(),[n,r]=K(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(rk,{config:e,isOpen:n})]})}function rk({config:e,isOpen:t}){let{t:n}=W(),[r,a]=K([]),[i,o]=K(!1);le(()=>{if(!t||r.length)return;let m=e.translationFonts.filter(y=>gf(y,n("sampleTargetText").charAt(0)+"a"));m.length&&m.unshift("none");let h=e.selectTranslationFont&&!m.find(y=>y===e.selectTranslationFont);(!m.length||h)&&o(!0),a(m)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Me(we),f=m=>{m!==hf&&!gf(m,n("sampleTargetText").charAt(0)+"a")&&on(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,T={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(T=h.translationThemePatterns[y]),Ui(document,y,T,m),{...h,selectTranslationFont:m}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{o(!i),i&&(r.find(h=>h===e.selectTranslationFont)||f(hf))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:i}),n("translationFont.custom")]}):null,i?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:m=>f(m.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:m=>{f(m.target.value)},children:r.map((m,h)=>{let y=n(`font.${m}`);y.startsWith("font.")&&(y=m);let T=m=="none"?hf:m;return d("option",{value:T,selected:m===e?.selectTranslationFont,children:y},"locale"+h)})})]})}p();var Ln={};vc.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function Tf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=K(null),{t:u}=W();if(le(()=>{yt().then(c=>{yn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!o)return d("div",{children:"loading"});let l=o.config;return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(ak,{config:l}),d(ik,{config:l}),d(ok,{config:l}),d(ni,{config:l,ctx:o,serviceType:"inputTranslationService"}),d(sk,{config:l}),d(uk,{config:l}),d(ck,{config:l}),d(lk,{config:l})]})})}function ak({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[o("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?o("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):o("enableInputTranslationDescription",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function ik({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?o("inputTargetLanguageDescriptionForNoneKey"):o("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Zt(l,e.interfaceLanguage)},"language"+c))})]})}function ok({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function sk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(Ae,{title:o("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?o("inputStartingTriggerKeyDescriptionForNoneKey"):o("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}):null}function uk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTrailingTriggerKeyTitle"),description:o("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:o("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function lk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),[s,u]=K(!1),l=b=>{u(!s)},[c,g]=K(0),[f,m]=K(""),h=(b,x,w,L)=>{l(w),n(M=>{let C=M.inputTranslationUrlPattern,v=[],A=[];C&&C.matches&&C.excludeMatches&&(v=C.matches,A=C.excludeMatches);let D=[...v],S=[...A];return L==="edit"&&(w==="matches"?D[x]=b:S[x]=b),w==="matches"?(D=zn(b,D),S=Ht(b,A)):(D=Ht(b,v),S=zn(b,S)),{...M,inputTranslationUrlPattern:{...M.inputTranslationUrlPattern,matches:D,excludeMatches:S}}})},y=(b,x)=>{n(w=>{let L=w.inputTranslationUrlPattern,M=[];x==="matches"?L&&L.matches&&(M=L.matches):L&&L.excludeMatches&&(M=L.excludeMatches);let C=[...M];return b.forEach(v=>{C=Ht(v,C)}),{...w,inputTranslationUrlPattern:{...w.inputTranslationUrlPattern,[x]:C}}})},T=(b,x,w)=>{l(x),m(b),g(w)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTranslationBlockUrlsTitle"),description:o("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:o("add")})}),s?d(ma,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:f,index:c}):null]}),d(ei,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:T})]}):null}function ck({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=()=>ut().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>ut().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(Ae,{title:o("inputTrailingTriggerKeyTimeout"),description:o("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}p();function vf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),{t:s}=W(),[u,l]=K({}),[c,g]=K({});return le(()=>{Z.storage.sync.get(null).then(f=>{l(f),Z.storage.local.get(null).then(m=>{g(m)})})},[t]),!o||!t?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(fk,{}),d(mk,{}),d(hk,{}),d(dk,{}),d(gk,{}),d(pk,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(o,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function dk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let f=JSON.parse(c);if(!Array.isArray(f)){on("Invalid rules, rules must be an array");return}g.rules=f}t(()=>g),lt(i("saved"))}catch(c){on(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(i("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),lt(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:o,placeholder:`[{ "matches": "www.google.com", "selectors": [".title"] }, { "matches": "*.twitter.com", "selectors": [".text"], "excludeSelectors": ["footer"] - }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:i("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function gk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),ut(i("saved"))},s=u=>{if(u.preventDefault(),confirm(i("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),ut(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:o,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function pk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{u.preventDefault(),confirm(i("confirmResetConfig"))&&(t(()=>Ri()),Oa().catch(l=>{R.error("clean local config error",l)}),Ra().catch(l=>{R.error("clean buildin config error",l)}),ti().catch(l=>{R.error("clean cache error",l)}),ut(i("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),ut(i("saved"))}catch(l){an(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:o,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function mk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!i?.beta)},checked:!!i?.beta}),o("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:o("betaDescription",{1:bc})}})]})}function fk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!i?.debug)},checked:i?.debug}),o("toggleDebug")]})})}function hk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W();if(!i?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Bi([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!i?.enableSentryReport)},checked:i?.enableSentryReport}),o("enableSentryReport")]})})}p();p();var bk="buildinConfig",yk={},C0=Ny(bk,yk);p();function ju(e,t=2e3){return n=>{let r,a=0;return i=>{++a==e&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var Tk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},vk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},Sk=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},Ck=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},Ek=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},wk=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},Dk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Cf(){let[e,t]=K(null),{t:n}=W(),[r,a]=K(n("calculating")+"..."),[i,o]=K(null),[s,u]=C0(),[l,c]=K(null),[g,f]=K(""),[m,h]=K(!1),[y,T]=K(!1),[b,x]=K(null),[w,L]=K(null),[M,C,v,A]=$e();Ct(M,C);let[D,S]=K(!1),N=Ir(),F=!0;Ge()&&b&&(F=b.generalRule.showSponsorOnSafari);let P=async()=>{f("");let _=i;if(i===null)try{let B=await Tr({url:Ma});B?(o(B),_=B,h(!0)):(f(n("unknownError")),c(null))}catch(B){c(null),f(B.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(f(n("canNotFetchRemoteRule")),c(null))};le(()=>{bt().then(_=>{let B=_.buildinConfigUpdatedAt;x(_);let H=new Date(B);t(B),Tr({url:Ma}).then(j=>{let G=j.minVersion,V=N;o(j);let ie=j.latestVersion;if(ie&&(qr(V,ie)?L(!0):L(!1)),qr(V,G)){let te=j.buildinConfigUpdatedAt;new Date(te)>H?(c(!0),P()):c(!1)}else T(!0),c(null)}).catch(j=>{c(null),f(j.message)})}),Iv().then(_=>{a(_)})},[]),le(()=>{bt().then(_=>{x(_)})},[M,e]);let O=_=>{C(B=>{let H=!B.alpha;return H?ut(n("enableAlphaSuccess")):ut(n("disableAlphaSuccess")),{...B,alpha:H}})},z=_=>{_.preventDefault(),_.stopPropagation(),S(!0),Ra().catch(B=>{R.error("clear build config failed:",B)}),Oa().catch(B=>{R.error("clear local config failed:",B)}),ti().then(()=>{S(!1),ut("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(B=>{S(!1),an(B.message)})},q=_=>{C(B=>({...B,cache:_}))},I=_=>{C(B=>({...B,enabled:_}))},k="aboutIntro";return F||(k="aboutIntroWithoutSponsor"),b?d(ct,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:ju(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:ju(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",N,mb()?"(Beta)":""]}),w===!1&&d(Ek,{latestVersion:i?.latestVersion}),w===!0&&d(wk,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{I(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{q(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!pe()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:z,children:n("cleanCache")})]}),g?d(Dk,{handleSyncing:P,message:g,date:e||""}):y?d(xk,{minVersion:i.minVersion}):l===null?d(Sk,{}):l===!0?d(Ck,{}):m?d(vk,{date:e}):d(Tk,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:bc,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),F&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}p();p();var Ak=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let i=n[a];t&&t(i,a)};return d("div",{class:"tags-input-container",children:[n.map((a,i)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(i),class:"delete",children:"\xD7"})]},a)),d(kk,{...e})]})};function kk(e){let{onAddTag:t,tags:n}=e,r=Ve(null),[a,i]=K(!1),{t:o}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{i(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{i(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:o("tagsInput.add")})]})}var Xv=Ak;var Pk=Nc();function xf(){let e=$e(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o),{t:u,setLang:l}=W();return Ct(t,n),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_k,{config:o,ctx:s}),d(Mk,{config:o}),d(Lk,{config:o,setSettings:n}),d(Fk,{ctx:s}),d(Bk,{ctx:s}),d(Ik,{config:o}),d(Rk,{config:o}),d(Ok,{config:o}),d(zk,{config:o}),d(Nk,{config:o}),d(Uk,{config:o}),d(qk,{config:o}),d(jk,{config:o}),d(Hk,{config:o,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(Wk,{config:o,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function Lk(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=qe(({tag:i,index:o,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(f=>f.k===i);return s==="add"&&!g&&(c=[...l,{k:i}]),s==="remove"&&(c=l.filter((f,m)=>m!==o)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(Ae,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Xv,{tags:t.generalRule.glossaries.map(i=>i.k),onAddTag:i=>a({tag:i,action:"add"}),onRemoveTag:(i,o)=>a({tag:i,index:o,action:"remove"})})]}):null}function _k({config:e,ctx:t}){let{t:n}=W(),[r,a,i,o,s]=Me(we);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(Ae,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let f=2,m=Math.floor(g/2);m>2&&(f=m),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:f}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function Mk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function Fk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function Bk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(Ae,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function Ik({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function Rk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function Ok({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return pe()?null:d("div",{class:"nav",children:[d(Ae,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;jc({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function zk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function Nk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function Uk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function qk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),[s]=C0();return s.generalRule?d("div",{class:"nav",children:[d(Ae,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function jk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function Hk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(f,m)=>{o(h=>{let y=h.translationModeLanguagePattern,T=y?.[t]||[],b=y?.[c]||[],x=[...T];f?x=Array.from(new Set([...x,m])):x=x.filter(L=>L!==m);let w=b.filter(L=>L!==m);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:w}}})};return d(Nu,{title:n,description:r,languages:Pk,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function Wk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,T,b)=>{o(x=>{let w=x.translationModeUrlPattern,L=w?.[t]||[],M=w?.[c]||[],C=[...L];b==="edit"?C[y]=h:C=Array.from(new Set([...C,h]));let v=M.filter(A=>A!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:C,[c]:v}}})},f=ze(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(Uu,{title:n,description:r,urls:f,onDeleteUrl:(h,y)=>{o(T=>{let b=f.filter(x=>!h.find(w=>w==x));return{...T,translationModeUrlPattern:{...T.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}p();function Ef(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),{t:u}=W();return s?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}p();p();function ss(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}p();function Er(e){return De.ASSETS_BASE_URL+e}function wf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let{t:o}=W(),s=Jt(t),u=Un(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(f=>{let m="",h="";if(f.includes("[")){let y=f.split("[");h=y[0];let b=new URL(h).hostname;m=y[1]?y[1].slice(0,-1):b}else h=f,m=new URL(h).hostname;return{name:m,url:h}}),g=c.map((f,m)=>{let h=m===c.length-1;return` + }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:i("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function gk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),lt(i("saved"))},s=u=>{if(u.preventDefault(),confirm(i("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),lt(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:o,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function pk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{u.preventDefault(),confirm(i("confirmResetConfig"))&&(t(()=>Ri()),Oa().catch(l=>{R.error("clean local config error",l)}),Ra().catch(l=>{R.error("clean buildin config error",l)}),ti().catch(l=>{R.error("clean cache error",l)}),lt(i("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),lt(i("saved"))}catch(l){on(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:o,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function mk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!i?.beta)},checked:!!i?.beta}),o("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:o("betaDescription",{1:bc})}})]})}function fk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!i?.debug)},checked:i?.debug}),o("toggleDebug")]})})}function hk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W();if(!i?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Bi([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!i?.enableSentryReport)},checked:i?.enableSentryReport}),o("enableSentryReport")]})})}p();p();var bk="buildinConfig",yk={},C0=Ny(bk,yk);p();function Hu(e,t=2e3){return n=>{let r,a=0;return i=>{++a==e&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var Tk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},vk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},Sk=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},Ck=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},Ek=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},wk=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},Dk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Sf(){let[e,t]=K(null),{t:n}=W(),[r,a]=K(n("calculating")+"..."),[i,o]=K(null),[s,u]=C0(),[l,c]=K(null),[g,f]=K(""),[m,h]=K(!1),[y,T]=K(!1),[b,x]=K(null),[w,L]=K(null),[M,C,v,A]=Ye();Ct(M,C);let[D,S]=K(!1),N=Ir(),F=!0;Ge()&&b&&(F=b.generalRule.showSponsorOnSafari);let P=async()=>{f("");let _=i;if(i===null)try{let B=await Tr({url:Ma});B?(o(B),_=B,h(!0)):(f(n("unknownError")),c(null))}catch(B){c(null),f(B.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(f(n("canNotFetchRemoteRule")),c(null))};le(()=>{yt().then(_=>{let B=_.buildinConfigUpdatedAt;x(_);let H=new Date(B);t(B),Tr({url:Ma}).then(j=>{let G=j.minVersion,V=N;o(j);let ie=j.latestVersion;if(ie&&(qr(V,ie)?L(!0):L(!1)),qr(V,G)){let te=j.buildinConfigUpdatedAt;new Date(te)>H?(c(!0),P()):c(!1)}else T(!0),c(null)}).catch(j=>{c(null),f(j.message)})}),Iv().then(_=>{a(_)})},[]),le(()=>{yt().then(_=>{x(_)})},[M,e]);let O=_=>{C(B=>{let H=!B.alpha;return H?lt(n("enableAlphaSuccess")):lt(n("disableAlphaSuccess")),{...B,alpha:H}})},z=_=>{_.preventDefault(),_.stopPropagation(),S(!0),Ra().catch(B=>{R.error("clear build config failed:",B)}),Oa().catch(B=>{R.error("clear local config failed:",B)}),ti().then(()=>{S(!1),lt("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(B=>{S(!1),on(B.message)})},q=_=>{C(B=>({...B,cache:_}))},I=_=>{C(B=>({...B,enabled:_}))},k="aboutIntro";return F||(k="aboutIntroWithoutSponsor"),b?d(ct,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:Hu(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:Hu(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",N,mb()?"(Beta)":""]}),w===!1&&d(Ek,{latestVersion:i?.latestVersion}),w===!0&&d(wk,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{I(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{q(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!pe()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:z,children:n("cleanCache")})]}),g?d(Dk,{handleSyncing:P,message:g,date:e||""}):y?d(xk,{minVersion:i.minVersion}):l===null?d(Sk,{}):l===!0?d(Ck,{}):m?d(vk,{date:e}):d(Tk,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:bc,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),F&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}p();p();var Ak=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let i=n[a];t&&t(i,a)};return d("div",{class:"tags-input-container",children:[n.map((a,i)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(i),class:"delete",children:"\xD7"})]},a)),d(kk,{...e})]})};function kk(e){let{onAddTag:t,tags:n}=e,r=$e(null),[a,i]=K(!1),{t:o}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{i(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{i(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:o("tagsInput.add")})]})}var Xv=Ak;var Pk=Nc();function Cf(){let e=Ye(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o),{t:u,setLang:l}=W();return Ct(t,n),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_k,{config:o,ctx:s}),d(Mk,{config:o}),d(Lk,{config:o,setSettings:n}),d(Fk,{ctx:s}),d(Bk,{ctx:s}),d(Ik,{config:o}),d(Rk,{config:o}),d(Ok,{config:o}),d(zk,{config:o}),d(Nk,{config:o}),d(Uk,{config:o}),d(qk,{config:o}),d(jk,{config:o}),d(Hk,{config:o,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(Wk,{config:o,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function Lk(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=qe(({tag:i,index:o,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(f=>f.k===i);return s==="add"&&!g&&(c=[...l,{k:i}]),s==="remove"&&(c=l.filter((f,m)=>m!==o)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(Ae,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Xv,{tags:t.generalRule.glossaries.map(i=>i.k),onAddTag:i=>a({tag:i,action:"add"}),onRemoveTag:(i,o)=>a({tag:i,index:o,action:"remove"})})]}):null}function _k({config:e,ctx:t}){let{t:n}=W(),[r,a,i,o,s]=Me(we);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(Ae,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let f=2,m=Math.floor(g/2);m>2&&(f=m),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:f}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function Mk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function Fk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function Bk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(Ae,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function Ik({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function Rk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function Ok({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return pe()?null:d("div",{class:"nav",children:[d(Ae,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;jc({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function zk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function Nk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function Uk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function qk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),[s]=C0();return s.generalRule?d("div",{class:"nav",children:[d(Ae,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function jk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function Hk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(f,m)=>{o(h=>{let y=h.translationModeLanguagePattern,T=y?.[t]||[],b=y?.[c]||[],x=[...T];f?x=Array.from(new Set([...x,m])):x=x.filter(L=>L!==m);let w=b.filter(L=>L!==m);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:w}}})};return d(Uu,{title:n,description:r,languages:Pk,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function Wk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,T,b)=>{o(x=>{let w=x.translationModeUrlPattern,L=w?.[t]||[],M=w?.[c]||[],C=[...L];b==="edit"?C[y]=h:C=Array.from(new Set([...C,h]));let v=M.filter(A=>A!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:C,[c]:v}}})},f=ze(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(qu,{title:n,description:r,urls:f,onDeleteUrl:(h,y)=>{o(T=>{let b=f.filter(x=>!h.find(w=>w==x));return{...T,translationModeUrlPattern:{...T.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}p();function xf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),{t:u}=W();return s?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}p();p();function ss(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}p();function Er(e){return De.ASSETS_BASE_URL+e}function Ef(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let{t:o}=W(),s=Jt(t),u=Un(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(f=>{let m="",h="";if(f.includes("[")){let y=f.split("[");h=y[0];let b=new URL(h).hostname;m=y[1]?y[1].slice(0,-1):b}else h=f,m=new URL(h).hostname;return{name:m,url:h}}),g=c.map((f,m)=>{let h=m===c.length-1;return` ${f.name} ${h?"":", "} - `}).join("");return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("subtitle")})}),d(ss,{image:Er("images/dual_subtitle_intro.png"),nightImage:Er("images/dual_subtitle_intro_night.png"),title:o("intro.subtitleTitle"),description:o("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(Ae,{title:o("autoEnableSubtitle"),description:o("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:m}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.humanSubtitlesPreferred"),description:o("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:m}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.preTranslation"),description:o("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:m}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d(ni,{title:o("youtubeService"),config:s,ctx:u,description:o("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.showQuickButton"),description:o("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:m}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(Kk,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.disabledSubtitle"),description:o("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:m}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:o("intro.subtitleDescription")+"
"+g}})]})})}function Kk(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(Ae,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}p();var e9=Ps({presets:[yl(),vl()]});p();var t9="G-MKMD9LWFTR";async function ft(e,t,n){try{let r=mu(),a=Le(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=pe(),s=ot(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await la(l,0),S=x0(new Date(D)),N=Date.now(),F=x0(new Date(N));if(S===F)return;await j1(l,N)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",f=await qt("fakeUserId","");f||(f=await la("fakeUserId",""),f&&await at("fakeUserId",f));let m=On(),h=new Date,y=await qt("installedAt","");y||(y=await la("installedAt",""),y&&await at("installedAt",y)),f?y||(y=new Date(0).toISOString(),await at("installedAt",y)):(f=Gk(32),await at("fakeUserId",f)),y||(y=h.toISOString(),await at("installedAt",y));let T=new Date(y),b=x0(T),x=x0(h),w=b===x,L=h.getTime()-T.getTime()<7*24*60*60*1e3,M=`https://www.google-analytics.com/mp/collect?measurement_id=${t9}&api_secret=${g}`;u||(M=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${t9}&api_secret=${g}`);let C=po.parse(window.navigator.userAgent),v=t.map(D=>{let S=D.params||{};if(C.os&&(S.os_name=C.os.name||"unknown",S.os_version=C.os.version||"unknown",S.os_version_name=C.os.versionName||"unknown"),C.browser&&(S.browser_name=C.browser.name||"unknown",S.browser_version=C.browser.version||"unknown",r&&(S.browser_name=r.name,S.browser_version=r.version)),C.platform&&(S.platform_type=C.platform.type||"unknown"),C.engine&&(S.engine_name=C.engine.name||"unknown",S.engine_version=C.engine.version||"unknown"),n.translationService&&(S.translation_service||(S.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(S.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?S.openai_is_official="1":S.openai_is_official="0":S.openai_is_official="1"))),n.targetLanguage&&(S.target_language=n.targetLanguage),n.config.interfaceLanguage&&(S.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?S.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":S.enable_default_always_translated_urls="0",m&&(S.version=m),n.config.enableInputTranslation?S.enable_input_translation=n.config.enableInputTranslation?"1":"0":S.enable_input_translation="0",n.config.translationTheme&&(S.translation_theme=n.config.translationTheme),n.config.alpha&&(S.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?S.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):S.always_translate_languages="none",a.INSTALL_FROM&&(S.install_from=a.INSTALL_FROM),n.config.beta&&(S.beta=n.config.alpha.toString()),n.config.translationArea&&(S.translation_area=n.config.translationArea),b&&(S.install_day=Vk(T)),n.user){let F=B1(n.user);F&&Object.keys(F).forEach(P=>{S[P]=F[P]})}else S.user_type="anonymous";n.config.translationMode&&(S.translation_mode=n.config.translationMode),S.userscript=o.toString(),w?S.is_new_user_today="1":S.is_new_user_today="0",L?S.is_new_user_this_week="1":S.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?S.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():S.temp_translate_domain_minutes="0";let N="html";if(n.rule.pageType&&(N=n.rule.pageType),S.page_type=N,s?S.main_frame=0:S.main_frame=1,!c){let F=n.url;try{let P=new URL(F);S.site_host=P.hostname}catch{S.site_host="unknown"}n.sourceLanguage&&(S.source_language=n.sourceLanguage)}return{...D,params:S}});if(i)return;let A=await de({responseType:"text",url:M,method:"POST",body:JSON.stringify({client_id:f,user_id:f,events:v})})}catch{}}function Gk(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[m,h]=K(!1),y=Ve(null),T=Ve(null),b=()=>{u||!l&&st().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),f?.()},s))},x=()=>{st().any&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},L=ze(()=>{let M={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(M.maxWidth="200px",o&&(M.width=o+"px"),M.whiteSpace="normal"),n){case"top":return{...M,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...M,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...M,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...M,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:w,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),m&&d("div",{style:L,role:"tooltip",children:e})]})},or=$k;p();p();p();p();p();function r9(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return R.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return R.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let i=window.document.cloneNode(!0),s=new Bl(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=Yk(s.content,s.textContent),t&&(n=i9(r,t))}catch(i){R.debug(i)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function a9(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&R.debug("update article node",n),e.articleNode=n)}function Df(e,t){return t&&e?.contains(t)||!1}function Yk(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=Qk(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=t.length&&t.length>=500?o:null}function Qk(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function i9(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(i=>e.articleChildTags.includes(i.nodeName)).length>=e.articleChildTagsNum)return t;for(let i=0;i{let k=q(I);return k==NodeFilter.FILTER_ACCEPT?xt.mark(I,P,y):k==NodeFilter.FILTER_REJECT,k}),z=S;if(q(z)===NodeFilter.FILTER_REJECT)return;for(xt.mark(z,P,y);z;){if(s=Df(i,z),c&&c.length>0){let{currentNode:I,isMatchedSelection:k}=L(O,z,c);if(I)z=I;else break;if(!k)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let I=z;if(I.nodeName==="IFRAME"){N&&N(I),M(),Af(T,!0),z=O.nextNode();continue}I.nodeType===Node.ELEMENT_NODE&&(l&&Pf(I,l),m&&_f(I,m));let k=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},I.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&I.childNodes.length==1&&I.childNodes[0].nodeType===Node.TEXT_NODE&&I.innerText?.length==1&&I?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),ln(I,u)&&!k){C(I);let H=null;for(;!(H=O.nextSibling())&&O.parentNode(););z=H;continue}let _=zi(I);if(!o9(T,I)||k){M(I);let H=k?I:I.parentElement;H&&H.childNodes.length>0&&v(T,H,H.immersiveTranslateComputedStyle||null)}_&&I.shadowRoot?.mode==="open"&&(k?N?.(I.shadowRoot):w({...D,container:I.shadowRoot})),I.nodeType===Node.ELEMENT_NODE&&I.nodeName==="PRE"&&g&&nP(I)}else if(z.nodeType===Node.TEXT_NODE)C(z);else throw new Error("should not be here");z=O.nextNode(),T.commonAncestorContainer&&z&&z.parentNode===T.commonAncestorContainer&&(T._currentStacks=[]),T.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&T._currentStacks.push(z)}function q(I){if(I.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(ga(I)){if(m){let H=Object.keys(m);if(H.length>0&&ln(I,H))for(let G of H){let V=m[G];if(I.matches(G)){let ie=m[G],te=Object.keys(ie);for(let J of te){let ce=ie[J];I.getAttribute(J)!==ce&&(ce===null?I.removeAttribute(J):I.setAttribute(J,ce))}break}}}if(!D.force&&xt.isMarked(I,P)||uy(I,P)||w0(I,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||I.nodeName==="IFRAME"&&!Oo(I))return NodeFilter.FILTER_REJECT;if(I.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(I);if(I.immersiveTranslateComputedStyle=H,Lf(H))return F&&F(I),NodeFilter.FILTER_REJECT;let j=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(ln(I,u)&&j)return NodeFilter.FILTER_REJECT}let k=I.getBoundingClientRect(),{width:_,height:B}=k;return I.nodeName==="IMG"&&(_>48&&B>48?I.immersiveTranslateComputedStyle={display:"block"}:_>0&&B>0&&h!==!1&&(I.setAttribute("width",_),I.setAttribute("height",B))),!I.childNodes||I.childNodes&&I.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!T.isPreWhitespace&&(_>0&&_<4||B>0&&B<4)&&(I.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(I.nodeType===Node.TEXT_NODE){let k=I.textContent?.trim();if(!k)return T.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=I.parentNode;if(_.getBoundingClientRect){let{width:B,height:H}=_.getBoundingClientRect();if(B>0&&B<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return f>0&&k.length>=f&&kf(I,f),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),T&&T.commonAncestorContainer&&T.flatNodes.length>0&&M();function L(D,S,N){let F=S.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(S))if(b=!1,S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b}}else if(S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};return{currentNode:S,isMatchedSelection:!0}}function M(D){if(D&&D.nodeName==="BR"){T.commonAncestorContainer=D.parentNode;let N=[...T.flatNodes],F=T.flatNodes.filter(P=>D.parentNode?.contains(P));F.length>0&&N.length!=F.length&&(T.flatNodes=F,T.flatNodes.original=N)}let S=tP(T,a,n);S&&(S.xpath=dy(r,s,S.commonAncestorContainer,i),t&&t(S)),Af(T)}function C(D){if(!o9(T,D)){M(),Af(T);let S=D.parentNode;S&&v(T,S,S.computedStyle)}T.flatNodes.push(D)}function v(D,S,N){D.commonAncestorContainer=S;let F=A(N);D.isPreWhitespace=F}function A(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function o9(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=zi(t));let r=eP(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function Jk(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function Xk(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Pf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=e.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),e.style.cssText=o+i;break}}}}function eP(e){return e&&e._currentStacks?e._currentStacks.some(t=>zi(t)):!1}function tP(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let o=rP(r,a,n);o||(o=a);let s=[];for(let m of r){let h=Xk(e,o,m);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,f=0;for(;g&&(c.push(g),g!==l);){if(f++,f>Zk){R.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Af(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Lf(e){return e.display==="none"}var xt={_marked_key:qb,isMarked(e,t){return Qp(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return zc(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return vt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=No(e,"markWalk")||"";return vt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||zi(e)):!1}};function nP(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function rP(e,t,n){if(!e.length)return null;let r=e.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==t););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Nn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function kf(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,t);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>t+20&&kf(e,t+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,e.immersive=!0;let s=e.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=t[r],i=Object.keys(a),o=Ty(e,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function u9(e,t,n,r,a,i,o){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let f of c){let m=l[f];if(f==="translate"&&m==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||aP(g,a,i,o)||!Sy(y,n,r))continue}g.getAttribute(f)!==m&&(m===null?g.removeAttribute(f):g.setAttribute(f,m))}}}function _f(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=t[a],s=Object.keys(o);for(let u of s){let l=o[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function w0(e,t){return ln(e,t.excludeSelectors||[])?ln(e,t.selectors||[])?!1:!ln(e,t.stayOriginalSelectors||[]):!1}function E0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return ln(e,t.concat(n))}function aP(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&w0(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ic(o,t,n))return!0}}return!1}p();function l9(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(mc)||Mf(e).catch(i=>{R.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var D0="";async function Mf(e){let t=document.title;if(!t||t.includes(mc))return;D0!==t&&(D0=t);let n=await Ue({text:t,pageLangs:[Mt(),"en"]});if(!Bo(e,n))try{let r=await Nr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+mc+D0)}catch(r){throw r}}function c9(e){e.rule.isTranslateTitle&&(document.title=D0)}function us(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function Tn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,i=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var iP={sanitize:e=>e};function Rf(e,t){if(e.interruptEffectDOM)return;let n=Tn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Vi.bind(null,e),onFrame:r=>{Bf(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),Do&&vt(t,"consumeContainer",e.id)}function Bf(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!Oo(t))return;R.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Gi(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else R.debug("onFrame shadowRoot",t.host),Gi(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Gi(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=Tn(t.ctx),i=0;if(u(t,e,n))return;if(ga(e)&&s(e)){o(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(ga(c)&&(r&&Pf(c,r),a&&_f(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){o(g);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&e instanceof HTMLElement){o(e);return}return t.observeContainers;function o(l){xt.clearMark(l),i++,t.immediateTranslateCapacity>=0?Rf(t,l):(Do&&vt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Bf(t,l.shadowRoot,n),!1;if(c==="iframe")return Bf(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return E0(l,g.selectors);if(g.pageHeight){let f=l.scrollHeight;if(f>0&&f0)return!0}return!1}function u(l,c,g){if(a9(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=Tn(l.ctx);return!!w0(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Hu(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),i=r.contains(e.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(A0(e.rootNodes),g9(e.commonAncestorContainer)),n=="original"&&t=="translation"){let o=Ff(e.rootNodes);if(A0(e.rootNodes),d9(o))return;ls(o,r,e.targetNodes||[]),g9(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let o=e.targetNodes[0];ls(o,r,e.rootNodes||[]),p9(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let o=Ff(e.rootNodes);if(d9(o))return;ls(o,r,e.targetNodes||[]),p9(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let o=Ff(e.targetNodes);A0(e.targetNodes),ls(o,r,e.rootNodes||[])}n=="dual"&&t=="original"&&A0(e.targetNodes),Nf(e)}catch(o){R.error(o)}}}function d9(e){return!e||!ga(e)?!1:e.classList.contains(Lt)}function g9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{vt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function p9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=No(r,"immersiveTranslateClassBak");zc(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Ff(e){return e?e[e.length-1].nextSibling:null}function A0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function ls(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var oP=Fs(k0,300);async function Vi(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||sP(t.rootNodes)||t.stepState>=2)return;t.stepState=2,Do&&vt(a,"onParseParagraph",e.id);let{ctx:i}=e,{rule:o}=i,s=Ni(i),u=Kc(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:pP(i)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await zf(i,t,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Or(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(R.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),uP(e,t.text),Of(e,t,r)):(Do&&vt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function sP(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?ga(t)&&t.classList.contains(Lt):!1}function uP(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function Of(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),Do&&vt(t.commonAncestorContainer,"consumeParagraph",e.id),vt(t.commonAncestorContainer,jb,"1",!0),n=="hover"){k0.call(e,e.ctx);return}oP.call(e,e.ctx)}async function k0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await lt(r,t,(a,i,o)=>{let s=o.id,u=lP(e,s.toString());u&&cP.call(null,a,i,o,u,t,n)})}catch(a){R.error("translateCurrentQueue error",a);return}}function lP(e,t){return e.find(n=>n.id===t)}function cP(e,t,n,r,a,i){let o=!1,s=r;if(Io(s.commonAncestorContainer,n.id)?.remove(),Nf(r),s&&(e||!t)){e||(R.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);vt(c,Gb,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(ls(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let f=dP(a,e).replaceAll(` +
`}).join("");return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("subtitle")})}),d(ss,{image:Er("images/dual_subtitle_intro.png"),nightImage:Er("images/dual_subtitle_intro_night.png"),title:o("intro.subtitleTitle"),description:o("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(Ae,{title:o("autoEnableSubtitle"),description:o("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:m}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.humanSubtitlesPreferred"),description:o("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:m}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.preTranslation"),description:o("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:m}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d(ni,{title:o("youtubeService"),config:s,ctx:u,description:o("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.showQuickButton"),description:o("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:m}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(Kk,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.disabledSubtitle"),description:o("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:m}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:o("intro.subtitleDescription")+"
"+g}})]})})}function Kk(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(Ae,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}p();var e9=Ls({presets:[yl(),vl()]});p();var t9="G-MKMD9LWFTR";async function ht(e,t,n){try{let r=fu(),a=Le(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=pe(),s=st(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await la(l,0),S=x0(new Date(D)),N=Date.now(),F=x0(new Date(N));if(S===F)return;await j1(l,N)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",f=await qt("fakeUserId","");f||(f=await la("fakeUserId",""),f&&await it("fakeUserId",f));let m=On(),h=new Date,y=await qt("installedAt","");y||(y=await la("installedAt",""),y&&await it("installedAt",y)),f?y||(y=new Date(0).toISOString(),await it("installedAt",y)):(f=Gk(32),await it("fakeUserId",f)),y||(y=h.toISOString(),await it("installedAt",y));let T=new Date(y),b=x0(T),x=x0(h),w=b===x,L=h.getTime()-T.getTime()<7*24*60*60*1e3,M=`https://www.google-analytics.com/mp/collect?measurement_id=${t9}&api_secret=${g}`;u||(M=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${t9}&api_secret=${g}`);let C=po.parse(window.navigator.userAgent),v=t.map(D=>{let S=D.params||{};if(C.os&&(S.os_name=C.os.name||"unknown",S.os_version=C.os.version||"unknown",S.os_version_name=C.os.versionName||"unknown"),C.browser&&(S.browser_name=C.browser.name||"unknown",S.browser_version=C.browser.version||"unknown",r&&(S.browser_name=r.name,S.browser_version=r.version)),C.platform&&(S.platform_type=C.platform.type||"unknown"),C.engine&&(S.engine_name=C.engine.name||"unknown",S.engine_version=C.engine.version||"unknown"),n.translationService&&(S.translation_service||(S.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(S.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?S.openai_is_official="1":S.openai_is_official="0":S.openai_is_official="1"))),n.targetLanguage&&(S.target_language=n.targetLanguage),n.config.interfaceLanguage&&(S.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?S.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":S.enable_default_always_translated_urls="0",m&&(S.version=m),n.config.enableInputTranslation?S.enable_input_translation=n.config.enableInputTranslation?"1":"0":S.enable_input_translation="0",n.config.translationTheme&&(S.translation_theme=n.config.translationTheme),n.config.alpha&&(S.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?S.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):S.always_translate_languages="none",a.INSTALL_FROM&&(S.install_from=a.INSTALL_FROM),n.config.beta&&(S.beta=n.config.alpha.toString()),n.config.translationArea&&(S.translation_area=n.config.translationArea),b&&(S.install_day=Vk(T)),n.user){let F=B1(n.user);F&&Object.keys(F).forEach(P=>{S[P]=F[P]})}else S.user_type="anonymous";n.config.translationMode&&(S.translation_mode=n.config.translationMode),S.userscript=o.toString(),w?S.is_new_user_today="1":S.is_new_user_today="0",L?S.is_new_user_this_week="1":S.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?S.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():S.temp_translate_domain_minutes="0";let N="html";if(n.rule.pageType&&(N=n.rule.pageType),S.page_type=N,s?S.main_frame=0:S.main_frame=1,!c){let F=n.url;try{let P=new URL(F);S.site_host=P.hostname}catch{S.site_host="unknown"}n.sourceLanguage&&(S.source_language=n.sourceLanguage)}return{...D,params:S}});if(i)return;let A=await de({responseType:"text",url:M,method:"POST",body:JSON.stringify({client_id:f,user_id:f,events:v})})}catch{}}function Gk(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[m,h]=K(!1),y=$e(null),T=$e(null),b=()=>{u||!l&&ut().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),f?.()},s))},x=()=>{ut().any&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},L=ze(()=>{let M={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(M.maxWidth="200px",o&&(M.width=o+"px"),M.whiteSpace="normal"),n){case"top":return{...M,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...M,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...M,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...M,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:w,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),m&&d("div",{style:L,role:"tooltip",children:e})]})},or=$k;p();p();p();p();p();function r9(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return R.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return R.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let i=window.document.cloneNode(!0),s=new Bl(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=Yk(s.content,s.textContent),t&&(n=i9(r,t))}catch(i){R.debug(i)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function a9(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&R.debug("update article node",n),e.articleNode=n)}function wf(e,t){return t&&e?.contains(t)||!1}function Yk(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=Qk(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=t.length&&t.length>=500?o:null}function Qk(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function i9(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(i=>e.articleChildTags.includes(i.nodeName)).length>=e.articleChildTagsNum)return t;for(let i=0;i{let k=q(I);return k==NodeFilter.FILTER_ACCEPT?xt.mark(I,P,y):k==NodeFilter.FILTER_REJECT,k}),z=S;if(q(z)===NodeFilter.FILTER_REJECT)return;for(xt.mark(z,P,y);z;){if(s=wf(i,z),c&&c.length>0){let{currentNode:I,isMatchedSelection:k}=L(O,z,c);if(I)z=I;else break;if(!k)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let I=z;if(I.nodeName==="IFRAME"){N&&N(I),M(),Df(T,!0),z=O.nextNode();continue}I.nodeType===Node.ELEMENT_NODE&&(l&&kf(I,l),m&&Lf(I,m));let k=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},I.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&I.childNodes.length==1&&I.childNodes[0].nodeType===Node.TEXT_NODE&&I.innerText?.length==1&&I?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),cn(I,u)&&!k){C(I);let H=null;for(;!(H=O.nextSibling())&&O.parentNode(););z=H;continue}let _=zi(I);if(!o9(T,I)||k){M(I);let H=k?I:I.parentElement;H&&H.childNodes.length>0&&v(T,H,H.immersiveTranslateComputedStyle||null)}_&&I.shadowRoot?.mode==="open"&&(k?N?.(I.shadowRoot):w({...D,container:I.shadowRoot})),I.nodeType===Node.ELEMENT_NODE&&I.nodeName==="PRE"&&g&&nP(I)}else if(z.nodeType===Node.TEXT_NODE)C(z);else throw new Error("should not be here");z=O.nextNode(),T.commonAncestorContainer&&z&&z.parentNode===T.commonAncestorContainer&&(T._currentStacks=[]),T.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&T._currentStacks.push(z)}function q(I){if(I.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(ga(I)){if(m){let H=Object.keys(m);if(H.length>0&&cn(I,H))for(let G of H){let V=m[G];if(I.matches(G)){let ie=m[G],te=Object.keys(ie);for(let J of te){let ce=ie[J];I.getAttribute(J)!==ce&&(ce===null?I.removeAttribute(J):I.setAttribute(J,ce))}break}}}if(!D.force&&xt.isMarked(I,P)||uy(I,P)||w0(I,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||I.nodeName==="IFRAME"&&!Oo(I))return NodeFilter.FILTER_REJECT;if(I.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(I);if(I.immersiveTranslateComputedStyle=H,Pf(H))return F&&F(I),NodeFilter.FILTER_REJECT;let j=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(cn(I,u)&&j)return NodeFilter.FILTER_REJECT}let k=I.getBoundingClientRect(),{width:_,height:B}=k;return I.nodeName==="IMG"&&(_>48&&B>48?I.immersiveTranslateComputedStyle={display:"block"}:_>0&&B>0&&h!==!1&&(I.setAttribute("width",_),I.setAttribute("height",B))),!I.childNodes||I.childNodes&&I.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!T.isPreWhitespace&&(_>0&&_<4||B>0&&B<4)&&(I.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(I.nodeType===Node.TEXT_NODE){let k=I.textContent?.trim();if(!k)return T.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=I.parentNode;if(_.getBoundingClientRect){let{width:B,height:H}=_.getBoundingClientRect();if(B>0&&B<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return f>0&&k.length>=f&&Af(I,f),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),T&&T.commonAncestorContainer&&T.flatNodes.length>0&&M();function L(D,S,N){let F=S.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(S))if(b=!1,S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b}}else if(S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};return{currentNode:S,isMatchedSelection:!0}}function M(D){if(D&&D.nodeName==="BR"){T.commonAncestorContainer=D.parentNode;let N=[...T.flatNodes],F=T.flatNodes.filter(P=>D.parentNode?.contains(P));F.length>0&&N.length!=F.length&&(T.flatNodes=F,T.flatNodes.original=N)}let S=tP(T,a,n);S&&(S.xpath=dy(r,s,S.commonAncestorContainer,i),t&&t(S)),Df(T)}function C(D){if(!o9(T,D)){M(),Df(T);let S=D.parentNode;S&&v(T,S,S.computedStyle)}T.flatNodes.push(D)}function v(D,S,N){D.commonAncestorContainer=S;let F=A(N);D.isPreWhitespace=F}function A(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function o9(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=zi(t));let r=eP(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function Jk(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function Xk(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function kf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&cn(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=e.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),e.style.cssText=o+i;break}}}}function eP(e){return e&&e._currentStacks?e._currentStacks.some(t=>zi(t)):!1}function tP(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let o=rP(r,a,n);o||(o=a);let s=[];for(let m of r){let h=Xk(e,o,m);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,f=0;for(;g&&(c.push(g),g!==l);){if(f++,f>Zk){R.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Df(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Pf(e){return e.display==="none"}var xt={_marked_key:qb,isMarked(e,t){return Yp(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return zc(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return vt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=No(e,"markWalk")||"";return vt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||zi(e)):!1}};function nP(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function rP(e,t,n){if(!e.length)return null;let r=e.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==t););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Nn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Af(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,t);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>t+20&&Af(e,t+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,e.immersive=!0;let s=e.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=t[r],i=Object.keys(a),o=Ty(e,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function u9(e,t,n,r,a,i,o){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let f of c){let m=l[f];if(f==="translate"&&m==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||aP(g,a,i,o)||!Sy(y,n,r))continue}g.getAttribute(f)!==m&&(m===null?g.removeAttribute(f):g.setAttribute(f,m))}}}function Lf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&cn(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=t[a],s=Object.keys(o);for(let u of s){let l=o[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function w0(e,t){return cn(e,t.excludeSelectors||[])?cn(e,t.selectors||[])?!1:!cn(e,t.stayOriginalSelectors||[]):!1}function E0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return cn(e,t.concat(n))}function aP(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&w0(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ic(o,t,n))return!0}}return!1}p();function l9(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(mc)||_f(e).catch(i=>{R.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var D0="";async function _f(e){let t=document.title;if(!t||t.includes(mc))return;D0!==t&&(D0=t);let n=await Ue({text:t,pageLangs:[Mt(),"en"]});if(!Bo(e,n))try{let r=await Nr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+mc+D0)}catch(r){throw r}}function c9(e){e.rule.isTranslateTitle&&(document.title=D0)}function us(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function Tn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,i=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var iP={sanitize:e=>e};function If(e,t){if(e.interruptEffectDOM)return;let n=Tn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Vi.bind(null,e),onFrame:r=>{Ff(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),Do&&vt(t,"consumeContainer",e.id)}function Ff(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!Oo(t))return;R.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Gi(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else R.debug("onFrame shadowRoot",t.host),Gi(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Gi(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=Tn(t.ctx),i=0;if(u(t,e,n))return;if(ga(e)&&s(e)){o(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(ga(c)&&(r&&kf(c,r),a&&Lf(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){o(g);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&e instanceof HTMLElement){o(e);return}return t.observeContainers;function o(l){xt.clearMark(l),i++,t.immediateTranslateCapacity>=0?If(t,l):(Do&&vt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ff(t,l.shadowRoot,n),!1;if(c==="iframe")return Ff(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return E0(l,g.selectors);if(g.pageHeight){let f=l.scrollHeight;if(f>0&&f0)return!0}return!1}function u(l,c,g){if(a9(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=Tn(l.ctx);return!!w0(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Wu(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),i=r.contains(e.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(A0(e.rootNodes),g9(e.commonAncestorContainer)),n=="original"&&t=="translation"){let o=Mf(e.rootNodes);if(A0(e.rootNodes),d9(o))return;ls(o,r,e.targetNodes||[]),g9(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let o=e.targetNodes[0];ls(o,r,e.rootNodes||[]),p9(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let o=Mf(e.rootNodes);if(d9(o))return;ls(o,r,e.targetNodes||[]),p9(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let o=Mf(e.targetNodes);A0(e.targetNodes),ls(o,r,e.rootNodes||[])}n=="dual"&&t=="original"&&A0(e.targetNodes),zf(e)}catch(o){R.error(o)}}}function d9(e){return!e||!ga(e)?!1:e.classList.contains(Lt)}function g9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{vt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function p9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=No(r,"immersiveTranslateClassBak");zc(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Mf(e){return e?e[e.length-1].nextSibling:null}function A0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function ls(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var oP=Bs(k0,300);async function Vi(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||sP(t.rootNodes)||t.stepState>=2)return;t.stepState=2,Do&&vt(a,"onParseParagraph",e.id);let{ctx:i}=e,{rule:o}=i,s=Ni(i),u=Kc(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:pP(i)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Of(i,t,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Or(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(R.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),uP(e,t.text),Rf(e,t,r)):(Do&&vt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function sP(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?ga(t)&&t.classList.contains(Lt):!1}function uP(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function Rf(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),Do&&vt(t.commonAncestorContainer,"consumeParagraph",e.id),vt(t.commonAncestorContainer,jb,"1",!0),n=="hover"){k0.call(e,e.ctx);return}oP.call(e,e.ctx)}async function k0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await nt(r,t,(a,i,o)=>{let s=o.id,u=lP(e,s.toString());u&&cP.call(null,a,i,o,u,t,n)})}catch(a){R.error("translateCurrentQueue error",a);return}}function lP(e,t){return e.find(n=>n.id===t)}function cP(e,t,n,r,a,i){let o=!1,s=r;if(Io(s.commonAncestorContainer,n.id)?.remove(),zf(r),s&&(e||!t)){e||(R.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);vt(c,Gb,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(ls(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let f=dP(a,e).replaceAll(` `,"").replaceAll('"',"""),m=e.message.replaceAll(` -`,"").replaceAll('"',"""),h=Rr(nn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Rr(nn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,T=Rr(nn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Rr(nn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> +`,"").replaceAll('"',"""),h=Rr(rn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Rr(rn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,T=Rr(rn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Rr(rn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> <${u.targetWrapperTag} class="${ee}-error-wrapper"> @@ -5413,7 +5413,7 @@ ${s}} ${b} - `;c.innerHTML=rt.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=qy(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),us(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(Fr,"1");let g=iP.sanitize(l);c.innerHTML=g,r.targetNodes=[c],Hu(r,i)}o=!0}else R.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function zf(e,t,n){let{text:r}=t,a=await Ue({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:i}=n;if(!vu({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Qc();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!yc.includes(e.translationService)&&(pe()||Ge())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Ia(g,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Ia(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Wu(){If=0}var If=0;function dP(e,t){If+=1;let n=t.message;if(t instanceof Q){let r=t.uiConfig(e);if(n=JSON.stringify(r),If!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ai,{detail:r}))}return n}function Nf(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,gP(t,`[${Hb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function gP(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function pP(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}p();p();async function m9(){let e="auto",t=[At(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Ue({text:zo(document.body),pageLangs:t})),e}p();var mP=[];function f9(e){mP.push(e)}p();var Uf;function h9(e){let t=e.ctx.rule.aiRule;if(R.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=Tn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(i=>{Ku(e,i,t,r)}),Uf=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Nn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||jf(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Ku(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!za(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Ro(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Ku(e,c,t,r));continue}Ku(e,u,t,r)}catch(u){R.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(o=>{xt.isMarked(o,e.id)||Ku(e,o,t,r)})}),Uf.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Ku(e,t,n,r,a=!1){let i=t.closest(n.messageWrapperSelector);if(!i)return;let o=t;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=t;s.timer=setTimeout(()=>{a&&qf(t),ha({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Vi(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function b9(){Uf?.disconnect()}p();p();p();p();var fP=` + `;c.innerHTML=at.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=qy(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),us(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(Fr,"1");let g=iP.sanitize(l);c.innerHTML=g,r.targetNodes=[c],Wu(r,i)}o=!0}else R.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Of(e,t,n){let{text:r}=t,a=await Ue({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:i}=n;if(!Su({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Qc();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!yc.includes(e.translationService)&&(pe()||Ge())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Ia(g,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Ia(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Ku(){Bf=0}var Bf=0;function dP(e,t){Bf+=1;let n=t.message;if(t instanceof Q){let r=t.uiConfig(e);if(n=JSON.stringify(r),Bf!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ai,{detail:r}))}return n}function zf(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,gP(t,`[${Hb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function gP(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function pP(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}p();p();async function m9(){let e="auto",t=[At(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Ue({text:zo(document.body),pageLangs:t})),e}p();var mP=[];function f9(e){mP.push(e)}p();var Nf;function h9(e){let t=e.ctx.rule.aiRule;if(R.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=Tn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(i=>{Gu(e,i,t,r)}),Nf=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Nn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||qf(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Gu(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!za(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Ro(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Gu(e,c,t,r));continue}Gu(e,u,t,r)}catch(u){R.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(o=>{xt.isMarked(o,e.id)||Gu(e,o,t,r)})}),Nf.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Gu(e,t,n,r,a=!1){let i=t.closest(n.messageWrapperSelector);if(!i)return;let o=t;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=t;s.timer=setTimeout(()=>{a&&Uf(t),ha({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Vi(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function b9(){Nf?.disconnect()}p();p();p();p();var fP=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5496,21 +5496,21 @@ ${s}} max-width: fit-content; } } -`,Hf="immersive-translate-toastify-shadow-root",Wf=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Hf)){let t=document.getElementById(Hf);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Hf,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=fP,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${i})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${t[i]}px`,t[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function L0(e){e=e||{},new Wf({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}p();function y9(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}p();p();p();function Vn(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{R.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:lc,payload:e},"*")});let n=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(n)}function Kf(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((i,o)=>(i[t[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&Ut(o,s=>{s.preventDefault();let u=r[i];Vn({method:u,data:{trigger:"shortcut"}})})}}p();p();p();p();var T9=`${ee}-float-ball`;function ri(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${T9}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${T9}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}p();p();function v9(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},i=Object.keys(n);for(let l of i){let g=n[l].matches;for(let f of g)a[f]||(a[f]=[]),a[f].push(l)}let o=a[e];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}p();p();var _0="DROP_DOWN_DEFAULT_VALUE";function Gf(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=e;r=r||"",t=t??!0,i=i||80;let s=Ve(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:_0,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==_0){s.current.value=_0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:_0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}p();var hP=({date:e})=>{let{t}=W(),[n,r]=K(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},bP=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},yP=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},TP=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Vf(e){let{isShowError:t,request:n}=e,[r,a]=K(null),{t:i}=W(),[o,s]=K(null),[u,l]=K(null),[c,g]=K(""),[f,m]=K(!1),[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(null),[L,M]=K(null),C=On(),v=async()=>{g("");let A=o;if(o===null)try{let D=await n({url:Ma});D?(s(D),A=D,m(!0)):(g(i("unknownError")),l(null))}catch(D){l(null),g(D.message);return}A!==null?(e.setStorageBuildinConfig(A),l(!1),a(A.buildinConfigUpdatedAt)):(g(i("canNotFetchRemoteRule")),l(null))};return le(()=>{bt().then(A=>{let D=A.buildinConfigUpdatedAt;w(A);let S=new Date(D);if(a(D),C==="0.0.0"){b(!0);return}n({url:Ma}).then(N=>{let F=N,P=F.minVersion,O=C;s(F);let z=F.latestVersion;if(z&&(qr(O,z)?M(!0):M(!1)),qr(O,P)){let q=F.buildinConfigUpdatedAt;new Date(q)>S?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(N=>{l(null),g(N.message)})})},[]),le(()=>{bt().then(A=>{w(A)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:T?d(yP,{}):c?t===!1?null:d(TP,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(bP,{minVersion:o.minVersion}):u===null||u===!0?null:f?d(hP,{date:r}):null}):null}p();function vP(){return navigator.userAgent.indexOf("Mac")!==-1}var S9={Alt:"\u2325"};function M0(e=""){return vP()?Object.keys(S9).reduce((t,n)=>t.replace(n,S9[n]),e):e}p();function C9({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return da(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Li:i1,children:[d("img",{src:t?Nv:zv}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Li:s1,children:d("img",{src:n?qu:Rv})})]})}p();function x9({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let i=Xa(t.config.translationService,t.config.targetLanguage),o=Rn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(SP,{supportedLanguages:o,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Uv,style:{maxWidth:"unset"},class:"mx-2"}),d(CP,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function SP(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&e.onSelected(o)},children:e.supportedLanguages.map((i,o)=>{let s=Zt(i,e.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Zt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:i,selected:i===e.value,children:u||s},"selectlink"+o)})})]})}function CP(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Zt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}p();function E9(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=DP(e);return n.length?d(xe,{children:[d(w9,{class:"mt-3",label:t("popupService"),items:r}),d(xP,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function w9(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Ur,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xP({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=wP(e),i=EP(e),o=qe((u,l)=>{t(c=>{let g=c.translationServices||{},f=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...f,[u]:l}}}})},[]),s=ze(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==i[u.name],onSelected:()=>{o(u.name,g.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(w9,{class:"mt-2",label:u,items:l},"field-"+c))})}function EP(e){return ze(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function wP(e){return ze(()=>{let{translationService:n}=e.config;if(nr[n])return _o("translationService",n,e)},[nr,_o,e])}function DP({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=W(),u=ze(()=>t?Mi(t,"translationService"):[],[Mi,t]),l=qe(g=>{let f=u.find(m=>m.id===g.value);if(f.ok){if(n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;f.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=ze(()=>{let g=Ge();return u.filter(m=>t.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!e&&!g&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}p();p();function D9(e){let t;try{t=new URL(e)}catch{return!1}let n=hT(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(AP(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function AP(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}p();function A9(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function k9(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=kP(e),[o,s]=K(()=>a?"excludeMatches":"matches"),u=ze(()=>r||a||!1,[r,a]),l=qe(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Ur,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;i(g?o:"default",n.hostname)}})]})}function kP({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,g=null,f=null,m=null,{translationUrlPattern:h}=t.config;if(l=ze(()=>new URL(e||""),[e]),t.config&&e&&D9(e)){c=A9(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(w=>_t(e,w)),f=!!x.find(w=>_t(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?m=!0:m=!1}let y=qe(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],w=x.filter(M=>M.match!==b),L=!1;w.length!==x.length&&(L=!0),L&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),T=qe((b,x)=>{if(b==="default"){s(M=>{let C={...M.translationUrlPattern};return{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,matches:$f(e,C.matches),excludeMatches:$f(e,C.excludeMatches)}}}),y();return}let w=b,L=w==="matches"?"excludeMatches":"matches";l&&s(M=>{let C={...M.translationUrlPattern};return C[L]=$f(e,C[L]),C[w]=zn(x,C[w]),{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,...C}}}),w==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:f,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:T}}function $f(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}p();function P9(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=PP(e);return _i(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||sa[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:d(LP,{...e})}function PP({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=ze(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),i=ze(()=>sa.filter(s=>!(s==="Off"||sa.includes(a)&&s==="OtherCustom")),[e,a]);return ze(()=>i.map(s=>{let u=r("mouseHoldKey",{key:M0(s)}),l=sa.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(f=>{let m={...f.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=g.value),{...f,generalRule:m}})}}}),[i,a])}function LP(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,i=Object.keys(Gu).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(f=>{let m={...f.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=g.value),{...f,generalRule:m}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let f=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?f:"touchShortcutsOff"}}})}})]})}p();function L9(e){let{isAlwaysTranslateLang:t}=_P({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Zt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Ht(e.currentLang,u.matches),excludeMatches:Ht(e.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=zn(e.currentLang,u[i]),u[o]=Ht(e.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _P({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}p();p();var _9=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),M9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),F9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),B9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),I9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),R9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),O9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function N9({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Le(),i=Math.round((Fo.supportedVideoSubtitleSites||[]).length/10),o=ze(()=>[{title:r("widget.translateFile"),icon:_9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:M9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:F9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(xc)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?d(or,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(z9,{...s})}):d(z9,{...s}))})}function z9(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Yf(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=e,[s,u]=K(""),[l,c]=K(i),[g,f]=K(null),[m,h]=K(null);le(()=>{it.get(ht,null).then(x=>{x?(f(x),h(Qt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,T=Ge();n&&T&&(y=n.generalRule.showSponsorOnSafari);let b=da(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(C9,{isLogin:!!g,isProUser:!!m,config:n}),d(OP,{openSharePage:r})]}),d(x9,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(E9,{isProUser:!!m,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(FP,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(IP,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Vf,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(k9,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(P9,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(L9,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(MP,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:t})]}),d(N9,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(BP,{...e,isProUser:!!m,isShowPricing:y,setMessage:u})]})}function MP(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return ze(()=>!n.rule.subtitleRule.disabled&&Ep.includes(n.rule.subtitleRule.type||""),[n,Ep])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function FP(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(i)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(or,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?I9:R9})})}function BP(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:i}=e.ctx,o=60;n.startsWith("zh")||(o=70);let s=Le(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[B9,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(RP,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Gf,{label:t("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(Fa),e.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?e.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?e.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),e.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),e.onClose()):m.value==="options"?(e.openOptionsPage(),e.onClose()):m.value==="changeToTranslateTheWholePage"?g():m.value==="changeToTranslateTheMainPage"?f():m.value==="about"?e.openAboutPage():m.value==="toggleEnabled"?e.onToggleEnabled():m.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&e.onOpenUrl(Fa,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),e.openOptionsPage()}function c(m){e.setSettings(h=>({...h,translationMode:m})),e.onSwitchTranslationMode(m)}function g(){e.setSettings(m=>({...m,translationArea:"body"})),e.onTranslateTheWholePage()}function f(){e.setSettings(m=>({...m,translationArea:"main"})),e.onTranslateTheMainPage()}}function IP({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=W(),l=r.config,c=ze(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");ji(r?.rule)&&!g&&(g=!0);let f=s("translate");t==="Translated"||t==="Error"?f=s("show-original"):t==="Original"?g?rr()&&c.protocol==="file:"||o?f=s("translate-firefox-local-pdf"):pe()?f=s("noSupportTranslate-pdf"):f=s("translate-pdf"):f=s("translate"):f=s(t);let m=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ba()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(f+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):f+=` (${M0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:i||t==="Translating",children:f})}function RP({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:i}=W(),o=On();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:ju(7)(s),children:["V",o,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function OP(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),O9]})}p();async function U9(e){try{let t=new Date;R.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Z.storage.local.set({[Yb]:t.toISOString()}),await zP(),pe()||await ST()}catch(t){R.error("run cron task failed",t)}}async function zP(){try{let e=await ir(),t=await de({url:Ma}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,i=new Date(a),o=t.minVersion,s=Z.runtime.getManifest().version;qr(s,o)?i>r?(await Z.storage.local.set({buildinConfig:t}),R.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Va({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{R.error("send content message request failed from cron task",u)})):R.debug(`no need to sync rules, latest: ${r}`):R.info(`local version is too old, please update to ${o} or later`)}catch(e){R.error("sync rules error: ",e)}}function F0(e){let{onClose:t}=e,[n,r]=K("Original"),[a,i,o,s]=$e(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});Ct(a,i);let[u,l]=K(null),[c,g]=K(globalThis.location.href),[f,m]=K("auto"),[h,y]=K(null),T=N=>{r(N.detail)};if(le(()=>(document.addEventListener(ki,T,!1),ir().then(N=>{l(N);let F=Mt();m(F);let P=et();r(P),U9(N.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",T),document.removeEventListener("urlChange",x)}),[]),le(()=>{ir().then(N=>{l(N)})},[a]),le(()=>{c&&u&&Qf().then(N=>{y(N)})},[c,u]),!u||!h)return null;return d(Yf,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:N=>{w("switchTranslationMode",!0,{mode:N})()},request:de,onClose:L,onToggleEnabled:M,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:A,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{v(Ga(h.rule)||c)},openAboutPage:D,openSharePage:w("shareToDraft",!0),onSetPageLanguage:b,setSettings:i,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:f,onSetLocalConfig:t0,onSetBuildinConfig:dT,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:C});function b(N){m(N);let F=v9(c,N,u.sourceLanguageUrlPattern);i(P=>({...P,sourceLanguageUrlPattern:F})),ar(N)}function x(){g(globalThis.location.href)}function w(N,F,P={}){let O={trigger:"page_popup",...P};return()=>{Vn({method:N,data:O}),F&&t()}}function L(){t()}function M(){i(N=>({...N,enabled:!N.enabled})),setTimeout(()=>{L()},50)}function C(N,F){let P=N;F&&(P=`${N}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),i0(P,!0),setTimeout(()=>{L()},50)}function v(N){N&&(Go(!1,N),setTimeout(()=>{L()},50))}function A(N=""){Wo(!0,N),setTimeout(()=>{t()},50)}function D(){a0(),setTimeout(()=>{t()},50)}function S(){vT(),setTimeout(()=>{t()},50)}}p();function W9(){let[e,t]=K("Original");return le(()=>{let n=et();t(n);let r=a=>{t(a.detail)};return document.addEventListener(ki,r),()=>{document.removeEventListener(ki,r)}},[]),{pageStatus:e}}var q9=6,NP={position:"right",top:335};function K9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=Ve(null),o=Ve(null),[s,u]=K(!1),l=Ve(null),c=Ve(!1),g=Ve(n.floatBallConfig||NP),f=Ve(0),m=Ve(0),h=Ve(0),y=Ve(!1),T=Ve(0),b=Ve(0),x=Ve(0),w=Ve(0),L=Ve(!1),M=qe(C=>{a||(clearTimeout(l.current),C?u(C):l.current=setTimeout(()=>{u(C),y.current=!1},st().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(i.current&&g.current){let C=Zf(g.current.top);g.current.top=C,i.current.style.top=`${C}px`,i.current.style.display="flex"}},[t,i]),le(()=>{if(!o.current||!i.current)return;let C=P=>{P.preventDefault&&P.preventDefault(),f.current=P.clientX,m.current=P.clientY,T.current=Date.now(),h.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),M(!0),x.current=P.clientX,w.current=P.clientY,L.current=!1,st().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{j9({startX:f.current,startY:m.current,endX:x.current,endY:w.current})||(L.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",S),document.addEventListener("mouseup",A),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N)},v=P=>{if(P.preventDefault&&P.preventDefault(),!c.current||!i.current||(x.current=P.clientX,w.current=P.clientY,L.current))return;let O=P.clientY-m.current+h.current,z=Zf(O);i.current.style.top=`${z}px`},A=P=>{if(P.preventDefault&&P.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||M(!1),L.current)return;j9({startX:f.current,startY:m.current,endX:P.clientX,endY:P.clientY})||(clearTimeout(b.current),e());let z=Zf(P.clientY-30);g.current.top=z;let q=Du();t0({...q,floatBallConfig:g.current})},D=P=>{P.preventDefault&&P.preventDefault(),C(P.changedTouches[0])},S=P=>{P.preventDefault&&P.preventDefault(),v(P.changedTouches[0])},N=P=>{P.preventDefault&&P.preventDefault(),A(P.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",S),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N)};return o.current.addEventListener("mousedown",C),o.current.addEventListener("touchstart",D),()=>{o.current&&(o.current.removeEventListener("mousedown",C),o.current.removeEventListener("touchstart",D))}},[t,o,i,l,c,n,M,e]),le(()=>{if(st().any)return;let C=A=>{A.target===i.current&&!y.current||(y.current=!0,M(!0),clearTimeout(l.current))},v=A=>{if(c.current){y.current=!1;return}A.target===i.current&&!y.current||M(!1)};return i.current?.addEventListener("mouseover",C),i.current?.addEventListener("mouseout",v),()=>{i.current?.removeEventListener("mouseover",C),i.current?.removeEventListener("mouseout",v)}},[i,c,M,t,y]),{ballRef:o,floatBallConfigRef:g,containerRef:i,active:s,setActive:M}}function j9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),i=Math.abs(r-t);return a>q9||i>q9}function G9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=ze(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),i=ze(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),o=ze(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function V9(){let[e,t]=K(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var H9="hasShownFloatingBallGuide",UP="2024-01-06";function $9(e){let[t,n]=K(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await qt(H9,""),i=await qt("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Y9(e,t){let n=Ve(0),[r,a]=K(!0),[i,o]=K(!1),s=$e(),[u,l]=s,{t:c}=W(),g=qe(()=>{e?.config.floatBallTooltipRule&&(st().any?o(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,o]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,st().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let f=qe(()=>{e&&(n.current=n.current+1,g(),l(y=>{let T={...y};return st().any?T.h5FloatBallMainBtnTooltipShownCount=n.current:T.pcFloatBallMainBtnTooltipShownCount=n.current,T}))},[l,g,n,e]),m=ze(()=>st().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=ze(()=>st().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Zt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:h,handleShowTooltip:f}}function Zf(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}p();var $i=`${ee}-float-ball`;function Q9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(qP,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function qP(e){let{t}=W(),[n,r]=K("UntilNext"),a=r0()+"#floating",i=t("closeQuickTranslation.settingOpen",{1:a}),o=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return d("div",{class:`${$i}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${$i}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(ri,{type:"modal-close"})})]}),d("div",{class:`${$i}-close-radio-content mt-3`,children:o.map(s=>d(jP,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ko(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${$i}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${$i}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function jP(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,i=HP(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${$i}-radio-sel`:`${$i}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:d("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function HP(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?t.push({type:"link",href:i,value:o}):s&&t.push({type:"text",value:s})}return t}p();var Yi=`${ee}-float-ball`;function Z9(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=ze(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${Yi}-guide-container`,style:r,children:[d("img",{class:`${Yi}-guide-bg ${e.fixedPosition}`,src:WP}),d("div",{class:`${Yi}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${Yi}-guide-img`,src:Er("images/float_ball_intro.png")}),d("div",{class:`${Yi}-guide-message`,children:[t("floatBall.guideClickToTranslate"),st().any?` -${t("floatBall.longPress")}`:""]}),d("div",{class:`${Yi}-primary-btn ${Yi}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var WP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";p();function KP({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var J9=KP;var Vu=`${ee}-float-ball`;function Jf(e){let{t}=W(),n=$e(),[r,a,i,o]=n;Ct(r,a);let s=Jt(r),u=Un(s),{isFullScreen:l}=V9(),[c,g]=K(!1),[f,m]=K(!0),{pageStatus:h}=W9(),y=Su(u,r),T=qe(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=_e();if(ji(u?.rule)){let B=Ga(u.rule);Go(!0,B||_);return}Vn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Vn,g]),b=qe(()=>{g(!0)},[g]),x=f&&!!s,{containerRef:w,active:L,ballRef:M,floatBallConfigRef:C,setActive:v}=K9({handleBallClick:T,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),A=y?.fixedPosition||"right",D=A==="right"?"left":"right",{isShowGuide:S,handleCloseGuide:N}=$9(e.ctx),{closeTransform:F,logoContainerTransform:P,settingTransform:O}=G9(y,L||S),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:I,handleShowTooltip:k}=Y9(u,h);return x?d("div",{class:`${Vu}-container ${A} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:L||S||c?"all":"none"},ref:w,children:[d(GP,{ctx:u,setVisible:m,closeTransform:F,setActive:v,getModalStyle:()=>X9(C.current.top,300,A)}),d(or,{enableMobile:!0,text:I,position:D,delay:z,onShow:k,disable:q,children:d("div",{class:`${Vu}-btn ${A} btn-animate `,ref:M,style:{transform:P,opacity:L||S?1:.5},children:d("div",{children:[d(ri,{type:"logo"}),h!=="Original"?d(ri,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${Vu}-more-buttons btn-animate`,children:[d(or,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${Vu}-more-button`,onClick:()=>{i0(m1,!0)},children:d(ri,{type:"file"})})}),d(or,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${Vu}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(ri,{type:"setting"})})})]}),d(VP,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>X9(C.current.top,500,A)}),d(Z9,{visible:S,top:C.current.top,fixedPosition:A,onClose:()=>{N(),v(!1)}})]}):null}function GP(e){let{t}=W(),[n,r]=K(!1),a=$e(),[i,o,s,u]=a,l=Su(e.ctx,i),c=qe(f=>{e.ctx&&o(m=>Bc({...m},f))},[e.ctx,o]),g=qe(f=>{l&&(e.setVisible(!1),f==="AlwaysClose"?c({...l,enable:!1}):f==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(ri,{type:"close"})}),d(Q9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function VP(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(J9,{isVisible:e.visible,onClose:e.onClose,children:d(F0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(F0,{onClose:e.onClose})})}):null}function $P(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var X9=(e,t,n)=>{let a=$P().height,i={position:"fixed"},o=0;return fb()&&(e=YP.top),i.top=e-o,i.top+t>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},YP={position:"right",right:0,top:335};function QP(e,t){for(let n of t){if(pe()&&!rr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function e6(){let e=Le(),t=await ir(),n=await vr(),r={url:globalThis.location.href,config:t},a=await yn(r),i=await Vp(a,n),o=_t(a.url,i?.blockUrls),s=await Wt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return QP(l,[c]),ZP(l,t,s,a)}function ZP(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(Jf,{localConfig:n,ctx:r})}),a)}var t6=!1;async function n6(){t6||(t6=!0,e6().catch(e=>{R.error("init popup error",e)}))}var r6=!1,s6=[()=>{Ut.unbind()}],a6=[...s6],JP=cr(async()=>{await Wo()},50),XP=cr(async()=>{await a0()},50),eL=cr(async()=>{await yT()},50),tL=cr(async()=>{await bT()},50),u6=cr(e=>{Vn({method:e,data:{trigger:"userscript_menu"}})},50);function nL(e,t){let n=e.document;if(r6)return;r6=!0,pe()||cT(),n.addEventListener("securitypolicyviolation",pL),document.addEventListener(be+"DocumentMessageUser",p6),document.addEventListener(be+"DocumentMessageUpdateUser",m6),document.addEventListener(be+"ChangeSuccessService",f6.bind(null,t)),document.addEventListener(be+"ChangeService",h6.bind(null,t)),document.addEventListener(Ai,cL.bind(null,t)),n.addEventListener(be+"EbookLoaded",gL),n.addEventListener(Bb,dL.bind(null,t)),n.addEventListener(Ib,mL.bind(null,t)),n.addEventListener(cc,a=>{ot()||nh(a,t)}),n.addEventListener(Rb,y6),n.addEventListener("click",a=>{iL(a,t)}),ot()&&e.addEventListener("message",aL,!1),pe()&&(ot()||n.addEventListener(oa,rL)),ot()||Za.rootIframe(Tc).handleAsk("throttleRequest",hv)}function l6(e,t){fL(),nL(t,e),pe()&&(ot()||(Kf(e.config),hL(e.config))),Ba()&&T6(e),Ge()&&Kf(e.config)}function rL(e){n6()}function aL(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===lc&&Va(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function iL(e,t){let n=e.target;if(!n||!n.getAttribute){ai(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ft(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),Xf({method:"retryFailedParagraphs"}),ai(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${ee}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}c6(d6.bind(null,t,o,i,s));return}}}async function oL(){let e=await Pn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function sL(){let e=await Pn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var i6=0;function c6(e){let t=Date.now();if(t-i6<2e3||(i6=t,uL()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),i=`${ee}-modal-title`,o=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${o}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Le();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let f=document.createElement("div");f.className=ee+"-modal-content notranslate",u.appendChild(f);let m=document.createElement("span");m.textContent="\xD7",m.className=ee+"-close",f.appendChild(m);let h=document.createElement("div");h.className=i+" notranslate",f.appendChild(h);let y=document.createElement("div");y.className=o+" notranslate",f.appendChild(y);let T=document.createElement("div");T.className=s,f.appendChild(T),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,T)}setTimeout(()=>{lL()},100)}function d6(e,t,n,r="retry",a,i,o,s){let u=jt.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=rt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",f=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),f.setAttribute(`data-${ee}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',f.appendChild(m),f.onclick=()=>{a.style.display="none",Xf({method:"retryFailedParagraphs"}),ai(f,!0)}}else if(r=="login")g=u("goLogin"),f.onclick=()=>{ai(f,!0),window.open(a1)};else if(r=="upgrade")g=u("upgradeToPro"),f.onclick=()=>{ai(f,!0),window.open(Cc)};else if(r=="setting")g=u("goSettings"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)},th(e,e.config.translationService,!1).then(m=>{m?(g=u("toggleToService",{service:u("translationServices."+m)}),f.innerHTML=rt.sanitize(g),f.onclick=()=>{b6(m),ai(f,!0)}):(g=u("goSettings"),f.innerHTML=rt.sanitize(g))});else if(r=="none")return;f.className="immersive-translate-btn",f.innerHTML+=rt.sanitize(g),s.appendChild(f)}function uL(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function lL(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function ai(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function cL(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;c6(d6.bind(null,e,a,i,o))}catch(r){R.warn("parse message error",r)}}async function dL(e,t){let n=t;if(R.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Xf({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")TT(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oL();else if(a.type==="toggleEnableInputTranslation")sL();else if(a.type==="translatePage")bL(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Mi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Xa(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:i,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...e,translationService:a.data.service};try{r=await yL(a.data,i)}catch(o){o6(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await n0(a.data):a.type==="sharePage"?nh({detail:a.data},e):a.type==="switchTranslationMode"?eh(a.data):u6(a.type);r&&a.id&&o6(a.type,r,a.id)}}catch(a){R.warn("parse message error",a)}}}function gL(e){setTimeout(()=>{g6()},10)}function pL(e){De.HAS_CSP_ERROR="1"}function mL(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ft(n.name,[{name:n.name}],{...e})}function fL(){a6.forEach(e=>{e()}),a6=s6}function hL(e){if(pe()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Ec.commands,a=[...Object.keys(t).filter(i=>i==="toggleTranslatePage").map(i=>{let o=t[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ja(`browser.${o.slice(6,-2)}`,e.interfaceLanguage)),{id:i,title:s}}),{id:au,title:ja("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:iu,title:ja("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:ru,title:ja("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:Tp,title:ja("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===ru?JP():i.id===Tp?XP():i.id===iu?eL():i.id===au?tL():u6(i.id)},i.key)}}function Xf(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{R.error("send content message request failed",e,n)});let t=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(t)}async function bL(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Je(_e(),t);_n(n)}function o6(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function yL({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),o=null;try{let s=await lt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}p();var Qi={};async function rh(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ue({text:t,minLength:200,pageLangs:[At(),"en"]});return ar(n),n}async function v6(e){An("Translating");let t=Mt(),n=Qc(),r=[...document.querySelectorAll(".source-text")];if(Bo(e,t))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return vt(i,"id",o+""),s&&(Io(s,o)?.remove(),s.appendChild(Tu(e,o))),{text:i.innerText||"",id:o,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await lt({sentences:a},{...e,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Io(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=rt.sanitize(`${i.message}`),Qi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=rt.sanitize(o.text),Qi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{An("Translated")}}async function S6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Qi),n=[],r=[];for(let a of t){let i=Qi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Qi[a],u.appendChild(Tu(e,a)),r.push(i.sentence))}}}try{await lt({sentences:r},e,(a,i,o)=>{let s=o.id,u=Io(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=rt.sanitize(`${a.message}`),Qi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=rt.sanitize(i.text),Qi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{An("Translated")}}function ah(){An("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}p();var ih={};async function C6(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(t=t+i.innerText||"",t.length>1e3))break}let n=await Ue({text:t,pageLangs:["en"]});return ar(n),n}async function x6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(ih),n=[];for(let r of t){let a=ih[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${gc}='${r}']`);o&&o.remove(),n.push(a)}}try{Wu(),await P0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}function E6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}An("Original")}async function w6(e){An("Translating");let t=du(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;qa(u,e);let l=u.body;if(!l)continue;let c=Tn(e);c.isModifyImage=!1,ha({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let i=Or(e.config.translationServices[e.translationService]),o=1;for(let s of r){let u=Kc(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await zf(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:i,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),ih[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await P0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}p();var wr=!1,B0,D6=!1,I0=null;function k6(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){R.debug("exclude url for input");return}if(I0===!1){R.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Rn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=0,s=Date.now();B0&&self.removeEventListener("keydown",B0),B0=u,self.addEventListener("keydown",B0);function u(c){if(wr||I0===!1)return;let g=c,f=g.target||g.srcElement,m=f?.tagName;(f?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(ML(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&SL()&&(o=0,vL(c,e,i))}FL(e)}function P6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let i of a){let o=t.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function R0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var cs;function L6(e){let t=e.parentElement;if(!t)return;cs=document.createElement("div"),cs.className=ee+"-input",cs.innerHTML=`
`,t.appendChild(cs);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function _6(){cs&&cs.remove()}async function TL(e){if(!wr)try{let h=function(){c=e.config.inputTargetLanguage;let T=l.split(" ")[0];T&&T[0]&&(T=T[0].toLowerCase()+T.slice(1)),T.trim()&&i.flatAlias.includes(T)?(c=R0(T,i.codeAlias),u=l.slice(T.length+1)):u=l},y=function(){c="";let T=P6(i),b=l.split(T);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let w=l.lastIndexOf(u),L=l.slice(0,w).lastIndexOf(b[b.length-2]);s=l.slice(0,L+b[b.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=R0(x,i.codeAlias),!c){R.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Rn.forEach(T=>n[T]=[T,...n[T]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;wr=!0;let s="",u="",l=ii(o)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=M6(u,i),f=await Ue({text:g,pageLangs:["en"]});R.debug("translateContent",g,f);let m={text:g||"",id:0,from:f,to:c,url:"https://google.com",fromByClient:f,force:!0};if(!m.text||m.text.length>5e3)return;L6(o),at(dc,Date.now());try{let T=await Nr(m,{...e,translationService:e.inputTranslationService});B6(e),F6(e,o,s+T.text)}catch(T){if(T instanceof Q){let b=T.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:b}))}}finally{wr=!1}}catch(t){throw wr=!1,t}finally{wr=!1,_6()}}async function vL(e,t,n){if(!wr)try{let g=function(){s=t.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=R0(m,n.codeAlias),i=o.slice(m.length+1)):i=o},f=function(){s="";let m=P6(n),h=o.split(m);if(h.length<2)return;if(i=h[h.length-1],a=h[0],h.length>2){let T=o.lastIndexOf(i),b=o.slice(0,T).lastIndexOf(h[h.length-2]);a=o.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let y=o.slice(a.length+1,o.indexOf(i)).trim();if(s=R0(y,n.codeAlias),!s){R.warn("not found alias",y);return}},r=document.activeElement;wr=!0;let a="",i="",o=ii(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(f(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=M6(i,n),l=await Ue({text:u,pageLangs:["en"]});R.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!D6){D6=!0;let m=await BL(t);if(e.target&&e.target.focus(),m==="open_settings"){Wo(!0,"#input");return}else if(m==="open_learn_more"){Ko("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(I0=!1,m==="disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="disable_once"){let h=await Pn();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(I0=!1,m==="close_disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="enable"){let h=await Pn();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="close_enable"){let h=await Pn();h.enableInputTranslation=!0,await kn(h)}}L6(r),at(dc,Date.now());try{let m=await Nr(c,{...t,translationService:t.inputTranslationService});B6(t),F6(t,r,a+m.text)}catch(m){if(m instanceof Q){let h=m.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:h}))}}finally{wr=!1}}catch(r){throw wr=!1,r}finally{wr=!1,_6()}}function SL(){let e=document.activeElement;if(!e)return!1;if(O0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` +`,jf="immersive-translate-toastify-shadow-root",Hf=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(jf)){let t=document.getElementById(jf);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=jf,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=fP,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${i})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${t[i]}px`,t[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function L0(e){e=e||{},new Hf({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}p();function y9(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}p();p();p();function Vn(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{R.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:lc,payload:e},"*")});let n=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(n)}function Wf(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((i,o)=>(i[t[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&Ut(o,s=>{s.preventDefault();let u=r[i];Vn({method:u,data:{trigger:"shortcut"}})})}}p();p();p();p();var T9=`${ee}-float-ball`;function ri(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${T9}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${T9}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}p();p();function v9(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},i=Object.keys(n);for(let l of i){let g=n[l].matches;for(let f of g)a[f]||(a[f]=[]),a[f].push(l)}let o=a[e];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}p();p();var _0="DROP_DOWN_DEFAULT_VALUE";function Kf(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=e;r=r||"",t=t??!0,i=i||80;let s=$e(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:_0,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==_0){s.current.value=_0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:_0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}p();var hP=({date:e})=>{let{t}=W(),[n,r]=K(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},bP=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},yP=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},TP=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Gf(e){let{isShowError:t,request:n}=e,[r,a]=K(null),{t:i}=W(),[o,s]=K(null),[u,l]=K(null),[c,g]=K(""),[f,m]=K(!1),[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(null),[L,M]=K(null),C=On(),v=async()=>{g("");let A=o;if(o===null)try{let D=await n({url:Ma});D?(s(D),A=D,m(!0)):(g(i("unknownError")),l(null))}catch(D){l(null),g(D.message);return}A!==null?(e.setStorageBuildinConfig(A),l(!1),a(A.buildinConfigUpdatedAt)):(g(i("canNotFetchRemoteRule")),l(null))};return le(()=>{yt().then(A=>{let D=A.buildinConfigUpdatedAt;w(A);let S=new Date(D);if(a(D),C==="0.0.0"){b(!0);return}n({url:Ma}).then(N=>{let F=N,P=F.minVersion,O=C;s(F);let z=F.latestVersion;if(z&&(qr(O,z)?M(!0):M(!1)),qr(O,P)){let q=F.buildinConfigUpdatedAt;new Date(q)>S?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(N=>{l(null),g(N.message)})})},[]),le(()=>{yt().then(A=>{w(A)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:T?d(yP,{}):c?t===!1?null:d(TP,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(bP,{minVersion:o.minVersion}):u===null||u===!0?null:f?d(hP,{date:r}):null}):null}p();function vP(){return navigator.userAgent.indexOf("Mac")!==-1}var S9={Alt:"\u2325"};function M0(e=""){return vP()?Object.keys(S9).reduce((t,n)=>t.replace(n,S9[n]),e):e}p();function C9({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return da(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Li:i1,children:[d("img",{src:t?Nv:zv}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Li:s1,children:d("img",{src:n?ju:Rv})})]})}p();function x9({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let i=Xa(t.config.translationService,t.config.targetLanguage),o=Rn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(SP,{supportedLanguages:o,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Uv,style:{maxWidth:"unset"},class:"mx-2"}),d(CP,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function SP(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&e.onSelected(o)},children:e.supportedLanguages.map((i,o)=>{let s=Zt(i,e.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Zt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:i,selected:i===e.value,children:u||s},"selectlink"+o)})})]})}function CP(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Zt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}p();function E9(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=DP(e);return n.length?d(xe,{children:[d(w9,{class:"mt-3",label:t("popupService"),items:r}),d(xP,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function w9(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Ur,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xP({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=wP(e),i=EP(e),o=qe((u,l)=>{t(c=>{let g=c.translationServices||{},f=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...f,[u]:l}}}})},[]),s=ze(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==i[u.name],onSelected:()=>{o(u.name,g.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(w9,{class:"mt-2",label:u,items:l},"field-"+c))})}function EP(e){return ze(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function wP(e){return ze(()=>{let{translationService:n}=e.config;if(nr[n])return _o("translationService",n,e)},[nr,_o,e])}function DP({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=W(),u=ze(()=>t?Mi(t,"translationService"):[],[Mi,t]),l=qe(g=>{let f=u.find(m=>m.id===g.value);if(f.ok){if(n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;f.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=ze(()=>{let g=Ge();return u.filter(m=>t.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!e&&!g&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}p();p();function D9(e){let t;try{t=new URL(e)}catch{return!1}let n=hT(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(AP(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function AP(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}p();function A9(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function k9(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=kP(e),[o,s]=K(()=>a?"excludeMatches":"matches"),u=ze(()=>r||a||!1,[r,a]),l=qe(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Ur,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;i(g?o:"default",n.hostname)}})]})}function kP({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,g=null,f=null,m=null,{translationUrlPattern:h}=t.config;if(l=ze(()=>new URL(e||""),[e]),t.config&&e&&D9(e)){c=A9(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(w=>_t(e,w)),f=!!x.find(w=>_t(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?m=!0:m=!1}let y=qe(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],w=x.filter(M=>M.match!==b),L=!1;w.length!==x.length&&(L=!0),L&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),T=qe((b,x)=>{if(b==="default"){s(M=>{let C={...M.translationUrlPattern};return{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,matches:Vf(e,C.matches),excludeMatches:Vf(e,C.excludeMatches)}}}),y();return}let w=b,L=w==="matches"?"excludeMatches":"matches";l&&s(M=>{let C={...M.translationUrlPattern};return C[L]=Vf(e,C[L]),C[w]=zn(x,C[w]),{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,...C}}}),w==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:f,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:T}}function Vf(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}p();function P9(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=PP(e);return _i(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||sa[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:d(LP,{...e})}function PP({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=ze(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),i=ze(()=>sa.filter(s=>!(s==="Off"||sa.includes(a)&&s==="OtherCustom")),[e,a]);return ze(()=>i.map(s=>{let u=r("mouseHoldKey",{key:M0(s)}),l=sa.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(f=>{let m={...f.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=g.value),{...f,generalRule:m}})}}}),[i,a])}function LP(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,i=Object.keys(Vu).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(f=>{let m={...f.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=g.value),{...f,generalRule:m}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let f=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?f:"touchShortcutsOff"}}})}})]})}p();function L9(e){let{isAlwaysTranslateLang:t}=_P({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Zt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Ht(e.currentLang,u.matches),excludeMatches:Ht(e.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=zn(e.currentLang,u[i]),u[o]=Ht(e.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _P({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}p();p();var _9=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),M9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),F9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),B9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),I9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),R9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),O9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function N9({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Le(),i=Math.round((Fo.supportedVideoSubtitleSites||[]).length/10),o=ze(()=>[{title:r("widget.translateFile"),icon:_9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:M9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:F9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(xc)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?d(or,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(z9,{...s})}):d(z9,{...s}))})}function z9(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function $f(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=e,[s,u]=K(""),[l,c]=K(i),[g,f]=K(null),[m,h]=K(null);le(()=>{ot.get(bt,null).then(x=>{x?(f(x),h(Qt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,T=Ge();n&&T&&(y=n.generalRule.showSponsorOnSafari);let b=da(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(C9,{isLogin:!!g,isProUser:!!m,config:n}),d(OP,{openSharePage:r})]}),d(x9,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(E9,{isProUser:!!m,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(FP,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(IP,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Gf,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(k9,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(P9,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(L9,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(MP,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:t})]}),d(N9,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(BP,{...e,isProUser:!!m,isShowPricing:y,setMessage:u})]})}function MP(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return ze(()=>!n.rule.subtitleRule.disabled&&xp.includes(n.rule.subtitleRule.type||""),[n,xp])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function FP(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(i)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(or,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?I9:R9})})}function BP(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:i}=e.ctx,o=60;n.startsWith("zh")||(o=70);let s=Le(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[B9,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(RP,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Kf,{label:t("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(Fa),e.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?e.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?e.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),e.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),e.onClose()):m.value==="options"?(e.openOptionsPage(),e.onClose()):m.value==="changeToTranslateTheWholePage"?g():m.value==="changeToTranslateTheMainPage"?f():m.value==="about"?e.openAboutPage():m.value==="toggleEnabled"?e.onToggleEnabled():m.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&e.onOpenUrl(Fa,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),e.openOptionsPage()}function c(m){e.setSettings(h=>({...h,translationMode:m})),e.onSwitchTranslationMode(m)}function g(){e.setSettings(m=>({...m,translationArea:"body"})),e.onTranslateTheWholePage()}function f(){e.setSettings(m=>({...m,translationArea:"main"})),e.onTranslateTheMainPage()}}function IP({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=W(),l=r.config,c=ze(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");ji(r?.rule)&&!g&&(g=!0);let f=s("translate");t==="Translated"||t==="Error"?f=s("show-original"):t==="Original"?g?rr()&&c.protocol==="file:"||o?f=s("translate-firefox-local-pdf"):pe()?f=s("noSupportTranslate-pdf"):f=s("translate-pdf"):f=s("translate"):f=s(t);let m=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ba()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(f+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):f+=` (${M0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:i||t==="Translating",children:f})}function RP({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:i}=W(),o=On();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Hu(7)(s),children:["V",o,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function OP(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),O9]})}p();async function U9(e){try{let t=new Date;R.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Z.storage.local.set({[Yb]:t.toISOString()}),await zP(),pe()||await ST()}catch(t){R.error("run cron task failed",t)}}async function zP(){try{let e=await ir(),t=await de({url:Ma}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,i=new Date(a),o=t.minVersion,s=Z.runtime.getManifest().version;qr(s,o)?i>r?(await Z.storage.local.set({buildinConfig:t}),R.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Va({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{R.error("send content message request failed from cron task",u)})):R.debug(`no need to sync rules, latest: ${r}`):R.info(`local version is too old, please update to ${o} or later`)}catch(e){R.error("sync rules error: ",e)}}function F0(e){let{onClose:t}=e,[n,r]=K("Original"),[a,i,o,s]=Ye(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});Ct(a,i);let[u,l]=K(null),[c,g]=K(globalThis.location.href),[f,m]=K("auto"),[h,y]=K(null),T=N=>{r(N.detail)};if(le(()=>(document.addEventListener(ki,T,!1),ir().then(N=>{l(N);let F=Mt();m(F);let P=et();r(P),U9(N.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",T),document.removeEventListener("urlChange",x)}),[]),le(()=>{ir().then(N=>{l(N)})},[a]),le(()=>{c&&u&&Yf().then(N=>{y(N)})},[c,u]),!u||!h)return null;return d($f,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:N=>{w("switchTranslationMode",!0,{mode:N})()},request:de,onClose:L,onToggleEnabled:M,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:A,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{v(Ga(h.rule)||c)},openAboutPage:D,openSharePage:w("shareToDraft",!0),onSetPageLanguage:b,setSettings:i,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:f,onSetLocalConfig:t0,onSetBuildinConfig:dT,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:C});function b(N){m(N);let F=v9(c,N,u.sourceLanguageUrlPattern);i(P=>({...P,sourceLanguageUrlPattern:F})),ar(N)}function x(){g(globalThis.location.href)}function w(N,F,P={}){let O={trigger:"page_popup",...P};return()=>{Vn({method:N,data:O}),F&&t()}}function L(){t()}function M(){i(N=>({...N,enabled:!N.enabled})),setTimeout(()=>{L()},50)}function C(N,F){let P=N;F&&(P=`${N}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),i0(P,!0),setTimeout(()=>{L()},50)}function v(N){N&&(Go(!1,N),setTimeout(()=>{L()},50))}function A(N=""){Wo(!0,N),setTimeout(()=>{t()},50)}function D(){a0(),setTimeout(()=>{t()},50)}function S(){vT(),setTimeout(()=>{t()},50)}}p();function W9(){let[e,t]=K("Original");return le(()=>{let n=et();t(n);let r=a=>{t(a.detail)};return document.addEventListener(ki,r),()=>{document.removeEventListener(ki,r)}},[]),{pageStatus:e}}var q9=6,NP={position:"right",top:335};function K9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=$e(null),o=$e(null),[s,u]=K(!1),l=$e(null),c=$e(!1),g=$e(n.floatBallConfig||NP),f=$e(0),m=$e(0),h=$e(0),y=$e(!1),T=$e(0),b=$e(0),x=$e(0),w=$e(0),L=$e(!1),M=qe(C=>{a||(clearTimeout(l.current),C?u(C):l.current=setTimeout(()=>{u(C),y.current=!1},ut().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(i.current&&g.current){let C=Qf(g.current.top);g.current.top=C,i.current.style.top=`${C}px`,i.current.style.display="flex"}},[t,i]),le(()=>{if(!o.current||!i.current)return;let C=P=>{P.preventDefault&&P.preventDefault(),f.current=P.clientX,m.current=P.clientY,T.current=Date.now(),h.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),M(!0),x.current=P.clientX,w.current=P.clientY,L.current=!1,ut().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{j9({startX:f.current,startY:m.current,endX:x.current,endY:w.current})||(L.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",S),document.addEventListener("mouseup",A),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N)},v=P=>{if(P.preventDefault&&P.preventDefault(),!c.current||!i.current||(x.current=P.clientX,w.current=P.clientY,L.current))return;let O=P.clientY-m.current+h.current,z=Qf(O);i.current.style.top=`${z}px`},A=P=>{if(P.preventDefault&&P.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||M(!1),L.current)return;j9({startX:f.current,startY:m.current,endX:P.clientX,endY:P.clientY})||(clearTimeout(b.current),e());let z=Qf(P.clientY-30);g.current.top=z;let q=Au();t0({...q,floatBallConfig:g.current})},D=P=>{P.preventDefault&&P.preventDefault(),C(P.changedTouches[0])},S=P=>{P.preventDefault&&P.preventDefault(),v(P.changedTouches[0])},N=P=>{P.preventDefault&&P.preventDefault(),A(P.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",S),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N)};return o.current.addEventListener("mousedown",C),o.current.addEventListener("touchstart",D),()=>{o.current&&(o.current.removeEventListener("mousedown",C),o.current.removeEventListener("touchstart",D))}},[t,o,i,l,c,n,M,e]),le(()=>{if(ut().any)return;let C=A=>{A.target===i.current&&!y.current||(y.current=!0,M(!0),clearTimeout(l.current))},v=A=>{if(c.current){y.current=!1;return}A.target===i.current&&!y.current||M(!1)};return i.current?.addEventListener("mouseover",C),i.current?.addEventListener("mouseout",v),()=>{i.current?.removeEventListener("mouseover",C),i.current?.removeEventListener("mouseout",v)}},[i,c,M,t,y]),{ballRef:o,floatBallConfigRef:g,containerRef:i,active:s,setActive:M}}function j9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),i=Math.abs(r-t);return a>q9||i>q9}function G9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=ze(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),i=ze(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),o=ze(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function V9(){let[e,t]=K(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var H9="hasShownFloatingBallGuide",UP="2024-01-06";function $9(e){let[t,n]=K(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await qt(H9,""),i=await qt("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Y9(e,t){let n=$e(0),[r,a]=K(!0),[i,o]=K(!1),s=Ye(),[u,l]=s,{t:c}=W(),g=qe(()=>{e?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,o]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let f=qe(()=>{e&&(n.current=n.current+1,g(),l(y=>{let T={...y};return ut().any?T.h5FloatBallMainBtnTooltipShownCount=n.current:T.pcFloatBallMainBtnTooltipShownCount=n.current,T}))},[l,g,n,e]),m=ze(()=>ut().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=ze(()=>ut().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Zt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:h,handleShowTooltip:f}}function Qf(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}p();var $i=`${ee}-float-ball`;function Q9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(qP,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function qP(e){let{t}=W(),[n,r]=K("UntilNext"),a=r0()+"#floating",i=t("closeQuickTranslation.settingOpen",{1:a}),o=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return d("div",{class:`${$i}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${$i}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(ri,{type:"modal-close"})})]}),d("div",{class:`${$i}-close-radio-content mt-3`,children:o.map(s=>d(jP,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ko(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${$i}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${$i}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function jP(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,i=HP(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${$i}-radio-sel`:`${$i}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:d("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function HP(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?t.push({type:"link",href:i,value:o}):s&&t.push({type:"text",value:s})}return t}p();var Yi=`${ee}-float-ball`;function Z9(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=ze(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${Yi}-guide-container`,style:r,children:[d("img",{class:`${Yi}-guide-bg ${e.fixedPosition}`,src:WP}),d("div",{class:`${Yi}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${Yi}-guide-img`,src:Er("images/float_ball_intro.png")}),d("div",{class:`${Yi}-guide-message`,children:[t("floatBall.guideClickToTranslate"),ut().any?` +${t("floatBall.longPress")}`:""]}),d("div",{class:`${Yi}-primary-btn ${Yi}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var WP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";p();function KP({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var J9=KP;var $u=`${ee}-float-ball`;function Zf(e){let{t}=W(),n=Ye(),[r,a,i,o]=n;Ct(r,a);let s=Jt(r),u=Un(s),{isFullScreen:l}=V9(),[c,g]=K(!1),[f,m]=K(!0),{pageStatus:h}=W9(),y=Cu(u,r),T=qe(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=_e();if(ji(u?.rule)){let B=Ga(u.rule);Go(!0,B||_);return}Vn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Vn,g]),b=qe(()=>{g(!0)},[g]),x=f&&!!s,{containerRef:w,active:L,ballRef:M,floatBallConfigRef:C,setActive:v}=K9({handleBallClick:T,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),A=y?.fixedPosition||"right",D=A==="right"?"left":"right",{isShowGuide:S,handleCloseGuide:N}=$9(e.ctx),{closeTransform:F,logoContainerTransform:P,settingTransform:O}=G9(y,L||S),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:I,handleShowTooltip:k}=Y9(u,h);return x?d("div",{class:`${$u}-container ${A} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:L||S||c?"all":"none"},ref:w,children:[d(GP,{ctx:u,setVisible:m,closeTransform:F,setActive:v,getModalStyle:()=>X9(C.current.top,300,A)}),d(or,{enableMobile:!0,text:I,position:D,delay:z,onShow:k,disable:q,children:d("div",{class:`${$u}-btn ${A} btn-animate `,ref:M,style:{transform:P,opacity:L||S?1:.5},children:d("div",{children:[d(ri,{type:"logo"}),h!=="Original"?d(ri,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${$u}-more-buttons btn-animate`,children:[d(or,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${$u}-more-button`,onClick:()=>{i0(m1,!0)},children:d(ri,{type:"file"})})}),d(or,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${$u}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(ri,{type:"setting"})})})]}),d(VP,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>X9(C.current.top,500,A)}),d(Z9,{visible:S,top:C.current.top,fixedPosition:A,onClose:()=>{N(),v(!1)}})]}):null}function GP(e){let{t}=W(),[n,r]=K(!1),a=Ye(),[i,o,s,u]=a,l=Cu(e.ctx,i),c=qe(f=>{e.ctx&&o(m=>Bc({...m},f))},[e.ctx,o]),g=qe(f=>{l&&(e.setVisible(!1),f==="AlwaysClose"?c({...l,enable:!1}):f==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(ri,{type:"close"})}),d(Q9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function VP(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(J9,{isVisible:e.visible,onClose:e.onClose,children:d(F0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(F0,{onClose:e.onClose})})}):null}function $P(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var X9=(e,t,n)=>{let a=$P().height,i={position:"fixed"},o=0;return fb()&&(e=YP.top),i.top=e-o,i.top+t>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},YP={position:"right",right:0,top:335};function QP(e,t){for(let n of t){if(pe()&&!rr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function e6(){let e=Le(),t=await ir(),n=await vr(),r={url:globalThis.location.href,config:t},a=await yn(r),i=await Gp(a,n),o=_t(a.url,i?.blockUrls),s=await Wt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return QP(l,[c]),ZP(l,t,s,a)}function ZP(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(Zf,{localConfig:n,ctx:r})}),a)}var t6=!1;async function n6(){t6||(t6=!0,e6().catch(e=>{R.error("init popup error",e)}))}var r6=!1,s6=[()=>{Ut.unbind()}],a6=[...s6],JP=cr(async()=>{await Wo()},50),XP=cr(async()=>{await a0()},50),eL=cr(async()=>{await yT()},50),tL=cr(async()=>{await bT()},50),u6=cr(e=>{Vn({method:e,data:{trigger:"userscript_menu"}})},50);function nL(e,t){let n=e.document;if(r6)return;r6=!0,pe()||cT(),n.addEventListener("securitypolicyviolation",pL),document.addEventListener(be+"DocumentMessageUser",p6),document.addEventListener(be+"DocumentMessageUpdateUser",m6),document.addEventListener(be+"ChangeSuccessService",f6.bind(null,t)),document.addEventListener(be+"ChangeService",h6.bind(null,t)),document.addEventListener(Ai,cL.bind(null,t)),n.addEventListener(be+"EbookLoaded",gL),n.addEventListener(Bb,dL.bind(null,t)),n.addEventListener(Ib,mL.bind(null,t)),n.addEventListener(cc,a=>{st()||th(a,t)}),n.addEventListener(Rb,y6),n.addEventListener("click",a=>{iL(a,t)}),st()&&e.addEventListener("message",aL,!1),pe()&&(st()||n.addEventListener(oa,rL)),st()||Za.rootIframe(Tc).handleAsk("throttleRequest",hv)}function l6(e,t){fL(),nL(t,e),pe()&&(st()||(Wf(e.config),hL(e.config))),Ba()&&T6(e),Ge()&&Wf(e.config)}function rL(e){n6()}function aL(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===lc&&Va(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function iL(e,t){let n=e.target;if(!n||!n.getAttribute){ai(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ht(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),Jf({method:"retryFailedParagraphs"}),ai(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${ee}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}c6(d6.bind(null,t,o,i,s));return}}}async function oL(){let e=await Pn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function sL(){let e=await Pn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var i6=0;function c6(e){let t=Date.now();if(t-i6<2e3||(i6=t,uL()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),i=`${ee}-modal-title`,o=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${o}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Le();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let f=document.createElement("div");f.className=ee+"-modal-content notranslate",u.appendChild(f);let m=document.createElement("span");m.textContent="\xD7",m.className=ee+"-close",f.appendChild(m);let h=document.createElement("div");h.className=i+" notranslate",f.appendChild(h);let y=document.createElement("div");y.className=o+" notranslate",f.appendChild(y);let T=document.createElement("div");T.className=s,f.appendChild(T),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,T)}setTimeout(()=>{lL()},100)}function d6(e,t,n,r="retry",a,i,o,s){let u=jt.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=at.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",f=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),f.setAttribute(`data-${ee}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',f.appendChild(m),f.onclick=()=>{a.style.display="none",Jf({method:"retryFailedParagraphs"}),ai(f,!0)}}else if(r=="login")g=u("goLogin"),f.onclick=()=>{ai(f,!0),window.open(a1)};else if(r=="upgrade")g=u("upgradeToPro"),f.onclick=()=>{ai(f,!0),window.open(Cc)};else if(r=="setting")g=u("goSettings"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)},eh(e,e.config.translationService,!1).then(m=>{m?(g=u("toggleToService",{service:u("translationServices."+m)}),f.innerHTML=at.sanitize(g),f.onclick=()=>{b6(m),ai(f,!0)}):(g=u("goSettings"),f.innerHTML=at.sanitize(g))});else if(r=="none")return;f.className="immersive-translate-btn",f.innerHTML+=at.sanitize(g),s.appendChild(f)}function uL(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function lL(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function ai(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function cL(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;c6(d6.bind(null,e,a,i,o))}catch(r){R.warn("parse message error",r)}}async function dL(e,t){let n=t;if(R.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Jf({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")TT(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oL();else if(a.type==="toggleEnableInputTranslation")sL();else if(a.type==="translatePage")bL(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Mi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Xa(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:i,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...e,translationService:a.data.service};try{r=await yL(a.data,i)}catch(o){o6(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await n0(a.data):a.type==="sharePage"?th({detail:a.data},e):a.type==="switchTranslationMode"?Xf(a.data):u6(a.type);r&&a.id&&o6(a.type,r,a.id)}}catch(a){R.warn("parse message error",a)}}}function gL(e){setTimeout(()=>{g6()},10)}function pL(e){De.HAS_CSP_ERROR="1"}function mL(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ht(n.name,[{name:n.name}],{...e})}function fL(){a6.forEach(e=>{e()}),a6=s6}function hL(e){if(pe()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Ec.commands,a=[...Object.keys(t).filter(i=>i==="toggleTranslatePage").map(i=>{let o=t[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ja(`browser.${o.slice(6,-2)}`,e.interfaceLanguage)),{id:i,title:s}}),{id:iu,title:ja("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:ou,title:ja("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:au,title:ja("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:yp,title:ja("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===au?JP():i.id===yp?XP():i.id===ou?eL():i.id===iu?tL():u6(i.id)},i.key)}}function Jf(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{R.error("send content message request failed",e,n)});let t=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(t)}async function bL(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Je(_e(),t);_n(n)}function o6(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function yL({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),o=null;try{let s=await nt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}p();var Qi={};async function nh(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ue({text:t,minLength:200,pageLangs:[At(),"en"]});return ar(n),n}async function v6(e){An("Translating");let t=Mt(),n=Qc(),r=[...document.querySelectorAll(".source-text")];if(Bo(e,t))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return vt(i,"id",o+""),s&&(Io(s,o)?.remove(),s.appendChild(vu(e,o))),{text:i.innerText||"",id:o,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await nt({sentences:a},{...e,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Io(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=at.sanitize(`${i.message}`),Qi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=at.sanitize(o.text),Qi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{An("Translated")}}async function S6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Qi),n=[],r=[];for(let a of t){let i=Qi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Qi[a],u.appendChild(vu(e,a)),r.push(i.sentence))}}}try{await nt({sentences:r},e,(a,i,o)=>{let s=o.id,u=Io(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=at.sanitize(`${a.message}`),Qi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=at.sanitize(i.text),Qi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{An("Translated")}}function rh(){An("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}p();var ah={};async function C6(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(t=t+i.innerText||"",t.length>1e3))break}let n=await Ue({text:t,pageLangs:["en"]});return ar(n),n}async function x6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(ah),n=[];for(let r of t){let a=ah[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${gc}='${r}']`);o&&o.remove(),n.push(a)}}try{Ku(),await P0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}function E6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}An("Original")}async function w6(e){An("Translating");let t=gu(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;qa(u,e);let l=u.body;if(!l)continue;let c=Tn(e);c.isModifyImage=!1,ha({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let i=Or(e.config.translationServices[e.translationService]),o=1;for(let s of r){let u=Kc(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Of(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:i,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),ah[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await P0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}p();var wr=!1,B0,D6=!1,I0=null;function k6(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){R.debug("exclude url for input");return}if(I0===!1){R.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Rn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ut().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=0,s=Date.now();B0&&self.removeEventListener("keydown",B0),B0=u,self.addEventListener("keydown",B0);function u(c){if(wr||I0===!1)return;let g=c,f=g.target||g.srcElement,m=f?.tagName;(f?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(ML(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&SL()&&(o=0,vL(c,e,i))}FL(e)}function P6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let i of a){let o=t.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function R0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var cs;function L6(e){let t=e.parentElement;if(!t)return;cs=document.createElement("div"),cs.className=ee+"-input",cs.innerHTML=`
`,t.appendChild(cs);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function _6(){cs&&cs.remove()}async function TL(e){if(!wr)try{let h=function(){c=e.config.inputTargetLanguage;let T=l.split(" ")[0];T&&T[0]&&(T=T[0].toLowerCase()+T.slice(1)),T.trim()&&i.flatAlias.includes(T)?(c=R0(T,i.codeAlias),u=l.slice(T.length+1)):u=l},y=function(){c="";let T=P6(i),b=l.split(T);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let w=l.lastIndexOf(u),L=l.slice(0,w).lastIndexOf(b[b.length-2]);s=l.slice(0,L+b[b.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=R0(x,i.codeAlias),!c){R.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Rn.forEach(T=>n[T]=[T,...n[T]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ut().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;wr=!0;let s="",u="",l=ii(o)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=M6(u,i),f=await Ue({text:g,pageLangs:["en"]});R.debug("translateContent",g,f);let m={text:g||"",id:0,from:f,to:c,url:"https://google.com",fromByClient:f,force:!0};if(!m.text||m.text.length>5e3)return;L6(o),it(dc,Date.now());try{let T=await Nr(m,{...e,translationService:e.inputTranslationService});B6(e),F6(e,o,s+T.text)}catch(T){if(T instanceof Q){let b=T.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:b}))}}finally{wr=!1}}catch(t){throw wr=!1,t}finally{wr=!1,_6()}}async function vL(e,t,n){if(!wr)try{let g=function(){s=t.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=R0(m,n.codeAlias),i=o.slice(m.length+1)):i=o},f=function(){s="";let m=P6(n),h=o.split(m);if(h.length<2)return;if(i=h[h.length-1],a=h[0],h.length>2){let T=o.lastIndexOf(i),b=o.slice(0,T).lastIndexOf(h[h.length-2]);a=o.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let y=o.slice(a.length+1,o.indexOf(i)).trim();if(s=R0(y,n.codeAlias),!s){R.warn("not found alias",y);return}},r=document.activeElement;wr=!0;let a="",i="",o=ii(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(f(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=M6(i,n),l=await Ue({text:u,pageLangs:["en"]});R.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!D6){D6=!0;let m=await BL(t);if(e.target&&e.target.focus(),m==="open_settings"){Wo(!0,"#input");return}else if(m==="open_learn_more"){Ko("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(I0=!1,m==="disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="disable_once"){let h=await Pn();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(I0=!1,m==="close_disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="enable"){let h=await Pn();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="close_enable"){let h=await Pn();h.enableInputTranslation=!0,await kn(h)}}L6(r),it(dc,Date.now());try{let m=await Nr(c,{...t,translationService:t.inputTranslationService});B6(t),F6(t,r,a+m.text)}catch(m){if(m instanceof Q){let h=m.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:h}))}}finally{wr=!1}}catch(r){throw wr=!1,r}finally{wr=!1,_6()}}function SL(){let e=document.activeElement;if(!e)return!1;if(O0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` `).reverse()[0].trim(),i=n<=t;return R.debug("cursorPosition",t,"textLength",n),R.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let t=window.getSelection();if(!t)return R.debug("No active selection found."),!1;if(t.rangeCount>0){let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=CL(r,e);R.debug("Current text node:",r.textContent),R.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=e.innerText?.split(` -`).reverse(),s=Ge()?o[0]||o[1]:o[0];return R.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else R.debug("Cursor is not within a text node.")}}return!1}function CL(e,t){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(t),n==e}function M6(e,t){let{triggerTimes:n,triggerKey:r}=t,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=e.length;for(let s=e.length-1;s>=e.length-a;s--){if([10,8629].includes(e[s].charCodeAt(0))){o--;continue}if(![...t.codePrefixAlias[r]||[],i].includes(e[s]))break;o--}return e.length-o<3&&[".","\u3002"].includes(e[o-1])&&o--,e.slice(0,o)}function xL(e,t){let n=t.innerHTML,r=ii(t);return{html:n.replace(r,e),text:e}}function A6(e,t,n=!1){let r=ii(t);return n?r.trim().endsWith(e.text.trim()):r?.trim()?.indexOf(e?.text?.trim())>=0}function ii(e){return e.value||e.innerText||e.textContent}async function oi(e){await new Promise((t,n)=>{setTimeout(()=>{t("")},e)})}async function EL(e,t,n){await oi(10);let r=new DataTransfer;e.forEach(a=>{a==="plain"&&r.setData("text/plain",t.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await oi(10)}async function wL(e,t){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,e.text),t.dispatchEvent(n),await oi(10))}async function DL(e,t){t.value&&t.select(),document.execCommand("insertText",!1,e.text.replace(/\n/g,"\r")),await oi(20),(t.value||t.value==="")&&(t.value=e.text)}async function AL(e,t){O0(t)&&(t.value=e.text,t.dispatchEvent(new Event("input",{bubbles:!0})),await oi(20))}var kL=[EL.bind(null,["plain"])];function PL(e){let t;O0(e)?t=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):t=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),e.dispatchEvent(t)}function O0(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function LL(e){if(O0(e))return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}async function F6(e,t,n){await LL(t),await oi(50);let r=e.rule.inputConfig,a=xL(n,t);try{r?.clearContentEnable&&PL(t),await oi(50),r?.execCommandDeleteEnable&&!rr()&&ii(t)?.trim()!=""&&(document.execCommand("delete"),await oi(50)),R.debug("clearContent",ii(t))}catch(i){R.error(i)}for(let i of[...kL,DL,AL,wL]){await i(a,t);let o=_L();if(!o)return;if(R.debug("setContent",i.name,A6(a,o),ii(o),a),A6(a,o))break}}function _L(){return document.activeElement}function B6(e){ft("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:e.config.inputTrailingTriggerKey,input_starting_trigger_key:e.config.inputStartingTriggerKey,input_target_language:e.config.inputTargetLanguage}}],e)}function ML(e,t,n){let r="";e&&e.code&&(r=e.code.toLowerCase());let a="";e&&e.key&&(a=e.key.toLowerCase());let i=e.keyCode,o=n[t]||[];return i===229&&t!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===t||a===t)}async function FL(e){if(e.config.interfaceLanguage!=="zh-CN"||e.config.targetLanguage!=="zh-CN")return;let t="inputTutorialsShowedAt";if(await qt(t,"")||Number(await qt(dc,0))>0)return;let a=e.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{IL()},100),new Promise(g=>{let f=g;if(o){let D=o.shadowRoot;if(!D)return;s=D.querySelector(`.${n}`);let S=s.querySelector(`.${r}`),N=s.querySelector(`.${i}`),F=s.querySelector(`.${a}`)}else{let D=document.createElement("div");D.setAttribute("translate","no"),D.className="no-translate immersive-translate-error-modal-input-shadow-root",D.id=t,D.style.all="initial",D.style.zIndex="2147483647",document.body.appendChild(D);let S=D.attachShadow({mode:"open"}),N=document.createElement("style"),F=Le();N.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,S.appendChild(N),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let P=document.createElement("div");P.className=ee+"-modal-content notranslate "+ee+"-modal-content-in-input",s.appendChild(P);let O=document.createElement("span");O.textContent="\xD7",O.className=ee+"-close",P.appendChild(O),u=document.createElement("div"),u.className=r+" notranslate",P.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",P.appendChild(c),l=document.createElement("div"),l.className=i,P.appendChild(l),S.appendChild(s),O.onclick=function(){M(),g("close")},S.addEventListener("click",z=>{z.target==s&&(s.style.display="none",g("close"))})}document.addEventListener("keydown",A);let m=jt.bind(null,e);u.innerHTML=`
${T0} ${m("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let h=document.createElement("p");h.innerHTML=m("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),h.style.cssText="margin-bottom:12px",c.appendChild(h);let y=document.createElement("div");y.style.cssText="margin-bottom: 12px;",y.innerHTML=rt.sanitize(m("disableInputTranslationTips",{option:`${m("option")}`,learnMore:`${m("learnMore")}`})),c.appendChild(y);let T=[{id:"enable-search-enhancement",value:"enable",text:m("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:m("disableOnce")},{id:"disable-global",value:"global",text:m("disableGlobal")}];for(let D=0;Dl===t)||e.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(e.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=e,u={dsn:RL,environment:Le().PROD==="1"?"production":"develop",...e.initOptions};s?.ignoreErrors&&(u.ignoreErrors=oh(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=oh(s.denyUrls)),s?.allowUrls&&(u.allowUrls=oh(s.allowUrls)),u.release=`${n}@${t}`,wi.init(u),N0()}catch{}}async function N0(){try{let e=await it.get(ht,null);if(!$u||!e)return;wi.setUser({id:e.id,username:e.userName,nickname:e.nickName,email:e.email})}catch{}}function R6(e,t){try{if(!$u)return;wi.setContext(e,t)}catch{}}function O6(e){try{if(!$u)return;wi.setTags(e)}catch{}}function oh(e){return e.map(t=>new RegExp(t))}var ye=null,U0={},gs,z6=!1;async function g6(){qi.clearStrictTicks();let e=await Je(_e(),{}),t=await Du();if(R.debug("init page ctx",e),j6(e),e.rule.pageType=="subtitleBuilder"){rh();return}if(e.rule.pageType=="ebookBuilder"){C6();return}if(gs||(gs=e.state.translationTheme),e.rule.urlChangeDelay&&await xn(e.rule.urlChangeDelay),e.rule.waitForSelectors&&e.rule.waitForSelectors.length>0&&await VL(e.rule.waitForSelectors,e.rule.waitForSelectorsTimeout),e.rule.isInjectOptionsUrl){let s=r0(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){R.warn("inject options url failed",l)}}if(e.rule.globalMeta&&Object.keys(e.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=e.rule.globalMeta[u],document.head.appendChild(l)}),e.rule.initialGlobalAttributes&&s9(document.body,e.rule.initialGlobalAttributes),e.rule.pageType=="pdfReader"){_n(e);return}if(e.config.arxivRule&&e.config.arxivRule.matches&&_t(e.url,e.config.arxivRule.matches)){let u=document.querySelector(e.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(e.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let T=l.getAttribute("href");try{let b=new URL(T);b.searchParams.set("_immersive_translate_auto_translate","1"),c=b.toString()}catch{}}let m=new URL(e.url).pathname.split("/").pop(),h=!1,y=!0;if(m)try{let b=m.split(".")[0],x=b.slice(0,2),w=b.slice(2,4),L=new Date(`20${x}-${w}-27`),M=new Date(e.config.arxivRule.validBefore);L${jt(e,"viewWithImmersiveTranslate")}`,u.appendChild(T)}else{let T="";if(c&&(T=c),T){let b=document.createElement("li");b.innerHTML=`${jt(e,"viewWithImmersiveTranslate")}`,u.appendChild(b)}}}}if(e.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!e.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!e.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}z6||(z6=!0,ot()&&e.rule.useIframePostMessage&&await mv());let n=e.sourceLanguage;n==="auto"?n=await N6():ar(n);let r=py(e,n);if(r&&(e=await Je(_e(),{translationMode:r})),e.rule.isInjectMeta)try{let s=await cy(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=tg(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){R.warn("inject meta failed",s)}let a=new URL(e.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||e.state.isAutoTranslate||e.isTranslateUrl||e.rule.pageType=="pdfReader";if(!o&&!e.isTranslateExcludeUrl&&(R.debug(`detect page language: ${e.url} ${n}`),Ia(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto"||y9(n,e.config.translationLanguagePattern)&&(o=!0,R.debug(`match language pattern ${n}, auto translate`))),e.rule.pageType=="ebookBuilder"&&(o=!1),e.rule.pageType!=="pdfReader"&&_i(t)&&ps(e,window),o)ye.state.isAutoTranslate=!0,_n(ye);else if(R.debug("do not auto translate",e),e.rule.initTranslationServiceAsSoonAsPossible&&e.translationService==="deepl"){if(Ia(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto")return;e.config&&e.config.translationServices&&e.config.translationServices.deepl&&e.config.translationServices.deepl.authKey&&typeof e.config.translationServices.deepl.authKey=="string"&&e.config.translationServices.deepl.authKey.startsWith("immersive_")&&(U0[e.translationService]||(U0[e.translationService]=!0,ot()||nf(e).catch(s=>{R.warn("init translation engine error",s)})))}}async function uh(e){if(et()==="Original"){let t={};gs&&(t.translationTheme=gs),ye&&(t={...ye.state,...t});let n=await Je(_e(),t);if(e?.trigger=="right_menu"&&ji(n?.rule)){let r=Ga(n.rule);Go(!0,r||_e());return}await _n(ye,e)}else(et()==="Translated"||et()==="Error")&&Zi()}async function OL(){if(ye=await Je(_e(),{}),ye.rule.pageType=="ebookBuilder")return x6(ye);if(ye.rule.pageType=="subtitleBuilder")return S6(ye);W6()}async function lh(e){if(et()==="Original"){ye=await Je(_e(),{}),gs||(gs=ye.state.translationTheme);let t="mask";ye.state.translationTheme==="opacity"&&(t="opacity"),ye=await Je(_e(),{translationTheme:t}),await _n(ye,e)}else if(et()==="Translated"){let t="mask";ye?.state?.translationTheme==="opacity"&&(t="opacity");let n=sy().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[ye.mainFrame,...n],a=ye?.state.translationTheme;for(let i of r){let o=No(i,ko,!0);a==="mask"||a==="opacity"?o!=="none"?vt(i,ko,"none",!0):vt(i,ko,t,!0):o!=="mask"&&o!=="opacity"?vt(i,ko,t,!0):vt(i,ko,"none",!0)}}}async function N6(){let e=await Je(_e(),{});return e.rule.pageType=="subtitleBuilder"?rh():H6(e)}function zL(e){et()==="Original"?I6(e):Ji()}function NL(e){et()==="Original"?v6(e):ah()}function UL(e){et()==="Original"?ds(e):Ji()}async function Zi(){Vo(""),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let e=await Je(_e(),{});if(e.rule.pageType=="subtitleBuilder"){ah();return}else e.rule.pageType=="ebookBuilder"&&E6();Ji()}async function _n(e,t){e.config?.sentryConfig?.contentInitTime=="translate_page"&&z0(e.config?.sentryConfig);let n=et(),r={pageStatus:n,translateService:e.state.translationService||e.translationService,translationMode:e.state.translationMode};R6("translatePage",r),O6(r),n!=="Original"&&await Zi(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:e.targetLanguage}})})),U0[e.translationService]||(U0[e.translationService]=!0,ot()||nf(e).catch(i=>{R.warn("init translation engine error",i)}));let a={};if(t&&t.trigger&&(a.trigger=t.trigger),ft("translage_page_daily",[{name:"translage_page_daily",params:a}],e),ft("translate_page",[{name:"translate_page",params:a}],{...e,sourceLanguage:Mt()}),e.rule.pageType=="subtitleBuilder"){NL(e),Vo("yes");return}if(e.rule.pageType=="ebookBuilder"){w6(e),Vo("yes");return}if(e.rule.pageType==="pdfReader"){zL(e),Vo("yes");return}UL(e),Vo("yes")}async function qL(e,t){let n=ye?.translationService;if(et()==="Original"||n!=e){ye=await Je(_e(),{translationService:e});let r=jt(ye,"temprarilyChangeTranslationTo_"+e);L0({text:r}),await _n(ye,t)}else{Zi();let r=await ir(),a={url:_e(),config:r,state:{}},i=await yn(a);ye=await Je(_e(),{translationService:i.translationService})}}async function jL(e){et()==="Original"?await sh(e):(et()==="Translated"||et()==="Error")&&(ye=await Je(_e(),{}),ye.state.translationArea!=="main"?await sh(e):Zi())}async function sh(e){ye=await Je(_e(),{translationArea:"main"}),await _n(ye,e)}async function U6(e){ye=await Je(_e(),{translationArea:"body"}),await _n(ye,e)}async function ch(e){let t=await Je(_e(),{}),n=t.state.translationMode=="dual"?"translation":"dual";if(t=await Je(_e(),{translationMode:n}),et()==="Original"){_n(t,e);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function eh(e){if(ye=await Je(_e(),{translationMode:e}),ft("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:e}}],{...ye,sourceLanguage:"unknown"}),et()==="Original"){_n(ye);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(e)}async function HL(e){if(et()==="Original")await U6(e);else if(et()==="Translated"||et()==="Error"){let t={};ye&&ye.state&&(t=ye.state),ye=await Je(_e(),t),ye.state.translationArea!=="body"?(ye.state.translationArea="body",ye=await Je(_e(),ye.state),await _n(ye,e)):Zi()}}async function q6(e){ye=await Je(_e(),{translationStartMode:"immediate"}),await _n(ye,e)}async function WL(e){et()==="Original"?await q6(e):(et()==="Translated"||et()==="Error")&&Zi()}function KL(){return ye}async function Je(e,t){let n=Object.keys(t);if(ye){let r={url:e,config:ye.config,state:{...ye.state,...t}};ye=await yn(r)}else{let r=await ir(),a=t;n.length===0&&(a=void 0),ye=await yn({url:e,config:r,state:a})}return ye.state&&ye.state.translationService&&(ye.translationService=ye.state.translationService),ye.state&&ye.state.targetLanguage&&(ye.targetLanguage=ye.state.targetLanguage),ye}async function GL(){let e=await Pn()||{},t=e.generalRule||{},n=t["subtitleRule.add"]||{},r=!n.preTranslation;await kn({...e,generalRule:{...t,"subtitleRule.add":{...n,preTranslation:r}}}),r?L0({text:jt(ye,"videoSubtitlePreTranslationOn")}):L0({text:jt(ye,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Qf(){let e=await ir(),t=await Du(),n;ye&&ye.state&&(n=ye.state);let r={url:_e(),config:e,state:n},a=await yn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),ye=a,dh(ye);let i=Yu(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{l6(a,s),_i(t)&&ps(a,s),k6(a)}),a}function VL(e,t=3e3){return new Promise((n,r)=>{let a=t?setTimeout(()=>{n(new Error("timeout"))},t):void 0,i=setInterval(()=>{e.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function p6(e){let t=e.detail,n=Pn();await Hv(t.token,n,kn),it.set(ht,t);let r=await it.get(uu,!1);it.set(uu,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),N0()}function m6(e){R.debug("update user info",e);let t=e.detail;it.set(ht,t),N0()}async function f6(e){let t=await Pn();if(t.translationService)return;let n=e.config.translationService,r=await th(e,n);if(e.translationService!==r){if(!r){Bi([{name:"no_avaliable_translation_service"}]);return}t.translationService=r,kn(t),e.translationService=r,Bi([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function h6(e,t){let n=t.detail;if(e.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await Pn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),kn(i)}async function th(e,t,n=!0){let r=e.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===t?n?-1:1:i===t?n?1:-1:0),await Fv(r,e)}async function b6(e){let t=await Pn();t.translationService=e,await kn(t);let n=await Je(_e(),{});n.translationService=e,await _n(n)}sT({detectCurrentPageLanguage:N6,ensureSwitchTranslationMode:ch,restorePage:Zi,retryFailedParagraphs:OL,switchTranslationMode:eh,toggleTranslatePage:uh,toggleTranslateTheMainPage:jL,toggleTranslateTheWholePage:HL,toggleTranslationMask:lh,toggleVideoSubtitlePreTranslation:GL,translatePage:_n,translatePageWithTranslationService:qL,translateTheMainPage:sh,translateTheWholePage:U6,translateToThePageEndImmediately:q6,toggleTranslateToThePageEndImmediately:WL,updateGlobalContext:Qf,getPureGlobalContext:KL});p();p();function q0({parent:e,ctx:t,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||ee+n.name;e.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&Kn(l,a),e.appendChild(u),Ta(d(as,{lang:t.config.interfaceLanguage,fallbackLang:"zh-CN",translations:nn,children:d(n,{...r})}),l)}p();p();p();function ms(e){return si(e).subtitles}function si(e){let t=[],n=e.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Eh.htmlEncode(i.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`${n}`,r},__=e=>/]*>[\s\S]*]*>/.test(e),TS=un({name:yS,build:L_,detect:__,helper:Eh,parse:P_});p();var M_="srt",Xu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},F_=(e,t)=>{let n=[],r=t.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${t.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Eh.htmlEncode(i.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`
${n}`,r},__=e=>/]*>[\s\S]*]*>/.test(e),TS=ln({name:yS,build:L_,detect:__,helper:Eh,parse:P_});p();var M_="srt",Xu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},F_=(e,t)=>{let n=[],r=t.eol||`\r `,a=e.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Xu.toMilliseconds(s[2]),u.end=Xu.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}t.verbose}return n},B_=(e,t)=>{let n="",r=t.eol||`\r -`;for(let a=0;a ${Xu.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}t.verbose}return n},I_=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),vS=un({name:M_,build:B_,detect:I_,helper:Xu,parse:F_});p();var R_="sub",wh=25,O_=(e,t)=>{t.fps||=wh;let n=t.fps>0?t.fps:wh,r=[],a=t.eol||`\r +`;for(let a=0;a ${Xu.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}t.verbose}return n},I_=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),vS=ln({name:M_,build:B_,detect:I_,helper:Xu,parse:F_});p();var R_="sub",wh=25,O_=(e,t)=>{t.fps||=wh;let n=t.fps>0?t.fps:wh,r=[],a=t.eol||`\r `,i=e.split(/\r?\n/g);for(let o=0;o{let n=(t.fps||0)>0?t.fps:wh,r="",a=t.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},N_=e=>/^\{\d+\}\{\d+\}.*/.test(e),SS=un({name:R_,build:z_,detect:N_,parse:O_});p();var U_="vtt",el={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},q_=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=el.toMilliseconds(s[2]),l.end=el.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},j_=(e,t)=>{let n=t.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${el.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}t.verbose}return r},H_=e=>/^\s*WEBVTT\r?\n/.test(e),CS=un({name:U_,build:j_,detect:H_,helper:el,parse:q_});var W_={vtt:CS,lrc:hS,smi:TS,ssa:pS,ass:mS,sub:SS,srt:vS,sbv:bS,json:fS},xS=W_;var K_=e=>JSON.parse(JSON.stringify(e)),Dh=class{format=xS;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(t);if(o===!0||o===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(t,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(t,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ue({text:i.map(c=>c.text).join(` -`),pageLangs:[At(),"en"]});if(yt(ve(o),this.ctx.targetLanguage))return null;Ye(this.ctx,ve(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,g)=>{c.text=u[g]}),tl.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};p();var ud=class extends Qe{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ue({text:i.map(u=>u.textContent).join(` -`),pageLangs:[At(),"en"]});return yt(ve(o),this.ctx.targetLanguage)?null:(Ye(this.ctx,ve(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),ve(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};p();var ld=class extends Qe{hasSubtitle=!1;async mutationVideoChange(){let t=G_(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",t),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(t);r&&(Ye(this.ctx,"ja","av"),this.hasSubtitle=!0,ba(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return tl.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){R.error("fetchSubtitle",n);return}}};function G_(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var V_={youtube:V0,netflix:$0,webvtt:hs,khanacademy:Y0,bilibili:Q0,udemy:Z0,hulu:ad,text_track:li,text_track_dynamic:ys,general:J0,live:bs,ebutt:td,disneyplus:nd,"fmp4.xml":rd,multi_attach_vtt:id,twitter:od,subsrt:sd,xml:ud,av:ld},cd;function j6(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=V_[t.type];if(!n)return;cd=new n(e)}catch(t){R.error(t)}}async function Ah(){cd?.onPageStatusChange()}async function $_(e,t){if(cd?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&ot())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),ft("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function Y_(){cd?.onTranslationModeChanged()}lT({autoEnableSubtitleChanged:$_,reloadSubtitleWithTranslationModeChanged:Y_});var fe=null;function Yu(){return fe||null}function ds(e){Q_(e),rM(e),eM(e),nM(e),qa(document,e),An("Translated"),tM(fe),X_(fe),f9(Ji),Z_(fe),Ah(),dM()}function Q_(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=Tn(e);u9(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}us(e)&&vt(document.documentElement,be+"_rtl",e.targetLanguage)}function Z_(e){h9(e)}function J_(){b9()}function X_(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=r9(e.ctx);if(R.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Gi(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Gi(i,e)})}async function eM(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Wt(),n=Date.now(),a=new URL(e.url).hostname,i=t.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Kt({...t,tempTranslationUrlMatches:[...i]})}}function tM(e){e.ctx.rule.isTranslateTitle&&(Mf(e.ctx),e.titleDynamicObserver=l9(e.ctx))}function nM(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function dh(e){if(!fe)return;let t=Tn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function rM(e){let t=du();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],dh(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||lM(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||cM(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||oM(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||sM(fe),fe.injectCssToDocument=dd,fe.walkContainer=ha,fe.allInlineWindows=[window],window.onerror=iM(fe,e),window.immersiveTranslateSwitchTranslateState=Ph.bind(fe)}function kS(e,t){t.getRootNode()instanceof ShadowRoot?dd(t.getRootNode(),e):dd(t.ownerDocument,e),aM(e)}function aM(e){fe||(fe={},fe.ctx=e,fe.id=du(),kh(fe,e))}function kh(e,t){e.paragraphQueue=[],e.injectCssToDocument=dd;let n=Tn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=Ph.bind(e),e}function Ji(e=!0){fe&&(An("Original"),Ah(),J_(),Wu(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),c9(fe.ctx),iy(),oy(),e&&Ph.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function iM(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),Ji(),n=setTimeout(()=>{ds(t)},e.urlChangeDelay||2e3)),!0}}function oM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(Rf(e,r.target),n.unobserve(r.target))})})}function sM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Of(e,o)}),n.unobserve(a)}})})}var wS;function uM(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(wS),e.translateState=="original"?!1:(Ji(e.urlChangeDelay>20),wS=setTimeout(()=>{let a=e.ctx;ds(a)},e.urlChangeDelay),!0)):!1}function lM(e){let t=e.ctx.rule,n=Tn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&uM(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!Nn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&Nn(a.target,t.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(fc)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&DS(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&jf(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&DS(e,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!za(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Ro(n,i.parentElement);u&&(xt.clearToParentMark(i,u),AS(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||ln(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:i.contains(u)).length&&AS(e,a.target)}catch(i){R.error(i)}}})}function DS(e,t,n){let r=e.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(ln(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{qf(n),ha({id:e.id,container:n,filterRule:t,force:!0,onParagraph:o=>{Vi(e,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function AS(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,i=t;xt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Gi(t,e,n),i.timer=null},a)}function qf(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function jf(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||ln(n,["."+Lt]))).length==0}function cM(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Lf(i)||(n.unobserve(r.target),xt.clearMark(a),Gi(a,e))}})}function Ph(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Hu(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function dd(e,t){if(e instanceof HTMLIFrameElement){qa(e.contentDocument,t);return}qa(e,t)}async function H6(e){let t=ot(),n="auto";if(pe()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Zp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})):(r=zo(e.mainFrame).slice(0,1e3),n=await Ue({text:r,pageLangs:[At(),"en"]}))}else if(t)n=await Ue({text:zo(e.mainFrame).slice(0,1e3),pageLangs:[At(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Zp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})}else n=await gT();return n==="auto"&&(n=await m9()),oT(n),n}async function W6(){if(!fe)return;Wu(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${gc}='${n}']`);i&&i.remove()}}k0.call(fe,fe.ctx)}async function nh(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),ft("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await Wt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?gy():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let f="";globalThis.document.body.getAttributeNames().forEach(m=>{f+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},N_=e=>/^\{\d+\}\{\d+\}.*/.test(e),SS=ln({name:R_,build:z_,detect:N_,parse:O_});p();var U_="vtt",el={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},q_=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=el.toMilliseconds(s[2]),l.end=el.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},j_=(e,t)=>{let n=t.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${el.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}t.verbose}return r},H_=e=>/^\s*WEBVTT\r?\n/.test(e),CS=ln({name:U_,build:j_,detect:H_,helper:el,parse:q_});var W_={vtt:CS,lrc:hS,smi:TS,ssa:pS,ass:mS,sub:SS,srt:vS,sbv:bS,json:fS},xS=W_;var K_=e=>JSON.parse(JSON.stringify(e)),Dh=class{format=xS;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(t);if(o===!0||o===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(t,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(t,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ue({text:i.map(c=>c.text).join(` +`),pageLangs:[At(),"en"]});if(dt(ye(o),this.ctx.targetLanguage))return null;Ve(this.ctx,ye(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,g)=>{c.text=u[g]}),tl.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};p();var sd=class extends Qe{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ue({text:i.map(u=>u.textContent).join(` +`),pageLangs:[At(),"en"]});return dt(ye(o),this.ctx.targetLanguage)?null:(Ve(this.ctx,ye(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),ye(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};p();var ud=class extends Qe{hasSubtitle=!1;async mutationVideoChange(){let t=G_(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",t),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(t);r&&(Ve(this.ctx,"ja","av"),this.hasSubtitle=!0,ba(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return tl.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){R.error("fetchSubtitle",n);return}}};function G_(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var V_={youtube:G0,netflix:V0,webvtt:bs,khanacademy:$0,bilibili:Y0,udemy:Q0,hulu:rd,text_track:li,text_track_dynamic:Ts,general:Z0,live:ys,ebutt:ed,disneyplus:td,"fmp4.xml":nd,multi_attach_vtt:ad,twitter:id,subsrt:od,xml:sd,av:ud},ld;function j6(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=V_[t.type];if(!n)return;ld=new n(e)}catch(t){R.error(t)}}async function Ah(){ld?.onPageStatusChange()}async function $_(e,t){if(ld?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&st())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),ht("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function Y_(){ld?.onTranslationModeChanged()}lT({autoEnableSubtitleChanged:$_,reloadSubtitleWithTranslationModeChanged:Y_});var fe=null;function Qu(){return fe||null}function ds(e){Q_(e),rM(e),eM(e),nM(e),qa(document,e),An("Translated"),tM(fe),X_(fe),f9(Ji),Z_(fe),Ah(),dM()}function Q_(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=Tn(e);u9(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}us(e)&&vt(document.documentElement,be+"_rtl",e.targetLanguage)}function Z_(e){h9(e)}function J_(){b9()}function X_(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=r9(e.ctx);if(R.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Gi(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Gi(i,e)})}async function eM(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Wt(),n=Date.now(),a=new URL(e.url).hostname,i=t.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Kt({...t,tempTranslationUrlMatches:[...i]})}}function tM(e){e.ctx.rule.isTranslateTitle&&(_f(e.ctx),e.titleDynamicObserver=l9(e.ctx))}function nM(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function ch(e){if(!fe)return;let t=Tn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function rM(e){let t=gu();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],ch(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||lM(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||cM(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||oM(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||sM(fe),fe.injectCssToDocument=cd,fe.walkContainer=ha,fe.allInlineWindows=[window],window.onerror=iM(fe,e),window.immersiveTranslateSwitchTranslateState=Ph.bind(fe)}function kS(e,t){t.getRootNode()instanceof ShadowRoot?cd(t.getRootNode(),e):cd(t.ownerDocument,e),aM(e)}function aM(e){fe||(fe={},fe.ctx=e,fe.id=gu(),kh(fe,e))}function kh(e,t){e.paragraphQueue=[],e.injectCssToDocument=cd;let n=Tn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=Ph.bind(e),e}function Ji(e=!0){fe&&(An("Original"),Ah(),J_(),Ku(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),c9(fe.ctx),iy(),oy(),e&&Ph.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function iM(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),Ji(),n=setTimeout(()=>{ds(t)},e.urlChangeDelay||2e3)),!0}}function oM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(If(e,r.target),n.unobserve(r.target))})})}function sM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Rf(e,o)}),n.unobserve(a)}})})}var wS;function uM(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(wS),e.translateState=="original"?!1:(Ji(e.urlChangeDelay>20),wS=setTimeout(()=>{let a=e.ctx;ds(a)},e.urlChangeDelay),!0)):!1}function lM(e){let t=e.ctx.rule,n=Tn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&uM(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!Nn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&Nn(a.target,t.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(fc)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&DS(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&qf(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&DS(e,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!za(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Ro(n,i.parentElement);u&&(xt.clearToParentMark(i,u),AS(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||cn(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:i.contains(u)).length&&AS(e,a.target)}catch(i){R.error(i)}}})}function DS(e,t,n){let r=e.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(cn(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Uf(n),ha({id:e.id,container:n,filterRule:t,force:!0,onParagraph:o=>{Vi(e,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function AS(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,i=t;xt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Gi(t,e,n),i.timer=null},a)}function Uf(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function qf(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||cn(n,["."+Lt]))).length==0}function cM(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Pf(i)||(n.unobserve(r.target),xt.clearMark(a),Gi(a,e))}})}function Ph(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Wu(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function cd(e,t){if(e instanceof HTMLIFrameElement){qa(e.contentDocument,t);return}qa(e,t)}async function H6(e){let t=st(),n="auto";if(pe()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Qp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})):(r=zo(e.mainFrame).slice(0,1e3),n=await Ue({text:r,pageLangs:[At(),"en"]}))}else if(t)n=await Ue({text:zo(e.mainFrame).slice(0,1e3),pageLangs:[At(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Qp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})}else n=await gT();return n==="auto"&&(n=await m9()),oT(n),n}async function W6(){if(!fe)return;Ku(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${gc}='${n}']`);i&&i.remove()}}k0.call(fe,fe.ctx)}async function th(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),ht("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await Wt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?gy():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let f="";globalThis.document.body.getAttributeNames().forEach(m=>{f+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(T,b)=>"imt_"+b.replaceAll("translation","t"))},await Kt(a);let h=Le().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let T=new URL(h);T.pathname=y.shareConfig.sharePath,h=T.toString()}Ko(h)}catch(m){R.error(m)}}async function y6(){let e=await Wt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Ob,{detail:JSON.stringify(e.draft)}))}async function dM(){try{if(await Fc("reportActive"))return;R.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Gp();await de({url:Pi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),bu("reportActive","1")}catch(e){R.error(e)}}var gM=new AbortController,{signal:pM}=gM,gd=0,pd=0,Ts=!1,to,PS=0,ci=[];function ps(e,t){mM();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(R.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,ps(n,t)):(R.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,ps(n,t))}document.addEventListener(nu,s),ci.push(()=>{document.removeEventListener(nu,s)});let u=cr(f=>{if(!(Math.abs(f.clientX-gd)+Math.abs(f.clientY-pd)<=3)&&(gd=f.clientX,pd=f.clientY,o||Ts&&!to)){let m=FS(n.rule,t);if(m){if(Fh(m))return;Mh(n,!1,m)}}},o?700:300),l=f=>{let m=f.target;Fh(m)||Mh(n,!0)},c=f=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",h=Ut.getPressedKeyCodes();if(h.length>1&&Ut[m]&&(PS=Date.now(),Ts=!1),h.length===1&&Ut[m]){let y=Date.now();Ts=!0,to&&clearTimeout(to),to=setTimeout(()=>{let T=PS-y;T>0&&T<=i?Ts=!1:l(f),to=void 0},i)}};if(ci.push(()=>{to&&clearTimeout(to)}),a)return;Lh("mousemove",u,t),ci.push(()=>{t.removeEventListener("mousemove",u)});function g(){o?u.cancel():Ts=!1}if(Lh("blur",g,t),ci.push(()=>{t.removeEventListener("blur",g)}),!o){let f=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=r1;Lh("keyup",LS,t),ci.push(()=>{t.removeEventListener("keyup",LS)}),m.includes(f)?Ut("*","mouseHover",c):Ut(r.generalRule.mouseHoverHoldKey,"mouseHover",l),Ut.setScope("mouseHover"),ci.push(()=>{Ut.deleteScope("mouseHover")})}}function mM(){ci.forEach(e=>e()),ci=[],Ut.setScope("all")}function LS(e){Ts=!1}function Lh(e,t,n=window){return n.addEventListener(e,t,{signal:pM})}function Mh(e,t,n,r=window){if(n=n||FS(e.rule,r),!n){R.debug("can not find selection part!");return}if(hM(n,t))return;if(Fh(n)){R.debug("exclude dom");return}kS(e,n);let i=Yu();i&&(i.setupMouseHoverListener=ps);let o=Tn(e);o.excludeSelectors=[],o.selectors=[];let s=!1,u=kh({...i},e);ha({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Vi(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let g=Date.now();at(Ub,g),ft("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function FS(e,t){return fM(gd,pd,e,t)}function fM(e,t,n,r){let a=Ey(e,t,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=wy(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:MS(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){R.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{yM(r)}),!0}function bM(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function yM(e){let t=Yu();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Hu(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function _h(e){return!!(e.host&&e.mode)}function _S(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||_h(n))return e;for(;n&&n.nodeName!=="BODY"&&!_h(n)&&Yp(n,t);){let r=n.parentNode;if(r&&_h(r))break;n=r}return n}function MS(e,t){return e.nodeType===Node.TEXT_NODE||Yp(e,t)?_S(e,t):e}function BS(e,t){gd=t.clientX,pd=t.clientY,Mh(e,!0)}var nl=[];function Bh(e,t){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",i),nl.push(()=>{document.removeEventListener("click",i)})}function IS(e,t){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),nl.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function md(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),nl.push(()=>{document.removeEventListener("touchstart",r)})}var Gu={touchShortcutsOff:()=>{},"multipleClick.2":Bh,"multipleClick.3":Bh,"multipleClick.4":Bh,"slide.left":IS,"slide.right":IS,"fingers.2":md,"fingers.3":md,"fingers.4":md,"fingers.5":md};async function T6(e){try{xM();let t=await vr(),n=hc.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Ih(e,t,r.command),i=Gu[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{CM(r.command,e,u)})})}catch(t){R.error(t)}}function Ih(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var TM=()=>{uh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},vM=()=>{ch();let e=new CustomEvent(oa,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},SM=()=>{lh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},RS=0,CM=(e,t,n)=>{new Date().getTime()-RS<200||(RS=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?TM():e==="touchShortcutsToggleTranslationMask"?SM():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?vM():e==="touchShortcutsToggleTranslateTouchElement"&&BS(t,n))};function xM(){nl.forEach(e=>{e()}),nl=[]}function rl(e){let{onChange:t,type:n,title:r,command:a,description:i,shortcut:o,disabled:s}=e,[u,l]=K(!1),{t:c}=W();if(n==="finger")return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("select",{class:"select !w-36",onChange:g=>{g.preventDefault();let f=g.target.value;t(f)},children:Object.keys(Gu).map((g,f)=>d("option",{value:g,selected:o===g,children:`${c(g)}`},"finger-"+f))})]});if(n==="mouseHoverHoldKey"){let g=sa.includes(o);return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d(Ur,{className:"select",maxWidth:250,items:sa.filter(f=>!(g&&f==="OtherCustom"||f==="OtherCustom")).map(f=>{let m=c("mouseHoldKey",{key:f}),h=sa.includes(o),y=f===o;return o==="Off"&&f===o&&u&&(y=!1),f==="Auto"?m=c("mouseHoldKeyAuto"):f==="Off"?m=c("mouseHoldKeyOff"):f==="OtherCustom"?m=h?c("mouseHoldKeyOther"):c("mouseHoldKeyCustomKey",{key:o}):f==="Other"&&(m=c("mouseHoldKeyOther")),h||f==="Other"&&(y=!0),{label:m,value:f,selected:y,onSelected:T=>{T.value==="Other"?(l(!0),t("Off",!0)):(l(!1),t(T.value))}}})})]}),(!g||u)&&d("div",{class:"nav",children:[d(Ae,{title:c("mouseHoverCustomKeyTitle"),description:c("mouseHoverCustomKeyDescription")||""}),d("input",{type:"text",class:"!w-36",placeholder:c("mouseHoverShortcutPlaceholder"),name:"mouseHoverHoldKey",value:o==="Off"?"":o,onChange:f=>{t(f.target.value)}})]})]})}return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("div",{children:[d("input",{type:"text",class:"!w-36",disabled:s,id:a,name:a,value:o,onChange:g=>{t(g.target.value)}}),s&&d("div",{class:"ml-2 inline-block",children:d(or,{width:200,multiple:!0,text:c("shortcutDisableTooltip"),children:d("span",{children:d(n9,{width:20,height:16})})})})]})]})}function Rh(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=fa(),{t:u}=W(),l=Jt(t),c=Un(l);return l?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("mouseHoverOptions")})}),d(ss,{image:Er("images/hover_intro.png"),nightImage:Er("images/hover_intro_night.png"),title:u("intro.hoverTitle"),description:u("intro.hoverDescription")}),d(rl,{onChange:(g,f)=>{n(m=>{let y={...m.generalRule||{},mouseHoverHoldKey:g||"Off"};return g!=="Off"&&(y.mouseHoverPreferenceKey=g),{...m,generalRule:y}}),f||ut(u("saved"))},type:"mouseHoverHoldKey",title:u("mouseHoverHoldKey"),command:"mouseHoverHoldKey",description:u("desc.mouseHoverHoldKey"),shortcut:l.generalRule.mouseHoverHoldKey,disabled:!1}),d(EM,{setSettings:n,config:l}),!k1()&&d("div",{class:"nav",children:[d(Ae,{title:u("confirmSupportMouse"),description:u("confirmSupportMouseDescription")}),d("label",{for:"confirmSupportMouse",children:d("input",{type:"checkbox",onChange:g=>{let f=g.target.checked;s({...o,confirmSupportMouse:f})},checked:o?.confirmSupportMouse===!0,id:"confirmSupportMouse",name:"switch",role:"switch"})})]}),d(ni,{config:l,ctx:c,serviceType:"mouseHoverTranslationService"})]})}):null}function EM({setSettings:e,config:t}){let{t:n}=W();return Ba()?d(rl,{onChange:(r,a)=>{e(i=>{let s={...i.generalRule||{},touchShortcutsToggleTranslateTouchElement:r||"touchShortcutsOff"};return r&&r!=="touchShortcutsOff"&&(s.touchShortcutsToggleTranslateTouchElementPreferenceKey=r),{...i,generalRule:s}}),a||ut(n("saved"))},type:"finger",title:n("touchShortcutsToggleTranslateTouchElement"),command:"touchShortcutsToggleTranslateTouchElement",description:n("desc.touchShortcutsToggleTranslateTouchElement"),shortcut:t.generalRule.touchShortcutsToggleTranslateTouchElement,disabled:!1}):null}p();function Oh(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),u=qe(f=>{s&&n(m=>Bc({...m},f))},[s,n]),l=Su(s,t),{t:c}=W(),g=qe((f,m)=>c("floatBallOptions."+f,m),[]);return!s||!l?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:c("floatBallOptions")})}),d(ss,{image:Er("images/float_ball_intro.png"),nightImage:Er("images/float_ball_intro_night.png"),title:c("intro.floatBallTitle"),description:c("intro.floatBallDescription")}),d(wM,{config:s.config,t:g,rawT:c,rule:l,updateFloatBallRule:u}),d(DM,{t:g,rule:l,updateFloatBallRule:u}),d(AM,{t:g,rule:l,updateFloatBallRule:u}),d(kM,{t:g,rule:l,updateFloatBallRule:u})]})})}function wM({rule:e,config:t,updateFloatBallRule:n,t:r,rawT:a}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:r("enable"),description:e.isPc?r("enableDescPc"):r("enableDesc",{touch:a("fingers."+t.generalRule.fingerCountToToggleTranslagePageWhenTouching)})}),d("label",{for:"enable",children:d("input",{type:"checkbox",id:"enable",name:"switch",role:"switch",onChange:i=>{let o=i.target.checked;e.enable=o,n(e)},checked:e.enable})})]})})}function DM({t:e,rule:t,updateFloatBallRule:n}){let[r,a]=K(!1),[i,o]=K(""),[s,u]=K(-1);le(()=>{Ut("esc",()=>{a(!1)})},[]);let l=()=>{a(!r)},c=(m,h,y,T)=>{l(),s==h&&h!=-1?t.blockUrls[h]=m:t.blockUrls=zn(m,t.blockUrls),n(t),u(-1),o("")},g=(m,h)=>{m.forEach(y=>{t.blockUrls=Ht(y,t.blockUrls)}),n(t),u(-1),o("")},f=(m,h,y)=>{a(!r),o(m),u(y)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e("blockUrls"),description:e("blockUrlDesc")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:m=>{m.preventDefault(),l()},children:e("add")})}),r?d(ma,{toggleModal:m=>{m.preventDefault(),l()},onSubmitAddUrl:c,type:"excludeMatches",urlValue:i,index:s}):null]}),d(ei,{urls:t.blockUrls||[],type:"excludeMatches",onDeleteUrl:g,onEditUrl:f})]})}function AM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("clickType"),description:e("clickTypeDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.clickType=r.target.value,n(t)},children:[d("option",{value:"translate",selected:t.clickType=="translate",children:e("clickTranslate")}),d("option",{value:"popup",selected:t.clickType=="popup",children:e("clickPopup")})]})]})})}function kM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("fixedPosition"),description:e("fixedPositionDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.fixedPosition=r.target.value,n(t)},children:[d("option",{value:"left",selected:t.fixedPosition=="left",children:e("fixedPositionLeft")}),d("option",{value:"right",selected:t.fixedPosition=="right",children:e("fixedPositionRight")})]})]})})}p();function zh(){let e=$e(),[t,n,r,a,i]=e,[o]=fa();Ct(t,n);let[s,u]=K(null),{t:l}=W();if(le(()=>{bt().then(m=>{yn({config:m,url:globalThis.location.href}).then(h=>{u(h)})})},[t]),!s)return d("div",{children:"loading"});let c={...s.config,shortcuts:{...s.config.shortcuts}},g=hc.filter(m=>m.name==="touch"?Ba():m.name==="mouse"?_i(o):!0).map(m=>({name:m.name,shortcuts:m.shortcuts.map(h=>{let y="",T="normal";typeof h=="string"?y=h:(y=h.command,h.type&&(T=h.type));let b="";l(`desc.${y}`)!==`desc.${y}`&&(b=l(`desc.${y}`));let w="";T==="finger"?w=Ih(s,t,y):T==="mouseHoverHoldKey"?t?.generalRule&&t?.generalRule[y]!==void 0?w=t.generalRule[y]:w=c.generalRule[y]:t?.shortcuts&&t?.shortcuts[y]!==void 0?w=t.shortcuts[y]:w=c.shortcuts[y];let L=l(`browser.${y}`);return(T==="finger"||T==="mouseHoverHoldKey")&&(L=l(`${y}`)),{command:y,type:T,shortcut:w,title:L,description:b,disabled:!(pe()||wo())}})})),f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsSucks")," ",d("kbd",{children:"Ctrl+A"}),"\xA0",d("kbd",{children:"Alt+B"}),"\xA0",d("kbd",{children:"Command+C"}),"\xA0 ",d("kbd",{children:"Ctrl+Shift+D"})," "]});return pe()||(rr()?f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForFirefox")," ",d("a",{target:"_blank",href:"https://support.mozilla.org/zh-CN/kb/%E7%AE%A1%E7%90%86Firefox%E7%9A%84%E6%89%A9%E5%B1%95%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F",children:[l("help"),"?"]})]}):wo()||(f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForChrome"),"\xA0",d("a",{href:"#",onClick:m=>{m.preventDefault(),Z.tabs.create({url:"chrome://extensions/shortcuts"})},children:l("goSettings")})]}))),d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:l("shortcutSettingsTitle")})}),d("div",{children:d(f,{})}),g.map((m,h)=>d("article",{class:"mb-8",children:[d("div",{class:"text-gray-500 text-sm",children:l(`shortcutGroup.${m.name}`)}),m.shortcuts.map((y,T)=>Cs(rl,{...y,key:`shortcut-${T}`,onChange:(b,x)=>{n(w=>{if(y.type==="finger"){let M={...w.generalRule||{},[y.command]:b||"touchShortcutsOff"};return y.command==="touchShortcutsToggleTranslateTouchElement"&&b&&b!=="touchShortcutsOff"&&(M.touchShortcutsToggleTranslateTouchElementPreferenceKey=b),{...w,generalRule:M}}else if(y.type==="mouseHoverHoldKey"){let M={...w.generalRule||{},[y.command]:b||"Off"};return b!=="Off"&&(M.mouseHoverPreferenceKey=b),{...w,generalRule:M}}else{let L={...w?.shortcuts},M={...w,shortcuts:{...L,[y.command]:b}};return b||(M.shortcuts[y.command]=""),M}}),x||ut(l("saved"))}}))]},`shortcut-group-${h}`))]})})}p();function PM(){let[e,t]=K(null);return le(()=>{bt().then(n=>{t(n)})},[]),e}function Nh(){let[e,t,n,r,a]=$e(),i=PM(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:d(c,{})})});function c(){return le(()=>{e&&g()},[e]),d(xe,{children:d("div",{style:{width:"100%"},children:d("p",{children:[o("download_started")," ",d("a",{href:"#",class:"secondary",onClick:f=>{f.preventDefault(),g()},children:o("here")})]})})});function g(){let f=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(f,"immersive-translate-config-"+os()+".txt")}}}p();p();function OS(){return d("svg",{id:"svg",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0, 0, 400,400",children:d("g",{id:"svgg",children:[d("path",{id:"path0",d:"M116.705 75.100 L 116.600 89.000 88.900 89.103 L 61.200 89.205 61.200 137.600 L 61.200 185.995 88.900 186.097 L 116.600 186.200 116.704 207.100 L 116.807 228.000 130.604 228.000 L 144.400 228.000 144.400 207.000 L 144.400 186.000 172.200 186.000 L 200.000 186.000 200.000 137.600 L 200.000 89.200 172.200 89.200 L 144.400 89.200 144.400 75.200 L 144.400 61.200 130.605 61.200 L 116.810 61.200 116.705 75.100 M227.600 88.772 L 227.600 102.800 250.576 102.800 C 265.463 102.800,273.640 102.941,273.800 103.200 C 273.936 103.420,274.387 103.600,274.803 103.600 C 281.873 103.600,292.696 112.756,295.278 120.921 C 295.778 122.505,296.371 123.928,296.594 124.085 C 296.854 124.268,297.044 130.468,297.124 141.385 L 297.247 158.400 311.262 158.400 L 325.277 158.400 325.083 140.900 C 324.882 122.835,324.541 118.696,323.013 115.765 C 322.678 115.124,322.404 114.303,322.402 113.940 C 322.398 112.713,319.594 106.004,317.992 103.386 C 317.116 101.956,316.400 100.635,316.400 100.451 C 316.400 100.267,315.995 99.677,315.500 99.139 C 315.005 98.601,314.107 97.412,313.504 96.496 C 311.880 94.027,305.442 87.743,302.856 86.103 C 301.615 85.316,300.456 84.430,300.280 84.136 C 300.104 83.841,299.804 83.600,299.613 83.600 C 299.422 83.600,297.879 82.780,296.184 81.778 C 292.949 79.865,288.492 78.078,284.796 77.210 C 283.588 76.927,282.420 76.558,282.200 76.390 C 280.817 75.333,275.285 75.062,251.900 74.906 L 227.600 74.745 227.600 88.772 M116.600 137.600 L 116.600 158.200 102.700 158.305 L 88.800 158.410 88.800 137.600 L 88.800 116.790 102.700 116.895 L 116.600 117.000 116.600 137.600 M172.000 137.600 L 172.000 158.400 158.200 158.400 L 144.400 158.400 144.400 137.600 L 144.400 116.800 158.200 116.800 L 172.000 116.800 172.000 137.600 M255.091 172.900 C 254.773 174.314,252.711 179.778,252.412 180.000 C 252.263 180.110,251.461 182.090,250.628 184.400 C 249.795 186.710,248.891 188.960,248.619 189.400 C 248.166 190.130,246.935 193.348,245.328 198.000 C 244.986 198.990,244.579 199.890,244.424 200.000 C 244.269 200.110,243.461 202.090,242.628 204.400 C 241.795 206.710,240.891 208.960,240.619 209.400 C 240.166 210.130,238.935 213.348,237.328 218.000 C 236.986 218.990,236.579 219.890,236.424 220.000 C 236.269 220.110,235.461 222.090,234.628 224.400 C 233.795 226.710,232.891 228.960,232.619 229.400 C 232.166 230.130,230.935 233.348,229.328 238.000 C 228.986 238.990,228.579 239.890,228.424 240.000 C 228.269 240.110,227.461 242.090,226.628 244.400 C 225.795 246.710,224.883 248.969,224.600 249.421 C 224.317 249.872,223.808 251.042,223.468 252.021 C 221.781 256.882,220.655 259.819,220.412 260.000 C 220.263 260.110,219.461 262.090,218.628 264.400 C 217.795 266.710,216.883 268.969,216.600 269.421 C 216.317 269.872,215.808 271.042,215.468 272.021 C 213.781 276.882,212.655 279.819,212.412 280.000 C 212.263 280.110,211.461 282.090,210.628 284.400 C 209.795 286.710,208.891 288.960,208.619 289.400 C 208.166 290.130,206.935 293.348,205.328 298.000 C 204.986 298.990,204.579 299.890,204.424 300.000 C 204.269 300.110,203.461 302.090,202.628 304.400 C 201.795 306.710,200.891 308.960,200.619 309.400 C 200.166 310.130,198.935 313.348,197.328 318.000 C 196.986 318.990,196.583 319.890,196.433 320.000 C 196.191 320.178,194.400 324.617,194.400 325.040 C 194.400 325.133,201.186 325.162,209.480 325.105 L 224.560 325.000 225.465 322.471 C 225.963 321.079,226.659 319.369,227.011 318.671 C 227.637 317.428,230.057 311.085,230.587 309.300 C 230.734 308.805,231.001 308.400,231.180 308.400 C 231.360 308.400,231.597 307.995,231.708 307.500 C 231.993 306.224,234.272 300.138,235.022 298.649 C 235.639 297.423,238.062 291.071,238.587 289.300 C 238.734 288.805,239.022 288.400,239.227 288.400 C 239.432 288.400,239.600 288.145,239.600 287.833 C 239.600 287.521,239.954 286.441,240.386 285.433 L 241.172 283.600 269.531 283.600 L 297.891 283.600 298.546 285.313 C 298.906 286.256,299.200 287.175,299.200 287.355 C 299.200 287.536,299.629 288.537,300.152 289.580 C 300.676 290.623,301.788 293.349,302.623 295.638 C 303.458 297.927,304.269 299.890,304.424 300.000 C 304.579 300.110,304.987 301.010,305.331 302.000 C 306.989 306.773,307.765 308.786,308.800 311.000 C 310.009 313.586,311.554 317.639,311.888 319.100 C 312.001 319.595,312.238 320.000,312.416 320.000 C 312.593 320.000,312.945 320.675,313.198 321.500 C 313.452 322.325,313.847 323.495,314.078 324.100 L 314.497 325.200 329.449 325.200 C 346.303 325.200,345.174 325.457,343.448 322.020 C 342.924 320.977,341.812 318.251,340.977 315.962 C 340.142 313.673,339.337 311.710,339.188 311.600 C 338.945 311.419,337.819 308.482,336.132 303.621 C 335.792 302.642,335.283 301.472,335.000 301.021 C 334.717 300.569,333.805 298.310,332.972 296.000 C 332.139 293.690,331.337 291.710,331.188 291.600 C 330.945 291.419,329.819 288.482,328.132 283.621 C 327.792 282.642,327.283 281.472,327.000 281.021 C 326.717 280.569,325.805 278.310,324.972 276.000 C 324.139 273.690,323.337 271.710,323.188 271.600 C 322.945 271.419,321.819 268.482,320.132 263.621 C 319.792 262.642,319.283 261.472,319.000 261.021 C 318.717 260.569,317.805 258.310,316.972 256.000 C 316.139 253.690,315.337 251.710,315.188 251.600 C 314.945 251.419,313.819 248.482,312.132 243.621 C 311.792 242.642,311.283 241.472,311.000 241.021 C 310.717 240.569,309.805 238.310,308.972 236.000 C 308.139 233.690,307.337 231.710,307.188 231.600 C 306.945 231.419,305.819 228.482,304.132 223.621 C 303.792 222.642,303.283 221.472,303.000 221.021 C 302.717 220.569,301.805 218.310,300.972 216.000 C 300.139 213.690,299.331 211.710,299.176 211.600 C 299.021 211.490,298.614 210.590,298.272 209.600 C 296.665 204.948,295.434 201.730,294.981 201.000 C 294.709 200.560,293.805 198.310,292.972 196.000 C 292.139 193.690,291.331 191.710,291.176 191.600 C 291.021 191.490,290.614 190.590,290.272 189.600 C 288.667 184.953,287.434 181.730,286.982 181.000 C 286.710 180.560,285.905 178.580,285.192 176.600 C 284.480 174.620,283.718 172.775,283.500 172.500 C 283.195 172.117,279.842 172.000,269.198 172.000 L 255.293 172.000 255.091 172.900 M270.342 214.500 C 270.978 216.680,272.184 219.788,272.480 220.011 C 272.634 220.128,273.474 222.198,274.346 224.611 C 275.218 227.025,276.219 229.562,276.570 230.249 C 277.192 231.467,279.455 237.406,279.904 239.000 C 280.028 239.440,280.272 239.895,280.445 240.011 C 280.618 240.128,281.479 242.228,282.357 244.679 C 283.235 247.131,284.144 249.465,284.377 249.868 C 285.100 251.118,286.400 254.437,286.400 255.033 C 286.400 255.513,283.802 255.600,269.400 255.600 C 260.050 255.600,252.400 255.506,252.400 255.392 C 252.400 255.278,252.850 254.077,253.400 252.723 C 253.950 251.370,254.400 250.036,254.400 249.760 C 254.400 249.483,254.637 249.019,254.928 248.729 C 255.218 248.438,255.560 247.840,255.688 247.400 C 256.167 245.754,258.416 239.852,259.022 238.649 C 259.639 237.423,262.062 231.071,262.587 229.300 C 262.734 228.805,263.001 228.400,263.180 228.400 C 263.360 228.400,263.597 227.995,263.708 227.500 C 264.027 226.071,266.188 220.398,267.344 217.955 C 267.925 216.727,268.400 215.617,268.400 215.487 C 268.400 213.445,269.823 212.722,270.342 214.500 M74.908 258.900 C 75.078 275.176,75.446 280.965,76.390 282.200 C 76.558 282.420,76.925 283.590,77.205 284.800 C 78.005 288.246,79.979 293.127,81.870 296.333 C 82.821 297.946,83.600 299.422,83.600 299.613 C 83.600 299.804,83.841 300.104,84.136 300.280 C 84.430 300.456,85.316 301.615,86.103 302.856 C 87.894 305.679,94.229 312.056,96.838 313.661 C 97.917 314.325,98.800 315.003,98.800 315.167 C 98.800 315.331,99.295 315.718,99.900 316.027 C 100.505 316.336,102.122 317.262,103.493 318.086 C 106.058 319.626,112.767 322.398,113.940 322.402 C 114.303 322.404,115.124 322.678,115.765 323.013 C 118.974 324.686,122.332 324.902,147.900 325.085 L 172.400 325.259 172.400 311.245 L 172.400 297.230 148.585 297.115 C 133.034 297.040,124.671 296.859,124.485 296.593 C 124.328 296.370,123.304 295.955,122.210 295.671 C 113.434 293.396,105.109 284.270,103.791 275.479 C 103.635 274.440,103.348 273.492,103.154 273.371 C 102.958 273.251,102.800 266.091,102.800 257.376 L 102.800 241.600 88.764 241.600 L 74.728 241.600 74.908 258.900 ",stroke:"none",fill:"#fcfcfc","fill-rule":"evenodd"}),d("path",{id:"path1",d:"M47.411 2.664 C 45.657 2.981,44.127 3.372,44.011 3.533 C 43.895 3.694,42.810 4.067,41.600 4.362 C 38.910 5.017,33.083 7.195,32.777 7.660 C 32.654 7.847,31.304 8.616,29.777 9.371 C 28.249 10.125,26.280 11.385,25.400 12.171 C 24.520 12.956,23.626 13.600,23.412 13.600 C 23.006 13.600,21.491 14.969,18.277 18.242 C 14.870 21.711,14.144 22.565,12.961 24.499 C 12.323 25.544,11.674 26.399,11.519 26.399 C 11.365 26.400,10.466 27.975,9.521 29.900 C 8.576 31.825,7.581 33.634,7.309 33.921 C 6.749 34.512,4.509 41.424,4.141 43.700 C 4.007 44.525,3.763 45.200,3.598 45.200 C 2.468 45.200,2.400 53.950,2.400 200.400 C 2.400 348.123,2.460 355.600,3.649 355.600 C 3.842 355.600,4.000 355.940,4.000 356.355 C 4.000 358.391,6.974 367.200,7.661 367.200 C 7.847 367.200,8.001 367.425,8.002 367.700 C 8.005 368.559,10.815 373.724,11.832 374.741 C 12.364 375.273,12.800 375.918,12.800 376.174 C 12.800 377.128,22.380 387.200,23.288 387.200 C 23.493 387.200,24.161 387.695,24.771 388.300 C 25.381 388.905,26.852 389.918,28.040 390.551 C 29.228 391.184,30.290 391.836,30.400 392.000 C 30.632 392.346,33.327 393.596,36.432 394.797 C 37.625 395.259,39.175 395.902,39.877 396.226 C 40.580 396.550,42.830 397.214,44.877 397.701 L 48.600 398.585 199.200 398.710 C 307.771 398.799,350.693 398.711,353.000 398.391 C 357.180 397.813,362.564 396.484,362.733 395.990 C 362.807 395.775,363.127 395.600,363.445 395.600 C 364.500 395.600,370.951 392.776,371.600 392.030 C 371.710 391.904,372.430 391.462,373.200 391.049 C 376.487 389.286,377.434 388.693,378.000 388.045 C 378.330 387.668,379.320 386.837,380.200 386.198 C 382.889 384.248,388.894 377.717,389.891 375.657 C 390.221 374.976,390.875 373.991,391.345 373.467 C 392.202 372.513,393.857 369.363,394.814 366.866 C 395.095 366.132,395.535 365.322,395.790 365.066 C 396.421 364.434,398.247 357.808,398.993 353.448 C 399.919 348.029,399.914 52.728,398.988 47.352 C 398.229 42.949,396.410 36.400,395.945 36.400 C 395.755 36.400,395.600 36.231,395.600 36.024 C 395.600 35.238,392.306 28.585,391.766 28.280 C 391.455 28.104,391.200 27.786,391.200 27.574 C 391.200 26.249,386.178 20.048,381.967 16.174 C 379.417 13.828,373.665 9.784,371.800 9.025 C 370.920 8.667,370.020 8.154,369.800 7.886 C 369.101 7.034,360.812 4.018,359.133 4.005 C 358.767 4.002,358.407 3.827,358.333 3.616 C 357.735 1.894,56.765 0.972,47.411 2.664 M144.705 74.900 L 144.810 88.800 172.405 88.800 L 200.000 88.800 200.000 137.600 L 200.000 186.400 172.400 186.400 L 144.800 186.400 144.800 207.200 L 144.800 228.000 130.600 228.000 L 116.400 228.000 116.400 207.200 L 116.400 186.400 88.600 186.400 L 60.800 186.400 60.800 137.600 L 60.800 88.800 88.600 88.800 L 116.400 88.800 116.400 74.795 L 116.400 60.790 130.500 60.895 L 144.600 61.000 144.705 74.900 M277.400 75.067 C 277.840 75.324,279.820 75.825,281.800 76.181 C 285.920 76.920,291.600 78.689,291.600 79.233 C 291.600 79.435,291.873 79.600,292.206 79.600 C 292.912 79.600,299.079 82.679,299.271 83.127 C 299.342 83.294,300.210 83.900,301.200 84.475 C 305.072 86.723,313.353 94.921,315.225 98.359 C 315.568 98.990,316.158 99.815,316.536 100.193 C 318.699 102.356,323.995 115.750,323.999 119.067 C 324.000 119.543,324.164 119.993,324.364 120.067 C 325.126 120.346,325.600 129.481,325.600 143.869 L 325.600 158.800 311.200 158.800 L 296.800 158.800 296.800 143.055 C 296.800 124.194,296.908 124.966,293.169 117.022 C 291.290 113.028,285.600 107.884,280.800 105.838 C 279.370 105.229,277.570 104.431,276.800 104.065 C 275.552 103.472,272.799 103.387,251.500 103.282 L 227.600 103.165 227.600 88.753 L 227.600 74.341 252.100 74.470 C 269.857 74.564,276.820 74.729,277.400 75.067 M89.200 137.600 L 89.200 158.000 102.800 158.000 L 116.400 158.000 116.400 137.600 L 116.400 117.200 102.800 117.200 L 89.200 117.200 89.200 137.600 M144.800 137.600 L 144.800 158.000 158.400 158.000 L 172.000 158.000 172.000 137.600 L 172.000 117.200 158.400 117.200 L 144.800 117.200 144.800 137.600 M284.742 174.500 C 285.378 175.875,286.301 178.170,286.792 179.600 C 287.284 181.030,287.917 182.569,288.200 183.021 C 288.483 183.472,288.994 184.642,289.335 185.621 C 291.027 190.467,291.767 192.393,292.787 194.597 C 293.398 195.919,294.301 198.170,294.792 199.600 C 295.284 201.030,295.917 202.569,296.200 203.021 C 296.483 203.472,296.994 204.642,297.335 205.621 C 299.027 210.467,299.767 212.393,300.787 214.597 C 301.398 215.919,302.301 218.170,302.792 219.600 C 303.284 221.030,303.917 222.569,304.200 223.021 C 304.483 223.472,304.994 224.642,305.335 225.621 C 307.027 230.467,307.767 232.393,308.787 234.597 C 309.398 235.919,310.301 238.170,310.792 239.600 C 311.284 241.030,311.917 242.569,312.200 243.021 C 312.483 243.472,312.994 244.642,313.335 245.621 C 315.027 250.467,315.767 252.393,316.787 254.597 C 317.398 255.919,318.301 258.170,318.792 259.600 C 319.284 261.030,319.917 262.569,320.200 263.021 C 320.483 263.472,320.994 264.642,321.335 265.621 C 323.027 270.467,323.767 272.393,324.787 274.597 C 325.398 275.919,326.301 278.170,326.792 279.600 C 327.284 281.030,327.917 282.569,328.200 283.021 C 328.483 283.472,328.994 284.642,329.335 285.621 C 331.027 290.467,331.767 292.393,332.787 294.597 C 333.398 295.919,334.301 298.170,334.792 299.600 C 335.284 301.030,335.917 302.569,336.200 303.021 C 336.483 303.472,336.994 304.642,337.335 305.621 C 339.027 310.467,339.767 312.393,340.787 314.597 C 341.398 315.919,342.304 318.170,342.799 319.600 C 343.295 321.030,343.975 322.675,344.310 323.255 C 345.685 325.635,345.908 325.600,329.282 325.600 L 314.138 325.600 313.016 322.300 C 312.399 320.485,311.676 318.640,311.410 318.200 C 311.144 317.760,310.165 315.423,309.234 313.006 C 308.304 310.590,307.395 308.430,307.215 308.206 C 307.034 307.983,306.609 306.990,306.269 306.000 C 304.673 301.355,303.463 298.161,303.149 297.761 C 302.959 297.520,302.082 295.377,301.200 293.000 C 300.318 290.623,299.435 288.480,299.236 288.239 C 299.038 287.998,298.568 286.855,298.192 285.700 L 297.508 283.600 269.566 283.600 L 241.625 283.600 240.633 285.700 C 240.087 286.855,238.983 289.600,238.178 291.800 C 237.373 294.000,236.583 295.890,236.422 296.000 C 236.261 296.110,236.028 296.560,235.904 297.000 C 235.462 298.571,233.200 304.513,232.425 306.142 C 231.992 307.054,230.979 309.600,230.176 311.800 C 229.372 314.000,228.583 315.890,228.422 316.000 C 228.261 316.110,228.028 316.560,227.904 317.000 C 227.349 318.970,225.160 324.566,224.753 325.057 C 224.144 325.790,194.000 325.870,194.000 325.139 C 194.000 324.885,194.433 323.760,194.963 322.639 C 195.849 320.762,196.618 318.753,198.269 314.000 C 198.613 313.010,199.021 312.110,199.176 312.000 C 199.331 311.890,200.139 309.910,200.972 307.600 C 201.805 305.290,202.717 303.031,203.000 302.579 C 203.283 302.128,203.792 300.958,204.132 299.979 C 205.819 295.118,206.945 292.181,207.188 292.000 C 207.337 291.890,208.139 289.910,208.972 287.600 C 209.805 285.290,210.709 283.040,210.981 282.600 C 211.434 281.870,212.665 278.652,214.272 274.000 C 214.614 273.010,215.021 272.110,215.176 272.000 C 215.331 271.890,216.139 269.910,216.972 267.600 C 217.805 265.290,218.717 263.031,219.000 262.579 C 219.283 262.128,219.792 260.958,220.132 259.979 C 221.819 255.118,222.945 252.181,223.188 252.000 C 223.337 251.890,224.139 249.910,224.972 247.600 C 225.805 245.290,226.717 243.031,227.000 242.579 C 227.283 242.128,227.792 240.958,228.132 239.979 C 229.819 235.118,230.945 232.181,231.188 232.000 C 231.337 231.890,232.139 229.910,232.972 227.600 C 233.805 225.290,234.709 223.040,234.981 222.600 C 235.434 221.870,236.665 218.652,238.272 214.000 C 238.614 213.010,239.021 212.110,239.176 212.000 C 239.331 211.890,240.139 209.910,240.972 207.600 C 241.805 205.290,242.717 203.031,243.000 202.579 C 243.283 202.128,243.792 200.958,244.132 199.979 C 245.819 195.118,246.945 192.181,247.188 192.000 C 247.337 191.890,248.139 189.910,248.972 187.600 C 249.805 185.290,250.709 183.040,250.981 182.600 C 251.463 181.823,253.007 177.762,254.290 173.900 L 254.922 172.000 269.253 172.000 L 283.584 172.000 284.742 174.500 M269.200 214.548 C 269.200 214.875,268.963 215.381,268.672 215.671 C 268.382 215.962,268.040 216.560,267.912 217.000 C 267.427 218.664,265.182 224.551,264.425 226.142 C 263.992 227.054,262.979 229.600,262.176 231.800 C 261.372 234.000,260.583 235.890,260.422 236.000 C 260.261 236.110,260.028 236.560,259.904 237.000 C 259.462 238.569,257.200 244.513,256.426 246.142 C 255.992 247.054,255.012 249.510,254.248 251.600 L 252.860 255.400 269.292 255.504 C 278.330 255.562,285.804 255.529,285.902 255.432 C 285.999 255.334,285.594 253.937,285.001 252.327 C 284.409 250.717,283.822 249.040,283.697 248.600 C 283.572 248.160,283.328 247.705,283.155 247.589 C 282.982 247.472,282.126 245.402,281.254 242.989 C 280.382 240.575,279.381 238.038,279.030 237.351 C 278.408 236.133,276.145 230.194,275.696 228.600 C 275.572 228.160,275.328 227.705,275.155 227.589 C 274.982 227.472,274.125 225.402,273.251 222.989 C 272.376 220.575,271.288 217.844,270.831 216.919 C 270.374 215.995,270.000 215.061,270.000 214.843 C 270.000 214.625,269.820 214.336,269.600 214.200 C 269.380 214.064,269.200 214.221,269.200 214.548 M103.200 256.745 C 103.200 271.263,103.434 275.394,104.370 277.400 C 104.576 277.840,105.239 279.370,105.845 280.800 C 107.787 285.385,113.002 291.278,116.618 292.972 C 117.488 293.380,119.100 294.145,120.200 294.673 C 124.060 296.526,124.345 296.547,149.000 296.778 L 172.600 297.000 172.600 311.200 L 172.600 325.400 151.400 325.522 C 130.794 325.641,120.383 325.260,120.067 324.374 C 119.993 324.168,119.543 324.000,119.067 323.999 C 115.750 323.995,102.356 318.699,100.193 316.536 C 99.815 316.158,98.990 315.568,98.359 315.225 C 94.897 313.340,86.661 305.008,84.496 301.200 C 83.934 300.210,83.261 299.220,83.001 299.000 C 82.404 298.494,79.600 292.826,79.600 292.124 C 79.600 291.836,79.435 291.600,79.233 291.600 C 78.689 291.600,76.920 285.920,76.181 281.800 C 75.825 279.820,75.327 277.840,75.073 277.400 C 74.749 276.839,74.568 271.314,74.467 258.900 L 74.324 241.200 88.762 241.200 L 103.200 241.200 103.200 256.745 ",stroke:"none",fill:"#ec4c8c","fill-rule":"evenodd"}),d("path",{id:"path2",d:"",stroke:"none",fill:"#f4d4100","fill-rule":"evenodd"}),d("path",{id:"path3",d:"M235.600 74.690 C 256.786 74.968,273.107 74.972,272.938 74.700 C 272.836 74.535,262.548 74.441,250.076 74.491 C 237.604 74.542,231.090 74.631,235.600 74.690 M286.800 77.414 C 286.800 77.693,289.706 78.831,290.091 78.703 C 290.282 78.639,289.620 78.284,288.619 77.913 C 287.619 77.542,286.800 77.317,286.800 77.414 M302.400 85.290 C 302.400 85.377,303.435 86.328,304.700 87.403 C 305.965 88.479,306.640 88.944,306.200 88.436 C 305.364 87.471,302.400 85.017,302.400 85.290 M308.783 90.900 C 310.441 92.666,310.800 92.984,310.800 92.683 C 310.800 92.619,309.945 91.764,308.900 90.783 L 307.000 89.000 308.783 90.900 M312.597 95.300 C 313.672 96.565,314.623 97.600,314.710 97.600 C 314.983 97.600,312.529 94.636,311.564 93.800 C 311.056 93.360,311.521 94.035,312.597 95.300 M321.200 109.884 C 321.200 110.451,322.363 113.200,322.602 113.200 C 322.707 113.200,322.496 112.435,322.132 111.500 C 321.395 109.607,321.200 109.269,321.200 109.884 M88.994 137.400 L 89.000 158.200 102.700 158.208 L 116.400 158.216 102.804 158.103 L 89.207 157.990 89.098 137.295 L 88.989 116.600 88.994 137.400 M324.641 122.800 C 324.839 123.130,325.109 131.320,325.243 141.000 L 325.485 158.600 325.443 140.920 C 325.407 126.341,325.302 123.148,324.841 122.720 C 324.377 122.288,324.343 122.301,324.641 122.800 M151.074 158.299 C 154.855 158.365,161.155 158.365,165.074 158.299 C 168.993 158.234,165.900 158.180,158.200 158.180 C 150.500 158.180,147.293 158.234,151.074 158.299 M253.700 175.700 C 253.270 176.875,253.280 176.926,253.812 176.224 C 254.321 175.552,254.621 174.400,254.288 174.400 C 254.226 174.400,253.961 174.985,253.700 175.700 M250.196 184.272 C 249.858 185.081,249.633 185.900,249.697 186.091 C 249.761 186.282,250.116 185.620,250.487 184.619 C 251.293 182.445,251.070 182.179,250.196 184.272 M74.729 186.300 C 82.500 186.361,95.100 186.361,102.729 186.300 C 110.358 186.239,104.000 186.189,88.600 186.189 C 73.200 186.189,66.958 186.239,74.729 186.300 M158.500 186.300 C 166.145 186.361,178.655 186.361,186.300 186.300 C 193.945 186.239,187.690 186.189,172.400 186.189 C 157.110 186.189,150.855 186.239,158.500 186.300 M289.200 186.284 C 289.200 186.851,290.363 189.600,290.602 189.600 C 290.707 189.600,290.496 188.835,290.132 187.900 C 289.395 186.007,289.200 185.669,289.200 186.284 M245.700 195.700 C 245.270 196.875,245.280 196.926,245.812 196.224 C 246.321 195.552,246.621 194.400,246.288 194.400 C 246.226 194.400,245.961 194.985,245.700 195.700 M242.196 204.272 C 241.858 205.081,241.633 205.900,241.697 206.091 C 241.761 206.282,242.116 205.620,242.487 204.619 C 243.293 202.445,243.070 202.179,242.196 204.272 M297.200 206.284 C 297.200 206.851,298.363 209.600,298.602 209.600 C 298.707 209.600,298.496 208.835,298.132 207.900 C 297.395 206.007,297.200 205.669,297.200 206.284 M237.700 215.700 C 237.270 216.875,237.280 216.926,237.812 216.224 C 238.321 215.552,238.621 214.400,238.288 214.400 C 238.226 214.400,237.961 214.985,237.700 215.700 M270.032 214.824 C 270.014 215.166,270.280 215.796,270.622 216.224 C 271.234 216.988,271.238 216.987,270.876 216.200 C 270.674 215.760,270.408 215.130,270.286 214.800 C 270.093 214.282,270.059 214.285,270.032 214.824 M265.267 223.180 C 265.033 223.851,264.927 224.400,265.031 224.400 C 265.301 224.400,266.056 222.322,265.857 222.124 C 265.767 222.033,265.501 222.508,265.267 223.180 M234.196 224.272 C 233.858 225.081,233.633 225.900,233.697 226.091 C 233.761 226.282,234.116 225.620,234.487 224.619 C 235.293 222.445,235.070 222.179,234.196 224.272 M273.913 224.619 C 274.284 225.620,274.639 226.282,274.703 226.091 C 274.831 225.706,273.693 222.800,273.414 222.800 C 273.317 222.800,273.542 223.619,273.913 224.619 M305.200 226.284 C 305.200 226.851,306.363 229.600,306.602 229.600 C 306.707 229.600,306.496 228.835,306.132 227.900 C 305.395 226.007,305.200 225.669,305.200 226.284 M261.756 231.843 C 261.424 232.637,261.226 233.359,261.314 233.448 C 261.403 233.536,261.759 232.887,262.105 232.004 C 262.889 230.009,262.582 229.868,261.756 231.843 M229.700 235.700 C 229.270 236.875,229.280 236.926,229.812 236.224 C 230.321 235.552,230.621 234.400,230.288 234.400 C 230.226 234.400,229.961 234.985,229.700 235.700 M278.032 234.824 C 278.014 235.166,278.280 235.796,278.622 236.224 C 279.234 236.988,279.238 236.987,278.876 236.200 C 278.674 235.760,278.408 235.130,278.286 234.800 C 278.093 234.282,278.059 234.285,278.032 234.824 M309.113 236.219 C 309.484 237.220,309.839 237.882,309.903 237.691 C 310.031 237.306,308.893 234.400,308.614 234.400 C 308.517 234.400,308.742 235.219,309.113 236.219 M74.488 257.076 C 74.440 265.698,74.535 272.836,74.700 272.939 C 74.973 273.108,74.967 261.235,74.687 247.000 C 74.626 243.920,74.537 248.454,74.488 257.076 M257.267 243.180 C 257.033 243.851,256.927 244.400,257.031 244.400 C 257.301 244.400,258.056 242.322,257.857 242.124 C 257.767 242.033,257.501 242.508,257.267 243.180 M226.196 244.272 C 225.858 245.081,225.633 245.900,225.697 246.091 C 225.761 246.282,226.116 245.620,226.487 244.619 C 227.293 242.445,227.070 242.179,226.196 244.272 M281.913 244.619 C 282.284 245.620,282.639 246.282,282.703 246.091 C 282.831 245.706,281.693 242.800,281.414 242.800 C 281.317 242.800,281.542 243.619,281.913 244.619 M313.200 246.284 C 313.200 246.851,314.363 249.600,314.602 249.600 C 314.707 249.600,314.496 248.835,314.132 247.900 C 313.395 246.007,313.200 245.669,313.200 246.284 M253.756 251.843 C 253.424 252.637,253.226 253.359,253.314 253.448 C 253.403 253.536,253.759 252.887,254.105 252.004 C 254.889 250.009,254.582 249.868,253.756 251.843 M221.700 255.700 C 221.270 256.875,221.280 256.926,221.812 256.224 C 222.321 255.552,222.621 254.400,222.288 254.400 C 222.226 254.400,221.961 254.985,221.700 255.700 M317.113 256.219 C 317.484 257.220,317.839 257.882,317.903 257.691 C 318.031 257.306,316.893 254.400,316.614 254.400 C 316.517 254.400,316.742 255.219,317.113 256.219 M218.196 264.272 C 217.858 265.081,217.633 265.900,217.697 266.091 C 217.761 266.282,218.116 265.620,218.487 264.619 C 219.293 262.445,219.070 262.179,218.196 264.272 M321.200 266.284 C 321.200 266.851,322.363 269.600,322.602 269.600 C 322.707 269.600,322.496 268.835,322.132 267.900 C 321.395 266.007,321.200 265.669,321.200 266.284 M213.700 275.700 C 213.270 276.875,213.280 276.926,213.812 276.224 C 214.321 275.552,214.621 274.400,214.288 274.400 C 214.226 274.400,213.961 274.985,213.700 275.700 M325.113 276.219 C 325.484 277.220,325.839 277.882,325.903 277.691 C 326.031 277.306,324.893 274.400,324.614 274.400 C 324.517 274.400,324.742 275.219,325.113 276.219 M105.007 279.879 C 105.607 281.314,106.000 281.962,106.000 281.516 C 106.000 281.084,104.785 278.400,104.589 278.400 C 104.479 278.400,104.667 279.066,105.007 279.879 M210.196 284.272 C 209.858 285.081,209.633 285.900,209.697 286.091 C 209.761 286.282,210.116 285.620,210.487 284.619 C 211.293 282.445,211.070 282.179,210.196 284.272 M329.200 286.284 C 329.200 286.851,330.363 289.600,330.602 289.600 C 330.707 289.600,330.496 288.835,330.132 287.900 C 329.395 286.007,329.200 285.669,329.200 286.284 M77.913 288.619 C 78.284 289.620,78.639 290.282,78.703 290.091 C 78.831 289.706,77.693 286.800,77.414 286.800 C 77.317 286.800,77.542 287.619,77.913 288.619 M237.756 291.843 C 237.424 292.637,237.226 293.359,237.314 293.448 C 237.403 293.536,237.759 292.887,238.105 292.004 C 238.889 290.009,238.582 289.868,237.756 291.843 M301.600 293.884 C 301.600 294.451,302.763 297.200,303.002 297.200 C 303.107 297.200,302.896 296.435,302.532 295.500 C 301.795 293.607,301.600 293.269,301.600 293.884 M205.700 295.700 C 205.270 296.875,205.280 296.926,205.812 296.224 C 206.321 295.552,206.621 294.400,206.288 294.400 C 206.226 294.400,205.961 294.985,205.700 295.700 M333.113 296.219 C 333.484 297.220,333.839 297.882,333.903 297.691 C 334.031 297.306,332.893 294.400,332.614 294.400 C 332.517 294.400,332.742 295.219,333.113 296.219 M233.095 303.596 C 232.748 304.478,232.549 305.200,232.653 305.200 C 232.923 305.200,234.078 302.345,233.886 302.152 C 233.797 302.064,233.441 302.713,233.095 303.596 M86.322 303.900 C 86.977 304.725,87.928 305.760,88.436 306.200 C 88.944 306.640,88.479 305.965,87.403 304.700 C 85.213 302.124,84.490 301.589,86.322 303.900 M202.196 304.272 C 201.858 305.081,201.633 305.900,201.697 306.091 C 201.761 306.282,202.116 305.620,202.487 304.619 C 203.293 302.445,203.070 302.179,202.196 304.272 M305.524 303.800 C 305.726 304.240,305.992 304.870,306.114 305.200 C 306.307 305.718,306.341 305.715,306.368 305.176 C 306.386 304.834,306.120 304.204,305.778 303.776 C 305.166 303.012,305.162 303.013,305.524 303.800 M337.200 306.284 C 337.200 306.851,338.363 309.600,338.602 309.600 C 338.707 309.600,338.496 308.835,338.132 307.900 C 337.395 306.007,337.200 305.669,337.200 306.284 M90.783 308.900 C 91.764 309.945,92.619 310.800,92.683 310.800 C 92.984 310.800,92.666 310.441,90.900 308.783 L 89.000 307.000 90.783 308.900 M229.756 311.843 C 229.424 312.637,229.226 313.359,229.314 313.448 C 229.403 313.536,229.759 312.887,230.105 312.004 C 230.889 310.009,230.582 309.868,229.756 311.843 M93.800 311.564 C 94.636 312.529,97.600 314.983,97.600 314.710 C 97.600 314.623,96.565 313.672,95.300 312.597 C 94.035 311.521,93.360 311.056,93.800 311.564 M197.700 315.700 C 197.270 316.875,197.280 316.926,197.812 316.224 C 198.321 315.552,198.621 314.400,198.288 314.400 C 198.226 314.400,197.961 314.985,197.700 315.700 M310.032 314.824 C 310.014 315.166,310.280 315.796,310.622 316.224 C 311.234 316.988,311.238 316.987,310.876 316.200 C 310.674 315.760,310.408 315.130,310.286 314.800 C 310.093 314.282,310.059 314.285,310.032 314.824 M341.113 316.219 C 341.484 317.220,341.839 317.882,341.903 317.691 C 342.031 317.306,340.893 314.400,340.614 314.400 C 340.517 314.400,340.742 315.219,341.113 316.219 M109.633 321.335 C 110.019 321.647,113.200 322.777,113.200 322.602 C 113.200 322.363,110.451 321.200,109.884 321.200 C 109.655 321.200,109.542 321.261,109.633 321.335 M225.095 323.596 L 224.464 325.200 209.432 325.200 C 201.164 325.200,194.400 325.122,194.400 325.026 C 194.400 324.930,194.591 324.345,194.825 323.726 C 195.109 322.974,195.113 322.736,194.837 323.009 C 194.609 323.233,194.373 323.863,194.311 324.409 L 194.200 325.400 209.400 325.400 L 224.600 325.400 225.344 323.877 C 225.753 323.040,226.006 322.273,225.906 322.173 C 225.806 322.073,225.441 322.713,225.095 323.596 M313.791 324.300 L 314.421 325.600 329.510 325.505 L 344.600 325.410 329.500 325.300 C 321.195 325.240,314.400 325.047,314.400 324.872 C 314.400 324.696,314.121 324.204,313.781 323.776 C 313.234 323.091,313.235 323.152,313.791 324.300 M127.143 325.303 C 127.310 325.470,137.606 325.560,150.023 325.503 L 172.600 325.400 149.720 325.200 C 137.136 325.090,126.976 325.137,127.143 325.303 ",stroke:"none",fill:"#f478c8","fill-rule":"evenodd"}),d("path",{id:"path4",d:"M144.580 75.000 C 144.580 82.700,144.634 85.793,144.699 81.874 C 144.765 77.955,144.765 71.655,144.699 67.874 C 144.634 64.093,144.580 67.300,144.580 75.000 M274.100 75.087 C 274.705 75.178,275.695 75.178,276.300 75.087 C 276.905 74.995,276.410 74.920,275.200 74.920 C 273.990 74.920,273.495 74.995,274.100 75.087 M95.900 117.099 C 99.695 117.165,105.905 117.165,109.700 117.099 C 113.495 117.034,110.390 116.980,102.800 116.980 C 95.210 116.980,92.105 117.034,95.900 117.099 M144.583 117.300 C 144.478 117.575,144.440 126.890,144.500 138.000 L 144.608 158.200 144.704 137.705 L 144.800 117.211 158.500 117.100 L 172.200 116.989 158.487 116.895 C 147.816 116.821,144.732 116.911,144.583 117.300 M324.493 121.200 C 324.493 121.970,324.575 122.285,324.676 121.900 C 324.776 121.515,324.776 120.885,324.676 120.500 C 324.575 120.115,324.493 120.430,324.493 121.200 M288.429 184.310 C 288.676 185.020,289.042 185.703,289.242 185.826 C 289.442 185.950,289.391 185.544,289.127 184.925 C 288.421 183.265,287.906 182.812,288.429 184.310 M144.586 207.200 C 144.586 218.750,144.637 223.475,144.700 217.700 C 144.762 211.925,144.762 202.475,144.700 196.700 C 144.637 190.925,144.586 195.650,144.586 207.200 M296.429 204.310 C 296.676 205.020,297.042 205.703,297.242 205.826 C 297.442 205.950,297.391 205.544,297.127 204.925 C 296.421 203.265,295.906 202.812,296.429 204.310 M268.779 214.655 C 268.558 215.236,268.464 215.797,268.569 215.903 C 268.675 216.008,268.879 215.624,269.023 215.050 C 269.170 214.465,269.470 214.120,269.704 214.265 C 269.949 214.416,270.005 214.331,269.838 214.062 C 269.416 213.379,269.223 213.487,268.779 214.655 M304.429 224.310 C 304.676 225.020,305.042 225.703,305.242 225.826 C 305.442 225.950,305.391 225.544,305.127 224.925 C 304.421 223.265,303.906 222.812,304.429 224.310 M260.779 234.655 C 260.558 235.236,260.452 235.785,260.543 235.876 C 260.633 235.967,260.899 235.492,261.133 234.820 C 261.653 233.328,261.339 233.182,260.779 234.655 M74.920 275.200 C 74.920 276.410,74.995 276.905,75.087 276.300 C 75.178 275.695,75.178 274.705,75.087 274.100 C 74.995 273.495,74.920 273.990,74.920 275.200 M172.580 311.200 C 172.580 319.010,172.634 322.205,172.699 318.300 C 172.765 314.395,172.765 308.005,172.699 304.100 C 172.634 300.195,172.580 303.390,172.580 311.200 M107.200 320.179 C 107.200 320.289,107.740 320.659,108.400 321.000 C 109.060 321.341,109.600 321.531,109.600 321.421 C 109.600 321.311,109.060 320.941,108.400 320.600 C 107.740 320.259,107.200 320.069,107.200 320.179 M120.500 324.676 C 120.885 324.776,121.515 324.776,121.900 324.676 C 122.285 324.575,121.970 324.493,121.200 324.493 C 120.430 324.493,120.115 324.575,120.500 324.676 M123.700 325.087 C 124.305 325.178,125.295 325.178,125.900 325.087 C 126.505 324.995,126.010 324.920,124.800 324.920 C 123.590 324.920,123.095 324.995,123.700 325.087 ",stroke:"none",fill:"#f47c8c","fill-rule":"evenodd"})]})})}function zS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9091 2H7.04546C6.50297 2 5.9827 2.2155 5.5991 2.5991C5.2155 2.9827 5 3.50297 5 4.04546V17.9545C5 18.497 5.2155 19.0173 5.5991 19.4009C5.9827 19.7845 6.50297 20 7.04546 20H15.9091C16.4515 20 16.9718 19.7845 17.3554 19.4009C17.739 19.0173 17.9545 18.497 17.9545 17.9545V4.04546C17.9545 3.50297 17.739 2.9827 17.3554 2.5991C16.9718 2.2155 16.4516 2 15.9091 2ZM7.04546 3.36364H15.9091C16.0899 3.36364 16.2633 3.43548 16.3912 3.56334C16.519 3.69121 16.5909 3.86463 16.5909 4.04546V14.2727H6.36362V4.04546C6.36362 3.86463 6.43546 3.69121 6.56332 3.56334C6.69119 3.43548 6.86461 3.36364 7.04544 3.36364H7.04546ZM15.9091 18.6364H7.04546C6.95592 18.6364 6.86726 18.6187 6.78454 18.5845C6.70182 18.5502 6.62665 18.5 6.56334 18.4367C6.50003 18.3733 6.44981 18.2982 6.41554 18.2155C6.38128 18.1327 6.36364 18.0441 6.36364 17.9545V15.6364H16.5909V17.9545C16.5909 18.1354 16.5191 18.3088 16.3912 18.4367C16.2633 18.5645 16.0899 18.6364 15.9091 18.6364H15.9091ZM9.50007 6.09103H13.591C13.7718 6.09103 13.9452 6.01919 14.0731 5.89133C14.201 5.76346 14.2728 5.59004 14.2728 5.40921C14.2728 5.22838 14.201 5.05496 14.0731 4.9271C13.9452 4.79924 13.7718 4.72741 13.591 4.72741H9.50007C9.31924 4.72741 9.14582 4.79924 9.01796 4.9271C8.89009 5.05496 8.81825 5.22838 8.81825 5.40921C8.81825 5.49875 8.83588 5.58741 8.87015 5.67013C8.90441 5.75285 8.95464 5.82802 9.01795 5.89133C9.08126 5.95464 9.15642 6.00486 9.23915 6.03913C9.32187 6.07339 9.41053 6.09103 9.50007 6.09103ZM11.0634 17.6184C10.9355 17.4905 10.8637 17.3171 10.8637 17.1362C10.8637 16.9554 10.9355 16.782 11.0634 16.6541C11.1913 16.5262 11.3647 16.4544 11.5455 16.4544C11.7264 16.4544 11.8998 16.5262 12.0276 16.6541C12.1555 16.782 12.2273 16.9554 12.2273 17.1362C12.2273 17.3171 12.1555 17.4905 12.0276 17.6184C11.8998 17.7462 11.7264 17.8181 11.5455 17.8181C11.3647 17.8181 11.1913 17.7462 11.0634 17.6184Z"})})}function NS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.7719 2L17.7647 5.98965V8.88235V17.3529V18.4118C17.7647 18.833 17.5974 19.237 17.2995 19.5348C17.0017 19.8327 16.5977 20 16.1765 20H5.58824C5.16701 20 4.76304 19.8327 4.46518 19.5348C4.16733 19.237 4 18.833 4 18.4118V17.3529V8.88235V3.58824C4 3.16701 4.16733 2.76304 4.46518 2.46518C4.76304 2.16733 5.16701 2 5.58824 2H13.7719ZM13.9778 4.45118V6.20988H15.7376L13.9778 4.45118ZM5.58817 18.4118V17.3529V3.58823H12.3895L12.3901 7.79758H16.1764V17.3529V18.4118H5.58817ZM14.9956 9.33215H6.76855V10.5674H14.9956V9.33215ZM6.76855 12.1116H14.9956V13.3469H6.76855V12.1116ZM11.3268 14.78H6.76855V16.0153H11.3268V14.78Z"})})}function Uh(){let e=Ir(),{t,lang:n}=W();return d(xe,{children:[d("header",{className:"header-navbar",children:[d("a",{class:"header-navbar-brand",href:"https://immersivetranslate.com",target:"_blank",children:[d(OS,{}),d("h1",{children:t("browser.shortBrandName")})]}),d("span",{class:"version",children:e}),d("div",{style:{flex:1}}),d("div",{class:"header-right",children:[d(LM,{}),d(_M,{})]})]}),d("div",{className:"header-navbar-height"})]})}function LM(){let{t:e}=W();return d("a",{class:"header-navbar-item mobile-hidden",href:o1,target:"_blank",children:[d(zS,{}),d("span",{children:e("options.navbar.installApp")})]})}function _M(){let{t:e}=W();return d(or,{text:e("translateFileTooltip"),position:"bottom",tipStyle:{whiteSpace:"pre"},multiple:!0,children:d("a",{class:"header-navbar-item ml-8",href:p1,target:"_blank",children:[d(NS,{}),d("span",{children:e("options.navbar.translateFile")})]})})}function US(){let e=document.getElementById("mount");e&&(async()=>{Kd(e9);let t=await bt();z0(t.sentryConfig),t.debug&&R.setLevel("debug"),globalThis.location.hash||(globalThis.location.hash="#general");let n=await yn({url:"http://localhost",config:t});ft("options_page_view",[{name:"options_page_view"}],{...n,sourceLanguage:globalThis.location.hash}),qa(document,n),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(MM,{donateUrl:t.donateUrl,config:t})}),e)})()}function MM(e){let t=Xp(),{t:n,lang:r}=W(),a=Ir(),{config:i}=e,o=[{name:n("general"),props:{href:"#general",className:"secondary"}},{name:n("subtitle"),props:{href:"#subtitle",className:"secondary"}},{name:n("inputOptions"),props:{href:"#input",className:"secondary"}},{name:n("mouseHoverOptions"),props:{href:"#mouse_hover",className:"secondary"}},{name:n("floatBallOptions"),props:{href:"#floating",className:"secondary"}},{name:n("shortcutSettings"),props:{href:"#shortcuts",className:"secondary"}},{name:n("advanced"),props:{href:"#advanced",className:"secondary"}},{name:n("import_export"),props:{href:"#import_export",className:"secondary"}},{name:n("about"),props:{href:"#about",className:"secondary"}}];r.startsWith("zh")||o.splice(o.length-1,0,{name:n("contact"),props:{href:"#contact",className:"secondary"}}),o.forEach(u=>{t===u.props.href&&(u.props.className="primary",u.props["aria-current"]="page")});let s=!0;return Ge()&&(s=i.generalRule.showSponsorOnSafari),d(ct,{children:[d(Uh,{}),d(xe,{children:d("main",{class:"container-fluid",children:[d("aside",{children:d("nav",{class:"menu-nav flex flex-col h-full justify-between ",children:[d("div",{children:d("ul",{class:"flex flex-wrap flex-start min-[992px]:block text-sm min-[992px]:text-base",children:o.map((u,l)=>d("li",{class:"li",children:d("a",{...u.props,children:u.name})},`nav-${l}`))})}),d("div",{class:"m-0 p-0 flex flex-wrap min-[992px]:flex-col max-[992px]:mt-2",children:[s&&d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:e.donateUrl,children:n("donateCafe")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:xc,children:n("document")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:d1,children:n("feedbackAndJoin")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"#developer",children:n("developer")})]})]})}),d("div",{role:"main",children:d(Jp,{value:t,defaultCase:d(S0,{}),cases:{"#general":d(S0,{}),"#mouse_hover":d(Rh,{}),"#input":d(vf,{}),"#shortcuts":d(zh,{}),"#floating":d(Oh,{}),"#import_export":d(df,{}),"#about":d(Cf,{}),"#advanced":d(xf,{}),"#developer":d(Sf,{}),"#subtitle":d(wf,{}),"#contact":d(Ef,{}),"#download_config":d(Nh,{})}})})]})})]})}US();})(); + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(T,b)=>"imt_"+b.replaceAll("translation","t"))},await Kt(a);let h=Le().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let T=new URL(h);T.pathname=y.shareConfig.sharePath,h=T.toString()}Ko(h)}catch(m){R.error(m)}}async function y6(){let e=await Wt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Ob,{detail:JSON.stringify(e.draft)}))}async function dM(){try{if(await Fc("reportActive"))return;R.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Kp();await de({url:Pi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),yu("reportActive","1")}catch(e){R.error(e)}}var gM=new AbortController,{signal:pM}=gM,dd=0,gd=0,vs=!1,to,PS=0,ci=[];function ps(e,t){mM();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(R.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,ps(n,t)):(R.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,ps(n,t))}document.addEventListener(ru,s),ci.push(()=>{document.removeEventListener(ru,s)});let u=cr(f=>{if(!(Math.abs(f.clientX-dd)+Math.abs(f.clientY-gd)<=3)&&(dd=f.clientX,gd=f.clientY,o||vs&&!to)){let m=FS(n.rule,t);if(m){if(Fh(m))return;Mh(n,!1,m)}}},o?700:300),l=f=>{let m=f.target;Fh(m)||Mh(n,!0)},c=f=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",h=Ut.getPressedKeyCodes();if(h.length>1&&Ut[m]&&(PS=Date.now(),vs=!1),h.length===1&&Ut[m]){let y=Date.now();vs=!0,to&&clearTimeout(to),to=setTimeout(()=>{let T=PS-y;T>0&&T<=i?vs=!1:l(f),to=void 0},i)}};if(ci.push(()=>{to&&clearTimeout(to)}),a)return;Lh("mousemove",u,t),ci.push(()=>{t.removeEventListener("mousemove",u)});function g(){o?u.cancel():vs=!1}if(Lh("blur",g,t),ci.push(()=>{t.removeEventListener("blur",g)}),!o){let f=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=r1;Lh("keyup",LS,t),ci.push(()=>{t.removeEventListener("keyup",LS)}),m.includes(f)?Ut("*","mouseHover",c):Ut(r.generalRule.mouseHoverHoldKey,"mouseHover",l),Ut.setScope("mouseHover"),ci.push(()=>{Ut.deleteScope("mouseHover")})}}function mM(){ci.forEach(e=>e()),ci=[],Ut.setScope("all")}function LS(e){vs=!1}function Lh(e,t,n=window){return n.addEventListener(e,t,{signal:pM})}function Mh(e,t,n,r=window){if(n=n||FS(e.rule,r),!n){R.debug("can not find selection part!");return}if(hM(n,t))return;if(Fh(n)){R.debug("exclude dom");return}kS(e,n);let i=Qu();i&&(i.setupMouseHoverListener=ps);let o=Tn(e);o.excludeSelectors=[],o.selectors=[];let s=!1,u=kh({...i},e);ha({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Vi(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let g=Date.now();it(Ub,g),ht("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function FS(e,t){return fM(dd,gd,e,t)}function fM(e,t,n,r){let a=Ey(e,t,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=wy(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:MS(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){R.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{yM(r)}),!0}function bM(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function yM(e){let t=Qu();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Wu(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function _h(e){return!!(e.host&&e.mode)}function _S(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||_h(n))return e;for(;n&&n.nodeName!=="BODY"&&!_h(n)&&$p(n,t);){let r=n.parentNode;if(r&&_h(r))break;n=r}return n}function MS(e,t){return e.nodeType===Node.TEXT_NODE||$p(e,t)?_S(e,t):e}function BS(e,t){dd=t.clientX,gd=t.clientY,Mh(e,!0)}var nl=[];function Bh(e,t){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",i),nl.push(()=>{document.removeEventListener("click",i)})}function IS(e,t){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),nl.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function pd(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),nl.push(()=>{document.removeEventListener("touchstart",r)})}var Vu={touchShortcutsOff:()=>{},"multipleClick.2":Bh,"multipleClick.3":Bh,"multipleClick.4":Bh,"slide.left":IS,"slide.right":IS,"fingers.2":pd,"fingers.3":pd,"fingers.4":pd,"fingers.5":pd};async function T6(e){try{xM();let t=await vr(),n=hc.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Ih(e,t,r.command),i=Vu[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{CM(r.command,e,u)})})}catch(t){R.error(t)}}function Ih(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var TM=()=>{sh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},vM=()=>{lh();let e=new CustomEvent(oa,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},SM=()=>{uh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},RS=0,CM=(e,t,n)=>{new Date().getTime()-RS<200||(RS=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?TM():e==="touchShortcutsToggleTranslationMask"?SM():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?vM():e==="touchShortcutsToggleTranslateTouchElement"&&BS(t,n))};function xM(){nl.forEach(e=>{e()}),nl=[]}function rl(e){let{onChange:t,type:n,title:r,command:a,description:i,shortcut:o,disabled:s}=e,[u,l]=K(!1),{t:c}=W();if(n==="finger")return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("select",{class:"select !w-36",onChange:g=>{g.preventDefault();let f=g.target.value;t(f)},children:Object.keys(Vu).map((g,f)=>d("option",{value:g,selected:o===g,children:`${c(g)}`},"finger-"+f))})]});if(n==="mouseHoverHoldKey"){let g=sa.includes(o);return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d(Ur,{className:"select",maxWidth:250,items:sa.filter(f=>!(g&&f==="OtherCustom"||f==="OtherCustom")).map(f=>{let m=c("mouseHoldKey",{key:f}),h=sa.includes(o),y=f===o;return o==="Off"&&f===o&&u&&(y=!1),f==="Auto"?m=c("mouseHoldKeyAuto"):f==="Off"?m=c("mouseHoldKeyOff"):f==="OtherCustom"?m=h?c("mouseHoldKeyOther"):c("mouseHoldKeyCustomKey",{key:o}):f==="Other"&&(m=c("mouseHoldKeyOther")),h||f==="Other"&&(y=!0),{label:m,value:f,selected:y,onSelected:T=>{T.value==="Other"?(l(!0),t("Off",!0)):(l(!1),t(T.value))}}})})]}),(!g||u)&&d("div",{class:"nav",children:[d(Ae,{title:c("mouseHoverCustomKeyTitle"),description:c("mouseHoverCustomKeyDescription")||""}),d("input",{type:"text",class:"!w-36",placeholder:c("mouseHoverShortcutPlaceholder"),name:"mouseHoverHoldKey",value:o==="Off"?"":o,onChange:f=>{t(f.target.value)}})]})]})}return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("div",{children:[d("input",{type:"text",class:"!w-36",disabled:s,id:a,name:a,value:o,onChange:g=>{t(g.target.value)}}),s&&d("div",{class:"ml-2 inline-block",children:d(or,{width:200,multiple:!0,text:c("shortcutDisableTooltip"),children:d("span",{children:d(n9,{width:20,height:16})})})})]})]})}function Rh(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=fa(),{t:u}=W(),l=Jt(t),c=Un(l);return l?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("mouseHoverOptions")})}),d(ss,{image:Er("images/hover_intro.png"),nightImage:Er("images/hover_intro_night.png"),title:u("intro.hoverTitle"),description:u("intro.hoverDescription")}),d(rl,{onChange:(g,f)=>{n(m=>{let y={...m.generalRule||{},mouseHoverHoldKey:g||"Off"};return g!=="Off"&&(y.mouseHoverPreferenceKey=g),{...m,generalRule:y}}),f||lt(u("saved"))},type:"mouseHoverHoldKey",title:u("mouseHoverHoldKey"),command:"mouseHoverHoldKey",description:u("desc.mouseHoverHoldKey"),shortcut:l.generalRule.mouseHoverHoldKey,disabled:!1}),d(EM,{setSettings:n,config:l}),!k1()&&d("div",{class:"nav",children:[d(Ae,{title:u("confirmSupportMouse"),description:u("confirmSupportMouseDescription")}),d("label",{for:"confirmSupportMouse",children:d("input",{type:"checkbox",onChange:g=>{let f=g.target.checked;s({...o,confirmSupportMouse:f})},checked:o?.confirmSupportMouse===!0,id:"confirmSupportMouse",name:"switch",role:"switch"})})]}),d(ni,{config:l,ctx:c,serviceType:"mouseHoverTranslationService"})]})}):null}function EM({setSettings:e,config:t}){let{t:n}=W();return Ba()?d(rl,{onChange:(r,a)=>{e(i=>{let s={...i.generalRule||{},touchShortcutsToggleTranslateTouchElement:r||"touchShortcutsOff"};return r&&r!=="touchShortcutsOff"&&(s.touchShortcutsToggleTranslateTouchElementPreferenceKey=r),{...i,generalRule:s}}),a||lt(n("saved"))},type:"finger",title:n("touchShortcutsToggleTranslateTouchElement"),command:"touchShortcutsToggleTranslateTouchElement",description:n("desc.touchShortcutsToggleTranslateTouchElement"),shortcut:t.generalRule.touchShortcutsToggleTranslateTouchElement,disabled:!1}):null}p();function Oh(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),u=qe(f=>{s&&n(m=>Bc({...m},f))},[s,n]),l=Cu(s,t),{t:c}=W(),g=qe((f,m)=>c("floatBallOptions."+f,m),[]);return!s||!l?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:c("floatBallOptions")})}),d(ss,{image:Er("images/float_ball_intro.png"),nightImage:Er("images/float_ball_intro_night.png"),title:c("intro.floatBallTitle"),description:c("intro.floatBallDescription")}),d(wM,{config:s.config,t:g,rawT:c,rule:l,updateFloatBallRule:u}),d(DM,{t:g,rule:l,updateFloatBallRule:u}),d(AM,{t:g,rule:l,updateFloatBallRule:u}),d(kM,{t:g,rule:l,updateFloatBallRule:u})]})})}function wM({rule:e,config:t,updateFloatBallRule:n,t:r,rawT:a}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:r("enable"),description:e.isPc?r("enableDescPc"):r("enableDesc",{touch:a("fingers."+t.generalRule.fingerCountToToggleTranslagePageWhenTouching)})}),d("label",{for:"enable",children:d("input",{type:"checkbox",id:"enable",name:"switch",role:"switch",onChange:i=>{let o=i.target.checked;e.enable=o,n(e)},checked:e.enable})})]})})}function DM({t:e,rule:t,updateFloatBallRule:n}){let[r,a]=K(!1),[i,o]=K(""),[s,u]=K(-1);le(()=>{Ut("esc",()=>{a(!1)})},[]);let l=()=>{a(!r)},c=(m,h,y,T)=>{l(),s==h&&h!=-1?t.blockUrls[h]=m:t.blockUrls=zn(m,t.blockUrls),n(t),u(-1),o("")},g=(m,h)=>{m.forEach(y=>{t.blockUrls=Ht(y,t.blockUrls)}),n(t),u(-1),o("")},f=(m,h,y)=>{a(!r),o(m),u(y)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e("blockUrls"),description:e("blockUrlDesc")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:m=>{m.preventDefault(),l()},children:e("add")})}),r?d(ma,{toggleModal:m=>{m.preventDefault(),l()},onSubmitAddUrl:c,type:"excludeMatches",urlValue:i,index:s}):null]}),d(ei,{urls:t.blockUrls||[],type:"excludeMatches",onDeleteUrl:g,onEditUrl:f})]})}function AM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("clickType"),description:e("clickTypeDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.clickType=r.target.value,n(t)},children:[d("option",{value:"translate",selected:t.clickType=="translate",children:e("clickTranslate")}),d("option",{value:"popup",selected:t.clickType=="popup",children:e("clickPopup")})]})]})})}function kM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("fixedPosition"),description:e("fixedPositionDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.fixedPosition=r.target.value,n(t)},children:[d("option",{value:"left",selected:t.fixedPosition=="left",children:e("fixedPositionLeft")}),d("option",{value:"right",selected:t.fixedPosition=="right",children:e("fixedPositionRight")})]})]})})}p();function zh(){let e=Ye(),[t,n,r,a,i]=e,[o]=fa();Ct(t,n);let[s,u]=K(null),{t:l}=W();if(le(()=>{yt().then(m=>{yn({config:m,url:globalThis.location.href}).then(h=>{u(h)})})},[t]),!s)return d("div",{children:"loading"});let c={...s.config,shortcuts:{...s.config.shortcuts}},g=hc.filter(m=>m.name==="touch"?Ba():m.name==="mouse"?_i(o):!0).map(m=>({name:m.name,shortcuts:m.shortcuts.map(h=>{let y="",T="normal";typeof h=="string"?y=h:(y=h.command,h.type&&(T=h.type));let b="";l(`desc.${y}`)!==`desc.${y}`&&(b=l(`desc.${y}`));let w="";T==="finger"?w=Ih(s,t,y):T==="mouseHoverHoldKey"?t?.generalRule&&t?.generalRule[y]!==void 0?w=t.generalRule[y]:w=c.generalRule[y]:t?.shortcuts&&t?.shortcuts[y]!==void 0?w=t.shortcuts[y]:w=c.shortcuts[y];let L=l(`browser.${y}`);return(T==="finger"||T==="mouseHoverHoldKey")&&(L=l(`${y}`)),{command:y,type:T,shortcut:w,title:L,description:b,disabled:!(pe()||wo())}})})),f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsSucks")," ",d("kbd",{children:"Ctrl+A"}),"\xA0",d("kbd",{children:"Alt+B"}),"\xA0",d("kbd",{children:"Command+C"}),"\xA0 ",d("kbd",{children:"Ctrl+Shift+D"})," "]});return pe()||(rr()?f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForFirefox")," ",d("a",{target:"_blank",href:"https://support.mozilla.org/zh-CN/kb/%E7%AE%A1%E7%90%86Firefox%E7%9A%84%E6%89%A9%E5%B1%95%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F",children:[l("help"),"?"]})]}):wo()||(f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForChrome"),"\xA0",d("a",{href:"#",onClick:m=>{m.preventDefault(),Z.tabs.create({url:"chrome://extensions/shortcuts"})},children:l("goSettings")})]}))),d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:l("shortcutSettingsTitle")})}),d("div",{children:d(f,{})}),g.map((m,h)=>d("article",{class:"mb-8",children:[d("div",{class:"text-gray-500 text-sm",children:l(`shortcutGroup.${m.name}`)}),m.shortcuts.map((y,T)=>xs(rl,{...y,key:`shortcut-${T}`,onChange:(b,x)=>{n(w=>{if(y.type==="finger"){let M={...w.generalRule||{},[y.command]:b||"touchShortcutsOff"};return y.command==="touchShortcutsToggleTranslateTouchElement"&&b&&b!=="touchShortcutsOff"&&(M.touchShortcutsToggleTranslateTouchElementPreferenceKey=b),{...w,generalRule:M}}else if(y.type==="mouseHoverHoldKey"){let M={...w.generalRule||{},[y.command]:b||"Off"};return b!=="Off"&&(M.mouseHoverPreferenceKey=b),{...w,generalRule:M}}else{let L={...w?.shortcuts},M={...w,shortcuts:{...L,[y.command]:b}};return b||(M.shortcuts[y.command]=""),M}}),x||lt(l("saved"))}}))]},`shortcut-group-${h}`))]})})}p();function PM(){let[e,t]=K(null);return le(()=>{yt().then(n=>{t(n)})},[]),e}function Nh(){let[e,t,n,r,a]=Ye(),i=PM(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:d(c,{})})});function c(){return le(()=>{e&&g()},[e]),d(xe,{children:d("div",{style:{width:"100%"},children:d("p",{children:[o("download_started")," ",d("a",{href:"#",class:"secondary",onClick:f=>{f.preventDefault(),g()},children:o("here")})]})})});function g(){let f=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(f,"immersive-translate-config-"+os()+".txt")}}}p();p();function OS(){return d("svg",{id:"svg",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0, 0, 400,400",children:d("g",{id:"svgg",children:[d("path",{id:"path0",d:"M116.705 75.100 L 116.600 89.000 88.900 89.103 L 61.200 89.205 61.200 137.600 L 61.200 185.995 88.900 186.097 L 116.600 186.200 116.704 207.100 L 116.807 228.000 130.604 228.000 L 144.400 228.000 144.400 207.000 L 144.400 186.000 172.200 186.000 L 200.000 186.000 200.000 137.600 L 200.000 89.200 172.200 89.200 L 144.400 89.200 144.400 75.200 L 144.400 61.200 130.605 61.200 L 116.810 61.200 116.705 75.100 M227.600 88.772 L 227.600 102.800 250.576 102.800 C 265.463 102.800,273.640 102.941,273.800 103.200 C 273.936 103.420,274.387 103.600,274.803 103.600 C 281.873 103.600,292.696 112.756,295.278 120.921 C 295.778 122.505,296.371 123.928,296.594 124.085 C 296.854 124.268,297.044 130.468,297.124 141.385 L 297.247 158.400 311.262 158.400 L 325.277 158.400 325.083 140.900 C 324.882 122.835,324.541 118.696,323.013 115.765 C 322.678 115.124,322.404 114.303,322.402 113.940 C 322.398 112.713,319.594 106.004,317.992 103.386 C 317.116 101.956,316.400 100.635,316.400 100.451 C 316.400 100.267,315.995 99.677,315.500 99.139 C 315.005 98.601,314.107 97.412,313.504 96.496 C 311.880 94.027,305.442 87.743,302.856 86.103 C 301.615 85.316,300.456 84.430,300.280 84.136 C 300.104 83.841,299.804 83.600,299.613 83.600 C 299.422 83.600,297.879 82.780,296.184 81.778 C 292.949 79.865,288.492 78.078,284.796 77.210 C 283.588 76.927,282.420 76.558,282.200 76.390 C 280.817 75.333,275.285 75.062,251.900 74.906 L 227.600 74.745 227.600 88.772 M116.600 137.600 L 116.600 158.200 102.700 158.305 L 88.800 158.410 88.800 137.600 L 88.800 116.790 102.700 116.895 L 116.600 117.000 116.600 137.600 M172.000 137.600 L 172.000 158.400 158.200 158.400 L 144.400 158.400 144.400 137.600 L 144.400 116.800 158.200 116.800 L 172.000 116.800 172.000 137.600 M255.091 172.900 C 254.773 174.314,252.711 179.778,252.412 180.000 C 252.263 180.110,251.461 182.090,250.628 184.400 C 249.795 186.710,248.891 188.960,248.619 189.400 C 248.166 190.130,246.935 193.348,245.328 198.000 C 244.986 198.990,244.579 199.890,244.424 200.000 C 244.269 200.110,243.461 202.090,242.628 204.400 C 241.795 206.710,240.891 208.960,240.619 209.400 C 240.166 210.130,238.935 213.348,237.328 218.000 C 236.986 218.990,236.579 219.890,236.424 220.000 C 236.269 220.110,235.461 222.090,234.628 224.400 C 233.795 226.710,232.891 228.960,232.619 229.400 C 232.166 230.130,230.935 233.348,229.328 238.000 C 228.986 238.990,228.579 239.890,228.424 240.000 C 228.269 240.110,227.461 242.090,226.628 244.400 C 225.795 246.710,224.883 248.969,224.600 249.421 C 224.317 249.872,223.808 251.042,223.468 252.021 C 221.781 256.882,220.655 259.819,220.412 260.000 C 220.263 260.110,219.461 262.090,218.628 264.400 C 217.795 266.710,216.883 268.969,216.600 269.421 C 216.317 269.872,215.808 271.042,215.468 272.021 C 213.781 276.882,212.655 279.819,212.412 280.000 C 212.263 280.110,211.461 282.090,210.628 284.400 C 209.795 286.710,208.891 288.960,208.619 289.400 C 208.166 290.130,206.935 293.348,205.328 298.000 C 204.986 298.990,204.579 299.890,204.424 300.000 C 204.269 300.110,203.461 302.090,202.628 304.400 C 201.795 306.710,200.891 308.960,200.619 309.400 C 200.166 310.130,198.935 313.348,197.328 318.000 C 196.986 318.990,196.583 319.890,196.433 320.000 C 196.191 320.178,194.400 324.617,194.400 325.040 C 194.400 325.133,201.186 325.162,209.480 325.105 L 224.560 325.000 225.465 322.471 C 225.963 321.079,226.659 319.369,227.011 318.671 C 227.637 317.428,230.057 311.085,230.587 309.300 C 230.734 308.805,231.001 308.400,231.180 308.400 C 231.360 308.400,231.597 307.995,231.708 307.500 C 231.993 306.224,234.272 300.138,235.022 298.649 C 235.639 297.423,238.062 291.071,238.587 289.300 C 238.734 288.805,239.022 288.400,239.227 288.400 C 239.432 288.400,239.600 288.145,239.600 287.833 C 239.600 287.521,239.954 286.441,240.386 285.433 L 241.172 283.600 269.531 283.600 L 297.891 283.600 298.546 285.313 C 298.906 286.256,299.200 287.175,299.200 287.355 C 299.200 287.536,299.629 288.537,300.152 289.580 C 300.676 290.623,301.788 293.349,302.623 295.638 C 303.458 297.927,304.269 299.890,304.424 300.000 C 304.579 300.110,304.987 301.010,305.331 302.000 C 306.989 306.773,307.765 308.786,308.800 311.000 C 310.009 313.586,311.554 317.639,311.888 319.100 C 312.001 319.595,312.238 320.000,312.416 320.000 C 312.593 320.000,312.945 320.675,313.198 321.500 C 313.452 322.325,313.847 323.495,314.078 324.100 L 314.497 325.200 329.449 325.200 C 346.303 325.200,345.174 325.457,343.448 322.020 C 342.924 320.977,341.812 318.251,340.977 315.962 C 340.142 313.673,339.337 311.710,339.188 311.600 C 338.945 311.419,337.819 308.482,336.132 303.621 C 335.792 302.642,335.283 301.472,335.000 301.021 C 334.717 300.569,333.805 298.310,332.972 296.000 C 332.139 293.690,331.337 291.710,331.188 291.600 C 330.945 291.419,329.819 288.482,328.132 283.621 C 327.792 282.642,327.283 281.472,327.000 281.021 C 326.717 280.569,325.805 278.310,324.972 276.000 C 324.139 273.690,323.337 271.710,323.188 271.600 C 322.945 271.419,321.819 268.482,320.132 263.621 C 319.792 262.642,319.283 261.472,319.000 261.021 C 318.717 260.569,317.805 258.310,316.972 256.000 C 316.139 253.690,315.337 251.710,315.188 251.600 C 314.945 251.419,313.819 248.482,312.132 243.621 C 311.792 242.642,311.283 241.472,311.000 241.021 C 310.717 240.569,309.805 238.310,308.972 236.000 C 308.139 233.690,307.337 231.710,307.188 231.600 C 306.945 231.419,305.819 228.482,304.132 223.621 C 303.792 222.642,303.283 221.472,303.000 221.021 C 302.717 220.569,301.805 218.310,300.972 216.000 C 300.139 213.690,299.331 211.710,299.176 211.600 C 299.021 211.490,298.614 210.590,298.272 209.600 C 296.665 204.948,295.434 201.730,294.981 201.000 C 294.709 200.560,293.805 198.310,292.972 196.000 C 292.139 193.690,291.331 191.710,291.176 191.600 C 291.021 191.490,290.614 190.590,290.272 189.600 C 288.667 184.953,287.434 181.730,286.982 181.000 C 286.710 180.560,285.905 178.580,285.192 176.600 C 284.480 174.620,283.718 172.775,283.500 172.500 C 283.195 172.117,279.842 172.000,269.198 172.000 L 255.293 172.000 255.091 172.900 M270.342 214.500 C 270.978 216.680,272.184 219.788,272.480 220.011 C 272.634 220.128,273.474 222.198,274.346 224.611 C 275.218 227.025,276.219 229.562,276.570 230.249 C 277.192 231.467,279.455 237.406,279.904 239.000 C 280.028 239.440,280.272 239.895,280.445 240.011 C 280.618 240.128,281.479 242.228,282.357 244.679 C 283.235 247.131,284.144 249.465,284.377 249.868 C 285.100 251.118,286.400 254.437,286.400 255.033 C 286.400 255.513,283.802 255.600,269.400 255.600 C 260.050 255.600,252.400 255.506,252.400 255.392 C 252.400 255.278,252.850 254.077,253.400 252.723 C 253.950 251.370,254.400 250.036,254.400 249.760 C 254.400 249.483,254.637 249.019,254.928 248.729 C 255.218 248.438,255.560 247.840,255.688 247.400 C 256.167 245.754,258.416 239.852,259.022 238.649 C 259.639 237.423,262.062 231.071,262.587 229.300 C 262.734 228.805,263.001 228.400,263.180 228.400 C 263.360 228.400,263.597 227.995,263.708 227.500 C 264.027 226.071,266.188 220.398,267.344 217.955 C 267.925 216.727,268.400 215.617,268.400 215.487 C 268.400 213.445,269.823 212.722,270.342 214.500 M74.908 258.900 C 75.078 275.176,75.446 280.965,76.390 282.200 C 76.558 282.420,76.925 283.590,77.205 284.800 C 78.005 288.246,79.979 293.127,81.870 296.333 C 82.821 297.946,83.600 299.422,83.600 299.613 C 83.600 299.804,83.841 300.104,84.136 300.280 C 84.430 300.456,85.316 301.615,86.103 302.856 C 87.894 305.679,94.229 312.056,96.838 313.661 C 97.917 314.325,98.800 315.003,98.800 315.167 C 98.800 315.331,99.295 315.718,99.900 316.027 C 100.505 316.336,102.122 317.262,103.493 318.086 C 106.058 319.626,112.767 322.398,113.940 322.402 C 114.303 322.404,115.124 322.678,115.765 323.013 C 118.974 324.686,122.332 324.902,147.900 325.085 L 172.400 325.259 172.400 311.245 L 172.400 297.230 148.585 297.115 C 133.034 297.040,124.671 296.859,124.485 296.593 C 124.328 296.370,123.304 295.955,122.210 295.671 C 113.434 293.396,105.109 284.270,103.791 275.479 C 103.635 274.440,103.348 273.492,103.154 273.371 C 102.958 273.251,102.800 266.091,102.800 257.376 L 102.800 241.600 88.764 241.600 L 74.728 241.600 74.908 258.900 ",stroke:"none",fill:"#fcfcfc","fill-rule":"evenodd"}),d("path",{id:"path1",d:"M47.411 2.664 C 45.657 2.981,44.127 3.372,44.011 3.533 C 43.895 3.694,42.810 4.067,41.600 4.362 C 38.910 5.017,33.083 7.195,32.777 7.660 C 32.654 7.847,31.304 8.616,29.777 9.371 C 28.249 10.125,26.280 11.385,25.400 12.171 C 24.520 12.956,23.626 13.600,23.412 13.600 C 23.006 13.600,21.491 14.969,18.277 18.242 C 14.870 21.711,14.144 22.565,12.961 24.499 C 12.323 25.544,11.674 26.399,11.519 26.399 C 11.365 26.400,10.466 27.975,9.521 29.900 C 8.576 31.825,7.581 33.634,7.309 33.921 C 6.749 34.512,4.509 41.424,4.141 43.700 C 4.007 44.525,3.763 45.200,3.598 45.200 C 2.468 45.200,2.400 53.950,2.400 200.400 C 2.400 348.123,2.460 355.600,3.649 355.600 C 3.842 355.600,4.000 355.940,4.000 356.355 C 4.000 358.391,6.974 367.200,7.661 367.200 C 7.847 367.200,8.001 367.425,8.002 367.700 C 8.005 368.559,10.815 373.724,11.832 374.741 C 12.364 375.273,12.800 375.918,12.800 376.174 C 12.800 377.128,22.380 387.200,23.288 387.200 C 23.493 387.200,24.161 387.695,24.771 388.300 C 25.381 388.905,26.852 389.918,28.040 390.551 C 29.228 391.184,30.290 391.836,30.400 392.000 C 30.632 392.346,33.327 393.596,36.432 394.797 C 37.625 395.259,39.175 395.902,39.877 396.226 C 40.580 396.550,42.830 397.214,44.877 397.701 L 48.600 398.585 199.200 398.710 C 307.771 398.799,350.693 398.711,353.000 398.391 C 357.180 397.813,362.564 396.484,362.733 395.990 C 362.807 395.775,363.127 395.600,363.445 395.600 C 364.500 395.600,370.951 392.776,371.600 392.030 C 371.710 391.904,372.430 391.462,373.200 391.049 C 376.487 389.286,377.434 388.693,378.000 388.045 C 378.330 387.668,379.320 386.837,380.200 386.198 C 382.889 384.248,388.894 377.717,389.891 375.657 C 390.221 374.976,390.875 373.991,391.345 373.467 C 392.202 372.513,393.857 369.363,394.814 366.866 C 395.095 366.132,395.535 365.322,395.790 365.066 C 396.421 364.434,398.247 357.808,398.993 353.448 C 399.919 348.029,399.914 52.728,398.988 47.352 C 398.229 42.949,396.410 36.400,395.945 36.400 C 395.755 36.400,395.600 36.231,395.600 36.024 C 395.600 35.238,392.306 28.585,391.766 28.280 C 391.455 28.104,391.200 27.786,391.200 27.574 C 391.200 26.249,386.178 20.048,381.967 16.174 C 379.417 13.828,373.665 9.784,371.800 9.025 C 370.920 8.667,370.020 8.154,369.800 7.886 C 369.101 7.034,360.812 4.018,359.133 4.005 C 358.767 4.002,358.407 3.827,358.333 3.616 C 357.735 1.894,56.765 0.972,47.411 2.664 M144.705 74.900 L 144.810 88.800 172.405 88.800 L 200.000 88.800 200.000 137.600 L 200.000 186.400 172.400 186.400 L 144.800 186.400 144.800 207.200 L 144.800 228.000 130.600 228.000 L 116.400 228.000 116.400 207.200 L 116.400 186.400 88.600 186.400 L 60.800 186.400 60.800 137.600 L 60.800 88.800 88.600 88.800 L 116.400 88.800 116.400 74.795 L 116.400 60.790 130.500 60.895 L 144.600 61.000 144.705 74.900 M277.400 75.067 C 277.840 75.324,279.820 75.825,281.800 76.181 C 285.920 76.920,291.600 78.689,291.600 79.233 C 291.600 79.435,291.873 79.600,292.206 79.600 C 292.912 79.600,299.079 82.679,299.271 83.127 C 299.342 83.294,300.210 83.900,301.200 84.475 C 305.072 86.723,313.353 94.921,315.225 98.359 C 315.568 98.990,316.158 99.815,316.536 100.193 C 318.699 102.356,323.995 115.750,323.999 119.067 C 324.000 119.543,324.164 119.993,324.364 120.067 C 325.126 120.346,325.600 129.481,325.600 143.869 L 325.600 158.800 311.200 158.800 L 296.800 158.800 296.800 143.055 C 296.800 124.194,296.908 124.966,293.169 117.022 C 291.290 113.028,285.600 107.884,280.800 105.838 C 279.370 105.229,277.570 104.431,276.800 104.065 C 275.552 103.472,272.799 103.387,251.500 103.282 L 227.600 103.165 227.600 88.753 L 227.600 74.341 252.100 74.470 C 269.857 74.564,276.820 74.729,277.400 75.067 M89.200 137.600 L 89.200 158.000 102.800 158.000 L 116.400 158.000 116.400 137.600 L 116.400 117.200 102.800 117.200 L 89.200 117.200 89.200 137.600 M144.800 137.600 L 144.800 158.000 158.400 158.000 L 172.000 158.000 172.000 137.600 L 172.000 117.200 158.400 117.200 L 144.800 117.200 144.800 137.600 M284.742 174.500 C 285.378 175.875,286.301 178.170,286.792 179.600 C 287.284 181.030,287.917 182.569,288.200 183.021 C 288.483 183.472,288.994 184.642,289.335 185.621 C 291.027 190.467,291.767 192.393,292.787 194.597 C 293.398 195.919,294.301 198.170,294.792 199.600 C 295.284 201.030,295.917 202.569,296.200 203.021 C 296.483 203.472,296.994 204.642,297.335 205.621 C 299.027 210.467,299.767 212.393,300.787 214.597 C 301.398 215.919,302.301 218.170,302.792 219.600 C 303.284 221.030,303.917 222.569,304.200 223.021 C 304.483 223.472,304.994 224.642,305.335 225.621 C 307.027 230.467,307.767 232.393,308.787 234.597 C 309.398 235.919,310.301 238.170,310.792 239.600 C 311.284 241.030,311.917 242.569,312.200 243.021 C 312.483 243.472,312.994 244.642,313.335 245.621 C 315.027 250.467,315.767 252.393,316.787 254.597 C 317.398 255.919,318.301 258.170,318.792 259.600 C 319.284 261.030,319.917 262.569,320.200 263.021 C 320.483 263.472,320.994 264.642,321.335 265.621 C 323.027 270.467,323.767 272.393,324.787 274.597 C 325.398 275.919,326.301 278.170,326.792 279.600 C 327.284 281.030,327.917 282.569,328.200 283.021 C 328.483 283.472,328.994 284.642,329.335 285.621 C 331.027 290.467,331.767 292.393,332.787 294.597 C 333.398 295.919,334.301 298.170,334.792 299.600 C 335.284 301.030,335.917 302.569,336.200 303.021 C 336.483 303.472,336.994 304.642,337.335 305.621 C 339.027 310.467,339.767 312.393,340.787 314.597 C 341.398 315.919,342.304 318.170,342.799 319.600 C 343.295 321.030,343.975 322.675,344.310 323.255 C 345.685 325.635,345.908 325.600,329.282 325.600 L 314.138 325.600 313.016 322.300 C 312.399 320.485,311.676 318.640,311.410 318.200 C 311.144 317.760,310.165 315.423,309.234 313.006 C 308.304 310.590,307.395 308.430,307.215 308.206 C 307.034 307.983,306.609 306.990,306.269 306.000 C 304.673 301.355,303.463 298.161,303.149 297.761 C 302.959 297.520,302.082 295.377,301.200 293.000 C 300.318 290.623,299.435 288.480,299.236 288.239 C 299.038 287.998,298.568 286.855,298.192 285.700 L 297.508 283.600 269.566 283.600 L 241.625 283.600 240.633 285.700 C 240.087 286.855,238.983 289.600,238.178 291.800 C 237.373 294.000,236.583 295.890,236.422 296.000 C 236.261 296.110,236.028 296.560,235.904 297.000 C 235.462 298.571,233.200 304.513,232.425 306.142 C 231.992 307.054,230.979 309.600,230.176 311.800 C 229.372 314.000,228.583 315.890,228.422 316.000 C 228.261 316.110,228.028 316.560,227.904 317.000 C 227.349 318.970,225.160 324.566,224.753 325.057 C 224.144 325.790,194.000 325.870,194.000 325.139 C 194.000 324.885,194.433 323.760,194.963 322.639 C 195.849 320.762,196.618 318.753,198.269 314.000 C 198.613 313.010,199.021 312.110,199.176 312.000 C 199.331 311.890,200.139 309.910,200.972 307.600 C 201.805 305.290,202.717 303.031,203.000 302.579 C 203.283 302.128,203.792 300.958,204.132 299.979 C 205.819 295.118,206.945 292.181,207.188 292.000 C 207.337 291.890,208.139 289.910,208.972 287.600 C 209.805 285.290,210.709 283.040,210.981 282.600 C 211.434 281.870,212.665 278.652,214.272 274.000 C 214.614 273.010,215.021 272.110,215.176 272.000 C 215.331 271.890,216.139 269.910,216.972 267.600 C 217.805 265.290,218.717 263.031,219.000 262.579 C 219.283 262.128,219.792 260.958,220.132 259.979 C 221.819 255.118,222.945 252.181,223.188 252.000 C 223.337 251.890,224.139 249.910,224.972 247.600 C 225.805 245.290,226.717 243.031,227.000 242.579 C 227.283 242.128,227.792 240.958,228.132 239.979 C 229.819 235.118,230.945 232.181,231.188 232.000 C 231.337 231.890,232.139 229.910,232.972 227.600 C 233.805 225.290,234.709 223.040,234.981 222.600 C 235.434 221.870,236.665 218.652,238.272 214.000 C 238.614 213.010,239.021 212.110,239.176 212.000 C 239.331 211.890,240.139 209.910,240.972 207.600 C 241.805 205.290,242.717 203.031,243.000 202.579 C 243.283 202.128,243.792 200.958,244.132 199.979 C 245.819 195.118,246.945 192.181,247.188 192.000 C 247.337 191.890,248.139 189.910,248.972 187.600 C 249.805 185.290,250.709 183.040,250.981 182.600 C 251.463 181.823,253.007 177.762,254.290 173.900 L 254.922 172.000 269.253 172.000 L 283.584 172.000 284.742 174.500 M269.200 214.548 C 269.200 214.875,268.963 215.381,268.672 215.671 C 268.382 215.962,268.040 216.560,267.912 217.000 C 267.427 218.664,265.182 224.551,264.425 226.142 C 263.992 227.054,262.979 229.600,262.176 231.800 C 261.372 234.000,260.583 235.890,260.422 236.000 C 260.261 236.110,260.028 236.560,259.904 237.000 C 259.462 238.569,257.200 244.513,256.426 246.142 C 255.992 247.054,255.012 249.510,254.248 251.600 L 252.860 255.400 269.292 255.504 C 278.330 255.562,285.804 255.529,285.902 255.432 C 285.999 255.334,285.594 253.937,285.001 252.327 C 284.409 250.717,283.822 249.040,283.697 248.600 C 283.572 248.160,283.328 247.705,283.155 247.589 C 282.982 247.472,282.126 245.402,281.254 242.989 C 280.382 240.575,279.381 238.038,279.030 237.351 C 278.408 236.133,276.145 230.194,275.696 228.600 C 275.572 228.160,275.328 227.705,275.155 227.589 C 274.982 227.472,274.125 225.402,273.251 222.989 C 272.376 220.575,271.288 217.844,270.831 216.919 C 270.374 215.995,270.000 215.061,270.000 214.843 C 270.000 214.625,269.820 214.336,269.600 214.200 C 269.380 214.064,269.200 214.221,269.200 214.548 M103.200 256.745 C 103.200 271.263,103.434 275.394,104.370 277.400 C 104.576 277.840,105.239 279.370,105.845 280.800 C 107.787 285.385,113.002 291.278,116.618 292.972 C 117.488 293.380,119.100 294.145,120.200 294.673 C 124.060 296.526,124.345 296.547,149.000 296.778 L 172.600 297.000 172.600 311.200 L 172.600 325.400 151.400 325.522 C 130.794 325.641,120.383 325.260,120.067 324.374 C 119.993 324.168,119.543 324.000,119.067 323.999 C 115.750 323.995,102.356 318.699,100.193 316.536 C 99.815 316.158,98.990 315.568,98.359 315.225 C 94.897 313.340,86.661 305.008,84.496 301.200 C 83.934 300.210,83.261 299.220,83.001 299.000 C 82.404 298.494,79.600 292.826,79.600 292.124 C 79.600 291.836,79.435 291.600,79.233 291.600 C 78.689 291.600,76.920 285.920,76.181 281.800 C 75.825 279.820,75.327 277.840,75.073 277.400 C 74.749 276.839,74.568 271.314,74.467 258.900 L 74.324 241.200 88.762 241.200 L 103.200 241.200 103.200 256.745 ",stroke:"none",fill:"#ec4c8c","fill-rule":"evenodd"}),d("path",{id:"path2",d:"",stroke:"none",fill:"#f4d4100","fill-rule":"evenodd"}),d("path",{id:"path3",d:"M235.600 74.690 C 256.786 74.968,273.107 74.972,272.938 74.700 C 272.836 74.535,262.548 74.441,250.076 74.491 C 237.604 74.542,231.090 74.631,235.600 74.690 M286.800 77.414 C 286.800 77.693,289.706 78.831,290.091 78.703 C 290.282 78.639,289.620 78.284,288.619 77.913 C 287.619 77.542,286.800 77.317,286.800 77.414 M302.400 85.290 C 302.400 85.377,303.435 86.328,304.700 87.403 C 305.965 88.479,306.640 88.944,306.200 88.436 C 305.364 87.471,302.400 85.017,302.400 85.290 M308.783 90.900 C 310.441 92.666,310.800 92.984,310.800 92.683 C 310.800 92.619,309.945 91.764,308.900 90.783 L 307.000 89.000 308.783 90.900 M312.597 95.300 C 313.672 96.565,314.623 97.600,314.710 97.600 C 314.983 97.600,312.529 94.636,311.564 93.800 C 311.056 93.360,311.521 94.035,312.597 95.300 M321.200 109.884 C 321.200 110.451,322.363 113.200,322.602 113.200 C 322.707 113.200,322.496 112.435,322.132 111.500 C 321.395 109.607,321.200 109.269,321.200 109.884 M88.994 137.400 L 89.000 158.200 102.700 158.208 L 116.400 158.216 102.804 158.103 L 89.207 157.990 89.098 137.295 L 88.989 116.600 88.994 137.400 M324.641 122.800 C 324.839 123.130,325.109 131.320,325.243 141.000 L 325.485 158.600 325.443 140.920 C 325.407 126.341,325.302 123.148,324.841 122.720 C 324.377 122.288,324.343 122.301,324.641 122.800 M151.074 158.299 C 154.855 158.365,161.155 158.365,165.074 158.299 C 168.993 158.234,165.900 158.180,158.200 158.180 C 150.500 158.180,147.293 158.234,151.074 158.299 M253.700 175.700 C 253.270 176.875,253.280 176.926,253.812 176.224 C 254.321 175.552,254.621 174.400,254.288 174.400 C 254.226 174.400,253.961 174.985,253.700 175.700 M250.196 184.272 C 249.858 185.081,249.633 185.900,249.697 186.091 C 249.761 186.282,250.116 185.620,250.487 184.619 C 251.293 182.445,251.070 182.179,250.196 184.272 M74.729 186.300 C 82.500 186.361,95.100 186.361,102.729 186.300 C 110.358 186.239,104.000 186.189,88.600 186.189 C 73.200 186.189,66.958 186.239,74.729 186.300 M158.500 186.300 C 166.145 186.361,178.655 186.361,186.300 186.300 C 193.945 186.239,187.690 186.189,172.400 186.189 C 157.110 186.189,150.855 186.239,158.500 186.300 M289.200 186.284 C 289.200 186.851,290.363 189.600,290.602 189.600 C 290.707 189.600,290.496 188.835,290.132 187.900 C 289.395 186.007,289.200 185.669,289.200 186.284 M245.700 195.700 C 245.270 196.875,245.280 196.926,245.812 196.224 C 246.321 195.552,246.621 194.400,246.288 194.400 C 246.226 194.400,245.961 194.985,245.700 195.700 M242.196 204.272 C 241.858 205.081,241.633 205.900,241.697 206.091 C 241.761 206.282,242.116 205.620,242.487 204.619 C 243.293 202.445,243.070 202.179,242.196 204.272 M297.200 206.284 C 297.200 206.851,298.363 209.600,298.602 209.600 C 298.707 209.600,298.496 208.835,298.132 207.900 C 297.395 206.007,297.200 205.669,297.200 206.284 M237.700 215.700 C 237.270 216.875,237.280 216.926,237.812 216.224 C 238.321 215.552,238.621 214.400,238.288 214.400 C 238.226 214.400,237.961 214.985,237.700 215.700 M270.032 214.824 C 270.014 215.166,270.280 215.796,270.622 216.224 C 271.234 216.988,271.238 216.987,270.876 216.200 C 270.674 215.760,270.408 215.130,270.286 214.800 C 270.093 214.282,270.059 214.285,270.032 214.824 M265.267 223.180 C 265.033 223.851,264.927 224.400,265.031 224.400 C 265.301 224.400,266.056 222.322,265.857 222.124 C 265.767 222.033,265.501 222.508,265.267 223.180 M234.196 224.272 C 233.858 225.081,233.633 225.900,233.697 226.091 C 233.761 226.282,234.116 225.620,234.487 224.619 C 235.293 222.445,235.070 222.179,234.196 224.272 M273.913 224.619 C 274.284 225.620,274.639 226.282,274.703 226.091 C 274.831 225.706,273.693 222.800,273.414 222.800 C 273.317 222.800,273.542 223.619,273.913 224.619 M305.200 226.284 C 305.200 226.851,306.363 229.600,306.602 229.600 C 306.707 229.600,306.496 228.835,306.132 227.900 C 305.395 226.007,305.200 225.669,305.200 226.284 M261.756 231.843 C 261.424 232.637,261.226 233.359,261.314 233.448 C 261.403 233.536,261.759 232.887,262.105 232.004 C 262.889 230.009,262.582 229.868,261.756 231.843 M229.700 235.700 C 229.270 236.875,229.280 236.926,229.812 236.224 C 230.321 235.552,230.621 234.400,230.288 234.400 C 230.226 234.400,229.961 234.985,229.700 235.700 M278.032 234.824 C 278.014 235.166,278.280 235.796,278.622 236.224 C 279.234 236.988,279.238 236.987,278.876 236.200 C 278.674 235.760,278.408 235.130,278.286 234.800 C 278.093 234.282,278.059 234.285,278.032 234.824 M309.113 236.219 C 309.484 237.220,309.839 237.882,309.903 237.691 C 310.031 237.306,308.893 234.400,308.614 234.400 C 308.517 234.400,308.742 235.219,309.113 236.219 M74.488 257.076 C 74.440 265.698,74.535 272.836,74.700 272.939 C 74.973 273.108,74.967 261.235,74.687 247.000 C 74.626 243.920,74.537 248.454,74.488 257.076 M257.267 243.180 C 257.033 243.851,256.927 244.400,257.031 244.400 C 257.301 244.400,258.056 242.322,257.857 242.124 C 257.767 242.033,257.501 242.508,257.267 243.180 M226.196 244.272 C 225.858 245.081,225.633 245.900,225.697 246.091 C 225.761 246.282,226.116 245.620,226.487 244.619 C 227.293 242.445,227.070 242.179,226.196 244.272 M281.913 244.619 C 282.284 245.620,282.639 246.282,282.703 246.091 C 282.831 245.706,281.693 242.800,281.414 242.800 C 281.317 242.800,281.542 243.619,281.913 244.619 M313.200 246.284 C 313.200 246.851,314.363 249.600,314.602 249.600 C 314.707 249.600,314.496 248.835,314.132 247.900 C 313.395 246.007,313.200 245.669,313.200 246.284 M253.756 251.843 C 253.424 252.637,253.226 253.359,253.314 253.448 C 253.403 253.536,253.759 252.887,254.105 252.004 C 254.889 250.009,254.582 249.868,253.756 251.843 M221.700 255.700 C 221.270 256.875,221.280 256.926,221.812 256.224 C 222.321 255.552,222.621 254.400,222.288 254.400 C 222.226 254.400,221.961 254.985,221.700 255.700 M317.113 256.219 C 317.484 257.220,317.839 257.882,317.903 257.691 C 318.031 257.306,316.893 254.400,316.614 254.400 C 316.517 254.400,316.742 255.219,317.113 256.219 M218.196 264.272 C 217.858 265.081,217.633 265.900,217.697 266.091 C 217.761 266.282,218.116 265.620,218.487 264.619 C 219.293 262.445,219.070 262.179,218.196 264.272 M321.200 266.284 C 321.200 266.851,322.363 269.600,322.602 269.600 C 322.707 269.600,322.496 268.835,322.132 267.900 C 321.395 266.007,321.200 265.669,321.200 266.284 M213.700 275.700 C 213.270 276.875,213.280 276.926,213.812 276.224 C 214.321 275.552,214.621 274.400,214.288 274.400 C 214.226 274.400,213.961 274.985,213.700 275.700 M325.113 276.219 C 325.484 277.220,325.839 277.882,325.903 277.691 C 326.031 277.306,324.893 274.400,324.614 274.400 C 324.517 274.400,324.742 275.219,325.113 276.219 M105.007 279.879 C 105.607 281.314,106.000 281.962,106.000 281.516 C 106.000 281.084,104.785 278.400,104.589 278.400 C 104.479 278.400,104.667 279.066,105.007 279.879 M210.196 284.272 C 209.858 285.081,209.633 285.900,209.697 286.091 C 209.761 286.282,210.116 285.620,210.487 284.619 C 211.293 282.445,211.070 282.179,210.196 284.272 M329.200 286.284 C 329.200 286.851,330.363 289.600,330.602 289.600 C 330.707 289.600,330.496 288.835,330.132 287.900 C 329.395 286.007,329.200 285.669,329.200 286.284 M77.913 288.619 C 78.284 289.620,78.639 290.282,78.703 290.091 C 78.831 289.706,77.693 286.800,77.414 286.800 C 77.317 286.800,77.542 287.619,77.913 288.619 M237.756 291.843 C 237.424 292.637,237.226 293.359,237.314 293.448 C 237.403 293.536,237.759 292.887,238.105 292.004 C 238.889 290.009,238.582 289.868,237.756 291.843 M301.600 293.884 C 301.600 294.451,302.763 297.200,303.002 297.200 C 303.107 297.200,302.896 296.435,302.532 295.500 C 301.795 293.607,301.600 293.269,301.600 293.884 M205.700 295.700 C 205.270 296.875,205.280 296.926,205.812 296.224 C 206.321 295.552,206.621 294.400,206.288 294.400 C 206.226 294.400,205.961 294.985,205.700 295.700 M333.113 296.219 C 333.484 297.220,333.839 297.882,333.903 297.691 C 334.031 297.306,332.893 294.400,332.614 294.400 C 332.517 294.400,332.742 295.219,333.113 296.219 M233.095 303.596 C 232.748 304.478,232.549 305.200,232.653 305.200 C 232.923 305.200,234.078 302.345,233.886 302.152 C 233.797 302.064,233.441 302.713,233.095 303.596 M86.322 303.900 C 86.977 304.725,87.928 305.760,88.436 306.200 C 88.944 306.640,88.479 305.965,87.403 304.700 C 85.213 302.124,84.490 301.589,86.322 303.900 M202.196 304.272 C 201.858 305.081,201.633 305.900,201.697 306.091 C 201.761 306.282,202.116 305.620,202.487 304.619 C 203.293 302.445,203.070 302.179,202.196 304.272 M305.524 303.800 C 305.726 304.240,305.992 304.870,306.114 305.200 C 306.307 305.718,306.341 305.715,306.368 305.176 C 306.386 304.834,306.120 304.204,305.778 303.776 C 305.166 303.012,305.162 303.013,305.524 303.800 M337.200 306.284 C 337.200 306.851,338.363 309.600,338.602 309.600 C 338.707 309.600,338.496 308.835,338.132 307.900 C 337.395 306.007,337.200 305.669,337.200 306.284 M90.783 308.900 C 91.764 309.945,92.619 310.800,92.683 310.800 C 92.984 310.800,92.666 310.441,90.900 308.783 L 89.000 307.000 90.783 308.900 M229.756 311.843 C 229.424 312.637,229.226 313.359,229.314 313.448 C 229.403 313.536,229.759 312.887,230.105 312.004 C 230.889 310.009,230.582 309.868,229.756 311.843 M93.800 311.564 C 94.636 312.529,97.600 314.983,97.600 314.710 C 97.600 314.623,96.565 313.672,95.300 312.597 C 94.035 311.521,93.360 311.056,93.800 311.564 M197.700 315.700 C 197.270 316.875,197.280 316.926,197.812 316.224 C 198.321 315.552,198.621 314.400,198.288 314.400 C 198.226 314.400,197.961 314.985,197.700 315.700 M310.032 314.824 C 310.014 315.166,310.280 315.796,310.622 316.224 C 311.234 316.988,311.238 316.987,310.876 316.200 C 310.674 315.760,310.408 315.130,310.286 314.800 C 310.093 314.282,310.059 314.285,310.032 314.824 M341.113 316.219 C 341.484 317.220,341.839 317.882,341.903 317.691 C 342.031 317.306,340.893 314.400,340.614 314.400 C 340.517 314.400,340.742 315.219,341.113 316.219 M109.633 321.335 C 110.019 321.647,113.200 322.777,113.200 322.602 C 113.200 322.363,110.451 321.200,109.884 321.200 C 109.655 321.200,109.542 321.261,109.633 321.335 M225.095 323.596 L 224.464 325.200 209.432 325.200 C 201.164 325.200,194.400 325.122,194.400 325.026 C 194.400 324.930,194.591 324.345,194.825 323.726 C 195.109 322.974,195.113 322.736,194.837 323.009 C 194.609 323.233,194.373 323.863,194.311 324.409 L 194.200 325.400 209.400 325.400 L 224.600 325.400 225.344 323.877 C 225.753 323.040,226.006 322.273,225.906 322.173 C 225.806 322.073,225.441 322.713,225.095 323.596 M313.791 324.300 L 314.421 325.600 329.510 325.505 L 344.600 325.410 329.500 325.300 C 321.195 325.240,314.400 325.047,314.400 324.872 C 314.400 324.696,314.121 324.204,313.781 323.776 C 313.234 323.091,313.235 323.152,313.791 324.300 M127.143 325.303 C 127.310 325.470,137.606 325.560,150.023 325.503 L 172.600 325.400 149.720 325.200 C 137.136 325.090,126.976 325.137,127.143 325.303 ",stroke:"none",fill:"#f478c8","fill-rule":"evenodd"}),d("path",{id:"path4",d:"M144.580 75.000 C 144.580 82.700,144.634 85.793,144.699 81.874 C 144.765 77.955,144.765 71.655,144.699 67.874 C 144.634 64.093,144.580 67.300,144.580 75.000 M274.100 75.087 C 274.705 75.178,275.695 75.178,276.300 75.087 C 276.905 74.995,276.410 74.920,275.200 74.920 C 273.990 74.920,273.495 74.995,274.100 75.087 M95.900 117.099 C 99.695 117.165,105.905 117.165,109.700 117.099 C 113.495 117.034,110.390 116.980,102.800 116.980 C 95.210 116.980,92.105 117.034,95.900 117.099 M144.583 117.300 C 144.478 117.575,144.440 126.890,144.500 138.000 L 144.608 158.200 144.704 137.705 L 144.800 117.211 158.500 117.100 L 172.200 116.989 158.487 116.895 C 147.816 116.821,144.732 116.911,144.583 117.300 M324.493 121.200 C 324.493 121.970,324.575 122.285,324.676 121.900 C 324.776 121.515,324.776 120.885,324.676 120.500 C 324.575 120.115,324.493 120.430,324.493 121.200 M288.429 184.310 C 288.676 185.020,289.042 185.703,289.242 185.826 C 289.442 185.950,289.391 185.544,289.127 184.925 C 288.421 183.265,287.906 182.812,288.429 184.310 M144.586 207.200 C 144.586 218.750,144.637 223.475,144.700 217.700 C 144.762 211.925,144.762 202.475,144.700 196.700 C 144.637 190.925,144.586 195.650,144.586 207.200 M296.429 204.310 C 296.676 205.020,297.042 205.703,297.242 205.826 C 297.442 205.950,297.391 205.544,297.127 204.925 C 296.421 203.265,295.906 202.812,296.429 204.310 M268.779 214.655 C 268.558 215.236,268.464 215.797,268.569 215.903 C 268.675 216.008,268.879 215.624,269.023 215.050 C 269.170 214.465,269.470 214.120,269.704 214.265 C 269.949 214.416,270.005 214.331,269.838 214.062 C 269.416 213.379,269.223 213.487,268.779 214.655 M304.429 224.310 C 304.676 225.020,305.042 225.703,305.242 225.826 C 305.442 225.950,305.391 225.544,305.127 224.925 C 304.421 223.265,303.906 222.812,304.429 224.310 M260.779 234.655 C 260.558 235.236,260.452 235.785,260.543 235.876 C 260.633 235.967,260.899 235.492,261.133 234.820 C 261.653 233.328,261.339 233.182,260.779 234.655 M74.920 275.200 C 74.920 276.410,74.995 276.905,75.087 276.300 C 75.178 275.695,75.178 274.705,75.087 274.100 C 74.995 273.495,74.920 273.990,74.920 275.200 M172.580 311.200 C 172.580 319.010,172.634 322.205,172.699 318.300 C 172.765 314.395,172.765 308.005,172.699 304.100 C 172.634 300.195,172.580 303.390,172.580 311.200 M107.200 320.179 C 107.200 320.289,107.740 320.659,108.400 321.000 C 109.060 321.341,109.600 321.531,109.600 321.421 C 109.600 321.311,109.060 320.941,108.400 320.600 C 107.740 320.259,107.200 320.069,107.200 320.179 M120.500 324.676 C 120.885 324.776,121.515 324.776,121.900 324.676 C 122.285 324.575,121.970 324.493,121.200 324.493 C 120.430 324.493,120.115 324.575,120.500 324.676 M123.700 325.087 C 124.305 325.178,125.295 325.178,125.900 325.087 C 126.505 324.995,126.010 324.920,124.800 324.920 C 123.590 324.920,123.095 324.995,123.700 325.087 ",stroke:"none",fill:"#f47c8c","fill-rule":"evenodd"})]})})}function zS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9091 2H7.04546C6.50297 2 5.9827 2.2155 5.5991 2.5991C5.2155 2.9827 5 3.50297 5 4.04546V17.9545C5 18.497 5.2155 19.0173 5.5991 19.4009C5.9827 19.7845 6.50297 20 7.04546 20H15.9091C16.4515 20 16.9718 19.7845 17.3554 19.4009C17.739 19.0173 17.9545 18.497 17.9545 17.9545V4.04546C17.9545 3.50297 17.739 2.9827 17.3554 2.5991C16.9718 2.2155 16.4516 2 15.9091 2ZM7.04546 3.36364H15.9091C16.0899 3.36364 16.2633 3.43548 16.3912 3.56334C16.519 3.69121 16.5909 3.86463 16.5909 4.04546V14.2727H6.36362V4.04546C6.36362 3.86463 6.43546 3.69121 6.56332 3.56334C6.69119 3.43548 6.86461 3.36364 7.04544 3.36364H7.04546ZM15.9091 18.6364H7.04546C6.95592 18.6364 6.86726 18.6187 6.78454 18.5845C6.70182 18.5502 6.62665 18.5 6.56334 18.4367C6.50003 18.3733 6.44981 18.2982 6.41554 18.2155C6.38128 18.1327 6.36364 18.0441 6.36364 17.9545V15.6364H16.5909V17.9545C16.5909 18.1354 16.5191 18.3088 16.3912 18.4367C16.2633 18.5645 16.0899 18.6364 15.9091 18.6364H15.9091ZM9.50007 6.09103H13.591C13.7718 6.09103 13.9452 6.01919 14.0731 5.89133C14.201 5.76346 14.2728 5.59004 14.2728 5.40921C14.2728 5.22838 14.201 5.05496 14.0731 4.9271C13.9452 4.79924 13.7718 4.72741 13.591 4.72741H9.50007C9.31924 4.72741 9.14582 4.79924 9.01796 4.9271C8.89009 5.05496 8.81825 5.22838 8.81825 5.40921C8.81825 5.49875 8.83588 5.58741 8.87015 5.67013C8.90441 5.75285 8.95464 5.82802 9.01795 5.89133C9.08126 5.95464 9.15642 6.00486 9.23915 6.03913C9.32187 6.07339 9.41053 6.09103 9.50007 6.09103ZM11.0634 17.6184C10.9355 17.4905 10.8637 17.3171 10.8637 17.1362C10.8637 16.9554 10.9355 16.782 11.0634 16.6541C11.1913 16.5262 11.3647 16.4544 11.5455 16.4544C11.7264 16.4544 11.8998 16.5262 12.0276 16.6541C12.1555 16.782 12.2273 16.9554 12.2273 17.1362C12.2273 17.3171 12.1555 17.4905 12.0276 17.6184C11.8998 17.7462 11.7264 17.8181 11.5455 17.8181C11.3647 17.8181 11.1913 17.7462 11.0634 17.6184Z"})})}function NS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.7719 2L17.7647 5.98965V8.88235V17.3529V18.4118C17.7647 18.833 17.5974 19.237 17.2995 19.5348C17.0017 19.8327 16.5977 20 16.1765 20H5.58824C5.16701 20 4.76304 19.8327 4.46518 19.5348C4.16733 19.237 4 18.833 4 18.4118V17.3529V8.88235V3.58824C4 3.16701 4.16733 2.76304 4.46518 2.46518C4.76304 2.16733 5.16701 2 5.58824 2H13.7719ZM13.9778 4.45118V6.20988H15.7376L13.9778 4.45118ZM5.58817 18.4118V17.3529V3.58823H12.3895L12.3901 7.79758H16.1764V17.3529V18.4118H5.58817ZM14.9956 9.33215H6.76855V10.5674H14.9956V9.33215ZM6.76855 12.1116H14.9956V13.3469H6.76855V12.1116ZM11.3268 14.78H6.76855V16.0153H11.3268V14.78Z"})})}function Uh(){let e=Ir(),{t,lang:n}=W();return d(xe,{children:[d("header",{className:"header-navbar",children:[d("a",{class:"header-navbar-brand",href:"https://immersivetranslate.com",target:"_blank",children:[d(OS,{}),d("h1",{children:t("browser.shortBrandName")})]}),d("span",{class:"version",children:e}),d("div",{style:{flex:1}}),d("div",{class:"header-right",children:[d(LM,{}),d(_M,{})]})]}),d("div",{className:"header-navbar-height"})]})}function LM(){let{t:e}=W();return d("a",{class:"header-navbar-item mobile-hidden",href:o1,target:"_blank",children:[d(zS,{}),d("span",{children:e("options.navbar.installApp")})]})}function _M(){let{t:e}=W();return d(or,{text:e("translateFileTooltip"),position:"bottom",tipStyle:{whiteSpace:"pre"},multiple:!0,children:d("a",{class:"header-navbar-item ml-8",href:p1,target:"_blank",children:[d(NS,{}),d("span",{children:e("options.navbar.translateFile")})]})})}function US(){let e=document.getElementById("mount");e&&(async()=>{Wd(e9);let t=await yt();z0(t.sentryConfig),t.debug&&R.setLevel("debug"),globalThis.location.hash||(globalThis.location.hash="#general");let n=await yn({url:"http://localhost",config:t});ht("options_page_view",[{name:"options_page_view"}],{...n,sourceLanguage:globalThis.location.hash}),qa(document,n),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(MM,{donateUrl:t.donateUrl,config:t})}),e)})()}function MM(e){let t=Jp(),{t:n,lang:r}=W(),a=Ir(),{config:i}=e,o=[{name:n("general"),props:{href:"#general",className:"secondary"}},{name:n("subtitle"),props:{href:"#subtitle",className:"secondary"}},{name:n("inputOptions"),props:{href:"#input",className:"secondary"}},{name:n("mouseHoverOptions"),props:{href:"#mouse_hover",className:"secondary"}},{name:n("floatBallOptions"),props:{href:"#floating",className:"secondary"}},{name:n("shortcutSettings"),props:{href:"#shortcuts",className:"secondary"}},{name:n("advanced"),props:{href:"#advanced",className:"secondary"}},{name:n("import_export"),props:{href:"#import_export",className:"secondary"}},{name:n("about"),props:{href:"#about",className:"secondary"}}];r.startsWith("zh")||o.splice(o.length-1,0,{name:n("contact"),props:{href:"#contact",className:"secondary"}}),o.forEach(u=>{t===u.props.href&&(u.props.className="primary",u.props["aria-current"]="page")});let s=!0;return Ge()&&(s=i.generalRule.showSponsorOnSafari),d(ct,{children:[d(Uh,{}),d(xe,{children:d("main",{class:"container-fluid",children:[d("aside",{children:d("nav",{class:"menu-nav flex flex-col h-full justify-between ",children:[d("div",{children:d("ul",{class:"flex flex-wrap flex-start min-[992px]:block text-sm min-[992px]:text-base",children:o.map((u,l)=>d("li",{class:"li",children:d("a",{...u.props,children:u.name})},`nav-${l}`))})}),d("div",{class:"m-0 p-0 flex flex-wrap min-[992px]:flex-col max-[992px]:mt-2",children:[s&&d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:e.donateUrl,children:n("donateCafe")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:xc,children:n("document")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:d1,children:n("feedbackAndJoin")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"#developer",children:n("developer")})]})]})}),d("div",{role:"main",children:d(Zp,{value:t,defaultCase:d(S0,{}),cases:{"#general":d(S0,{}),"#mouse_hover":d(Rh,{}),"#input":d(Tf,{}),"#shortcuts":d(zh,{}),"#floating":d(Oh,{}),"#import_export":d(cf,{}),"#about":d(Sf,{}),"#advanced":d(Cf,{}),"#developer":d(vf,{}),"#subtitle":d(Ef,{}),"#contact":d(xf,{}),"#download_config":d(Nh,{})}})})]})})]})}US();})(); /*! Bundled license information: bowser/src/bowser.js: diff --git a/dist/chrome/popup.js b/dist/chrome/popup.js index c25fdff..2f7b6ff 100644 --- a/dist/chrome/popup.js +++ b/dist/chrome/popup.js @@ -1,4 +1,4 @@ -(()=>{var J9=Object.create;var gd=Object.defineProperty;var X9=Object.getOwnPropertyDescriptor;var e6=Object.getOwnPropertyNames;var t6=Object.getPrototypeOf,n6=Object.prototype.hasOwnProperty;var r6=(t,e)=>()=>(t&&(e=t(t=0)),e);var a6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tu=(t,e)=>{for(var n in e)gd(t,n,{get:e[n],enumerable:!0})},i6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of e6(e))!n6.call(t,a)&&a!==n&&gd(t,a,{get:()=>e[a],enumerable:!(r=X9(e,a))||r.enumerable});return t};var o6=(t,e,n)=>(n=t!=null?J9(t6(t)):{},i6(e||!t||!t.__esModule?gd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=r6(()=>{x={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var J9=Object.create;var pd=Object.defineProperty;var X9=Object.getOwnPropertyDescriptor;var e6=Object.getOwnPropertyNames;var t6=Object.getPrototypeOf,n6=Object.prototype.hasOwnProperty;var r6=(t,e)=>()=>(t&&(e=t(t=0)),e);var a6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tu=(t,e)=>{for(var n in e)pd(t,n,{get:e[n],enumerable:!0})},i6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of e6(e))!n6.call(t,a)&&a!==n&&pd(t,a,{get:()=>e[a],enumerable:!(r=X9(e,a))||r.enumerable});return t};var o6=(t,e,n)=>(n=t!=null?J9(t6(t)):{},i6(e||!t||!t.__esModule?pd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=r6(()=>{x={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,7 +4936,7 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var N2=a6((oc,Ps)=>{d();(function(){var t;function e(f){var T,b,h="",C=-1,D;if(f&&f.length)for(D=f.length;(C+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,C,D,M=[],B;if(T=b=h=C=D=0,f&&f.length)for(B=f.length,f+="";T191&&h<224?(C=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|C&63),T+=2):(C=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",C,D=0,M=f.length;D>>4&15)+b.charAt(C&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function g(f,T){var b=T.length,h=Array(),C,D,M,B,S,y,_,k;for(y=Array(Math.ceil(f.length/2)),B=y.length,C=0;C0;){for(S=Array(),M=0,C=0;C0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(_="",C=h.length-1;C>=0;C--)_+=T.charAt(h[C]);for(k=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),C=_.length;Cf.length*8?h+=T:h+=b.charAt(B>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(C){var D,M,B,S="";for(T=T||"=",C=h?e(C):C,len=C.length,D=0;Dlen*8?S+=T:S+=f.charAt(B>>>6*(3-M)&63);return S},this.decode=function(C){var D,M,B,S,y,_,k,v,I,F,L="",U=[];if(!C)return C;D=F=0,C=C.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(C.charAt(D++)),_=f.indexOf(C.charAt(D++)),k=f.indexOf(C.charAt(D++)),v=f.indexOf(C.charAt(D++)),I=y<<18|_<<12|k<<6|v,M=I>>16&255,B=I>>8&255,S=I&255,F+=1,k===64?U[F]=String.fromCharCode(M):v===64?U[F]=String.fromCharCode(M,B):U[F]=String.fromCharCode(M,B,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(C(v,h),T)},this.b64=function(v){return m(C(v),b)},this.any=function(v,I){return g(C(v,h),I)},this.raw=function(v){return C(v,h)},this.hex_hmac=function(v,I){return i(D(v,I),T)},this.b64_hmac=function(v,I){return m(D(v,I),b)},this.any_hmac=function(v,I,F){return g(D(v,I),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function C(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,I){var F,L,U,N,q;for(v=h?e(v):v,I=h?e(I):I,F=c(v),F.length>16&&(F=M(F,v.length*8)),L=Array(16),U=Array(16),q=0;q<16;q+=1)L[q]=F[q]^909522486,U[q]=F[q]^1549556828;return N=M(L.concat(c(I)),512+I.length*8),l(M(U.concat(N),512+128))}function M(v,I){var F,L,U,N,q,A=1732584193,E=-271733879,P=-1732584194,O=271733878;for(v[I>>5]|=128<>>9<<4)+14]=I,F=0;F16&&(k=M(k,y.length*8)),v=Array(16),I=Array(16),F=0;F<16;F+=1)v[F]=k[F]^909522486,I[F]=k[F]^1549556828;return L=M(v.concat(p(_)),512+_.length*8),u(M(I.concat(L),512+160))}function M(y,_){var k,v,I,F,L,U,N,q,A=Array(80),E=1732584193,P=-271733879,O=-1732584194,H=271733878,j=-1009589776;for(y[_>>5]|=128<<24-_%32,y[(_+64>>9<<4)+15]=_,k=0;k16&&(j=A(j,E.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return O=A(W.concat(p(P)),512+P.length*8),u(A(V.concat(O),512+256))}function B(E,P){return E>>>P|E<<32-P}function S(E,P){return E>>>P}function y(E,P,O){return E&P^~E&O}function _(E,P,O){return E&P^E&O^P&O}function k(E){return B(E,2)^B(E,13)^B(E,22)}function v(E){return B(E,6)^B(E,11)^B(E,25)}function I(E){return B(E,7)^B(E,18)^S(E,3)}function F(E){return B(E,17)^B(E,19)^S(E,10)}function L(E){return B(E,28)^B(E,34)^B(E,39)}function U(E){return B(E,14)^B(E,18)^B(E,41)}function N(E){return B(E,1)^B(E,8)^S(E,7)}function q(E){return B(E,19)^B(E,61)^S(E,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function A(E,P){var O=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,se,X,Z,ue,ge,te,Y,be,ae;for(E[P>>5]|=128<<24-P%32,E[(P+64>>9<<4)+15]=P,te=0;te32&&(E=B(E,U.length*8));A<32;A+=1)P[A]=E[A]^909522486,O[A]=E[A]^1549556828;return q=B(P.concat(p(N)),1024+N.length*8),u(B(O.concat(q),1024+512))}function B(U,N){var q,A,E,P=new Array(80),O=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),se=new S(0,0),X=new S(0,0),Z=new S(0,0),ue=new S(0,0),ge=new S(0,0),te=new S(0,0),Y=new S(0,0),be=new S(0,0),ae=new S(0,0),ie=new S(0,0),Ee=new S(0,0),ze=new S(0,0),_e=new S(0,0),ce=new S(0,0);for(C===void 0&&(C=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),A=0;A<80;A+=1)P[A]=new S(0,0);for(U[N>>5]|=128<<24-(N&31),U[(N+128>>10<<5)+31]=N,E=U.length,A=0;A>>q|N.h<<32-q,U.h=N.h>>>q|N.l<<32-q}function k(U,N,q){U.l=N.h>>>q|N.l<<32-q,U.h=N.l>>>q|N.h<<32-q}function v(U,N,q){U.l=N.l>>>q|N.h<<32-q,U.h=N.h>>>q}function I(U,N,q){var A=(N.l&65535)+(q.l&65535),E=(N.l>>>16)+(q.l>>>16)+(A>>>16),P=(N.h&65535)+(q.h&65535)+(E>>>16),O=(N.h>>>16)+(q.h>>>16)+(P>>>16);U.l=A&65535|E<<16,U.h=P&65535|O<<16}function F(U,N,q,A,E){var P=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535),O=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P>>>16),H=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(O>>>16),j=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(H>>>16);U.l=P&65535|O<<16,U.h=H&65535|j<<16}function L(U,N,q,A,E,P){var O=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535)+(P.l&65535),H=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P.l>>>16)+(O>>>16),j=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(P.h&65535)+(H>>>16),W=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(P.h>>>16)+(j>>>16);U.l=O&65535|H<<16,U.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(L){return i(S(L,h))},this.b64=function(L){return m(S(L,h),b)},this.any=function(L,U){return g(S(L,h),U)},this.raw=function(L){return S(L,h)},this.hex_hmac=function(L,U){return i(y(L,U))},this.b64_hmac=function(L,U){return m(y(L,U),b)},this.any_hmac=function(L,U,N){return g(y(L,U),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(L){return typeof L=="boolean"&&(T=L),this},this.setPad=function(L){return typeof L<"u"&&(b=L),this},this.setUTF8=function(L){return typeof L=="boolean"&&(h=L),this};function S(L){return L=h?e(L):L,_(k(c(L),L.length*8))}function y(L,U){L=h?e(L):L,U=h?e(U):U;var N,q,A=c(L),E=Array(16),P=Array(16);for(A.length>16&&(A=k(A,L.length*8)),N=0;N<16;N+=1)E[N]=A[N]^909522486,P[N]=A[N]^1549556828;return q=k(E.concat(c(U)),512+U.length*8),_(k(P.concat(q),512+160))}function _(L){var U,N="",q=L.length*32;for(U=0;U>5]>>>U%32&255);return N}function k(L,U){var N,q,A,E,P=1732584193,O=4023233417,H=2562383102,j=271733878,W=3285377520,V,se,X,Z,ue,ge,te,Y,be,ae;for(L[U>>5]|=128<>>9<<4)+14]=U,E=L.length,A=0;Afunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},g6=(t,e)=>{for(var n in e)fd(t,n,{get:e[n],enumerable:!0})},md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!d6.call(t,a)&&a!==n&&fd(t,a,{get:()=>e[a],enumerable:!(r=l6(e,a))||r.enumerable});return t},m6=(t,e,n)=>(md(t,e,"default"),n&&md(n,e,"default")),yf=(t,e,n)=>(n=t!=null?u6(c6(t)):{},md(e||!t||!t.__esModule?fd(n,"default",{value:t,enumerable:!0}):n,t)),vf=p6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,_=void 0){super(_),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(..._)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||_.length<=1&&y.singleCallbackArg!==!1?S.resolve(_[0]):S.resolve(_)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(k,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((I,F)=>{if(y.fallbackToNoCallback)try{k[S](...v,l({resolve:I,reject:F},y))}catch{k[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,I()}else y.noCallback?(k[S](...v),I()):k[S](...v,l({resolve:I,reject:F},y))})},g=(S,y,_)=>new Proxy(y,{apply(k,v,I){return _.call(v,S,...I)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},_={})=>{let k=Object.create(null),v={has(F,L){return L in S||L in k},get(F,L,U){if(L in k)return k[L];if(!(L in S))return;let N=S[L];if(typeof N=="function")if(typeof y[L]=="function")N=g(S,S[L],y[L]);else if(m(_,L)){let q=p(L,_[L]);N=g(S,S[L],q)}else N=N.bind(S);else if(typeof N=="object"&&N!==null&&(m(y,L)||m(_,L)))N=f(N,y[L],_[L]);else if(m(_,"*"))N=f(N,y[L],_["*"]);else return Object.defineProperty(k,L,{configurable:!0,enumerable:!0,get(){return S[L]},set(q){S[L]=q}}),N;return k[L]=N,N},set(F,L,U,N){return L in k?k[L]=U:S[L]=U,!0},defineProperty(F,L,U){return Reflect.defineProperty(k,L,U)},deleteProperty(F,L){return Reflect.deleteProperty(k,L)}},I=Object.create(S);return new Proxy(I,v)},T=S=>({addListener(y,_,...k){y.addListener(S.get(_),...k)},hasListener(y,_){return y.hasListener(S.get(_))},removeListener(y,_){y.removeListener(S.get(_))}}),b=new s(S=>typeof S!="function"?S:function(_){let k=f(_,{},{getContent:{minArgs:0,maxArgs:0}});S(k)}),h=new s(S=>typeof S!="function"?S:function(_,k,v){let I=!1,F,L=new Promise(A=>{F=function(E){I=!0,A(E)}}),U;try{U=S(_,k,F)}catch(A){U=Promise.reject(A)}let N=U!==!0&&u(U);if(U!==!0&&!N&&!I)return!1;let q=A=>{A.then(E=>{v(E)},E=>{let P;E&&(E instanceof Error||typeof E.message=="string")?P=E.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(E=>{})};return q(N?U:L),!0}),C=({reject:S,resolve:y},_)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):_&&_.__mozWebExtensionPolyfillReject__?S(new Error(_.message)):y(_)},D=(S,y,_,...k)=>{if(k.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${k.length}`);return new Promise((v,I)=>{let F=C.bind(null,{resolve:v,reject:I});k.push(F),_.sendMessage(...k)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};g6(Sf,{default:()=>nu});var f6=yf(vf());m6(Sf,yf(vf()));var{default:bf,...h6}=f6,nu=bf!==void 0?bf:h6;globalThis.immersiveTranslateBrowserAPI=nu;d();d();d();var su,Fe,Df,b6,Ao,xf,Af,au={},kf=[],T6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vr(t,e){for(var n in e)t[n]=e[n];return t}function Pf(t){var e=t.parentNode;e&&e.removeChild(t)}function bd(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?su.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return ru(t,o,r,a,null)}function ru(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Df};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function Rt(t){return t.children}function Ba(t,e){this.props=t,this.context=e}function fi(t,e){if(e==null)return t.__?fi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?ru(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(g=h[c])===null||g&&m.key==g.key&&m.type===g.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:uu}),n.__[t]}function re(t){return ko=1,x6(Gf,t)}function x6(t,e,n){var r=cu(Po++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Gf(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=xt,!xt.u)){xt.u=!0;var a=xt.shouldComponentUpdate;xt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ce(t,e){var n=cu(Po++,3);!Fe.__s&&Kf(n.__H,e)&&(n.__=t,n.i=e,xt.__H.__h.push(n))}function qe(t){return ko=5,Ne(function(){return{current:t}},[])}function Ne(t,e){var n=cu(Po++,7);return Kf(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return ko=8,Ne(function(){return t},e)}function du(t){var e=xt.context[t.__c],n=cu(Po++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(xt)),e.props.value):t.__}function E6(){for(var t;t=Wf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lu),t.__H.__h.forEach(vd),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===Rt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),xt=null,zf&&zf(t)},Fe.__r=function(t){Nf&&Nf(t),Po=0;var e=(xt=t.__c).__H;e&&(yd===xt?(e.__h=[],xt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=uu,n.__N=n.i=void 0})):(e.__h.forEach(lu),e.__h.forEach(vd),e.__h=[])),yd=xt},Fe.diffed=function(t){Uf&&Uf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Wf.push(e)!==1&&Of===Fe.requestAnimationFrame||((Of=Fe.requestAnimationFrame)||C6)(E6)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==uu&&(n.__=n.__V),n.i=void 0,n.__V=uu})),yd=xt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lu),n.__h=n.__h.filter(function(r){return!r.__||vd(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),qf&&qf(t,e)},Fe.unmount=function(t){jf&&jf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lu(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var Hf=typeof requestAnimationFrame=="function";function C6(t){var e,n=function(){clearTimeout(r),Hf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Hf&&(e=requestAnimationFrame(n))}function lu(t){var e=xt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),xt=e}function vd(t){var e=xt;t.__c=t.__(),xt=e}function Kf(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Gf(t,e){return typeof e=="function"?e(t):e}d();d();function pu(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let g of p)a[g]||(a[g]=[]),a[g].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Bn(){return we.PROD_API==="1"}function Vf(){return we.HAS_CSP_ERROR=="1"}function it(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function gu(){return typeof Deno<"u"}var wP=Me().PROD==="1",bi=Me().PROD!=="1";function mu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();var Sd=/iPhone/i,$f=/iPod/i,Yf=/iPad/i,Qf=/\biOS-universal(?:.+)Mac\b/i,xd=/\bAndroid(?:.+)Mobile\b/i,Zf=/Android/i,Ti=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,fu=/Silk/i,Cr=/Windows Phone/i,Jf=/\bWindows(?:.+)ARM\b/i,Xf=/BlackBerry/i,eh=/BB10/i,th=/Opera Mini/i,nh=/\b(CriOS|Chrome)(?:.+)Mobile/i,rh=/Mobile(?:.+)Firefox\b/i,ah=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function w6(t){return e=>e.test(t)}function et(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=w6(n),i={apple:{phone:a(Sd)&&!a(Cr),ipod:a($f),tablet:!a(Sd)&&(a(Yf)||ah(e))&&!a(Cr),universal:a(Qf),device:(a(Sd)||a($f)||a(Yf)||a(Qf)||ah(e))&&!a(Cr)},amazon:{phone:a(Ti),tablet:!a(Ti)&&a(fu),device:a(Ti)||a(fu)},android:{phone:!a(Cr)&&a(Ti)||!a(Cr)&&a(xd),tablet:!a(Cr)&&!a(Ti)&&!a(xd)&&(a(fu)||a(Zf)),device:!a(Cr)&&(a(Ti)||a(fu)||a(xd)||a(Zf))||a(/\bokhttp\b/i)},windows:{phone:a(Cr),tablet:a(Jf),device:a(Cr)||a(Jf)},other:{blackberry:a(Xf),blackberry10:a(eh),opera:a(th),firefox:a(rh),chrome:a(nh),device:a(Xf)||a(eh)||a(th)||a(rh)||a(nh)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Ed="DENO",hu="CHROME",bu="FIREFOX";function ih(t){let e=hu;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=bu:/deno/i.test(n)&&(e=Ed)}catch{}return t===hu&&e===hu||t===bu&&e===bu||t===Ed&&e===Ed}function D6(){return ih(hu)}function oh(){return typeof Deno<"u"}function Wn(){return ih(bu)}function Tu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function Lo(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function sh(){return ye()?"monkey":D6()?"chrome":Wn()?"firefox":it()?"safari":null}d();var uh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},lh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:uh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:uh,query:()=>{},sendMessage:()=>{}}};var oe;oh()?oe=lh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();var ch={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"chrome_zip"}});var N2=a6((oc,Ls)=>{d();(function(){var t;function e(f){var T,b,h="",C=-1,D;if(f&&f.length)for(D=f.length;(C+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,C,D,M=[],B;if(T=b=h=C=D=0,f&&f.length)for(B=f.length,f+="";T191&&h<224?(C=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|C&63),T+=2):(C=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",C,D=0,M=f.length;D>>4&15)+b.charAt(C&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function g(f,T){var b=T.length,h=Array(),C,D,M,B,S,y,_,k;for(y=Array(Math.ceil(f.length/2)),B=y.length,C=0;C0;){for(S=Array(),M=0,C=0;C0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(_="",C=h.length-1;C>=0;C--)_+=T.charAt(h[C]);for(k=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),C=_.length;Cf.length*8?h+=T:h+=b.charAt(B>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(C){var D,M,B,S="";for(T=T||"=",C=h?e(C):C,len=C.length,D=0;Dlen*8?S+=T:S+=f.charAt(B>>>6*(3-M)&63);return S},this.decode=function(C){var D,M,B,S,y,_,k,v,I,F,L="",U=[];if(!C)return C;D=F=0,C=C.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(C.charAt(D++)),_=f.indexOf(C.charAt(D++)),k=f.indexOf(C.charAt(D++)),v=f.indexOf(C.charAt(D++)),I=y<<18|_<<12|k<<6|v,M=I>>16&255,B=I>>8&255,S=I&255,F+=1,k===64?U[F]=String.fromCharCode(M):v===64?U[F]=String.fromCharCode(M,B):U[F]=String.fromCharCode(M,B,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(C(v,h),T)},this.b64=function(v){return m(C(v),b)},this.any=function(v,I){return g(C(v,h),I)},this.raw=function(v){return C(v,h)},this.hex_hmac=function(v,I){return i(D(v,I),T)},this.b64_hmac=function(v,I){return m(D(v,I),b)},this.any_hmac=function(v,I,F){return g(D(v,I),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function C(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,I){var F,L,U,N,q;for(v=h?e(v):v,I=h?e(I):I,F=c(v),F.length>16&&(F=M(F,v.length*8)),L=Array(16),U=Array(16),q=0;q<16;q+=1)L[q]=F[q]^909522486,U[q]=F[q]^1549556828;return N=M(L.concat(c(I)),512+I.length*8),l(M(U.concat(N),512+128))}function M(v,I){var F,L,U,N,q,A=1732584193,E=-271733879,P=-1732584194,O=271733878;for(v[I>>5]|=128<>>9<<4)+14]=I,F=0;F16&&(k=M(k,y.length*8)),v=Array(16),I=Array(16),F=0;F<16;F+=1)v[F]=k[F]^909522486,I[F]=k[F]^1549556828;return L=M(v.concat(p(_)),512+_.length*8),u(M(I.concat(L),512+160))}function M(y,_){var k,v,I,F,L,U,N,q,A=Array(80),E=1732584193,P=-271733879,O=-1732584194,H=271733878,j=-1009589776;for(y[_>>5]|=128<<24-_%32,y[(_+64>>9<<4)+15]=_,k=0;k16&&(j=A(j,E.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return O=A(W.concat(p(P)),512+P.length*8),u(A(V.concat(O),512+256))}function B(E,P){return E>>>P|E<<32-P}function S(E,P){return E>>>P}function y(E,P,O){return E&P^~E&O}function _(E,P,O){return E&P^E&O^P&O}function k(E){return B(E,2)^B(E,13)^B(E,22)}function v(E){return B(E,6)^B(E,11)^B(E,25)}function I(E){return B(E,7)^B(E,18)^S(E,3)}function F(E){return B(E,17)^B(E,19)^S(E,10)}function L(E){return B(E,28)^B(E,34)^B(E,39)}function U(E){return B(E,14)^B(E,18)^B(E,41)}function N(E){return B(E,1)^B(E,8)^S(E,7)}function q(E){return B(E,19)^B(E,61)^S(E,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function A(E,P){var O=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,se,X,Z,ue,ge,te,Y,Te,ae;for(E[P>>5]|=128<<24-P%32,E[(P+64>>9<<4)+15]=P,te=0;te32&&(E=B(E,U.length*8));A<32;A+=1)P[A]=E[A]^909522486,O[A]=E[A]^1549556828;return q=B(P.concat(p(N)),1024+N.length*8),u(B(O.concat(q),1024+512))}function B(U,N){var q,A,E,P=new Array(80),O=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),se=new S(0,0),X=new S(0,0),Z=new S(0,0),ue=new S(0,0),ge=new S(0,0),te=new S(0,0),Y=new S(0,0),Te=new S(0,0),ae=new S(0,0),ie=new S(0,0),Ee=new S(0,0),ze=new S(0,0),_e=new S(0,0),ce=new S(0,0);for(C===void 0&&(C=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),A=0;A<80;A+=1)P[A]=new S(0,0);for(U[N>>5]|=128<<24-(N&31),U[(N+128>>10<<5)+31]=N,E=U.length,A=0;A>>q|N.h<<32-q,U.h=N.h>>>q|N.l<<32-q}function k(U,N,q){U.l=N.h>>>q|N.l<<32-q,U.h=N.l>>>q|N.h<<32-q}function v(U,N,q){U.l=N.l>>>q|N.h<<32-q,U.h=N.h>>>q}function I(U,N,q){var A=(N.l&65535)+(q.l&65535),E=(N.l>>>16)+(q.l>>>16)+(A>>>16),P=(N.h&65535)+(q.h&65535)+(E>>>16),O=(N.h>>>16)+(q.h>>>16)+(P>>>16);U.l=A&65535|E<<16,U.h=P&65535|O<<16}function F(U,N,q,A,E){var P=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535),O=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P>>>16),H=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(O>>>16),j=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(H>>>16);U.l=P&65535|O<<16,U.h=H&65535|j<<16}function L(U,N,q,A,E,P){var O=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535)+(P.l&65535),H=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P.l>>>16)+(O>>>16),j=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(P.h&65535)+(H>>>16),W=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(P.h>>>16)+(j>>>16);U.l=O&65535|H<<16,U.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(L){return i(S(L,h))},this.b64=function(L){return m(S(L,h),b)},this.any=function(L,U){return g(S(L,h),U)},this.raw=function(L){return S(L,h)},this.hex_hmac=function(L,U){return i(y(L,U))},this.b64_hmac=function(L,U){return m(y(L,U),b)},this.any_hmac=function(L,U,N){return g(y(L,U),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(L){return typeof L=="boolean"&&(T=L),this},this.setPad=function(L){return typeof L<"u"&&(b=L),this},this.setUTF8=function(L){return typeof L=="boolean"&&(h=L),this};function S(L){return L=h?e(L):L,_(k(c(L),L.length*8))}function y(L,U){L=h?e(L):L,U=h?e(U):U;var N,q,A=c(L),E=Array(16),P=Array(16);for(A.length>16&&(A=k(A,L.length*8)),N=0;N<16;N+=1)E[N]=A[N]^909522486,P[N]=A[N]^1549556828;return q=k(E.concat(c(U)),512+U.length*8),_(k(P.concat(q),512+160))}function _(L){var U,N="",q=L.length*32;for(U=0;U>5]>>>U%32&255);return N}function k(L,U){var N,q,A,E,P=1732584193,O=4023233417,H=2562383102,j=271733878,W=3285377520,V,se,X,Z,ue,ge,te,Y,Te,ae;for(L[U>>5]|=128<>>9<<4)+14]=U,E=L.length,A=0;Afunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},g6=(t,e)=>{for(var n in e)md(t,n,{get:e[n],enumerable:!0})},gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!d6.call(t,a)&&a!==n&&md(t,a,{get:()=>e[a],enumerable:!(r=l6(e,a))||r.enumerable});return t},m6=(t,e,n)=>(gd(t,e,"default"),n&&gd(n,e,"default")),yf=(t,e,n)=>(n=t!=null?u6(c6(t)):{},gd(e||!t||!t.__esModule?md(n,"default",{value:t,enumerable:!0}):n,t)),vf=p6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,_=void 0){super(_),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(..._)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||_.length<=1&&y.singleCallbackArg!==!1?S.resolve(_[0]):S.resolve(_)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(k,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((I,F)=>{if(y.fallbackToNoCallback)try{k[S](...v,l({resolve:I,reject:F},y))}catch{k[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,I()}else y.noCallback?(k[S](...v),I()):k[S](...v,l({resolve:I,reject:F},y))})},g=(S,y,_)=>new Proxy(y,{apply(k,v,I){return _.call(v,S,...I)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},_={})=>{let k=Object.create(null),v={has(F,L){return L in S||L in k},get(F,L,U){if(L in k)return k[L];if(!(L in S))return;let N=S[L];if(typeof N=="function")if(typeof y[L]=="function")N=g(S,S[L],y[L]);else if(m(_,L)){let q=p(L,_[L]);N=g(S,S[L],q)}else N=N.bind(S);else if(typeof N=="object"&&N!==null&&(m(y,L)||m(_,L)))N=f(N,y[L],_[L]);else if(m(_,"*"))N=f(N,y[L],_["*"]);else return Object.defineProperty(k,L,{configurable:!0,enumerable:!0,get(){return S[L]},set(q){S[L]=q}}),N;return k[L]=N,N},set(F,L,U,N){return L in k?k[L]=U:S[L]=U,!0},defineProperty(F,L,U){return Reflect.defineProperty(k,L,U)},deleteProperty(F,L){return Reflect.deleteProperty(k,L)}},I=Object.create(S);return new Proxy(I,v)},T=S=>({addListener(y,_,...k){y.addListener(S.get(_),...k)},hasListener(y,_){return y.hasListener(S.get(_))},removeListener(y,_){y.removeListener(S.get(_))}}),b=new s(S=>typeof S!="function"?S:function(_){let k=f(_,{},{getContent:{minArgs:0,maxArgs:0}});S(k)}),h=new s(S=>typeof S!="function"?S:function(_,k,v){let I=!1,F,L=new Promise(A=>{F=function(E){I=!0,A(E)}}),U;try{U=S(_,k,F)}catch(A){U=Promise.reject(A)}let N=U!==!0&&u(U);if(U!==!0&&!N&&!I)return!1;let q=A=>{A.then(E=>{v(E)},E=>{let P;E&&(E instanceof Error||typeof E.message=="string")?P=E.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(E=>{})};return q(N?U:L),!0}),C=({reject:S,resolve:y},_)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):_&&_.__mozWebExtensionPolyfillReject__?S(new Error(_.message)):y(_)},D=(S,y,_,...k)=>{if(k.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${k.length}`);return new Promise((v,I)=>{let F=C.bind(null,{resolve:v,reject:I});k.push(F),_.sendMessage(...k)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};g6(Sf,{default:()=>nu});var f6=yf(vf());m6(Sf,yf(vf()));var{default:bf,...h6}=f6,nu=bf!==void 0?bf:h6;globalThis.immersiveTranslateBrowserAPI=nu;d();d();d();var su,Fe,Df,b6,ko,xf,Af,au={},kf=[],T6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vr(t,e){for(var n in e)t[n]=e[n];return t}function Pf(t){var e=t.parentNode;e&&e.removeChild(t)}function hd(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?su.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return ru(t,o,r,a,null)}function ru(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Df};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function Ot(t){return t.children}function Ba(t,e){this.props=t,this.context=e}function fi(t,e){if(e==null)return t.__?fi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?ru(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(g=h[c])===null||g&&m.key==g.key&&m.type===g.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:uu}),n.__[t]}function re(t){return Po=1,x6(Gf,t)}function x6(t,e,n){var r=cu(Lo++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Gf(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=xt,!xt.u)){xt.u=!0;var a=xt.shouldComponentUpdate;xt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ce(t,e){var n=cu(Lo++,3);!Fe.__s&&Kf(n.__H,e)&&(n.__=t,n.i=e,xt.__H.__h.push(n))}function je(t){return Po=5,Ne(function(){return{current:t}},[])}function Ne(t,e){var n=cu(Lo++,7);return Kf(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return Po=8,Ne(function(){return t},e)}function du(t){var e=xt.context[t.__c],n=cu(Lo++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(xt)),e.props.value):t.__}function E6(){for(var t;t=Wf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lu),t.__H.__h.forEach(yd),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===Ot?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),xt=null,zf&&zf(t)},Fe.__r=function(t){Nf&&Nf(t),Lo=0;var e=(xt=t.__c).__H;e&&(Td===xt?(e.__h=[],xt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=uu,n.__N=n.i=void 0})):(e.__h.forEach(lu),e.__h.forEach(yd),e.__h=[])),Td=xt},Fe.diffed=function(t){Uf&&Uf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Wf.push(e)!==1&&Of===Fe.requestAnimationFrame||((Of=Fe.requestAnimationFrame)||C6)(E6)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==uu&&(n.__=n.__V),n.i=void 0,n.__V=uu})),Td=xt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lu),n.__h=n.__h.filter(function(r){return!r.__||yd(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),qf&&qf(t,e)},Fe.unmount=function(t){jf&&jf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lu(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var Hf=typeof requestAnimationFrame=="function";function C6(t){var e,n=function(){clearTimeout(r),Hf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Hf&&(e=requestAnimationFrame(n))}function lu(t){var e=xt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),xt=e}function yd(t){var e=xt;t.__c=t.__(),xt=e}function Kf(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Gf(t,e){return typeof e=="function"?e(t):e}d();d();function pu(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let g of p)a[g]||(a[g]=[]),a[g].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Bn(){return we.PROD_API==="1"}function Vf(){return we.HAS_CSP_ERROR=="1"}function ot(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function gu(){return typeof Deno<"u"}var wP=Me().PROD==="1",bi=Me().PROD!=="1";function mu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();var vd=/iPhone/i,$f=/iPod/i,Yf=/iPad/i,Qf=/\biOS-universal(?:.+)Mac\b/i,Sd=/\bAndroid(?:.+)Mobile\b/i,Zf=/Android/i,Ti=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,fu=/Silk/i,Cr=/Windows Phone/i,Jf=/\bWindows(?:.+)ARM\b/i,Xf=/BlackBerry/i,eh=/BB10/i,th=/Opera Mini/i,nh=/\b(CriOS|Chrome)(?:.+)Mobile/i,rh=/Mobile(?:.+)Firefox\b/i,ah=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function w6(t){return e=>e.test(t)}function tt(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=w6(n),i={apple:{phone:a(vd)&&!a(Cr),ipod:a($f),tablet:!a(vd)&&(a(Yf)||ah(e))&&!a(Cr),universal:a(Qf),device:(a(vd)||a($f)||a(Yf)||a(Qf)||ah(e))&&!a(Cr)},amazon:{phone:a(Ti),tablet:!a(Ti)&&a(fu),device:a(Ti)||a(fu)},android:{phone:!a(Cr)&&a(Ti)||!a(Cr)&&a(Sd),tablet:!a(Cr)&&!a(Ti)&&!a(Sd)&&(a(fu)||a(Zf)),device:!a(Cr)&&(a(Ti)||a(fu)||a(Sd)||a(Zf))||a(/\bokhttp\b/i)},windows:{phone:a(Cr),tablet:a(Jf),device:a(Cr)||a(Jf)},other:{blackberry:a(Xf),blackberry10:a(eh),opera:a(th),firefox:a(rh),chrome:a(nh),device:a(Xf)||a(eh)||a(th)||a(rh)||a(nh)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var xd="DENO",hu="CHROME",bu="FIREFOX";function ih(t){let e=hu;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=bu:/deno/i.test(n)&&(e=xd)}catch{}return t===hu&&e===hu||t===bu&&e===bu||t===xd&&e===xd}function D6(){return ih(hu)}function oh(){return typeof Deno<"u"}function Wn(){return ih(bu)}function Tu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function _o(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function sh(){return ye()?"monkey":D6()?"chrome":Wn()?"firefox":ot()?"safari":null}d();var uh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},lh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:uh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:uh,query:()=>{},sendMessage:()=>{}}};var oe;oh()?oe=lh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();var ch={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5145,44 +5145,44 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Ch=[{code:"zh-CN",messages:ch},{code:"zh-TW",messages:dh},{code:"en",messages:ph},{code:"ja",messages:gh},{code:"ar",messages:mh},{code:"de",messages:fh},{code:"es",messages:hh},{code:"fa",messages:bh},{code:"fr",messages:Th},{code:"hi",messages:yh},{code:"it",messages:vh},{code:"ru",messages:Sh},{code:"ko",messages:xh},{code:"pt",messages:Eh}];var Cd="immersiveTranslateBingGlobalState",wd="immersiveTranslateYandexGlobalState",Ot={};for(let t of Ch)Ot[t.code]=t.messages;var Ia="Immersive Translate",Q="immersive-translate",Dh="pdf/index.html";var me="immersiveTranslate";var Ah=me+"GoogleAccessToken",kh=me+"AuthFlow";var q6=me+"AuthState",yu=me+"IframeMessage",yL=me+"WaitForRateLimit",Ph=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",Ra=me+"showError",Lh=me+"DocumentMessageThirdPartyTell",_h=me+"DocumentMessageEventUpload",j6=me+"DocumentMessageHandler",vu=`${me}Share`,_o=`${me}ToggleMouseHoverTranslateDirectly`,Fh=`${me}ReqDraft`,Mh=`${me}ResDraft`,H6=`${me}Container`,Bh=`${me}SpecifiedContainer`,Yr="buildinConfig",Fo="localConfig",Dd="openOptionsPage",Ad="openAboutPage";var kd="openEbookViewer",Pd="openEbookBuilder";var Oa=`${me}PageTranslatedStatus`,vL=`${me}PageUrlChanged`,wr=`${me}ReceiveCommand`,Ih=me+"LastUseMouseHoverTime",Su=me+"LastUseInputTime",Kn=me+"LastUseManualTranslatePageTime",Mo=`${me}PopupReceiveMessage`,W6="immersivetranslate.com",K6="config.immersivetranslate.com",SL=`https://${W6}/`,Bo=`https://${K6}/default_config.json`,xL=`${me}Mark`,Tn=`${me}Root`,Rh=`${me}Walked`,EL=`data-${Q}-walked`,Oh=`${me}Paragraph`,zh=`data-${Q}-paragraph`,ur=`data-${Q}-translation-element-mark`,Nh=`${me}TranslationElementMark`,CL=`${me}TranslatedMark`,Uh=`${me}LoadingId`,Ld=`data-${Q}-loading-id`,qh=`${me}ErrorId`,xu=`data-${Q}-error-id`,G6=`${me}AtomicBlockMark`,jh=`${me}ExcludeMark`,wL=`data-${Q}-exclude-mark`,V6=`${me}StayOriginalMark`,DL=`${me}PreWhitespaceMark`,Eu=`${me}InlineMark`,Hh=`${me}BlockMark`,AL=`${me}Left`,kL=`${me}Right`,PL=`${me}Width`,LL=`${me}Height`,_L=`${me}Top`,FL=`${me}FontSize`,Wh="lastRunTime",ML=`${me}GlobalStyleMark`,Io=["@","#"],Cu=" --- ",Kh=` -`,bt=`${Q}-target-wrapper`,BL=`${Q}-pdf-target-container`,wu=`${Q}-target-inner`,IL=`${Q}-source-wrapper`,_d=`${Q}-target-translation-block-wrapper`,RL=`${Q}-root-translation-theme`,yi=`${me}RootTranslationTheme`,Gh=`${Q}-target-translation-vertical-block-wrapper`,OL=`${Q}-target-translation-pdf-block-wrapper`,Vh=`${Q}-target-translation-pre-whitespace`,Fd=`${Q}-target-translation-inline-wrapper`;var $h={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},wn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Yh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},Qh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},Zh={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Jh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],Xh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],lr="zh-CN";var wh=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Du=["caiyun","cai"],cr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Ch=[{code:"zh-CN",messages:ch},{code:"zh-TW",messages:dh},{code:"en",messages:ph},{code:"ja",messages:gh},{code:"ar",messages:mh},{code:"de",messages:fh},{code:"es",messages:hh},{code:"fa",messages:bh},{code:"fr",messages:Th},{code:"hi",messages:yh},{code:"it",messages:vh},{code:"ru",messages:Sh},{code:"ko",messages:xh},{code:"pt",messages:Eh}];var Ed="immersiveTranslateBingGlobalState",Cd="immersiveTranslateYandexGlobalState",zt={};for(let t of Ch)zt[t.code]=t.messages;var Ia="Immersive Translate",Q="immersive-translate",Dh="pdf/index.html";var me="immersiveTranslate";var Ah=me+"GoogleAccessToken",kh=me+"AuthFlow";var q6=me+"AuthState",yu=me+"IframeMessage",yL=me+"WaitForRateLimit",Ph=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",Ra=me+"showError",Lh=me+"DocumentMessageThirdPartyTell",_h=me+"DocumentMessageEventUpload",j6=me+"DocumentMessageHandler",vu=`${me}Share`,Fo=`${me}ToggleMouseHoverTranslateDirectly`,Fh=`${me}ReqDraft`,Mh=`${me}ResDraft`,H6=`${me}Container`,Bh=`${me}SpecifiedContainer`,Yr="buildinConfig",Mo="localConfig",wd="openOptionsPage",Dd="openAboutPage";var Ad="openEbookViewer",kd="openEbookBuilder";var Oa=`${me}PageTranslatedStatus`,vL=`${me}PageUrlChanged`,wr=`${me}ReceiveCommand`,Ih=me+"LastUseMouseHoverTime",Su=me+"LastUseInputTime",Kn=me+"LastUseManualTranslatePageTime",Bo=`${me}PopupReceiveMessage`,W6="immersivetranslate.com",K6="config.immersivetranslate.com",SL=`https://${W6}/`,Io=`https://${K6}/default_config.json`,xL=`${me}Mark`,Tn=`${me}Root`,Rh=`${me}Walked`,EL=`data-${Q}-walked`,Oh=`${me}Paragraph`,zh=`data-${Q}-paragraph`,ur=`data-${Q}-translation-element-mark`,Nh=`${me}TranslationElementMark`,CL=`${me}TranslatedMark`,Uh=`${me}LoadingId`,Pd=`data-${Q}-loading-id`,qh=`${me}ErrorId`,xu=`data-${Q}-error-id`,G6=`${me}AtomicBlockMark`,jh=`${me}ExcludeMark`,wL=`data-${Q}-exclude-mark`,V6=`${me}StayOriginalMark`,DL=`${me}PreWhitespaceMark`,Eu=`${me}InlineMark`,Hh=`${me}BlockMark`,AL=`${me}Left`,kL=`${me}Right`,PL=`${me}Width`,LL=`${me}Height`,_L=`${me}Top`,FL=`${me}FontSize`,Wh="lastRunTime",ML=`${me}GlobalStyleMark`,Ro=["@","#"],Cu=" --- ",Kh=` +`,bt=`${Q}-target-wrapper`,BL=`${Q}-pdf-target-container`,wu=`${Q}-target-inner`,IL=`${Q}-source-wrapper`,Ld=`${Q}-target-translation-block-wrapper`,RL=`${Q}-root-translation-theme`,yi=`${me}RootTranslationTheme`,Gh=`${Q}-target-translation-vertical-block-wrapper`,OL=`${Q}-target-translation-pdf-block-wrapper`,Vh=`${Q}-target-translation-pre-whitespace`,_d=`${Q}-target-translation-inline-wrapper`;var $h={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},wn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Yh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},Qh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},Zh={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Jh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],Xh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],lr="zh-CN";var wh=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Du=["caiyun","cai"],cr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Io,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...wh,{type:"password",name:"apikey",required:!0}],props:wh},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Au={type:me+"ChildFrameToRootFrameIdentifier"},Md=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],Ro=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],e4=["ctrl","alt","shift","cmd","command","option","control"];var zL=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",Bd="user_from_plugin",Ft="user_info",Oo=Qt()||Bn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",t4=Qt()||Bn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",n4=t4+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",r4=t4+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",ku=Qt()||Bn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",vi=Qt()||Bn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",$6=Qt()||Bn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",Y6=Qt()||Bn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",Q6=Qt()||Bn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",Z6=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",NL=$6+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",a4=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Pu=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",i4=Y6+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",o4=Q6+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",s4=ku+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",u4="https://immersivetranslate.com/docs/usage/";var l4=Me().TRANSLATE_FILE_URL,UL=l4+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",c4=l4+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";function d4(t){let e=oe.runtime.getURL(Dh),n=new URL(e);return t&&(t.startsWith("http")||!Wn())&&n.searchParams.set("file",t),n.href}d();d();function Zt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function p4(t){if(t){let e=new Date(t.createTime),n=J6(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function J6(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var za=me+"CacheKey_";function Id(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function X6(){let t=oe.storage.local.refresh;t&&t()}function Rd(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(za)).filter(r=>r!==za+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Id,set:zd,getExpired:Rd,setExpired:Od,remove:Nd,clear:g4,refresh:X6};d();d();d();d();d();d();function Si(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Ud=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Lu(t,e){let n=Si(),r=setTimeout(()=>n.reject(new Ud),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function Dr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var m4=class{#e=0;#t=[];#n=[];#r=Si();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eDS,bgBlue:()=>LS,bgBrightBlack:()=>BS,bgBrightBlue:()=>zS,bgBrightCyan:()=>US,bgBrightGreen:()=>RS,bgBrightMagenta:()=>NS,bgBrightRed:()=>IS,bgBrightWhite:()=>qS,bgBrightYellow:()=>OS,bgCyan:()=>FS,bgGreen:()=>kS,bgMagenta:()=>_S,bgRed:()=>AS,bgRgb24:()=>KS,bgRgb8:()=>HS,bgWhite:()=>MS,bgYellow:()=>PS,black:()=>cS,blue:()=>mS,bold:()=>rS,brightBlack:()=>b4,brightBlue:()=>xS,brightCyan:()=>CS,brightGreen:()=>vS,brightMagenta:()=>ES,brightRed:()=>yS,brightWhite:()=>wS,brightYellow:()=>SS,cyan:()=>hS,dim:()=>aS,getColorEnabled:()=>tS,gray:()=>TS,green:()=>pS,hidden:()=>uS,inverse:()=>sS,italic:()=>iS,magenta:()=>fS,red:()=>dS,reset:()=>nS,rgb24:()=>WS,rgb8:()=>jS,setColorEnabled:()=>eS,strikethrough:()=>lS,stripColor:()=>VS,underline:()=>oS,white:()=>bS,yellow:()=>gS});d();var{Deno:f4}=globalThis,h4=typeof f4?.noColor=="boolean"?f4.noColor:!0,qd=!h4;function eS(t){h4||(qd=t)}function tS(){return qd}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return qd?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function nS(t){return Pe(t,ke([0],0))}function rS(t){return Pe(t,ke([1],22))}function aS(t){return Pe(t,ke([2],22))}function iS(t){return Pe(t,ke([3],23))}function oS(t){return Pe(t,ke([4],24))}function sS(t){return Pe(t,ke([7],27))}function uS(t){return Pe(t,ke([8],28))}function lS(t){return Pe(t,ke([9],29))}function cS(t){return Pe(t,ke([30],39))}function dS(t){return Pe(t,ke([31],39))}function pS(t){return Pe(t,ke([32],39))}function gS(t){return Pe(t,ke([33],39))}function mS(t){return Pe(t,ke([34],39))}function fS(t){return Pe(t,ke([35],39))}function hS(t){return Pe(t,ke([36],39))}function bS(t){return Pe(t,ke([37],39))}function TS(t){return b4(t)}function b4(t){return Pe(t,ke([90],39))}function yS(t){return Pe(t,ke([91],39))}function vS(t){return Pe(t,ke([92],39))}function SS(t){return Pe(t,ke([93],39))}function xS(t){return Pe(t,ke([94],39))}function ES(t){return Pe(t,ke([95],39))}function CS(t){return Pe(t,ke([96],39))}function wS(t){return Pe(t,ke([97],39))}function DS(t){return Pe(t,ke([40],49))}function AS(t){return Pe(t,ke([41],49))}function kS(t){return Pe(t,ke([42],49))}function PS(t){return Pe(t,ke([43],49))}function LS(t){return Pe(t,ke([44],49))}function _S(t){return Pe(t,ke([45],49))}function FS(t){return Pe(t,ke([46],49))}function MS(t){return Pe(t,ke([47],49))}function BS(t){return Pe(t,ke([100],49))}function IS(t){return Pe(t,ke([101],49))}function RS(t){return Pe(t,ke([102],49))}function OS(t){return Pe(t,ke([103],49))}function zS(t){return Pe(t,ke([104],49))}function NS(t){return Pe(t,ke([105],49))}function US(t){return Pe(t,ke([106],49))}function qS(t){return Pe(t,ke([107],49))}function Qr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function jS(t,e){return Pe(t,ke([38,5,Qr(e)],39))}function HS(t,e){return Pe(t,ke([48,5,Qr(e)],49))}function WS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Qr(e.r),Qr(e.g),Qr(e.b)],39))}function KS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Qr(e.r),Qr(e.g),Qr(e.b)],49))}var GS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function VS(t){return t.replace(GS,"")}d();d();var jd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},$S={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Hd(t,e){let n={...$S,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new jd(a,n.maxAttempts)}d();var Ar=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Wd(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2|e[r]>>6],n+=Ar[e[r]&63];return r===a+1&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2],n+="="),n}d();d();var YS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,QS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ZS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Kd={Space_Separator:YS,ID_Start:QS,ID_Continue:ZS},Et={isSpaceSeparator(t){return typeof t=="string"&&Kd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Kd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Kd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Vd,ln,Pr,Fu,Zr,Gn,zt,Qd,No,JS=function(t,e){Vd=String(t),ln="start",Pr=[],Fu=0,Zr=1,Gn=0,zt=void 0,Qd=void 0,No=void 0;do zt=XS(),nx[ln]();while(zt.type!=="eof");return typeof e=="function"?$d({"":No},"",e):No};function $d(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;ar[n]===void 0?e:r[n])}function X6(){let t=oe.storage.local.refresh;t&&t()}function Id(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(za)).filter(r=>r!==za+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Bd,set:Od,getExpired:Id,setExpired:Rd,remove:zd,clear:g4,refresh:X6};d();d();d();d();d();d();function Si(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Nd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Lu(t,e){let n=Si(),r=setTimeout(()=>n.reject(new Nd),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function Dr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var m4=class{#e=0;#t=[];#n=[];#r=Si();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eDS,bgBlue:()=>LS,bgBrightBlack:()=>BS,bgBrightBlue:()=>zS,bgBrightCyan:()=>US,bgBrightGreen:()=>RS,bgBrightMagenta:()=>NS,bgBrightRed:()=>IS,bgBrightWhite:()=>qS,bgBrightYellow:()=>OS,bgCyan:()=>FS,bgGreen:()=>kS,bgMagenta:()=>_S,bgRed:()=>AS,bgRgb24:()=>KS,bgRgb8:()=>HS,bgWhite:()=>MS,bgYellow:()=>PS,black:()=>cS,blue:()=>mS,bold:()=>rS,brightBlack:()=>b4,brightBlue:()=>xS,brightCyan:()=>CS,brightGreen:()=>vS,brightMagenta:()=>ES,brightRed:()=>yS,brightWhite:()=>wS,brightYellow:()=>SS,cyan:()=>hS,dim:()=>aS,getColorEnabled:()=>tS,gray:()=>TS,green:()=>pS,hidden:()=>uS,inverse:()=>sS,italic:()=>iS,magenta:()=>fS,red:()=>dS,reset:()=>nS,rgb24:()=>WS,rgb8:()=>jS,setColorEnabled:()=>eS,strikethrough:()=>lS,stripColor:()=>VS,underline:()=>oS,white:()=>bS,yellow:()=>gS});d();var{Deno:f4}=globalThis,h4=typeof f4?.noColor=="boolean"?f4.noColor:!0,Ud=!h4;function eS(t){h4||(Ud=t)}function tS(){return Ud}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return Ud?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function nS(t){return Pe(t,ke([0],0))}function rS(t){return Pe(t,ke([1],22))}function aS(t){return Pe(t,ke([2],22))}function iS(t){return Pe(t,ke([3],23))}function oS(t){return Pe(t,ke([4],24))}function sS(t){return Pe(t,ke([7],27))}function uS(t){return Pe(t,ke([8],28))}function lS(t){return Pe(t,ke([9],29))}function cS(t){return Pe(t,ke([30],39))}function dS(t){return Pe(t,ke([31],39))}function pS(t){return Pe(t,ke([32],39))}function gS(t){return Pe(t,ke([33],39))}function mS(t){return Pe(t,ke([34],39))}function fS(t){return Pe(t,ke([35],39))}function hS(t){return Pe(t,ke([36],39))}function bS(t){return Pe(t,ke([37],39))}function TS(t){return b4(t)}function b4(t){return Pe(t,ke([90],39))}function yS(t){return Pe(t,ke([91],39))}function vS(t){return Pe(t,ke([92],39))}function SS(t){return Pe(t,ke([93],39))}function xS(t){return Pe(t,ke([94],39))}function ES(t){return Pe(t,ke([95],39))}function CS(t){return Pe(t,ke([96],39))}function wS(t){return Pe(t,ke([97],39))}function DS(t){return Pe(t,ke([40],49))}function AS(t){return Pe(t,ke([41],49))}function kS(t){return Pe(t,ke([42],49))}function PS(t){return Pe(t,ke([43],49))}function LS(t){return Pe(t,ke([44],49))}function _S(t){return Pe(t,ke([45],49))}function FS(t){return Pe(t,ke([46],49))}function MS(t){return Pe(t,ke([47],49))}function BS(t){return Pe(t,ke([100],49))}function IS(t){return Pe(t,ke([101],49))}function RS(t){return Pe(t,ke([102],49))}function OS(t){return Pe(t,ke([103],49))}function zS(t){return Pe(t,ke([104],49))}function NS(t){return Pe(t,ke([105],49))}function US(t){return Pe(t,ke([106],49))}function qS(t){return Pe(t,ke([107],49))}function Qr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function jS(t,e){return Pe(t,ke([38,5,Qr(e)],39))}function HS(t,e){return Pe(t,ke([48,5,Qr(e)],49))}function WS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Qr(e.r),Qr(e.g),Qr(e.b)],39))}function KS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Qr(e.r),Qr(e.g),Qr(e.b)],49))}var GS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function VS(t){return t.replace(GS,"")}d();d();var qd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},$S={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function jd(t,e){let n={...$S,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new qd(a,n.maxAttempts)}d();var Ar=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Hd(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2|e[r]>>6],n+=Ar[e[r]&63];return r===a+1&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2],n+="="),n}d();d();var YS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,QS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ZS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Wd={Space_Separator:YS,ID_Start:QS,ID_Continue:ZS},Et={isSpaceSeparator(t){return typeof t=="string"&&Wd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Wd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Wd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Gd,ln,Pr,Fu,Zr,Gn,Nt,Yd,Uo,JS=function(t,e){Gd=String(t),ln="start",Pr=[],Fu=0,Zr=1,Gn=0,Nt=void 0,Yd=void 0,Uo=void 0;do Nt=XS(),nx[ln]();while(Nt.type!=="eof");return typeof e=="function"?Vd({"":Uo},"",e):Uo};function Vd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Lr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var nx={start(){if(zt.type==="eof")throw Ua();Gd()},beforePropertyName(){switch(zt.type){case"identifier":case"string":Qd=zt.value,ln="afterPropertyName";return;case"punctuator":_u();return;case"eof":throw Ua()}},afterPropertyName(){if(zt.type==="eof")throw Ua();ln="beforePropertyValue"},beforePropertyValue(){if(zt.type==="eof")throw Ua();Gd()},beforeArrayValue(){if(zt.type==="eof")throw Ua();if(zt.type==="punctuator"&&zt.value==="]"){_u();return}Gd()},afterPropertyValue(){if(zt.type==="eof")throw Ua();switch(zt.value){case",":ln="beforePropertyName";return;case"}":_u()}},afterArrayValue(){if(zt.type==="eof")throw Ua();switch(zt.value){case",":ln="beforeArrayValue";return;case"]":_u()}},end(){}};function Gd(){let t;switch(zt.type){case"punctuator":switch(zt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=zt.value;break}if(No===void 0)No=t;else{let e=Pr[Pr.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Qd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Pr.push(t),Array.isArray(t)?ln="beforeArrayValue":ln="beforePropertyName";else{let e=Pr[Pr.length-1];e==null?ln="end":Array.isArray(e)?ln="afterArrayValue":ln="afterPropertyValue"}}function _u(){Pr.pop();let t=Pr[Pr.length-1];t==null?ln="end":Array.isArray(t)?ln="afterArrayValue":ln="afterPropertyValue"}function ct(t){return Zd(t===void 0?`JSON5: invalid end of input at ${Zr}:${Gn}`:`JSON5: invalid character '${rx(t)}' at ${Zr}:${Gn}`)}function Ua(){return Zd(`JSON5: invalid end of input at ${Zr}:${Gn}`)}function T4(){return Gn-=5,Zd(`JSON5: invalid identifier character at ${Zr}:${Gn}`)}function rx(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Zd(t){let e=new SyntaxError(t);return e.lineNumber=Zr,e.columnNumber=Gn,e}var ax=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?m(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let B=g(D)+":";s!==""&&(B+=" "),B+=M,h.push(B)}}let C;if(h.length===0)C="{}";else{let D;if(s==="")D=h.join(","),C="{"+D+"}";else{let M=`, +`&&K(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ct(K());case void 0:throw ct(K())}return K()}function tx(){let t="",e=Lr();if(!Et.isHexDigit(e)||(t+=K(),e=Lr(),!Et.isHexDigit(e)))throw ct(K());return t+=K(),String.fromCodePoint(parseInt(t,16))}function $d(){let t="",e=4;for(;e-- >0;){let n=Lr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var nx={start(){if(Nt.type==="eof")throw Ua();Kd()},beforePropertyName(){switch(Nt.type){case"identifier":case"string":Yd=Nt.value,ln="afterPropertyName";return;case"punctuator":_u();return;case"eof":throw Ua()}},afterPropertyName(){if(Nt.type==="eof")throw Ua();ln="beforePropertyValue"},beforePropertyValue(){if(Nt.type==="eof")throw Ua();Kd()},beforeArrayValue(){if(Nt.type==="eof")throw Ua();if(Nt.type==="punctuator"&&Nt.value==="]"){_u();return}Kd()},afterPropertyValue(){if(Nt.type==="eof")throw Ua();switch(Nt.value){case",":ln="beforePropertyName";return;case"}":_u()}},afterArrayValue(){if(Nt.type==="eof")throw Ua();switch(Nt.value){case",":ln="beforeArrayValue";return;case"]":_u()}},end(){}};function Kd(){let t;switch(Nt.type){case"punctuator":switch(Nt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Nt.value;break}if(Uo===void 0)Uo=t;else{let e=Pr[Pr.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Yd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Pr.push(t),Array.isArray(t)?ln="beforeArrayValue":ln="beforePropertyName";else{let e=Pr[Pr.length-1];e==null?ln="end":Array.isArray(e)?ln="afterArrayValue":ln="afterPropertyValue"}}function _u(){Pr.pop();let t=Pr[Pr.length-1];t==null?ln="end":Array.isArray(t)?ln="afterArrayValue":ln="afterPropertyValue"}function ct(t){return Qd(t===void 0?`JSON5: invalid end of input at ${Zr}:${Gn}`:`JSON5: invalid character '${rx(t)}' at ${Zr}:${Gn}`)}function Ua(){return Qd(`JSON5: invalid end of input at ${Zr}:${Gn}`)}function T4(){return Gn-=5,Qd(`JSON5: invalid identifier character at ${Zr}:${Gn}`)}function rx(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Qd(t){let e=new SyntaxError(t);return e.lineNumber=Zr,e.columnNumber=Gn,e}var ax=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?m(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let B=g(D)+":";s!==""&&(B+=" "),B+=M,h.push(B)}}let C;if(h.length===0)C="{}";else{let D;if(s==="")D=h.join(","),C="{"+D+"}";else{let M=`, `+a;D=h.join(M),C=`{ `+a+D+`, `+T+"}"}}return r.pop(),a=T,C}function g(f){if(f.length===0)return c(f,!0);let T=String.fromCodePoint(f.codePointAt(0));if(!Et.isIdStartChar(T))return c(f,!0);for(let b=T.length;b=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=[];for(let C=0;C()=>(e||t((e={exports:{}}).exports,e),e.exports),mx=(t,e)=>{for(var n in e)Xd(t,n,{get:e[n],enumerable:!0})},Jd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of cx(e))!px.call(t,a)&&a!==n&&Xd(t,a,{get:()=>e[a],enumerable:!(r=lx(e,a))||r.enumerable});return t},fx=(t,e,n)=>(Jd(t,e,"default"),n&&Jd(n,e,"default")),S4=(t,e,n)=>(n=t!=null?ux(dx(t)):{},Jd(e||!t||!t.__esModule?Xd(n,"default",{value:t,enumerable:!0}):n,t)),x4=gx((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Bu=="object"&&Bu&&Bu.Object===Object&&Bu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(_,k,v){var I,F,L,U,N,q,A=0,E=!1,P=!1,O=!0;if(typeof _!="function")throw new TypeError(n);k=y(k)||0,M(v)&&(E=!!v.leading,P="maxWait"in v,L=P?T(y(v.maxWait)||0,k):L,O="trailing"in v?!!v.trailing:O);function H(te){var Y=I,be=F;return I=F=void 0,A=te,U=_.apply(be,Y),U}function j(te){return A=te,N=setTimeout(se,k),E?H(te):U}function W(te){var Y=te-q,be=te-A,ae=k-Y;return P?b(ae,L-be):ae}function V(te){var Y=te-q,be=te-A;return q===void 0||Y>=k||Y<0||P&&be>=L}function se(){var te=h();if(V(te))return X(te);N=setTimeout(se,W(te))}function X(te){return N=void 0,O&&I?H(te):(I=F=void 0,U)}function Z(){N!==void 0&&clearTimeout(N),A=0,I=q=F=N=void 0}function ue(){return N===void 0?U:X(h())}function ge(){var te=h(),Y=V(te);if(I=arguments,F=this,q=te,Y){if(N===void 0)return j(q);if(P)return N=setTimeout(se,k),H(q)}return N===void 0&&(N=setTimeout(se,k)),U}return ge.cancel=Z,ge.flush=ue,ge}function D(_,k,v){var I=!0,F=!0;if(typeof _!="function")throw new TypeError(n);return M(v)&&(I="leading"in v?!!v.leading:I,F="trailing"in v?!!v.trailing:F),C(_,k,{leading:I,maxWait:k,trailing:F})}function M(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function B(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||B(_)&&f.call(_)==a}function y(_){if(typeof _=="number")return _;if(S(_))return r;if(M(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=M(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(i,"");var v=s.test(_);return v||u.test(_)?l(_.slice(2),v?2:8):o.test(_)?r:+_}e.exports=D}),E4={};mx(E4,{default:()=>Vn});var hx=S4(x4());fx(E4,S4(x4()));var{default:v4,...bx}=hx,Vn=v4!==void 0?v4:bx;d();d();var Iu=globalThis||(typeof window<"u"?window:self),Tx=Object.create,t0=Object.defineProperty,yx=Object.getOwnPropertyDescriptor,vx=Object.getOwnPropertyNames,Sx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Ex=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cx=(t,e)=>{for(var n in e)t0(t,n,{get:e[n],enumerable:!0})},e0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vx(e))!xx.call(t,a)&&a!==n&&t0(t,a,{get:()=>e[a],enumerable:!(r=yx(e,a))||r.enumerable});return t},wx=(t,e,n)=>(e0(t,e,"default"),n&&e0(n,e,"default")),w4=(t,e,n)=>(n=t!=null?Tx(Sx(t)):{},e0(e||!t||!t.__esModule?t0(n,"default",{value:t,enumerable:!0}):n,t)),D4=Ex((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(y,_,k){var v,I,F,L,U,N,q=0,A=!1,E=!1,P=!0;if(typeof y!="function")throw new TypeError(n);_=S(_)||0,D(k)&&(A=!!k.leading,E="maxWait"in k,F=E?T(S(k.maxWait)||0,_):F,P="trailing"in k?!!k.trailing:P);function O(ge){var te=v,Y=I;return v=I=void 0,q=ge,L=y.apply(Y,te),L}function H(ge){return q=ge,U=setTimeout(V,_),A?O(ge):L}function j(ge){var te=ge-N,Y=ge-q,be=_-te;return E?b(be,F-Y):be}function W(ge){var te=ge-N,Y=ge-q;return N===void 0||te>=_||te<0||E&&Y>=F}function V(){var ge=h();if(W(ge))return se(ge);U=setTimeout(V,j(ge))}function se(ge){return U=void 0,P&&v?O(ge):(v=I=void 0,L)}function X(){U!==void 0&&clearTimeout(U),q=0,v=N=I=U=void 0}function Z(){return U===void 0?L:se(h())}function ue(){var ge=h(),te=W(ge);if(v=arguments,I=this,N=ge,te){if(U===void 0)return H(N);if(E)return U=setTimeout(V,_),O(N)}return U===void 0&&(U=setTimeout(V,_)),L}return ue.cancel=X,ue.flush=Z,ue}function D(y){var _=typeof y;return!!y&&(_=="object"||_=="function")}function M(y){return!!y&&typeof y=="object"}function B(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(B(y))return r;if(D(y)){var _=typeof y.valueOf=="function"?y.valueOf():y;y=D(_)?_+"":_}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var k=s.test(y);return k||u.test(y)?l(y.slice(2),k?2:8):o.test(y)?r:+y}e.exports=C}),A4={};Cx(A4,{default:()=>Uo});var Dx=w4(D4());wx(A4,w4(D4()));var{default:C4,...Ax}=Dx,Uo=C4!==void 0?C4:Ax;d();d();var kx=Object.create,r0=Object.defineProperty,Px=Object.getOwnPropertyDescriptor,Lx=Object.getOwnPropertyNames,_x=Object.getPrototypeOf,Fx=Object.prototype.hasOwnProperty,Mx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bx=(t,e)=>{for(var n in e)r0(t,n,{get:e[n],enumerable:!0})},n0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Lx(e))!Fx.call(t,a)&&a!==n&&r0(t,a,{get:()=>e[a],enumerable:!(r=Px(e,a))||r.enumerable});return t},Ix=(t,e,n)=>(n0(t,e,"default"),n&&n0(n,e,"default")),P4=(t,e,n)=>(n=t!=null?kx(_x(t)):{},n0(e||!t||!t.__esModule?r0(n,"default",{value:t,enumerable:!0}):n,t)),L4=Mx((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(m){if(g[m])return g[m].exports;var f=g[m]={i:m,l:!1,exports:{}};return c[m].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var g={};return p.m=c,p.c=g,p.i=function(m){return m},p.d=function(m,f,T){p.o(m,f)||Object.defineProperty(m,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(m){var f=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(f,"a",f),f},p.o=function(m,f){return Object.prototype.hasOwnProperty.call(m,f)},p.p="",p(p.s=0)}([function(c,p,g){function m(j,W){var V={};for(var se in j)W.indexOf(se)>=0||Object.prototype.hasOwnProperty.call(j,se)&&(V[se]=j[se]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+se+"
",be.onclick=function(){return F(ae,Y)},be.listener=function(ie){(k(ie)||v(ie))&&N()},I(be,Y),Z&&Z<1&&(Z=1),!ge&&Z&&M(Z).then(function(){return F(ae,Y)})},A=p.force=function(j,W){var V=j.type,se=V===void 0?5:V,X=j.text,Z=j.buttonText,ue=Z===void 0?"OK":Z,ge=j.callback,te=j.position,Y=te===void 0?h.positions.force||Y.top:te;B(),N();var be=document.createElement("div"),ae=S();be.id=ae;var ie=document.createElement("div");ie.classList.add(h.classes.textbox),ie.classList.add(h.classes.backgroundInfo),ie.innerHTML='
'+X+"
";var Ee=document.createElement("div");Ee.classList.add(h.classes.button),Ee.classList.add(y[se]),Ee.innerHTML=ue,Ee.onclick=function(){F(ae,Y),U(),ge?ge():W&&W()},be.appendChild(ie),be.appendChild(Ee),be.listener=function(ze){k(ze)&&Ee.click()},I(be,Y),L()},E=p.confirm=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Yes":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,be=j.position,ae=be===void 0?h.positions.confirm||ae.top:be;B(),N();var ie=document.createElement("div"),Ee=S();ie.id=Ee;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+se+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=Z,_e.onclick=function(){F(Ee,ae),U(),te?te():W&&W()};var ce=document.createElement("div");ce.classList.add(h.classes.button),ce.classList.add(h.classes.elementHalf),ce.classList.add(h.classes.backgroundError),ce.innerHTML=ge,ce.onclick=function(){F(Ee,ae),U(),Y?Y():V&&V()},ie.appendChild(ze),ie.appendChild(_e),ie.appendChild(ce),ie.listener=function(pt){k(pt)?_e.click():v(pt)&&ce.click()},I(ie,ae),L(ie,ae)},P=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Submit":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,be=j.position,ae=be===void 0?h.positions.input||ae.top:be,ie=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);B(),N();var Ee=document.createElement("div"),ze=S();Ee.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+se+"
";var ce=document.createElement("input");ce.classList.add(h.classes.inputField),ce.setAttribute("autocapitalize",ie.autocapitalize||"none"),ce.setAttribute("autocomplete",ie.autocomplete||"off"),ce.setAttribute("autocorrect",ie.autocorrect||"off"),ce.setAttribute("autofocus",ie.autofocus||"true"),ce.setAttribute("inputmode",ie.inputmode||"verbatim"),ce.setAttribute("max",ie.max||""),ce.setAttribute("maxlength",ie.maxlength||""),ce.setAttribute("min",ie.min||""),ce.setAttribute("minlength",ie.minlength||""),ce.setAttribute("placeholder",ie.placeholder||""),ce.setAttribute("spellcheck",ie.spellcheck||"default"),ce.setAttribute("step",ie.step||"any"),ce.setAttribute("type",ie.type||"text"),ce.value=ie.value||"",ie.allowed&&(ce.oninput=function(){var ht=void 0;if(Array.isArray(ie.allowed)){for(var St="",on=ie.allowed,Mn=0;Mn'+V+"",Y.appendChild(ae),ue.forEach(function(Ee,ze){var _e=Ee.type,ce=_e===void 0?1:_e,pt=Ee.text,Pt=Ee.handler,ht=document.createElement("div");ht.classList.add(y[ce]),ht.classList.add(h.classes.button),ht.classList.add(h.classes.selectChoice);var St=ue[ze+1];St&&!St.type&&(St.type=1),St&&St.type===ce&&ht.classList.add(h.classes.selectChoiceRepeated),ht.innerHTML=pt,ht.onclick=function(){F(be,te),U(),Pt()},Y.appendChild(ht)});var ie=document.createElement("div");ie.classList.add(h.classes.backgroundNeutral),ie.classList.add(h.classes.button),ie.innerHTML=X,ie.onclick=function(){F(be,te),U(),Z?Z():W&&W()},Y.appendChild(ie),Y.listener=function(Ee){v(Ee)&&ie.click()},I(Y,te),L(Y,te)},H=p.date=function(j,W,V){var se=j.value,X=se===void 0?new Date:se,Z=j.submitText,ue=Z===void 0?"OK":Z,ge=j.cancelText,te=ge===void 0?"Cancel":ge,Y=j.submitCallback,be=j.cancelCallback,ae=j.position,ie=ae===void 0?h.positions.date||ie.top:ae;B(),N();var Ee="▾",ze=document.createElement("div"),_e=document.createElement("div"),ce=document.createElement("div"),pt=function(gt){ze.innerHTML=h.dateMonths[gt.getMonth()],_e.innerHTML=gt.getDate(),ce.innerHTML=gt.getFullYear()},Pt=function(gt){var Qe=new Date(X.getFullYear(),X.getMonth()+1,0).getDate(),Cn=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Cn)>Qe&&(Cn=Qe.toString()),gt.target.textContent=Cn,Number(Cn)<1&&(Cn="1"),X.setDate(Number(Cn))},ht=function(gt){var Qe=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);gt.target.textContent=Qe,X.setFullYear(Number(Qe))},St=function(gt){pt(X)},on=function(gt){var Qe=new Date(X.getFullYear(),X.getMonth()+gt+1,0).getDate();X.getDate()>Qe&&X.setDate(Qe),X.setMonth(X.getMonth()+gt),pt(X)},Mn=function(gt){X.setDate(X.getDate()+gt),pt(X)},Do=function(gt){var Qe=X.getFullYear()+gt;Qe<0?X.setFullYear(0):X.setFullYear(X.getFullYear()+gt),pt(X)},sr=document.createElement("div"),Fa=S();sr.id=Fa;var pi=document.createElement("div");pi.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=Ee;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=Ee;var En=document.createElement("div");En.classList.add(h.classes.button),En.classList.add(h.classes.elementThird),En.classList.add(h.classes.dateSelectorUp),En.innerHTML=Ee,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[X.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",St),_e.innerHTML=X.getDate(),ce.classList.add(h.classes.element),ce.classList.add(h.classes.elementThird),ce.setAttribute("contentEditable",!0),ce.addEventListener("input",ht),ce.addEventListener("blur",St),ce.innerHTML=X.getFullYear();var vr=document.createElement("div");vr.classList.add(h.classes.button),vr.classList.add(h.classes.elementThird),vr.innerHTML=Ee;var Sr=document.createElement("div");Sr.classList.add(h.classes.button),Sr.classList.add(h.classes.elementThird),Sr.innerHTML=Ee;var Ma=document.createElement("div");Ma.classList.add(h.classes.button),Ma.classList.add(h.classes.elementThird),Ma.innerHTML=Ee,Hn.onclick=function(){return on(1)},Yt.onclick=function(){return Mn(1)},En.onclick=function(){return Do(1)},vr.onclick=function(){return on(-1)},Sr.onclick=function(){return Mn(-1)},Ma.onclick=function(){return Do(-1)};var sn=document.createElement("div");sn.classList.add(h.classes.button),sn.classList.add(h.classes.elementHalf),sn.classList.add(h.classes.backgroundSuccess),sn.innerHTML=ue,sn.onclick=function(){F(Fa,ie),U(),Y?Y(X):W&&W(X)};var xr=document.createElement("div");xr.classList.add(h.classes.button),xr.classList.add(h.classes.elementHalf),xr.classList.add(h.classes.backgroundError),xr.innerHTML=te,xr.onclick=function(){F(Fa,ie),U(),be?be(X):V&&V(X)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(En),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(ce),$t.appendChild(vr),$t.appendChild(Sr),$t.appendChild(Ma),pi.appendChild($t),sr.appendChild(pi),sr.appendChild(sn),sr.appendChild(xr),sr.listener=function(gt){k(gt)?sn.click():v(gt)&&xr.click()},I(sr,ie),L(sr,ie)};p.default={alert:q,force:A,confirm:E,input:P,select:O,date:H,setOptions:C,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),_4={};Bx(_4,{default:()=>Ru});var Rx=P4(L4());Ix(_4,P4(L4()));var{default:k4,...Ox}=Rx,Ru=k4!==void 0?k4:Ox;d();d();var Ou=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function qo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function a0(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function F4(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;ixi[t.toLowerCase()]||$n[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),zx=t=>Object.keys(xi).find(e=>xi[e]===t),Nx=t=>Object.keys($n).find(e=>$n[e]===t);function z4(t){R4=t||"all"}function jo(){return R4||"all"}function Ux(){return tt.slice(0)}function qx(){return tt.map(t=>zx(t)||Nx(t)||String.fromCharCode(t))}function jx(){let t=[];return Object.keys(mt).forEach(e=>{mt[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Ho(o))})})}),t}function Hx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function Wx(t){return typeof t=="string"&&(t=Ho(t)),tt.indexOf(t)!==-1}function Kx(t,e){let n,r;t||(t=jo());for(let a in mt)if(Object.prototype.hasOwnProperty.call(mt,a))for(n=mt[a],r=0;r=0&&tt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&tt.splice(0,tt.length),(e===93||e===224)&&(e=91),e in Nt){Nt[e]=!1;for(let r in $n)$n[r]===e&&(_r[r]=!1)}}function N4(t,...e){if(typeof t>"u")Object.keys(mt).forEach(n=>delete mt[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&o0(n)});else if(typeof t=="object")t.key&&o0(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),o0({key:t,scope:n,method:r,splitKey:"+"})}}var o0=({key:t,scope:e,method:n,splitKey:r="+"})=>{i0(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Ho(u);if(!mt[l])return;e||(e=jo());let c=s>1?a0($n,o):[];mt[l]=mt[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&F4(p.mods,c)))})};function B4(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Nt)Object.prototype.hasOwnProperty.call(Nt,i)&&(!Nt[i]&&e.mods.indexOf(+i)>-1||Nt[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Nt[16]&&!Nt[18]&&!Nt[17]&&!Nt[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(tt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function I4(t,e){let n=mt["*"],r=t.keyCode||t.which||t.charCode;if(!_r.filter.call(this,t))return;if((r===93||r===224)&&(r=91),tt.indexOf(r)===-1&&r!==229&&tt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=zu[i];t[i]&&tt.indexOf(o)===-1?tt.push(o):!t[i]&&tt.indexOf(o)>-1?tt.splice(tt.indexOf(o),1):i==="metaKey"&&t[i]&&tt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(tt=tt.slice(tt.indexOf(o))))}),r in Nt){Nt[r]=!0;for(let i in $n)$n[i]===r&&(_r[i]=!0);if(!n)return}for(let i in Nt)Object.prototype.hasOwnProperty.call(Nt,i)&&(Nt[i]=t[zu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(tt.indexOf(17)===-1&&tt.push(17),tt.indexOf(18)===-1&&tt.push(18),Nt[17]=!0,Nt[18]=!0);let a=jo();if(n)for(let i=0;i-1}function _r(t,e,n){tt=[];let r=i0(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,g=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(g=!0)),typeof e=="string"&&(i=e),g&&N4(t,i);s1&&(a=a0($n,t)),t=t[t.length-1],t=t==="*"?"*":Ho(t),t in mt||(mt[t]=[]),mt[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!Vx(o)&&window&&(O4.push(o),qo(o,"keydown",m=>{I4(m,o)},p),M4||(M4=!0,qo(window,"focus",()=>{tt=[]},p),qo(window,"click",()=>{tt=[]},!1)),qo(o,"keyup",m=>{I4(m,o),Gx(m)},p))}function $x(t,e="all"){Object.keys(mt).forEach(n=>{mt[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var s0={getPressedKeyString:qx,setScope:z4,getScope:jo,deleteScope:Kx,getPressedKeyCodes:Ux,getAllKeyCodes:jx,isPressed:Wx,filter:Hx,trigger:$x,unbind:N4,keyMap:xi,modifier:$n,modifierMap:zu};for(let t in s0)Object.prototype.hasOwnProperty.call(s0,t)&&(_r[t]=s0[t]);if(typeof window<"u"){let t=window.hotkeys;_r.noConflict=e=>(e&&window.hotkeys===_r&&(window.hotkeys=t),_r),window.hotkeys=_r}var yn=_r;d();d();var Yx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},q4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},cn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Jr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return Yx[t]}static getBrowserTypeByAlias(t){return q4[t]||""}},nt=/version\/(\d+(\.?_?\d+)+)/i,Qx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],Zx=Qx,Jx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:cn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:cn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:cn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:cn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:cn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:cn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:cn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:cn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:cn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:cn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:cn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:cn.Linux}}},{test:[/CrOS/],describe(){return{name:cn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:cn.PlayStation4,version:e}}}],Xx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],eE=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Jr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Jr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Jr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Jr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Jr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Jr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],tE=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(Zx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Jx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(Xx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(eE,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},U4=tE,nE=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new U4(t,e)}static parse(t){return new U4(t).getResult()}static get BROWSER_MAP(){return q4}static get ENGINE_MAP(){return Jr}static get OS_MAP(){return cn}static get PLATFORMS_MAP(){return Ct}},Ei=nE;d();d();var{entries:Y4,setPrototypeOf:j4,isFrozen:rE,getPrototypeOf:aE,getOwnPropertyDescriptor:iE}=Object,{freeze:dn,seal:Qn,create:oE}=Object,{apply:g0,construct:m0}=typeof Reflect<"u"&&Reflect;g0||(g0=function(t,e,n){return t.apply(e,n)});dn||(dn=function(t){return t});Qn||(Qn=function(t){return t});m0||(m0=function(t,e){return new t(...e)});var sE=Rn(Array.prototype.forEach),H4=Rn(Array.prototype.pop),Wo=Rn(Array.prototype.push),qu=Rn(String.prototype.toLowerCase),u0=Rn(String.prototype.toString),uE=Rn(String.prototype.match),Yn=Rn(String.prototype.replace),lE=Rn(String.prototype.indexOf),cE=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),Ko=dE(TypeError);function Rn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),hE=Qn(/\${[\w\W]*}/gm),bE=Qn(/^data-[\-\w.\u00B7-\uFFFF]/),TE=Qn(/^aria-[\-\w]+$/),Q4=Qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yE=Qn(/^(?:\w+script|data):/i),vE=Qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z4=Qn(/^html$/i),$4=Object.freeze({__proto__:null,MUSTACHE_EXPR:mE,ERB_EXPR:fE,TMPLIT_EXPR:hE,DATA_ATTR:bE,ARIA_ATTR:TE,IS_ALLOWED_URI:Q4,IS_SCRIPT_OR_DATA:yE,ATTR_WHITESPACE:vE,DOCTYPE_NAME:Z4}),SE=()=>typeof window>"u"?null:window,xE=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function J4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SE(),e=R=>J4(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:m}=t,f=u.prototype,T=Nu(f,"cloneNode"),b=Nu(f,"nextSibling"),h=Nu(f,"childNodes"),C=Nu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:B,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:_}=a,{importNode:k}=n,v={};e.isSupported=typeof Y4=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:I,ERB_EXPR:F,TMPLIT_EXPR:L,DATA_ATTR:U,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:A}=$4,{IS_ALLOWED_URI:E}=$4,P=null,O=Oe({},[...W4,...l0,...c0,...d0,...K4]),H=null,j=Oe({},[...G4,...p0,...V4,...Uu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,se=null,X=!0,Z=!0,ue=!1,ge=!0,te=!1,Y=!1,be=!1,ae=!1,ie=!1,Ee=!1,ze=!1,_e=!0,ce=!1,pt="user-content-",Pt=!0,ht=!1,St={},on=null,Mn=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Do=null,sr=Oe({},["audio","video","img","source","image","track"]),Fa=null,pi=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",En=Yt,vr=!1,Sr=null,Ma=Oe({},[$t,Hn,Yt],u0),sn,xr=["application/xhtml+xml","text/html"],gt="text/html",Qe,Cn=null,V9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},cd=function(R){if(!(Cn&&Cn===R)){if((!R||typeof R!="object")&&(R={}),R=Ci(R),sn=xr.indexOf(R.PARSER_MEDIA_TYPE)===-1?sn=gt:sn=R.PARSER_MEDIA_TYPE,Qe=sn==="application/xhtml+xml"?u0:qu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Qe):O,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Qe):j,Sr="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,u0):Ma,Fa="ADD_URI_SAFE_ATTR"in R?Oe(Ci(pi),R.ADD_URI_SAFE_ATTR,Qe):pi,Do="ADD_DATA_URI_TAGS"in R?Oe(Ci(sr),R.ADD_DATA_URI_TAGS,Qe):sr,on="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Qe):Mn,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Qe):{},se="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Qe):{},St="USE_PROFILES"in R?R.USE_PROFILES:!1,X=R.ALLOW_ARIA_ATTR!==!1,Z=R.ALLOW_DATA_ATTR!==!1,ue=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,ie=R.RETURN_DOM||!1,Ee=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ae=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,ce=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,ht=R.IN_PLACE||!1,E=R.ALLOWED_URI_REGEXP||Q4,En=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Z=!1),Ee&&(ie=!0),St&&(P=Oe({},[...K4]),H=[],St.html===!0&&(Oe(P,W4),Oe(H,G4)),St.svg===!0&&(Oe(P,l0),Oe(H,p0),Oe(H,Uu)),St.svgFilters===!0&&(Oe(P,c0),Oe(H,p0),Oe(H,Uu)),St.mathMl===!0&&(Oe(P,d0),Oe(H,V4),Oe(H,Uu))),R.ADD_TAGS&&(P===O&&(P=Ci(P)),Oe(P,R.ADD_TAGS,Qe)),R.ADD_ATTR&&(H===j&&(H=Ci(H)),Oe(H,R.ADD_ATTR,Qe)),R.ADD_URI_SAFE_ATTR&&Oe(Fa,R.ADD_URI_SAFE_ATTR,Qe),R.FORBID_CONTENTS&&(on===Mn&&(on=Ci(on)),Oe(on,R.FORBID_CONTENTS,Qe)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=xE(m,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));dn&&dn(R),Cn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),$9=Oe({},["title","style","font","a","script"]),Xs=Oe({},l0);Oe(Xs,c0),Oe(Xs,pE);let dd=Oe({},d0);Oe(dd,gE);let Y9=function(R){let le=C(R);(!le||!le.tagName)&&(le={namespaceURI:En,tagName:"template"});let J=qu(R.tagName),Ge=qu(le.tagName);return Sr[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?J==="svg":le.namespaceURI===$t?J==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Xs[J]:R.namespaceURI===$t?le.namespaceURI===Yt?J==="math":le.namespaceURI===Hn?J==="math"&&lf[Ge]:!!dd[J]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!dd[J]&&($9[J]||!Xs[J]):!!(sn==="application/xhtml+xml"&&Sr[R.namespaceURI]):!1},gi=function(R){Wo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},pd=function(R,le){try{Wo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Wo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(ie||Ee)try{gi(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,J;if(ae)R=""+R;else{let un=uE(R,/^[\r\n\t ]+/);J=un&&un[0]}sn==="application/xhtml+xml"&&En===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(En===Yt)try{le=new g().parseFromString(Ge,sn)}catch{}if(!le||!le.documentElement){le=B.createDocument(En,"template",null);try{le.documentElement.innerHTML=vr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&J&&Lt.insertBefore(a.createTextNode(J),Lt.childNodes[0]||null),En===Yt?_.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Q9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},eu=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},Er=function(R,le,J){v[R]&&sE(v[R],Ge=>{Ge.call(e,le,J,Cn)})},pf=function(R){let le;if(Er("beforeSanitizeElements",R,null),Q9(R))return gi(R),!0;let J=Qe(R.nodeName);if(Er("uponSanitizeElement",R,{tagName:J,allowedTags:P}),R.hasChildNodes()&&!eu(R.firstElementChild)&&(!eu(R.content)||!eu(R.content.firstElementChild))&&Dn(/<[/\w]/g,R.innerHTML)&&Dn(/<[/\w]/g,R.textContent))return gi(R),!0;if(!P[J]||V[J]){if(!V[J]&&mf(J)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J)))return!1;if(Pt&&!on[J]){let Ge=C(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let un=Lt.length;for(let bn=un-1;bn>=0;--bn)Ge.insertBefore(T(Lt[bn],!0),b(R))}}return gi(R),!0}return R instanceof u&&!Y9(R)||(J==="noscript"||J==="noembed")&&Dn(/<\/no(script|embed)/i,R.innerHTML)?(gi(R),!0):(te&&R.nodeType===3&&(le=R.textContent,le=Yn(le,I," "),le=Yn(le,F," "),le=Yn(le,L," "),R.textContent!==le&&(Wo(e.removed,{element:R.cloneNode()}),R.textContent=le)),Er("afterSanitizeElements",R,null),!1)},gf=function(R,le,J){if(_e&&(le==="id"||le==="name")&&(J in a||J in V9))return!1;if(!(Z&&!se[le]&&Dn(U,le))&&!(X&&Dn(N,le))){if(!H[le]||se[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J))))return!1}else if(!Fa[le]&&!Dn(E,Yn(J,A,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&lE(J,"data:")===0&&Do[R])&&!(ue&&!Dn(q,Yn(J,A,"")))&&J)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,J,Ge,Lt;Er("beforeSanitizeAttributes",R,null);let{attributes:un}=R;if(!un)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=un.length;Lt--;){le=un[Lt];let{name:It,namespaceURI:mi}=le;if(J=It==="value"?le.value:cE(le.value),Ge=Qe(It),bn.attrName=Ge,bn.attrValue=J,bn.keepAttr=!0,bn.forceKeepAttr=void 0,Er("uponSanitizeAttribute",R,bn),J=bn.attrValue,bn.forceKeepAttr||(pd(It,R),!bn.keepAttr))continue;if(!ge&&Dn(/\/>/i,J)){pd(It,R);continue}te&&(J=Yn(J,I," "),J=Yn(J,F," "),J=Yn(J,L," "));let hf=Qe(R.nodeName);if(gf(hf,Ge,J)){if(ce&&(Ge==="id"||Ge==="name")&&(pd(It,R),J=pt+J),D&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!mi)switch(m.getAttributeType(hf,Ge)){case"TrustedHTML":{J=D.createHTML(J);break}case"TrustedScriptURL":{J=D.createScriptURL(J);break}}try{mi?R.setAttributeNS(mi,It,J):R.setAttribute(It,J),H4(e.removed)}catch{}}}Er("afterSanitizeAttributes",R,null)},Z9=function R(le){let J,Ge=df(le);for(Er("beforeSanitizeShadowDOM",le,null);J=Ge.nextNode();)Er("uponSanitizeShadowNode",J,null),!pf(J)&&(J.content instanceof i&&R(J.content),ff(J));Er("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J,Ge,Lt,un;if(vr=!R,vr&&(R=""),typeof R!="string"&&!eu(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Ko("dirty is not a string, aborting")}else throw Ko("toString is not a function");if(!e.isSupported)return R;if(be||cd(le),e.removed=[],typeof R=="string"&&(ht=!1),ht){if(R.nodeName){let mi=Qe(R.nodeName);if(!P[mi]||V[mi])throw Ko("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)J=cf(""),Ge=J.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?J=Ge:J.appendChild(Ge);else{if(!ie&&!te&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(J=cf(R),!J)return ie?null:ze?M:""}J&&ae&&gi(J.firstChild);let bn=df(ht?R:J);for(;Lt=bn.nextNode();)pf(Lt)||(Lt.content instanceof i&&Z9(Lt.content),ff(Lt));if(ht)return R;if(ie){if(Ee)for(un=y.call(J.ownerDocument);J.firstChild;)un.appendChild(J.firstChild);else un=J;return(H.shadowroot||H.shadowrootmod)&&(un=k.call(n,un,!0)),un}let It=Y?J.outerHTML:J.innerHTML;return Y&&P["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Dn(Z4,J.ownerDocument.doctype.name)&&(It=" -`+It),te&&(It=Yn(It,I," "),It=Yn(It,F," "),It=Yn(It,L," ")),D&&ze?D.createHTML(It):It},e.setConfig=function(R){cd(R),be=!0},e.clearConfig=function(){Cn=null,be=!1},e.isValidAttribute=function(R,le,J){Cn||cd({});let Ge=Qe(R),Lt=Qe(le);return gf(Ge,Lt,J)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Wo(v[R],le))},e.removeHook=function(R){if(v[R])return H4(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var rt=J4();d();d();var EE=Object.create,h0=Object.defineProperty,CE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,DE=Object.getPrototypeOf,AE=Object.prototype.hasOwnProperty,b0=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kE=(t,e)=>{for(var n in e)h0(t,n,{get:e[n],enumerable:!0})},f0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of wE(e))!AE.call(t,a)&&a!==n&&h0(t,a,{get:()=>e[a],enumerable:!(r=CE(e,a))||r.enumerable});return t},PE=(t,e,n)=>(f0(t,e,"default"),n&&f0(n,e,"default")),eb=(t,e,n)=>(n=t!=null?EE(DE(t)):{},f0(e||!t||!t.__esModule?h0(n,"default",{value:t,enumerable:!0}):n,t)),LE=b0((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),g){var m=g.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!o||g!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ae=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ae&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ae=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,g=l.firstChild;g;){var m=g.nextSibling;if(this._isPhrasingContent(g))p!==null?p.appendChild(g):this._isWhitespace(g)||(p=a.createElement("p"),l.replaceChild(p,g),p.appendChild(g));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}g=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(ie){if(!(!ie.parentNode||typeof ie.parentNode.tagName>"u")){var Ee=this._getInnerText(ie);if(!(Ee.length<25)){var ze=this._getNodeAncestors(ie,5);if(ze.length!==0){var _e=0;_e+=1,_e+=Ee.split(",").length,_e+=Math.min(Math.floor(Ee.length/100),3),this._forEachNode(ze,function(ce,pt){if(!(!ce.tagName||!ce.parentNode||typeof ce.parentNode.tagName>"u")){if(typeof ce.readability>"u"&&(this._initializeNode(ce),T.push(ce)),pt===0)var Pt=1;else pt===1?Pt=2:Pt=pt*3;ce.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,C=T.length;hS.readability.contentScore){b.splice(B,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,_=!1,k;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),_=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],I=1;I=.75&&v.push(this._getNodeAncestors(b[I]));var F=3;if(v.length>=F)for(k=y.parentNode;k.tagName!=="BODY";){for(var L=0,U=0;U=F){y=k;break}k=k.parentNode}y.readability||this._initializeNode(y),k=y.parentNode;for(var N=y.readability.contentScore,q=N/3;k.tagName!=="BODY";){if(!k.readability){k=k.parentNode;continue}var A=k.readability.contentScore;if(AN){y=k;break}N=k.readability.contentScore,k=k.parentNode}for(k=y.parentNode;k.tagName!="BODY"&&k.children.length==1;)y=k,k=y.parentNode;y.readability||this._initializeNode(y)}var E=a.createElement("DIV");i&&(E.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);k=y.parentNode;for(var O=k.children,H=0,j=O.length;H=P)V=!0;else if(W.nodeName==="P"){var X=this._getLinkDensity(W),Z=this._getInnerText(W),ue=Z.length;(ue>80&&X<.25||ue<80&&ue>0&&X===0&&Z.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),E.appendChild(W),O=k.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+E.innerHTML),this._prepArticle(E),this._debug&&this.log("Article content post-prep: "+E.innerHTML),_)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";E.firstChild;)ge.appendChild(E.firstChild);E.appendChild(ge)}this._debug&&this.log("Article content after paging: "+E.innerHTML);var te=!0,Y=this._getInnerText(E,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),g=l.getAttribute("content");if(g){var m=null,f=null;p&&(m=p.match(s),m&&(f=m[0].toLowerCase().replace(/\s/g,""),i[f]=g.trim())),!m&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=g.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],g=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(g)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(k){return k._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,k=>u+=this._getInnerText(k).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var g=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&g/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>g||T>Math.floor(g/3)||!s&&b<.9&&S<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&B>.2||c>=25&&B>.5||h===1&&S<75||h>1;if(s&&y){for(var _=0;_1)return y;let k=i.getElementsByTagName("li").length;if(m==k)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),_E=b0((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(g){if(!o.visibilityChecker(g))return!1;var m=g.className+" "+g.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),tb=b0((t,e)=>{var n=LE(),r=_E();e.exports={Readability:n,isProbablyReaderable:r}}),nb={};kE(nb,{Readability:()=>ju,default:()=>ib,isProbablyReaderable:()=>ab});var rb=eb(tb());PE(nb,eb(tb()));var{Readability:ju,isProbablyReaderable:ab}=rb,{default:X4,...FE}=rb,ib=X4!==void 0?X4:FE;var $a={};tu($a,{Breadcrumbs:()=>ta,BrowserClient:()=>Mi,Dedupe:()=>ia,FunctionToString:()=>Ka,GlobalHandlers:()=>fr,HttpContext:()=>aa,Hub:()=>Or,InboundFilters:()=>Ga,Integrations:()=>pw,LinkedErrors:()=>ra,SDK_VERSION:()=>Fi,Scope:()=>On,TryCatch:()=>na,addBreadcrumb:()=>el,addGlobalEventProcessor:()=>mr,captureEvent:()=>Ju,captureException:()=>Li,captureMessage:()=>Zu,chromeStackLineParser:()=>Y0,close:()=>b3,configureScope:()=>Xu,createTransport:()=>as,defaultIntegrations:()=>np,defaultStackLineParsers:()=>J0,defaultStackParser:()=>pl,flush:()=>h3,forceLoad:()=>m3,geckoStackLineParser:()=>Q0,getCurrentHub:()=>Le,getHubFromCarrier:()=>zn,init:()=>d3,lastEventId:()=>g3,makeFetchTransport:()=>is,makeMain:()=>Pi,onLoad:()=>f3,opera10StackLineParser:()=>Zb,opera11StackLineParser:()=>Jb,setContext:()=>tl,setExtra:()=>rl,setExtras:()=>nl,setTag:()=>il,setTags:()=>al,setUser:()=>ol,showReportDialog:()=>p3,startTransaction:()=>sl,winjsStackLineParser:()=>Z0,withScope:()=>_i,wrap:()=>T3});d();d();d();d();d();d();d();d();d();var ob=Object.prototype.toString;function Hu(t){switch(ob.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return dr(t,Error)}}function Go(t,e){return ob.call(t)===`[object ${e}]`}function Wu(t){return Go(t,"ErrorEvent")}function sb(t){return Go(t,"DOMException")}function Fr(t){return Go(t,"String")}function Vo(t){return t===null||typeof t!="object"&&typeof t!="function"}function Zn(t){return Go(t,"Object")}function $o(t){return typeof Event<"u"&&dr(t,Event)}function ub(t){return!1}function lb(t){return Go(t,"RegExp")}function wi(t){return!!(t&&t.then&&typeof t.then=="function")}function cb(t){return Zn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function db(t){return typeof t=="number"&&t!==t}function dr(t,e){try{return t instanceof e}catch{return!1}}function Yo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function ME(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Fr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return gb({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function gb(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function OE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!IE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function Ku(t){let e=typeof t=="string"?RE(t):gb(t);return OE(e),e}d();var zE={};function at(){return typeof window<"u"?window:typeof self<"u"?self:zE}function Di(t,e,n){let r=n||at(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var Qo=["debug","info","warn","error","log","assert","trace"];function T0(t){if(!("console"in at()))return t();let n=console,r={};Qo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function mb(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?Qo.forEach(n=>{e[n]=(...r)=>{t&&T0(()=>{})}}):Qo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=Di("logger",mb):Se=mb();d();d();function ja(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function y0(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function x0(t){if(Hu(t))return{message:t.message,name:t.name,stack:t.stack,...hb(t)};if($o(t)){let e={type:t.type,target:fb(t.target),currentTarget:fb(t.currentTarget),...hb(t)};return typeof CustomEvent<"u"&&dr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function fb(t){try{return ub(t)?Yo(t):Object.prototype.toString.call(t)}catch{return""}}function hb(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Tb(t,e=40){let n=Object.keys(x0(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return ja(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:ja(a,e)}return""}function Ha(t){return v0(t,new Map)}function v0(t,e){if(Zn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=v0(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(v0(a,e))}),r}return t}d();var NE=50;function C0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return UE(a)}}function yb(t){return Array.isArray(t)?C0(...t):t}function UE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,NE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var E0="";function Xn(t){try{return!t||typeof t!="function"?E0:t.name||E0}catch{return E0}}d();function vb(){if(!("fetch"in at()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sb(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xb(){return!0}var Mr=at(),Jo={},Eb={};function qE(t){if(!Eb[t])switch(Eb[t]=!0,t){case"console":jE();break;case"fetch":HE();break;case"error":GE();break;case"unhandledrejection":VE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function er(t,e){Jo[t]=Jo[t]||[],Jo[t].push(e),qE(t)}function ki(t,e){if(!(!t||!Jo[t]))for(let n of Jo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. +`+T+"]"}return r.pop(),a=T,h}},ix={parse:JS,stringify:ax},ox=ix,Mu=ox;d();d();var V_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};d();d();var Bu=globalThis||(typeof window<"u"?window:self),ux=Object.create,Jd=Object.defineProperty,lx=Object.getOwnPropertyDescriptor,cx=Object.getOwnPropertyNames,dx=Object.getPrototypeOf,px=Object.prototype.hasOwnProperty,gx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mx=(t,e)=>{for(var n in e)Jd(t,n,{get:e[n],enumerable:!0})},Zd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of cx(e))!px.call(t,a)&&a!==n&&Jd(t,a,{get:()=>e[a],enumerable:!(r=lx(e,a))||r.enumerable});return t},fx=(t,e,n)=>(Zd(t,e,"default"),n&&Zd(n,e,"default")),S4=(t,e,n)=>(n=t!=null?ux(dx(t)):{},Zd(e||!t||!t.__esModule?Jd(n,"default",{value:t,enumerable:!0}):n,t)),x4=gx((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Bu=="object"&&Bu&&Bu.Object===Object&&Bu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(_,k,v){var I,F,L,U,N,q,A=0,E=!1,P=!1,O=!0;if(typeof _!="function")throw new TypeError(n);k=y(k)||0,M(v)&&(E=!!v.leading,P="maxWait"in v,L=P?T(y(v.maxWait)||0,k):L,O="trailing"in v?!!v.trailing:O);function H(te){var Y=I,Te=F;return I=F=void 0,A=te,U=_.apply(Te,Y),U}function j(te){return A=te,N=setTimeout(se,k),E?H(te):U}function W(te){var Y=te-q,Te=te-A,ae=k-Y;return P?b(ae,L-Te):ae}function V(te){var Y=te-q,Te=te-A;return q===void 0||Y>=k||Y<0||P&&Te>=L}function se(){var te=h();if(V(te))return X(te);N=setTimeout(se,W(te))}function X(te){return N=void 0,O&&I?H(te):(I=F=void 0,U)}function Z(){N!==void 0&&clearTimeout(N),A=0,I=q=F=N=void 0}function ue(){return N===void 0?U:X(h())}function ge(){var te=h(),Y=V(te);if(I=arguments,F=this,q=te,Y){if(N===void 0)return j(q);if(P)return N=setTimeout(se,k),H(q)}return N===void 0&&(N=setTimeout(se,k)),U}return ge.cancel=Z,ge.flush=ue,ge}function D(_,k,v){var I=!0,F=!0;if(typeof _!="function")throw new TypeError(n);return M(v)&&(I="leading"in v?!!v.leading:I,F="trailing"in v?!!v.trailing:F),C(_,k,{leading:I,maxWait:k,trailing:F})}function M(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function B(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||B(_)&&f.call(_)==a}function y(_){if(typeof _=="number")return _;if(S(_))return r;if(M(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=M(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(i,"");var v=s.test(_);return v||u.test(_)?l(_.slice(2),v?2:8):o.test(_)?r:+_}e.exports=D}),E4={};mx(E4,{default:()=>Vn});var hx=S4(x4());fx(E4,S4(x4()));var{default:v4,...bx}=hx,Vn=v4!==void 0?v4:bx;d();d();var Iu=globalThis||(typeof window<"u"?window:self),Tx=Object.create,e0=Object.defineProperty,yx=Object.getOwnPropertyDescriptor,vx=Object.getOwnPropertyNames,Sx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Ex=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cx=(t,e)=>{for(var n in e)e0(t,n,{get:e[n],enumerable:!0})},Xd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vx(e))!xx.call(t,a)&&a!==n&&e0(t,a,{get:()=>e[a],enumerable:!(r=yx(e,a))||r.enumerable});return t},wx=(t,e,n)=>(Xd(t,e,"default"),n&&Xd(n,e,"default")),w4=(t,e,n)=>(n=t!=null?Tx(Sx(t)):{},Xd(e||!t||!t.__esModule?e0(n,"default",{value:t,enumerable:!0}):n,t)),D4=Ex((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(y,_,k){var v,I,F,L,U,N,q=0,A=!1,E=!1,P=!0;if(typeof y!="function")throw new TypeError(n);_=S(_)||0,D(k)&&(A=!!k.leading,E="maxWait"in k,F=E?T(S(k.maxWait)||0,_):F,P="trailing"in k?!!k.trailing:P);function O(ge){var te=v,Y=I;return v=I=void 0,q=ge,L=y.apply(Y,te),L}function H(ge){return q=ge,U=setTimeout(V,_),A?O(ge):L}function j(ge){var te=ge-N,Y=ge-q,Te=_-te;return E?b(Te,F-Y):Te}function W(ge){var te=ge-N,Y=ge-q;return N===void 0||te>=_||te<0||E&&Y>=F}function V(){var ge=h();if(W(ge))return se(ge);U=setTimeout(V,j(ge))}function se(ge){return U=void 0,P&&v?O(ge):(v=I=void 0,L)}function X(){U!==void 0&&clearTimeout(U),q=0,v=N=I=U=void 0}function Z(){return U===void 0?L:se(h())}function ue(){var ge=h(),te=W(ge);if(v=arguments,I=this,N=ge,te){if(U===void 0)return H(N);if(E)return U=setTimeout(V,_),O(N)}return U===void 0&&(U=setTimeout(V,_)),L}return ue.cancel=X,ue.flush=Z,ue}function D(y){var _=typeof y;return!!y&&(_=="object"||_=="function")}function M(y){return!!y&&typeof y=="object"}function B(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(B(y))return r;if(D(y)){var _=typeof y.valueOf=="function"?y.valueOf():y;y=D(_)?_+"":_}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var k=s.test(y);return k||u.test(y)?l(y.slice(2),k?2:8):o.test(y)?r:+y}e.exports=C}),A4={};Cx(A4,{default:()=>qo});var Dx=w4(D4());wx(A4,w4(D4()));var{default:C4,...Ax}=Dx,qo=C4!==void 0?C4:Ax;d();d();var kx=Object.create,n0=Object.defineProperty,Px=Object.getOwnPropertyDescriptor,Lx=Object.getOwnPropertyNames,_x=Object.getPrototypeOf,Fx=Object.prototype.hasOwnProperty,Mx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bx=(t,e)=>{for(var n in e)n0(t,n,{get:e[n],enumerable:!0})},t0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Lx(e))!Fx.call(t,a)&&a!==n&&n0(t,a,{get:()=>e[a],enumerable:!(r=Px(e,a))||r.enumerable});return t},Ix=(t,e,n)=>(t0(t,e,"default"),n&&t0(n,e,"default")),P4=(t,e,n)=>(n=t!=null?kx(_x(t)):{},t0(e||!t||!t.__esModule?n0(n,"default",{value:t,enumerable:!0}):n,t)),L4=Mx((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(m){if(g[m])return g[m].exports;var f=g[m]={i:m,l:!1,exports:{}};return c[m].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var g={};return p.m=c,p.c=g,p.i=function(m){return m},p.d=function(m,f,T){p.o(m,f)||Object.defineProperty(m,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(m){var f=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(f,"a",f),f},p.o=function(m,f){return Object.prototype.hasOwnProperty.call(m,f)},p.p="",p(p.s=0)}([function(c,p,g){function m(j,W){var V={};for(var se in j)W.indexOf(se)>=0||Object.prototype.hasOwnProperty.call(j,se)&&(V[se]=j[se]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+se+"",Te.onclick=function(){return F(ae,Y)},Te.listener=function(ie){(k(ie)||v(ie))&&N()},I(Te,Y),Z&&Z<1&&(Z=1),!ge&&Z&&M(Z).then(function(){return F(ae,Y)})},A=p.force=function(j,W){var V=j.type,se=V===void 0?5:V,X=j.text,Z=j.buttonText,ue=Z===void 0?"OK":Z,ge=j.callback,te=j.position,Y=te===void 0?h.positions.force||Y.top:te;B(),N();var Te=document.createElement("div"),ae=S();Te.id=ae;var ie=document.createElement("div");ie.classList.add(h.classes.textbox),ie.classList.add(h.classes.backgroundInfo),ie.innerHTML='
'+X+"
";var Ee=document.createElement("div");Ee.classList.add(h.classes.button),Ee.classList.add(y[se]),Ee.innerHTML=ue,Ee.onclick=function(){F(ae,Y),U(),ge?ge():W&&W()},Te.appendChild(ie),Te.appendChild(Ee),Te.listener=function(ze){k(ze)&&Ee.click()},I(Te,Y),L()},E=p.confirm=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Yes":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,Te=j.position,ae=Te===void 0?h.positions.confirm||ae.top:Te;B(),N();var ie=document.createElement("div"),Ee=S();ie.id=Ee;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+se+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=Z,_e.onclick=function(){F(Ee,ae),U(),te?te():W&&W()};var ce=document.createElement("div");ce.classList.add(h.classes.button),ce.classList.add(h.classes.elementHalf),ce.classList.add(h.classes.backgroundError),ce.innerHTML=ge,ce.onclick=function(){F(Ee,ae),U(),Y?Y():V&&V()},ie.appendChild(ze),ie.appendChild(_e),ie.appendChild(ce),ie.listener=function(pt){k(pt)?_e.click():v(pt)&&ce.click()},I(ie,ae),L(ie,ae)},P=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Submit":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,Te=j.position,ae=Te===void 0?h.positions.input||ae.top:Te,ie=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);B(),N();var Ee=document.createElement("div"),ze=S();Ee.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+se+"
";var ce=document.createElement("input");ce.classList.add(h.classes.inputField),ce.setAttribute("autocapitalize",ie.autocapitalize||"none"),ce.setAttribute("autocomplete",ie.autocomplete||"off"),ce.setAttribute("autocorrect",ie.autocorrect||"off"),ce.setAttribute("autofocus",ie.autofocus||"true"),ce.setAttribute("inputmode",ie.inputmode||"verbatim"),ce.setAttribute("max",ie.max||""),ce.setAttribute("maxlength",ie.maxlength||""),ce.setAttribute("min",ie.min||""),ce.setAttribute("minlength",ie.minlength||""),ce.setAttribute("placeholder",ie.placeholder||""),ce.setAttribute("spellcheck",ie.spellcheck||"default"),ce.setAttribute("step",ie.step||"any"),ce.setAttribute("type",ie.type||"text"),ce.value=ie.value||"",ie.allowed&&(ce.oninput=function(){var ht=void 0;if(Array.isArray(ie.allowed)){for(var St="",on=ie.allowed,Mn=0;Mn'+V+"",Y.appendChild(ae),ue.forEach(function(Ee,ze){var _e=Ee.type,ce=_e===void 0?1:_e,pt=Ee.text,Pt=Ee.handler,ht=document.createElement("div");ht.classList.add(y[ce]),ht.classList.add(h.classes.button),ht.classList.add(h.classes.selectChoice);var St=ue[ze+1];St&&!St.type&&(St.type=1),St&&St.type===ce&&ht.classList.add(h.classes.selectChoiceRepeated),ht.innerHTML=pt,ht.onclick=function(){F(Te,te),U(),Pt()},Y.appendChild(ht)});var ie=document.createElement("div");ie.classList.add(h.classes.backgroundNeutral),ie.classList.add(h.classes.button),ie.innerHTML=X,ie.onclick=function(){F(Te,te),U(),Z?Z():W&&W()},Y.appendChild(ie),Y.listener=function(Ee){v(Ee)&&ie.click()},I(Y,te),L(Y,te)},H=p.date=function(j,W,V){var se=j.value,X=se===void 0?new Date:se,Z=j.submitText,ue=Z===void 0?"OK":Z,ge=j.cancelText,te=ge===void 0?"Cancel":ge,Y=j.submitCallback,Te=j.cancelCallback,ae=j.position,ie=ae===void 0?h.positions.date||ie.top:ae;B(),N();var Ee="▾",ze=document.createElement("div"),_e=document.createElement("div"),ce=document.createElement("div"),pt=function(gt){ze.innerHTML=h.dateMonths[gt.getMonth()],_e.innerHTML=gt.getDate(),ce.innerHTML=gt.getFullYear()},Pt=function(gt){var Ze=new Date(X.getFullYear(),X.getMonth()+1,0).getDate(),Cn=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Cn)>Ze&&(Cn=Ze.toString()),gt.target.textContent=Cn,Number(Cn)<1&&(Cn="1"),X.setDate(Number(Cn))},ht=function(gt){var Ze=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);gt.target.textContent=Ze,X.setFullYear(Number(Ze))},St=function(gt){pt(X)},on=function(gt){var Ze=new Date(X.getFullYear(),X.getMonth()+gt+1,0).getDate();X.getDate()>Ze&&X.setDate(Ze),X.setMonth(X.getMonth()+gt),pt(X)},Mn=function(gt){X.setDate(X.getDate()+gt),pt(X)},Ao=function(gt){var Ze=X.getFullYear()+gt;Ze<0?X.setFullYear(0):X.setFullYear(X.getFullYear()+gt),pt(X)},sr=document.createElement("div"),Fa=S();sr.id=Fa;var pi=document.createElement("div");pi.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=Ee;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=Ee;var En=document.createElement("div");En.classList.add(h.classes.button),En.classList.add(h.classes.elementThird),En.classList.add(h.classes.dateSelectorUp),En.innerHTML=Ee,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[X.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",St),_e.innerHTML=X.getDate(),ce.classList.add(h.classes.element),ce.classList.add(h.classes.elementThird),ce.setAttribute("contentEditable",!0),ce.addEventListener("input",ht),ce.addEventListener("blur",St),ce.innerHTML=X.getFullYear();var vr=document.createElement("div");vr.classList.add(h.classes.button),vr.classList.add(h.classes.elementThird),vr.innerHTML=Ee;var Sr=document.createElement("div");Sr.classList.add(h.classes.button),Sr.classList.add(h.classes.elementThird),Sr.innerHTML=Ee;var Ma=document.createElement("div");Ma.classList.add(h.classes.button),Ma.classList.add(h.classes.elementThird),Ma.innerHTML=Ee,Hn.onclick=function(){return on(1)},Yt.onclick=function(){return Mn(1)},En.onclick=function(){return Ao(1)},vr.onclick=function(){return on(-1)},Sr.onclick=function(){return Mn(-1)},Ma.onclick=function(){return Ao(-1)};var sn=document.createElement("div");sn.classList.add(h.classes.button),sn.classList.add(h.classes.elementHalf),sn.classList.add(h.classes.backgroundSuccess),sn.innerHTML=ue,sn.onclick=function(){F(Fa,ie),U(),Y?Y(X):W&&W(X)};var xr=document.createElement("div");xr.classList.add(h.classes.button),xr.classList.add(h.classes.elementHalf),xr.classList.add(h.classes.backgroundError),xr.innerHTML=te,xr.onclick=function(){F(Fa,ie),U(),Te?Te(X):V&&V(X)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(En),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(ce),$t.appendChild(vr),$t.appendChild(Sr),$t.appendChild(Ma),pi.appendChild($t),sr.appendChild(pi),sr.appendChild(sn),sr.appendChild(xr),sr.listener=function(gt){k(gt)?sn.click():v(gt)&&xr.click()},I(sr,ie),L(sr,ie)};p.default={alert:q,force:A,confirm:E,input:P,select:O,date:H,setOptions:C,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),_4={};Bx(_4,{default:()=>Ru});var Rx=P4(L4());Ix(_4,P4(L4()));var{default:k4,...Ox}=Rx,Ru=k4!==void 0?k4:Ox;d();d();var Ou=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function jo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function r0(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function F4(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;ixi[t.toLowerCase()]||$n[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),zx=t=>Object.keys(xi).find(e=>xi[e]===t),Nx=t=>Object.keys($n).find(e=>$n[e]===t);function z4(t){R4=t||"all"}function Ho(){return R4||"all"}function Ux(){return nt.slice(0)}function qx(){return nt.map(t=>zx(t)||Nx(t)||String.fromCharCode(t))}function jx(){let t=[];return Object.keys(mt).forEach(e=>{mt[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Wo(o))})})}),t}function Hx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function Wx(t){return typeof t=="string"&&(t=Wo(t)),nt.indexOf(t)!==-1}function Kx(t,e){let n,r;t||(t=Ho());for(let a in mt)if(Object.prototype.hasOwnProperty.call(mt,a))for(n=mt[a],r=0;r=0&&nt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&nt.splice(0,nt.length),(e===93||e===224)&&(e=91),e in Ut){Ut[e]=!1;for(let r in $n)$n[r]===e&&(_r[r]=!1)}}function N4(t,...e){if(typeof t>"u")Object.keys(mt).forEach(n=>delete mt[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&i0(n)});else if(typeof t=="object")t.key&&i0(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),i0({key:t,scope:n,method:r,splitKey:"+"})}}var i0=({key:t,scope:e,method:n,splitKey:r="+"})=>{a0(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Wo(u);if(!mt[l])return;e||(e=Ho());let c=s>1?r0($n,o):[];mt[l]=mt[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&F4(p.mods,c)))})};function B4(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Ut)Object.prototype.hasOwnProperty.call(Ut,i)&&(!Ut[i]&&e.mods.indexOf(+i)>-1||Ut[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Ut[16]&&!Ut[18]&&!Ut[17]&&!Ut[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(nt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function I4(t,e){let n=mt["*"],r=t.keyCode||t.which||t.charCode;if(!_r.filter.call(this,t))return;if((r===93||r===224)&&(r=91),nt.indexOf(r)===-1&&r!==229&&nt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=zu[i];t[i]&&nt.indexOf(o)===-1?nt.push(o):!t[i]&&nt.indexOf(o)>-1?nt.splice(nt.indexOf(o),1):i==="metaKey"&&t[i]&&nt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(nt=nt.slice(nt.indexOf(o))))}),r in Ut){Ut[r]=!0;for(let i in $n)$n[i]===r&&(_r[i]=!0);if(!n)return}for(let i in Ut)Object.prototype.hasOwnProperty.call(Ut,i)&&(Ut[i]=t[zu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(nt.indexOf(17)===-1&&nt.push(17),nt.indexOf(18)===-1&&nt.push(18),Ut[17]=!0,Ut[18]=!0);let a=Ho();if(n)for(let i=0;i-1}function _r(t,e,n){nt=[];let r=a0(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,g=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(g=!0)),typeof e=="string"&&(i=e),g&&N4(t,i);s1&&(a=r0($n,t)),t=t[t.length-1],t=t==="*"?"*":Wo(t),t in mt||(mt[t]=[]),mt[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!Vx(o)&&window&&(O4.push(o),jo(o,"keydown",m=>{I4(m,o)},p),M4||(M4=!0,jo(window,"focus",()=>{nt=[]},p),jo(window,"click",()=>{nt=[]},!1)),jo(o,"keyup",m=>{I4(m,o),Gx(m)},p))}function $x(t,e="all"){Object.keys(mt).forEach(n=>{mt[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var o0={getPressedKeyString:qx,setScope:z4,getScope:Ho,deleteScope:Kx,getPressedKeyCodes:Ux,getAllKeyCodes:jx,isPressed:Wx,filter:Hx,trigger:$x,unbind:N4,keyMap:xi,modifier:$n,modifierMap:zu};for(let t in o0)Object.prototype.hasOwnProperty.call(o0,t)&&(_r[t]=o0[t]);if(typeof window<"u"){let t=window.hotkeys;_r.noConflict=e=>(e&&window.hotkeys===_r&&(window.hotkeys=t),_r),window.hotkeys=_r}var yn=_r;d();d();var Yx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},q4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},cn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Jr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return Yx[t]}static getBrowserTypeByAlias(t){return q4[t]||""}},rt=/version\/(\d+(\.?_?\d+)+)/i,Qx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],Zx=Qx,Jx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:cn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:cn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:cn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:cn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:cn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:cn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:cn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:cn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:cn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:cn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:cn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:cn.Linux}}},{test:[/CrOS/],describe(){return{name:cn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:cn.PlayStation4,version:e}}}],Xx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],eE=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Jr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Jr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Jr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Jr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Jr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Jr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],tE=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(Zx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Jx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(Xx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(eE,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},U4=tE,nE=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new U4(t,e)}static parse(t){return new U4(t).getResult()}static get BROWSER_MAP(){return q4}static get ENGINE_MAP(){return Jr}static get OS_MAP(){return cn}static get PLATFORMS_MAP(){return Ct}},Ei=nE;d();d();var{entries:Y4,setPrototypeOf:j4,isFrozen:rE,getPrototypeOf:aE,getOwnPropertyDescriptor:iE}=Object,{freeze:dn,seal:Qn,create:oE}=Object,{apply:p0,construct:g0}=typeof Reflect<"u"&&Reflect;p0||(p0=function(t,e,n){return t.apply(e,n)});dn||(dn=function(t){return t});Qn||(Qn=function(t){return t});g0||(g0=function(t,e){return new t(...e)});var sE=Rn(Array.prototype.forEach),H4=Rn(Array.prototype.pop),Ko=Rn(Array.prototype.push),qu=Rn(String.prototype.toLowerCase),s0=Rn(String.prototype.toString),uE=Rn(String.prototype.match),Yn=Rn(String.prototype.replace),lE=Rn(String.prototype.indexOf),cE=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),Go=dE(TypeError);function Rn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),hE=Qn(/\${[\w\W]*}/gm),bE=Qn(/^data-[\-\w.\u00B7-\uFFFF]/),TE=Qn(/^aria-[\-\w]+$/),Q4=Qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yE=Qn(/^(?:\w+script|data):/i),vE=Qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z4=Qn(/^html$/i),$4=Object.freeze({__proto__:null,MUSTACHE_EXPR:mE,ERB_EXPR:fE,TMPLIT_EXPR:hE,DATA_ATTR:bE,ARIA_ATTR:TE,IS_ALLOWED_URI:Q4,IS_SCRIPT_OR_DATA:yE,ATTR_WHITESPACE:vE,DOCTYPE_NAME:Z4}),SE=()=>typeof window>"u"?null:window,xE=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function J4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SE(),e=R=>J4(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:m}=t,f=u.prototype,T=Nu(f,"cloneNode"),b=Nu(f,"nextSibling"),h=Nu(f,"childNodes"),C=Nu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:B,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:_}=a,{importNode:k}=n,v={};e.isSupported=typeof Y4=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:I,ERB_EXPR:F,TMPLIT_EXPR:L,DATA_ATTR:U,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:A}=$4,{IS_ALLOWED_URI:E}=$4,P=null,O=Oe({},[...W4,...u0,...l0,...c0,...K4]),H=null,j=Oe({},[...G4,...d0,...V4,...Uu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,se=null,X=!0,Z=!0,ue=!1,ge=!0,te=!1,Y=!1,Te=!1,ae=!1,ie=!1,Ee=!1,ze=!1,_e=!0,ce=!1,pt="user-content-",Pt=!0,ht=!1,St={},on=null,Mn=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ao=null,sr=Oe({},["audio","video","img","source","image","track"]),Fa=null,pi=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",En=Yt,vr=!1,Sr=null,Ma=Oe({},[$t,Hn,Yt],s0),sn,xr=["application/xhtml+xml","text/html"],gt="text/html",Ze,Cn=null,V9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},ld=function(R){if(!(Cn&&Cn===R)){if((!R||typeof R!="object")&&(R={}),R=Ci(R),sn=xr.indexOf(R.PARSER_MEDIA_TYPE)===-1?sn=gt:sn=R.PARSER_MEDIA_TYPE,Ze=sn==="application/xhtml+xml"?s0:qu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Ze):O,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Ze):j,Sr="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,s0):Ma,Fa="ADD_URI_SAFE_ATTR"in R?Oe(Ci(pi),R.ADD_URI_SAFE_ATTR,Ze):pi,Ao="ADD_DATA_URI_TAGS"in R?Oe(Ci(sr),R.ADD_DATA_URI_TAGS,Ze):sr,on="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Ze):Mn,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Ze):{},se="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Ze):{},St="USE_PROFILES"in R?R.USE_PROFILES:!1,X=R.ALLOW_ARIA_ATTR!==!1,Z=R.ALLOW_DATA_ATTR!==!1,ue=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,ie=R.RETURN_DOM||!1,Ee=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ae=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,ce=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,ht=R.IN_PLACE||!1,E=R.ALLOWED_URI_REGEXP||Q4,En=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Z=!1),Ee&&(ie=!0),St&&(P=Oe({},[...K4]),H=[],St.html===!0&&(Oe(P,W4),Oe(H,G4)),St.svg===!0&&(Oe(P,u0),Oe(H,d0),Oe(H,Uu)),St.svgFilters===!0&&(Oe(P,l0),Oe(H,d0),Oe(H,Uu)),St.mathMl===!0&&(Oe(P,c0),Oe(H,V4),Oe(H,Uu))),R.ADD_TAGS&&(P===O&&(P=Ci(P)),Oe(P,R.ADD_TAGS,Ze)),R.ADD_ATTR&&(H===j&&(H=Ci(H)),Oe(H,R.ADD_ATTR,Ze)),R.ADD_URI_SAFE_ATTR&&Oe(Fa,R.ADD_URI_SAFE_ATTR,Ze),R.FORBID_CONTENTS&&(on===Mn&&(on=Ci(on)),Oe(on,R.FORBID_CONTENTS,Ze)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=xE(m,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));dn&&dn(R),Cn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),$9=Oe({},["title","style","font","a","script"]),Xs=Oe({},u0);Oe(Xs,l0),Oe(Xs,pE);let cd=Oe({},c0);Oe(cd,gE);let Y9=function(R){let le=C(R);(!le||!le.tagName)&&(le={namespaceURI:En,tagName:"template"});let J=qu(R.tagName),Ge=qu(le.tagName);return Sr[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?J==="svg":le.namespaceURI===$t?J==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Xs[J]:R.namespaceURI===$t?le.namespaceURI===Yt?J==="math":le.namespaceURI===Hn?J==="math"&&lf[Ge]:!!cd[J]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!cd[J]&&($9[J]||!Xs[J]):!!(sn==="application/xhtml+xml"&&Sr[R.namespaceURI]):!1},gi=function(R){Ko(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},dd=function(R,le){try{Ko(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Ko(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(ie||Ee)try{gi(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,J;if(ae)R=""+R;else{let un=uE(R,/^[\r\n\t ]+/);J=un&&un[0]}sn==="application/xhtml+xml"&&En===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(En===Yt)try{le=new g().parseFromString(Ge,sn)}catch{}if(!le||!le.documentElement){le=B.createDocument(En,"template",null);try{le.documentElement.innerHTML=vr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&J&&Lt.insertBefore(a.createTextNode(J),Lt.childNodes[0]||null),En===Yt?_.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Q9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},eu=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},Er=function(R,le,J){v[R]&&sE(v[R],Ge=>{Ge.call(e,le,J,Cn)})},pf=function(R){let le;if(Er("beforeSanitizeElements",R,null),Q9(R))return gi(R),!0;let J=Ze(R.nodeName);if(Er("uponSanitizeElement",R,{tagName:J,allowedTags:P}),R.hasChildNodes()&&!eu(R.firstElementChild)&&(!eu(R.content)||!eu(R.content.firstElementChild))&&Dn(/<[/\w]/g,R.innerHTML)&&Dn(/<[/\w]/g,R.textContent))return gi(R),!0;if(!P[J]||V[J]){if(!V[J]&&mf(J)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J)))return!1;if(Pt&&!on[J]){let Ge=C(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let un=Lt.length;for(let bn=un-1;bn>=0;--bn)Ge.insertBefore(T(Lt[bn],!0),b(R))}}return gi(R),!0}return R instanceof u&&!Y9(R)||(J==="noscript"||J==="noembed")&&Dn(/<\/no(script|embed)/i,R.innerHTML)?(gi(R),!0):(te&&R.nodeType===3&&(le=R.textContent,le=Yn(le,I," "),le=Yn(le,F," "),le=Yn(le,L," "),R.textContent!==le&&(Ko(e.removed,{element:R.cloneNode()}),R.textContent=le)),Er("afterSanitizeElements",R,null),!1)},gf=function(R,le,J){if(_e&&(le==="id"||le==="name")&&(J in a||J in V9))return!1;if(!(Z&&!se[le]&&Dn(U,le))&&!(X&&Dn(N,le))){if(!H[le]||se[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J))))return!1}else if(!Fa[le]&&!Dn(E,Yn(J,A,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&lE(J,"data:")===0&&Ao[R])&&!(ue&&!Dn(q,Yn(J,A,"")))&&J)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,J,Ge,Lt;Er("beforeSanitizeAttributes",R,null);let{attributes:un}=R;if(!un)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=un.length;Lt--;){le=un[Lt];let{name:Rt,namespaceURI:mi}=le;if(J=Rt==="value"?le.value:cE(le.value),Ge=Ze(Rt),bn.attrName=Ge,bn.attrValue=J,bn.keepAttr=!0,bn.forceKeepAttr=void 0,Er("uponSanitizeAttribute",R,bn),J=bn.attrValue,bn.forceKeepAttr||(dd(Rt,R),!bn.keepAttr))continue;if(!ge&&Dn(/\/>/i,J)){dd(Rt,R);continue}te&&(J=Yn(J,I," "),J=Yn(J,F," "),J=Yn(J,L," "));let hf=Ze(R.nodeName);if(gf(hf,Ge,J)){if(ce&&(Ge==="id"||Ge==="name")&&(dd(Rt,R),J=pt+J),D&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!mi)switch(m.getAttributeType(hf,Ge)){case"TrustedHTML":{J=D.createHTML(J);break}case"TrustedScriptURL":{J=D.createScriptURL(J);break}}try{mi?R.setAttributeNS(mi,Rt,J):R.setAttribute(Rt,J),H4(e.removed)}catch{}}}Er("afterSanitizeAttributes",R,null)},Z9=function R(le){let J,Ge=df(le);for(Er("beforeSanitizeShadowDOM",le,null);J=Ge.nextNode();)Er("uponSanitizeShadowNode",J,null),!pf(J)&&(J.content instanceof i&&R(J.content),ff(J));Er("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J,Ge,Lt,un;if(vr=!R,vr&&(R=""),typeof R!="string"&&!eu(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Go("dirty is not a string, aborting")}else throw Go("toString is not a function");if(!e.isSupported)return R;if(Te||ld(le),e.removed=[],typeof R=="string"&&(ht=!1),ht){if(R.nodeName){let mi=Ze(R.nodeName);if(!P[mi]||V[mi])throw Go("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)J=cf(""),Ge=J.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?J=Ge:J.appendChild(Ge);else{if(!ie&&!te&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(J=cf(R),!J)return ie?null:ze?M:""}J&&ae&&gi(J.firstChild);let bn=df(ht?R:J);for(;Lt=bn.nextNode();)pf(Lt)||(Lt.content instanceof i&&Z9(Lt.content),ff(Lt));if(ht)return R;if(ie){if(Ee)for(un=y.call(J.ownerDocument);J.firstChild;)un.appendChild(J.firstChild);else un=J;return(H.shadowroot||H.shadowrootmod)&&(un=k.call(n,un,!0)),un}let Rt=Y?J.outerHTML:J.innerHTML;return Y&&P["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Dn(Z4,J.ownerDocument.doctype.name)&&(Rt=" +`+Rt),te&&(Rt=Yn(Rt,I," "),Rt=Yn(Rt,F," "),Rt=Yn(Rt,L," ")),D&&ze?D.createHTML(Rt):Rt},e.setConfig=function(R){ld(R),Te=!0},e.clearConfig=function(){Cn=null,Te=!1},e.isValidAttribute=function(R,le,J){Cn||ld({});let Ge=Ze(R),Lt=Ze(le);return gf(Ge,Lt,J)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Ko(v[R],le))},e.removeHook=function(R){if(v[R])return H4(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var at=J4();d();d();var EE=Object.create,f0=Object.defineProperty,CE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,DE=Object.getPrototypeOf,AE=Object.prototype.hasOwnProperty,h0=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kE=(t,e)=>{for(var n in e)f0(t,n,{get:e[n],enumerable:!0})},m0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of wE(e))!AE.call(t,a)&&a!==n&&f0(t,a,{get:()=>e[a],enumerable:!(r=CE(e,a))||r.enumerable});return t},PE=(t,e,n)=>(m0(t,e,"default"),n&&m0(n,e,"default")),eb=(t,e,n)=>(n=t!=null?EE(DE(t)):{},m0(e||!t||!t.__esModule?f0(n,"default",{value:t,enumerable:!0}):n,t)),LE=h0((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),g){var m=g.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!o||g!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ae=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ae&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ae=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,g=l.firstChild;g;){var m=g.nextSibling;if(this._isPhrasingContent(g))p!==null?p.appendChild(g):this._isWhitespace(g)||(p=a.createElement("p"),l.replaceChild(p,g),p.appendChild(g));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}g=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(ie){if(!(!ie.parentNode||typeof ie.parentNode.tagName>"u")){var Ee=this._getInnerText(ie);if(!(Ee.length<25)){var ze=this._getNodeAncestors(ie,5);if(ze.length!==0){var _e=0;_e+=1,_e+=Ee.split(",").length,_e+=Math.min(Math.floor(Ee.length/100),3),this._forEachNode(ze,function(ce,pt){if(!(!ce.tagName||!ce.parentNode||typeof ce.parentNode.tagName>"u")){if(typeof ce.readability>"u"&&(this._initializeNode(ce),T.push(ce)),pt===0)var Pt=1;else pt===1?Pt=2:Pt=pt*3;ce.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,C=T.length;hS.readability.contentScore){b.splice(B,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,_=!1,k;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),_=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],I=1;I=.75&&v.push(this._getNodeAncestors(b[I]));var F=3;if(v.length>=F)for(k=y.parentNode;k.tagName!=="BODY";){for(var L=0,U=0;U=F){y=k;break}k=k.parentNode}y.readability||this._initializeNode(y),k=y.parentNode;for(var N=y.readability.contentScore,q=N/3;k.tagName!=="BODY";){if(!k.readability){k=k.parentNode;continue}var A=k.readability.contentScore;if(AN){y=k;break}N=k.readability.contentScore,k=k.parentNode}for(k=y.parentNode;k.tagName!="BODY"&&k.children.length==1;)y=k,k=y.parentNode;y.readability||this._initializeNode(y)}var E=a.createElement("DIV");i&&(E.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);k=y.parentNode;for(var O=k.children,H=0,j=O.length;H=P)V=!0;else if(W.nodeName==="P"){var X=this._getLinkDensity(W),Z=this._getInnerText(W),ue=Z.length;(ue>80&&X<.25||ue<80&&ue>0&&X===0&&Z.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),E.appendChild(W),O=k.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+E.innerHTML),this._prepArticle(E),this._debug&&this.log("Article content post-prep: "+E.innerHTML),_)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";E.firstChild;)ge.appendChild(E.firstChild);E.appendChild(ge)}this._debug&&this.log("Article content after paging: "+E.innerHTML);var te=!0,Y=this._getInnerText(E,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),g=l.getAttribute("content");if(g){var m=null,f=null;p&&(m=p.match(s),m&&(f=m[0].toLowerCase().replace(/\s/g,""),i[f]=g.trim())),!m&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=g.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],g=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(g)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(k){return k._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,k=>u+=this._getInnerText(k).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var g=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&g/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>g||T>Math.floor(g/3)||!s&&b<.9&&S<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&B>.2||c>=25&&B>.5||h===1&&S<75||h>1;if(s&&y){for(var _=0;_1)return y;let k=i.getElementsByTagName("li").length;if(m==k)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),_E=h0((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(g){if(!o.visibilityChecker(g))return!1;var m=g.className+" "+g.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),tb=h0((t,e)=>{var n=LE(),r=_E();e.exports={Readability:n,isProbablyReaderable:r}}),nb={};kE(nb,{Readability:()=>ju,default:()=>ib,isProbablyReaderable:()=>ab});var rb=eb(tb());PE(nb,eb(tb()));var{Readability:ju,isProbablyReaderable:ab}=rb,{default:X4,...FE}=rb,ib=X4!==void 0?X4:FE;var $a={};tu($a,{Breadcrumbs:()=>ta,BrowserClient:()=>Mi,Dedupe:()=>ia,FunctionToString:()=>Ka,GlobalHandlers:()=>fr,HttpContext:()=>aa,Hub:()=>Or,InboundFilters:()=>Ga,Integrations:()=>pw,LinkedErrors:()=>ra,SDK_VERSION:()=>Fi,Scope:()=>On,TryCatch:()=>na,addBreadcrumb:()=>el,addGlobalEventProcessor:()=>mr,captureEvent:()=>Ju,captureException:()=>Li,captureMessage:()=>Zu,chromeStackLineParser:()=>$0,close:()=>b3,configureScope:()=>Xu,createTransport:()=>is,defaultIntegrations:()=>tp,defaultStackLineParsers:()=>Z0,defaultStackParser:()=>pl,flush:()=>h3,forceLoad:()=>m3,geckoStackLineParser:()=>Y0,getCurrentHub:()=>Le,getHubFromCarrier:()=>zn,init:()=>d3,lastEventId:()=>g3,makeFetchTransport:()=>os,makeMain:()=>Pi,onLoad:()=>f3,opera10StackLineParser:()=>Zb,opera11StackLineParser:()=>Jb,setContext:()=>tl,setExtra:()=>rl,setExtras:()=>nl,setTag:()=>il,setTags:()=>al,setUser:()=>ol,showReportDialog:()=>p3,startTransaction:()=>sl,winjsStackLineParser:()=>Q0,withScope:()=>_i,wrap:()=>T3});d();d();d();d();d();d();d();d();d();var ob=Object.prototype.toString;function Hu(t){switch(ob.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return dr(t,Error)}}function Vo(t,e){return ob.call(t)===`[object ${e}]`}function Wu(t){return Vo(t,"ErrorEvent")}function sb(t){return Vo(t,"DOMException")}function Fr(t){return Vo(t,"String")}function $o(t){return t===null||typeof t!="object"&&typeof t!="function"}function Zn(t){return Vo(t,"Object")}function Yo(t){return typeof Event<"u"&&dr(t,Event)}function ub(t){return!1}function lb(t){return Vo(t,"RegExp")}function wi(t){return!!(t&&t.then&&typeof t.then=="function")}function cb(t){return Zn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function db(t){return typeof t=="number"&&t!==t}function dr(t,e){try{return t instanceof e}catch{return!1}}function Qo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function ME(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Fr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return gb({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function gb(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function OE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!IE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function Ku(t){let e=typeof t=="string"?RE(t):gb(t);return OE(e),e}d();var zE={};function it(){return typeof window<"u"?window:typeof self<"u"?self:zE}function Di(t,e,n){let r=n||it(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var Zo=["debug","info","warn","error","log","assert","trace"];function b0(t){if(!("console"in it()))return t();let n=console,r={};Zo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function mb(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?Zo.forEach(n=>{e[n]=(...r)=>{t&&b0(()=>{})}}):Zo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=Di("logger",mb):Se=mb();d();d();function ja(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function T0(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function S0(t){if(Hu(t))return{message:t.message,name:t.name,stack:t.stack,...hb(t)};if(Yo(t)){let e={type:t.type,target:fb(t.target),currentTarget:fb(t.currentTarget),...hb(t)};return typeof CustomEvent<"u"&&dr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function fb(t){try{return ub(t)?Qo(t):Object.prototype.toString.call(t)}catch{return""}}function hb(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Tb(t,e=40){let n=Object.keys(S0(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return ja(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:ja(a,e)}return""}function Ha(t){return y0(t,new Map)}function y0(t,e){if(Zn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=y0(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(y0(a,e))}),r}return t}d();var NE=50;function E0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return UE(a)}}function yb(t){return Array.isArray(t)?E0(...t):t}function UE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,NE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var x0="";function Xn(t){try{return!t||typeof t!="function"?x0:t.name||x0}catch{return x0}}d();function vb(){if(!("fetch"in it()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sb(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xb(){return!0}var Mr=it(),Xo={},Eb={};function qE(t){if(!Eb[t])switch(Eb[t]=!0,t){case"console":jE();break;case"fetch":HE();break;case"error":GE();break;case"unhandledrejection":VE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function er(t,e){Xo[t]=Xo[t]||[],Xo[t].push(e),qE(t)}function ki(t,e){if(!(!t||!Xo[t]))for(let n of Xo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${Xn(n)} -Error:`,r)}}function jE(){"console"in Mr&&Qo.forEach(function(t){t in console&&Jn(console,t,function(e){return function(...n){ki("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function HE(){xb()&&Jn(Mr,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:WE(e),url:KE(e)},startTimestamp:Date.now()};return ki("fetch",{...n}),t.apply(Mr,e).then(r=>(ki("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw ki("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function WE(t=[]){return"Request"in Mr&&dr(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function KE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Mr&&dr(t[0],Request)?t[0].url:String(t[0])}var w0=null;function GE(){w0=Mr.onerror,Mr.onerror=function(t,e,n,r,a){return ki("error",{column:r,error:a,line:n,msg:t,url:e}),w0?w0.apply(this,arguments):!1}}var D0=null;function VE(){D0=Mr.onunhandledrejection,Mr.onunhandledrejection=function(t){return ki("unhandledrejection",t),D0?D0.apply(this,arguments):!0}}d();function Cb(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function Vu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function wb(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ir(t){let{message:e,event_id:n}=t;if(e)return e;let r=wb(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Xo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Xr(t,e){let n=wb(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function A0(t){if(t&&t.__sentry_captured__)return!0;try{Zo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Db(){return!1}d();function Rr(t,e=1/0,n=1/0){try{return k0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function P0(t,e=3,n=100*1024){let r=Rr(t,e);return QE(r)>n?P0(t,e-1,n):r}function k0(t,e,n=1/0,r=1/0,a=Cb()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!db(e))return e;let s=$E(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return k0("",g,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=x0(e);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let m=p[g];l[g]=k0(g,m,n-1,r,a),c+=1}return o(e),l}function $E(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":cb(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Xn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function YE(t){return~-encodeURI(t).split(/%..|./).length}function QE(t){return YE(JSON.stringify(t))}d();d();d();function vn(t){return new pr(e=>{e(t)})}function es(t){return new pr((e,n)=>{n(t)})}var pr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(wi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Ab(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new pr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{vn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var ZE=["fatal","error","warning","log","info","debug"];function kb(t){return t==="warn"?"warning":ZE.includes(t)?t:"log"}d();var _0={nowSeconds:()=>Date.now()/1e3};function JE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var L0=JE(),Pb=L0===void 0?_0:{nowSeconds:()=>(L0.timeOrigin+L0.now())/1e3},ea=_0.nowSeconds.bind(_0),F0=Pb.nowSeconds.bind(Pb);var $u,fB=(()=>{if(!performance||!performance.now){$u="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function M0(t,e){return(e||new TextEncoder).encode(t)}function Yu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[M0(a,e),o]:a.push(typeof o=="string"?M0(o,e):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function jE(){"console"in Mr&&Zo.forEach(function(t){t in console&&Jn(console,t,function(e){return function(...n){ki("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function HE(){xb()&&Jn(Mr,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:WE(e),url:KE(e)},startTimestamp:Date.now()};return ki("fetch",{...n}),t.apply(Mr,e).then(r=>(ki("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw ki("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function WE(t=[]){return"Request"in Mr&&dr(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function KE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Mr&&dr(t[0],Request)?t[0].url:String(t[0])}var C0=null;function GE(){C0=Mr.onerror,Mr.onerror=function(t,e,n,r,a){return ki("error",{column:r,error:a,line:n,msg:t,url:e}),C0?C0.apply(this,arguments):!1}}var w0=null;function VE(){w0=Mr.onunhandledrejection,Mr.onunhandledrejection=function(t){return ki("unhandledrejection",t),w0?w0.apply(this,arguments):!0}}d();function Cb(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function Vu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function wb(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ir(t){let{message:e,event_id:n}=t;if(e)return e;let r=wb(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function es(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Xr(t,e){let n=wb(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function D0(t){if(t&&t.__sentry_captured__)return!0;try{Jo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Db(){return!1}d();function Rr(t,e=1/0,n=1/0){try{return A0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function k0(t,e=3,n=100*1024){let r=Rr(t,e);return QE(r)>n?k0(t,e-1,n):r}function A0(t,e,n=1/0,r=1/0,a=Cb()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!db(e))return e;let s=$E(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return A0("",g,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=S0(e);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let m=p[g];l[g]=A0(g,m,n-1,r,a),c+=1}return o(e),l}function $E(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":cb(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Xn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function YE(t){return~-encodeURI(t).split(/%..|./).length}function QE(t){return YE(JSON.stringify(t))}d();d();d();function vn(t){return new pr(e=>{e(t)})}function ts(t){return new pr((e,n)=>{n(t)})}var pr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(wi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Ab(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new pr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{vn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var ZE=["fatal","error","warning","log","info","debug"];function kb(t){return t==="warn"?"warning":ZE.includes(t)?t:"log"}d();var L0={nowSeconds:()=>Date.now()/1e3};function JE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var P0=JE(),Pb=P0===void 0?L0:{nowSeconds:()=>(P0.timeOrigin+P0.now())/1e3},ea=L0.nowSeconds.bind(L0),_0=Pb.nowSeconds.bind(Pb);var $u,fB=(()=>{if(!performance||!performance.now){$u="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function F0(t,e){return(e||new TextEncoder).encode(t)}function Yu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[F0(a,e),o]:a.push(typeof o=="string"?F0(o,e):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:XE(a)}function XE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function _b(t,e){let n=typeof t.data=="string"?M0(t.data,e):t.data;return[Ha({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var eC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function I0(t){return eC[t]}d();function Fb(t,e,n){let r=[{type:"client_report"},{timestamp:n||ea(),discarded_events:t}];return Wa(e?{dsn:e}:{},[r])}d();var tC=60*1e3;function nC(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?tC:r-e}function rC(t,e){return t[e]||t.all||0}function Mb(t,e,n=Date.now()){return rC(t,e)>n}function Bb(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let g of l.split(";"))a[g]=r+p}else o?a.all=r+nC(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Ib(t){return t[0]}d();function R0(t){let e=F0(),n={sid:Br(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>aC(n)};return t&&gr(n,t),n}function gr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||F0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Br()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function O0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),gr(t,n)}function aC(t){return Ha({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Rb=100,On=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&gr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Zn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Rb):Rb;if(r<=0)return this;let a={timestamp:ea(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ob(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new pr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),wi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Ob(){return Di("globalEventProcessors",()=>[])}function mr(t){Ob().push(t)}d();d();var z0=4,iC=100,Or=class{constructor(e,n=new On,r=z0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Br(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:Br();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=iC}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:ea(),...e},l=i?T0(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=Pi(this);try{e(this)}finally{Pi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&O0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=at(),{userAgent:s}=o.navigator||{},u=R0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&gr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=ts().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ts(){let t=at();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Pi(t){let e=ts(),n=zn(e);return Qu(e,t),n}function Le(){let t=ts();return(!zb(t)||zn(t).isOlderThan(z0))&&Qu(t,new Or),Db()?oC(t):zn(t)}function oC(t){try{let e=ts().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return zn(t);if(!zb(n)||zn(n).isOlderThan(z0)){let r=zn(t).getStackTop();Qu(n,new Or(r.client,On.clone(r.scope)))}return zn(n)}catch{return zn(t)}}function zb(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function zn(t){return Di("hub",()=>new Or,t)}function Qu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Li(t,e){return Le().captureException(t,{captureContext:e})}function Zu(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Ju(t,e){return Le().captureEvent(t,e)}function Xu(t){Le().configureScope(t)}function el(t){Le().addBreadcrumb(t)}function tl(t,e){Le().setContext(t,e)}function nl(t){Le().setExtras(t)}function rl(t,e){Le().setExtra(t,e)}function al(t){Le().setTags(t)}function il(t,e){Le().setTag(t,e)}function ol(t){Le().setUser(t)}function _i(t){Le().withScope(t)}function sl(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var sC="7";function Nb(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function uC(t){return`${Nb(t)}${t.projectId}/envelope/`}function lC(t,e){return bb({sentry_key:t.publicKey,sentry_version:sC,...e&&{sentry_client:`${e.name}/${e.version}`}})}function ns(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${uC(t)}?${lC(t,r)}`}function N0(t,e){let n=Ku(t),r=`${Nb(n)}embed/error-page/`,a=`dsn=${qa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Ub(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function cC(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function qb(t,e,n,r){let a=Ub(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:qa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Wa(i,[o])}function jb(t,e,n,r){let a=Ub(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};cC(t,n&&n.sdk);let l=dC(t,a,r,e);return delete t.sdkProcessingMetadata,Wa(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function dC(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Ib(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:qa(r)},...t.type==="transaction"&&i&&{trace:Ha({...i})}}}d();var Hb=[];function Wb(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function U0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Wb(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Wb(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function Kb(t){let e={};return t.forEach(n=>{e[n.name]=n,Hb.indexOf(n.name)===-1&&(n.setupOnce(mr,Le),Hb.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var Gb="Not capturing exception because it's already been captured.",rs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=Ku(e.dsn);let n=ns(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(A0(e)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Vo(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&A0(n.originalException)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),gr(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):vn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Kb(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=jb(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Lb(r,_b(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=qb(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(gr(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||Br(),timestamp:e.timestamp||ea()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=On.clone(s).update(n.captureContext));let u=vn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Rr(i.data,n,r)}}))},...e.user&&{user:Rr(e.user,n,r)},...e.contexts&&{contexts:Rr(e.contexts,n,r)},...e.extra&&{extra:Rr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Rr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Rr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ja(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=ja(s.value,o));let u=e.request;u&&u.url&&(u.url=ja(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return es(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),es(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return pC(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function pC(t){let e="`beforeSend` method has to return `null` or a valid event.";if(wi(t))return t.then(n=>{if(!(Zn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Zn(t)||t===null))throw new Tt(e);return t}d();function q0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var gC=30;function as(t,e,n=Ab(t.bufferSize||gC)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(B0(o,(p,g)=>{let m=I0(g);Mb(r,m)?t.recordDroppedEvent("ratelimit_backoff",m):s.push(p)}),s.length===0)return vn();let u=Wa(o[0],s),l=p=>{B0(u,(g,m)=>{t.recordDroppedEvent(p,I0(m))})},c=()=>e({body:Yu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Bb(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),vn();throw p})}return{send:i,flush:a}}d();var Fi="7.7.0";var Va={};tu(Va,{FunctionToString:()=>Ka,InboundFilters:()=>Ga});d();d();var Vb,Ka=class t{static id="FunctionToString";name=t.id;setupOnce(){Vb=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ai(this)||this;return Vb.apply(n,e)}}};d();var mC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ga=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=fC(o._options,u);return hC(a,l)?null:a}}return a};r.id=this.name,e(r)}};function fC(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...mC],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function hC(t,e){return e.ignoreInternal&&SC(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:XE(a)}function XE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function _b(t,e){let n=typeof t.data=="string"?F0(t.data,e):t.data;return[Ha({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var eC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function B0(t){return eC[t]}d();function Fb(t,e,n){let r=[{type:"client_report"},{timestamp:n||ea(),discarded_events:t}];return Wa(e?{dsn:e}:{},[r])}d();var tC=60*1e3;function nC(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?tC:r-e}function rC(t,e){return t[e]||t.all||0}function Mb(t,e,n=Date.now()){return rC(t,e)>n}function Bb(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let g of l.split(";"))a[g]=r+p}else o?a.all=r+nC(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Ib(t){return t[0]}d();function I0(t){let e=_0(),n={sid:Br(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>aC(n)};return t&&gr(n,t),n}function gr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||_0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Br()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function R0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),gr(t,n)}function aC(t){return Ha({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Rb=100,On=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&gr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Zn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Rb):Rb;if(r<=0)return this;let a={timestamp:ea(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ob(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new pr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),wi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Ob(){return Di("globalEventProcessors",()=>[])}function mr(t){Ob().push(t)}d();d();var O0=4,iC=100,Or=class{constructor(e,n=new On,r=O0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Br(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:Br();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=iC}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:ea(),...e},l=i?b0(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=Pi(this);try{e(this)}finally{Pi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&R0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=it(),{userAgent:s}=o.navigator||{},u=I0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&gr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=ns().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ns(){let t=it();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Pi(t){let e=ns(),n=zn(e);return Qu(e,t),n}function Le(){let t=ns();return(!zb(t)||zn(t).isOlderThan(O0))&&Qu(t,new Or),Db()?oC(t):zn(t)}function oC(t){try{let e=ns().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return zn(t);if(!zb(n)||zn(n).isOlderThan(O0)){let r=zn(t).getStackTop();Qu(n,new Or(r.client,On.clone(r.scope)))}return zn(n)}catch{return zn(t)}}function zb(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function zn(t){return Di("hub",()=>new Or,t)}function Qu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Li(t,e){return Le().captureException(t,{captureContext:e})}function Zu(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Ju(t,e){return Le().captureEvent(t,e)}function Xu(t){Le().configureScope(t)}function el(t){Le().addBreadcrumb(t)}function tl(t,e){Le().setContext(t,e)}function nl(t){Le().setExtras(t)}function rl(t,e){Le().setExtra(t,e)}function al(t){Le().setTags(t)}function il(t,e){Le().setTag(t,e)}function ol(t){Le().setUser(t)}function _i(t){Le().withScope(t)}function sl(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var sC="7";function Nb(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function uC(t){return`${Nb(t)}${t.projectId}/envelope/`}function lC(t,e){return bb({sentry_key:t.publicKey,sentry_version:sC,...e&&{sentry_client:`${e.name}/${e.version}`}})}function rs(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${uC(t)}?${lC(t,r)}`}function z0(t,e){let n=Ku(t),r=`${Nb(n)}embed/error-page/`,a=`dsn=${qa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Ub(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function cC(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function qb(t,e,n,r){let a=Ub(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:qa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Wa(i,[o])}function jb(t,e,n,r){let a=Ub(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};cC(t,n&&n.sdk);let l=dC(t,a,r,e);return delete t.sdkProcessingMetadata,Wa(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function dC(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Ib(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:qa(r)},...t.type==="transaction"&&i&&{trace:Ha({...i})}}}d();var Hb=[];function Wb(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function N0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Wb(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Wb(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function Kb(t){let e={};return t.forEach(n=>{e[n.name]=n,Hb.indexOf(n.name)===-1&&(n.setupOnce(mr,Le),Hb.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var Gb="Not capturing exception because it's already been captured.",as=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=Ku(e.dsn);let n=rs(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(D0(e)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=$o(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&D0(n.originalException)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),gr(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):vn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Kb(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=jb(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Lb(r,_b(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=qb(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(gr(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||Br(),timestamp:e.timestamp||ea()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=On.clone(s).update(n.captureContext));let u=vn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Rr(i.data,n,r)}}))},...e.user&&{user:Rr(e.user,n,r)},...e.contexts&&{contexts:Rr(e.contexts,n,r)},...e.extra&&{extra:Rr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Rr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Rr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ja(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=ja(s.value,o));let u=e.request;u&&u.url&&(u.url=ja(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ts(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ts(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return pC(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function pC(t){let e="`beforeSend` method has to return `null` or a valid event.";if(wi(t))return t.then(n=>{if(!(Zn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Zn(t)||t===null))throw new Tt(e);return t}d();function U0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var gC=30;function is(t,e,n=Ab(t.bufferSize||gC)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(M0(o,(p,g)=>{let m=B0(g);Mb(r,m)?t.recordDroppedEvent("ratelimit_backoff",m):s.push(p)}),s.length===0)return vn();let u=Wa(o[0],s),l=p=>{M0(u,(g,m)=>{t.recordDroppedEvent(p,B0(m))})},c=()=>e({body:Yu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Bb(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),vn();throw p})}return{send:i,flush:a}}d();var Fi="7.7.0";var Va={};tu(Va,{FunctionToString:()=>Ka,InboundFilters:()=>Ga});d();d();var Vb,Ka=class t{static id="FunctionToString";name=t.id;setupOnce(){Vb=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ai(this)||this;return Vb.apply(n,e)}}};d();var mC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ga=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=fC(o._options,u);return hC(a,l)?null:a}}return a};r.id=this.name,e(r)}};function fC(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...mC],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function hC(t,e){return e.ignoreInternal&&SC(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. Event: ${Ir(t)}`),!0):bC(t,e.ignoreErrors)?(!1&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Ir(t)}`),!0):TC(t,e.denyUrls)?(!1&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Ir(t)}. Url: ${ul(t)}`),!0):yC(t,e.allowUrls)?!1:(!1&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Ir(t)}. -Url: ${ul(t)}`),!0)}function bC(t,e){return!e||!e.length?!1:vC(t).some(n=>e.some(r=>Gu(n,r)))}function TC(t,e){if(!e||!e.length)return!1;let n=ul(t);return n?e.some(r=>Gu(n,r)):!1}function yC(t,e){if(!e||!e.length)return!0;let n=ul(t);return n?e.some(r=>Gu(n,r)):!0}function vC(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Ir(t)}`),[]}return[]}function SC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function xC(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ul(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?xC(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Ir(t)}`),null}}d();d();function W0(t,e){let n=K0(t,e),r={type:e&&e.name,value:DC(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function EC(t,e,n,r){let a={exception:{values:[{type:$o(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Tb(e)}`}]},extra:{__serialized__:P0(e)}};if(n){let i=K0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function j0(t,e){return{exception:{values:[W0(t,e)]}}}function K0(t,e){let n=e.stacktrace||e.stack||"",r=wC(e);try{return t(n,r)}catch{}return[]}var CC=/Minified React error #\d+;/i;function wC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(CC.test(t.message))return 1}return 0}function DC(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function $b(t,e,n,r){let a=n&&n.syntheticException||void 0,i=ll(t,e,a,r);return Xr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),vn(i)}function Yb(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=H0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),vn(o)}function ll(t,e,n,r,a){let i;if(Wu(e)&&e.error)return j0(t,e.error);if(sb(e)){let o=e;if("stack"in e)i=j0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=H0(t,u,n,r),Xo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Hu(e)?j0(t,e):Zn(e)||$o(e)?(i=EC(t,e,n,a),Xr(i,{synthetic:!0}),i):(i=H0(t,e,n,r),Xo(i,`${e}`,void 0),Xr(i,{synthetic:!0}),i)}function H0(t,e,n,r){let a={message:e};if(r&&n){let i=K0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var G0="Breadcrumbs",ta=class t{static id=G0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&er("console",kC),this.options.dom&&er("dom",AC(this.options.dom)),this.options.xhr&&er("xhr",PC),this.options.fetch&&er("fetch",LC),this.options.history&&er("history",_C)}};function AC(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Yo(n.event.target,a):Yo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function kC(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:kb(t.level),message:y0(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${y0(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function PC(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function LC(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function _C(t){let e=at(),n=t.from,r=t.to,a=Vu(e.location.href),i=Vu(n),o=Vu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var dl=at(),cl;function V0(){if(cl)return cl;if(Sb(fetch))return cl=fetch.bind(dl);let t=dl.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return cl=e.bind(dl)}function Qb(t,e){Object.prototype.toString.call(dl&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):vb()&&V0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var $0=at(),Mi=class extends rs{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Fi}],version:Fi},super(e),e.sendClientReports&&$0.document&&$0.document.addEventListener("visibilitychange",()=>{$0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $b(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Yb(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(G0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Ir(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=ns(this._dsn,this._options),r=Fb(e,this._options.tunnel&&qa(this._dsn));try{Qb(n,Yu(r))}catch(a){!1&&Se.error(a)}}};d();d();function is(t,e=V0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return as(t,n)}d();var Bi="?",FC=10,MC=20,BC=30,IC=40,RC=50;function os(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var OC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zC=/\((\S*)(?::(\d+))(?::(\d+))\)/,NC=t=>{let e=OC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=zC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=Xb(e[1]||Bi,e[2]);return os(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},Y0=[BC,NC],UC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,qC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,jC=t=>{let e=UC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=qC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||Bi;return[a,r]=Xb(a,r),os(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Q0=[RC,jC],HC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,WC=t=>{let e=HC.exec(t);return e?os(e[2],e[1]||Bi,+e[3],e[4]?+e[4]:void 0):void 0},Z0=[IC,WC],KC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,GC=t=>{let e=KC.exec(t);return e?os(e[2],e[3]||Bi,+e[1]):void 0},Zb=[FC,GC],VC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,$C=t=>{let e=VC.exec(t);return e?os(e[5],e[3]||e[4]||Bi,+e[1],+e[2]):void 0},Jb=[MC,$C],J0=[Y0,Q0,Z0],pl=C0(...J0),Xb=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Bi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var X0=0;function ep(){return X0>0}function YC(){X0+=1,setTimeout(()=>{X0-=1})}function zr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ai(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>zr(o,e));return t.apply(this,i)}catch(i){throw YC(),_i(o=>{o.addEventProcessor(s=>(e.mechanism&&(Xo(s,void 0,void 0),Xr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Li(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}S0(r,t),Zo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var tp={};tu(tp,{Breadcrumbs:()=>ta,Dedupe:()=>ia,GlobalHandlers:()=>fr,HttpContext:()=>aa,LinkedErrors:()=>ra,TryCatch:()=>na});d();d();var fr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:QC,onunhandledrejection:ZC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ew(n),r(),this._installFunc[n]=void 0)}}};function QC(){er("error",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(ep()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Fr(a)?XC(a,i,o,s):e3(ll(n,u||a,void 0,r,!1),i,o,s);l.level="error",t3(e,u,l,"onerror")})}function ZC(){er("unhandledrejection",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(ep()||a&&a.__sentry_own_request__)return!0;let i=Vo(a)?JC(a):ll(n,a,void 0,r,!0);i.level="error",t3(e,a,i,"onunhandledrejection")})}function JC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function XC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Wu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),e3({exception:{values:[{type:o,value:i}]}},e,n,r)}function e3(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Fr(e)&&e.length>0?e:pb();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function ew(t){!1&&Se.log(`Global Handler attached: ${t}`)}function t3(t,e,n,r){Xr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function n3(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var tw=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],na=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=at();this._options.setTimeout&&Jn(e,"setTimeout",r3),this._options.setInterval&&Jn(e,"setInterval",r3),this._options.requestAnimationFrame&&Jn(e,"requestAnimationFrame",nw),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Jn(XMLHttpRequest.prototype,"send",rw);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:tw).forEach(aw)}};function r3(t){return function(...e){let n=e[0];return e[0]=zr(n,{mechanism:{data:{function:Xn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function nw(t){return function(e){return t.apply(this,[zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Xn(t)},handled:!0,type:"instrument"}})])}}function rw(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Jn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Xn(i)},handled:!0,type:"instrument"}},s=Ai(i);return s&&(o.mechanism.data.handler=Xn(s)),zr(i,o)})}),t.apply(this,e)}}function aw(t){let e=at(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Jn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=zr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Xn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=zr(i,{mechanism:{data:{function:"addEventListener",handler:Xn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Jn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var iw="cause",ow=5,ra=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||iw,this._limit=e.limit||ow}setupOnce(){let e=Le().getClient();e&&mr((n,r)=>{let a=Le().getIntegration(t);return a?sw(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function sw(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!dr(a.originalException,Error))return r;let i=a3(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function a3(t,e,n,r,a=[]){if(!dr(n[r],Error)||a.length+1>=e)return a;let i=W0(t,n[r]);return a3(t,e,n[r],r,[i,...a])}d();var i3=at(),aa=class t{static id="HttpContext";name=t.id;setupOnce(){mr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!i3.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=i3.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var ia=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(uw(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function uw(t,e){return e?!!(lw(t,e)||cw(t,e)):!1}function lw(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!l3(t,e)||!u3(t,e))}function cw(t,e){let n=o3(e),r=o3(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!l3(t,e)||!u3(t,e))}function u3(t,e){let n=s3(t),r=s3(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(c3(n),er("history",({from:r,to:a})=>{r===void 0||r===a||c3(Le())}))}var y3={},rp=at();rp.Sentry&&rp.Sentry.Integrations&&(y3=rp.Sentry.Integrations);var pw={...y3,...Va,...tp};var gw=Ru.alert;d();var Ii=console,ap=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=In.green;r>1e4?a=In.red:r>1e3&&(a=In.yellow),Ii.debug(In.dim(Ia+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},ss=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&Ii.log(In.dim(Ia+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&Ii.log(In.green(Ia+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&Ii.warn(In.yellow(Ia+" WARN:"),...e)}error(...e){this.#e<=3&&Ii.error(In.red(Ia+" ERROR:"),...e)}fatal(...e){this.#e<=4&&Ii.error(In.red(Ia+" FATAL:"),...e)}timing(){return this.level===0?new ap:{reset:()=>{},stop:()=>{}}}},z=new ss;var v3=["*://*/*","*","*://*"],x3="immersive-translate-wildcard-placeholder.com";function ip(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>v3.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(v3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return fw(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,x3),g;try{g=new URL(p)}catch{return z.debug("invalid match pattern",p,"raw match value:",c),!1}let m=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=mw(l+":",S3(m),S3(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function S3(t){return t.replaceAll(x3,"*")}function mw(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function wt(t,e){return ip(t,e)!==null}function fw(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}d();d();var gl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.4",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var bw="";function Sn(){return bw||gl.version}function op(){return oe.runtime.getManifest().version}d();d();var Tw="";function Ri(){return Tw||globalThis.navigator.userAgent}function sp(){return Ri().includes("ImtFxiOS")}function E3(){let e=Ri().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function yw(){return Ri().includes("ImtFxAndroid")}function C3(){let t=Ri();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function w3(){let e=Ri().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function us(){let t=Ri();if(sp()||yw()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}function ml(t){if(t.beta)return!1;if(it()&&t.spVersion)return ls(op(),t.spVersion);if(C3()&&t.gspVersion){let e=w3();if(e)return ls(e,t.gspVersion)}if(sp()&&t.ispVersion){let e=E3();if(e)return ls(e,t.ispVersion)}return!1}function ls(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function up(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function fl(t){return Array.isArray(t)?t:t?[t]:[]}function hl(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function bl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function Tl(t,e){let n={...t};return P3(n,e),vw(n,e),n}function k3(t,e,n){let r={...e};return Ya({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ya({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function vw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;P3(t,a)}function Ya({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Sw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=fl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!D3(s))return;c=lp(l,u)}else if(o=="remove_v"){if(!D3(s))return;c=A3(l,u)}else o==="add"?c=lp(l,u):o=="remove"&&(c=A3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=lp(l,u):c=u,r(i,c)})}function P3(t,e){return Ya({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function lp(t,e){let n;if(Array.isArray(t)){let r=fl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Sw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function D3(t){let e=Sn();return t&&ls(e,t)}function A3(t,e){if(Array.isArray(t)){let n=fl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}d();d();var Oi="input is invalid type",cp=typeof window=="object",oa=cp?window:{};oa.JS_SHA256_NO_WINDOW&&(cp=!1);var xw=!cp&&typeof self=="object",Ew=!oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;Ew?oa=global:xw&&(oa=self);var SN=!oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,xN=typeof define=="function"&&define.amd,cs=!oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),Cw=[-2147483648,8388608,32768,128],tr=[24,16,8,0],yl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],vl=["hex","array","digest","arrayBuffer"],Ut=[];(oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});cs&&(oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var L3=function(t,e){return function(n){return new qt(e,!0).update(n)[t]()}},F3=function(t){var e=L3("hex",t);e.create=function(){return new qt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};qt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=Cw[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};qt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,g,m,f,T,b,h,C,D;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],p=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(b=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,g=b^t&n^D,T=a&i^~a&o,m=s+p+T+yl[l]+u[l],f=c+g,s=r+m<<0,r=m+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,g=h^r&e^b,T=s&a^~s&i,m=o+p+T+yl[l+1]+u[l+1],f=c+g,o=n+m<<0,n=m+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),C=n&r,g=C^n&t^h,T=o&s^~o&a,m=i+p+T+yl[l+2]+u[l+2],f=c+g,i=e+m<<0,e=m+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,g=D^e&r^C,T=i&o^~i&s,m=a+p+T+yl[l+3]+u[l+3],f=c+g,a=t+m<<0,t=m+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};qt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};qt.prototype.toString=qt.prototype.hex;qt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};qt.prototype.array=qt.prototype.digest;qt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Sl(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Oi);if(cs&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!cs||!ArrayBuffer.isView(t)))throw new Error(Oi)}else throw new Error(Oi);t.length>64&&(t=new qt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}qt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Sl.prototype=new qt;Sl.prototype.finalize=function(){if(qt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();qt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),qt.prototype.finalize.call(this)}};var zi=F3();zi.sha256=zi;zi.sha224=F3(!0);zi.sha256.hmac=M3();zi.sha224.hmac=M3(!0);var B3=zi;var I3=B3.sha256;function nr(t){return Promise.resolve(I3(t))}function xl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function sa(t,e){let n=I3.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function R3(t,e){let n=await sa(t,e);return xl(n)}async function El(t,e){let n=ww(e),r=await sa(t,n);return xl(r)}function ww(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}d();d();function Je(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();d();function O3(t){return t.replace(//g,">")}d();d();function Te(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=wn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":wn[a]}else return"auto";else return wn[r]}function ft(){return Te(document?.documentElement?.lang||"en")}function z3(t,e,n){let r=Dw(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function Dw(t,e){let n=[],r=[];for(let a=0;a0?Te.some(r=>Gu(n,r)))}function TC(t,e){if(!e||!e.length)return!1;let n=ul(t);return n?e.some(r=>Gu(n,r)):!1}function yC(t,e){if(!e||!e.length)return!0;let n=ul(t);return n?e.some(r=>Gu(n,r)):!0}function vC(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Ir(t)}`),[]}return[]}function SC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function xC(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ul(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?xC(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Ir(t)}`),null}}d();d();function H0(t,e){let n=W0(t,e),r={type:e&&e.name,value:DC(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function EC(t,e,n,r){let a={exception:{values:[{type:Yo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Tb(e)}`}]},extra:{__serialized__:k0(e)}};if(n){let i=W0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function q0(t,e){return{exception:{values:[H0(t,e)]}}}function W0(t,e){let n=e.stacktrace||e.stack||"",r=wC(e);try{return t(n,r)}catch{}return[]}var CC=/Minified React error #\d+;/i;function wC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(CC.test(t.message))return 1}return 0}function DC(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function $b(t,e,n,r){let a=n&&n.syntheticException||void 0,i=ll(t,e,a,r);return Xr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),vn(i)}function Yb(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=j0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),vn(o)}function ll(t,e,n,r,a){let i;if(Wu(e)&&e.error)return q0(t,e.error);if(sb(e)){let o=e;if("stack"in e)i=q0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=j0(t,u,n,r),es(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Hu(e)?q0(t,e):Zn(e)||Yo(e)?(i=EC(t,e,n,a),Xr(i,{synthetic:!0}),i):(i=j0(t,e,n,r),es(i,`${e}`,void 0),Xr(i,{synthetic:!0}),i)}function j0(t,e,n,r){let a={message:e};if(r&&n){let i=W0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var K0="Breadcrumbs",ta=class t{static id=K0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&er("console",kC),this.options.dom&&er("dom",AC(this.options.dom)),this.options.xhr&&er("xhr",PC),this.options.fetch&&er("fetch",LC),this.options.history&&er("history",_C)}};function AC(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Qo(n.event.target,a):Qo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function kC(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:kb(t.level),message:T0(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${T0(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function PC(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function LC(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function _C(t){let e=it(),n=t.from,r=t.to,a=Vu(e.location.href),i=Vu(n),o=Vu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var dl=it(),cl;function G0(){if(cl)return cl;if(Sb(fetch))return cl=fetch.bind(dl);let t=dl.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return cl=e.bind(dl)}function Qb(t,e){Object.prototype.toString.call(dl&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):vb()&&G0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var V0=it(),Mi=class extends as{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Fi}],version:Fi},super(e),e.sendClientReports&&V0.document&&V0.document.addEventListener("visibilitychange",()=>{V0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $b(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Yb(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(K0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Ir(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=rs(this._dsn,this._options),r=Fb(e,this._options.tunnel&&qa(this._dsn));try{Qb(n,Yu(r))}catch(a){!1&&Se.error(a)}}};d();d();function os(t,e=G0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return is(t,n)}d();var Bi="?",FC=10,MC=20,BC=30,IC=40,RC=50;function ss(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var OC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zC=/\((\S*)(?::(\d+))(?::(\d+))\)/,NC=t=>{let e=OC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=zC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=Xb(e[1]||Bi,e[2]);return ss(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},$0=[BC,NC],UC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,qC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,jC=t=>{let e=UC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=qC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||Bi;return[a,r]=Xb(a,r),ss(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Y0=[RC,jC],HC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,WC=t=>{let e=HC.exec(t);return e?ss(e[2],e[1]||Bi,+e[3],e[4]?+e[4]:void 0):void 0},Q0=[IC,WC],KC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,GC=t=>{let e=KC.exec(t);return e?ss(e[2],e[3]||Bi,+e[1]):void 0},Zb=[FC,GC],VC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,$C=t=>{let e=VC.exec(t);return e?ss(e[5],e[3]||e[4]||Bi,+e[1],+e[2]):void 0},Jb=[MC,$C],Z0=[$0,Y0,Q0],pl=E0(...Z0),Xb=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Bi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var J0=0;function X0(){return J0>0}function YC(){J0+=1,setTimeout(()=>{J0-=1})}function zr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ai(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>zr(o,e));return t.apply(this,i)}catch(i){throw YC(),_i(o=>{o.addEventProcessor(s=>(e.mechanism&&(es(s,void 0,void 0),Xr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Li(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}v0(r,t),Jo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var ep={};tu(ep,{Breadcrumbs:()=>ta,Dedupe:()=>ia,GlobalHandlers:()=>fr,HttpContext:()=>aa,LinkedErrors:()=>ra,TryCatch:()=>na});d();d();var fr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:QC,onunhandledrejection:ZC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ew(n),r(),this._installFunc[n]=void 0)}}};function QC(){er("error",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(X0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Fr(a)?XC(a,i,o,s):e3(ll(n,u||a,void 0,r,!1),i,o,s);l.level="error",t3(e,u,l,"onerror")})}function ZC(){er("unhandledrejection",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(X0()||a&&a.__sentry_own_request__)return!0;let i=$o(a)?JC(a):ll(n,a,void 0,r,!0);i.level="error",t3(e,a,i,"onunhandledrejection")})}function JC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function XC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Wu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),e3({exception:{values:[{type:o,value:i}]}},e,n,r)}function e3(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Fr(e)&&e.length>0?e:pb();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function ew(t){!1&&Se.log(`Global Handler attached: ${t}`)}function t3(t,e,n,r){Xr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function n3(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var tw=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],na=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=it();this._options.setTimeout&&Jn(e,"setTimeout",r3),this._options.setInterval&&Jn(e,"setInterval",r3),this._options.requestAnimationFrame&&Jn(e,"requestAnimationFrame",nw),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Jn(XMLHttpRequest.prototype,"send",rw);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:tw).forEach(aw)}};function r3(t){return function(...e){let n=e[0];return e[0]=zr(n,{mechanism:{data:{function:Xn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function nw(t){return function(e){return t.apply(this,[zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Xn(t)},handled:!0,type:"instrument"}})])}}function rw(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Jn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Xn(i)},handled:!0,type:"instrument"}},s=Ai(i);return s&&(o.mechanism.data.handler=Xn(s)),zr(i,o)})}),t.apply(this,e)}}function aw(t){let e=it(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Jn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=zr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Xn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=zr(i,{mechanism:{data:{function:"addEventListener",handler:Xn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Jn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var iw="cause",ow=5,ra=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||iw,this._limit=e.limit||ow}setupOnce(){let e=Le().getClient();e&&mr((n,r)=>{let a=Le().getIntegration(t);return a?sw(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function sw(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!dr(a.originalException,Error))return r;let i=a3(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function a3(t,e,n,r,a=[]){if(!dr(n[r],Error)||a.length+1>=e)return a;let i=H0(t,n[r]);return a3(t,e,n[r],r,[i,...a])}d();var i3=it(),aa=class t{static id="HttpContext";name=t.id;setupOnce(){mr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!i3.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=i3.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var ia=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(uw(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function uw(t,e){return e?!!(lw(t,e)||cw(t,e)):!1}function lw(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!l3(t,e)||!u3(t,e))}function cw(t,e){let n=o3(e),r=o3(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!l3(t,e)||!u3(t,e))}function u3(t,e){let n=s3(t),r=s3(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(c3(n),er("history",({from:r,to:a})=>{r===void 0||r===a||c3(Le())}))}var y3={},np=it();np.Sentry&&np.Sentry.Integrations&&(y3=np.Sentry.Integrations);var pw={...y3,...Va,...ep};var gw=Ru.alert;d();var Ii=console,rp=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=In.green;r>1e4?a=In.red:r>1e3&&(a=In.yellow),Ii.debug(In.dim(Ia+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},us=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&Ii.log(In.dim(Ia+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&Ii.log(In.green(Ia+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&Ii.warn(In.yellow(Ia+" WARN:"),...e)}error(...e){this.#e<=3&&Ii.error(In.red(Ia+" ERROR:"),...e)}fatal(...e){this.#e<=4&&Ii.error(In.red(Ia+" FATAL:"),...e)}timing(){return this.level===0?new rp:{reset:()=>{},stop:()=>{}}}},z=new us;var v3=["*://*/*","*","*://*"],x3="immersive-translate-wildcard-placeholder.com";function ap(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>v3.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(v3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return fw(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,x3),g;try{g=new URL(p)}catch{return z.debug("invalid match pattern",p,"raw match value:",c),!1}let m=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=mw(l+":",S3(m),S3(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function S3(t){return t.replaceAll(x3,"*")}function mw(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function wt(t,e){return ap(t,e)!==null}function fw(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}d();d();var gl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.5",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var bw="";function Sn(){return bw||gl.version}function ip(){return oe.runtime.getManifest().version}d();d();var Tw="";function Ri(){return Tw||globalThis.navigator.userAgent}function op(){return Ri().includes("ImtFxiOS")}function E3(){let e=Ri().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function yw(){return Ri().includes("ImtFxAndroid")}function C3(){let t=Ri();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function w3(){let e=Ri().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function ls(){let t=Ri();if(op()||yw()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}function ml(t){if(t.beta)return!1;if(ot()&&t.spVersion)return cs(ip(),t.spVersion);if(C3()&&t.gspVersion){let e=w3();if(e)return cs(e,t.gspVersion)}if(op()&&t.ispVersion){let e=E3();if(e)return cs(e,t.ispVersion)}return!1}function cs(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function sp(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function fl(t){return Array.isArray(t)?t:t?[t]:[]}function hl(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function bl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function Tl(t,e){let n={...t};return P3(n,e),vw(n,e),n}function k3(t,e,n){let r={...e};return Ya({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ya({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function vw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;P3(t,a)}function Ya({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Sw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=fl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!D3(s))return;c=up(l,u)}else if(o=="remove_v"){if(!D3(s))return;c=A3(l,u)}else o==="add"?c=up(l,u):o=="remove"&&(c=A3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=up(l,u):c=u,r(i,c)})}function P3(t,e){return Ya({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function up(t,e){let n;if(Array.isArray(t)){let r=fl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Sw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function D3(t){let e=Sn();return t&&cs(e,t)}function A3(t,e){if(Array.isArray(t)){let n=fl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}d();d();var Oi="input is invalid type",lp=typeof window=="object",oa=lp?window:{};oa.JS_SHA256_NO_WINDOW&&(lp=!1);var xw=!lp&&typeof self=="object",Ew=!oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;Ew?oa=global:xw&&(oa=self);var SN=!oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,xN=typeof define=="function"&&define.amd,ds=!oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),Cw=[-2147483648,8388608,32768,128],tr=[24,16,8,0],yl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],vl=["hex","array","digest","arrayBuffer"],qt=[];(oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});ds&&(oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var L3=function(t,e){return function(n){return new jt(e,!0).update(n)[t]()}},F3=function(t){var e=L3("hex",t);e.create=function(){return new jt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};jt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=Cw[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};jt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,g,m,f,T,b,h,C,D;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],p=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(b=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,g=b^t&n^D,T=a&i^~a&o,m=s+p+T+yl[l]+u[l],f=c+g,s=r+m<<0,r=m+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,g=h^r&e^b,T=s&a^~s&i,m=o+p+T+yl[l+1]+u[l+1],f=c+g,o=n+m<<0,n=m+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),C=n&r,g=C^n&t^h,T=o&s^~o&a,m=i+p+T+yl[l+2]+u[l+2],f=c+g,i=e+m<<0,e=m+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,g=D^e&r^C,T=i&o^~i&s,m=a+p+T+yl[l+3]+u[l+3],f=c+g,a=t+m<<0,t=m+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};jt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};jt.prototype.toString=jt.prototype.hex;jt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};jt.prototype.array=jt.prototype.digest;jt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Sl(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Oi);if(ds&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ds||!ArrayBuffer.isView(t)))throw new Error(Oi)}else throw new Error(Oi);t.length>64&&(t=new jt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}jt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Sl.prototype=new jt;Sl.prototype.finalize=function(){if(jt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();jt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),jt.prototype.finalize.call(this)}};var zi=F3();zi.sha256=zi;zi.sha224=F3(!0);zi.sha256.hmac=M3();zi.sha224.hmac=M3(!0);var B3=zi;var I3=B3.sha256;function nr(t){return Promise.resolve(I3(t))}function xl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function sa(t,e){let n=I3.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function R3(t,e){let n=await sa(t,e);return xl(n)}async function El(t,e){let n=ww(e),r=await sa(t,n);return xl(r)}function ww(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}d();d();function Xe(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();d();function O3(t){return t.replace(//g,">")}d();d();function be(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=wn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":wn[a]}else return"auto";else return wn[r]}function ft(){return be(document?.documentElement?.lang||"en")}function z3(t,e,n){let r=Dw(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function Dw(t,e){let n=[],r=[];for(let a=0;a0?Te){let C=[];dp(b,e,C);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&dp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?m.push(T):g.push(T))});let f=m.concat(g).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:m,explicitProps:g}}var ds=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Zt(s),l=Object.keys(cr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=cr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&it())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let g=!!p.canary,m=!!p.alpha,f=!!p.beta;return c===t[e]||g&&i||m&&(r||i)||f&&(a||r||i)?!0:!m&&!f&&!g}).map(c=>Cl(e,c,t))};function ps(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function N3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();var U3=me+"SyncStoreKey_";function At(t,e){let n=U3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Ze(t,e){let n=U3+t;return oe.storage.sync.set({[n]:e})}d();d();var q3=me+"StoreKey_";function Nr(t,e){let n=q3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function j3(t,e){let n=q3+t;return oe.storage.local.set({[n]:e})}d();d();d();d();function H3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function pp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Aw(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${g}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function gs(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function hr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=gs(t,n,e);return i===e&&n!==r&&(i=gs(t,r,e)),pp(i,a)}function Aw(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return hr(Ot,e,t.config.interfaceLanguage,"en",n)}d();function W3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+`;continue}else if(b.length>e){let C=[];cp(b,e,C);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&cp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?m.push(T):g.push(T))});let f=m.concat(g).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:m,explicitProps:g}}var ps=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Zt(s),l=Object.keys(cr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=cr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&ot())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let g=!!p.canary,m=!!p.alpha,f=!!p.beta;return c===t[e]||g&&i||m&&(r||i)||f&&(a||r||i)?!0:!m&&!f&&!g}).map(c=>Cl(e,c,t))};function gs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function N3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();var U3=me+"SyncStoreKey_";function At(t,e){let n=U3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Je(t,e){let n=U3+t;return oe.storage.sync.set({[n]:e})}d();d();var q3=me+"StoreKey_";function Nr(t,e){let n=q3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function j3(t,e){let n=q3+t;return oe.storage.local.set({[n]:e})}d();d();d();d();function H3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function dp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Aw(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${g}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function ms(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function hr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=ms(t,n,e);return i===e&&n!==r&&(i=ms(t,r,e)),dp(i,a)}function Aw(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return hr(zt,e,t.config.interfaceLanguage,"en",n)}d();function W3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:Pu});else{let f="";g=="OpenAI"?f=i4:f=o4,o?m+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:s4}):m+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||K3(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W3(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Ur(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Hd(G3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await G3(t);return e}async function G3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){z.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of kw(s.body)){let p=new TextDecoder().decode(c);u+=p;let g;for(;(g=u.indexOf(` -`))>=0;){let m=u.slice(0,g).trim();if(u=u.slice(g+1),m.startsWith("event:")||m==="")continue;let f="";if(m.startsWith("data:")&&(f=m.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){z.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(m){z.error("parse response failed",m)}u&&z.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*kw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Pw=new Map;function wl(t){let e=Lw(64),n=new CustomEvent(Ph,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Pw.set(e,(i,o)=>{i?a(i):r(o)})})}function Lw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=mp(s),{type:g,name:m}=p;if(g!==e)return!1;let f=mp(o),b=ms.get(g).get(m);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(C){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=ms.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new gp(`${i}:${e}`,this.logger);return ms.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},gp=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=mp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return V3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return V3(o,s,this.logger)}}};function V3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function mp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}var Dl;function _w(){return Dl||(Dl=new br("content_script",!1).getConnection("pure_main",()=>{}),Dl)}var $3="G-MKMD9LWFTR";async function fs(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(us()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=Je(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Nr("fakeUserId",""),u&&await Ze("fakeUserId",u));let l=Sn(),c=new Date,p=await At("installedAt","");p||(p=await Nr("installedAt",""),p&&await Ze("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Ze("installedAt",p)):(u=Fw(32),await Ze("fakeUserId",u)),p||(p=c.toISOString(),await Ze("installedAt",p));let g=new Date(p),m=Y3(g),f=Y3(c),T=m===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${$3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${$3}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let D=Ei.parse(C),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let _=us();_&&(y.browser_name=_.name,y.browser_version=_.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),m&&(y.install_day=Mw(g)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),B=await Al({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Fw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:Pu});else{let f="";g=="OpenAI"?f=i4:f=o4,o?m+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:s4}):m+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||K3(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W3(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Ur(t){let e;if(t&&t.retry&&t.retry>0)try{e=await jd(G3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await G3(t);return e}async function G3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){z.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of kw(s.body)){let p=new TextDecoder().decode(c);u+=p;let g;for(;(g=u.indexOf(` +`))>=0;){let m=u.slice(0,g).trim();if(u=u.slice(g+1),m.startsWith("event:")||m==="")continue;let f="";if(m.startsWith("data:")&&(f=m.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){z.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(m){z.error("parse response failed",m)}u&&z.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*kw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Pw=new Map;function wl(t){let e=Lw(64),n=new CustomEvent(Ph,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Pw.set(e,(i,o)=>{i?a(i):r(o)})})}function Lw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=gp(s),{type:g,name:m}=p;if(g!==e)return!1;let f=gp(o),b=fs.get(g).get(m);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(C){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=fs.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new pp(`${i}:${e}`,this.logger);return fs.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},pp=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=gp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return V3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return V3(o,s,this.logger)}}};function V3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function gp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}var Dl;function _w(){return Dl||(Dl=new br("content_script",!1).getConnection("pure_main",()=>{}),Dl)}var $3="G-MKMD9LWFTR";async function hs(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(ls()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=Xe(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Nr("fakeUserId",""),u&&await Je("fakeUserId",u));let l=Sn(),c=new Date,p=await At("installedAt","");p||(p=await Nr("installedAt",""),p&&await Je("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Je("installedAt",p)):(u=Fw(32),await Je("fakeUserId",u)),p||(p=c.toISOString(),await Je("installedAt",p));let g=new Date(p),m=Y3(g),f=Y3(c),T=m===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${$3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${$3}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let D=Ei.parse(C),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let _=ls();_&&(y.browser_name=_.name,y.browser_version=_.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),m&&(y.install_day=Mw(g)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),B=await Al({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Fw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5338,43 +5338,43 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};function Q3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Jt(){let t=await oe.storage.local.get(Fo);if(t[Fo]){let e=t[Fo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Ht(i),i}else return{}}async function Ht(t){await oe.storage.local.set({[Fo]:t})}async function kl(t){await oe.storage.local.set({[Yr]:t})}async function Z3(){let t=await oe.storage.local.get(Yr),n={...await fp(),...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let r=t[Yr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Xt(){let t=await oe.storage.local.get(Yr),e={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let E=t[Yr];if(E&&E.buildinConfigUpdatedAt){let P=new Date(E.buildinConfigUpdatedAt),O=new Date(e.buildinConfigUpdatedAt);P>O&&(e=E)}}let n=await zw(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let E=await oe.commands.getAll();for(let P of E)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await fp(),o=Q3(),s=await qr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Jt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let E=await Rw();p.interfaceLanguage=E}let g=p.interfaceLanguage==="en",m=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!g&&!m&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,C=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(C=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(C.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,B=await At("installedAt",""),S=Number(await Nr("translage_page_daily",0)),y=Number(await At(Kn,0)),_;y>0&&(Date.now()-y0&&(Date.now()-S0){let E=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(E.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],O=Array.isArray(P)?P:[P],H=Array.from(new Set(O.concat(E.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let F=Object.assign(i,e);Ya({rule:e,valueIsArray:E=>Array.isArray(i[E]),getMergedValue:E=>i[E],onMergedResult:(E,P)=>{E!="generalRule"&&(F[E]=P)}});let L=Zt(r),U={};p.translationServices&&p.translationServices.deepl&&(U=p.translationServices.deepl);let N={};p.translationServices&&p.translationServices.openai&&(N=p.translationServices.openai),!L&&U.authKey&&!U.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):U&&U.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!L&&N.APIKEY&&!N.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):N&&N.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),A=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let E of q){let P=E;if(P==="generalRule")typeof p[P]=="object"&&(F[P]=Tl(i[P],p[P]));else if(P==="translationServices")Nw(p,F);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&A.includes(P))p[P]&&(F[P]=Object.assign(F[P],p[P])),P==="shortcuts"&&(ye()||it()?F[P]={...F[P],...a}:F[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let O=F.rules||[],H={};for(let W of O)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?k3(e.generalRule,H[W.id],W):W);F[P]=[...j,...F[P]]}if(we.PROD==="0"&&we.DEV_RULES){let O=JSON.parse(we.DEV_RULES);F[P]=[...O,...F[P]]}}else p[P]!==void 0&&(F[P]=p[P])}return F.donateUrl=e.donateUrl,F.minVersion=e.minVersion,F.feedbackUrl=e.feedbackUrl,F.rawUserConfig=s,F}async function qr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function hs(t){await oe.storage.sync.set({userConfig:t})}async function bs(t,e){await oe.storage.local.set({[t]:e})}async function Pl(t){return(await oe.storage.local.get(t))[t]||""}var Rw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){z.warn("get browser language error:",r)}let n=t.map(r=>Te(r)).find(r=>Ot[r]);return n||"en"},fp=async()=>{let t={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:lr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Ow(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function zw(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return lr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ya({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ya({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var Uw=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function xn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(xn(t,i))return!1;if(xn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!xn(t,o)),c;function p(){return n&&n.display?!!Uw.includes(n.display):xn(t,r)}}var Kt=xn;function Qa(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function Ts(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function Tr(t,e=!1){let n=Io;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Za(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return Tr(n,e)}function Ui(t,e){return ua(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function hp(t){let{rule:e}=t,n=qw(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function qw(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function ys(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",bt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),ut(r,Uh,e.toString());let a=hp(t);return r.append(rt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function qi(t,e){return t.querySelector(`[${Ld}='${e}']`)}function J3(){document.querySelectorAll(`[${Ld}]`).forEach(e=>{e.remove()})}function X3(){document.querySelectorAll(`.${bt}-error`).forEach(e=>{e.remove()})}function e1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{Hi(n)&&e.push(n)}),e}function bp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),m=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(m,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let g=new RegExp(p,"gi");l=l.replace(g,(m,f)=>{let T=c++;return e[`${T}`]=O3(f),o.length>2?m.replace(f,`<${o[2]}${T}>`):m.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){z.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function vs(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||d1(s)||s1(s)||c1(s)||u1(s)||l1(s)||Hw(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ll(i,n,r)}function jr(t){return t.nodeType===Node.ELEMENT_NODE}function t1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Tp(){return await At("fakeUserId","")}async function jw(){return await At("installedAt","")}async function n1(t){let n=Me().INSTALL_FROM,r=Sn(),a=await jw(),i=await Tp(),o=await Xt(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Zt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function r1(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await vp(t,e);r(a)})()},[t,e,r]),n}async function vp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!it()&&ye()||et().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>wt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>wt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var _l=!1,Ww=ye();function p1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function Kw(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&g1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(da(i,Eu)){if(a===!0)return!0;continue}if(Ss(i.nodeName,e.inlineTags))return!0;if(!Sp(i,e))return!1}}return!0}function xp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(Ss(t.nodeName,n)||Sp(t,e)){if(da(t,Hh)||Ss(t.nodeName,["BR"]))return!1;if(da(t,Eu))return!0;if(Sp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return Kw(t,e)}else return da(t,Eu);return!1}function g1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&da(t,jh,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&da(t,Bh))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||Ss(t.nodeName,i))}function Ll(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!f1(r)&&r.length>=n}function m1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(f1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function f1(t){for(let e=0;e127)return!1;return!0}function s1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function u1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function l1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function c1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function d1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function da(t,e,n=!1){return Ep(t,e,"1",n)}function Ep(t,e,n,r=!1){return _l&&!r?t[Tn]?!!(t[Tn]&&t[Tn][e]===n):!1:t.dataset[e]===n}function Wi(t){return(t.innerText||t.textContent||"").trim()}function Cp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Fl(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function ut(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(_l&&!r?(t[Tn]||(t[Tn]={}),t[Tn][e]||(t[Tn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Ml(t,e,n=!1){if(_l&&!n){if(!t[Tn]||!t[Tn][e])return;delete t[Tn][e]}else delete t.dataset[e]}function Ki(t,e,n=!1){return _l&&!n?!t[Tn]||!t[Tn][e]?void 0:t[Tn][e]:t.dataset[e]}function Sp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!Ss(t.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Je())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function An(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){z.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else z.warn("injectCSS failed, rootDocument does not have head node",t)}function Hi(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(Ww){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function Ss(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function h1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function b1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||g1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return z.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function T1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();var v1="auto",Bl="auto",y1="auto";function S1(t){v1=t}function Nn(t){Bl=t}function yt(){return Bl!=="auto"?Bl:y1!=="auto"?y1:v1}function Il(){return Bl}function E1(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Un(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:g,sourceLanguageUrlPattern:m,immediateTranslationPattern:f}=n,T=g||"zh-CN",b=Gi(e,o),h=Gi(e,f),C=s,D=Object.keys(u);for(let ae of D){let ie=u[ae];if(Gi(e,ie)){C=ae;break}}let M=l,B=Object.keys(c);for(let ae of B){let ie=c[ae];if(ie&&Gi(e,ie)){M=ae;break}}let S=Gi(e,p),y=x1(e,p);y||(y=wt(e,Xh)),y||(y=wt(e,n.blockUrls));let _=x1(e,n.inputTranslationUrlPattern);_||(_=wt(e,n.inputTranslationBlockUrls));let k=wt(e,n.mutationBlockUrls),v=Object.keys(m),I={};for(let ae of v){let ie=m[ae];if(ie&&ie.matches)for(let Ee of ie.matches)I[Ee]=ae}let F=Object.keys(I),L=ip(e,F);L&&(i=I[L]??"auto",I[L]&&I[L]!=="auto"&&Nn(I[L]));let U=a.hostname,N=await nr(U),q=a.pathname+a.search+a.hash,A=await nr(q),E=`https://${N}.com/${A}`,P=await Jt(),O=await Z3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let se=await Mt.get(Ft,null),X=!1;se&&(X=Zt(se));let Z={targetLanguage:T,config:n,translationService:C,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:k,isInputTranslationExcludeUrl:_,rule:n.generalRule,url:e,encryptedUrl:E,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};se&&(Z.user=se,X?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(ae=>!Z.config.generalRule.bodyTranslateTags.includes(ae)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(ae=>ae!==".btn"));let ue=n.translationServices[Z.translationService]||{};ue.immediateTranslationTextCount!==void 0&&Gw(ue.immediateTranslationTextCount)&&ue.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCount),Z.translationService==="deepl"&&(ue&&ue.authKey&&ue.authKey.startsWith("immersive_")||ue&&ue.provider==="pro"&&Z.user?.token)&&ue.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ue.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCountForImmersiveDeepl),ue&&ue.translationDebounce&&typeof ue.translationDebounce=="number"&&(Z.state.translationDebounce=ue.translationDebounce);let ge=O.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let te=n.rules,Y;globalThis.PDFViewerApplication?Y=te.find(ae=>ae.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=te.find(ae=>ae.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=te.find(ae=>ae.pageType=="ebookBuilder"):Y=te.find(ae=>Gi(e,ae)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let be=n.generalRule;if(Y&&(Z.rule=Tl(be,Y)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(ae=>!Z.rule.bodyTranslateTags.includes(ae)&&!Z.rule.forceTranslateTags.includes(ae))),Z.rule.mainFrameSelector){let ae=document.querySelector(Z.rule.mainFrameSelector);ae&&(Z.mainFrame=ae)}return Z}function Gi(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&wt(t,r)?!1:n&&n.length>0&&wt(t,n)?!0:i&&i.length>0&&Fl(i)?!1:!!(a&&a.length>0&&Fl(a))}function x1(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&wt(t,n)||r&&r.length>0&&Fl(r))}function Gw(t){return typeof t=="number"}d();d();d();d();d();d();d();var Nq=w1(2),C1=w1(3);function w1(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var Vw=/\s+/g,$w=/[\t\n\v\f\r ]+/g;function D1(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?Yw:Qw;return String(t).replace(e.style==="html"?$w:Vw,e.trim?Zw(n):n)}function Yw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function Qw(){return" "}function Zw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var A1={}.hasOwnProperty;function Jw(t){return t==null?"":D1(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function Xw(t){return C1(" "+Jw(t)+" ")}function eD(t){let e=Xw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function sD(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function uD(t,e,n,r){e=cD(e,n,r);let a=[],i;if(e)for(i in e)Rl.call(e,i)&&a.push([i,lD(t,e[i])]);return a.length===0?Dp():a.sort(dD)}function lD(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of SD){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?I1(t)?"zh-TW":"zh-CN":e:"auto"}var O1=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Ap=new Map(O1),xD=new Map(O1.map(([t,e])=>[e,t]));function z1(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>xD.get(s));!e&&e!==0&&(e=25);let a=zl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Ap.keys()]},o=L1(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&g<.95)break;return Ap.get(p)}}let[s,u]=o[0],l=Ap.get(s);if(l&&u>.9)return l}}catch(r){z.error(r)}return"auto"}d();d();function pa(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function ED(t,e){return t<>>32-e}function Ul(t,e,n,r,a,i){return pa(ED(pa(pa(e,t),pa(r,i)),a),n)}function en(t,e,n,r,a,i,o){return Ul(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return Ul(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return Ul(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return Ul(n^(e|~r),t,e,a,i,o)}function Nl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function kp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Nl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Nl(a.concat(kp(e)),512+e.length*8),N1(Nl(i.concat(o),512+128))}function U1(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function Pp(t){return unescape(encodeURIComponent(t))}function q1(t){return CD(Pp(t))}function DD(t){return U1(q1(t))}function j1(t,e){return wD(Pp(t),Pp(e))}function AD(t,e){return U1(j1(t,e))}function kn(t,e,n){return e?n?j1(e,t):AD(e,t):n?q1(t):DD(t)}var Vi=[];async function ql(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function H1(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await LD(e,t)}async function W1(t){let e=kn(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await PD(n,e)}async function PD(t,e){let n=await ql(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function LD(t,e){let n=await ql(t);return(await FD()).includes(t)||await _D(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function _D(t){let e="cache_list",n=await ql(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Vi.push(t)},a.onerror=i=>{n.close()}}async function FD(){if(Vi&&Vi.length>0)return Vi;let t=await ql(Q+"-cacheList","cache_list");return Vi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Vi}d();d();var Lp="Original";function $e(){return Lp}function pn(t){Lp=t,K1(Lp)}d();function Hr(t){return t?.id?.endsWith("pdfWebPage")||!1}function ga(t){try{if(!t||!Hr(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Ye={},ma=async function(t,e){let{method:n,data:r}=t,a=await Ye.updateGlobalContext(),i=Date.now();if(z.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Ze(Kn,i);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Ze(Kn,i);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Ze(Kn,i);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Ze(Kn,i);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Ze(Kn,i);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Ze(Kn,i);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Ze(Kn,i);else if(n==="translatePage")await Ye.translatePage(a,r),Ze(Kn,i);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(vu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(_o,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Je()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Je())return JSON.stringify(a)}};function G1(t){Object.assign(Ye,t)}function V1(t){Object.assign(Ye,t)}function $1(t){Object.assign(Ye,t)}var MD=function(t,e){let{method:n,data:r}=t;if(z.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return $e();if(n==="getCurrentPageLanguage"){let a=yt();return Ye.detectCurrentPageLanguage().catch(i=>{z.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return Nn(r),yt();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return ga(a?.rule)}}},jl,Hl;function Y1(){let t=Wl();Je()||BD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Wl(){return jl||(jl=new br("content_script",!1).getConnection("main",ma),jl)}function BD(){return Hl||(Hl=new br("content_script",!1).getConnection("main_sync",MD,{sync:!0}),Hl)}d();var _p=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Kl="https://transmart.qq.com/api/imt",Wr=class t{static langMapReverse=new Map(_p.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await de({url:Kl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function ID(t,e){return Math.floor(Math.random()*(e-t+1))+t}var RD=30,Fp="RATE_LIMITER_TICKS",$i=class t{static strictTicks={};static clearStrictTicks(){bs(Fp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await Pl(Fp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){z.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await bs(Fp,JSON.stringify(this.strictTicks))}catch(a){z.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=ID(4,RD);await Dr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function vt(t){return await Wl().sendMessage("background:main",t)}function de(t){return mu()?wl({method:"request",data:t}):ye()||gu()?(t.fetchPolyfill=globalThis.GM_fetch,Ur(t)):vt({method:"fetch",data:t})}function qn(){return ye()?Xt():vt({method:"getConfig"})}function gn(t){return ye()?hs(t):vt({method:"setUserConfig",data:t})}function mn(){return ye()?qr():vt({method:"getUserConfig"})}function Es(){return ye()?Jt():vt({method:"getLocalConfig"})}function Gl(t){return ye()?Ht(t):vt({method:"setLocalConfig",data:t})}function Q1(t){return ye()?kl(t):vt({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=zl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||it()){if(t.translateService&&!Du.includes(t.translateService))return Promise.resolve("auto");let r=z1(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await vt({method:"detectLanguage",data:t});return Promise.resolve(e)}function Z1(){return vt({method:"detectTabLanguage"})}async function Vl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||it()){let n=t.substring(0,200);e=await Wr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function K1(t){let e=new CustomEvent(Oa,{detail:t});if(document.dispatchEvent(e),ye())return;Wl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function J1(t){return ye()?W1(t):vt({method:"queryParagraphCache",data:t})}async function X1(t){if(ye()){await H1(t);return}return vt({method:"setParagraphCache",data:t})}async function e2(){if(ye())return Promise.resolve();await vt({method:"mockRequest"})}function Yi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):vt({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function $l(t=""){return ye()||it()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function Mp(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Yl(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):vt({method:"openAboutPage"})}function Qi(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):vt({method:"openInTab",data:t})}function t2(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):vt({method:"openEbookViewerPage"})}function n2(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):vt({method:"openEbookBuilderPage"})}function r2(t){it()}function Zi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):vt({method:"openPdfViewerPage",data:{url:e}})}function a2(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):vt({method:"openSubtitleBuilderPage"})}function Ji(t){return ye()?Promise.resolve():vt({method:"setBadge",data:{text:t}})}function i2(){return ye()?(z.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):vt({method:"autoSyncLatestConfig"})}function Ql(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function o2(t,e){return ye()?$i.getDelay(t,e):vt({method:"getDelay",data:{key:t,options:e}})}function s2(t){let e;try{e=new URL(t)}catch{return!1}let n=Mp(),r="";try{r=new URL(n).hostname}catch{}return!!(r&&e.hostname===r)}function Zl(t){let e;try{e=new URL(t)}catch{return!1}let n=Mp(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(Bp(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function Bp(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();d();d();d();var Ip={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Jl(t,e,n){let[r]=re(()=>typeof e=="function"?e():e),[a]=re(n),[i,o]=re(r),[s,u]=re(!1),[l,c]=re("");Ce(()=>{Ip.get(t,r,a).then(g=>{g[t]&&o(g[t]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[t,r,a]);let p=Ve(g=>{let m=typeof g=="function"?g(i):g;z.debug("new settings",m),Ip.set(t,m,a).then(()=>{o(m),u(!0),c("")}).catch(f=>{o(m),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Rp(t,e,n){let r=[];return function(){let[i,o,s,u]=Jl(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ce(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function u2(t,e){return Rp(t,e,"sync")}var OD="userConfig",zD=null,ND=u2(OD,zD);function rr(t){let[e,n,r,a]=ND(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();d();var Xi={},UD={root:"",lang:"en",fallbackLang:"en"};function Op(t,e){let n=Object.assign({},UD,t);Xi=e||Xi;let[r,a]=re(n.lang),[i,o]=re(Xi),[s,u]=re(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let g=H3(n.root||"",p);n.getUrl&&(g=n.getUrl(n.root||"",p),fetch(g).then(m=>m.json()).then(m=>{Xi[p]=m,o({...Xi}),u(!0)}).catch(m=>{o({...Xi}),u(!0)}))};return Ce(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,g)=>{if(!i.hasOwnProperty(r))return p;let m=gs(i,r,p);return m===p&&r!==n.fallbackLang&&(m=gs(i,n.fallbackLang,p)),pp(m,g)},isReady:s}}d();d();var qD=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--qD,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var Np=hi(null),zp={root:"assets",lang:"en",fallbackLang:"en"},eo=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Op({root:t.root||zp.root,lang:t.lang||zp.lang,fallbackLang:t.fallbackLang||zp.fallbackLang,getUrl:t.getUrl},t.translations);return w(Np.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function xe(){return du(Np)}d();var jD=function(t,e){let{method:n,data:r}=t;z.debug(`popup received message: ${n}`,r||" ");let a;e.active&&(a=e.id,globalThis.document.dispatchEvent(new CustomEvent(Mo,{detail:{tabId:a,payload:t}})))},Xl;function l2(){Cs()}function Cs(){return Xl||(Xl=new br("popup",!1).getConnection("main_sync",jD),Xl)}d();d();function c2(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var ec="DROP_DOWN_DEFAULT_VALUE";function Up(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=qe(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:ec,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==ec){s.current.value=ec,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:ec,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function to(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var HD=({date:t})=>{let{t:e}=xe(),[n,r]=re(!1);return Ce(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},WD=({minVersion:t})=>{let{t:e}=xe();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},KD=()=>{let{t}=xe();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},GD=({message:t,handleSyncing:e,date:n})=>{let{t:r}=xe();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function qp(t){let{isShowError:e,request:n}=t,[r,a]=re(null),{t:i}=xe(),[o,s]=re(null),[u,l]=re(null),[c,p]=re(""),[g,m]=re(!1),[f,T]=re(!1),[b,h]=re(!1),[C,D]=re(null),[M,B]=re(null),S=Sn(),y=async()=>{p("");let _=o;if(o===null)try{let k=await n({url:Bo});k?(s(k),_=k,m(!0)):(p(i("unknownError")),l(null))}catch(k){l(null),p(k.message);return}_!==null?(t.setStorageBuildinConfig(_),l(!1),a(_.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ce(()=>{Xt().then(_=>{let k=_.buildinConfigUpdatedAt;D(_);let v=new Date(k);if(a(k),S==="0.0.0"){h(!0);return}n({url:Bo}).then(I=>{let F=I,L=F.minVersion,U=S;s(F);let N=F.latestVersion;if(N&&(to(U,N)?B(!0):B(!1)),to(U,L)){let q=F.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(I=>{l(null),p(I.message)})})},[]),Ce(()=>{Xt().then(_=>{D(_)})},[r]),C?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(KD,{}):c?e===!1?null:w(GD,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(WD,{minVersion:o.minVersion}):u===null||u===!0?null:g?w(HD,{date:r}):null}):null}d();function VD(){return navigator.userAgent.indexOf("Mac")!==-1}var d2={Alt:"\u2325"};function tc(t=""){return VD()?Object.keys(d2).reduce((e,n)=>e.replace(n,d2[n]),t):t}d();d();var nc='',p2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",g2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==";var m2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",f2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",h2="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";function b2({config:t,isLogin:e,isProUser:n}){let{t:r}=xe();return ml(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?ku:r4,children:[w("img",{src:e?f2:m2}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?ku:a4,children:w("img",{src:n?p2:g2})})]})}d();d();var T2={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},y2={...Ot,"zh-CN":{...T2["zh-CN"],...Ot["zh-CN"]},"zh-TW":{...T2["zh-TW"],...Ot["zh-TW"]}},rc=y2;function no(t,e,n){return hr(y2,t,e,lr,n)}var fa=(t,e,n,r)=>{let a=Yh[t]||t,i=Qh[t],o=Zh[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();d();d();d();d();function jp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(Vh),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${Fd}-theme-${t}`):a.push(`${_d}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(Fd):a.push(_d),a}function Hp(t){let e=["notranslate",wu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function v2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Za(n,!0),g="afterend",m=p[0],f=p[1],T=`${m}(\\d+)${f}`,b=new RegExp(T,"g"),h=rt.sanitize(u);o.length>0&&(h=h.replace(b,B=>{let S=h.indexOf(B),y=h[S-1]===" ",_=h[S+B.length]===" ",v=B.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),I=Number(v);if(isNaN(I))return B;let F=o[I];if(F&&F.type==="element"){let L=F.value.outerHTML;return y||(L=" "+L),_||(L=L+" "),L}else z.error("variable type not supported",F,B);return B}));let C=jp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&C.push(Gh);let D=Hp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${C.join(" ")}" ${ur}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${ur}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ur}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function ac(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";g&&(T=ca(Wp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Kt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let C=Kp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",B=Ts(C+D+M),S=B[0]+h+B[1];if(C===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=Ts(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Kp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);g&&(b=ca(Wp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",C=Ts(T+b+h),D=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(T===" ")D=D.trimStart();else{let M=Ts(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Kp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Wp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}t.targetText=rt.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Za(e);if(l.length>2){let c=l[2];return $D({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=v2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Wp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function $D(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=rt.sanitize(p);let g=p,m=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(g=g.replace(m,C=>{let D=g.indexOf(C),M=g[D-1]===" ",B=g[D+C.length]===" ",S=C.match(f);if(!S)return C;let y=S[1],_=Number(y);if(isNaN(_))return C;let k=o[Number(_)];if(k&&k.type==="element"){let v=k.value.outerHTML;return M||(v=" "+v),B||(v=v+" "),v}else if(k&&k.type==="text"){let v=k.value;return M||(v=" "+v),B||(v=v+" "),v}else z.error("variable type not supported",k,C);return C}));let T=jp(l,n,r||[],s),b=Hp(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${T.join(" ")}" ${ur}="1"><${a} class="${b.join(" ")}" ${ur}="1">${g}`,n||(i==="smart"?g=`
${g}`:g=`${i}${g}`),n&&(i!=="smart"?g=`${i}${g}`:g=`<${a} class="notranslate" ${ur}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function Kp(t){let e=t[t.length-1];return e?e.text:""}function Gp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let g=p[1],m=Number(g);if(isNaN(m))return c;let f=r[g];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=z3(a,c,p)}catch(b){if(r)for(let h=0;hb));let g=[],m=[],f=(b,h,C)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),m[b]||(m[b]=h,m[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),m[b].hasError)return;if(C){let S=C instanceof $?new $(C.name,C.message).initNetWork(C.status).initData(C.data):C;m[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}m[b].translatedTexts[h.partIndex]=D;let M=m[b],B=0;for(let S=0;S{let B=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(B=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:B,to:h.to,url:C,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=Kh;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let _=[],k=Tr(this.serviceConfig);if(h.tempSentences.forEach((q,A)=>{let E=bp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:k,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(E&&E.text&&E.text.trim().lengthA.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:B,to:h.to})}let v="";y&&y.length>=2?v=_.map((q,A)=>{let{item:E}=q;return A===_.length-1?E.text:E.text+y[0]+(A+1)+y[1]}).join(""):v=_.map(({item:q})=>q.text).join(S);let I=await this.translate({text:v,from:B,to:h.to,url:C,options:{...n,rawTextArrayLength:_.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=I,L=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let A=new RegExp(q,"g");L=F.split(A)}else L=F.split(S);let U=[];if(L.length>_.length){for(let q=0;q<_.length-1;q++)U[q]=L[q];U[_.length-1]=L.slice(_.length-1).join(S)}else if(L.length<_.length)for(let q=L.length;q<_.length;q++)L[q]="";else U=[...L];let N=h.tempSentences.map(q=>q.text);return k=Tr(this.serviceConfig,!0),U.forEach((q,A)=>{let E=_[A],P=E.index,O=E.variables||{};Object.keys(O).length>0&&(q=Gp({text:q,delimiters:k,variables:O})),N[P]=q}),{sourceTempSentences:h.tempSentences,text:N,from:I.from,to:I.to}}};g.push(M().then(B=>{let{text:S,sourceTempSentences:y}=B;for(let _=0;_{if(B instanceof $&&B.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=Tr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,g)=>{let m=bp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[g]!==!0&&(m&&m.text&&m.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){z.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=Tr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let g=p.index,m=p.variables,f=Object.keys(m);u[g]=l,f.length>0&&(u[g]=Gp({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[yt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};var x2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],ws=class t extends De{static langMap=new Map(x2);maxTextGroupLength=50;static langMapReverse=new Map(x2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await nr(a)].join(` +`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};function Q3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Jt(){let t=await oe.storage.local.get(Mo);if(t[Mo]){let e=t[Mo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Wt(i),i}else return{}}async function Wt(t){await oe.storage.local.set({[Mo]:t})}async function kl(t){await oe.storage.local.set({[Yr]:t})}async function Z3(){let t=await oe.storage.local.get(Yr),n={...await mp(),...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let r=t[Yr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Xt(){let t=await oe.storage.local.get(Yr),e={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let E=t[Yr];if(E&&E.buildinConfigUpdatedAt){let P=new Date(E.buildinConfigUpdatedAt),O=new Date(e.buildinConfigUpdatedAt);P>O&&(e=E)}}let n=await zw(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let E=await oe.commands.getAll();for(let P of E)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await mp(),o=Q3(),s=await qr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Jt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let E=await Rw();p.interfaceLanguage=E}let g=p.interfaceLanguage==="en",m=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!g&&!m&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,C=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(C=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(C.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,B=await At("installedAt",""),S=Number(await Nr("translage_page_daily",0)),y=Number(await At(Kn,0)),_;y>0&&(Date.now()-y0&&(Date.now()-S0){let E=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(E.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],O=Array.isArray(P)?P:[P],H=Array.from(new Set(O.concat(E.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let F=Object.assign(i,e);Ya({rule:e,valueIsArray:E=>Array.isArray(i[E]),getMergedValue:E=>i[E],onMergedResult:(E,P)=>{E!="generalRule"&&(F[E]=P)}});let L=Zt(r),U={};p.translationServices&&p.translationServices.deepl&&(U=p.translationServices.deepl);let N={};p.translationServices&&p.translationServices.openai&&(N=p.translationServices.openai),!L&&U.authKey&&!U.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):U&&U.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!L&&N.APIKEY&&!N.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):N&&N.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),A=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let E of q){let P=E;if(P==="generalRule")typeof p[P]=="object"&&(F[P]=Tl(i[P],p[P]));else if(P==="translationServices")Nw(p,F);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&A.includes(P))p[P]&&(F[P]=Object.assign(F[P],p[P])),P==="shortcuts"&&(ye()||ot()?F[P]={...F[P],...a}:F[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let O=F.rules||[],H={};for(let W of O)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?k3(e.generalRule,H[W.id],W):W);F[P]=[...j,...F[P]]}if(we.PROD==="0"&&we.DEV_RULES){let O=JSON.parse(we.DEV_RULES);F[P]=[...O,...F[P]]}}else p[P]!==void 0&&(F[P]=p[P])}return F.donateUrl=e.donateUrl,F.minVersion=e.minVersion,F.feedbackUrl=e.feedbackUrl,F.rawUserConfig=s,F}async function qr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function bs(t){await oe.storage.sync.set({userConfig:t})}async function Ts(t,e){await oe.storage.local.set({[t]:e})}async function Pl(t){return(await oe.storage.local.get(t))[t]||""}var Rw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){z.warn("get browser language error:",r)}let n=t.map(r=>be(r)).find(r=>zt[r]);return n||"en"},mp=async()=>{let t={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:lr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Ow(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function zw(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return lr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ya({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ya({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var Uw=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function xn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(xn(t,i))return!1;if(xn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!xn(t,o)),c;function p(){return n&&n.display?!!Uw.includes(n.display):xn(t,r)}}var Gt=xn;function Qa(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function ys(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function Tr(t,e=!1){let n=Ro;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Za(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return Tr(n,e)}function Ui(t,e){return ua(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function fp(t){let{rule:e}=t,n=qw(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function qw(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function vs(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",bt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),ut(r,Uh,e.toString());let a=fp(t);return r.append(at.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function qi(t,e){return t.querySelector(`[${Pd}='${e}']`)}function J3(){document.querySelectorAll(`[${Pd}]`).forEach(e=>{e.remove()})}function X3(){document.querySelectorAll(`.${bt}-error`).forEach(e=>{e.remove()})}function e1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{Hi(n)&&e.push(n)}),e}function hp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),m=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(m,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let g=new RegExp(p,"gi");l=l.replace(g,(m,f)=>{let T=c++;return e[`${T}`]=O3(f),o.length>2?m.replace(f,`<${o[2]}${T}>`):m.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){z.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function Ss(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||d1(s)||s1(s)||c1(s)||u1(s)||l1(s)||Hw(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ll(i,n,r)}function jr(t){return t.nodeType===Node.ELEMENT_NODE}function t1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function bp(){return await At("fakeUserId","")}async function jw(){return await At("installedAt","")}async function n1(t){let n=Me().INSTALL_FROM,r=Sn(),a=await jw(),i=await bp(),o=await Xt(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Zt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function r1(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await yp(t,e);r(a)})()},[t,e,r]),n}async function yp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!ot()&&ye()||tt().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>wt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>wt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var _l=!1,Ww=ye();function p1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function Kw(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&g1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(da(i,Eu)){if(a===!0)return!0;continue}if(xs(i.nodeName,e.inlineTags))return!0;if(!vp(i,e))return!1}}return!0}function Sp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(xs(t.nodeName,n)||vp(t,e)){if(da(t,Hh)||xs(t.nodeName,["BR"]))return!1;if(da(t,Eu))return!0;if(vp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return Kw(t,e)}else return da(t,Eu);return!1}function g1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&da(t,jh,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&da(t,Bh))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||xs(t.nodeName,i))}function Ll(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!f1(r)&&r.length>=n}function m1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(f1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function f1(t){for(let e=0;e127)return!1;return!0}function s1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function u1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function l1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function c1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function d1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function da(t,e,n=!1){return xp(t,e,"1",n)}function xp(t,e,n,r=!1){return _l&&!r?t[Tn]?!!(t[Tn]&&t[Tn][e]===n):!1:t.dataset[e]===n}function Wi(t){return(t.innerText||t.textContent||"").trim()}function Ep(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Fl(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function ut(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(_l&&!r?(t[Tn]||(t[Tn]={}),t[Tn][e]||(t[Tn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Ml(t,e,n=!1){if(_l&&!n){if(!t[Tn]||!t[Tn][e])return;delete t[Tn][e]}else delete t.dataset[e]}function Ki(t,e,n=!1){return _l&&!n?!t[Tn]||!t[Tn][e]?void 0:t[Tn][e]:t.dataset[e]}function vp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!xs(t.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Xe())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function An(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){z.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else z.warn("injectCSS failed, rootDocument does not have head node",t)}function Hi(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(Ww){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function xs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function h1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function b1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||g1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return z.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function T1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();var v1="auto",Bl="auto",y1="auto";function S1(t){v1=t}function Nn(t){Bl=t}function yt(){return Bl!=="auto"?Bl:y1!=="auto"?y1:v1}function Il(){return Bl}function E1(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Un(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:g,sourceLanguageUrlPattern:m,immediateTranslationPattern:f}=n,T=g||"zh-CN",b=Gi(e,o),h=Gi(e,f),C=s,D=Object.keys(u);for(let ae of D){let ie=u[ae];if(Gi(e,ie)){C=ae;break}}let M=l,B=Object.keys(c);for(let ae of B){let ie=c[ae];if(ie&&Gi(e,ie)){M=ae;break}}let S=Gi(e,p),y=x1(e,p);y||(y=wt(e,Xh)),y||(y=wt(e,n.blockUrls));let _=x1(e,n.inputTranslationUrlPattern);_||(_=wt(e,n.inputTranslationBlockUrls));let k=wt(e,n.mutationBlockUrls),v=Object.keys(m),I={};for(let ae of v){let ie=m[ae];if(ie&&ie.matches)for(let Ee of ie.matches)I[Ee]=ae}let F=Object.keys(I),L=ap(e,F);L&&(i=I[L]??"auto",I[L]&&I[L]!=="auto"&&Nn(I[L]));let U=a.hostname,N=await nr(U),q=a.pathname+a.search+a.hash,A=await nr(q),E=`https://${N}.com/${A}`,P=await Jt(),O=await Z3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let se=await Mt.get(Ft,null),X=!1;se&&(X=Zt(se));let Z={targetLanguage:T,config:n,translationService:C,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:k,isInputTranslationExcludeUrl:_,rule:n.generalRule,url:e,encryptedUrl:E,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};se&&(Z.user=se,X?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(ae=>!Z.config.generalRule.bodyTranslateTags.includes(ae)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(ae=>ae!==".btn"));let ue=n.translationServices[Z.translationService]||{};ue.immediateTranslationTextCount!==void 0&&Gw(ue.immediateTranslationTextCount)&&ue.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCount),Z.translationService==="deepl"&&(ue&&ue.authKey&&ue.authKey.startsWith("immersive_")||ue&&ue.provider==="pro"&&Z.user?.token)&&ue.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ue.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCountForImmersiveDeepl),ue&&ue.translationDebounce&&typeof ue.translationDebounce=="number"&&(Z.state.translationDebounce=ue.translationDebounce);let ge=O.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let te=n.rules,Y;globalThis.PDFViewerApplication?Y=te.find(ae=>ae.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=te.find(ae=>ae.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=te.find(ae=>ae.pageType=="ebookBuilder"):Y=te.find(ae=>Gi(e,ae)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let Te=n.generalRule;if(Y&&(Z.rule=Tl(Te,Y)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(ae=>!Z.rule.bodyTranslateTags.includes(ae)&&!Z.rule.forceTranslateTags.includes(ae))),Z.rule.mainFrameSelector){let ae=document.querySelector(Z.rule.mainFrameSelector);ae&&(Z.mainFrame=ae)}return Z}function Gi(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&wt(t,r)?!1:n&&n.length>0&&wt(t,n)?!0:i&&i.length>0&&Fl(i)?!1:!!(a&&a.length>0&&Fl(a))}function x1(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&wt(t,n)||r&&r.length>0&&Fl(r))}function Gw(t){return typeof t=="number"}d();d();d();d();d();d();d();var Nq=w1(2),C1=w1(3);function w1(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var Vw=/\s+/g,$w=/[\t\n\v\f\r ]+/g;function D1(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?Yw:Qw;return String(t).replace(e.style==="html"?$w:Vw,e.trim?Zw(n):n)}function Yw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function Qw(){return" "}function Zw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var A1={}.hasOwnProperty;function Jw(t){return t==null?"":D1(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function Xw(t){return C1(" "+Jw(t)+" ")}function eD(t){let e=Xw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function sD(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function uD(t,e,n,r){e=cD(e,n,r);let a=[],i;if(e)for(i in e)Rl.call(e,i)&&a.push([i,lD(t,e[i])]);return a.length===0?wp():a.sort(dD)}function lD(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of SD){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?I1(t)?"zh-TW":"zh-CN":e:"auto"}var O1=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Dp=new Map(O1),xD=new Map(O1.map(([t,e])=>[e,t]));function z1(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>xD.get(s));!e&&e!==0&&(e=25);let a=zl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Dp.keys()]},o=L1(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&g<.95)break;return Dp.get(p)}}let[s,u]=o[0],l=Dp.get(s);if(l&&u>.9)return l}}catch(r){z.error(r)}return"auto"}d();d();function pa(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function ED(t,e){return t<>>32-e}function Ul(t,e,n,r,a,i){return pa(ED(pa(pa(e,t),pa(r,i)),a),n)}function en(t,e,n,r,a,i,o){return Ul(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return Ul(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return Ul(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return Ul(n^(e|~r),t,e,a,i,o)}function Nl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function Ap(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Nl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Nl(a.concat(Ap(e)),512+e.length*8),N1(Nl(i.concat(o),512+128))}function U1(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function kp(t){return unescape(encodeURIComponent(t))}function q1(t){return CD(kp(t))}function DD(t){return U1(q1(t))}function j1(t,e){return wD(kp(t),kp(e))}function AD(t,e){return U1(j1(t,e))}function kn(t,e,n){return e?n?j1(e,t):AD(e,t):n?q1(t):DD(t)}var Vi=[];async function ql(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function H1(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await LD(e,t)}async function W1(t){let e=kn(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await PD(n,e)}async function PD(t,e){let n=await ql(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function LD(t,e){let n=await ql(t);return(await FD()).includes(t)||await _D(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function _D(t){let e="cache_list",n=await ql(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Vi.push(t)},a.onerror=i=>{n.close()}}async function FD(){if(Vi&&Vi.length>0)return Vi;let t=await ql(Q+"-cacheList","cache_list");return Vi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Vi}d();d();var Pp="Original";function $e(){return Pp}function pn(t){Pp=t,K1(Pp)}d();function Hr(t){return t?.id?.endsWith("pdfWebPage")||!1}function ga(t){try{if(!t||!Hr(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Ye={},ma=async function(t,e){let{method:n,data:r}=t,a=await Ye.updateGlobalContext(),i=Date.now();if(z.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Je(Kn,i);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Je(Kn,i);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Je(Kn,i);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Je(Kn,i);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Je(Kn,i);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Je(Kn,i);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Je(Kn,i);else if(n==="translatePage")await Ye.translatePage(a,r),Je(Kn,i);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(vu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Fo,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Xe()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Xe())return JSON.stringify(a)}};function G1(t){Object.assign(Ye,t)}function V1(t){Object.assign(Ye,t)}function $1(t){Object.assign(Ye,t)}var MD=function(t,e){let{method:n,data:r}=t;if(z.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return $e();if(n==="getCurrentPageLanguage"){let a=yt();return Ye.detectCurrentPageLanguage().catch(i=>{z.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return Nn(r),yt();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return ga(a?.rule)}}},jl,Hl;function Y1(){let t=Wl();Xe()||BD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Wl(){return jl||(jl=new br("content_script",!1).getConnection("main",ma),jl)}function BD(){return Hl||(Hl=new br("content_script",!1).getConnection("main_sync",MD,{sync:!0}),Hl)}d();var Lp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Kl="https://transmart.qq.com/api/imt",Wr=class t{static langMapReverse=new Map(Lp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await de({url:Kl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function ID(t,e){return Math.floor(Math.random()*(e-t+1))+t}var RD=30,_p="RATE_LIMITER_TICKS",$i=class t{static strictTicks={};static clearStrictTicks(){Ts(_p,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await Pl(_p);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){z.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await Ts(_p,JSON.stringify(this.strictTicks))}catch(a){z.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=ID(4,RD);await Dr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function vt(t){return await Wl().sendMessage("background:main",t)}function de(t){return mu()?wl({method:"request",data:t}):ye()||gu()?(t.fetchPolyfill=globalThis.GM_fetch,Ur(t)):vt({method:"fetch",data:t})}function qn(){return ye()?Xt():vt({method:"getConfig"})}function gn(t){return ye()?bs(t):vt({method:"setUserConfig",data:t})}function mn(){return ye()?qr():vt({method:"getUserConfig"})}function Cs(){return ye()?Jt():vt({method:"getLocalConfig"})}function Gl(t){return ye()?Wt(t):vt({method:"setLocalConfig",data:t})}function Q1(t){return ye()?kl(t):vt({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=zl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||ot()){if(t.translateService&&!Du.includes(t.translateService))return Promise.resolve("auto");let r=z1(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await vt({method:"detectLanguage",data:t});return Promise.resolve(e)}function Z1(){return vt({method:"detectTabLanguage"})}async function Vl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||ot()){let n=t.substring(0,200);e=await Wr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function K1(t){let e=new CustomEvent(Oa,{detail:t});if(document.dispatchEvent(e),ye())return;Wl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function J1(t){return ye()?W1(t):vt({method:"queryParagraphCache",data:t})}async function X1(t){if(ye()){await H1(t);return}return vt({method:"setParagraphCache",data:t})}async function e2(){if(ye())return Promise.resolve();await vt({method:"mockRequest"})}function Yi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):vt({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function $l(t=""){return ye()||ot()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function Fp(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Yl(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):vt({method:"openAboutPage"})}function Qi(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):vt({method:"openInTab",data:t})}function t2(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):vt({method:"openEbookViewerPage"})}function n2(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):vt({method:"openEbookBuilderPage"})}function r2(t){ot()}function Zi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):vt({method:"openPdfViewerPage",data:{url:e}})}function a2(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):vt({method:"openSubtitleBuilderPage"})}function Ji(t){return ye()?Promise.resolve():vt({method:"setBadge",data:{text:t}})}function i2(){return ye()?(z.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):vt({method:"autoSyncLatestConfig"})}function Ql(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function o2(t,e){return ye()?$i.getDelay(t,e):vt({method:"getDelay",data:{key:t,options:e}})}function s2(t){let e;try{e=new URL(t)}catch{return!1}let n=Fp(),r="";try{r=new URL(n).hostname}catch{}return!!(r&&e.hostname===r)}function Zl(t){let e;try{e=new URL(t)}catch{return!1}let n=Fp(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(Mp(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function Mp(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();d();d();d();var Bp={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Jl(t,e,n){let[r]=re(()=>typeof e=="function"?e():e),[a]=re(n),[i,o]=re(r),[s,u]=re(!1),[l,c]=re("");Ce(()=>{Bp.get(t,r,a).then(g=>{g[t]&&o(g[t]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[t,r,a]);let p=Ve(g=>{let m=typeof g=="function"?g(i):g;z.debug("new settings",m),Bp.set(t,m,a).then(()=>{o(m),u(!0),c("")}).catch(f=>{o(m),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Ip(t,e,n){let r=[];return function(){let[i,o,s,u]=Jl(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ce(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function u2(t,e){return Ip(t,e,"sync")}var OD="userConfig",zD=null,ND=u2(OD,zD);function rr(t){let[e,n,r,a]=ND(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();d();var Xi={},UD={root:"",lang:"en",fallbackLang:"en"};function Rp(t,e){let n=Object.assign({},UD,t);Xi=e||Xi;let[r,a]=re(n.lang),[i,o]=re(Xi),[s,u]=re(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let g=H3(n.root||"",p);n.getUrl&&(g=n.getUrl(n.root||"",p),fetch(g).then(m=>m.json()).then(m=>{Xi[p]=m,o({...Xi}),u(!0)}).catch(m=>{o({...Xi}),u(!0)}))};return Ce(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,g)=>{if(!i.hasOwnProperty(r))return p;let m=ms(i,r,p);return m===p&&r!==n.fallbackLang&&(m=ms(i,n.fallbackLang,p)),dp(m,g)},isReady:s}}d();d();var qD=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--qD,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var zp=hi(null),Op={root:"assets",lang:"en",fallbackLang:"en"},eo=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Rp({root:t.root||Op.root,lang:t.lang||Op.lang,fallbackLang:t.fallbackLang||Op.fallbackLang,getUrl:t.getUrl},t.translations);return w(zp.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function xe(){return du(zp)}d();var jD=function(t,e){let{method:n,data:r}=t;z.debug(`popup received message: ${n}`,r||" ");let a;e.active&&(a=e.id,globalThis.document.dispatchEvent(new CustomEvent(Bo,{detail:{tabId:a,payload:t}})))},Xl;function l2(){ws()}function ws(){return Xl||(Xl=new br("popup",!1).getConnection("main_sync",jD),Xl)}d();d();function c2(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var ec="DROP_DOWN_DEFAULT_VALUE";function Np(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=je(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:ec,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==ec){s.current.value=ec,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:ec,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function to(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var HD=({date:t})=>{let{t:e}=xe(),[n,r]=re(!1);return Ce(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},WD=({minVersion:t})=>{let{t:e}=xe();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},KD=()=>{let{t}=xe();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},GD=({message:t,handleSyncing:e,date:n})=>{let{t:r}=xe();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Up(t){let{isShowError:e,request:n}=t,[r,a]=re(null),{t:i}=xe(),[o,s]=re(null),[u,l]=re(null),[c,p]=re(""),[g,m]=re(!1),[f,T]=re(!1),[b,h]=re(!1),[C,D]=re(null),[M,B]=re(null),S=Sn(),y=async()=>{p("");let _=o;if(o===null)try{let k=await n({url:Io});k?(s(k),_=k,m(!0)):(p(i("unknownError")),l(null))}catch(k){l(null),p(k.message);return}_!==null?(t.setStorageBuildinConfig(_),l(!1),a(_.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ce(()=>{Xt().then(_=>{let k=_.buildinConfigUpdatedAt;D(_);let v=new Date(k);if(a(k),S==="0.0.0"){h(!0);return}n({url:Io}).then(I=>{let F=I,L=F.minVersion,U=S;s(F);let N=F.latestVersion;if(N&&(to(U,N)?B(!0):B(!1)),to(U,L)){let q=F.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(I=>{l(null),p(I.message)})})},[]),Ce(()=>{Xt().then(_=>{D(_)})},[r]),C?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(KD,{}):c?e===!1?null:w(GD,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(WD,{minVersion:o.minVersion}):u===null||u===!0?null:g?w(HD,{date:r}):null}):null}d();function VD(){return navigator.userAgent.indexOf("Mac")!==-1}var d2={Alt:"\u2325"};function tc(t=""){return VD()?Object.keys(d2).reduce((e,n)=>e.replace(n,d2[n]),t):t}d();d();var nc='',p2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",g2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==";var m2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",f2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",h2="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";function b2({config:t,isLogin:e,isProUser:n}){let{t:r}=xe();return ml(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?ku:r4,children:[w("img",{src:e?f2:m2}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?ku:a4,children:w("img",{src:n?p2:g2})})]})}d();d();var T2={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},y2={...zt,"zh-CN":{...T2["zh-CN"],...zt["zh-CN"]},"zh-TW":{...T2["zh-TW"],...zt["zh-TW"]}},rc=y2;function no(t,e,n){return hr(y2,t,e,lr,n)}var fa=(t,e,n,r)=>{let a=Yh[t]||t,i=Qh[t],o=Zh[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();d();d();d();d();function qp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(Vh),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${_d}-theme-${t}`):a.push(`${Ld}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(_d):a.push(Ld),a}function jp(t){let e=["notranslate",wu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function v2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Za(n,!0),g="afterend",m=p[0],f=p[1],T=`${m}(\\d+)${f}`,b=new RegExp(T,"g"),h=at.sanitize(u);o.length>0&&(h=h.replace(b,B=>{let S=h.indexOf(B),y=h[S-1]===" ",_=h[S+B.length]===" ",v=B.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),I=Number(v);if(isNaN(I))return B;let F=o[I];if(F&&F.type==="element"){let L=F.value.outerHTML;return y||(L=" "+L),_||(L=L+" "),L}else z.error("variable type not supported",F,B);return B}));let C=qp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&C.push(Gh);let D=jp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${C.join(" ")}" ${ur}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${ur}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ur}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function ac(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";g&&(T=ca(Hp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Gt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let C=Wp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",B=ys(C+D+M),S=B[0]+h+B[1];if(C===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=ys(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Wp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);g&&(b=ca(Hp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",C=ys(T+b+h),D=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(T===" ")D=D.trimStart();else{let M=ys(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Wp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Hp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}t.targetText=at.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Za(e);if(l.length>2){let c=l[2];return $D({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=v2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Hp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function $D(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=at.sanitize(p);let g=p,m=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(g=g.replace(m,C=>{let D=g.indexOf(C),M=g[D-1]===" ",B=g[D+C.length]===" ",S=C.match(f);if(!S)return C;let y=S[1],_=Number(y);if(isNaN(_))return C;let k=o[Number(_)];if(k&&k.type==="element"){let v=k.value.outerHTML;return M||(v=" "+v),B||(v=v+" "),v}else if(k&&k.type==="text"){let v=k.value;return M||(v=" "+v),B||(v=v+" "),v}else z.error("variable type not supported",k,C);return C}));let T=qp(l,n,r||[],s),b=jp(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${T.join(" ")}" ${ur}="1"><${a} class="${b.join(" ")}" ${ur}="1">${g}`,n||(i==="smart"?g=`
${g}`:g=`${i}${g}`),n&&(i!=="smart"?g=`${i}${g}`:g=`<${a} class="notranslate" ${ur}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function Wp(t){let e=t[t.length-1];return e?e.text:""}function Kp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let g=p[1],m=Number(g);if(isNaN(m))return c;let f=r[g];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=z3(a,c,p)}catch(b){if(r)for(let h=0;hb));let g=[],m=[],f=(b,h,C)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),m[b]||(m[b]=h,m[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),m[b].hasError)return;if(C){let S=C instanceof $?new $(C.name,C.message).initNetWork(C.status).initData(C.data):C;m[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}m[b].translatedTexts[h.partIndex]=D;let M=m[b],B=0;for(let S=0;S{let B=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(B=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:B,to:h.to,url:C,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=Kh;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let _=[],k=Tr(this.serviceConfig);if(h.tempSentences.forEach((q,A)=>{let E=hp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:k,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(E&&E.text&&E.text.trim().lengthA.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:B,to:h.to})}let v="";y&&y.length>=2?v=_.map((q,A)=>{let{item:E}=q;return A===_.length-1?E.text:E.text+y[0]+(A+1)+y[1]}).join(""):v=_.map(({item:q})=>q.text).join(S);let I=await this.translate({text:v,from:B,to:h.to,url:C,options:{...n,rawTextArrayLength:_.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=I,L=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let A=new RegExp(q,"g");L=F.split(A)}else L=F.split(S);let U=[];if(L.length>_.length){for(let q=0;q<_.length-1;q++)U[q]=L[q];U[_.length-1]=L.slice(_.length-1).join(S)}else if(L.length<_.length)for(let q=L.length;q<_.length;q++)L[q]="";else U=[...L];let N=h.tempSentences.map(q=>q.text);return k=Tr(this.serviceConfig,!0),U.forEach((q,A)=>{let E=_[A],P=E.index,O=E.variables||{};Object.keys(O).length>0&&(q=Kp({text:q,delimiters:k,variables:O})),N[P]=q}),{sourceTempSentences:h.tempSentences,text:N,from:I.from,to:I.to}}};g.push(M().then(B=>{let{text:S,sourceTempSentences:y}=B;for(let _=0;_{if(B instanceof $&&B.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=Tr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,g)=>{let m=hp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[g]!==!0&&(m&&m.text&&m.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){z.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=Tr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let g=p.index,m=p.variables,f=Object.keys(m);u[g]=l,f.length>0&&(u[g]=Kp({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[yt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};var x2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Ds=class t extends De{static langMap=new Map(x2);maxTextGroupLength=50;static langMapReverse=new Map(x2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await nr(a)].join(` `),p=t.getUTCDate(u),g=["TC3-HMAC-SHA256",l,`${p}/${i}/tc3_request`,await nr(c)].join(` -`),m=await R3(p,`TC3${n}`),f=await El(i,m),T=await El("tc3_request",f),b=await El(g,T),h=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var E2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],YD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Ds=class t extends De{static langMap=new Map(E2);static langMapReverse=new Map(E2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:YD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var C2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ja=class t extends De{static langMap=new Map(C2);static langMapReverse=new Map(C2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function QD(t,e){return e?t+(e-t%e):t}function ZD(t,e){return t.split(e).length-1}function Vp(t){let e=Date.now(),n=1;for(let r of t)n+=ZD(r,"i");return QD(e,n)}function JD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function $p(){return JD(1e6,1e8)}d();d();d();var Yp="https://www2.deepl.com/jsonrpc",Qp="auto",w2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function XD(t=w2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Zp(t){return XD()[t.toLowerCase()]}var eA={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function tA(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function nA(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function rA(t,e,n,r,a,i,o){let s=$p(),u=nA(r,n),l=[];e.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Vp(e);let c=await de({retry:2,method:"POST",url:t,body:tA(u),headers:eA}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{p.text.push(g.text)}),p}async function D2(t,e,n,r=Qp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:rA(t,e,Zp(n),Zp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var A2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ro=class t extends De{static langMap=new Map(A2);static langMapReverse=new Map(A2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Yp;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=jt(Yp,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await D2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var As=class t extends De{static langMap=new Map(_p);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=Wr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=k2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await de({url:Kl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=k2()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),g=await de({url:Kl,body:p,method:"POST"});if(g.header.ret_code!=="succ")throw new $(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function k2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Jp(){return Math.random()>=.1}var ao=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Jp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await e2(),!Jp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var L2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Xp=new Map(L2),P2=new Map(L2.map(([t,e])=>[e,t])),eg=class t extends De{static langMap=Xp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Xp.get(r)||"auto",target_lang:Xp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:P2.get(o.source_lang),to:P2.get(o.target_lang)}}else throw new $(i.msg)}},ic=eg;d();var _2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ks=new Map(_2),aA=new Map(_2.map(([t,e])=>[e,t])),tg=class extends De{static langMap=ks;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=jt(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=jt(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=jt(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=jt(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=jt(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:ks.get(n)||"",target_lang:ks.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:ks.get(n)||"auto",target_lang:ks.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let g,m={};e.refresh&&(m={"X-Refresh":"True"}),e.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await de({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Ja(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` +`),m=await R3(p,`TC3${n}`),f=await El(i,m),T=await El("tc3_request",f),b=await El(g,T),h=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var E2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],YD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},As=class t extends De{static langMap=new Map(E2);static langMapReverse=new Map(E2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:YD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var C2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ja=class t extends De{static langMap=new Map(C2);static langMapReverse=new Map(C2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function QD(t,e){return e?t+(e-t%e):t}function ZD(t,e){return t.split(e).length-1}function Gp(t){let e=Date.now(),n=1;for(let r of t)n+=ZD(r,"i");return QD(e,n)}function JD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Vp(){return JD(1e6,1e8)}d();d();d();var $p="https://www2.deepl.com/jsonrpc",Yp="auto",w2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function XD(t=w2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Qp(t){return XD()[t.toLowerCase()]}var eA={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function tA(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function nA(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function rA(t,e,n,r,a,i,o){let s=Vp(),u=nA(r,n),l=[];e.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Gp(e);let c=await de({retry:2,method:"POST",url:t,body:tA(u),headers:eA}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{p.text.push(g.text)}),p}async function D2(t,e,n,r=Yp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:rA(t,e,Qp(n),Qp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var A2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ro=class t extends De{static langMap=new Map(A2);static langMapReverse=new Map(A2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=$p;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=Ht($p,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await D2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var ks=class t extends De{static langMap=new Map(Lp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=Wr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=k2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await de({url:Kl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=k2()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),g=await de({url:Kl,body:p,method:"POST"});if(g.header.ret_code!=="succ")throw new $(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function k2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Zp(){return Math.random()>=.1}var ao=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Zp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await e2(),!Zp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var L2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Jp=new Map(L2),P2=new Map(L2.map(([t,e])=>[e,t])),Xp=class t extends De{static langMap=Jp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Jp.get(r)||"auto",target_lang:Jp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:P2.get(o.source_lang),to:P2.get(o.target_lang)}}else throw new $(i.msg)}},ic=Xp;d();var _2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ps=new Map(_2),aA=new Map(_2.map(([t,e])=>[e,t])),eg=class extends De{static langMap=Ps;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=Ht(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=Ht(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=Ht(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=Ht(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=Ht(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:Ps.get(n)||"",target_lang:Ps.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:Ps.get(n)||"auto",target_lang:Ps.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let g,m={};e.refresh&&(m={"X-Refresh":"True"}),e.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await de({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Ja(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` `),url:"",options:{}});C&&C.text&&(T=C.text.split(` -`))}return{text:T,from:f[0]&&aA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},F2=tg;d();var iA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],ng=new Map(iA),rg=class extends De{static langMap=ng;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:ng.get(r)||r,to:ng.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},M2=rg;d();var oA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],ag=new Map(oA),ig=class extends De{static langMap=ag;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:ag.get(a)||a};r!=="auto"&&(i.from=ag.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,m)=>{o.append(m,g)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await de(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(g=>g.translations.map(f=>f.text).join(" "))}}},B2=ig;d();var sA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],io=new Map(sA),og=class extends De{static langMap=io;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:T,from:f[0]&&aA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},F2=eg;d();var iA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],tg=new Map(iA),ng=class extends De{static langMap=tg;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:tg.get(r)||r,to:tg.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},M2=ng;d();var oA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],rg=new Map(oA),ag=class extends De{static langMap=rg;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:rg.get(a)||a};r!=="auto"&&(i.from=rg.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,m)=>{o.append(m,g)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await de(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(g=>g.translations.map(f=>f.text).join(" "))}}},B2=ag;d();var sA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],io=new Map(sA),ig=class extends De{static langMap=io;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!io.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||io.get(r)||r,target:io.get(a)||a})):u.body=JSON.stringify({text:s,source:io.get(r),target:io.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},I2=og;d();d();d();function R2(t){let e=t.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!io.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||io.get(r)||r,target:io.get(a)||a})):u.body=JSON.stringify({text:s,source:io.get(r),target:io.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},I2=ig;d();d();d();function R2(t){let e=t.split(` `),n=[],r,a="",i="";for(let o of e){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var sg=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var og=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(e,n,r){if(super(e,n,r),e||(e={}),e.APIKEY){let a=e.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(e.ignoreResRegexs)&&(this.ignoreResReges=e.ignoreResRegexs),e.translationTextSeparator&&(this.translationTextSeparator=e.translationTextSeparator),e.model&&(this.model=e.model),e.systemPrompt&&(this.systemPrompt=e.systemPrompt),e.prompt&&(this.prompt=e.prompt),e.multiplePrompt&&(this.multiplePrompt=e.multiplePrompt),e.subtitlePrompt&&(this.subtitlePrompt=e.subtitlePrompt),e.bodyConfigs&&(this.bodyConfigs=e.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a,options:i}=e;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},p=i?.sourceProgram,g=["subtitle","videoSubtitle"].includes(p),m=[n];i?.rawTextArrayLength&&(m=n.split(this.translationTextSeparator)),m.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),g&&this.subtitlePrompt&&m.length>1&&(s=this.subtitlePrompt);let f="",T="",b=s.includes("{{json}}"),h=s.includes("{{yaml}}");if(b){let B=[],S=c.imt_json_item||"";g&&(S=c.imt_subtitle_json_item||S);for(let y=0;yS==="from"?u:S==="to"?l+" Language":S==="text"?n:S=="json"?f:S=="yaml"?T:c[S]||B).replace(/{{(.+?)}}/g,(B,S)=>c[S]||B);let C=await this.handleOptions(s,e);z.debug("request options",C);let D=await de(C),M=this.parseResponse(D);if(M=this.filterContent(n,M,s,m),z.debug("filterContent after",M),!b&&!h||!M)return{from:r,to:a,text:M||n};M=uA(n,M),M=N3(M);try{let B={};if(b){z.debug("extractValidJson before",M);let _=this.extractValidJson(M);z.debug("parse before",M),B=Mu.parse(_)}else if(h){z.debug("parseYAML before",M);let _=this.extractValidYaml(M);B=R2(_)}let S=c.imt_trans_field;g&&(S=c.imt_sub_trans_field||S);let y=c.imt_source_field;return g&&(y=c.imt_sub_source_field||y),M=this.restoreText(m,B,S,this.translationTextSeparator,y),{from:r,to:a,text:M}}catch(B){return z.error("parse response failed",M,B),{from:r,to:a,text:M}}}extractValidJson(e){let n=e.indexOf("["),r=e.lastIndexOf("]");return n!==-1&&r!==-1?e.slice(n,r+1):""}extractValidYaml(e){let n=e.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=e)}catch(o){z.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},oo=sg;function uA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var lA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],O2=new Map(lA),ug=class extends oo{static langMap=O2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=jt(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=jt(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return O2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},z2=ug;d();var q2=o6(N2());var U2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Ls=class t extends De{static langMap=new Map(U2);static langMapReverse=new Map(U2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new q2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(C=>`${this.encode(C)}=${this.encode(T[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,p),m=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var cA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},lg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},cg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=lg(e);if(r)return Array.isArray(n)?`${r}=${n.map(lg).sort().join(`&${r}=`)}`:`${r}=${lg(n)}`}).filter(e=>e).join("&"),so=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,cg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await nr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return xl(await sa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=cg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} +`)}restoreText(e,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=e)}catch(o){z.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},oo=og;function uA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var lA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],O2=new Map(lA),sg=class extends oo{static langMap=O2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=Ht(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=Ht(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return O2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},z2=sg;d();var q2=o6(N2());var U2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],_s=class t extends De{static langMap=new Map(U2);static langMapReverse=new Map(U2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new q2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(C=>`${this.encode(C)}=${this.encode(T[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,p),m=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var cA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},ug=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},lg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=ug(e);if(r)return Array.isArray(n)?`${r}=${n.map(ug).sort().join(`&${r}=`)}`:`${r}=${ug(n)}`}).filter(e=>e).join("&"),so=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,lg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await nr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return xl(await sa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=lg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} `),e.push(this.signedHeaders()),e.push(await this.hexEncodedBodyHash()),e.join(` `)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new $(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await nr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(cg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return cA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await sa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await sa(r,i),s=await sa(a,o);return sa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var j2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],dg=new Map(j2),dA=new Map(j2.map(([t,e])=>[e,t])),pg=class extends De{static langMap=dg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new so(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=dg.get(r),o={TargetLanguage:dg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new so(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(m=>m.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=dA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},H2=pg;d();var W2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],gg=new Map(W2),pA=new Map(W2.map(([t,e])=>[e,t])),_s=class extends De{static langMap=gg;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=gg.get(r)||"detect",o=gg.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=pA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var gA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],mg=new Map(gA),Fs=class extends De{static langMap=mg;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:mg.get(r)||r,target_lang:mg.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var fg="https://{s}bing.com",Y2=fg+"/translator",mA=fg+"/ttranslatev3",fA=fg+"/tspellcheckv3",sc="bingGlobalConfig",Q2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],K2=new Map(Q2),G2=new Map(Q2.map(([t,e])=>[e,t])),V2=1e3,ar,uo;function hg(t,e){return t.replace("{s}",e?e+".":"")}async function hA(){if(!ar){let n=await oe.storage.local.get(sc);return n&&(ar=n[sc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=ar;return Date.now()-t>e}async function $2(){let t,e,n,r,a,i,o,s,u,l;try{let c=hg(Y2,t),p=await de({retry:2,url:c,responseType:"raw"}),{body:g,headers:m,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],e=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return ar={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[sc]:ar}),ar}function bA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=ar;return hg(t?fA:mA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+ar.count++:"")}function TA(t,e,n,r){let{token:a,key:i}=ar,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function Z2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>V2)throw new Error(`The supported maximum length of text is ${V2}. Please shorten the text.`);uo||(uo=$2()),await uo,await hA()&&(uo=$2(),await uo),e=e||"auto",n=n||"zh-CN",e=K2.get(e)||e,n=K2.get(n)||n;let a=bA(!1),i=TA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:hg(Y2,ar.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(ar=null,uo=null,await oe.storage.local.remove(sc),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await nr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(lg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return cA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await sa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await sa(r,i),s=await sa(a,o);return sa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var j2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],cg=new Map(j2),dA=new Map(j2.map(([t,e])=>[e,t])),dg=class extends De{static langMap=cg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new so(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=cg.get(r),o={TargetLanguage:cg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new so(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(m=>m.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=dA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},H2=dg;d();var W2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],pg=new Map(W2),pA=new Map(W2.map(([t,e])=>[e,t])),Fs=class extends De{static langMap=pg;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=pg.get(r)||"detect",o=pg.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=pA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var gA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],gg=new Map(gA),Ms=class extends De{static langMap=gg;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:gg.get(r)||r,target_lang:gg.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var mg="https://{s}bing.com",Y2=mg+"/translator",mA=mg+"/ttranslatev3",fA=mg+"/tspellcheckv3",sc="bingGlobalConfig",Q2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],K2=new Map(Q2),G2=new Map(Q2.map(([t,e])=>[e,t])),V2=1e3,ar,uo;function fg(t,e){return t.replace("{s}",e?e+".":"")}async function hA(){if(!ar){let n=await oe.storage.local.get(sc);return n&&(ar=n[sc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=ar;return Date.now()-t>e}async function $2(){let t,e,n,r,a,i,o,s,u,l;try{let c=fg(Y2,t),p=await de({retry:2,url:c,responseType:"raw"}),{body:g,headers:m,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],e=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return ar={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[sc]:ar}),ar}function bA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=ar;return fg(t?fA:mA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+ar.count++:"")}function TA(t,e,n,r){let{token:a,key:i}=ar,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function Z2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>V2)throw new Error(`The supported maximum length of text is ${V2}. Please shorten the text.`);uo||(uo=$2()),await uo,await hA()&&(uo=$2(),await uo),e=e||"auto",n=n||"zh-CN",e=K2.get(e)||e,n=K2.get(n)||n;let a=bA(!1),i=TA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:fg(Y2,ar.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(ar=null,uo=null,await oe.storage.local.remove(sc),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],g=c[0].detectedLanguage;return{text:p.text,from:G2.get(g.language),to:G2.get(p.to)}}d();d();d();d();d();function ha(t){return t!=null}function eT(t,e,n){return`${t.type}#${e}#${n}`}function tT(t,e,n,r,a){return{body:a,id:r,type:eT(t,e,n)}}function yA(t,e,n,r){return{id:n,response:r,type:eT(t,"ask",e)}}function nT(t,e,n,r){if(ha(r)){let a=r.type;if(ha(a)&&ha(r.body)){let[i,o,s]=a.split("#");return i===t.type&&o===e&&s===n}else return!1}else return!1}function vA(t,e,n){if(ha(n)){let r=n.type;if(ha(r)&&ha(n.response)){let[a,i,o]=r.split("#");return a===t.type&&i==="ask"&&o===e}else return!1}else return!1}function SA(t){t.forEach(([e,n])=>e.removeEventListener("message",n)),t.length=0}function xA(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vA(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function EA(t,e,n,r){let a=i=>{let o=i.data;nT(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function J2(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(nT(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yA(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CA(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(tT(e,"tell",n,i,r),a)}async function X2(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),g=await xA(t,n,r,s);clearTimeout(p),l(g)});return e.postMessage(tT(n,"ask",r,s,a),i),u}var ba=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;J2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ha(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await X2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(EA(this.thisWindow,this.protocol,e,n))}tell(e,n){CA(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(J2(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return X2(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SA(this.listeners)}};var rT;async function aT(){if(Je()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=ba.iframe(Au,"*",{targetWindow:e});rT=n,await ba.connect(n).catch(r=>{z.error("connect with parent frame error",r)})}}function iT(){return rT}var uc=new Map;async function bg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=kn(t.body)),uc.has(e))return uc.get(e);let n=de(t);uc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{uc.delete(e)},3e3)}}async function oT(t){return bg(t)}async function lc(t){if(Je()){let n=iT();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw z.error("can not comunicate with root frame, use strict limiter",r),r}else return bg(t)}else return bg(t)}d();function sT(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function cc(t){await Nd(t)}async function dc(t,e){let n=await Rd(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return uT(t,e)}return uT(t,e)}async function uT(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Od(t,n,i-1e3),n}var wA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Tg=new Map(wA),Ms=class extends De{static langMap=Tg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await cc(Cd)}async translate(e){let{text:n,from:r,to:a}=e;return n?await Z2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await dc(Cd,async()=>{let e=await lc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return sT(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=Tg.get(n)||"auto",o=Tg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var lT=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],yg=new Map(lT),DA=new Map(lT.map(([t,e])=>[e,t])),vg=class extends De{static langMap=yg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=kn(a+o+n+i);this.domain&&(l=kn(a+o+n+this.domain+i));let c=new URLSearchParams({from:yg.get(s)||"auto",to:yg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let g=await de({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new $("API_SERVER_ERROR",g.error_msg);let{trans_result:m,from:f}=g,T=m.map(({dst:h})=>h);return{from:DA.get(f)||f,to:u,text:T.join(` -`)}}},cT=vg;d();d();var Xa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,g)=>{let[m,f]=g.split(":"),T=o[m];return f==="random"?AA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function AA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var dT=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Sg=class extends Xa{static langMap=new Map(dT);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:dT,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},pT=Sg;d();var kA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],pc=new Map(kA),xg=class extends De{static langMap=pc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!pc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${pc.get(r)||"auto"}2${pc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},gT=xg;d();var mT=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Eg=new Map(mT),PA=new Map(mT.map(([t,e])=>[e,t]));function LA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var Cg=class extends De{static langMap=Eg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=_A(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+LA(n)+i+o+this.appSecret,u=await nr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:Eg.get(r)||"auto",to:Eg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new $(JSON.stringify(g));let m=g.l,[f,T]=m.split("2");return{text:g.translation.join(` -`),from:PA.get(f),to:a}}};function _A(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var Dg=class extends De{static langMap=wg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:wg.get(r)||"auto",to:wg.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},bT=Dg;d();var Bs=class extends Xa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Io,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var TT="immersive-translate-gemini-fake-user-key",FA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],yT=new Map(FA),Ag=class extends oo{static langMap=yT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return yT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Id(TT,""),this.fakeId||(this.fakeId=MA(10),await zd(TT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function MA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await lc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":Pg.get(r)+"-"}${Pg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var RA={mock:ao,mock2:ao,custom:Bs,google:Ja,transmart:As,deepl:F2,volc:H2,volcAlpha:_s,bing:Ms,tencent:ws,tenAlpha:Ds,baidu:cT,caiyun:pT,cai:gT,openl:ic,youdao:fT,you:bT,d:ro,dpro:ro,deeplx:Fs,niu:M2,azure:B2,openai:z2,gemini:vT,claude:xT,papago:I2,aliyun:Ls,yandex:Is},Ta={};Object.keys(cr).forEach(t=>{Ta[t]={...cr[t],class:RA[t]}});function gc(t,e){let n=wn;if(Ta[t]&&Ta[t].class&&Ta[t].class.langMap&&Ta[t].class.langMap.size>0){let r=Ta[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return wn}async function ya(t,e,n){if(!t.text)return t;let r=null,a=await Xe({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function ET(t,e){for(let n of t)try{return await ya({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Lg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Zt(t.user);await new Ta[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function OA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Xe(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=E1(p,{sourceLanguage:OA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let g=a.beta,m=o.cache===!1&&g,f=a.debug===!0&&g;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(m&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,C=-1,D=Zt(e.user),M;try{M=new Ta[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let _={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let k of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||_):y;n(v,null,k)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){C++;let _=l;l==="openl"&&(_=l+"-"+p.codename||ic.DEFAULT_CODENAME);let k=M.getCacheKeyPrefix();k&&(_=k+"-"+_);let v=null;try{v=await Lu(J1({originalText:y.text,from:y.from,to:y.to,service:_}),200)}catch(I){z.warn("query cache DB error, but it's ok",I)}if(v){let I={...y,text:v.translatedText};b.sentences[C]=I,n&&n(null,I,y)}else T.push(y)}else T.push(...t.sentences);let B=T.length;if(h-B>0&&z.debug(`use ${h-B} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,_,k)=>{if(n&&n(y,_,k),!y&&_&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||ic.DEFAULT_CODENAME);let I=M.getCacheKeyPrefix();I&&(v=I+"-"+v),o.cache&&Lu(X1({translatedText:_.text,from:k.from,to:k.to,detectedFrom:_.from,key:kn(k.text),service:v}),3e3).catch(F=>{z.warn("set cache DB error",F)})}});for(let y of S?.sentences||[]){let _=b.sentences.findIndex(k=>!k);if(_===-1)throw new $("translateFailed","can not match the result");b.sentences[_]=y}return b}function CT({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=xe();if(!e)return null;let i=gc(e.config.translationService,e.config.targetLanguage),o=wn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(zA,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:h2,style:{maxWidth:"unset"},class:"mx-2"}),w(NA,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function zA(t){let{t:e}=xe(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=fa(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=fa(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function NA(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=fa(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=xe();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function wT(t){let{t:e}=xe(),{translationServiceItems:n,translationServiceOptions:r}=HA(t);return n.length?w(Rt,{children:[w(DT,{class:"mt-3",label:e("popupService"),items:r}),w(UA,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function DT(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function UA({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=xe(),a=jA(t),i=qA(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},g=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...g,[u]:l}}}})},[]),s=Ne(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(Rt,{children:s.map(({label:u,items:l},c)=>w(DT,{class:"mt-2",label:u,items:l},"field-"+c))})}function qA(t){return Ne(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function jA(t){return Ne(()=>{let{translationService:n}=t.config;if(cr[n])return Cl("translationService",n,t)},[cr,Cl,t])}function HA({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=xe(),u=Ne(()=>e?ds(e,"translationService"):[],[ds,e]),l=Ve(p=>{let g=u.find(m=>m.id===p.value);if(g.ok){if(n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ne(()=>{let p=it();return u.filter(m=>e.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!t&&!p&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function AT(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function kT(t){let{t:e}=xe(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=WA(t),[o,s]=re(()=>a?"excludeMatches":"matches"),u=Ne(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function WA({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,g=null,m=null,{translationUrlPattern:f}=e.config;if(l=Ne(()=>new URL(t||""),[t]),e.config&&t&&Zl(t)){c=AT(t);let{matches:h,excludeMatches:C}=f;p=!!h.find(D=>wt(t,D)),g=!!C.find(D=>wt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:C}=h;C.includes(n)?m=!0:m=!1}let T=Ve(()=>{let h=l.hostname,C=e.localConfig.tempTranslationUrlMatches||[],D=C.filter(B=>B.match!==h),M=!1;D.length!==C.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,C)=>{if(h==="default"){s(B=>{let S={...B.translationUrlPattern};return{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,matches:_g(t,S.matches),excludeMatches:_g(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(B=>{let S={...B.translationUrlPattern};return S[M]=_g(t,S[M]),S[D]=hl(C,S[D]),{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:g,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:b}}function _g(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!wt(t,n)):e):[]}d();d();d();d();var PT="G-MKMD9LWFTR";async function lt(t,e,n){try{let r=us(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=Je(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let k=await Nr(l,0),v=mc(new Date(k)),I=Date.now(),F=mc(new Date(I));if(v===F)return;await j3(l,I)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",g=await At("fakeUserId","");g||(g=await Nr("fakeUserId",""),g&&await Ze("fakeUserId",g));let m=Sn(),f=new Date,T=await At("installedAt","");T||(T=await Nr("installedAt",""),T&&await Ze("installedAt",T)),g?T||(T=new Date(0).toISOString(),await Ze("installedAt",T)):(g=KA(32),await Ze("fakeUserId",g)),T||(T=f.toISOString(),await Ze("installedAt",T));let b=new Date(T),h=mc(b),C=mc(f),D=h===C,M=f.getTime()-b.getTime()<7*24*60*60*1e3,B=`https://www.google-analytics.com/mp/collect?measurement_id=${PT}&api_secret=${p}`;u||(B=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${PT}&api_secret=${p}`);let S=Ei.parse(window.navigator.userAgent),y=e.map(k=>{let v=k.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",m&&(v.version=m),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=GA(b)),n.user){let F=p4(n.user);F&&Object.keys(F).forEach(L=>{v[L]=F[L]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let I="html";if(n.rule.pageType&&(I=n.rule.pageType),v.page_type=I,s?v.main_frame=0:v.main_frame=1,!c){let F=n.url;try{let L=new URL(F);v.site_host=L.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...k,params:v}});if(i)return;let _=await de({responseType:"text",url:B,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:y})})}catch{}}function KA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a=window.innerHeight*r.maxBodyScreenLength)return z.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new ju(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=VA(s.content,s.textContent),e&&(n=FT(r,e))}catch(i){z.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function _T(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&z.debug("update article node",n),t.articleNode=n)}function Fg(t,e){return e&&t?.contains(e)||!1}function VA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=$A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function $A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function FT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let E=q(A);return E==NodeFilter.FILTER_ACCEPT?dt.mark(A,L,T):E==NodeFilter.FILTER_REJECT,E}),N=v;if(q(N)===NodeFilter.FILTER_REJECT)return;for(dt.mark(N,L,T);N;){if(s=Fg(i,N),c&&c.length>0){let{currentNode:A,isMatchedSelection:E}=M(U,N,c);if(A)N=A;else break;if(!E)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let A=N;if(A.nodeName==="IFRAME"){I&&I(A),B(),Mg(b,!0),N=U.nextNode();continue}A.nodeType===Node.ELEMENT_NODE&&(l&&Ig(A,l),m&&Og(A,m));let E=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},A.immersiveTranslateComputedStyle||null);if(E&&n.paragraphFirstLetterFontSize>0&&A.childNodes.length==1&&A.childNodes[0].nodeType===Node.TEXT_NODE&&A.innerText?.length==1&&A?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(E=!1),Kt(A,u)&&!E){S(A);let H=null;for(;!(H=U.nextSibling())&&U.parentNode(););N=H;continue}let P=Qa(A);if(!MT(b,A)||E){B(A);let H=E?A:A.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&A.shadowRoot?.mode==="open"&&(E?I?.(A.shadowRoot):D({...k,container:A.shadowRoot})),A.nodeType===Node.ELEMENT_NODE&&A.nodeName==="PRE"&&p&&e5(A)}else if(N.nodeType===Node.TEXT_NODE)S(N);else throw new Error("should not be here");N=U.nextNode(),b.commonAncestorContainer&&N&&N.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(N)}function q(A){if(A.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(jr(A)){if(m){let H=Object.keys(m);if(H.length>0&&Kt(A,H))for(let W of H){let V=m[W];if(A.matches(W)){let se=m[W],X=Object.keys(se);for(let Z of X){let ue=se[Z];A.getAttribute(Z)!==ue&&(ue===null?A.removeAttribute(Z):A.setAttribute(Z,ue))}break}}}if(!k.force&&dt.isMarked(A,L)||t1(A,L)||hc(A,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||A.nodeName==="IFRAME"&&!Hi(A))return NodeFilter.FILTER_REJECT;if(A.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(A);if(A.immersiveTranslateComputedStyle=H,Rg(H))return F&&F(A),NodeFilter.FILTER_REJECT;let j=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Kt(A,u)&&j)return NodeFilter.FILTER_REJECT}let E=A.getBoundingClientRect(),{width:P,height:O}=E;return A.nodeName==="IMG"&&(P>48&&O>48?A.immersiveTranslateComputedStyle={display:"block"}:P>0&&O>0&&f!==!1&&(A.setAttribute("width",P),A.setAttribute("height",O))),!A.childNodes||A.childNodes&&A.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||O>0&&O<4)&&(A.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(A.nodeType===Node.TEXT_NODE){let E=A.textContent?.trim();if(!E)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=A.parentNode;if(P.getBoundingClientRect){let{width:O,height:H}=P.getBoundingClientRect();if(O>0&&O<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return g>0&&E.length>=g&&Bg(A,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&B();function M(k,v,I){let F=v.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function B(k){if(k&&k.nodeName==="BR"){b.commonAncestorContainer=k.parentNode;let I=[...b.flatNodes],F=b.flatNodes.filter(L=>k.parentNode?.contains(L));F.length>0&&I.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=I)}let v=XA(b,a,n);v&&(v.xpath=r1(r,s,v.commonAncestorContainer,i),e&&e(v)),Mg(b)}function S(k){if(!MT(b,k)){B(),Mg(b);let v=k.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(k)}function y(k,v,I){k.commonAncestorContainer=v;let F=_(I);k.isPreWhitespace=F}function _(k){return k&&k.whiteSpace&&k.whiteSpace.startsWith("pre")||k&&k.whiteSpace==="break-spaces"||!1}}function MT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Qa(e));let r=JA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function QA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function ZA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Ig(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function JA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Qa(e)):!1}function XA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=t5(r,a,n);o||(o=a);let s=[];for(let m of r){let f=ZA(t,o,m);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,g=0;for(;p&&(c.push(p),p!==l);){if(g++,g>YA){z.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Mg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Rg(t){return t.display==="none"}var dt={_marked_key:Rh,isMarked(t,e){return Ep(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return Ml(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)dt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return ut(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=Ki(t,"markWalk")||"";return ut(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Qa(t)):!1}};function e5(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function t5(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(xn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Bg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Bg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=p1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function IT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let g of c){let m=l[g];if(g==="translate"&&m==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||n5(p,a,i,o)||!m1(T,n,r))continue}p.getAttribute(g)!==m&&(m===null?p.removeAttribute(g):p.setAttribute(g,m))}}}function Og(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function hc(t,e){return Kt(t,e.excludeSelectors||[])?Kt(t,e.selectors||[])?!1:!Kt(t,e.stayOriginalSelectors||[]):!1}function fc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Kt(t,e.concat(n))}function n5(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&hc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ll(o,e,n))return!0}}return!1}d();function RT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Cu)||zg(t).catch(i=>{z.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var bc="";async function zg(t){let e=document.title;if(!e||e.includes(Cu))return;bc!==e&&(bc=e);let n=await Ie({text:e,pageLangs:[yt(),"en"]});if(!Ui(t,n))try{let r=await ya({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Cu+bc)}catch(r){throw r}}function OT(t){t.rule.isTranslateTitle&&(document.title=bc)}function lo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function an(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var r5={sanitize:t=>t};function jg(t,e){if(t.interruptEffectDOM)return;let n=an(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:ti.bind(null,t),onFrame:r=>{Ug(t,r,!0)},onIgnoreElement:r=>{dt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),bi&&ut(e,"consumeContainer",t.id)}function Ug(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!Hi(e))return;z.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(ei(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else z.debug("onFrame shadowRoot",e.host),ei(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function ei(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=an(e.ctx),i=0;if(u(e,t,n))return;if(jr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(jr(c)&&(r&&Ig(c,r),a&&Og(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){dt.clearMark(l),i++,e.immediateTranslateCapacity>=0?jg(e,l):(bi&&ut(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ug(e,l.shadowRoot,n),!1;if(c==="iframe")return Ug(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return fc(l,p.selectors);if(p.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,p){if(_T(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=an(l.ctx);return!!hc(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Rs(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(Tc(t.rootNodes),NT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Ng(t.rootNodes);if(Tc(t.rootNodes),zT(o))return;co(o,r,t.targetNodes||[]),NT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];co(o,r,t.rootNodes||[]),UT(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Ng(t.rootNodes);if(zT(o))return;co(o,r,t.targetNodes||[]),UT(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Ng(t.targetNodes);Tc(t.targetNodes),co(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&Tc(t.targetNodes),Kg(t)}catch(o){z.error(o)}}}function zT(t){return!t||!jr(t)?!1:t.classList.contains(bt)}function NT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function UT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Ki(r,"immersiveTranslateClassBak");Ml(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Ng(t){return t?t[t.length-1].nextSibling:null}function Tc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function co(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var a5=Uo(yc,300);async function ti(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||i5(e.rootNodes)||e.stepState>=2)return;e.stepState=2,bi&&ut(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Za(i),u=ac(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:d5(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Wg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Tr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(z.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),o5(t,e.text),Hg(t,e,r)):(bi&&ut(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function i5(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?jr(e)&&e.classList.contains(bt):!1}function o5(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Hg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),bi&&ut(e.commonAncestorContainer,"consumeParagraph",t.id),ut(e.commonAncestorContainer,Oh,"1",!0),n=="hover"){yc.call(t,t.ctx);return}a5.call(t,t.ctx)}async function yc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Xe(r,e,(a,i,o)=>{let s=o.id,u=s5(t,s.toString());u&&u5.call(null,a,i,o,u,e,n)})}catch(a){z.error("translateCurrentQueue error",a);return}}function s5(t,e){return t.find(n=>n.id===e)}function u5(t,e,n,r,a,i){let o=!1,s=r;if(qi(s.commonAncestorContainer,n.id)?.remove(),Kg(r),s&&(t||!e)){t||(z.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,qh,l.toString()),c.classList.add("notranslate",bt,bt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(co(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let g=l5(a,t).replaceAll(` + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],g=c[0].detectedLanguage;return{text:p.text,from:G2.get(g.language),to:G2.get(p.to)}}d();d();d();d();d();function ha(t){return t!=null}function eT(t,e,n){return`${t.type}#${e}#${n}`}function tT(t,e,n,r,a){return{body:a,id:r,type:eT(t,e,n)}}function yA(t,e,n,r){return{id:n,response:r,type:eT(t,"ask",e)}}function nT(t,e,n,r){if(ha(r)){let a=r.type;if(ha(a)&&ha(r.body)){let[i,o,s]=a.split("#");return i===t.type&&o===e&&s===n}else return!1}else return!1}function vA(t,e,n){if(ha(n)){let r=n.type;if(ha(r)&&ha(n.response)){let[a,i,o]=r.split("#");return a===t.type&&i==="ask"&&o===e}else return!1}else return!1}function SA(t){t.forEach(([e,n])=>e.removeEventListener("message",n)),t.length=0}function xA(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vA(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function EA(t,e,n,r){let a=i=>{let o=i.data;nT(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function J2(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(nT(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yA(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CA(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(tT(e,"tell",n,i,r),a)}async function X2(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),g=await xA(t,n,r,s);clearTimeout(p),l(g)});return e.postMessage(tT(n,"ask",r,s,a),i),u}var ba=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;J2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ha(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await X2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(EA(this.thisWindow,this.protocol,e,n))}tell(e,n){CA(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(J2(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return X2(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SA(this.listeners)}};var rT;async function aT(){if(Xe()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=ba.iframe(Au,"*",{targetWindow:e});rT=n,await ba.connect(n).catch(r=>{z.error("connect with parent frame error",r)})}}function iT(){return rT}var uc=new Map;async function hg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=kn(t.body)),uc.has(e))return uc.get(e);let n=de(t);uc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{uc.delete(e)},3e3)}}async function oT(t){return hg(t)}async function lc(t){if(Xe()){let n=iT();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw z.error("can not comunicate with root frame, use strict limiter",r),r}else return hg(t)}else return hg(t)}d();function sT(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function cc(t){await zd(t)}async function dc(t,e){let n=await Id(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return uT(t,e)}return uT(t,e)}async function uT(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Rd(t,n,i-1e3),n}var wA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],bg=new Map(wA),Bs=class extends De{static langMap=bg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await cc(Ed)}async translate(e){let{text:n,from:r,to:a}=e;return n?await Z2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await dc(Ed,async()=>{let e=await lc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return sT(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=bg.get(n)||"auto",o=bg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var lT=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Tg=new Map(lT),DA=new Map(lT.map(([t,e])=>[e,t])),yg=class extends De{static langMap=Tg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=kn(a+o+n+i);this.domain&&(l=kn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Tg.get(s)||"auto",to:Tg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let g=await de({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new $("API_SERVER_ERROR",g.error_msg);let{trans_result:m,from:f}=g,T=m.map(({dst:h})=>h);return{from:DA.get(f)||f,to:u,text:T.join(` +`)}}},cT=yg;d();d();var Xa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,g)=>{let[m,f]=g.split(":"),T=o[m];return f==="random"?AA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function AA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var dT=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],vg=class extends Xa{static langMap=new Map(dT);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:dT,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},pT=vg;d();var kA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],pc=new Map(kA),Sg=class extends De{static langMap=pc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!pc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${pc.get(r)||"auto"}2${pc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},gT=Sg;d();var mT=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],xg=new Map(mT),PA=new Map(mT.map(([t,e])=>[e,t]));function LA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var Eg=class extends De{static langMap=xg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=_A(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+LA(n)+i+o+this.appSecret,u=await nr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:xg.get(r)||"auto",to:xg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new $(JSON.stringify(g));let m=g.l,[f,T]=m.split("2");return{text:g.translation.join(` +`),from:PA.get(f),to:a}}};function _A(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var wg=class extends De{static langMap=Cg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:Cg.get(r)||"auto",to:Cg.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},bT=wg;d();var Is=class extends Xa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Ro,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var TT="immersive-translate-gemini-fake-user-key",FA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],yT=new Map(FA),Dg=class extends oo{static langMap=yT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return yT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Bd(TT,""),this.fakeId||(this.fakeId=MA(10),await Od(TT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function MA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await lc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":kg.get(r)+"-"}${kg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var RA={mock:ao,mock2:ao,custom:Is,google:Ja,transmart:ks,deepl:F2,volc:H2,volcAlpha:Fs,bing:Bs,tencent:Ds,tenAlpha:As,baidu:cT,caiyun:pT,cai:gT,openl:ic,youdao:fT,you:bT,d:ro,dpro:ro,deeplx:Ms,niu:M2,azure:B2,openai:z2,gemini:vT,claude:xT,papago:I2,aliyun:_s,yandex:Rs},Ta={};Object.keys(cr).forEach(t=>{Ta[t]={...cr[t],class:RA[t]}});function gc(t,e){let n=wn;if(Ta[t]&&Ta[t].class&&Ta[t].class.langMap&&Ta[t].class.langMap.size>0){let r=Ta[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return wn}async function ya(t,e,n){if(!t.text)return t;let r=null,a=await Qe({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function ET(t,e){for(let n of t)try{return await ya({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Pg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Zt(t.user);await new Ta[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function OA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Qe(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=E1(p,{sourceLanguage:OA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let g=a.beta,m=o.cache===!1&&g,f=a.debug===!0&&g;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(m&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,C=-1,D=Zt(e.user),M;try{M=new Ta[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let _={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let k of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||_):y;n(v,null,k)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){C++;let _=l;l==="openl"&&(_=l+"-"+p.codename||ic.DEFAULT_CODENAME);let k=M.getCacheKeyPrefix();k&&(_=k+"-"+_);let v=null;try{v=await Lu(J1({originalText:y.text,from:y.from,to:y.to,service:_}),200)}catch(I){z.warn("query cache DB error, but it's ok",I)}if(v){let I={...y,text:v.translatedText};b.sentences[C]=I,n&&n(null,I,y)}else T.push(y)}else T.push(...t.sentences);let B=T.length;if(h-B>0&&z.debug(`use ${h-B} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,_,k)=>{if(n&&n(y,_,k),!y&&_&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||ic.DEFAULT_CODENAME);let I=M.getCacheKeyPrefix();I&&(v=I+"-"+v),o.cache&&Lu(X1({translatedText:_.text,from:k.from,to:k.to,detectedFrom:_.from,key:kn(k.text),service:v}),3e3).catch(F=>{z.warn("set cache DB error",F)})}});for(let y of S?.sentences||[]){let _=b.sentences.findIndex(k=>!k);if(_===-1)throw new $("translateFailed","can not match the result");b.sentences[_]=y}return b}function CT({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=xe();if(!e)return null;let i=gc(e.config.translationService,e.config.targetLanguage),o=wn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(zA,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:h2,style:{maxWidth:"unset"},class:"mx-2"}),w(NA,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function zA(t){let{t:e}=xe(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=fa(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=fa(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function NA(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=fa(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=xe();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function wT(t){let{t:e}=xe(),{translationServiceItems:n,translationServiceOptions:r}=HA(t);return n.length?w(Ot,{children:[w(DT,{class:"mt-3",label:e("popupService"),items:r}),w(UA,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function DT(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function UA({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=xe(),a=jA(t),i=qA(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},g=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...g,[u]:l}}}})},[]),s=Ne(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(Ot,{children:s.map(({label:u,items:l},c)=>w(DT,{class:"mt-2",label:u,items:l},"field-"+c))})}function qA(t){return Ne(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function jA(t){return Ne(()=>{let{translationService:n}=t.config;if(cr[n])return Cl("translationService",n,t)},[cr,Cl,t])}function HA({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=xe(),u=Ne(()=>e?ps(e,"translationService"):[],[ps,e]),l=Ve(p=>{let g=u.find(m=>m.id===p.value);if(g.ok){if(n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ne(()=>{let p=ot();return u.filter(m=>e.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!t&&!p&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function AT(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function kT(t){let{t:e}=xe(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=WA(t),[o,s]=re(()=>a?"excludeMatches":"matches"),u=Ne(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function WA({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,g=null,m=null,{translationUrlPattern:f}=e.config;if(l=Ne(()=>new URL(t||""),[t]),e.config&&t&&Zl(t)){c=AT(t);let{matches:h,excludeMatches:C}=f;p=!!h.find(D=>wt(t,D)),g=!!C.find(D=>wt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:C}=h;C.includes(n)?m=!0:m=!1}let T=Ve(()=>{let h=l.hostname,C=e.localConfig.tempTranslationUrlMatches||[],D=C.filter(B=>B.match!==h),M=!1;D.length!==C.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,C)=>{if(h==="default"){s(B=>{let S={...B.translationUrlPattern};return{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,matches:Lg(t,S.matches),excludeMatches:Lg(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(B=>{let S={...B.translationUrlPattern};return S[M]=Lg(t,S[M]),S[D]=hl(C,S[D]),{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:g,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:b}}function Lg(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!wt(t,n)):e):[]}d();d();d();d();var PT="G-MKMD9LWFTR";async function lt(t,e,n){try{let r=ls(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=Xe(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let k=await Nr(l,0),v=mc(new Date(k)),I=Date.now(),F=mc(new Date(I));if(v===F)return;await j3(l,I)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",g=await At("fakeUserId","");g||(g=await Nr("fakeUserId",""),g&&await Je("fakeUserId",g));let m=Sn(),f=new Date,T=await At("installedAt","");T||(T=await Nr("installedAt",""),T&&await Je("installedAt",T)),g?T||(T=new Date(0).toISOString(),await Je("installedAt",T)):(g=KA(32),await Je("fakeUserId",g)),T||(T=f.toISOString(),await Je("installedAt",T));let b=new Date(T),h=mc(b),C=mc(f),D=h===C,M=f.getTime()-b.getTime()<7*24*60*60*1e3,B=`https://www.google-analytics.com/mp/collect?measurement_id=${PT}&api_secret=${p}`;u||(B=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${PT}&api_secret=${p}`);let S=Ei.parse(window.navigator.userAgent),y=e.map(k=>{let v=k.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",m&&(v.version=m),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=GA(b)),n.user){let F=p4(n.user);F&&Object.keys(F).forEach(L=>{v[L]=F[L]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let I="html";if(n.rule.pageType&&(I=n.rule.pageType),v.page_type=I,s?v.main_frame=0:v.main_frame=1,!c){let F=n.url;try{let L=new URL(F);v.site_host=L.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...k,params:v}});if(i)return;let _=await de({responseType:"text",url:B,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:y})})}catch{}}function KA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a=window.innerHeight*r.maxBodyScreenLength)return z.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new ju(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=VA(s.content,s.textContent),e&&(n=FT(r,e))}catch(i){z.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function _T(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&z.debug("update article node",n),t.articleNode=n)}function _g(t,e){return e&&t?.contains(e)||!1}function VA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=$A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function $A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function FT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let E=q(A);return E==NodeFilter.FILTER_ACCEPT?dt.mark(A,L,T):E==NodeFilter.FILTER_REJECT,E}),N=v;if(q(N)===NodeFilter.FILTER_REJECT)return;for(dt.mark(N,L,T);N;){if(s=_g(i,N),c&&c.length>0){let{currentNode:A,isMatchedSelection:E}=M(U,N,c);if(A)N=A;else break;if(!E)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let A=N;if(A.nodeName==="IFRAME"){I&&I(A),B(),Fg(b,!0),N=U.nextNode();continue}A.nodeType===Node.ELEMENT_NODE&&(l&&Bg(A,l),m&&Rg(A,m));let E=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},A.immersiveTranslateComputedStyle||null);if(E&&n.paragraphFirstLetterFontSize>0&&A.childNodes.length==1&&A.childNodes[0].nodeType===Node.TEXT_NODE&&A.innerText?.length==1&&A?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(E=!1),Gt(A,u)&&!E){S(A);let H=null;for(;!(H=U.nextSibling())&&U.parentNode(););N=H;continue}let P=Qa(A);if(!MT(b,A)||E){B(A);let H=E?A:A.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&A.shadowRoot?.mode==="open"&&(E?I?.(A.shadowRoot):D({...k,container:A.shadowRoot})),A.nodeType===Node.ELEMENT_NODE&&A.nodeName==="PRE"&&p&&e5(A)}else if(N.nodeType===Node.TEXT_NODE)S(N);else throw new Error("should not be here");N=U.nextNode(),b.commonAncestorContainer&&N&&N.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(N)}function q(A){if(A.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(jr(A)){if(m){let H=Object.keys(m);if(H.length>0&&Gt(A,H))for(let W of H){let V=m[W];if(A.matches(W)){let se=m[W],X=Object.keys(se);for(let Z of X){let ue=se[Z];A.getAttribute(Z)!==ue&&(ue===null?A.removeAttribute(Z):A.setAttribute(Z,ue))}break}}}if(!k.force&&dt.isMarked(A,L)||t1(A,L)||hc(A,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||A.nodeName==="IFRAME"&&!Hi(A))return NodeFilter.FILTER_REJECT;if(A.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(A);if(A.immersiveTranslateComputedStyle=H,Ig(H))return F&&F(A),NodeFilter.FILTER_REJECT;let j=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Gt(A,u)&&j)return NodeFilter.FILTER_REJECT}let E=A.getBoundingClientRect(),{width:P,height:O}=E;return A.nodeName==="IMG"&&(P>48&&O>48?A.immersiveTranslateComputedStyle={display:"block"}:P>0&&O>0&&f!==!1&&(A.setAttribute("width",P),A.setAttribute("height",O))),!A.childNodes||A.childNodes&&A.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||O>0&&O<4)&&(A.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(A.nodeType===Node.TEXT_NODE){let E=A.textContent?.trim();if(!E)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=A.parentNode;if(P.getBoundingClientRect){let{width:O,height:H}=P.getBoundingClientRect();if(O>0&&O<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return g>0&&E.length>=g&&Mg(A,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&B();function M(k,v,I){let F=v.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function B(k){if(k&&k.nodeName==="BR"){b.commonAncestorContainer=k.parentNode;let I=[...b.flatNodes],F=b.flatNodes.filter(L=>k.parentNode?.contains(L));F.length>0&&I.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=I)}let v=XA(b,a,n);v&&(v.xpath=r1(r,s,v.commonAncestorContainer,i),e&&e(v)),Fg(b)}function S(k){if(!MT(b,k)){B(),Fg(b);let v=k.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(k)}function y(k,v,I){k.commonAncestorContainer=v;let F=_(I);k.isPreWhitespace=F}function _(k){return k&&k.whiteSpace&&k.whiteSpace.startsWith("pre")||k&&k.whiteSpace==="break-spaces"||!1}}function MT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Qa(e));let r=JA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function QA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function ZA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Bg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function JA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Qa(e)):!1}function XA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=t5(r,a,n);o||(o=a);let s=[];for(let m of r){let f=ZA(t,o,m);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,g=0;for(;p&&(c.push(p),p!==l);){if(g++,g>YA){z.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Fg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Ig(t){return t.display==="none"}var dt={_marked_key:Rh,isMarked(t,e){return xp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return Ml(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)dt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return ut(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=Ki(t,"markWalk")||"";return ut(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Qa(t)):!1}};function e5(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function t5(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(xn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Mg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Mg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=p1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function IT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let g of c){let m=l[g];if(g==="translate"&&m==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||n5(p,a,i,o)||!m1(T,n,r))continue}p.getAttribute(g)!==m&&(m===null?p.removeAttribute(g):p.setAttribute(g,m))}}}function Rg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function hc(t,e){return Gt(t,e.excludeSelectors||[])?Gt(t,e.selectors||[])?!1:!Gt(t,e.stayOriginalSelectors||[]):!1}function fc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Gt(t,e.concat(n))}function n5(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&hc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ll(o,e,n))return!0}}return!1}d();function RT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Cu)||Og(t).catch(i=>{z.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var bc="";async function Og(t){let e=document.title;if(!e||e.includes(Cu))return;bc!==e&&(bc=e);let n=await Ie({text:e,pageLangs:[yt(),"en"]});if(!Ui(t,n))try{let r=await ya({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Cu+bc)}catch(r){throw r}}function OT(t){t.rule.isTranslateTitle&&(document.title=bc)}function lo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function an(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var r5={sanitize:t=>t};function qg(t,e){if(t.interruptEffectDOM)return;let n=an(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:ti.bind(null,t),onFrame:r=>{Ng(t,r,!0)},onIgnoreElement:r=>{dt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),bi&&ut(e,"consumeContainer",t.id)}function Ng(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!Hi(e))return;z.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(ei(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else z.debug("onFrame shadowRoot",e.host),ei(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function ei(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=an(e.ctx),i=0;if(u(e,t,n))return;if(jr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(jr(c)&&(r&&Bg(c,r),a&&Rg(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){dt.clearMark(l),i++,e.immediateTranslateCapacity>=0?qg(e,l):(bi&&ut(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ng(e,l.shadowRoot,n),!1;if(c==="iframe")return Ng(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return fc(l,p.selectors);if(p.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,p){if(_T(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=an(l.ctx);return!!hc(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Os(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(Tc(t.rootNodes),NT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=zg(t.rootNodes);if(Tc(t.rootNodes),zT(o))return;co(o,r,t.targetNodes||[]),NT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];co(o,r,t.rootNodes||[]),UT(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=zg(t.rootNodes);if(zT(o))return;co(o,r,t.targetNodes||[]),UT(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=zg(t.targetNodes);Tc(t.targetNodes),co(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&Tc(t.targetNodes),Wg(t)}catch(o){z.error(o)}}}function zT(t){return!t||!jr(t)?!1:t.classList.contains(bt)}function NT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function UT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Ki(r,"immersiveTranslateClassBak");Ml(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function zg(t){return t?t[t.length-1].nextSibling:null}function Tc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function co(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var a5=qo(yc,300);async function ti(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||i5(e.rootNodes)||e.stepState>=2)return;e.stepState=2,bi&&ut(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Za(i),u=ac(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:d5(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Hg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Tr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(z.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),o5(t,e.text),jg(t,e,r)):(bi&&ut(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function i5(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?jr(e)&&e.classList.contains(bt):!1}function o5(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function jg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),bi&&ut(e.commonAncestorContainer,"consumeParagraph",t.id),ut(e.commonAncestorContainer,Oh,"1",!0),n=="hover"){yc.call(t,t.ctx);return}a5.call(t,t.ctx)}async function yc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Qe(r,e,(a,i,o)=>{let s=o.id,u=s5(t,s.toString());u&&u5.call(null,a,i,o,u,e,n)})}catch(a){z.error("translateCurrentQueue error",a);return}}function s5(t,e){return t.find(n=>n.id===e)}function u5(t,e,n,r,a,i){let o=!1,s=r;if(qi(s.commonAncestorContainer,n.id)?.remove(),Wg(r),s&&(t||!e)){t||(z.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,qh,l.toString()),c.classList.add("notranslate",bt,bt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(co(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let g=l5(a,t).replaceAll(` `,"").replaceAll('"',"""),m=t.message.replaceAll(` -`,"").replaceAll('"',"""),f=hr(Ot,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=hr(Ot,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,b=hr(Ot,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=hr(Ot,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${Q}-error notranslate"> +`,"").replaceAll('"',"""),f=hr(zt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=hr(zt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,b=hr(zt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=hr(zt,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${Q}-error notranslate"> <${u.targetWrapperTag} class="${Q}-error-wrapper"> @@ -5389,7 +5389,7 @@ Translate the content to {{to}} Language: ${h} - `;c.innerHTML=rt.sanitize(C)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",bt),lo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(ur,"1");let p=r5.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Rs(r,i)}o=!0}else z.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Wg(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[yt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!vs({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Il();n.isDetectParagraphLanguage&&(u="auto");let l=yt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Du.includes(t.translationService)&&(ye()||it())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return ua(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>ua(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function Os(){qg=0}var qg=0;function l5(t,e){qg+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),qg!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ra,{detail:r}))}return n}function Kg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,c5(e,`[${zh}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function c5(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function d5(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();d();d();function qT(t,e,n,r,a){let i=e,o=$h[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let g=n[p];if(["borderRadius"].includes(p)&&(g+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${g}; + `;c.innerHTML=at.sanitize(C)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",bt),lo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(ur,"1");let p=r5.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Os(r,i)}o=!0}else z.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Hg(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[yt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!Ss({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Il();n.isDetectParagraphLanguage&&(u="auto");let l=yt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Du.includes(t.translationService)&&(ye()||ot())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return ua(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>ua(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function zs(){Ug=0}var Ug=0;function l5(t,e){Ug+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),Ug!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ra,{detail:r}))}return n}function Wg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,c5(e,`[${zh}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function c5(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function d5(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();d();d();function qT(t,e,n,r,a){let i=e,o=$h[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let g=n[p];if(["borderRadius"].includes(p)&&(g+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${g}; `,e==="marker"&&p==="backgroundColor"&&typeof g=="string"){let{r:m,g:f,b:T}=h1(g);s+=`--immersive-translate-theme-${i}-${p}-rgb: ${m}, ${f}, ${T}; `}}}),r||(r="inherit"),t&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5403,7 +5403,7 @@ ${s}} `):e.rule.injectedCss&&(s+=e.rule.injectedCss),e.rule.additionalInjectedCss&&Array.isArray(e.rule.additionalInjectedCss)&&e.rule.additionalInjectedCss.length>0?s+=` `+e.rule.additionalInjectedCss.join(` `):e.rule.additionalInjectedCss&&(s+=` -`+e.rule.additionalInjectedCss)),s&&An(t,s,"immersive-translate-dynamic-injected-css")}d();async function jT(){let t="auto",e=[ft(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Wi(document.body),pageLangs:e})),t}d();var p5=[];function HT(t){p5.push(t)}d();var Gg;function WT(t){let e=t.ctx.rule.aiRule;if(z.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=an(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{zs(t,i,e,r)}),Gg=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&xn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||$g(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&zs(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=ji(r,u.parentElement);c&&(dt.clearToParentMark(u,c),zs(t,c,e,r));continue}zs(t,u,e,r)}catch(u){z.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{dt.isMarked(o,t.id)||zs(t,o,e,r)})}),Gg.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function zs(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&Vg(e),Kr({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{ti(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function KT(){Gg?.disconnect()}d();d();d();d();var g5=` +`+e.rule.additionalInjectedCss)),s&&An(t,s,"immersive-translate-dynamic-injected-css")}d();async function jT(){let t="auto",e=[ft(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Wi(document.body),pageLangs:e})),t}d();var p5=[];function HT(t){p5.push(t)}d();var Kg;function WT(t){let e=t.ctx.rule.aiRule;if(z.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=an(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{Ns(t,i,e,r)}),Kg=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&xn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||Vg(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Ns(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=ji(r,u.parentElement);c&&(dt.clearToParentMark(u,c),Ns(t,c,e,r));continue}Ns(t,u,e,r)}catch(u){z.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{dt.isMarked(o,t.id)||Ns(t,o,e,r)})}),Kg.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Ns(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&Gg(e),Kr({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{ti(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function KT(){Kg?.disconnect()}d();d();d();d();var g5=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5486,21 +5486,21 @@ ${s}} max-width: fit-content; } } -`,Yg="immersive-translate-toastify-shadow-root",Qg=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Yg)){let e=document.getElementById(Yg);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=Yg,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=g5,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function Sc(t){t=t||{},new Qg({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function GT(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();function Pn(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{z.error("send content message request failed",t,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:yu,payload:t},"*")});let n=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(n)}function Zg(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&yn(o,s=>{s.preventDefault();let u=r[i];Pn({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var VT=`${Q}-float-ball`;function Sa(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${VT}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${VT}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();d();async function $T(t){try{let e=new Date;z.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Wh]:e.toISOString()}),await m5(),ye()||await i2()}catch(e){z.error("run cron task failed",e)}}async function m5(){try{let t=await qn(),e=await de({url:Bo}),n=t.buildinConfigUpdatedAt,r=new Date(n),a=e.buildinConfigUpdatedAt,i=new Date(a),o=e.minVersion,s=oe.runtime.getManifest().version;to(s,o)?i>r?(await oe.storage.local.set({buildinConfig:e}),z.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),ma({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{z.error("send content message request failed from cron task",u)})):z.debug(`no need to sync rules, latest: ${r}`):z.info(`local version is too old, please update to ${o} or later`)}catch(t){z.error("sync rules error: ",t)}}d();d();d();d();d();d();var Jg;function um(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function ry(t,e=","){return t.map(um).join(e)}var ay=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ec(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Cc(t,e="@media "){return e+Ln(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Ln(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function f5(){}var Gt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function iy(t){return t.match(/[-=:;]/g)?.length||0}function am(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(iy(t),15)<<18}var h5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function lm({n:t,i:e,v:n=[]},r,a,i){t&&(t=um({n:t,i:e,v:n})),i=[...Ln(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Ln(u&&Cc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|am(l):s=="dark"?1073741824:l[0]=="@"?am(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~h5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var cm=new Map;function YT(t){if(t.d){let e=[],n=Xg(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Xg(r,i=>Xg(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):em(i,o)}return em(o,i)})):r,"&"),r=>em(r,t.n?"."+ay(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Xg(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function em(t,e){return t.replace(/&/g,e)}var QT=new Intl.Collator("en",{numeric:!0});function b5(t,e){for(var n=0,r=t.length;n>1;0>=oy(t[a],e)?n=a+1:r=a}return r}function oy(t,e){let n=t.p&Gt.o;return n==(e.p&Gt.o)&&(n==Gt.b||n==Gt.o)?0:t.p-e.p||t.o-e.o||QT.compare(ZT(t.n),ZT(e.n))||QT.compare(JT(t.n),JT(e.n))}function ZT(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function JT(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function tm(t,e){return Math.round(parseInt(t,16)*e)}function xa(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[tm(t.substr(1,i),o),tm(t.substr(1+i,i),o),tm(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function sy(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let g=[],m="",f=0,T=0;for(let C in o||{}){var b,h;let D=o[C];if(C[0]=="@"){if(!D)continue;if(C[1]=="a"){g.push(...ly(s,u,pm(""+D),p,u,l,c,!0));continue}if(C[1]=="l"){for(let M of Ln(D))g.push(...i(M,{n:s,p:(b=Gt[C[7]],u&~Gt.o|b),r:C[7]=="d"?[]:l,i:c},p));continue}if(C[1]=="i"){g.push(...Ln(D).map(M=>({p:-1,o:0,r:[],d:C+" "+M})));continue}if(C[1]=="k"){g.push({p:Gt.d,o:0,r:[C],d:i(D,{p:Gt.d},p).map(YT).join("")});continue}if(C[1]=="f"){g.push(...Ln(D).map(M=>({p:Gt.d,o:0,r:[C],d:i(M,{p:Gt.d},p).map(YT).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))C=="label"&&D?s=D+Ec(JSON.stringify([u,c,o])):(D||D===0)&&(C=C.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=C)[0]=="-"?0:iy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+Ln(D).map(M=>p.s(C,uy(""+M,p.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let M=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(B,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Cc(y,"")):B}),M|=am(C)),g.push(...i(D,{n:s,p:M,r:[...l,C],i:c},p))}else g.push(...i(D,{p:u,r:[...l,C]},p))}return g.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:m}),g.sort(oy)}(t,lm(e,n,r,a),n)}function uy(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?xa(s):""+Ln(s).filter(u=>Object(u)!==u)})}function dm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function im(t,e,n=Gt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,g){u={...u,i:u.i||g};let m=function(f,T){let b=cm.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:p,p:c}=lm(u,l,c,p),dm(im(pm(m),l,c,p,u.i),u.n)):Array.isArray(m)?m.map(f=>{var T,b;return{o:0,...f,r:[...Ln(p),...Ln(f.r)],p:(T=c,b=f.p??c,T&~Gt.o|b)}}):sy(m,u,l,c,p):[{c:um(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(b5(i,s),0,s);return i}function ly(t,e,n,r,a,i,o,s){return dm((s?n.flatMap(u=>im([u],r,a,i,o)):im(n,r,a,i,o)).map(u=>u.p&Gt.o&&(u.n||e==Gt.b)?{...u,p:u.p&~Gt.o|e,o:0}:u),t)}function T5(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=lm(i,o,e);return n&&ly(s,e,n,o,u,l,c,r)},cm.set(t,a),t}function nm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(y5),i:a}))}}function y5(t,e,n){return n.indexOf(t)==e}var XT=new Map;function pm(t){let e=XT.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&nm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Ec(JSON.stringify([p,g])):p+"("+ry(g)+")",Gt.a,g,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),XT.set(t,e=r[0])}return e}function cy(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function dy(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?cy(t,e,n=>rm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+rm(r),t?rm(t):"")}function rm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=dy(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var AX=py("@"),kX=py("~");function py(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return ry(pm(n+t+"("+dy(r,a)+")"))}}function om(t,e){return Array.isArray(t)?ey(cy(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?ey(t):[t]}var v5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function ey(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=v5.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function gy(t,...e){var n;let r=om(t,e),a=(r.find(i=>i.label)?.label||"css")+Ec(JSON.stringify(r));return n=(i,o)=>dm(r.flatMap(s=>sy(s,i,o,Gt.o)),a),cm.set(a,n),a}var PX=new Proxy(function(t,e){return ty("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ty(e,n,r)}}});function ty(t,e,n){return{toString(){return gy({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function ee(t,e,n){return[t,S5(e,n)]}function S5(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):sm(n,1)}):n=>t||{[n[1]]:sm(n,2)}}function sm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function ne(t,e,n,r){return[t,x5(e,n,r)]}function x5(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=my(t||a[1]),s=i.theme(o,a.$$)??go(a.$$,o,i);if(s!=null)return a._=sm(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,E5(e,n)]}function E5(t={},e){return(n,r)=>{let{section:a=my(n[0]).replace("-","")+"Color"}=t,[i,o]=C5(n.$$);if(!i)return;let s=r.theme(a,i)||go(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,g=r.theme(l,o||"DEFAULT")||o&&go(o,l,r),m=e||(({_:T})=>{let b=Ns(c,T);return p?{[p]:b}:b});n._={value:xa(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:T=>xa(s,T),opacityVariable:u||void 0,opacityValue:g||void 0};let f=m(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:xa(T,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>xa(T,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:m(n,r)})}return f}}function C5(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ns(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function go(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=xc(uy(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function my(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function xc(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>xc(n)+r+xc(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var LX=Symbol();var fy=new Proxy(f5,{apply(t,e,n){return Jg(n[0])},get(t,e){let n=Jg[e];return typeof n=="function"?function(){return n.apply(Jg,arguments)}:n}});var _X=function t(e){return new Proxy(function(n,...r){return ny(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return ny(e,r,a,i)}}})}();function ny(t,e,n,r){return{toString(){let a=om(n,r),i=ay(e+Ec(JSON.stringify([e,a])));return(typeof t=="function"?t:fy)(gy({[`@keyframes ${i}`]:om(n,r)})),i}}}d();d();d();d();d();var hy={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",..._n(4,"rem",4,.5,.5),..._n(12,"rem",4,5),14:"3.5rem",..._n(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:We("blur"),backdropBrightness:We("brightness"),backdropContrast:We("contrast"),backdropGrayscale:We("grayscale"),backdropHueRotate:We("hueRotate"),backdropInvert:We("invert"),backdropOpacity:We("opacity"),backdropSaturate:We("saturate"),backdropSepia:We("sepia"),backgroundColor:We("colors"),backgroundImage:{none:"none"},backgroundOpacity:We("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{..._n(200,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:We("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:We("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:We("colors"),caretColor:We("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{..._n(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:We("borderColor"),divideOpacity:We("borderOpacity"),divideWidth:We("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Us(2,6),...Us(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:We("spacing"),gradientColorStops:We("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Us(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Us(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{..._n(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{..._n(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:We("spacing"),placeholderColor:We("colors"),placeholderOpacity:We("opacity"),outlineColor:We("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:We("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:_n(200,"",100,0,50),scale:{..._n(150,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:We("spacing"),scrollPadding:We("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:We("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:_n(2),textColor:We("colors"),textDecorationColor:We("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:We("spacing"),textOpacity:We("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:We("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Us(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{..._n(50,"",1,0,10),auto:"auto"}};function Us(t,e){let n={};do for(var r=1;re(t)}var YX={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${hy.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${hy.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},ZX=[ee("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:go(`[${e}]`,"",n)}}})),ee("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),ne("aspect-","aspectRatio"),ee("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Cc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ne("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),ee("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ee("box-(border|content)","boxSizing",({1:t})=>t+"-box"),ee("hidden",{display:"none"}),ee("table-(auto|fixed)","tableLayout"),ee(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ee("isolate","isolation"),ee("object-(contain|cover|fill|none|scale-down)","objectFit"),ne("object-","objectPosition"),ee("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",wc),ee("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),ee("(static|fixed|absolute|relative|sticky)","position"),ne("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),ne("-?(top|bottom|left|right)(?:$|-)","inset"),ee("(visible|collapse)","visibility"),ee("invisible",{visibility:"hidden"}),ne("-?z-","zIndex"),ee("flex-((row|col)(-reverse)?)","flexDirection",by),ee("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ne("(flex-(?:grow|shrink))(?:$|-)"),ne("(flex)-"),ne("grow(?:$|-)","flexGrow"),ne("shrink(?:$|-)","flexShrink"),ne("basis-","flexBasis"),ne("-?(order)-"),"-?(order)-(\\d+)",ne("grid-cols-","gridTemplateColumns"),ee("grid-cols-(\\d+)","gridTemplateColumns",Sy),ne("col-","gridColumn"),ee("col-(span)-(\\d+)","gridColumn",vy),ne("col-start-","gridColumnStart"),ee("col-start-(auto|\\d+)","gridColumnStart"),ne("col-end-","gridColumnEnd"),ee("col-end-(auto|\\d+)","gridColumnEnd"),ne("grid-rows-","gridTemplateRows"),ee("grid-rows-(\\d+)","gridTemplateRows",Sy),ne("row-","gridRow"),ee("row-(span)-(\\d+)","gridRow",vy),ne("row-start-","gridRowStart"),ee("row-start-(auto|\\d+)","gridRowStart"),ne("row-end-","gridRowEnd"),ee("row-end-(auto|\\d+)","gridRowEnd"),ee("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>wc(by(t))),ee("grid-flow-(dense)","gridAutoFlow"),ne("auto-cols-","gridAutoColumns"),ne("auto-rows-","gridAutoRows"),ne("gap-x(?:$|-)","gap","columnGap"),ne("gap-y(?:$|-)","gap","rowGap"),ne("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ee("justify-","justifyContent",Ty),ee("(content|items|self)-",t=>({["align-"+t[1]]:Ty(t)})),ee("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),ne("p([xytrbl])?(?:$|-)","padding",mo("padding")),ne("-?m([xytrbl])?(?:$|-)","margin",mo("margin")),ne("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),ee("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),ne("w-","width"),ne("min-w-","minWidth"),ne("max-w-","maxWidth"),ne("h-","height"),ne("min-h-","minHeight"),ne("max-h-","maxHeight"),ne("font-","fontWeight"),ne("font-","fontFamily",({_:t})=>typeof(t=Ln(t))[1]=="string"?{fontFamily:ir(t)}:{fontFamily:ir(t[0]),...t[1]}),ee("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ee("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ee("italic","fontStyle"),ee("not-italic",{fontStyle:"normal"}),ee("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ea({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ne("tracking-","letterSpacing"),ne("leading-","lineHeight"),ee("list-(inside|outside)","listStylePosition"),ne("list-","listStyleType"),ee("list-","listStyleType"),ne("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),ee("text-(left|center|right|justify|start|end)","textAlign"),ee("text-(ellipsis|clip)","textOverflow"),ne("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),ne("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),ne("indent-","textIndent"),ee("(overline|underline|line-through)","textDecorationLine"),ee("no-underline",{textDecorationLine:"none"}),ne("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ne("decoration-","textDecorationThickness"),ee("decoration-","textDecorationStyle"),ee("(uppercase|lowercase|capitalize)","textTransform"),ee("normal-case",{textTransform:"none"}),ee("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ee("align-","verticalAlign"),ee("whitespace-","whiteSpace"),ee("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ee("break-words",{overflowWrap:"break-word"}),ee("break-all",{wordBreak:"break-all"}),ee("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ee("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ni(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ee("bg-(fixed|local|scroll)","backgroundAttachment"),ee("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),ee(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ee("bg-blend-","backgroundBlendMode"),ee("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),ne("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),ne("bg-","backgroundImage"),ne("bg-","backgroundPosition"),ee("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",wc),ne("bg-","backgroundSize"),ne("rounded(?:$|-)","borderRadius"),ne("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ni(n[0])}-radius`]:e,[`border-${ni(n[1])}-radius`]:e}}),ee("border-(collapse|separate)","borderCollapse"),ne("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ee("border-(solid|dashed|dotted|double|none)","borderStyle"),ne("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ea({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},mo("border","Color")),Bt("border-"),ne("border-([xytrbl])(?:$|-)","borderWidth",mo("border","Width")),ne("border(?:$|-)","borderWidth"),ne("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),ee("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),ee("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),ne("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ni(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ni(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ne("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ne("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ee("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),ne("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":xa(e("ringOffsetColor","","#fff")),"--tw-ring-color":xa(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ne("shadow(?:$|-)","boxShadow",({_:t})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ir(t),"--tw-shadow-colored":ir(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ne("(opacity)-"),ee("mix-blend-","mixBlendMode"),...yy(),...yy("backdrop-"),ne("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:ir(t),transitionTimingFunction:t._=="none"?void 0:ir(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:ir(e("transitionDuration",""))})),ne("duration(?:$|-)","transitionDuration","transitionDuration",ir),ne("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ir),ne("delay(?:$|-)","transitionDelay","transitionDelay",ir),ne("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=ir(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",ee("transform",mm),ee("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":xy(t=="gpu")})),ne("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...mm()})),ne("-?(rotate)-","rotate",gm),ne("-?(translate-[xy])-","translate",gm),ne("-?(skew-[xy])-","skew",gm),ee("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",wc),"(appearance)-",ne("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ne("(cursor)-"),"(cursor)-",ee("snap-(none)","scroll-snap-type"),ee("snap-(x|y|both)",({1:t})=>({...Ea({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),ee("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ee("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ee("snap-(normal|always)","scroll-snap-stop"),ee("scroll-(auto|smooth)","scroll-behavior"),ne("scroll-p([xytrbl])?(?:$|-)","padding",mo("scroll-padding")),ne("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",mo("scroll-margin")),ee("touch-(auto|none|manipulation)","touch-action"),ee("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ea({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),ee("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ee("outline",{outlineStyle:"solid"}),ee("outline-(dashed|dotted|double)","outlineStyle"),ne("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ne("outline-","outlineWidth"),"(pointer-events)-",ne("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],ee("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ne("stroke-","strokeWidth"),ee("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ee("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function wc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function by(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ni(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function ir(t){return t&&""+(t._||t)}function Ty({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function mo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ns(t+"-"+ni(a[0])+e,r),...Ns(t+"-"+ni(a[1])+e,r)}:Ns(t+e,r)}}function yy(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ea(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,ee(`${t}filter`,n),...e.map(r=>ne(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Ln(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function gm({1:t,_:e}){return{["--tw-"+t]:e,...mm()}}function mm(){return{...Ea({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":xy()}),transform:"var(--tw-transform)"}}function xy(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function vy({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Sy({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ea(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Dc=globalThis||(typeof window<"u"?window:self),A5=Object.create,hm=Object.defineProperty,k5=Object.getOwnPropertyDescriptor,P5=Object.getOwnPropertyNames,L5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty,F5=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),M5=(t,e)=>{for(var n in e)hm(t,n,{get:e[n],enumerable:!0})},fm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P5(e))!_5.call(t,a)&&a!==n&&hm(t,a,{get:()=>e[a],enumerable:!(r=k5(e,a))||r.enumerable});return t},B5=(t,e,n)=>(fm(t,e,"default"),n&&fm(n,e,"default")),Cy=(t,e,n)=>(n=t!=null?A5(L5(t)):{},fm(e||!t||!t.__esModule?hm(n,"default",{value:t,enumerable:!0}):n,t)),wy=F5((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,p)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dc=="object"&&Dc.global===Dc?Dc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var g=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,p):i(m,m.target="_blank")):(m.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){i(g)})}}:function(l,c,p,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var m=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||m&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=D:location=D,g=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),Dy={};M5(Dy,{default:()=>Ac});var I5=Cy(wy());B5(Dy,Cy(wy()));var{default:Ey,...R5}=I5,Ac=Ey!==void 0?Ey:R5;d();d();d();d();d();d();var Oee=Me().REDIRECT_URL;d();var fte=hi([]);function Py(t){let[e,n]=re(null);return Ce(()=>{Xt().then(r=>{n(r),z.debug("current config",r)})},[]),Ce(()=>{Xt().then(r=>{n(r)})},[t]),e}function Ly(t){let[e,n]=re(null);return Ce(()=>{t&&Un({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function _y(){let[t,e]=re(null);return Ce(()=>{Jt().then(r=>{e(r)})},[]),[t,r=>{e(r),Ht(r)}]}d();var qs=class extends Ba{constructor(e){super(e),this.state={hasError:!1}}error;info;static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,n){this.error=e,this.info=n}render(){return this.state.hasError?(z.error("ErrorBoundary",this.error,this.info),w(W5,{error:this.error,info:this.info})):this.props.children}};function W5({error:t,info:e}){let{t:n}=xe(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return w("div",{class:"error-boundary",children:[t?.message," ",JSON.stringify(e?.componentStack),w("div",{style:{marginTop:10},children:[n("error.configError"),w("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}async function K5(t,e,n){try{if(e===null)return"noupdate";let r=await Jt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await bm(t,e),await Ht(r),"upload"}let a=await My(t);r.accountLastSyncedAt=Date.now(),z.debug("settings",e),z.debug("local settings.updatedAt",e.updatedAt),z.debug("remote settings.updatedAt",a.updatedAt),z.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),z.debug("isUpload",i),i)return await bm(t,e),await Ht(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||G5(n)&&K5(n.token,t,e).then(i=>{z.debug("syncUserSetting result",i)})},[t,n])}function G5(t){return Zt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function My(t){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:Oo+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function bm(t,e){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:Oo+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function kc(t){let{onClose:e}=t,[n,r]=re("Original"),[a,i,o,s]=rr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(globalThis.location.href),[g,m]=re("auto"),[f,T]=re(null),b=I=>{r(I.detail)};if(Ce(()=>(document.addEventListener(Oa,b,!1),qn().then(I=>{l(I);let F=yt();m(F);let L=$e();r(L),$T(I.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),Ce(()=>{qn().then(I=>{l(I)})},[a]),Ce(()=>{c&&u&&Tm().then(I=>{T(I)})},[c,u]),!u||!f)return null;return w(js,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:I=>{D("switchTranslationMode",!0,{mode:I})()},request:de,onClose:M,onToggleEnabled:B,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:_,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ga(f.rule)||c)},openAboutPage:k,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:Gl,onSetBuildinConfig:Q1,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(I){m(I);let F=pu(c,I,u.sourceLanguageUrlPattern);i(L=>({...L,sourceLanguageUrlPattern:F})),Nn(I)}function C(){p(globalThis.location.href)}function D(I,F,L={}){let U={trigger:"page_popup",...L};return()=>{Pn({method:I,data:U}),F&&e()}}function M(){e()}function B(){i(I=>({...I,enabled:!I.enabled})),setTimeout(()=>{M()},50)}function S(I,F){let L=I;F&&(L=`${I}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Ql(L,!0),setTimeout(()=>{M()},50)}function y(I){I&&(Zi(!1,I),setTimeout(()=>{M()},50))}function _(I=""){Yi(!0,I),setTimeout(()=>{e()},50)}function k(){Yl(),setTimeout(()=>{e()},50)}function v(){a2(),setTimeout(()=>{e()},50)}}d();function Oy(){let[t,e]=re("Original");return Ce(()=>{let n=$e();e(n);let r=a=>{e(a.detail)};return document.addEventListener(Oa,r),()=>{document.removeEventListener(Oa,r)}},[]),{pageStatus:t}}var By=6,$5={position:"right",top:335};function zy({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=qe(null),o=qe(null),[s,u]=re(!1),l=qe(null),c=qe(!1),p=qe(n.floatBallConfig||$5),g=qe(0),m=qe(0),f=qe(0),T=qe(!1),b=qe(0),h=qe(0),C=qe(0),D=qe(0),M=qe(!1),B=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},et().any?3e3:0))},[u,l,T,a]);return Ce(()=>{a||u(!1)},[a]),Ce(()=>{if(i.current&&p.current){let S=ym(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ce(()=>{if(!o.current||!i.current)return;let S=L=>{L.preventDefault&&L.preventDefault(),g.current=L.clientX,m.current=L.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),B(!0),C.current=L.clientX,D.current=L.clientY,M.current=!1,et().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Iy({startX:g.current,startY:m.current,endX:C.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",_),document.addEventListener("touchend",I),document.addEventListener("touchcancel",I)},y=L=>{if(L.preventDefault&&L.preventDefault(),!c.current||!i.current||(C.current=L.clientX,D.current=L.clientY,M.current))return;let U=L.clientY-m.current+f.current,N=ym(U);i.current.style.top=`${N}px`},_=L=>{if(L.preventDefault&&L.preventDefault(),F(),c.current=!1,clearTimeout(l.current),T.current||B(!1),M.current)return;Iy({startX:g.current,startY:m.current,endX:L.clientX,endY:L.clientY})||(clearTimeout(h.current),t());let N=ym(L.clientY-30);p.current.top=N;let q=Es();Gl({...q,floatBallConfig:p.current})},k=L=>{L.preventDefault&&L.preventDefault(),S(L.changedTouches[0])},v=L=>{L.preventDefault&&L.preventDefault(),y(L.changedTouches[0])},I=L=>{L.preventDefault&&L.preventDefault(),_(L.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",I),document.removeEventListener("touchcancel",I)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",k),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",k))}},[e,o,i,l,c,n,B,t]),Ce(()=>{if(et().any)return;let S=_=>{_.target===i.current&&!T.current||(T.current=!0,B(!0),clearTimeout(l.current))},y=_=>{if(c.current){T.current=!1;return}_.target===i.current&&!T.current||B(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,B,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:B}}function Iy({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>By||i>By}function Ny(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ne(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ne(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ne(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Uy(){let[t,e]=re(!1);return Ce(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var Ry="hasShownFloatingBallGuide",Y5="2024-01-06";function qy(t){let[e,n]=re(!1);Ce(()=>{!t.config.enableShowFloatingBallGuide||yt()==t.targetLanguage||(async()=>{let a=await At(Ry,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function jy(t,e){let n=qe(0),[r,a]=re(!0),[i,o]=re(!1),s=rr(),[u,l]=s,{t:c}=xe(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(et().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ce(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,et().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let g=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return et().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),m=Ne(()=>et().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ne(()=>et().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:fa(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:f,handleShowTooltip:g}}function ym(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ri=`${Q}-float-ball`;function Hy(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(Q5,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function Q5(t){let{t:e}=xe(),[n,r]=re("UntilNext"),a=$l()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ri}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ri}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(Sa,{type:"modal-close"})})]}),w("div",{class:`${ri}-close-radio-content mt-3`,children:o.map(s=>w(Z5,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Qi(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ri}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ri}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function Z5(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=J5(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ri}-radio-sel`:`${ri}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function J5(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();var X5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:g})=>{let[m,f]=re(!1),T=qe(null),b=qe(null),h=()=>{u||!l&&et().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{et().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ne(()=>{let B={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(B.maxWidth="200px",o&&(B.width=o+"px"),B.whiteSpace="normal"),n){case"top":return{...B,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...B,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...B,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...B,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:e}),m&&w("div",{style:M,role:"tooltip",children:t})]})},Ca=X5;d();d();function Wy(t){return we.ASSETS_BASE_URL+t}var ai=`${Q}-float-ball`;function Ky(t){let{t:e}=xe(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ne(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ai}-guide-container`,style:r,children:[w("img",{class:`${ai}-guide-bg ${t.fixedPosition}`,src:ek}),w("div",{class:`${ai}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ai}-guide-img`,src:Wy("images/float_ball_intro.png")}),w("div",{class:`${ai}-guide-message`,children:[e("floatBall.guideClickToTranslate"),et().any?` -${e("floatBall.longPress")}`:""]}),w("div",{class:`${ai}-primary-btn ${ai}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var ek="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function tk({isVisible:t,onClose:e,children:n}){return w(Rt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Gy=tk;var Hs=`${Q}-float-ball`;function vm(t){let{t:e}=xe(),n=rr(),[r,a,i,o]=n;fo(r,a);let s=Py(r),u=Ly(s),{isFullScreen:l}=Uy(),[c,p]=re(!1),[g,m]=re(!0),{pageStatus:f}=Oy(),T=yp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ae();if(Hr(u?.rule)){let O=ga(u.rule);Zi(!0,O||P);return}Pn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,Pn,p]),h=Ve(()=>{p(!0)},[p]),C=g&&!!s,{containerRef:D,active:M,ballRef:B,floatBallConfigRef:S,setActive:y}=zy({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:t.localConfig,popupVisible:c}),_=T?.fixedPosition||"right",k=_==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:I}=qy(t.ctx),{closeTransform:F,logoContainerTransform:L,settingTransform:U}=Ny(T,M||v),{tooltipDelay:N,disableTooltipDelay:q,tooltipText:A,handleShowTooltip:E}=jy(u,f);return C?w("div",{class:`${Hs}-container ${_} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(nk,{ctx:u,setVisible:m,closeTransform:F,setActive:y,getModalStyle:()=>Vy(S.current.top,300,_)}),w(Ca,{enableMobile:!0,text:A,position:k,delay:N,onShow:E,disable:q,children:w("div",{class:`${Hs}-btn ${_} btn-animate `,ref:B,style:{transform:L,opacity:M||v?1:.5},children:w("div",{children:[w(Sa,{type:"logo"}),f!=="Original"?w(Sa,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:U},class:`${Hs}-more-buttons btn-animate`,children:[w(Ca,{text:e("translateFileTooltip"),multiple:!0,width:200,position:k,containerClass:"btn-animate",children:w("div",{class:`${Hs}-more-button`,onClick:()=>{Ql(c4,!0)},children:w(Sa,{type:"file"})})}),w(Ca,{text:e("floatBall.setting"),position:k,containerClass:"btn-animate",children:w("div",{class:`${Hs}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(Sa,{type:"setting"})})})]}),w(rk,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Vy(S.current.top,500,_)}),w(Ky,{visible:v,top:S.current.top,fixedPosition:_,onClose:()=>{I(),y(!1)}})]}):null}function nk(t){let{t:e}=xe(),[n,r]=re(!1),a=rr(),[i,o,s,u]=a,l=yp(t.ctx,i),c=Ve(g=>{t.ctx&&o(m=>a1({...m},g))},[t.ctx,o]),p=Ve(g=>{l&&(t.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(Rt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(Sa,{type:"close"})}),w(Hy,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function rk(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Gy,{isVisible:t.visible,onClose:t.onClose,children:w(kc,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(kc,{onClose:t.onClose})})}):null}function ak(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Vy=(t,e,n)=>{let a=ak().height,i={position:"fixed"},o=0;return Vf()&&(t=ik.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},ik={position:"right",right:0,top:335};function ok(t,e){for(let n of e){if(ye()&&!Wn()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $y(){let t=Me(),e=await qn(),n=await qr(),r={url:globalThis.location.href,config:e},a=await Un(r),i=await vp(a,n),o=wt(a.url,i?.blockUrls),s=await Jt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return ok(l,[c]),sk(l,e,s,a)}function sk(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),$r(w(eo,{lang:e.interfaceLanguage,fallbackLang:"en",translations:rc,children:w(vm,{localConfig:n,ctx:r})}),a)}var Yy=!1;async function Qy(){Yy||(Yy=!0,$y().catch(t=>{z.error("init popup error",t)}))}var Zy=!1,tv=[()=>{yn.unbind()}],Jy=[...tv],uk=Vn(async()=>{await Yi()},50),lk=Vn(async()=>{await Yl()},50),ck=Vn(async()=>{await n2()},50),dk=Vn(async()=>{await t2()},50),nv=Vn(t=>{Pn({method:t,data:{trigger:"userscript_menu"}})},50);function pk(t,e){let n=t.document;if(Zy)return;Zy=!0,ye()||Y1(),n.addEventListener("securitypolicyviolation",Ek),document.addEventListener(me+"DocumentMessageUser",sv),document.addEventListener(me+"DocumentMessageUpdateUser",uv),document.addEventListener(me+"ChangeSuccessService",lv.bind(null,e)),document.addEventListener(me+"ChangeService",cv.bind(null,e)),document.addEventListener(Ra,vk.bind(null,e)),n.addEventListener(me+"EbookLoaded",xk),n.addEventListener(Lh,Sk.bind(null,e)),n.addEventListener(_h,Ck.bind(null,e)),n.addEventListener(vu,a=>{Je()||Cm(a,e)}),n.addEventListener(Fh,pv),n.addEventListener("click",a=>{fk(a,e)}),Je()&&t.addEventListener("message",mk,!1),ye()&&(Je()||n.addEventListener(wr,gk)),Je()||ba.rootIframe(Au).handleAsk("throttleRequest",oT)}function rv(t,e){wk(),pk(e,t),ye()&&(Je()||(Zg(t.config),Dk(t.config))),Tu()&&gv(t),it()&&Zg(t.config)}function gk(t){Qy()}function mk(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===yu&&ma(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function fk(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&<(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Sm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}av(iv.bind(null,e,o,i,s));return}}}async function hk(){let t=await mn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await gn(t)}async function bk(){let t=await mn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await gn(t)}var Xy=0;function av(t){let e=Date.now();if(e-Xy<2e3||(Xy=e,Tk()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=Q+"-modal-content notranslate",u.appendChild(g);let m=document.createElement("span");m.textContent="\xD7",m.className=Q+"-close",g.appendChild(m);let f=document.createElement("div");f.className=i+" notranslate",g.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",g.appendChild(T);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{yk()},100)}function iv(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=rt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",g=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),g.setAttribute(`data-${Q}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',g.appendChild(m),g.onclick=()=>{a.style.display="none",Sm({method:"retryFailedParagraphs"}),wa(g,!0)}}else if(r=="login")p=u("goLogin"),g.onclick=()=>{wa(g,!0),window.open(n4)};else if(r=="upgrade")p=u("upgradeToPro"),g.onclick=()=>{wa(g,!0),window.open(Pu)};else if(r=="setting")p=u("goSettings"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)},Em(t,t.config.translationService,!1).then(m=>{m?(p=u("toggleToService",{service:u("translationServices."+m)}),g.innerHTML=rt.sanitize(p),g.onclick=()=>{dv(m),wa(g,!0)}):(p=u("goSettings"),g.innerHTML=rt.sanitize(p))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=rt.sanitize(p),s.appendChild(g)}function Tk(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function yk(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function vk(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;av(iv.bind(null,t,a,i,o))}catch(r){z.warn("parse message error",r)}}async function Sk(t,e){let n=e;if(z.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Sm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")r2(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")hk();else if(a.type==="toggleEnableInputTranslation")bk();else if(a.type==="translatePage")Ak(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ds(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=gc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await kk(a.data,i)}catch(o){ev(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Vl(a.data):a.type==="sharePage"?Cm({detail:a.data},t):a.type==="switchTranslationMode"?xm(a.data):nv(a.type);r&&a.id&&ev(a.type,r,a.id)}}catch(a){z.warn("parse message error",a)}}}function xk(t){setTimeout(()=>{ov()},10)}function Ek(t){we.HAS_CSP_ERROR="1"}function Ck(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&<(n.name,[{name:n.name}],{...t})}function wk(){Jy.forEach(t=>{t()}),Jy=tv}function Dk(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=gl.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=no(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:kd,title:no("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:Pd,title:no("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:Dd,title:no("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:Ad,title:no("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===Dd?uk():i.id===Ad?lk():i.id===Pd?ck():i.id===kd?dk():nv(i.id)},i.key)}}function Sm(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{z.error("send content message request failed",t,n)});let e=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(e)}async function Ak(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await Ke(Ae(),e);fn(n)}function ev(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function kk({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Xe({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var ii={};async function wm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ft(),"en"]});return Nn(n),n}async function mv(t){pn("Translating");let e=yt(),n=Il(),r=[...document.querySelectorAll(".source-text")];if(Ui(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return ut(i,"id",o+""),s&&(qi(s,o)?.remove(),s.appendChild(ys(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Xe({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=qi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=rt.sanitize(`${i.message}`),ii[u]={ok:!1,sentence:s}):o&&(c.innerHTML=rt.sanitize(o.text),ii[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{pn("Translated")}}async function fv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(ii),n=[],r=[];for(let a of e){let i=ii[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete ii[a],u.appendChild(ys(t,a)),r.push(i.sentence))}}}try{await Xe({sentences:r},t,(a,i,o)=>{let s=o.id,u=qi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=rt.sanitize(`${a.message}`),ii[s]={ok:!1,sentence:o}):i&&(l.innerHTML=rt.sanitize(i.text),ii[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{pn("Translated")}}function Dm(){pn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var Am={};async function hv(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return Nn(n),n}async function bv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(Am),n=[];for(let r of e){let a=Am[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);o&&o.remove(),n.push(a)}}try{Os(),await vc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}function Tv(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+bt);for(let a of r)a.remove()}pn("Original")}async function yv(t){pn("Translating");let e=ps(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;po(u,t);let l=u.body;if(!l)continue;let c=an(t);c.isModifyImage=!1,Kr({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=Tr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=ac(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Wg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),Am[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await vc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}d();var or=!1,Pc,vv=!1,Lc=null;function xv(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){z.debug("exclude url for input");return}if(Lc===!1){z.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};wn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;et().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();Pc&&self.removeEventListener("keydown",Pc),Pc=u,self.addEventListener("keydown",Pc);function u(c){if(or||Lc===!1)return;let p=c,g=p.target||p.srcElement,m=g?.tagName;(g?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(jk(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&_k()&&(o=0,Lk(c,t,i))}Hk(t)}function Ev({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function _c(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var ho;function Cv(t){let e=t.parentElement;if(!e)return;ho=document.createElement("div"),ho.className=Q+"-input",ho.innerHTML=`
`,e.appendChild(ho);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function wv(){ho&&ho.remove()}async function Pk(t){if(!or)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=_c(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=Ev(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=_c(C,i.codeAlias),!c){z.warn("not found alias",C);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};wn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;et().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;or=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=Dv(u,i),g=await Ie({text:p,pageLangs:["en"]});z.debug("translateContent",p,g);let m={text:p||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!m.text||m.text.length>5e3)return;Cv(o),Ze(Su,Date.now());try{let b=await ya(m,{...t,translationService:t.inputTranslationService});kv(t),Av(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:h}))}}finally{or=!1}}catch(e){throw or=!1,e}finally{or=!1,wv()}}async function Lk(t,e,n){if(!or)try{let p=function(){s=e.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=_c(m,n.codeAlias),i=o.slice(m.length+1)):i=o},g=function(){s="";let m=Ev(n),f=o.split(m);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=_c(T,n.codeAlias),!s){z.warn("not found alias",T);return}},r=document.activeElement;or=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(g(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=Dv(i,n),l=await Ie({text:u,pageLangs:["en"]});z.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!vv){vv=!0;let m=await Wk(e);if(t.target&&t.target.focus(),m==="open_settings"){Yi(!0,"#input");return}else if(m==="open_learn_more"){Qi("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(Lc=!1,m==="disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="disable_once"){let f=await mn();f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(Lc=!1,m==="close_disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="enable"){let f=await mn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="close_enable"){let f=await mn();f.enableInputTranslation=!0,await gn(f)}}Cv(r),Ze(Su,Date.now());try{let m=await ya(c,{...e,translationService:e.inputTranslationService});kv(e),Av(e,r,a+m.text)}catch(m){if(m instanceof $){let f=m.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:f}))}}finally{or=!1}}catch(r){throw or=!1,r}finally{or=!1,wv()}}function _k(){let t=document.activeElement;if(!t)return!1;if(Fc(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` +`,$g="immersive-translate-toastify-shadow-root",Yg=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById($g)){let e=document.getElementById($g);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=$g,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=g5,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function Sc(t){t=t||{},new Yg({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function GT(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();function Pn(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{z.error("send content message request failed",t,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:yu,payload:t},"*")});let n=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(n)}function Qg(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&yn(o,s=>{s.preventDefault();let u=r[i];Pn({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var VT=`${Q}-float-ball`;function Sa(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${VT}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${VT}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();d();async function $T(t){try{let e=new Date;z.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Wh]:e.toISOString()}),await m5(),ye()||await i2()}catch(e){z.error("run cron task failed",e)}}async function m5(){try{let t=await qn(),e=await de({url:Io}),n=t.buildinConfigUpdatedAt,r=new Date(n),a=e.buildinConfigUpdatedAt,i=new Date(a),o=e.minVersion,s=oe.runtime.getManifest().version;to(s,o)?i>r?(await oe.storage.local.set({buildinConfig:e}),z.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),ma({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{z.error("send content message request failed from cron task",u)})):z.debug(`no need to sync rules, latest: ${r}`):z.info(`local version is too old, please update to ${o} or later`)}catch(t){z.error("sync rules error: ",t)}}d();d();d();d();d();d();var Zg;function sm(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function ry(t,e=","){return t.map(sm).join(e)}var ay=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ec(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Cc(t,e="@media "){return e+Ln(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Ln(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function f5(){}var Vt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function iy(t){return t.match(/[-=:;]/g)?.length||0}function rm(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(iy(t),15)<<18}var h5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function um({n:t,i:e,v:n=[]},r,a,i){t&&(t=sm({n:t,i:e,v:n})),i=[...Ln(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Ln(u&&Cc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|rm(l):s=="dark"?1073741824:l[0]=="@"?rm(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~h5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var lm=new Map;function YT(t){if(t.d){let e=[],n=Jg(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Jg(r,i=>Jg(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Xg(i,o)}return Xg(o,i)})):r,"&"),r=>Xg(r,t.n?"."+ay(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Jg(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Xg(t,e){return t.replace(/&/g,e)}var QT=new Intl.Collator("en",{numeric:!0});function b5(t,e){for(var n=0,r=t.length;n>1;0>=oy(t[a],e)?n=a+1:r=a}return r}function oy(t,e){let n=t.p&Vt.o;return n==(e.p&Vt.o)&&(n==Vt.b||n==Vt.o)?0:t.p-e.p||t.o-e.o||QT.compare(ZT(t.n),ZT(e.n))||QT.compare(JT(t.n),JT(e.n))}function ZT(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function JT(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function em(t,e){return Math.round(parseInt(t,16)*e)}function xa(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[em(t.substr(1,i),o),em(t.substr(1+i,i),o),em(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function sy(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let g=[],m="",f=0,T=0;for(let C in o||{}){var b,h;let D=o[C];if(C[0]=="@"){if(!D)continue;if(C[1]=="a"){g.push(...ly(s,u,dm(""+D),p,u,l,c,!0));continue}if(C[1]=="l"){for(let M of Ln(D))g.push(...i(M,{n:s,p:(b=Vt[C[7]],u&~Vt.o|b),r:C[7]=="d"?[]:l,i:c},p));continue}if(C[1]=="i"){g.push(...Ln(D).map(M=>({p:-1,o:0,r:[],d:C+" "+M})));continue}if(C[1]=="k"){g.push({p:Vt.d,o:0,r:[C],d:i(D,{p:Vt.d},p).map(YT).join("")});continue}if(C[1]=="f"){g.push(...Ln(D).map(M=>({p:Vt.d,o:0,r:[C],d:i(M,{p:Vt.d},p).map(YT).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))C=="label"&&D?s=D+Ec(JSON.stringify([u,c,o])):(D||D===0)&&(C=C.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=C)[0]=="-"?0:iy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+Ln(D).map(M=>p.s(C,uy(""+M,p.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let M=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(B,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Cc(y,"")):B}),M|=rm(C)),g.push(...i(D,{n:s,p:M,r:[...l,C],i:c},p))}else g.push(...i(D,{p:u,r:[...l,C]},p))}return g.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:m}),g.sort(oy)}(t,um(e,n,r,a),n)}function uy(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?xa(s):""+Ln(s).filter(u=>Object(u)!==u)})}function cm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function am(t,e,n=Vt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,g){u={...u,i:u.i||g};let m=function(f,T){let b=lm.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:p,p:c}=um(u,l,c,p),cm(am(dm(m),l,c,p,u.i),u.n)):Array.isArray(m)?m.map(f=>{var T,b;return{o:0,...f,r:[...Ln(p),...Ln(f.r)],p:(T=c,b=f.p??c,T&~Vt.o|b)}}):sy(m,u,l,c,p):[{c:sm(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(b5(i,s),0,s);return i}function ly(t,e,n,r,a,i,o,s){return cm((s?n.flatMap(u=>am([u],r,a,i,o)):am(n,r,a,i,o)).map(u=>u.p&Vt.o&&(u.n||e==Vt.b)?{...u,p:u.p&~Vt.o|e,o:0}:u),t)}function T5(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=um(i,o,e);return n&&ly(s,e,n,o,u,l,c,r)},lm.set(t,a),t}function tm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(y5),i:a}))}}function y5(t,e,n){return n.indexOf(t)==e}var XT=new Map;function dm(t){let e=XT.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&tm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Ec(JSON.stringify([p,g])):p+"("+ry(g)+")",Vt.a,g,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),XT.set(t,e=r[0])}return e}function cy(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function dy(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?cy(t,e,n=>nm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+nm(r),t?nm(t):"")}function nm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=dy(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var AX=py("@"),kX=py("~");function py(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return ry(dm(n+t+"("+dy(r,a)+")"))}}function im(t,e){return Array.isArray(t)?ey(cy(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?ey(t):[t]}var v5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function ey(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=v5.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function gy(t,...e){var n;let r=im(t,e),a=(r.find(i=>i.label)?.label||"css")+Ec(JSON.stringify(r));return n=(i,o)=>cm(r.flatMap(s=>sy(s,i,o,Vt.o)),a),lm.set(a,n),a}var PX=new Proxy(function(t,e){return ty("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ty(e,n,r)}}});function ty(t,e,n){return{toString(){return gy({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function ee(t,e,n){return[t,S5(e,n)]}function S5(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):om(n,1)}):n=>t||{[n[1]]:om(n,2)}}function om(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function ne(t,e,n,r){return[t,x5(e,n,r)]}function x5(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=my(t||a[1]),s=i.theme(o,a.$$)??go(a.$$,o,i);if(s!=null)return a._=om(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,E5(e,n)]}function E5(t={},e){return(n,r)=>{let{section:a=my(n[0]).replace("-","")+"Color"}=t,[i,o]=C5(n.$$);if(!i)return;let s=r.theme(a,i)||go(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,g=r.theme(l,o||"DEFAULT")||o&&go(o,l,r),m=e||(({_:T})=>{let b=Us(c,T);return p?{[p]:b}:b});n._={value:xa(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:T=>xa(s,T),opacityVariable:u||void 0,opacityValue:g||void 0};let f=m(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:xa(T,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>xa(T,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:m(n,r)})}return f}}function C5(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Us(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function go(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=xc(uy(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function my(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function xc(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>xc(n)+r+xc(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var LX=Symbol();var fy=new Proxy(f5,{apply(t,e,n){return Zg(n[0])},get(t,e){let n=Zg[e];return typeof n=="function"?function(){return n.apply(Zg,arguments)}:n}});var _X=function t(e){return new Proxy(function(n,...r){return ny(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return ny(e,r,a,i)}}})}();function ny(t,e,n,r){return{toString(){let a=im(n,r),i=ay(e+Ec(JSON.stringify([e,a])));return(typeof t=="function"?t:fy)(gy({[`@keyframes ${i}`]:im(n,r)})),i}}}d();d();d();d();d();var hy={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",..._n(4,"rem",4,.5,.5),..._n(12,"rem",4,5),14:"3.5rem",..._n(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:We("blur"),backdropBrightness:We("brightness"),backdropContrast:We("contrast"),backdropGrayscale:We("grayscale"),backdropHueRotate:We("hueRotate"),backdropInvert:We("invert"),backdropOpacity:We("opacity"),backdropSaturate:We("saturate"),backdropSepia:We("sepia"),backgroundColor:We("colors"),backgroundImage:{none:"none"},backgroundOpacity:We("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{..._n(200,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:We("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:We("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:We("colors"),caretColor:We("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{..._n(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:We("borderColor"),divideOpacity:We("borderOpacity"),divideWidth:We("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...qs(2,6),...qs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:We("spacing"),gradientColorStops:We("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...qs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...qs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{..._n(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{..._n(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:We("spacing"),placeholderColor:We("colors"),placeholderOpacity:We("opacity"),outlineColor:We("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:We("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:_n(200,"",100,0,50),scale:{..._n(150,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:We("spacing"),scrollPadding:We("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:We("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:_n(2),textColor:We("colors"),textDecorationColor:We("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:We("spacing"),textOpacity:We("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:We("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...qs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{..._n(50,"",1,0,10),auto:"auto"}};function qs(t,e){let n={};do for(var r=1;re(t)}var YX={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${hy.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${hy.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},ZX=[ee("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:go(`[${e}]`,"",n)}}})),ee("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),ne("aspect-","aspectRatio"),ee("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Cc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ne("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),ee("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ee("box-(border|content)","boxSizing",({1:t})=>t+"-box"),ee("hidden",{display:"none"}),ee("table-(auto|fixed)","tableLayout"),ee(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ee("isolate","isolation"),ee("object-(contain|cover|fill|none|scale-down)","objectFit"),ne("object-","objectPosition"),ee("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",wc),ee("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),ee("(static|fixed|absolute|relative|sticky)","position"),ne("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),ne("-?(top|bottom|left|right)(?:$|-)","inset"),ee("(visible|collapse)","visibility"),ee("invisible",{visibility:"hidden"}),ne("-?z-","zIndex"),ee("flex-((row|col)(-reverse)?)","flexDirection",by),ee("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ne("(flex-(?:grow|shrink))(?:$|-)"),ne("(flex)-"),ne("grow(?:$|-)","flexGrow"),ne("shrink(?:$|-)","flexShrink"),ne("basis-","flexBasis"),ne("-?(order)-"),"-?(order)-(\\d+)",ne("grid-cols-","gridTemplateColumns"),ee("grid-cols-(\\d+)","gridTemplateColumns",Sy),ne("col-","gridColumn"),ee("col-(span)-(\\d+)","gridColumn",vy),ne("col-start-","gridColumnStart"),ee("col-start-(auto|\\d+)","gridColumnStart"),ne("col-end-","gridColumnEnd"),ee("col-end-(auto|\\d+)","gridColumnEnd"),ne("grid-rows-","gridTemplateRows"),ee("grid-rows-(\\d+)","gridTemplateRows",Sy),ne("row-","gridRow"),ee("row-(span)-(\\d+)","gridRow",vy),ne("row-start-","gridRowStart"),ee("row-start-(auto|\\d+)","gridRowStart"),ne("row-end-","gridRowEnd"),ee("row-end-(auto|\\d+)","gridRowEnd"),ee("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>wc(by(t))),ee("grid-flow-(dense)","gridAutoFlow"),ne("auto-cols-","gridAutoColumns"),ne("auto-rows-","gridAutoRows"),ne("gap-x(?:$|-)","gap","columnGap"),ne("gap-y(?:$|-)","gap","rowGap"),ne("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ee("justify-","justifyContent",Ty),ee("(content|items|self)-",t=>({["align-"+t[1]]:Ty(t)})),ee("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),ne("p([xytrbl])?(?:$|-)","padding",mo("padding")),ne("-?m([xytrbl])?(?:$|-)","margin",mo("margin")),ne("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),ee("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),ne("w-","width"),ne("min-w-","minWidth"),ne("max-w-","maxWidth"),ne("h-","height"),ne("min-h-","minHeight"),ne("max-h-","maxHeight"),ne("font-","fontWeight"),ne("font-","fontFamily",({_:t})=>typeof(t=Ln(t))[1]=="string"?{fontFamily:ir(t)}:{fontFamily:ir(t[0]),...t[1]}),ee("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ee("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ee("italic","fontStyle"),ee("not-italic",{fontStyle:"normal"}),ee("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ea({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ne("tracking-","letterSpacing"),ne("leading-","lineHeight"),ee("list-(inside|outside)","listStylePosition"),ne("list-","listStyleType"),ee("list-","listStyleType"),ne("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),ee("text-(left|center|right|justify|start|end)","textAlign"),ee("text-(ellipsis|clip)","textOverflow"),ne("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),ne("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),ne("indent-","textIndent"),ee("(overline|underline|line-through)","textDecorationLine"),ee("no-underline",{textDecorationLine:"none"}),ne("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ne("decoration-","textDecorationThickness"),ee("decoration-","textDecorationStyle"),ee("(uppercase|lowercase|capitalize)","textTransform"),ee("normal-case",{textTransform:"none"}),ee("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ee("align-","verticalAlign"),ee("whitespace-","whiteSpace"),ee("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ee("break-words",{overflowWrap:"break-word"}),ee("break-all",{wordBreak:"break-all"}),ee("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ee("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ni(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ee("bg-(fixed|local|scroll)","backgroundAttachment"),ee("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),ee(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ee("bg-blend-","backgroundBlendMode"),ee("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),ne("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),ne("bg-","backgroundImage"),ne("bg-","backgroundPosition"),ee("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",wc),ne("bg-","backgroundSize"),ne("rounded(?:$|-)","borderRadius"),ne("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ni(n[0])}-radius`]:e,[`border-${ni(n[1])}-radius`]:e}}),ee("border-(collapse|separate)","borderCollapse"),ne("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ee("border-(solid|dashed|dotted|double|none)","borderStyle"),ne("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ea({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},mo("border","Color")),Bt("border-"),ne("border-([xytrbl])(?:$|-)","borderWidth",mo("border","Width")),ne("border(?:$|-)","borderWidth"),ne("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),ee("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),ee("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),ne("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ni(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ni(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ne("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ne("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ee("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),ne("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":xa(e("ringOffsetColor","","#fff")),"--tw-ring-color":xa(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ne("shadow(?:$|-)","boxShadow",({_:t})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ir(t),"--tw-shadow-colored":ir(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ne("(opacity)-"),ee("mix-blend-","mixBlendMode"),...yy(),...yy("backdrop-"),ne("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:ir(t),transitionTimingFunction:t._=="none"?void 0:ir(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:ir(e("transitionDuration",""))})),ne("duration(?:$|-)","transitionDuration","transitionDuration",ir),ne("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ir),ne("delay(?:$|-)","transitionDelay","transitionDelay",ir),ne("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=ir(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",ee("transform",gm),ee("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":xy(t=="gpu")})),ne("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...gm()})),ne("-?(rotate)-","rotate",pm),ne("-?(translate-[xy])-","translate",pm),ne("-?(skew-[xy])-","skew",pm),ee("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",wc),"(appearance)-",ne("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ne("(cursor)-"),"(cursor)-",ee("snap-(none)","scroll-snap-type"),ee("snap-(x|y|both)",({1:t})=>({...Ea({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),ee("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ee("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ee("snap-(normal|always)","scroll-snap-stop"),ee("scroll-(auto|smooth)","scroll-behavior"),ne("scroll-p([xytrbl])?(?:$|-)","padding",mo("scroll-padding")),ne("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",mo("scroll-margin")),ee("touch-(auto|none|manipulation)","touch-action"),ee("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ea({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),ee("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ee("outline",{outlineStyle:"solid"}),ee("outline-(dashed|dotted|double)","outlineStyle"),ne("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ne("outline-","outlineWidth"),"(pointer-events)-",ne("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],ee("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ne("stroke-","strokeWidth"),ee("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ee("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function wc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function by(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ni(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function ir(t){return t&&""+(t._||t)}function Ty({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function mo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Us(t+"-"+ni(a[0])+e,r),...Us(t+"-"+ni(a[1])+e,r)}:Us(t+e,r)}}function yy(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ea(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,ee(`${t}filter`,n),...e.map(r=>ne(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Ln(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function pm({1:t,_:e}){return{["--tw-"+t]:e,...gm()}}function gm(){return{...Ea({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":xy()}),transform:"var(--tw-transform)"}}function xy(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function vy({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Sy({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ea(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Dc=globalThis||(typeof window<"u"?window:self),A5=Object.create,fm=Object.defineProperty,k5=Object.getOwnPropertyDescriptor,P5=Object.getOwnPropertyNames,L5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty,F5=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),M5=(t,e)=>{for(var n in e)fm(t,n,{get:e[n],enumerable:!0})},mm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P5(e))!_5.call(t,a)&&a!==n&&fm(t,a,{get:()=>e[a],enumerable:!(r=k5(e,a))||r.enumerable});return t},B5=(t,e,n)=>(mm(t,e,"default"),n&&mm(n,e,"default")),Cy=(t,e,n)=>(n=t!=null?A5(L5(t)):{},mm(e||!t||!t.__esModule?fm(n,"default",{value:t,enumerable:!0}):n,t)),wy=F5((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,p)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dc=="object"&&Dc.global===Dc?Dc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var g=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,p):i(m,m.target="_blank")):(m.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){i(g)})}}:function(l,c,p,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var m=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||m&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=D:location=D,g=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),Dy={};M5(Dy,{default:()=>Ac});var I5=Cy(wy());B5(Dy,Cy(wy()));var{default:Ey,...R5}=I5,Ac=Ey!==void 0?Ey:R5;d();d();d();d();d();d();var Oee=Me().REDIRECT_URL;d();var fte=hi([]);function Py(t){let[e,n]=re(null);return Ce(()=>{Xt().then(r=>{n(r),z.debug("current config",r)})},[]),Ce(()=>{Xt().then(r=>{n(r)})},[t]),e}function Ly(t){let[e,n]=re(null);return Ce(()=>{t&&Un({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function _y(){let[t,e]=re(null);return Ce(()=>{Jt().then(r=>{e(r)})},[]),[t,r=>{e(r),Wt(r)}]}d();var js=class extends Ba{constructor(e){super(e),this.state={hasError:!1}}error;info;static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,n){this.error=e,this.info=n}render(){return this.state.hasError?(z.error("ErrorBoundary",this.error,this.info),w(W5,{error:this.error,info:this.info})):this.props.children}};function W5({error:t,info:e}){let{t:n}=xe(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return w("div",{class:"error-boundary",children:[t?.message," ",JSON.stringify(e?.componentStack),w("div",{style:{marginTop:10},children:[n("error.configError"),w("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}async function K5(t,e,n){try{if(e===null)return"noupdate";let r=await Jt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await hm(t,e),await Wt(r),"upload"}let a=await My(t);r.accountLastSyncedAt=Date.now(),z.debug("settings",e),z.debug("local settings.updatedAt",e.updatedAt),z.debug("remote settings.updatedAt",a.updatedAt),z.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),z.debug("isUpload",i),i)return await hm(t,e),await Wt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||G5(n)&&K5(n.token,t,e).then(i=>{z.debug("syncUserSetting result",i)})},[t,n])}function G5(t){return Zt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function My(t){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:zo+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function hm(t,e){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:zo+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function kc(t){let{onClose:e}=t,[n,r]=re("Original"),[a,i,o,s]=rr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(globalThis.location.href),[g,m]=re("auto"),[f,T]=re(null),b=I=>{r(I.detail)};if(Ce(()=>(document.addEventListener(Oa,b,!1),qn().then(I=>{l(I);let F=yt();m(F);let L=$e();r(L),$T(I.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),Ce(()=>{qn().then(I=>{l(I)})},[a]),Ce(()=>{c&&u&&bm().then(I=>{T(I)})},[c,u]),!u||!f)return null;return w(Hs,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:I=>{D("switchTranslationMode",!0,{mode:I})()},request:de,onClose:M,onToggleEnabled:B,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:_,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ga(f.rule)||c)},openAboutPage:k,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:Gl,onSetBuildinConfig:Q1,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(I){m(I);let F=pu(c,I,u.sourceLanguageUrlPattern);i(L=>({...L,sourceLanguageUrlPattern:F})),Nn(I)}function C(){p(globalThis.location.href)}function D(I,F,L={}){let U={trigger:"page_popup",...L};return()=>{Pn({method:I,data:U}),F&&e()}}function M(){e()}function B(){i(I=>({...I,enabled:!I.enabled})),setTimeout(()=>{M()},50)}function S(I,F){let L=I;F&&(L=`${I}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Ql(L,!0),setTimeout(()=>{M()},50)}function y(I){I&&(Zi(!1,I),setTimeout(()=>{M()},50))}function _(I=""){Yi(!0,I),setTimeout(()=>{e()},50)}function k(){Yl(),setTimeout(()=>{e()},50)}function v(){a2(),setTimeout(()=>{e()},50)}}d();function Oy(){let[t,e]=re("Original");return Ce(()=>{let n=$e();e(n);let r=a=>{e(a.detail)};return document.addEventListener(Oa,r),()=>{document.removeEventListener(Oa,r)}},[]),{pageStatus:t}}var By=6,$5={position:"right",top:335};function zy({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=je(null),o=je(null),[s,u]=re(!1),l=je(null),c=je(!1),p=je(n.floatBallConfig||$5),g=je(0),m=je(0),f=je(0),T=je(!1),b=je(0),h=je(0),C=je(0),D=je(0),M=je(!1),B=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},tt().any?3e3:0))},[u,l,T,a]);return Ce(()=>{a||u(!1)},[a]),Ce(()=>{if(i.current&&p.current){let S=Tm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ce(()=>{if(!o.current||!i.current)return;let S=L=>{L.preventDefault&&L.preventDefault(),g.current=L.clientX,m.current=L.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),B(!0),C.current=L.clientX,D.current=L.clientY,M.current=!1,tt().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Iy({startX:g.current,startY:m.current,endX:C.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",_),document.addEventListener("touchend",I),document.addEventListener("touchcancel",I)},y=L=>{if(L.preventDefault&&L.preventDefault(),!c.current||!i.current||(C.current=L.clientX,D.current=L.clientY,M.current))return;let U=L.clientY-m.current+f.current,N=Tm(U);i.current.style.top=`${N}px`},_=L=>{if(L.preventDefault&&L.preventDefault(),F(),c.current=!1,clearTimeout(l.current),T.current||B(!1),M.current)return;Iy({startX:g.current,startY:m.current,endX:L.clientX,endY:L.clientY})||(clearTimeout(h.current),t());let N=Tm(L.clientY-30);p.current.top=N;let q=Cs();Gl({...q,floatBallConfig:p.current})},k=L=>{L.preventDefault&&L.preventDefault(),S(L.changedTouches[0])},v=L=>{L.preventDefault&&L.preventDefault(),y(L.changedTouches[0])},I=L=>{L.preventDefault&&L.preventDefault(),_(L.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",I),document.removeEventListener("touchcancel",I)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",k),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",k))}},[e,o,i,l,c,n,B,t]),Ce(()=>{if(tt().any)return;let S=_=>{_.target===i.current&&!T.current||(T.current=!0,B(!0),clearTimeout(l.current))},y=_=>{if(c.current){T.current=!1;return}_.target===i.current&&!T.current||B(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,B,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:B}}function Iy({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>By||i>By}function Ny(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ne(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ne(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ne(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Uy(){let[t,e]=re(!1);return Ce(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var Ry="hasShownFloatingBallGuide",Y5="2024-01-06";function qy(t){let[e,n]=re(!1);Ce(()=>{!t.config.enableShowFloatingBallGuide||yt()==t.targetLanguage||(async()=>{let a=await At(Ry,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function jy(t,e){let n=je(0),[r,a]=re(!0),[i,o]=re(!1),s=rr(),[u,l]=s,{t:c}=xe(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(tt().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ce(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,tt().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let g=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return tt().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),m=Ne(()=>tt().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ne(()=>tt().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:fa(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:f,handleShowTooltip:g}}function Tm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ri=`${Q}-float-ball`;function Hy(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(Q5,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function Q5(t){let{t:e}=xe(),[n,r]=re("UntilNext"),a=$l()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ri}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ri}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(Sa,{type:"modal-close"})})]}),w("div",{class:`${ri}-close-radio-content mt-3`,children:o.map(s=>w(Z5,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Qi(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ri}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ri}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function Z5(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=J5(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ri}-radio-sel`:`${ri}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function J5(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();var X5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:g})=>{let[m,f]=re(!1),T=je(null),b=je(null),h=()=>{u||!l&&tt().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{tt().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ne(()=>{let B={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(B.maxWidth="200px",o&&(B.width=o+"px"),B.whiteSpace="normal"),n){case"top":return{...B,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...B,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...B,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...B,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:e}),m&&w("div",{style:M,role:"tooltip",children:t})]})},Ca=X5;d();d();function Wy(t){return we.ASSETS_BASE_URL+t}var ai=`${Q}-float-ball`;function Ky(t){let{t:e}=xe(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ne(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ai}-guide-container`,style:r,children:[w("img",{class:`${ai}-guide-bg ${t.fixedPosition}`,src:ek}),w("div",{class:`${ai}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ai}-guide-img`,src:Wy("images/float_ball_intro.png")}),w("div",{class:`${ai}-guide-message`,children:[e("floatBall.guideClickToTranslate"),tt().any?` +${e("floatBall.longPress")}`:""]}),w("div",{class:`${ai}-primary-btn ${ai}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var ek="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function tk({isVisible:t,onClose:e,children:n}){return w(Ot,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Gy=tk;var Ws=`${Q}-float-ball`;function ym(t){let{t:e}=xe(),n=rr(),[r,a,i,o]=n;fo(r,a);let s=Py(r),u=Ly(s),{isFullScreen:l}=Uy(),[c,p]=re(!1),[g,m]=re(!0),{pageStatus:f}=Oy(),T=Tp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ae();if(Hr(u?.rule)){let O=ga(u.rule);Zi(!0,O||P);return}Pn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,Pn,p]),h=Ve(()=>{p(!0)},[p]),C=g&&!!s,{containerRef:D,active:M,ballRef:B,floatBallConfigRef:S,setActive:y}=zy({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:t.localConfig,popupVisible:c}),_=T?.fixedPosition||"right",k=_==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:I}=qy(t.ctx),{closeTransform:F,logoContainerTransform:L,settingTransform:U}=Ny(T,M||v),{tooltipDelay:N,disableTooltipDelay:q,tooltipText:A,handleShowTooltip:E}=jy(u,f);return C?w("div",{class:`${Ws}-container ${_} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(nk,{ctx:u,setVisible:m,closeTransform:F,setActive:y,getModalStyle:()=>Vy(S.current.top,300,_)}),w(Ca,{enableMobile:!0,text:A,position:k,delay:N,onShow:E,disable:q,children:w("div",{class:`${Ws}-btn ${_} btn-animate `,ref:B,style:{transform:L,opacity:M||v?1:.5},children:w("div",{children:[w(Sa,{type:"logo"}),f!=="Original"?w(Sa,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:U},class:`${Ws}-more-buttons btn-animate`,children:[w(Ca,{text:e("translateFileTooltip"),multiple:!0,width:200,position:k,containerClass:"btn-animate",children:w("div",{class:`${Ws}-more-button`,onClick:()=>{Ql(c4,!0)},children:w(Sa,{type:"file"})})}),w(Ca,{text:e("floatBall.setting"),position:k,containerClass:"btn-animate",children:w("div",{class:`${Ws}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(Sa,{type:"setting"})})})]}),w(rk,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Vy(S.current.top,500,_)}),w(Ky,{visible:v,top:S.current.top,fixedPosition:_,onClose:()=>{I(),y(!1)}})]}):null}function nk(t){let{t:e}=xe(),[n,r]=re(!1),a=rr(),[i,o,s,u]=a,l=Tp(t.ctx,i),c=Ve(g=>{t.ctx&&o(m=>a1({...m},g))},[t.ctx,o]),p=Ve(g=>{l&&(t.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(Ot,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(Sa,{type:"close"})}),w(Hy,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function rk(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Gy,{isVisible:t.visible,onClose:t.onClose,children:w(kc,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(kc,{onClose:t.onClose})})}):null}function ak(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Vy=(t,e,n)=>{let a=ak().height,i={position:"fixed"},o=0;return Vf()&&(t=ik.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},ik={position:"right",right:0,top:335};function ok(t,e){for(let n of e){if(ye()&&!Wn()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $y(){let t=Me(),e=await qn(),n=await qr(),r={url:globalThis.location.href,config:e},a=await Un(r),i=await yp(a,n),o=wt(a.url,i?.blockUrls),s=await Jt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return ok(l,[c]),sk(l,e,s,a)}function sk(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),$r(w(eo,{lang:e.interfaceLanguage,fallbackLang:"en",translations:rc,children:w(ym,{localConfig:n,ctx:r})}),a)}var Yy=!1;async function Qy(){Yy||(Yy=!0,$y().catch(t=>{z.error("init popup error",t)}))}var Zy=!1,tv=[()=>{yn.unbind()}],Jy=[...tv],uk=Vn(async()=>{await Yi()},50),lk=Vn(async()=>{await Yl()},50),ck=Vn(async()=>{await n2()},50),dk=Vn(async()=>{await t2()},50),nv=Vn(t=>{Pn({method:t,data:{trigger:"userscript_menu"}})},50);function pk(t,e){let n=t.document;if(Zy)return;Zy=!0,ye()||Y1(),n.addEventListener("securitypolicyviolation",Ek),document.addEventListener(me+"DocumentMessageUser",sv),document.addEventListener(me+"DocumentMessageUpdateUser",uv),document.addEventListener(me+"ChangeSuccessService",lv.bind(null,e)),document.addEventListener(me+"ChangeService",cv.bind(null,e)),document.addEventListener(Ra,vk.bind(null,e)),n.addEventListener(me+"EbookLoaded",xk),n.addEventListener(Lh,Sk.bind(null,e)),n.addEventListener(_h,Ck.bind(null,e)),n.addEventListener(vu,a=>{Xe()||Em(a,e)}),n.addEventListener(Fh,pv),n.addEventListener("click",a=>{fk(a,e)}),Xe()&&t.addEventListener("message",mk,!1),ye()&&(Xe()||n.addEventListener(wr,gk)),Xe()||ba.rootIframe(Au).handleAsk("throttleRequest",oT)}function rv(t,e){wk(),pk(e,t),ye()&&(Xe()||(Qg(t.config),Dk(t.config))),Tu()&&gv(t),ot()&&Qg(t.config)}function gk(t){Qy()}function mk(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===yu&&ma(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function fk(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&<(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),vm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}av(iv.bind(null,e,o,i,s));return}}}async function hk(){let t=await mn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await gn(t)}async function bk(){let t=await mn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await gn(t)}var Xy=0;function av(t){let e=Date.now();if(e-Xy<2e3||(Xy=e,Tk()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=Q+"-modal-content notranslate",u.appendChild(g);let m=document.createElement("span");m.textContent="\xD7",m.className=Q+"-close",g.appendChild(m);let f=document.createElement("div");f.className=i+" notranslate",g.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",g.appendChild(T);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{yk()},100)}function iv(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=at.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",g=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),g.setAttribute(`data-${Q}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',g.appendChild(m),g.onclick=()=>{a.style.display="none",vm({method:"retryFailedParagraphs"}),wa(g,!0)}}else if(r=="login")p=u("goLogin"),g.onclick=()=>{wa(g,!0),window.open(n4)};else if(r=="upgrade")p=u("upgradeToPro"),g.onclick=()=>{wa(g,!0),window.open(Pu)};else if(r=="setting")p=u("goSettings"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)},xm(t,t.config.translationService,!1).then(m=>{m?(p=u("toggleToService",{service:u("translationServices."+m)}),g.innerHTML=at.sanitize(p),g.onclick=()=>{dv(m),wa(g,!0)}):(p=u("goSettings"),g.innerHTML=at.sanitize(p))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=at.sanitize(p),s.appendChild(g)}function Tk(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function yk(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function vk(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;av(iv.bind(null,t,a,i,o))}catch(r){z.warn("parse message error",r)}}async function Sk(t,e){let n=e;if(z.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")vm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")r2(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")hk();else if(a.type==="toggleEnableInputTranslation")bk();else if(a.type==="translatePage")Ak(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ps(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=gc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await kk(a.data,i)}catch(o){ev(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Vl(a.data):a.type==="sharePage"?Em({detail:a.data},t):a.type==="switchTranslationMode"?Sm(a.data):nv(a.type);r&&a.id&&ev(a.type,r,a.id)}}catch(a){z.warn("parse message error",a)}}}function xk(t){setTimeout(()=>{ov()},10)}function Ek(t){we.HAS_CSP_ERROR="1"}function Ck(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&<(n.name,[{name:n.name}],{...t})}function wk(){Jy.forEach(t=>{t()}),Jy=tv}function Dk(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=gl.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=no(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:Ad,title:no("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:kd,title:no("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:wd,title:no("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:Dd,title:no("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===wd?uk():i.id===Dd?lk():i.id===kd?ck():i.id===Ad?dk():nv(i.id)},i.key)}}function vm(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{z.error("send content message request failed",t,n)});let e=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(e)}async function Ak(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await Ke(Ae(),e);fn(n)}function ev(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function kk({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Qe({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var ii={};async function Cm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ft(),"en"]});return Nn(n),n}async function mv(t){pn("Translating");let e=yt(),n=Il(),r=[...document.querySelectorAll(".source-text")];if(Ui(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return ut(i,"id",o+""),s&&(qi(s,o)?.remove(),s.appendChild(vs(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Qe({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=qi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=at.sanitize(`${i.message}`),ii[u]={ok:!1,sentence:s}):o&&(c.innerHTML=at.sanitize(o.text),ii[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{pn("Translated")}}async function fv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(ii),n=[],r=[];for(let a of e){let i=ii[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete ii[a],u.appendChild(vs(t,a)),r.push(i.sentence))}}}try{await Qe({sentences:r},t,(a,i,o)=>{let s=o.id,u=qi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=at.sanitize(`${a.message}`),ii[s]={ok:!1,sentence:o}):i&&(l.innerHTML=at.sanitize(i.text),ii[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{pn("Translated")}}function wm(){pn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var Dm={};async function hv(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return Nn(n),n}async function bv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(Dm),n=[];for(let r of e){let a=Dm[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);o&&o.remove(),n.push(a)}}try{zs(),await vc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}function Tv(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+bt);for(let a of r)a.remove()}pn("Original")}async function yv(t){pn("Translating");let e=gs(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;po(u,t);let l=u.body;if(!l)continue;let c=an(t);c.isModifyImage=!1,Kr({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=Tr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=ac(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Hg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),Dm[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await vc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}d();var or=!1,Pc,vv=!1,Lc=null;function xv(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){z.debug("exclude url for input");return}if(Lc===!1){z.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};wn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;tt().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();Pc&&self.removeEventListener("keydown",Pc),Pc=u,self.addEventListener("keydown",Pc);function u(c){if(or||Lc===!1)return;let p=c,g=p.target||p.srcElement,m=g?.tagName;(g?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(jk(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&_k()&&(o=0,Lk(c,t,i))}Hk(t)}function Ev({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function _c(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var ho;function Cv(t){let e=t.parentElement;if(!e)return;ho=document.createElement("div"),ho.className=Q+"-input",ho.innerHTML=`
`,e.appendChild(ho);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function wv(){ho&&ho.remove()}async function Pk(t){if(!or)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=_c(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=Ev(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=_c(C,i.codeAlias),!c){z.warn("not found alias",C);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};wn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;tt().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;or=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=Dv(u,i),g=await Ie({text:p,pageLangs:["en"]});z.debug("translateContent",p,g);let m={text:p||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!m.text||m.text.length>5e3)return;Cv(o),Je(Su,Date.now());try{let b=await ya(m,{...t,translationService:t.inputTranslationService});kv(t),Av(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:h}))}}finally{or=!1}}catch(e){throw or=!1,e}finally{or=!1,wv()}}async function Lk(t,e,n){if(!or)try{let p=function(){s=e.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=_c(m,n.codeAlias),i=o.slice(m.length+1)):i=o},g=function(){s="";let m=Ev(n),f=o.split(m);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=_c(T,n.codeAlias),!s){z.warn("not found alias",T);return}},r=document.activeElement;or=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(g(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=Dv(i,n),l=await Ie({text:u,pageLangs:["en"]});z.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!vv){vv=!0;let m=await Wk(e);if(t.target&&t.target.focus(),m==="open_settings"){Yi(!0,"#input");return}else if(m==="open_learn_more"){Qi("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(Lc=!1,m==="disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="disable_once"){let f=await mn();f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(Lc=!1,m==="close_disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="enable"){let f=await mn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="close_enable"){let f=await mn();f.enableInputTranslation=!0,await gn(f)}}Cv(r),Je(Su,Date.now());try{let m=await ya(c,{...e,translationService:e.inputTranslationService});kv(e),Av(e,r,a+m.text)}catch(m){if(m instanceof $){let f=m.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:f}))}}finally{or=!1}}catch(r){throw or=!1,r}finally{or=!1,wv()}}function _k(){let t=document.activeElement;if(!t)return!1;if(Fc(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` `).reverse()[0].trim(),i=n<=e;return z.debug("cursorPosition",e,"textLength",n),z.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let e=window.getSelection();if(!e)return z.debug("No active selection found."),!1;if(e.rangeCount>0){let n=e.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=Fk(r,t);z.debug("Current text node:",r.textContent),z.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=t.innerText?.split(` -`).reverse(),s=it()?o[0]||o[1]:o[0];return z.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else z.debug("Cursor is not within a text node.")}}return!1}function Fk(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function Dv(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function Mk(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function Sv(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function Bk(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function Ik(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function Rk(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function Ok(t,e){Fc(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var zk=[Bk.bind(null,["plain"])];function Nk(t){let e;Fc(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function Fc(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function Uk(t){if(Fc(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function Av(t,e,n){await Uk(e),await Aa(50);let r=t.rule.inputConfig,a=Mk(n,e);try{r?.clearContentEnable&&Nk(e),await Aa(50),r?.execCommandDeleteEnable&&!Wn()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),z.debug("clearContent",Da(e))}catch(i){z.error(i)}for(let i of[...zk,Rk,Ok,Ik]){await i(a,e);let o=qk();if(!o)return;if(z.debug("setContent",i.name,Sv(a,o),Da(o),a),Sv(a,o))break}}function qk(){return document.activeElement}function kv(t){lt("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function jk(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function Hk(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Su,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{Kk()},100),new Promise(p=>{let g=p;if(o){let k=o.shadowRoot;if(!k)return;s=k.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),I=s.querySelector(`.${i}`),F=s.querySelector(`.${a}`)}else{let k=document.createElement("div");k.setAttribute("translate","no"),k.className="no-translate immersive-translate-error-modal-input-shadow-root",k.id=e,k.style.all="initial",k.style.zIndex="2147483647",document.body.appendChild(k);let v=k.attachShadow({mode:"open"}),I=document.createElement("style"),F=Me();I.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(I),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let L=document.createElement("div");L.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(L);let U=document.createElement("span");U.textContent="\xD7",U.className=Q+"-close",L.appendChild(U),u=document.createElement("div"),u.className=r+" notranslate",L.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",L.appendChild(c),l=document.createElement("div"),l.className=i,L.appendChild(l),v.appendChild(s),U.onclick=function(){B(),p("close")},v.addEventListener("click",N=>{N.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",_);let m=kt.bind(null,t);u.innerHTML=`
${nc} ${m("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=m("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=rt.sanitize(m("disableInputTranslationTips",{option:`${m("option")}`,learnMore:`${m("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:m("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:m("disableOnce")},{id:"disable-global",value:"global",text:m("disableGlobal")}];for(let k=0;kl===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:Gk,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=km(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=km(s.denyUrls)),s?.allowUrls&&(u.allowUrls=km(s.allowUrls)),u.release=`${n}@${e}`,$a.init(u),Bc()}catch{}}async function Bc(){try{let t=await Mt.get(Ft,null);if(!Ws||!t)return;$a.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function Lv(t,e){try{if(!Ws)return;$a.setContext(t,e)}catch{}}function _v(t){try{if(!Ws)return;$a.setTags(t)}catch{}}function km(t){return t.map(e=>new RegExp(e))}var fe=null,Ic={},To,Fv=!1;async function ov(){$i.clearStrictTicks();let t=await Ke(Ae(),{}),e=await Es();if(z.debug("init page ctx",t),Rv(t),t.rule.pageType=="subtitleBuilder"){wm();return}if(t.rule.pageType=="ebookBuilder"){hv();return}if(To||(To=t.state.translationTheme),t.rule.urlChangeDelay&&await Dr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await r8(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=$l(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){z.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&BT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){fn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&wt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let m=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(m)try{let h=m.split(".")[0],C=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${C}-${D}-27`),B=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}Fv||(Fv=!0,Je()&&t.rule.useIframePostMessage&&await aT());let n=t.sourceLanguage;n==="auto"?n=await Mv():Nn(n);let r=o1(t,n);if(r&&(t=await Ke(Ae(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await n1(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=Wd(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){z.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(z.debug(`detect page language: ${t.url} ${n}`),ua(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||GT(n,t.config.translationLanguagePattern)&&(o=!0,z.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&Lo(e)&&yo(t,window),o)fe.state.isAutoTranslate=!0,fn(fe);else if(z.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(ua(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(Ic[t.translationService]||(Ic[t.translationService]=!0,Je()||Lg(t).catch(s=>{z.warn("init translation engine error",s)})))}}async function Lm(t){if($e()==="Original"){let e={};To&&(e.translationTheme=To),fe&&(e={...fe.state,...e});let n=await Ke(Ae(),e);if(t?.trigger=="right_menu"&&Hr(n?.rule)){let r=ga(n.rule);Zi(!0,r||Ae());return}await fn(fe,t)}else($e()==="Translated"||$e()==="Error")&&oi()}async function Vk(){if(fe=await Ke(Ae(),{}),fe.rule.pageType=="ebookBuilder")return bv(fe);if(fe.rule.pageType=="subtitleBuilder")return fv(fe);zv()}async function _m(t){if($e()==="Original"){fe=await Ke(Ae(),{}),To||(To=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await Ke(Ae(),{translationTheme:e}),await fn(fe,t)}else if($e()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=e1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=Ki(i,yi,!0);a==="mask"||a==="opacity"?o!=="none"?ut(i,yi,"none",!0):ut(i,yi,e,!0):o!=="mask"&&o!=="opacity"?ut(i,yi,e,!0):ut(i,yi,"none",!0)}}}async function Mv(){let t=await Ke(Ae(),{});return t.rule.pageType=="subtitleBuilder"?wm():Ov(t)}function $k(t){$e()==="Original"?Pv(t):si()}function Yk(t){$e()==="Original"?mv(t):Dm()}function Qk(t){$e()==="Original"?bo(t):si()}async function oi(){Ji(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await Ke(Ae(),{});if(t.rule.pageType=="subtitleBuilder"){Dm();return}else t.rule.pageType=="ebookBuilder"&&Tv();si()}async function fn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&Mc(t.config?.sentryConfig);let n=$e(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};Lv("translatePage",r),_v(r),n!=="Original"&&await oi(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),Ic[t.translationService]||(Ic[t.translationService]=!0,Je()||Lg(t).catch(i=>{z.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),lt("translage_page_daily",[{name:"translage_page_daily",params:a}],t),lt("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:yt()}),t.rule.pageType=="subtitleBuilder"){Yk(t),Ji("yes");return}if(t.rule.pageType=="ebookBuilder"){yv(t),Ji("yes");return}if(t.rule.pageType==="pdfReader"){$k(t),Ji("yes");return}Qk(t),Ji("yes")}async function Zk(t,e){let n=fe?.translationService;if($e()==="Original"||n!=t){fe=await Ke(Ae(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);Sc({text:r}),await fn(fe,e)}else{oi();let r=await qn(),a={url:Ae(),config:r,state:{}},i=await Un(a);fe=await Ke(Ae(),{translationService:i.translationService})}}async function Jk(t){$e()==="Original"?await Pm(t):($e()==="Translated"||$e()==="Error")&&(fe=await Ke(Ae(),{}),fe.state.translationArea!=="main"?await Pm(t):oi())}async function Pm(t){fe=await Ke(Ae(),{translationArea:"main"}),await fn(fe,t)}async function Bv(t){fe=await Ke(Ae(),{translationArea:"body"}),await fn(fe,t)}async function Fm(t){let e=await Ke(Ae(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await Ke(Ae(),{translationMode:n}),$e()==="Original"){fn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function xm(t){if(fe=await Ke(Ae(),{translationMode:t}),lt("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),$e()==="Original"){fn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function Xk(t){if($e()==="Original")await Bv(t);else if($e()==="Translated"||$e()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await Ke(Ae(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await Ke(Ae(),fe.state),await fn(fe,t)):oi()}}async function Iv(t){fe=await Ke(Ae(),{translationStartMode:"immediate"}),await fn(fe,t)}async function e8(t){$e()==="Original"?await Iv(t):($e()==="Translated"||$e()==="Error")&&oi()}function t8(){return fe}async function Ke(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await Un(r)}else{let r=await qn(),a=e;n.length===0&&(a=void 0),fe=await Un({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function n8(){let t=await mn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await gn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?Sc({text:kt(fe,"videoSubtitlePreTranslationOn")}):Sc({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Tm(){let t=await qn(),e=await Es(),n;fe&&fe.state&&(n=fe.state);let r={url:Ae(),config:t,state:n},a=await Un(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,Mm(fe);let i=Ks(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{rv(a,s),Lo(e)&&yo(a,s),xv(a)}),a}function r8(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function sv(t){let e=t.detail,n=mn();await Fy(e.token,n,gn),Mt.set(Ft,e);let r=await Mt.get(Bd,!1);Mt.set(Bd,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),Bc()}function uv(t){z.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),Bc()}async function lv(t){let e=await mn();if(e.translationService)return;let n=t.config.translationService,r=await Em(t,n);if(t.translationService!==r){if(!r){fs([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,gn(e),t.translationService=r,fs([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function cv(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await mn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),gn(i)}async function Em(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await ET(r,t)}async function dv(t){let e=await mn();e.translationService=t,await gn(e);let n=await Ke(Ae(),{});n.translationService=t,await fn(n)}G1({detectCurrentPageLanguage:Mv,ensureSwitchTranslationMode:Fm,restorePage:oi,retryFailedParagraphs:Vk,switchTranslationMode:xm,toggleTranslatePage:Lm,toggleTranslateTheMainPage:Jk,toggleTranslateTheWholePage:Xk,toggleTranslationMask:_m,toggleVideoSubtitlePreTranslation:n8,translatePage:fn,translatePageWithTranslationService:Zk,translateTheMainPage:Pm,translateTheWholePage:Bv,translateToThePageEndImmediately:Iv,toggleTranslateToThePageEndImmediately:e8,updateGlobalContext:Tm,getPureGlobalContext:t8});d();d();function Rc({parent:t,ctx:e,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||Q+n.name;t.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&An(l,a),t.appendChild(u),$r(w(eo,{lang:e.config.interfaceLanguage,fallbackLang:"zh-CN",translations:Ot,children:w(n,{...r})}),l)}d();d();d();function vo(t){return ka(t).subtitles}function ka(t){let e=[],n=t.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Gm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`${n}`,r},q8=t=>/]*>[\s\S]*]*>/.test(t),g9=Wt({name:p9,build:U8,detect:q8,helper:Gm,parse:N8});d();var j8="srt",Ys={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},H8=(t,e)=>{let n=[],r=e.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${e.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Gm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`
${n}`,r},q8=t=>/]*>[\s\S]*]*>/.test(t),g9=Kt({name:p9,build:U8,detect:q8,helper:Gm,parse:N8});d();var j8="srt",Ys={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},H8=(t,e)=>{let n=[],r=e.eol||`\r `,a=t.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Ys.toMilliseconds(s[2]),u.end=Ys.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}e.verbose}return n},W8=(t,e)=>{let n="",r=e.eol||`\r -`;for(let a=0;a ${Ys.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},K8=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),m9=Wt({name:j8,build:W8,detect:K8,helper:Ys,parse:H8});d();var G8="sub",Vm=25,V8=(t,e)=>{e.fps||=Vm;let n=e.fps>0?e.fps:Vm,r=[],a=e.eol||`\r +`;for(let a=0;a ${Ys.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},K8=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),m9=Kt({name:j8,build:W8,detect:K8,helper:Ys,parse:H8});d();var G8="sub",Vm=25,V8=(t,e)=>{e.fps||=Vm;let n=e.fps>0?e.fps:Vm,r=[],a=e.eol||`\r `,i=t.split(/\r?\n/g);for(let o=0;o{let n=(e.fps||0)>0?e.fps:Vm,r="",a=e.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Y8=t=>/^\{\d+\}\{\d+\}.*/.test(t),f9=Wt({name:G8,build:$8,detect:Y8,parse:V8});d();var Q8="vtt",Qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Z8=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Qs.toMilliseconds(s[2]),l.end=Qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},J8=(t,e)=>{let n=e.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},X8=t=>/^\s*WEBVTT\r?\n/.test(t),h9=Wt({name:Q8,build:J8,detect:X8,helper:Qs,parse:Z8});var e7={vtt:h9,lrc:c9,smi:g9,ssa:s9,ass:u9,sub:f9,srt:m9,sbv:d9,json:l9},b9=e7;var t7=t=>JSON.parse(JSON.stringify(t)),$m=class{format=b9;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` -`),pageLangs:[ft(),"en"]});if(ot(Te(o),this.ctx.targetLanguage))return null;je(this.ctx,Te(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),Zs.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};d();var rd=class extends He{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` -`),pageLangs:[ft(),"en"]});return ot(Te(o),this.ctx.targetLanguage)?null:(je(this.ctx,Te(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),Te(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var ad=class extends He{hasSubtitle=!1;async mutationVideoChange(){let e=n7(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(je(this.ctx,"ja","av"),this.hasSubtitle=!0,Gr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await de({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Zs.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){z.error("fetchSubtitle",n);return}}};function n7(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var r7={youtube:jc,netflix:Hc,webvtt:xo,khanacademy:Wc,bilibili:Kc,udemy:Gc,hulu:Xc,text_track:La,text_track_dynamic:Co,general:Vc,live:Eo,ebutt:Qc,disneyplus:Zc,"fmp4.xml":Jc,multi_attach_vtt:ed,twitter:td,subsrt:nd,xml:rd,av:ad},id;function Rv(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=r7[e.type];if(!n)return;id=new n(t)}catch(e){z.error(e)}}async function Ym(){id?.onPageStatusChange()}async function a7(t,e){if(id?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&Je())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),lt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function i7(){id?.onTranslationModeChanged()}$1({autoEnableSubtitleChanged:a7,reloadSubtitleWithTranslationModeChanged:i7});var pe=null;function Ks(){return pe||null}function bo(t){o7(t),g7(t),c7(t),p7(t),po(document,t),pn("Translated"),d7(pe),l7(pe),HT(si),s7(pe),Ym(),S7()}function o7(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=an(t);IT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}lo(t)&&ut(document.documentElement,me+"_rtl",t.targetLanguage)}function s7(t){WT(t)}function u7(){KT()}function l7(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=LT(t.ctx);if(z.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&ei(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{ei(i,t)})}async function c7(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Jt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Ht({...e,tempTranslationUrlMatches:[...i]})}}function d7(t){t.ctx.rule.isTranslateTitle&&(zg(t.ctx),t.titleDynamicObserver=RT(t.ctx))}function p7(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function Mm(t){if(!pe)return;let e=an(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function g7(t){let e=ps();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],Mm(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||y7(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||v7(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||h7(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||b7(pe),pe.injectCssToDocument=od,pe.walkContainer=Kr,pe.allInlineWindows=[window],window.onerror=f7(pe,t),window.immersiveTranslateSwitchTranslateState=Zm.bind(pe)}function x9(t,e){e.getRootNode()instanceof ShadowRoot?od(e.getRootNode(),t):od(e.ownerDocument,t),m7(t)}function m7(t){pe||(pe={},pe.ctx=t,pe.id=ps(),Qm(pe,t))}function Qm(t,e){t.paragraphQueue=[],t.injectCssToDocument=od;let n=an(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=Zm.bind(t),t}function si(t=!0){pe&&(pn("Original"),Ym(),u7(),Os(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),OT(pe.ctx),J3(),X3(),t&&Zm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function f7(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),si(),n=setTimeout(()=>{bo(e)},t.urlChangeDelay||2e3)),!0}}function h7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(jg(t,r.target),n.unobserve(r.target))})})}function b7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Hg(t,o)}),n.unobserve(a)}})})}var y9;function T7(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(y9),t.translateState=="original"?!1:(si(t.urlChangeDelay>20),y9=setTimeout(()=>{let a=t.ctx;bo(a)},t.urlChangeDelay),!0)):!1}function y7(t){let e=t.ctx.rule,n=an(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&T7(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!xn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&xn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(wu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&v9(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&$g(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&v9(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=ji(n,i.parentElement);u&&(dt.clearToParentMark(i,u),S9(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Kt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+bt])?!1:i.contains(u)).length&&S9(t,a.target)}catch(i){z.error(i)}}})}function v9(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Kt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Vg(n),Kr({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{ti(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function S9(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;dt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{ei(e,t,n),i.timer=null},a)}function Vg(t){t.paragraphs=[],dt.clearMark(t),t.querySelectorAll("."+bt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,dt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function $g(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Kt(n,["."+bt]))).length==0}function v7(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Rg(i)||(n.unobserve(r.target),dt.clearMark(a),ei(a,t))}})}function Zm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Rs(e,t)}),t=="original"&&document.querySelectorAll(`.${bt}`).forEach(e=>e.remove())}function od(t,e){if(t instanceof HTMLIFrameElement){po(t.contentDocument,e);return}po(t,e)}async function Ov(t){let e=Je(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Cp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Wi(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ft(),"en"]}))}else if(e)n=await Ie({text:Wi(t.mainFrame).slice(0,1e3),pageLangs:[ft(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Cp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await Z1();return n==="auto"&&(n=await jT()),S1(n),n}async function zv(){if(!pe)return;Os(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);i&&i.remove()}}yc.call(pe,pe.ctx)}async function Cm(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),lt("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:yt()});let r=pe?.ctx||e,a=await Jt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?i1():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{p+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Y8=t=>/^\{\d+\}\{\d+\}.*/.test(t),f9=Kt({name:G8,build:$8,detect:Y8,parse:V8});d();var Q8="vtt",Qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Z8=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Qs.toMilliseconds(s[2]),l.end=Qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},J8=(t,e)=>{let n=e.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},X8=t=>/^\s*WEBVTT\r?\n/.test(t),h9=Kt({name:Q8,build:J8,detect:X8,helper:Qs,parse:Z8});var e7={vtt:h9,lrc:c9,smi:g9,ssa:s9,ass:u9,sub:f9,srt:m9,sbv:d9,json:l9},b9=e7;var t7=t=>JSON.parse(JSON.stringify(t)),$m=class{format=b9;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` +`),pageLangs:[ft(),"en"]});if(et(be(o),this.ctx.targetLanguage))return null;qe(this.ctx,be(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),Zs.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};d();var nd=class extends He{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` +`),pageLangs:[ft(),"en"]});return et(be(o),this.ctx.targetLanguage)?null:(qe(this.ctx,be(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),be(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var rd=class extends He{hasSubtitle=!1;async mutationVideoChange(){let e=n7(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,Gr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await de({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Zs.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){z.error("fetchSubtitle",n);return}}};function n7(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var r7={youtube:qc,netflix:jc,webvtt:Eo,khanacademy:Hc,bilibili:Wc,udemy:Kc,hulu:Jc,text_track:La,text_track_dynamic:wo,general:Gc,live:Co,ebutt:Yc,disneyplus:Qc,"fmp4.xml":Zc,multi_attach_vtt:Xc,twitter:ed,subsrt:td,xml:nd,av:rd},ad;function Rv(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=r7[e.type];if(!n)return;ad=new n(t)}catch(e){z.error(e)}}async function Ym(){ad?.onPageStatusChange()}async function a7(t,e){if(ad?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&Xe())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),lt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function i7(){ad?.onTranslationModeChanged()}$1({autoEnableSubtitleChanged:a7,reloadSubtitleWithTranslationModeChanged:i7});var pe=null;function Gs(){return pe||null}function bo(t){o7(t),g7(t),c7(t),p7(t),po(document,t),pn("Translated"),d7(pe),l7(pe),HT(si),s7(pe),Ym(),S7()}function o7(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=an(t);IT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}lo(t)&&ut(document.documentElement,me+"_rtl",t.targetLanguage)}function s7(t){WT(t)}function u7(){KT()}function l7(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=LT(t.ctx);if(z.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&ei(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{ei(i,t)})}async function c7(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Jt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Wt({...e,tempTranslationUrlMatches:[...i]})}}function d7(t){t.ctx.rule.isTranslateTitle&&(Og(t.ctx),t.titleDynamicObserver=RT(t.ctx))}function p7(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function Fm(t){if(!pe)return;let e=an(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function g7(t){let e=gs();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],Fm(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||y7(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||v7(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||h7(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||b7(pe),pe.injectCssToDocument=id,pe.walkContainer=Kr,pe.allInlineWindows=[window],window.onerror=f7(pe,t),window.immersiveTranslateSwitchTranslateState=Zm.bind(pe)}function x9(t,e){e.getRootNode()instanceof ShadowRoot?id(e.getRootNode(),t):id(e.ownerDocument,t),m7(t)}function m7(t){pe||(pe={},pe.ctx=t,pe.id=gs(),Qm(pe,t))}function Qm(t,e){t.paragraphQueue=[],t.injectCssToDocument=id;let n=an(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=Zm.bind(t),t}function si(t=!0){pe&&(pn("Original"),Ym(),u7(),zs(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),OT(pe.ctx),J3(),X3(),t&&Zm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function f7(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),si(),n=setTimeout(()=>{bo(e)},t.urlChangeDelay||2e3)),!0}}function h7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(qg(t,r.target),n.unobserve(r.target))})})}function b7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{jg(t,o)}),n.unobserve(a)}})})}var y9;function T7(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(y9),t.translateState=="original"?!1:(si(t.urlChangeDelay>20),y9=setTimeout(()=>{let a=t.ctx;bo(a)},t.urlChangeDelay),!0)):!1}function y7(t){let e=t.ctx.rule,n=an(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&T7(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!xn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&xn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(wu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&v9(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&Vg(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&v9(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=ji(n,i.parentElement);u&&(dt.clearToParentMark(i,u),S9(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Gt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+bt])?!1:i.contains(u)).length&&S9(t,a.target)}catch(i){z.error(i)}}})}function v9(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Gt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Gg(n),Kr({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{ti(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function S9(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;dt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{ei(e,t,n),i.timer=null},a)}function Gg(t){t.paragraphs=[],dt.clearMark(t),t.querySelectorAll("."+bt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,dt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function Vg(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Gt(n,["."+bt]))).length==0}function v7(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Ig(i)||(n.unobserve(r.target),dt.clearMark(a),ei(a,t))}})}function Zm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Os(e,t)}),t=="original"&&document.querySelectorAll(`.${bt}`).forEach(e=>e.remove())}function id(t,e){if(t instanceof HTMLIFrameElement){po(t.contentDocument,e);return}po(t,e)}async function Ov(t){let e=Xe(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Ep(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Wi(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ft(),"en"]}))}else if(e)n=await Ie({text:Wi(t.mainFrame).slice(0,1e3),pageLangs:[ft(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Ep(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await Z1();return n==="auto"&&(n=await jT()),S1(n),n}async function zv(){if(!pe)return;zs(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);i&&i.remove()}}yc.call(pe,pe.ctx)}async function Em(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),lt("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:yt()});let r=pe?.ctx||e,a=await Jt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?i1():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{p+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Ht(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Qi(f)}catch(m){z.error(m)}}async function pv(){let t=await Jt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Mh,{detail:JSON.stringify(t.draft)}))}async function S7(){try{if(await Pl("reportActive"))return;z.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Tp();await de({url:Oo+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),bs("reportActive","1")}catch(t){z.error(t)}}var x7=new AbortController,{signal:E7}=x7,sd=0,ud=0,wo=!1,ci,E9=0,_a=[];function yo(t,e){C7();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(z.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(z.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(_o,s),_a.push(()=>{document.removeEventListener(_o,s)});let u=Vn(g=>{if(!(Math.abs(g.clientX-sd)+Math.abs(g.clientY-ud)<=3)&&(sd=g.clientX,ud=g.clientY,o||wo&&!ci)){let m=A9(n.rule,e);if(m){if(tf(m))return;ef(n,!1,m)}}},o?700:300),l=g=>{let m=g.target;tf(m)||ef(n,!0)},c=g=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=yn.getPressedKeyCodes();if(f.length>1&&yn[m]&&(E9=Date.now(),wo=!1),f.length===1&&yn[m]){let T=Date.now();wo=!0,ci&&clearTimeout(ci),ci=setTimeout(()=>{let b=E9-T;b>0&&b<=i?wo=!1:l(g),ci=void 0},i)}};if(_a.push(()=>{ci&&clearTimeout(ci)}),a)return;Jm("mousemove",u,e),_a.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():wo=!1}if(Jm("blur",p,e),_a.push(()=>{e.removeEventListener("blur",p)}),!o){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=e4;Jm("keyup",C9,e),_a.push(()=>{e.removeEventListener("keyup",C9)}),m.includes(g)?yn("*","mouseHover",c):yn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),yn.setScope("mouseHover"),_a.push(()=>{yn.deleteScope("mouseHover")})}}function C7(){_a.forEach(t=>t()),_a=[],yn.setScope("all")}function C9(t){wo=!1}function Jm(t,e,n=window){return n.addEventListener(t,e,{signal:E7})}function ef(t,e,n,r=window){if(n=n||A9(t.rule,r),!n){z.debug("can not find selection part!");return}if(D7(n,e))return;if(tf(n)){z.debug("exclude dom");return}x9(t,n);let i=Ks();i&&(i.setupMouseHoverListener=yo);let o=an(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=Qm({...i},t);Kr({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{ti(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Ze(Ih,p),lt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function A9(t,e){return w7(sd,ud,t,e)}function w7(t,e,n,r){let a=b1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=T1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:D9(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){z.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{k7(r)}),!0}function A7(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function k7(t){let e=Ks();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Rs(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function Xm(t){return!!(t.host&&t.mode)}function w9(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||Xm(n))return t;for(;n&&n.nodeName!=="BODY"&&!Xm(n)&&xp(n,e);){let r=n.parentNode;if(r&&Xm(r))break;n=r}return n}function D9(t,e){return t.nodeType===Node.TEXT_NODE||xp(t,e)?w9(t,e):t}function k9(t,e){sd=e.clientX,ud=e.clientY,ef(t,!0)}var Js=[];function nf(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Js.push(()=>{document.removeEventListener("click",i)})}function P9(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Js.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function ld(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Js.push(()=>{document.removeEventListener("touchstart",r)})}var rf={touchShortcutsOff:()=>{},"multipleClick.2":nf,"multipleClick.3":nf,"multipleClick.4":nf,"slide.left":P9,"slide.right":P9,"fingers.2":ld,"fingers.3":ld,"fingers.4":ld,"fingers.5":ld};async function gv(t){try{B7();let e=await qr(),n=Jh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=P7(t,e,r.command),i=rf[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{M7(r.command,t,u)})})}catch(e){z.error(e)}}function P7(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var L7=()=>{Lm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},_7=()=>{Fm();let t=new CustomEvent(wr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},F7=()=>{_m();let t=new CustomEvent(wr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},L9=0,M7=(t,e,n)=>{new Date().getTime()-L9<200||(L9=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?L7():t==="touchShortcutsToggleTranslationMask"?F7():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?_7():t==="touchShortcutsToggleTranslateTouchElement"&&k9(e,n))};function B7(){Js.forEach(t=>{t()}),Js=[]}function _9(t){let{t:e}=xe(),{ctx:n,setSettings:r}=t,a=I7(t);return Lo(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Ro[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(R7,{...t})}function I7({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=xe(),a=Ne(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ne(()=>Ro.filter(s=>!(s==="Off"||Ro.includes(a)&&s==="OtherCustom")),[t,a]);return Ne(()=>i.map(s=>{let u=r("mouseHoldKey",{key:tc(s)}),l=Ro.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(g=>{let m={...g.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=p.value),{...g,generalRule:m}})}}}),[i,a])}function R7(t){let{ctx:e,setSettings:n}=t,{t:r}=xe(),a=e.config.generalRule,i=Object.keys(rf).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(g=>{let m={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=p.value),{...g,generalRule:m}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let g=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function F9(t){let{isAlwaysTranslateLang:e}=O7({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=xe();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:fa(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:bl(t.currentLang,u.matches),excludeMatches:bl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=hl(t.currentLang,u[i]),u[o]=bl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function O7({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var M9=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),B9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),I9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),R9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),O9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),z9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),N9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function q9({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=xe(),a=Me(),i=Math.round((Ni.supportedVideoSubtitleSites||[]).length/10),o=Ne(()=>[{title:r("widget.translateFile"),icon:M9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:B9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:I9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(u4)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(Ca,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(U9,{...s})}):w(U9,{...s}))})}function U9(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function js(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=re(""),[l,c]=re(i),[p,g]=re(null),[m,f]=re(null);Ce(()=>{Mt.get(Ft,null).then(C=>{C?(g(C),f(Zt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let T=!0,b=it();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=ml(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(b2,{isLogin:!!p,isProUser:!!m,config:n}),w(H7,{openSharePage:r})]}),w(CT,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(wT,{isProUser:!!m,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(N7,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(q7,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(qp,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(kT,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(_9,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(F9,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(z7,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(q9,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(U7,{...t,isProUser:!!m,isShowPricing:T,setMessage:u})]})}function z7(t){let{t:e}=xe(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ne(()=>!n.rule.subtitleRule.disabled&&Md.includes(n.rule.subtitleRule.type||""),[n,Md])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function N7(t){let{t:e}=xe(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(Ca,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?O9:z9})})}function U7(t){let{t:e,lang:n}=xe(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[R9,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(j7,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(Up,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(vi),t.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?t.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?t.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):m.value==="options"?(t.openOptionsPage(),t.onClose()):m.value==="changeToTranslateTheWholePage"?p():m.value==="changeToTranslateTheMainPage"?g():m.value==="about"?t.openAboutPage():m.value==="toggleEnabled"?t.onToggleEnabled():m.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&t.onOpenUrl(vi,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),t.openOptionsPage()}function c(m){t.setSettings(f=>({...f,translationMode:m})),t.onSwitchTranslationMode(m)}function p(){t.setSettings(m=>({...m,translationArea:"body"})),t.onTranslateTheWholePage()}function g(){t.setSettings(m=>({...m,translationArea:"main"})),t.onTranslateTheMainPage()}}function q7({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=xe(),l=r.config,c=Ne(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Hr(r?.rule)&&!p&&(p=!0);let g=s("translate");e==="Translated"||e==="Error"?g=s("show-original"):e==="Original"?p?Wn()&&c.protocol==="file:"||o?g=s("translate-firefox-local-pdf"):ye()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(e);let m=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Tu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${tc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:g})}function j7({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=xe(),o=Sn();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:c2(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function H7(t){let{t:e}=xe();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),N9]})}function of(){let[t,e]=re("Original"),n=qe(""),{t:r}=xe(),[a,i,o,s]=rr(()=>{setTimeout(()=>{yr("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(null),[g,m]=re(null),[f,T]=re("auto"),[b,h]=re(null),C=qe(!1),D=qe(),[M,B]=re({}),[{errorMsg:S,disableButton:y,noPermissionPDF:_},k]=re({errorMsg:"",disableButton:!1,noPermissionPDF:!1});if(Ce(()=>{et().any&&B({width:"100%"}),Mc()},[]),Ce(()=>{Xt().then(A=>l(A))},[a]),Ce(()=>{if(!(!c||!u)){if(C.current&&D.current){D.current.getAsyncContextString().then(A=>{if(A){let E=JSON.parse(A);h(E)}});return}Un({url:c,config:u}).then(A=>{C.current||h(A)})}},[c,u,C,D]),Ce(()=>(v(),()=>{globalThis.document.removeEventListener(Mo,L)}),[]),!u||!b)return null;return w(qs,{children:w(js,{type:"popup",style:M,onClose:H9,onToggleTranslate:yr("toggleTranslatePage"),onToggleEnabled:N,openOptionsPage:Q7,openAboutPage:Y7,openSharePage:V7,onTranslatePdf:()=>{U(n.current||c||"")},onTranslateTheMainPage:yr("translateTheMainPage"),onTranslateTheWholePage:yr("translateTheWholePage"),onTranslateToThePageEndImmediately:yr("translateToThePageEndImmediately"),onSwitchTranslationMode:A=>{yr("switchTranslationMode",!0,{mode:A})()},onTranslatePage:yr("translatePage"),onRestorePage:yr("restorePage",!1),onSetPageLanguage:q,setSettings:i,config:u,pageStatus:t,ctx:b,currentUrl:c,currentLang:f,onSetLocalConfig:Ht,onSetBuildinConfig:kl,request:Ur,errorMsg:S,disabledButton:y,noPermissionPDF:_,onAutoEnableSubtitleChanged:yr("autoEnableSubtitleChanged"),onOpenUrl:$7})});async function v(){let A=Cs(),E=await oe.tabs.query({currentWindow:!0,active:!0}),P=E[0].id;m(P);let O=j9(P,A);D.current=O;let H=E[0].url;if(I(P),globalThis.document.addEventListener(Mo,L),!H){p("about:newtab");return}p(H),Zl(H)?(F(O,P,H),W9(P,async()=>{let j=await O.getContextString(),W=await O.getPageStatus(),V=await Xt(),se=await O.getCurrentPageLanguage();if(e(W),l(V),T(se),j){let X=JSON.parse(j);if(X){if(h(X),C.current=!0,Hr(X.rule)){let Z=await O.getPdfWebUrl();n.current=Z}}else z.error("contextStr is empty",j)}se==="auto"&&setTimeout(async()=>{let X=await O.getCurrentPageLanguage();T(X)},500)})):Bp(H||"")?K7(H||"")&&W7(H||"").then(j=>{j||k({disableButton:!1,noPermissionPDF:!0,errorMsg:r("noLocalFilePermissionForPDF")})}):k({disableButton:!0,errorMsg:r("noPermissionForThisPage"),noPermissionPDF:!1})}function I(A){oe.tabs.onUpdated.addListener((E,P,O)=>{A===E&&O.url&&p(O.url)})}function F(A,E,P){A.ping().then(O=>{k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E)}).catch(O=>{s2(P)||k({disableButton:!0,errorMsg:r("reloadCurrentPage"),noPermissionPDF:!1}),z.debug("ping failed, but it is ok. cause maybe content is not injected",O)})}function L(A){let{tabId:E,payload:P}=A.detail,{method:O,data:H}=P;z.debug("popup received message",O,H||" "),O==="setPageStatus"?E&&e(H):O==="ready"&&E&&(k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E))}function U(A){A&&(oe.tabs.create({url:d4(A)}),globalThis.close())}function N(){i(A=>({...A,enabled:!A.enabled})),setTimeout(()=>{H9()},50)}function q(A){let E=Cs();if(T(A),g&&c){let P=pu(c,A,u.sourceLanguageUrlPattern);i(O=>({...O,sourceLanguageUrlPattern:P})),W9(g,()=>{j9(g,E).setCurrentPageLanguageByClient(A)})}}}function yr(t,e=!0,n={}){return async()=>{let r=Cs(),i=(await oe.tabs.query({currentWindow:!0,active:!0}))[0].id,o={trigger:"popup",...n};r.sendMessage(`content_script:main:${i}`,{method:t,data:o}),e&&setTimeout(()=>{globalThis.close()},10)}}async function W7(t){try{let e=new URL(t),n=await fetch(e.href);return!0}catch{return!1}}function K7(t){try{return new URL(t).protocol==="file:"}catch{return!1}}var G7={setCurrentPageLanguageByClient:t=>Promise.resolve(),ping:t=>Promise.resolve(),getPageStatus:t=>Promise.resolve(),getCurrentPageLanguage:t=>Promise.resolve(),getContextString:t=>Promise.resolve(),getAsyncContextString:t=>Promise.resolve(),getPdfWebUrl:()=>Promise.resolve("")};function j9(t,e){function n(a,i){let o=`content_script:main_sync:${t}`;return a.includes("Async")&&(o=`content_script:main:${t}`),e.sendMessage(o,{method:a,data:i})}let r={...G7};return Object.keys(r).forEach(a=>{r[a]=n.bind(null,a)}),r}var V7=()=>{yr("shareToDraft")()};function $7(t,e){let n=t;e&&(n=`${t}?utm_source=extension&utm_medium=extension&utm_campaign=${e}`),oe.tabs.create({url:n}),setTimeout(()=>{globalThis.close()},50)}function Y7(){oe.tabs.create({url:oe.runtime.getURL("options.html#about")}),setTimeout(()=>{globalThis.close()},50)}function H9(){globalThis.close()}function Q7(t=""){let e=oe.runtime.getURL("options.html");oe.tabs.create({url:e+t}),setTimeout(()=>{globalThis.close()},50)}var di={},af={};function W9(t,e){if(af[t])try{e()}catch(n){z.error("run callback failed",n)}else di[t]||(di[t]=[]),di[t].push(e)}function K9(t){if(di[t]&&di[t].length){let e=[...di[t]];di[t]=[],e.forEach(n=>n())}}var G9=document.getElementById("mount");l2();G9&&(async()=>{let t=await Xt();t.debug&&z.setLevel("debug"),$r(w(eo,{lang:t.interfaceLanguage,translations:rc,fallbackLang:"en",children:w(of,{})}),G9)})();})(); + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Wt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Qi(f)}catch(m){z.error(m)}}async function pv(){let t=await Jt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Mh,{detail:JSON.stringify(t.draft)}))}async function S7(){try{if(await Pl("reportActive"))return;z.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await bp();await de({url:zo+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),Ts("reportActive","1")}catch(t){z.error(t)}}var x7=new AbortController,{signal:E7}=x7,od=0,sd=0,Do=!1,ci,E9=0,_a=[];function yo(t,e){C7();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(z.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(z.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(Fo,s),_a.push(()=>{document.removeEventListener(Fo,s)});let u=Vn(g=>{if(!(Math.abs(g.clientX-od)+Math.abs(g.clientY-sd)<=3)&&(od=g.clientX,sd=g.clientY,o||Do&&!ci)){let m=A9(n.rule,e);if(m){if(tf(m))return;ef(n,!1,m)}}},o?700:300),l=g=>{let m=g.target;tf(m)||ef(n,!0)},c=g=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=yn.getPressedKeyCodes();if(f.length>1&&yn[m]&&(E9=Date.now(),Do=!1),f.length===1&&yn[m]){let T=Date.now();Do=!0,ci&&clearTimeout(ci),ci=setTimeout(()=>{let b=E9-T;b>0&&b<=i?Do=!1:l(g),ci=void 0},i)}};if(_a.push(()=>{ci&&clearTimeout(ci)}),a)return;Jm("mousemove",u,e),_a.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():Do=!1}if(Jm("blur",p,e),_a.push(()=>{e.removeEventListener("blur",p)}),!o){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=e4;Jm("keyup",C9,e),_a.push(()=>{e.removeEventListener("keyup",C9)}),m.includes(g)?yn("*","mouseHover",c):yn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),yn.setScope("mouseHover"),_a.push(()=>{yn.deleteScope("mouseHover")})}}function C7(){_a.forEach(t=>t()),_a=[],yn.setScope("all")}function C9(t){Do=!1}function Jm(t,e,n=window){return n.addEventListener(t,e,{signal:E7})}function ef(t,e,n,r=window){if(n=n||A9(t.rule,r),!n){z.debug("can not find selection part!");return}if(D7(n,e))return;if(tf(n)){z.debug("exclude dom");return}x9(t,n);let i=Gs();i&&(i.setupMouseHoverListener=yo);let o=an(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=Qm({...i},t);Kr({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{ti(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Je(Ih,p),lt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function A9(t,e){return w7(od,sd,t,e)}function w7(t,e,n,r){let a=b1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=T1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:D9(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){z.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{k7(r)}),!0}function A7(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function k7(t){let e=Gs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Os(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function Xm(t){return!!(t.host&&t.mode)}function w9(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||Xm(n))return t;for(;n&&n.nodeName!=="BODY"&&!Xm(n)&&Sp(n,e);){let r=n.parentNode;if(r&&Xm(r))break;n=r}return n}function D9(t,e){return t.nodeType===Node.TEXT_NODE||Sp(t,e)?w9(t,e):t}function k9(t,e){od=e.clientX,sd=e.clientY,ef(t,!0)}var Js=[];function nf(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Js.push(()=>{document.removeEventListener("click",i)})}function P9(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Js.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function ud(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Js.push(()=>{document.removeEventListener("touchstart",r)})}var rf={touchShortcutsOff:()=>{},"multipleClick.2":nf,"multipleClick.3":nf,"multipleClick.4":nf,"slide.left":P9,"slide.right":P9,"fingers.2":ud,"fingers.3":ud,"fingers.4":ud,"fingers.5":ud};async function gv(t){try{B7();let e=await qr(),n=Jh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=P7(t,e,r.command),i=rf[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{M7(r.command,t,u)})})}catch(e){z.error(e)}}function P7(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var L7=()=>{Pm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},_7=()=>{_m();let t=new CustomEvent(wr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},F7=()=>{Lm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},L9=0,M7=(t,e,n)=>{new Date().getTime()-L9<200||(L9=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?L7():t==="touchShortcutsToggleTranslationMask"?F7():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?_7():t==="touchShortcutsToggleTranslateTouchElement"&&k9(e,n))};function B7(){Js.forEach(t=>{t()}),Js=[]}function _9(t){let{t:e}=xe(),{ctx:n,setSettings:r}=t,a=I7(t);return _o(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Oo[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(R7,{...t})}function I7({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=xe(),a=Ne(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ne(()=>Oo.filter(s=>!(s==="Off"||Oo.includes(a)&&s==="OtherCustom")),[t,a]);return Ne(()=>i.map(s=>{let u=r("mouseHoldKey",{key:tc(s)}),l=Oo.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(g=>{let m={...g.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=p.value),{...g,generalRule:m}})}}}),[i,a])}function R7(t){let{ctx:e,setSettings:n}=t,{t:r}=xe(),a=e.config.generalRule,i=Object.keys(rf).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(g=>{let m={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=p.value),{...g,generalRule:m}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let g=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function F9(t){let{isAlwaysTranslateLang:e}=O7({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=xe();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:fa(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:bl(t.currentLang,u.matches),excludeMatches:bl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=hl(t.currentLang,u[i]),u[o]=bl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function O7({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var M9=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),B9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),I9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),R9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),O9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),z9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),N9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function q9({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=xe(),a=Me(),i=Math.round((Ni.supportedVideoSubtitleSites||[]).length/10),o=Ne(()=>[{title:r("widget.translateFile"),icon:M9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:B9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:I9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(u4)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(Ca,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(U9,{...s})}):w(U9,{...s}))})}function U9(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function Hs(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=re(""),[l,c]=re(i),[p,g]=re(null),[m,f]=re(null);Ce(()=>{Mt.get(Ft,null).then(C=>{C?(g(C),f(Zt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let T=!0,b=ot();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=ml(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(b2,{isLogin:!!p,isProUser:!!m,config:n}),w(H7,{openSharePage:r})]}),w(CT,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(wT,{isProUser:!!m,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(N7,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(q7,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(Up,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(kT,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(_9,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(F9,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(z7,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(q9,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(U7,{...t,isProUser:!!m,isShowPricing:T,setMessage:u})]})}function z7(t){let{t:e}=xe(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ne(()=>!n.rule.subtitleRule.disabled&&Fd.includes(n.rule.subtitleRule.type||""),[n,Fd])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function N7(t){let{t:e}=xe(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(Ca,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?O9:z9})})}function U7(t){let{t:e,lang:n}=xe(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[R9,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(j7,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(Np,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(vi),t.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?t.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?t.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):m.value==="options"?(t.openOptionsPage(),t.onClose()):m.value==="changeToTranslateTheWholePage"?p():m.value==="changeToTranslateTheMainPage"?g():m.value==="about"?t.openAboutPage():m.value==="toggleEnabled"?t.onToggleEnabled():m.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&t.onOpenUrl(vi,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),t.openOptionsPage()}function c(m){t.setSettings(f=>({...f,translationMode:m})),t.onSwitchTranslationMode(m)}function p(){t.setSettings(m=>({...m,translationArea:"body"})),t.onTranslateTheWholePage()}function g(){t.setSettings(m=>({...m,translationArea:"main"})),t.onTranslateTheMainPage()}}function q7({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=xe(),l=r.config,c=Ne(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Hr(r?.rule)&&!p&&(p=!0);let g=s("translate");e==="Translated"||e==="Error"?g=s("show-original"):e==="Original"?p?Wn()&&c.protocol==="file:"||o?g=s("translate-firefox-local-pdf"):ye()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(e);let m=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Tu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${tc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:g})}function j7({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=xe(),o=Sn();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:c2(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function H7(t){let{t:e}=xe();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),N9]})}function of(){let[t,e]=re("Original"),n=je(""),{t:r}=xe(),[a,i,o,s]=rr(()=>{setTimeout(()=>{yr("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(null),[g,m]=re(null),[f,T]=re("auto"),[b,h]=re(null),C=je(!1),D=je(),[M,B]=re({}),[{errorMsg:S,disableButton:y,noPermissionPDF:_},k]=re({errorMsg:"",disableButton:!1,noPermissionPDF:!1});if(Ce(()=>{tt().any&&B({width:"100%"}),Mc()},[]),Ce(()=>{Xt().then(A=>l(A))},[a]),Ce(()=>{if(!(!c||!u)){if(C.current&&D.current){D.current.getAsyncContextString().then(A=>{if(A){let E=JSON.parse(A);h(E)}});return}Un({url:c,config:u}).then(A=>{C.current||h(A)})}},[c,u,C,D]),Ce(()=>(v(),()=>{globalThis.document.removeEventListener(Bo,L)}),[]),!u||!b)return null;return w(js,{children:w(Hs,{type:"popup",style:M,onClose:H9,onToggleTranslate:yr("toggleTranslatePage"),onToggleEnabled:N,openOptionsPage:Q7,openAboutPage:Y7,openSharePage:V7,onTranslatePdf:()=>{U(n.current||c||"")},onTranslateTheMainPage:yr("translateTheMainPage"),onTranslateTheWholePage:yr("translateTheWholePage"),onTranslateToThePageEndImmediately:yr("translateToThePageEndImmediately"),onSwitchTranslationMode:A=>{yr("switchTranslationMode",!0,{mode:A})()},onTranslatePage:yr("translatePage"),onRestorePage:yr("restorePage",!1),onSetPageLanguage:q,setSettings:i,config:u,pageStatus:t,ctx:b,currentUrl:c,currentLang:f,onSetLocalConfig:Wt,onSetBuildinConfig:kl,request:Ur,errorMsg:S,disabledButton:y,noPermissionPDF:_,onAutoEnableSubtitleChanged:yr("autoEnableSubtitleChanged"),onOpenUrl:$7})});async function v(){let A=ws(),E=await oe.tabs.query({currentWindow:!0,active:!0}),P=E[0].id;m(P);let O=j9(P,A);D.current=O;let H=E[0].url;if(I(P),globalThis.document.addEventListener(Bo,L),!H){p("about:newtab");return}p(H),Zl(H)?(F(O,P,H),W9(P,async()=>{let j=await O.getContextString(),W=await O.getPageStatus(),V=await Xt(),se=await O.getCurrentPageLanguage();if(e(W),l(V),T(se),j){let X=JSON.parse(j);if(X){if(h(X),C.current=!0,Hr(X.rule)){let Z=await O.getPdfWebUrl();n.current=Z}}else z.error("contextStr is empty",j)}se==="auto"&&setTimeout(async()=>{let X=await O.getCurrentPageLanguage();T(X)},500)})):Mp(H||"")?K7(H||"")&&W7(H||"").then(j=>{j||k({disableButton:!1,noPermissionPDF:!0,errorMsg:r("noLocalFilePermissionForPDF")})}):k({disableButton:!0,errorMsg:r("noPermissionForThisPage"),noPermissionPDF:!1})}function I(A){oe.tabs.onUpdated.addListener((E,P,O)=>{A===E&&O.url&&p(O.url)})}function F(A,E,P){A.ping().then(O=>{k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E)}).catch(O=>{s2(P)||k({disableButton:!0,errorMsg:r("reloadCurrentPage"),noPermissionPDF:!1}),z.debug("ping failed, but it is ok. cause maybe content is not injected",O)})}function L(A){let{tabId:E,payload:P}=A.detail,{method:O,data:H}=P;z.debug("popup received message",O,H||" "),O==="setPageStatus"?E&&e(H):O==="ready"&&E&&(k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E))}function U(A){A&&(oe.tabs.create({url:d4(A)}),globalThis.close())}function N(){i(A=>({...A,enabled:!A.enabled})),setTimeout(()=>{H9()},50)}function q(A){let E=ws();if(T(A),g&&c){let P=pu(c,A,u.sourceLanguageUrlPattern);i(O=>({...O,sourceLanguageUrlPattern:P})),W9(g,()=>{j9(g,E).setCurrentPageLanguageByClient(A)})}}}function yr(t,e=!0,n={}){return async()=>{let r=ws(),i=(await oe.tabs.query({currentWindow:!0,active:!0}))[0].id,o={trigger:"popup",...n};r.sendMessage(`content_script:main:${i}`,{method:t,data:o}),e&&setTimeout(()=>{globalThis.close()},10)}}async function W7(t){try{let e=new URL(t),n=await fetch(e.href);return!0}catch{return!1}}function K7(t){try{return new URL(t).protocol==="file:"}catch{return!1}}var G7={setCurrentPageLanguageByClient:t=>Promise.resolve(),ping:t=>Promise.resolve(),getPageStatus:t=>Promise.resolve(),getCurrentPageLanguage:t=>Promise.resolve(),getContextString:t=>Promise.resolve(),getAsyncContextString:t=>Promise.resolve(),getPdfWebUrl:()=>Promise.resolve("")};function j9(t,e){function n(a,i){let o=`content_script:main_sync:${t}`;return a.includes("Async")&&(o=`content_script:main:${t}`),e.sendMessage(o,{method:a,data:i})}let r={...G7};return Object.keys(r).forEach(a=>{r[a]=n.bind(null,a)}),r}var V7=()=>{yr("shareToDraft")()};function $7(t,e){let n=t;e&&(n=`${t}?utm_source=extension&utm_medium=extension&utm_campaign=${e}`),oe.tabs.create({url:n}),setTimeout(()=>{globalThis.close()},50)}function Y7(){oe.tabs.create({url:oe.runtime.getURL("options.html#about")}),setTimeout(()=>{globalThis.close()},50)}function H9(){globalThis.close()}function Q7(t=""){let e=oe.runtime.getURL("options.html");oe.tabs.create({url:e+t}),setTimeout(()=>{globalThis.close()},50)}var di={},af={};function W9(t,e){if(af[t])try{e()}catch(n){z.error("run callback failed",n)}else di[t]||(di[t]=[]),di[t].push(e)}function K9(t){if(di[t]&&di[t].length){let e=[...di[t]];di[t]=[],e.forEach(n=>n())}}var G9=document.getElementById("mount");l2();G9&&(async()=>{let t=await Xt();t.debug&&z.setLevel("debug"),$r(w(eo,{lang:t.interfaceLanguage,translations:rc,fallbackLang:"en",children:w(of,{})}),G9)})();})(); /*! Bundled license information: bowser/src/bowser.js: diff --git a/dist/firefox/background.js b/dist/firefox/background.js index 5ec8de9..e74ec23 100644 --- a/dist/firefox/background.js +++ b/dist/firefox/background.js @@ -1,4 +1,4 @@ -(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var lc=Object.defineProperty;var ma=(t,e)=>{for(var r in e)lc(t,r,{get:e[r],enumerable:!0})};var m={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -5165,7 +5165,7 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda {{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Rg,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...jl,{type:"password",name:"apikey",required:!0}],props:jl},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},RD={type:W+"ChildFrameToRootFrameIdentifier"};var ND=ut()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general";var ir="user_info",qD=ut()||jt()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",Ql=ut()||jt()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",UD=Ql+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",jD=Ql+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",qg=ut()||jt()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Bi=ut()||jt()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",Ug=ut()||jt()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",jg=ut()||jt()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",Kg=ut()||jt()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",KD=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",WD=Ug+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",HD=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Yl=Bi+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Xl=jg+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Zl=Kg+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Jl=qg+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true";var eu=pe().TRANSLATE_FILE_URL,GD=eu+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",VD=eu+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var kr=console,Fi=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let r=performance.now(),a=Math.round(r-this.#e),n=Xe.green;a>1e4?n=Xe.red:a>1e3&&(n=Xe.yellow),kr.debug(Xe.dim(nr+" TIMING:"),e,"in",n(a+"ms")),this.#e=r}},ra=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&kr.log(Xe.dim(nr+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&kr.log(Xe.green(nr+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&kr.warn(Xe.yellow(nr+" WARN:"),...e)}error(...e){this.#e<=3&&kr.error(Xe.red(nr+" ERROR:"),...e)}fatal(...e){this.#e<=4&&kr.error(Xe.red(nr+" FATAL:"),...e)}timing(){return this.level===0?new Fi:{reset:()=>{},stop:()=>{}}}},q=new ra;function Kt(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let r=ta.map(n=>n.toLowerCase()),a=r.indexOf(e);if(a===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let n=r.indexOf(e);return n===-1?"auto":ta[n]}else return"auto";else return ta[a]}function zi(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}var Oi="DENO",Xa="CHROME",Za="FIREFOX";function tu(t){let e=Xa;try{let r=navigator?.userAgent||"";/firefox/i.test(r)||typeof InstallTrigger<"u"?e=Za:/deno/i.test(r)&&(e=Oi)}catch{}return t===Xa&&e===Xa||t===Za&&e===Za||t===Oi&&e===Oi}function Mi(){return tu(Xa)}function ru(){return typeof Deno<"u"}function aa(){return tu(Za)}function au(){return Ut()?"monkey":Mi()?"chrome":aa()?"firefox":Ct()?"safari":null}var nu={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},iu={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:nu,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:nu,query:()=>{},sendMessage:()=>{}}};var T;ru()?T=iu:T=globalThis.immersiveTranslateBrowserAPI;var ou=W+"SyncStoreKey_";function Pt(t,e){let r=ou+t;return T.storage.sync.get(r).then(a=>a[r]===void 0?e:a[r])}function Wt(t,e){let r=ou+t;return T.storage.sync.set({[r]:e})}var Wg=W+"StoreKey_";function na(t,e){let r=Wg+t;return T.storage.local.get(r).then(a=>a[r]===void 0?e:a[r])}var or=W+"CacheKey_";function Hg(t,e){let r=or+t;return T.storage.local.get(r).then(a=>a[r]===void 0?e:a[r])}function Gg(){let t=T.storage.local.refresh;t&&t()}function Vg(t,e){let r=or+t;return T.storage.local.get(r).then(a=>{if(a[r]===void 0)return e;let{value:n,expired:i}=a[r];return i&&ia.startsWith(or)).filter(a=>a!==or+ir);if(r.length>0)return T.storage.local.remove(r)}}var ia={get:Hg,set:Qg,getExpired:Vg,setExpired:$g,remove:Yg,clear:Xg,refresh:Gg};function Zg(t,e){let r=t;return e&&Object.keys(e).forEach(a=>{let n=e[a];if(n===void 0)return;let i=Jg(a);if(typeof n=="object"||i){let o=n;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let l=`<${a}>`,s=r.indexOf(l);if(s!==-1){let u=o.tag||"a",c=r.indexOf(``);if(c!==-1){let d=r.substring(s+l.length,c),h=Object.keys(o).filter(b=>b!=="tag").map(b=>`${b}="${o[b]}"`).join(" ");r=r.replace(`${l}${d}`,`<${u} ${h}>${d}`)}}}else if(n){let o=new RegExp("{"+a+"}","gm");r=r.replace(o,n.toString())}}),r}function su(t,e,r){let a=t[e];if(!a)return r;if(!r)return"";let n=r.split("."),i="";do{i+=n.shift();let o=a[i];o!==void 0&&(typeof o=="object"||!n.length)?(a=o,i=""):n.length?i+=".":a=r}while(n.length);return a}function Ri(t,e,r,a,n){if(!t.hasOwnProperty(r))return e;let i=su(t,r,e);return i===e&&r!==a&&(i=su(t,a,e)),Zg(i,n)}function Jg(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function Ht(t,e,r){return Ri(_t,e,t.config.interfaceLanguage,"en",r)}function lu(t,e){let r=new Date(t),a=r.getFullYear().toString(),n=(r.getMonth()+1).toString().padStart(2,"0"),i=r.getDate().toString().padStart(2,"0"),o=r.getHours().toString().padStart(2,"0"),l=r.getMinutes().toString().padStart(2,"0"),s=r.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",a).replace("MM",n).replace("DD",i).replace("HH",o).replace("mm",l).replace("ss",s)}function uu(t){return new Date(t).getTime()}var Gt=class extends Error{status;constructor(e,r){if(e&&r){super(r),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let r=null;if(r=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!r){let a=Ht.bind(null,e),n=this.getErrorMsg();r={type:"error",title:a("networkError"),errMsg:a("error.serveUnavailable",{serverName:a("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+a("errorReason",{message:n}),action:"changeService"}}return r}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let r=Ht.bind(null,e),a=this.message.startsWith("bingAuth"),n=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(a||n)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let r=Ht.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:r("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+r("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let r=Ht.bind(null,e),a="retry",n="network",i=r("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${r("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${r("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${r("error.openAIExceededQuota")}

${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${r("error.gemini.429")}

${o}`:o=`${r("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${r("error.claude.403")}

${o}`:o=`${r("error.403")}

${o}`:this.status===400?o=`${r("error.400")}

${o}`:this.status===502?o=`${r("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${r("error.subscriptionExpired")}

${o}`,a="setting",n="configError",i=r("error.subscriptionExpiredTitle")),{type:n,title:i,errMsg:o,action:a}}handleFetchError(e){let r=Ht.bind(null,e);if(this.status!==-999)return;let a=this.getErrorMsg();return{type:"network",title:"",errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}handleProUser(e){let r=Ht.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:r("upgradeToProErrorTitle"),errMsg:r("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let r=Ht.bind(null,e);this.message=this.message.replace("ProQuota:","");let a=this.message;try{a=JSON.parse(this.message).error}catch{}let n=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:l,subscriptionTo:s}=n;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let d=this.data?.translationService=="deepl"?"OpenAI":"Deepl",h=this.data?.translationService=="deepl"?"Deepl":"OpenAI",b=r("errorReason",{message:a});if(i=="onetime_7day")b+=r("proQuotaExceededError.onetime7day",{anotherService:d,brandId:Se,href:Yl});else{let E="";h=="OpenAI"?E=Xl:E=Zl,o?b+=r("proQuotaExceededError.trial",{anotherService:d,brandId:Se,href:Jl}):b+=r("proQuotaExceededError.nonTrial",{anotherService:d,brandId:Se,href:E,translationService:h}),!o&&(n.cancelAtPeriodEnd==="false"||uu(s)>l)&&(b+=r("proQuotaExceededError.resetTime",{resetTime:lu(l,"YYYY-MM-DD HH:mm:ss")}))}return b}}};async function Ja(t){let e;if(t&&t.retry&&t.retry>0)try{e=await vn(cu.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(r){throw r&&r.name==="RetryError"&&r.cause?r.cause:r}else e=await cu(t);return e}async function cu(t){t.body;let{url:e,responseType:r,...a}=t;r||(r="json"),a={mode:"cors",...a};let n=!0;t.fetchPolyfill&&(n=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),n){let s=new AbortController,u=s.signal;setTimeout(()=>{s.abort()},o),a.signal=u}let l;try{l=await i(e,a)}catch(s){q.debug("fetch error",e,s);let u=s.message||"Unknown Error";throw new Gt("fetchError",u).initNetWork(-999).initStack(s.stack)}if(l.ok&&l.status>=200&&l.status<400){if(r==="json")return await l.json();if(r==="text")return await l.text();if(r==="raw"){let s=await l.text(),u=Object.fromEntries([...l.headers.entries()]),c=l.url;return c||(l.headers.get("X-Final-URL")?c=l.headers.get("X-Final-URL"):c=e),{body:s,headers:u,status:l.status,statusText:l.statusText,url:c}}else if(r==="stream"){let s="",u;if(l.body&&l.body instanceof ReadableStream)for await(let c of eh(l.body)){let d=new TextDecoder().decode(c);s+=d;let h;for(;(h=s.indexOf(` -`))>=0;){let b=s.slice(0,h).trim();if(s=s.slice(h+1),b.startsWith("event:")||b==="")continue;let E="";if(b.startsWith("data:")&&(E=b.slice(5).trim()),E==="[DONE]")break;let ne;try{ne=JSON.parse(E??"")}catch(V){q.debug("json error",V);continue}u=ne}}return u}}else{let s;try{s=await l.text()}catch(b){q.error("parse response failed",b)}s&&q.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,h=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),h&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new Gt("fetchError",c).initNetWork(l.status)}}async function*eh(t){let e=t.getReader();try{for(;;){let{done:r,value:a}=await e.read();if(r)return;yield a}}finally{e.releaseLock()}}var th=new Map;function du(t){let e=rh(64),r=new CustomEvent(Hl,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((a,n)=>{th.set(e,(i,o)=>{i?n(i):a(o)})})}function rh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var nh="";function Er(){return nh||pu.version}function mu(){try{let t=[pe().EBOOK_BUILDER_URL,pe().EBOOK_VIEWER_URL,pe().SUBTITLE_BUILDER_URL,pe().HTML_VIEWER_URL,pe().PDF_VIEWER_URL].filter(n=>!!n),e=["app.immersivetranslate.com"];ut()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(n=>{let i=new URL(n);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var oa=new Map,sr=class{fromType;logger;constructor(e,r=!1){this.logger=new ra,r&&this.logger.setLevel("debug"),this.fromType=e,oa.has(e)||(oa.set(e,new Map),T.runtime.onMessage.addListener((a,n,i)=>{let o=a.from,l=a.to,s,u,c;n.tab&&n.tab.id&&(s=n.tab.id,o=`${o}:${s}`,u=n.tab.url,c=n.tab.active),this.logger.debug(`${a.to} received message [${a.payload.method}] from ${a.from}`,a.payload.data?a.payload.data:" ");let d=qi(l),{type:h,name:b}=d;if(h!==e)return!1;let E=qi(o),V=oa.get(h).get(b);if(!V)return this.logger.debug(`no message handler for ${h}:${l}, but it's ok`),!1;let{messageHandler:f,sync:me}=V,z={type:e,name:E.name,id:s,url:u,active:c};if(me){try{let J=f(a.payload,z);i({ok:!0,data:J})}catch(J){i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.details,errorStatus:J.status})}return!1}else return f(a.payload,z).then(J=>{i({ok:!0,data:J})}).catch(J=>{i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.message,errorStatus:J.status})}),!0}))}getConnection(e,r,a){let n=!1;a&&a.sync&&(n=!0);let i=this.fromType,o=oa.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Ni(`${i}:${e}`,this.logger);return oa.get(i).set(e,{messageHandler:r,sync:n,connectionInstance:l}),l}}},Ni=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let a=qi(e),{type:n,id:i}=a;if(n!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await T.runtime.sendMessage(o);return gu(o,l,this.logger)}catch(l){if(n==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await T.tabs.sendMessage(i,o);return gu(o,l,this.logger)}}};function gu(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new Gt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new Gt("noResponse","Unknown error")}function qi(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let a=parseInt(e[2]);if(!isNaN(a))r.id=a;else throw new Error("tab id not a valid number")}return r}var ih="";function Ui(){return ih||globalThis.navigator.userAgent}function hu(){return Ui().includes("ImtFxiOS")}function oh(){return Ui().includes("ImtFxAndroid")}function ji(){let t=Ui();if(hu()||oh()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),a=r[0];return r[2]&&(a+="_"+r[2]),{name:a,version:r[1]}}}return null}var en;function sh(){return en||(en=new sr("content_script",!1).getConnection("pure_main",()=>{}),en)}var fu="G-MKMD9LWFTR";async function Tu(t){try{let e=pe(),r=e.INSTALL_FROM==="firefox_store";if(ji()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let n=Ut(),i=mu(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Pt("fakeUserId","");s||(s=await na("fakeUserId",""),s&&await Wt("fakeUserId",s));let u=Er(),c=new Date,d=await Pt("installedAt","");d||(d=await na("installedAt",""),d&&await Wt("installedAt",d)),s?d||(d=new Date(0).toISOString(),await Wt("installedAt",d)):(s=lh(32),await Wt("fakeUserId",s)),d||(d=c.toISOString(),await Wt("installedAt",d));let h=new Date(d),b=bu(h),E=bu(c),ne=b===E,V=c.getTime()-h.getTime()<7*24*60*60*1e3,f=`https://www.google-analytics.com/mp/collect?measurement_id=${fu}&api_secret=${l}`;o||(f=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${fu}&api_secret=${l}`);let me="";typeof navigator<"u"&&(me=window.navigator.userAgent);let z=ya.parse(me),J=t.map(C=>{let g=C.params||{};if(z.os&&(g.os_name=z.os.name||"unknown",g.os_version=z.os.version||"unknown",g.os_version_name=z.os.versionName||"unknown"),z.browser){g.browser_name=z.browser.name||"unknown",g.browser_version=z.browser.version||"unknown";let S=ji();S&&(g.browser_name=S.name,g.browser_version=S.version)}return z.platform&&(g.platform_type=z.platform.type||"unknown"),z.engine&&(g.engine_name=z.engine.name||"unknown",g.engine_version=z.engine.version||"unknown"),u&&(g.version=u),e.INSTALL_FROM&&(g.install_from=e.INSTALL_FROM),b&&(g.install_day=uh(h)),g.userscript=n.toString(),ne?g.is_new_user_today="1":g.is_new_user_today="0",V?g.is_new_user_this_week="1":g.is_new_user_this_week="0",i?g.main_frame=0:g.main_frame=1,{...C,params:g}}),ue=await dh({responseType:"text",url:f,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:J})})}catch{}}function lh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} +`))>=0;){let b=s.slice(0,h).trim();if(s=s.slice(h+1),b.startsWith("event:")||b==="")continue;let E="";if(b.startsWith("data:")&&(E=b.slice(5).trim()),E==="[DONE]")break;let ne;try{ne=JSON.parse(E??"")}catch(V){q.debug("json error",V);continue}u=ne}}return u}}else{let s;try{s=await l.text()}catch(b){q.error("parse response failed",b)}s&&q.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,h=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),h&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new Gt("fetchError",c).initNetWork(l.status)}}async function*eh(t){let e=t.getReader();try{for(;;){let{done:r,value:a}=await e.read();if(r)return;yield a}}finally{e.releaseLock()}}var th=new Map;function du(t){let e=rh(64),r=new CustomEvent(Hl,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((a,n)=>{th.set(e,(i,o)=>{i?n(i):a(o)})})}function rh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var nh="";function Er(){return nh||pu.version}function mu(){try{let t=[pe().EBOOK_BUILDER_URL,pe().EBOOK_VIEWER_URL,pe().SUBTITLE_BUILDER_URL,pe().HTML_VIEWER_URL,pe().PDF_VIEWER_URL].filter(n=>!!n),e=["app.immersivetranslate.com"];ut()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(n=>{let i=new URL(n);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var oa=new Map,sr=class{fromType;logger;constructor(e,r=!1){this.logger=new ra,r&&this.logger.setLevel("debug"),this.fromType=e,oa.has(e)||(oa.set(e,new Map),T.runtime.onMessage.addListener((a,n,i)=>{let o=a.from,l=a.to,s,u,c;n.tab&&n.tab.id&&(s=n.tab.id,o=`${o}:${s}`,u=n.tab.url,c=n.tab.active),this.logger.debug(`${a.to} received message [${a.payload.method}] from ${a.from}`,a.payload.data?a.payload.data:" ");let d=qi(l),{type:h,name:b}=d;if(h!==e)return!1;let E=qi(o),V=oa.get(h).get(b);if(!V)return this.logger.debug(`no message handler for ${h}:${l}, but it's ok`),!1;let{messageHandler:f,sync:me}=V,z={type:e,name:E.name,id:s,url:u,active:c};if(me){try{let J=f(a.payload,z);i({ok:!0,data:J})}catch(J){i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.details,errorStatus:J.status})}return!1}else return f(a.payload,z).then(J=>{i({ok:!0,data:J})}).catch(J=>{i({ok:!1,errorName:J.name,errorMessage:J.message,errorDetails:J.message,errorStatus:J.status})}),!0}))}getConnection(e,r,a){let n=!1;a&&a.sync&&(n=!0);let i=this.fromType,o=oa.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Ni(`${i}:${e}`,this.logger);return oa.get(i).set(e,{messageHandler:r,sync:n,connectionInstance:l}),l}}},Ni=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let a=qi(e),{type:n,id:i}=a;if(n!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await T.runtime.sendMessage(o);return gu(o,l,this.logger)}catch(l){if(n==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await T.tabs.sendMessage(i,o);return gu(o,l,this.logger)}}};function gu(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new Gt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new Gt("noResponse","Unknown error")}function qi(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let a=parseInt(e[2]);if(!isNaN(a))r.id=a;else throw new Error("tab id not a valid number")}return r}var ih="";function Ui(){return ih||globalThis.navigator.userAgent}function hu(){return Ui().includes("ImtFxiOS")}function oh(){return Ui().includes("ImtFxAndroid")}function ji(){let t=Ui();if(hu()||oh()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),a=r[0];return r[2]&&(a+="_"+r[2]),{name:a,version:r[1]}}}return null}var en;function sh(){return en||(en=new sr("content_script",!1).getConnection("pure_main",()=>{}),en)}var fu="G-MKMD9LWFTR";async function Tu(t){try{let e=pe(),r=e.INSTALL_FROM==="firefox_store";if(ji()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let n=Ut(),i=mu(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Pt("fakeUserId","");s||(s=await na("fakeUserId",""),s&&await Wt("fakeUserId",s));let u=Er(),c=new Date,d=await Pt("installedAt","");d||(d=await na("installedAt",""),d&&await Wt("installedAt",d)),s?d||(d=new Date(0).toISOString(),await Wt("installedAt",d)):(s=lh(32),await Wt("fakeUserId",s)),d||(d=c.toISOString(),await Wt("installedAt",d));let h=new Date(d),b=bu(h),E=bu(c),ne=b===E,V=c.getTime()-h.getTime()<7*24*60*60*1e3,f=`https://www.google-analytics.com/mp/collect?measurement_id=${fu}&api_secret=${l}`;o||(f=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${fu}&api_secret=${l}`);let me="";typeof navigator<"u"&&(me=window.navigator.userAgent);let z=ya.parse(me),J=t.map(C=>{let g=C.params||{};if(z.os&&(g.os_name=z.os.name||"unknown",g.os_version=z.os.version||"unknown",g.os_version_name=z.os.versionName||"unknown"),z.browser){g.browser_name=z.browser.name||"unknown",g.browser_version=z.browser.version||"unknown";let S=ji();S&&(g.browser_name=S.name,g.browser_version=S.version)}return z.platform&&(g.platform_type=z.platform.type||"unknown"),z.engine&&(g.engine_name=z.engine.name||"unknown",g.engine_version=z.engine.version||"unknown"),u&&(g.version=u),e.INSTALL_FROM&&(g.install_from=e.INSTALL_FROM),b&&(g.install_day=uh(h)),g.userscript=n.toString(),ne?g.is_new_user_today="1":g.is_new_user_today="0",V?g.is_new_user_this_week="1":g.is_new_user_this_week="0",i?g.main_frame=0:g.main_frame=1,{...C,params:g}}),ue=await dh({responseType:"text",url:f,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:J})})}catch{}}function lh(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=r.length,n=0;for(;n",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 diff --git a/dist/firefox/content_script.js b/dist/firefox/content_script.js index ca8abc2..29ff44b 100644 --- a/dist/firefox/content_script.js +++ b/dist/firefox/content_script.js @@ -1,4 +1,4 @@ -(()=>{var e6=Object.create;var gd=Object.defineProperty;var t6=Object.getOwnPropertyDescriptor;var n6=Object.getOwnPropertyNames;var r6=Object.getPrototypeOf,a6=Object.prototype.hasOwnProperty;var i6=(t,e)=>()=>(t&&(e=t(t=0)),e);var o6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),eu=(t,e)=>{for(var n in e)gd(t,n,{get:e[n],enumerable:!0})},s6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of n6(e))!a6.call(t,a)&&a!==n&&gd(t,a,{get:()=>e[a],enumerable:!(r=t6(e,a))||r.enumerable});return t};var u6=(t,e,n)=>(n=t!=null?e6(r6(t)):{},s6(e||!t||!t.__esModule?gd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=i6(()=>{x={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var e6=Object.create;var pd=Object.defineProperty;var t6=Object.getOwnPropertyDescriptor;var n6=Object.getOwnPropertyNames;var r6=Object.getPrototypeOf,a6=Object.prototype.hasOwnProperty;var i6=(t,e)=>()=>(t&&(e=t(t=0)),e);var o6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),eu=(t,e)=>{for(var n in e)pd(t,n,{get:e[n],enumerable:!0})},s6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of n6(e))!a6.call(t,a)&&a!==n&&pd(t,a,{get:()=>e[a],enumerable:!(r=t6(e,a))||r.enumerable});return t};var u6=(t,e,n)=>(n=t!=null?e6(r6(t)):{},s6(e||!t||!t.__esModule?pd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=i6(()=>{x={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,7 +4936,7 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var F2=o6((ec,As)=>{d();(function(){var t;function e(f){var T,b,h="",E=-1,D;if(f&&f.length)for(D=f.length;(E+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,E,D,M=[],I;if(T=b=h=E=D=0,f&&f.length)for(I=f.length,f+="";T191&&h<224?(E=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|E&63),T+=2):(E=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(E&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",E,D=0,M=f.length;D>>4&15)+b.charAt(E&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function m(f,T){var b=T.length,h=Array(),E,D,M,I,S,y,L,A;for(y=Array(Math.ceil(f.length/2)),I=y.length,E=0;E0;){for(S=Array(),M=0,E=0;E0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(L="",E=h.length-1;E>=0;E--)L+=T.charAt(h[E]);for(A=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),E=L.length;Ef.length*8?h+=T:h+=b.charAt(I>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(E){var D,M,I,S="";for(T=T||"=",E=h?e(E):E,len=E.length,D=0;Dlen*8?S+=T:S+=f.charAt(I>>>6*(3-M)&63);return S},this.decode=function(E){var D,M,I,S,y,L,A,v,O,_,k="",N=[];if(!E)return E;D=_=0,E=E.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(E.charAt(D++)),L=f.indexOf(E.charAt(D++)),A=f.indexOf(E.charAt(D++)),v=f.indexOf(E.charAt(D++)),O=y<<18|L<<12|A<<6|v,M=O>>16&255,I=O>>8&255,S=O&255,_+=1,A===64?N[_]=String.fromCharCode(M):v===64?N[_]=String.fromCharCode(M,I):N[_]=String.fromCharCode(M,I,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(E(v,h),T)},this.b64=function(v){return g(E(v),b)},this.any=function(v,O){return m(E(v,h),O)},this.raw=function(v){return E(v,h)},this.hex_hmac=function(v,O){return i(D(v,O),T)},this.b64_hmac=function(v,O){return g(D(v,O),b)},this.any_hmac=function(v,O,_){return m(D(v,O),_)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function E(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,O){var _,k,N,z,q;for(v=h?e(v):v,O=h?e(O):O,_=c(v),_.length>16&&(_=M(_,v.length*8)),k=Array(16),N=Array(16),q=0;q<16;q+=1)k[q]=_[q]^909522486,N[q]=_[q]^1549556828;return z=M(k.concat(c(O)),512+O.length*8),l(M(N.concat(z),512+128))}function M(v,O){var _,k,N,z,q,F=1732584193,C=-271733879,P=-1732584194,U=271733878;for(v[O>>5]|=128<>>9<<4)+14]=O,_=0;_16&&(A=M(A,y.length*8)),v=Array(16),O=Array(16),_=0;_<16;_+=1)v[_]=A[_]^909522486,O[_]=A[_]^1549556828;return k=M(v.concat(p(L)),512+L.length*8),u(M(O.concat(k),512+160))}function M(y,L){var A,v,O,_,k,N,z,q,F=Array(80),C=1732584193,P=-271733879,U=-1732584194,H=271733878,j=-1009589776;for(y[L>>5]|=128<<24-L%32,y[(L+64>>9<<4)+15]=L,A=0;A16&&(j=F(j,C.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return U=F(W.concat(p(P)),512+P.length*8),u(F(V.concat(U),512+256))}function I(C,P){return C>>>P|C<<32-P}function S(C,P){return C>>>P}function y(C,P,U){return C&P^~C&U}function L(C,P,U){return C&P^C&U^P&U}function A(C){return I(C,2)^I(C,13)^I(C,22)}function v(C){return I(C,6)^I(C,11)^I(C,25)}function O(C){return I(C,7)^I(C,18)^S(C,3)}function _(C){return I(C,17)^I(C,19)^S(C,10)}function k(C){return I(C,28)^I(C,34)^I(C,39)}function N(C){return I(C,14)^I(C,18)^I(C,41)}function z(C){return I(C,1)^I(C,8)^S(C,7)}function q(C){return I(C,19)^I(C,61)^S(C,6)}E=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function F(C,P){var U=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,ue,ae,J,ie,ge,ee,Y,be,ne;for(C[P>>5]|=128<<24-P%32,C[(P+64>>9<<4)+15]=P,ee=0;ee32&&(C=I(C,N.length*8));F<32;F+=1)P[F]=C[F]^909522486,U[F]=C[F]^1549556828;return q=I(P.concat(p(z)),1024+z.length*8),u(I(U.concat(q),1024+512))}function I(N,z){var q,F,C,P=new Array(80),U=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),ue=new S(0,0),ae=new S(0,0),J=new S(0,0),ie=new S(0,0),ge=new S(0,0),ee=new S(0,0),Y=new S(0,0),be=new S(0,0),ne=new S(0,0),re=new S(0,0),xe=new S(0,0),ze=new S(0,0),_e=new S(0,0),de=new S(0,0);for(E===void 0&&(E=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),F=0;F<80;F+=1)P[F]=new S(0,0);for(N[z>>5]|=128<<24-(z&31),N[(z+128>>10<<5)+31]=z,C=N.length,F=0;F>>q|z.h<<32-q,N.h=z.h>>>q|z.l<<32-q}function A(N,z,q){N.l=z.h>>>q|z.l<<32-q,N.h=z.l>>>q|z.h<<32-q}function v(N,z,q){N.l=z.l>>>q|z.h<<32-q,N.h=z.h>>>q}function O(N,z,q){var F=(z.l&65535)+(q.l&65535),C=(z.l>>>16)+(q.l>>>16)+(F>>>16),P=(z.h&65535)+(q.h&65535)+(C>>>16),U=(z.h>>>16)+(q.h>>>16)+(P>>>16);N.l=F&65535|C<<16,N.h=P&65535|U<<16}function _(N,z,q,F,C){var P=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535),U=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P>>>16),H=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(U>>>16),j=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(H>>>16);N.l=P&65535|U<<16,N.h=H&65535|j<<16}function k(N,z,q,F,C,P){var U=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535)+(P.l&65535),H=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P.l>>>16)+(U>>>16),j=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(P.h&65535)+(H>>>16),W=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(P.h>>>16)+(j>>>16);N.l=U&65535|H<<16,N.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(k){return i(S(k,h))},this.b64=function(k){return g(S(k,h),b)},this.any=function(k,N){return m(S(k,h),N)},this.raw=function(k){return S(k,h)},this.hex_hmac=function(k,N){return i(y(k,N))},this.b64_hmac=function(k,N){return g(y(k,N),b)},this.any_hmac=function(k,N,z){return m(y(k,N),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(k){return typeof k=="boolean"&&(T=k),this},this.setPad=function(k){return typeof k<"u"&&(b=k),this},this.setUTF8=function(k){return typeof k=="boolean"&&(h=k),this};function S(k){return k=h?e(k):k,L(A(c(k),k.length*8))}function y(k,N){k=h?e(k):k,N=h?e(N):N;var z,q,F=c(k),C=Array(16),P=Array(16);for(F.length>16&&(F=A(F,k.length*8)),z=0;z<16;z+=1)C[z]=F[z]^909522486,P[z]=F[z]^1549556828;return q=A(C.concat(c(N)),512+N.length*8),L(A(P.concat(q),512+160))}function L(k){var N,z="",q=k.length*32;for(N=0;N>5]>>>N%32&255);return z}function A(k,N){var z,q,F,C,P=1732584193,U=4023233417,H=2562383102,j=271733878,W=3285377520,V,ue,ae,J,ie,ge,ee,Y,be,ne;for(k[N>>5]|=128<>>9<<4)+14]=N,C=k.length,F=0;Ffunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},f6=(t,e)=>{for(var n in e)fd(t,n,{get:e[n],enumerable:!0})},md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!g6.call(t,a)&&a!==n&&fd(t,a,{get:()=>e[a],enumerable:!(r=d6(e,a))||r.enumerable});return t},h6=(t,e,n)=>(md(t,e,"default"),n&&md(n,e,"default")),yf=(t,e,n)=>(n=t!=null?c6(p6(t)):{},md(e||!t||!t.__esModule?fd(n,"default",{value:t,enumerable:!0}):n,t)),vf=m6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,L=void 0){super(L),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(...L)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||L.length<=1&&y.singleCallbackArg!==!1?S.resolve(L[0]):S.resolve(L)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(A,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((O,_)=>{if(y.fallbackToNoCallback)try{A[S](...v,l({resolve:O,reject:_},y))}catch{A[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,O()}else y.noCallback?(A[S](...v),O()):A[S](...v,l({resolve:O,reject:_},y))})},m=(S,y,L)=>new Proxy(y,{apply(A,v,O){return L.call(v,S,...O)}}),g=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},L={})=>{let A=Object.create(null),v={has(_,k){return k in S||k in A},get(_,k,N){if(k in A)return A[k];if(!(k in S))return;let z=S[k];if(typeof z=="function")if(typeof y[k]=="function")z=m(S,S[k],y[k]);else if(g(L,k)){let q=p(k,L[k]);z=m(S,S[k],q)}else z=z.bind(S);else if(typeof z=="object"&&z!==null&&(g(y,k)||g(L,k)))z=f(z,y[k],L[k]);else if(g(L,"*"))z=f(z,y[k],L["*"]);else return Object.defineProperty(A,k,{configurable:!0,enumerable:!0,get(){return S[k]},set(q){S[k]=q}}),z;return A[k]=z,z},set(_,k,N,z){return k in A?A[k]=N:S[k]=N,!0},defineProperty(_,k,N){return Reflect.defineProperty(A,k,N)},deleteProperty(_,k){return Reflect.deleteProperty(A,k)}},O=Object.create(S);return new Proxy(O,v)},T=S=>({addListener(y,L,...A){y.addListener(S.get(L),...A)},hasListener(y,L){return y.hasListener(S.get(L))},removeListener(y,L){y.removeListener(S.get(L))}}),b=new s(S=>typeof S!="function"?S:function(L){let A=f(L,{},{getContent:{minArgs:0,maxArgs:0}});S(A)}),h=new s(S=>typeof S!="function"?S:function(L,A,v){let O=!1,_,k=new Promise(F=>{_=function(C){O=!0,F(C)}}),N;try{N=S(L,A,_)}catch(F){N=Promise.reject(F)}let z=N!==!0&&u(N);if(N!==!0&&!z&&!O)return!1;let q=F=>{F.then(C=>{v(C)},C=>{let P;C&&(C instanceof Error||typeof C.message=="string")?P=C.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(C=>{})};return q(z?N:k),!0}),E=({reject:S,resolve:y},L)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):L&&L.__mozWebExtensionPolyfillReject__?S(new Error(L.message)):y(L)},D=(S,y,L,...A)=>{if(A.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${A.length}`);return new Promise((v,O)=>{let _=E.bind(null,{resolve:v,reject:O});A.push(_),L.sendMessage(...A)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},I={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":I},services:{"*":I},websites:{"*":I}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};f6(Sf,{default:()=>tu});var b6=yf(vf());h6(Sf,yf(vf()));var{default:bf,...T6}=b6,tu=bf!==void 0?bf:T6;globalThis.immersiveTranslateBrowserAPI=tu;d();d();d();d();var y6=` +`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var F2=o6((ec,ks)=>{d();(function(){var t;function e(f){var T,b,h="",E=-1,D;if(f&&f.length)for(D=f.length;(E+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,E,D,M=[],I;if(T=b=h=E=D=0,f&&f.length)for(I=f.length,f+="";T191&&h<224?(E=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|E&63),T+=2):(E=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(E&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",E,D=0,M=f.length;D>>4&15)+b.charAt(E&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),E=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function m(f,T){var b=T.length,h=Array(),E,D,M,I,S,y,L,A;for(y=Array(Math.ceil(f.length/2)),I=y.length,E=0;E0;){for(S=Array(),M=0,E=0;E0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(L="",E=h.length-1;E>=0;E--)L+=T.charAt(h[E]);for(A=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),E=L.length;Ef.length*8?h+=T:h+=b.charAt(I>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(E){var D,M,I,S="";for(T=T||"=",E=h?e(E):E,len=E.length,D=0;Dlen*8?S+=T:S+=f.charAt(I>>>6*(3-M)&63);return S},this.decode=function(E){var D,M,I,S,y,L,A,v,O,_,k="",N=[];if(!E)return E;D=_=0,E=E.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(E.charAt(D++)),L=f.indexOf(E.charAt(D++)),A=f.indexOf(E.charAt(D++)),v=f.indexOf(E.charAt(D++)),O=y<<18|L<<12|A<<6|v,M=O>>16&255,I=O>>8&255,S=O&255,_+=1,A===64?N[_]=String.fromCharCode(M):v===64?N[_]=String.fromCharCode(M,I):N[_]=String.fromCharCode(M,I,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(E(v,h),T)},this.b64=function(v){return g(E(v),b)},this.any=function(v,O){return m(E(v,h),O)},this.raw=function(v){return E(v,h)},this.hex_hmac=function(v,O){return i(D(v,O),T)},this.b64_hmac=function(v,O){return g(D(v,O),b)},this.any_hmac=function(v,O,_){return m(D(v,O),_)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function E(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,O){var _,k,N,z,q;for(v=h?e(v):v,O=h?e(O):O,_=c(v),_.length>16&&(_=M(_,v.length*8)),k=Array(16),N=Array(16),q=0;q<16;q+=1)k[q]=_[q]^909522486,N[q]=_[q]^1549556828;return z=M(k.concat(c(O)),512+O.length*8),l(M(N.concat(z),512+128))}function M(v,O){var _,k,N,z,q,F=1732584193,C=-271733879,P=-1732584194,U=271733878;for(v[O>>5]|=128<>>9<<4)+14]=O,_=0;_16&&(A=M(A,y.length*8)),v=Array(16),O=Array(16),_=0;_<16;_+=1)v[_]=A[_]^909522486,O[_]=A[_]^1549556828;return k=M(v.concat(p(L)),512+L.length*8),u(M(O.concat(k),512+160))}function M(y,L){var A,v,O,_,k,N,z,q,F=Array(80),C=1732584193,P=-271733879,U=-1732584194,H=271733878,j=-1009589776;for(y[L>>5]|=128<<24-L%32,y[(L+64>>9<<4)+15]=L,A=0;A16&&(j=F(j,C.length*8));H<16;H+=1)W[H]=j[H]^909522486,$[H]=j[H]^1549556828;return U=F(W.concat(p(P)),512+P.length*8),u(F($.concat(U),512+256))}function I(C,P){return C>>>P|C<<32-P}function S(C,P){return C>>>P}function y(C,P,U){return C&P^~C&U}function L(C,P,U){return C&P^C&U^P&U}function A(C){return I(C,2)^I(C,13)^I(C,22)}function v(C){return I(C,6)^I(C,11)^I(C,25)}function O(C){return I(C,7)^I(C,18)^S(C,3)}function _(C){return I(C,17)^I(C,19)^S(C,10)}function k(C){return I(C,28)^I(C,34)^I(C,39)}function N(C){return I(C,14)^I(C,18)^I(C,41)}function z(C){return I(C,1)^I(C,8)^S(C,7)}function q(C){return I(C,19)^I(C,61)^S(C,6)}E=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function F(C,P){var U=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,$,ue,ae,J,ie,ge,ee,Y,Te,ne;for(C[P>>5]|=128<<24-P%32,C[(P+64>>9<<4)+15]=P,ee=0;ee32&&(C=I(C,N.length*8));F<32;F+=1)P[F]=C[F]^909522486,U[F]=C[F]^1549556828;return q=I(P.concat(p(z)),1024+z.length*8),u(I(U.concat(q),1024+512))}function I(N,z){var q,F,C,P=new Array(80),U=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),$=new S(0,0),ue=new S(0,0),ae=new S(0,0),J=new S(0,0),ie=new S(0,0),ge=new S(0,0),ee=new S(0,0),Y=new S(0,0),Te=new S(0,0),ne=new S(0,0),re=new S(0,0),xe=new S(0,0),ze=new S(0,0),_e=new S(0,0),de=new S(0,0);for(E===void 0&&(E=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),F=0;F<80;F+=1)P[F]=new S(0,0);for(N[z>>5]|=128<<24-(z&31),N[(z+128>>10<<5)+31]=z,C=N.length,F=0;F>>q|z.h<<32-q,N.h=z.h>>>q|z.l<<32-q}function A(N,z,q){N.l=z.h>>>q|z.l<<32-q,N.h=z.l>>>q|z.h<<32-q}function v(N,z,q){N.l=z.l>>>q|z.h<<32-q,N.h=z.h>>>q}function O(N,z,q){var F=(z.l&65535)+(q.l&65535),C=(z.l>>>16)+(q.l>>>16)+(F>>>16),P=(z.h&65535)+(q.h&65535)+(C>>>16),U=(z.h>>>16)+(q.h>>>16)+(P>>>16);N.l=F&65535|C<<16,N.h=P&65535|U<<16}function _(N,z,q,F,C){var P=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535),U=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P>>>16),H=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(U>>>16),j=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(H>>>16);N.l=P&65535|U<<16,N.h=H&65535|j<<16}function k(N,z,q,F,C,P){var U=(z.l&65535)+(q.l&65535)+(F.l&65535)+(C.l&65535)+(P.l&65535),H=(z.l>>>16)+(q.l>>>16)+(F.l>>>16)+(C.l>>>16)+(P.l>>>16)+(U>>>16),j=(z.h&65535)+(q.h&65535)+(F.h&65535)+(C.h&65535)+(P.h&65535)+(H>>>16),W=(z.h>>>16)+(q.h>>>16)+(F.h>>>16)+(C.h>>>16)+(P.h>>>16)+(j>>>16);N.l=U&65535|H<<16,N.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(k){return i(S(k,h))},this.b64=function(k){return g(S(k,h),b)},this.any=function(k,N){return m(S(k,h),N)},this.raw=function(k){return S(k,h)},this.hex_hmac=function(k,N){return i(y(k,N))},this.b64_hmac=function(k,N){return g(y(k,N),b)},this.any_hmac=function(k,N,z){return m(y(k,N),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(k){return typeof k=="boolean"&&(T=k),this},this.setPad=function(k){return typeof k<"u"&&(b=k),this},this.setUTF8=function(k){return typeof k=="boolean"&&(h=k),this};function S(k){return k=h?e(k):k,L(A(c(k),k.length*8))}function y(k,N){k=h?e(k):k,N=h?e(N):N;var z,q,F=c(k),C=Array(16),P=Array(16);for(F.length>16&&(F=A(F,k.length*8)),z=0;z<16;z+=1)C[z]=F[z]^909522486,P[z]=F[z]^1549556828;return q=A(C.concat(c(N)),512+N.length*8),L(A(P.concat(q),512+160))}function L(k){var N,z="",q=k.length*32;for(N=0;N>5]>>>N%32&255);return z}function A(k,N){var z,q,F,C,P=1732584193,U=4023233417,H=2562383102,j=271733878,W=3285377520,$,ue,ae,J,ie,ge,ee,Y,Te,ne;for(k[N>>5]|=128<>>9<<4)+14]=N,C=k.length,F=0;Ffunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},f6=(t,e)=>{for(var n in e)md(t,n,{get:e[n],enumerable:!0})},gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!g6.call(t,a)&&a!==n&&md(t,a,{get:()=>e[a],enumerable:!(r=d6(e,a))||r.enumerable});return t},h6=(t,e,n)=>(gd(t,e,"default"),n&&gd(n,e,"default")),yf=(t,e,n)=>(n=t!=null?c6(p6(t)):{},gd(e||!t||!t.__esModule?md(n,"default",{value:t,enumerable:!0}):n,t)),vf=m6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,L=void 0){super(L),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(...L)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||L.length<=1&&y.singleCallbackArg!==!1?S.resolve(L[0]):S.resolve(L)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(A,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((O,_)=>{if(y.fallbackToNoCallback)try{A[S](...v,l({resolve:O,reject:_},y))}catch{A[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,O()}else y.noCallback?(A[S](...v),O()):A[S](...v,l({resolve:O,reject:_},y))})},m=(S,y,L)=>new Proxy(y,{apply(A,v,O){return L.call(v,S,...O)}}),g=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},L={})=>{let A=Object.create(null),v={has(_,k){return k in S||k in A},get(_,k,N){if(k in A)return A[k];if(!(k in S))return;let z=S[k];if(typeof z=="function")if(typeof y[k]=="function")z=m(S,S[k],y[k]);else if(g(L,k)){let q=p(k,L[k]);z=m(S,S[k],q)}else z=z.bind(S);else if(typeof z=="object"&&z!==null&&(g(y,k)||g(L,k)))z=f(z,y[k],L[k]);else if(g(L,"*"))z=f(z,y[k],L["*"]);else return Object.defineProperty(A,k,{configurable:!0,enumerable:!0,get(){return S[k]},set(q){S[k]=q}}),z;return A[k]=z,z},set(_,k,N,z){return k in A?A[k]=N:S[k]=N,!0},defineProperty(_,k,N){return Reflect.defineProperty(A,k,N)},deleteProperty(_,k){return Reflect.deleteProperty(A,k)}},O=Object.create(S);return new Proxy(O,v)},T=S=>({addListener(y,L,...A){y.addListener(S.get(L),...A)},hasListener(y,L){return y.hasListener(S.get(L))},removeListener(y,L){y.removeListener(S.get(L))}}),b=new s(S=>typeof S!="function"?S:function(L){let A=f(L,{},{getContent:{minArgs:0,maxArgs:0}});S(A)}),h=new s(S=>typeof S!="function"?S:function(L,A,v){let O=!1,_,k=new Promise(F=>{_=function(C){O=!0,F(C)}}),N;try{N=S(L,A,_)}catch(F){N=Promise.reject(F)}let z=N!==!0&&u(N);if(N!==!0&&!z&&!O)return!1;let q=F=>{F.then(C=>{v(C)},C=>{let P;C&&(C instanceof Error||typeof C.message=="string")?P=C.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(C=>{})};return q(z?N:k),!0}),E=({reject:S,resolve:y},L)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):L&&L.__mozWebExtensionPolyfillReject__?S(new Error(L.message)):y(L)},D=(S,y,L,...A)=>{if(A.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${A.length}`);return new Promise((v,O)=>{let _=E.bind(null,{resolve:v,reject:O});A.push(_),L.sendMessage(...A)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},I={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":I},services:{"*":I},websites:{"*":I}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};f6(Sf,{default:()=>tu});var b6=yf(vf());h6(Sf,yf(vf()));var{default:bf,...T6}=b6,tu=bf!==void 0?bf:T6;globalThis.immersiveTranslateBrowserAPI=tu;d();d();d();d();var y6=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5019,35 +5019,35 @@ select.text-gray-6 { max-width: fit-content; } } -`,hd="immersive-translate-toastify-shadow-root",bd=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(hd)){let e=document.getElementById(hd);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=hd,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=y6,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function nu(t){t=t||{},new bd({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Rn(){return we.PROD_API==="1"}function xf(){return we.HAS_CSP_ERROR=="1"}function et(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function ru(){return typeof Deno<"u"}var cP=Me().PROD==="1",di=Me().PROD!=="1";function au(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();d();d();d();d();function pi(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Td=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function iu(t,e){let n=pi(),r=setTimeout(()=>n.reject(new Td),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function vr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ef=class{#e=0;#t=[];#n=[];#r=pi();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eG6,bgBlue:()=>Q6,bgBrightBlack:()=>eS,bgBrightBlue:()=>aS,bgBrightCyan:()=>oS,bgBrightGreen:()=>nS,bgBrightMagenta:()=>iS,bgBrightRed:()=>tS,bgBrightWhite:()=>sS,bgBrightYellow:()=>rS,bgCyan:()=>Z6,bgGreen:()=>$6,bgMagenta:()=>J6,bgRed:()=>V6,bgRgb24:()=>dS,bgRgb8:()=>lS,bgWhite:()=>X6,bgYellow:()=>Y6,black:()=>L6,blue:()=>B6,bold:()=>E6,brightBlack:()=>Df,brightBlue:()=>j6,brightCyan:()=>W6,brightGreen:()=>U6,brightMagenta:()=>H6,brightRed:()=>N6,brightWhite:()=>K6,brightYellow:()=>q6,cyan:()=>R6,dim:()=>C6,getColorEnabled:()=>S6,gray:()=>z6,green:()=>F6,hidden:()=>k6,inverse:()=>A6,italic:()=>w6,magenta:()=>I6,red:()=>_6,reset:()=>x6,rgb24:()=>cS,rgb8:()=>uS,setColorEnabled:()=>v6,strikethrough:()=>P6,stripColor:()=>gS,underline:()=>D6,white:()=>O6,yellow:()=>M6});d();var{Deno:Cf}=globalThis,wf=typeof Cf?.noColor=="boolean"?Cf.noColor:!0,yd=!wf;function v6(t){wf||(yd=t)}function S6(){return yd}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return yd?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function x6(t){return Pe(t,ke([0],0))}function E6(t){return Pe(t,ke([1],22))}function C6(t){return Pe(t,ke([2],22))}function w6(t){return Pe(t,ke([3],23))}function D6(t){return Pe(t,ke([4],24))}function A6(t){return Pe(t,ke([7],27))}function k6(t){return Pe(t,ke([8],28))}function P6(t){return Pe(t,ke([9],29))}function L6(t){return Pe(t,ke([30],39))}function _6(t){return Pe(t,ke([31],39))}function F6(t){return Pe(t,ke([32],39))}function M6(t){return Pe(t,ke([33],39))}function B6(t){return Pe(t,ke([34],39))}function I6(t){return Pe(t,ke([35],39))}function R6(t){return Pe(t,ke([36],39))}function O6(t){return Pe(t,ke([37],39))}function z6(t){return Df(t)}function Df(t){return Pe(t,ke([90],39))}function N6(t){return Pe(t,ke([91],39))}function U6(t){return Pe(t,ke([92],39))}function q6(t){return Pe(t,ke([93],39))}function j6(t){return Pe(t,ke([94],39))}function H6(t){return Pe(t,ke([95],39))}function W6(t){return Pe(t,ke([96],39))}function K6(t){return Pe(t,ke([97],39))}function G6(t){return Pe(t,ke([40],49))}function V6(t){return Pe(t,ke([41],49))}function $6(t){return Pe(t,ke([42],49))}function Y6(t){return Pe(t,ke([43],49))}function Q6(t){return Pe(t,ke([44],49))}function J6(t){return Pe(t,ke([45],49))}function Z6(t){return Pe(t,ke([46],49))}function X6(t){return Pe(t,ke([47],49))}function eS(t){return Pe(t,ke([100],49))}function tS(t){return Pe(t,ke([101],49))}function nS(t){return Pe(t,ke([102],49))}function rS(t){return Pe(t,ke([103],49))}function aS(t){return Pe(t,ke([104],49))}function iS(t){return Pe(t,ke([105],49))}function oS(t){return Pe(t,ke([106],49))}function sS(t){return Pe(t,ke([107],49))}function Hr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function uS(t,e){return Pe(t,ke([38,5,Hr(e)],39))}function lS(t,e){return Pe(t,ke([48,5,Hr(e)],49))}function cS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Hr(e.r),Hr(e.g),Hr(e.b)],39))}function dS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Hr(e.r),Hr(e.g),Hr(e.b)],49))}var pS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function gS(t){return t.replace(pS,"")}d();d();var vd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},mS={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Sd(t,e){let n={...mS,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new vd(a,n.maxAttempts)}d();var Sr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function wo(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2|e[r]>>6],n+=Sr[e[r]&63];return r===a+1&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2],n+="="),n}d();d();var fS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,hS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,bS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,xd={Space_Separator:fS,ID_Start:hS,ID_Continue:bS},Et={isSpaceSeparator(t){return typeof t=="string"&&xd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||xd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||xd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Cd,cn,Er,su,Wr,Wn,Rt,Ad,Ao,TS=function(t,e){Cd=String(t),cn="start",Er=[],su=0,Wr=1,Wn=0,Rt=void 0,Ad=void 0,Ao=void 0;do Rt=yS(),xS[cn]();while(Rt.type!=="eof");return typeof e=="function"?wd({"":Ao},"",e):Ao};function wd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function nu(t){t=t||{},new hd({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Rn(){return we.PROD_API==="1"}function xf(){return we.HAS_CSP_ERROR=="1"}function tt(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function ru(){return typeof Deno<"u"}var cP=Me().PROD==="1",di=Me().PROD!=="1";function au(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();d();d();d();d();function pi(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var bd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function iu(t,e){let n=pi(),r=setTimeout(()=>n.reject(new bd),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function vr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ef=class{#e=0;#t=[];#n=[];#r=pi();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eG6,bgBlue:()=>Q6,bgBrightBlack:()=>eS,bgBrightBlue:()=>aS,bgBrightCyan:()=>oS,bgBrightGreen:()=>nS,bgBrightMagenta:()=>iS,bgBrightRed:()=>tS,bgBrightWhite:()=>sS,bgBrightYellow:()=>rS,bgCyan:()=>Z6,bgGreen:()=>V6,bgMagenta:()=>J6,bgRed:()=>$6,bgRgb24:()=>dS,bgRgb8:()=>lS,bgWhite:()=>X6,bgYellow:()=>Y6,black:()=>L6,blue:()=>B6,bold:()=>E6,brightBlack:()=>Df,brightBlue:()=>j6,brightCyan:()=>W6,brightGreen:()=>U6,brightMagenta:()=>H6,brightRed:()=>N6,brightWhite:()=>K6,brightYellow:()=>q6,cyan:()=>R6,dim:()=>C6,getColorEnabled:()=>S6,gray:()=>z6,green:()=>F6,hidden:()=>k6,inverse:()=>A6,italic:()=>w6,magenta:()=>I6,red:()=>_6,reset:()=>x6,rgb24:()=>cS,rgb8:()=>uS,setColorEnabled:()=>v6,strikethrough:()=>P6,stripColor:()=>gS,underline:()=>D6,white:()=>O6,yellow:()=>M6});d();var{Deno:Cf}=globalThis,wf=typeof Cf?.noColor=="boolean"?Cf.noColor:!0,Td=!wf;function v6(t){wf||(Td=t)}function S6(){return Td}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return Td?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function x6(t){return Pe(t,ke([0],0))}function E6(t){return Pe(t,ke([1],22))}function C6(t){return Pe(t,ke([2],22))}function w6(t){return Pe(t,ke([3],23))}function D6(t){return Pe(t,ke([4],24))}function A6(t){return Pe(t,ke([7],27))}function k6(t){return Pe(t,ke([8],28))}function P6(t){return Pe(t,ke([9],29))}function L6(t){return Pe(t,ke([30],39))}function _6(t){return Pe(t,ke([31],39))}function F6(t){return Pe(t,ke([32],39))}function M6(t){return Pe(t,ke([33],39))}function B6(t){return Pe(t,ke([34],39))}function I6(t){return Pe(t,ke([35],39))}function R6(t){return Pe(t,ke([36],39))}function O6(t){return Pe(t,ke([37],39))}function z6(t){return Df(t)}function Df(t){return Pe(t,ke([90],39))}function N6(t){return Pe(t,ke([91],39))}function U6(t){return Pe(t,ke([92],39))}function q6(t){return Pe(t,ke([93],39))}function j6(t){return Pe(t,ke([94],39))}function H6(t){return Pe(t,ke([95],39))}function W6(t){return Pe(t,ke([96],39))}function K6(t){return Pe(t,ke([97],39))}function G6(t){return Pe(t,ke([40],49))}function $6(t){return Pe(t,ke([41],49))}function V6(t){return Pe(t,ke([42],49))}function Y6(t){return Pe(t,ke([43],49))}function Q6(t){return Pe(t,ke([44],49))}function J6(t){return Pe(t,ke([45],49))}function Z6(t){return Pe(t,ke([46],49))}function X6(t){return Pe(t,ke([47],49))}function eS(t){return Pe(t,ke([100],49))}function tS(t){return Pe(t,ke([101],49))}function nS(t){return Pe(t,ke([102],49))}function rS(t){return Pe(t,ke([103],49))}function aS(t){return Pe(t,ke([104],49))}function iS(t){return Pe(t,ke([105],49))}function oS(t){return Pe(t,ke([106],49))}function sS(t){return Pe(t,ke([107],49))}function Hr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function uS(t,e){return Pe(t,ke([38,5,Hr(e)],39))}function lS(t,e){return Pe(t,ke([48,5,Hr(e)],49))}function cS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Hr(e.r),Hr(e.g),Hr(e.b)],39))}function dS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Hr(e.r),Hr(e.g),Hr(e.b)],49))}var pS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function gS(t){return t.replace(pS,"")}d();d();var yd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},mS={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function vd(t,e){let n={...mS,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new yd(a,n.maxAttempts)}d();var Sr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Do(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2|e[r]>>6],n+=Sr[e[r]&63];return r===a+1&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Sr[e[r-2]>>2],n+=Sr[(e[r-2]&3)<<4|e[r-1]>>4],n+=Sr[(e[r-1]&15)<<2],n+="="),n}d();d();var fS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,hS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,bS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Sd={Space_Separator:fS,ID_Start:hS,ID_Continue:bS},Et={isSpaceSeparator(t){return typeof t=="string"&&Sd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Sd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Sd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Ed,cn,Er,su,Wr,Wn,Ot,Dd,ko,TS=function(t,e){Ed=String(t),cn="start",Er=[],su=0,Wr=1,Wn=0,Ot=void 0,Dd=void 0,ko=void 0;do Ot=yS(),xS[cn]();while(Ot.type!=="eof");return typeof e=="function"?Cd({"":ko},"",e):ko};function Cd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Cr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var xS={start(){if(Rt.type==="eof")throw _a();Ed()},beforePropertyName(){switch(Rt.type){case"identifier":case"string":Ad=Rt.value,cn="afterPropertyName";return;case"punctuator":ou();return;case"eof":throw _a()}},afterPropertyName(){if(Rt.type==="eof")throw _a();cn="beforePropertyValue"},beforePropertyValue(){if(Rt.type==="eof")throw _a();Ed()},beforeArrayValue(){if(Rt.type==="eof")throw _a();if(Rt.type==="punctuator"&&Rt.value==="]"){ou();return}Ed()},afterPropertyValue(){if(Rt.type==="eof")throw _a();switch(Rt.value){case",":cn="beforePropertyName";return;case"}":ou()}},afterArrayValue(){if(Rt.type==="eof")throw _a();switch(Rt.value){case",":cn="beforeArrayValue";return;case"]":ou()}},end(){}};function Ed(){let t;switch(Rt.type){case"punctuator":switch(Rt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Rt.value;break}if(Ao===void 0)Ao=t;else{let e=Er[Er.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Ad,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Er.push(t),Array.isArray(t)?cn="beforeArrayValue":cn="beforePropertyName";else{let e=Er[Er.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}}function ou(){Er.pop();let t=Er[Er.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}function ct(t){return kd(t===void 0?`JSON5: invalid end of input at ${Wr}:${Wn}`:`JSON5: invalid character '${ES(t)}' at ${Wr}:${Wn}`)}function _a(){return kd(`JSON5: invalid end of input at ${Wr}:${Wn}`)}function Af(){return Wn-=5,kd(`JSON5: invalid identifier character at ${Wr}:${Wn}`)}function ES(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function kd(t){let e=new SyntaxError(t);return e.lineNumber=Wr,e.columnNumber=Wn,e}var CS=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?g(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let I=m(D)+":";s!==""&&(I+=" "),I+=M,h.push(I)}}let E;if(h.length===0)E="{}";else{let D;if(s==="")D=h.join(","),E="{"+D+"}";else{let M=`, +`&&K(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ct(K());case void 0:throw ct(K())}return K()}function SS(){let t="",e=Cr();if(!Et.isHexDigit(e)||(t+=K(),e=Cr(),!Et.isHexDigit(e)))throw ct(K());return t+=K(),String.fromCodePoint(parseInt(t,16))}function wd(){let t="",e=4;for(;e-- >0;){let n=Cr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var xS={start(){if(Ot.type==="eof")throw _a();xd()},beforePropertyName(){switch(Ot.type){case"identifier":case"string":Dd=Ot.value,cn="afterPropertyName";return;case"punctuator":ou();return;case"eof":throw _a()}},afterPropertyName(){if(Ot.type==="eof")throw _a();cn="beforePropertyValue"},beforePropertyValue(){if(Ot.type==="eof")throw _a();xd()},beforeArrayValue(){if(Ot.type==="eof")throw _a();if(Ot.type==="punctuator"&&Ot.value==="]"){ou();return}xd()},afterPropertyValue(){if(Ot.type==="eof")throw _a();switch(Ot.value){case",":cn="beforePropertyName";return;case"}":ou()}},afterArrayValue(){if(Ot.type==="eof")throw _a();switch(Ot.value){case",":cn="beforeArrayValue";return;case"]":ou()}},end(){}};function xd(){let t;switch(Ot.type){case"punctuator":switch(Ot.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Ot.value;break}if(ko===void 0)ko=t;else{let e=Er[Er.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Dd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Er.push(t),Array.isArray(t)?cn="beforeArrayValue":cn="beforePropertyName";else{let e=Er[Er.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}}function ou(){Er.pop();let t=Er[Er.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}function ct(t){return Ad(t===void 0?`JSON5: invalid end of input at ${Wr}:${Wn}`:`JSON5: invalid character '${ES(t)}' at ${Wr}:${Wn}`)}function _a(){return Ad(`JSON5: invalid end of input at ${Wr}:${Wn}`)}function Af(){return Wn-=5,Ad(`JSON5: invalid identifier character at ${Wr}:${Wn}`)}function ES(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Ad(t){let e=new SyntaxError(t);return e.lineNumber=Wr,e.columnNumber=Wn,e}var CS=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?g(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let I=m(D)+":";s!==""&&(I+=" "),I+=M,h.push(I)}}let E;if(h.length===0)E="{}";else{let D;if(s==="")D=h.join(","),E="{"+D+"}";else{let M=`, `+a;D=h.join(M),E=`{ `+a+D+`, `+T+"}"}}return r.pop(),a=T,E}function m(f){if(f.length===0)return c(f,!0);let T=String.fromCodePoint(f.codePointAt(0));if(!Et.isIdStartChar(T))return c(f,!0);for(let b=T.length;b=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=[];for(let E=0;E()=>(e||t((e={exports:{}}).exports,e),e.exports),BS=(t,e)=>{for(var n in e)Ld(t,n,{get:e[n],enumerable:!0})},Pd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of LS(e))!FS.call(t,a)&&a!==n&&Ld(t,a,{get:()=>e[a],enumerable:!(r=PS(e,a))||r.enumerable});return t},IS=(t,e,n)=>(Pd(t,e,"default"),n&&Pd(n,e,"default")),Lf=(t,e,n)=>(n=t!=null?kS(_S(t)):{},Pd(e||!t||!t.__esModule?Ld(n,"default",{value:t,enumerable:!0}):n,t)),_f=MS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof lu=="object"&&lu&&lu.Object===Object&&lu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(L,A,v){var O,_,k,N,z,q,F=0,C=!1,P=!1,U=!0;if(typeof L!="function")throw new TypeError(n);A=y(A)||0,M(v)&&(C=!!v.leading,P="maxWait"in v,k=P?T(y(v.maxWait)||0,A):k,U="trailing"in v?!!v.trailing:U);function H(ee){var Y=O,be=_;return O=_=void 0,F=ee,N=L.apply(be,Y),N}function j(ee){return F=ee,z=setTimeout(ue,A),C?H(ee):N}function W(ee){var Y=ee-q,be=ee-F,ne=A-Y;return P?b(ne,k-be):ne}function V(ee){var Y=ee-q,be=ee-F;return q===void 0||Y>=A||Y<0||P&&be>=k}function ue(){var ee=h();if(V(ee))return ae(ee);z=setTimeout(ue,W(ee))}function ae(ee){return z=void 0,U&&O?H(ee):(O=_=void 0,N)}function J(){z!==void 0&&clearTimeout(z),F=0,O=q=_=z=void 0}function ie(){return z===void 0?N:ae(h())}function ge(){var ee=h(),Y=V(ee);if(O=arguments,_=this,q=ee,Y){if(z===void 0)return j(q);if(P)return z=setTimeout(ue,A),H(q)}return z===void 0&&(z=setTimeout(ue,A)),N}return ge.cancel=J,ge.flush=ie,ge}function D(L,A,v){var O=!0,_=!0;if(typeof L!="function")throw new TypeError(n);return M(v)&&(O="leading"in v?!!v.leading:O,_="trailing"in v?!!v.trailing:_),E(L,A,{leading:O,maxWait:A,trailing:_})}function M(L){var A=typeof L;return!!L&&(A=="object"||A=="function")}function I(L){return!!L&&typeof L=="object"}function S(L){return typeof L=="symbol"||I(L)&&f.call(L)==a}function y(L){if(typeof L=="number")return L;if(S(L))return r;if(M(L)){var A=typeof L.valueOf=="function"?L.valueOf():L;L=M(A)?A+"":A}if(typeof L!="string")return L===0?L:+L;L=L.replace(i,"");var v=s.test(L);return v||u.test(L)?l(L.slice(2),v?2:8):o.test(L)?r:+L}e.exports=D}),Ff={};BS(Ff,{default:()=>Kn});var RS=Lf(_f());IS(Ff,Lf(_f()));var{default:Pf,...OS}=RS,Kn=Pf!==void 0?Pf:OS;d();d();var cu=globalThis||(typeof window<"u"?window:self),zS=Object.create,Fd=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,US=Object.getOwnPropertyNames,qS=Object.getPrototypeOf,jS=Object.prototype.hasOwnProperty,HS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),WS=(t,e)=>{for(var n in e)Fd(t,n,{get:e[n],enumerable:!0})},_d=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of US(e))!jS.call(t,a)&&a!==n&&Fd(t,a,{get:()=>e[a],enumerable:!(r=NS(e,a))||r.enumerable});return t},KS=(t,e,n)=>(_d(t,e,"default"),n&&_d(n,e,"default")),Bf=(t,e,n)=>(n=t!=null?zS(qS(t)):{},_d(e||!t||!t.__esModule?Fd(n,"default",{value:t,enumerable:!0}):n,t)),If=HS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof cu=="object"&&cu&&cu.Object===Object&&cu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(y,L,A){var v,O,_,k,N,z,q=0,F=!1,C=!1,P=!0;if(typeof y!="function")throw new TypeError(n);L=S(L)||0,D(A)&&(F=!!A.leading,C="maxWait"in A,_=C?T(S(A.maxWait)||0,L):_,P="trailing"in A?!!A.trailing:P);function U(ge){var ee=v,Y=O;return v=O=void 0,q=ge,k=y.apply(Y,ee),k}function H(ge){return q=ge,N=setTimeout(V,L),F?U(ge):k}function j(ge){var ee=ge-z,Y=ge-q,be=L-ee;return C?b(be,_-Y):be}function W(ge){var ee=ge-z,Y=ge-q;return z===void 0||ee>=L||ee<0||C&&Y>=_}function V(){var ge=h();if(W(ge))return ue(ge);N=setTimeout(V,j(ge))}function ue(ge){return N=void 0,P&&v?U(ge):(v=O=void 0,k)}function ae(){N!==void 0&&clearTimeout(N),q=0,v=z=O=N=void 0}function J(){return N===void 0?k:ue(h())}function ie(){var ge=h(),ee=W(ge);if(v=arguments,O=this,z=ge,ee){if(N===void 0)return H(z);if(C)return N=setTimeout(V,L),U(z)}return N===void 0&&(N=setTimeout(V,L)),k}return ie.cancel=ae,ie.flush=J,ie}function D(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function M(y){return!!y&&typeof y=="object"}function I(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(I(y))return r;if(D(y)){var L=typeof y.valueOf=="function"?y.valueOf():y;y=D(L)?L+"":L}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var A=s.test(y);return A||u.test(y)?l(y.slice(2),A?2:8):o.test(y)?r:+y}e.exports=E}),Rf={};WS(Rf,{default:()=>ko});var GS=Bf(If());KS(Rf,Bf(If()));var{default:Mf,...VS}=GS,ko=Mf!==void 0?Mf:VS;d();d();var $S=Object.create,Bd=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,QS=Object.getOwnPropertyNames,JS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty,XS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ex=(t,e)=>{for(var n in e)Bd(t,n,{get:e[n],enumerable:!0})},Md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of QS(e))!ZS.call(t,a)&&a!==n&&Bd(t,a,{get:()=>e[a],enumerable:!(r=YS(e,a))||r.enumerable});return t},tx=(t,e,n)=>(Md(t,e,"default"),n&&Md(n,e,"default")),zf=(t,e,n)=>(n=t!=null?$S(JS(t)):{},Md(e||!t||!t.__esModule?Bd(n,"default",{value:t,enumerable:!0}):n,t)),Nf=XS((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(g){if(m[g])return m[g].exports;var f=m[g]={i:g,l:!1,exports:{}};return c[g].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var m={};return p.m=c,p.c=m,p.i=function(g){return g},p.d=function(g,f,T){p.o(g,f)||Object.defineProperty(g,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(g){var f=g&&g.__esModule?function(){return g.default}:function(){return g};return p.d(f,"a",f),f},p.o=function(g,f){return Object.prototype.hasOwnProperty.call(g,f)},p.p="",p(p.s=0)}([function(c,p,m){function g(j,W){var V={};for(var ue in j)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(j,ue)&&(V[ue]=j[ue]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+ue+"
",be.onclick=function(){return _(ne,Y)},be.listener=function(re){(A(re)||v(re))&&z()},O(be,Y),J&&J<1&&(J=1),!ge&&J&&M(J).then(function(){return _(ne,Y)})},F=p.force=function(j,W){var V=j.type,ue=V===void 0?5:V,ae=j.text,J=j.buttonText,ie=J===void 0?"OK":J,ge=j.callback,ee=j.position,Y=ee===void 0?h.positions.force||Y.top:ee;I(),z();var be=document.createElement("div"),ne=S();be.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var xe=document.createElement("div");xe.classList.add(h.classes.button),xe.classList.add(y[ue]),xe.innerHTML=ie,xe.onclick=function(){_(ne,Y),N(),ge?ge():W&&W()},be.appendChild(re),be.appendChild(xe),be.listener=function(ze){A(ze)&&xe.click()},O(be,Y),k()},C=p.confirm=function(j,W,V){var ue=j.text,ae=j.submitText,J=ae===void 0?"Yes":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,be=j.position,ne=be===void 0?h.positions.confirm||ne.top:be;I(),z();var re=document.createElement("div"),xe=S();re.id=xe;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=J,_e.onclick=function(){_(xe,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=ge,de.onclick=function(){_(xe,ne),N(),Y?Y():V&&V()},re.appendChild(ze),re.appendChild(_e),re.appendChild(de),re.listener=function(gt){A(gt)?_e.click():v(gt)&&de.click()},O(re,ne),k(re,ne)},P=function(j,W,V){var ue=j.text,ae=j.submitText,J=ae===void 0?"Submit":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,be=j.position,ne=be===void 0?h.positions.input||ne.top:be,re=g(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);I(),z();var xe=document.createElement("div"),ze=S();xe.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var xt="",sn=re.allowed,In=0;In'+V+"",Y.appendChild(ne),ie.forEach(function(xe,ze){var _e=xe.type,de=_e===void 0?1:_e,gt=xe.text,Pt=xe.handler,bt=document.createElement("div");bt.classList.add(y[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var xt=ie[ze+1];xt&&!xt.type&&(xt.type=1),xt&&xt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=gt,bt.onclick=function(){_(be,ee),N(),Pt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){_(be,ee),N(),J?J():W&&W()},Y.appendChild(re),Y.listener=function(xe){v(xe)&&re.click()},O(Y,ee),k(Y,ee)},H=p.date=function(j,W,V){var ue=j.value,ae=ue===void 0?new Date:ue,J=j.submitText,ie=J===void 0?"OK":J,ge=j.cancelText,ee=ge===void 0?"Cancel":ge,Y=j.submitCallback,be=j.cancelCallback,ne=j.position,re=ne===void 0?h.positions.date||re.top:ne;I(),z();var xe="▾",ze=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),gt=function(mt){ze.innerHTML=h.dateMonths[mt.getMonth()],_e.innerHTML=mt.getDate(),de.innerHTML=mt.getFullYear()},Pt=function(mt){var Ze=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),Dn=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Dn)>Ze&&(Dn=Ze.toString()),mt.target.textContent=Dn,Number(Dn)<1&&(Dn="1"),ae.setDate(Number(Dn))},bt=function(mt){var Ze=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);mt.target.textContent=Ze,ae.setFullYear(Number(Ze))},xt=function(mt){gt(ae)},sn=function(mt){var Ze=new Date(ae.getFullYear(),ae.getMonth()+mt+1,0).getDate();ae.getDate()>Ze&&ae.setDate(Ze),ae.setMonth(ae.getMonth()+mt),gt(ae)},In=function(mt){ae.setDate(ae.getDate()+mt),gt(ae)},Co=function(mt){var Ze=ae.getFullYear()+mt;Ze<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+mt),gt(ae)},ir=document.createElement("div"),ka=S();ir.id=ka;var ui=document.createElement("div");ui.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=xe;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=xe;var wn=document.createElement("div");wn.classList.add(h.classes.button),wn.classList.add(h.classes.elementThird),wn.classList.add(h.classes.dateSelectorUp),wn.innerHTML=xe,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",xt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",xt),de.innerHTML=ae.getFullYear();var hr=document.createElement("div");hr.classList.add(h.classes.button),hr.classList.add(h.classes.elementThird),hr.innerHTML=xe;var br=document.createElement("div");br.classList.add(h.classes.button),br.classList.add(h.classes.elementThird),br.innerHTML=xe;var Pa=document.createElement("div");Pa.classList.add(h.classes.button),Pa.classList.add(h.classes.elementThird),Pa.innerHTML=xe,Hn.onclick=function(){return sn(1)},Yt.onclick=function(){return In(1)},wn.onclick=function(){return Co(1)},hr.onclick=function(){return sn(-1)},br.onclick=function(){return In(-1)},Pa.onclick=function(){return Co(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){_(ka,re),N(),Y?Y(ae):W&&W(ae)};var Tr=document.createElement("div");Tr.classList.add(h.classes.button),Tr.classList.add(h.classes.elementHalf),Tr.classList.add(h.classes.backgroundError),Tr.innerHTML=ee,Tr.onclick=function(){_(ka,re),N(),be?be(ae):V&&V(ae)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(wn),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(de),$t.appendChild(hr),$t.appendChild(br),$t.appendChild(Pa),ui.appendChild($t),ir.appendChild(ui),ir.appendChild(un),ir.appendChild(Tr),ir.listener=function(mt){A(mt)?un.click():v(mt)&&Tr.click()},O(ir,re),k(ir,re)};p.default={alert:q,force:F,confirm:C,input:P,select:U,date:H,setOptions:E,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),Uf={};ex(Uf,{default:()=>du});var nx=zf(Nf());tx(Uf,zf(Nf()));var{default:Of,...rx}=nx,du=Of!==void 0?Of:rx;d();d();var pu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Po(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function Id(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function qf(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;igi[t.toLowerCase()]||Gn[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),ax=t=>Object.keys(gi).find(e=>gi[e]===t),ix=t=>Object.keys(Gn).find(e=>Gn[e]===t);function Vf(t){Kf=t||"all"}function Lo(){return Kf||"all"}function ox(){return nt.slice(0)}function sx(){return nt.map(t=>ax(t)||ix(t)||String.fromCharCode(t))}function ux(){let t=[];return Object.keys(ft).forEach(e=>{ft[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>_o(o))})})}),t}function lx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function cx(t){return typeof t=="string"&&(t=_o(t)),nt.indexOf(t)!==-1}function dx(t,e){let n,r;t||(t=Lo());for(let a in ft)if(Object.prototype.hasOwnProperty.call(ft,a))for(n=ft[a],r=0;r=0&&nt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&nt.splice(0,nt.length),(e===93||e===224)&&(e=91),e in Ot){Ot[e]=!1;for(let r in Gn)Gn[r]===e&&(wr[r]=!1)}}function $f(t,...e){if(typeof t>"u")Object.keys(ft).forEach(n=>delete ft[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&Od(n)});else if(typeof t=="object")t.key&&Od(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),Od({key:t,scope:n,method:r,splitKey:"+"})}}var Od=({key:t,scope:e,method:n,splitKey:r="+"})=>{Rd(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":_o(u);if(!ft[l])return;e||(e=Lo());let c=s>1?Id(Gn,o):[];ft[l]=ft[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&qf(p.mods,c)))})};function Hf(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Ot)Object.prototype.hasOwnProperty.call(Ot,i)&&(!Ot[i]&&e.mods.indexOf(+i)>-1||Ot[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Ot[16]&&!Ot[18]&&!Ot[17]&&!Ot[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(nt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Wf(t,e){let n=ft["*"],r=t.keyCode||t.which||t.charCode;if(!wr.filter.call(this,t))return;if((r===93||r===224)&&(r=91),nt.indexOf(r)===-1&&r!==229&&nt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=gu[i];t[i]&&nt.indexOf(o)===-1?nt.push(o):!t[i]&&nt.indexOf(o)>-1?nt.splice(nt.indexOf(o),1):i==="metaKey"&&t[i]&&nt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(nt=nt.slice(nt.indexOf(o))))}),r in Ot){Ot[r]=!0;for(let i in Gn)Gn[i]===r&&(wr[i]=!0);if(!n)return}for(let i in Ot)Object.prototype.hasOwnProperty.call(Ot,i)&&(Ot[i]=t[gu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(nt.indexOf(17)===-1&&nt.push(17),nt.indexOf(18)===-1&&nt.push(18),Ot[17]=!0,Ot[18]=!0);let a=Lo();if(n)for(let i=0;i-1}function wr(t,e,n){nt=[];let r=Rd(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,m=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(m=!0)),typeof e=="string"&&(i=e),m&&$f(t,i);s1&&(a=Id(Gn,t)),t=t[t.length-1],t=t==="*"?"*":_o(t),t in ft||(ft[t]=[]),ft[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!gx(o)&&window&&(Gf.push(o),Po(o,"keydown",g=>{Wf(g,o)},p),jf||(jf=!0,Po(window,"focus",()=>{nt=[]},p),Po(window,"click",()=>{nt=[]},!1)),Po(o,"keyup",g=>{Wf(g,o),px(g)},p))}function mx(t,e="all"){Object.keys(ft).forEach(n=>{ft[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var zd={getPressedKeyString:sx,setScope:Vf,getScope:Lo,deleteScope:dx,getPressedKeyCodes:ox,getAllKeyCodes:ux,isPressed:cx,filter:lx,trigger:mx,unbind:$f,keyMap:gi,modifier:Gn,modifierMap:gu};for(let t in zd)Object.prototype.hasOwnProperty.call(zd,t)&&(wr[t]=zd[t]);if(typeof window<"u"){let t=window.hotkeys;wr.noConflict=e=>(e&&window.hotkeys===wr&&(window.hotkeys=t),wr),window.hotkeys=wr}var vn=wr;d();d();var fx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Qf={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Kr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return fx[t]}static getBrowserTypeByAlias(t){return Qf[t]||""}},rt=/version\/(\d+(\.?_?\d+)+)/i,hx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],bx=hx,Tx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:dn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:dn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:dn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],yx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],vx=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Kr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Kr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Kr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Kr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Kr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Kr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Kr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],Sx=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(bx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Tx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(yx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(vx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},Yf=Sx,xx=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Yf(t,e)}static parse(t){return new Yf(t).getResult()}static get BROWSER_MAP(){return Qf}static get ENGINE_MAP(){return Kr}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},mi=xx;d();d();var{entries:ah,setPrototypeOf:Jf,isFrozen:Ex,getPrototypeOf:Cx,getOwnPropertyDescriptor:wx}=Object,{freeze:pn,seal:$n,create:Dx}=Object,{apply:Wd,construct:Kd}=typeof Reflect<"u"&&Reflect;Wd||(Wd=function(t,e,n){return t.apply(e,n)});pn||(pn=function(t){return t});$n||($n=function(t){return t});Kd||(Kd=function(t,e){return new t(...e)});var Ax=zn(Array.prototype.forEach),Zf=zn(Array.prototype.pop),Fo=zn(Array.prototype.push),hu=zn(String.prototype.toLowerCase),Nd=zn(String.prototype.toString),kx=zn(String.prototype.match),Vn=zn(String.prototype.replace),Px=zn(String.prototype.indexOf),Lx=zn(String.prototype.trim),An=zn(RegExp.prototype.test),Mo=_x(TypeError);function zn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Rx=$n(/\${[\w\W]*}/gm),Ox=$n(/^data-[\-\w.\u00B7-\uFFFF]/),zx=$n(/^aria-[\-\w]+$/),ih=$n(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nx=$n(/^(?:\w+script|data):/i),Ux=$n(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=$n(/^html$/i),rh=Object.freeze({__proto__:null,MUSTACHE_EXPR:Bx,ERB_EXPR:Ix,TMPLIT_EXPR:Rx,DATA_ATTR:Ox,ARIA_ATTR:zx,IS_ALLOWED_URI:ih,IS_SCRIPT_OR_DATA:Nx,ATTR_WHITESPACE:Ux,DOCTYPE_NAME:oh}),qx=()=>typeof window>"u"?null:window,jx=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function sh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qx(),e=R=>sh(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:g}=t,f=u.prototype,T=mu(f,"cloneNode"),b=mu(f,"nextSibling"),h=mu(f,"childNodes"),E=mu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:I,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:L}=a,{importNode:A}=n,v={};e.isSupported=typeof ah=="function"&&typeof E=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:_,TMPLIT_EXPR:k,DATA_ATTR:N,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:F}=rh,{IS_ALLOWED_URI:C}=rh,P=null,U=Oe({},[...Xf,...Ud,...qd,...jd,...eh]),H=null,j=Oe({},[...th,...Hd,...nh,...fu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ue=null,ae=!0,J=!0,ie=!1,ge=!0,ee=!1,Y=!1,be=!1,ne=!1,re=!1,xe=!1,ze=!1,_e=!0,de=!1,gt="user-content-",Pt=!0,bt=!1,xt={},sn=null,In=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Co=null,ir=Oe({},["audio","video","img","source","image","track"]),ka=null,ui=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",wn=Yt,hr=!1,br=null,Pa=Oe({},[$t,Hn,Yt],Nd),un,Tr=["application/xhtml+xml","text/html"],mt="text/html",Ze,Dn=null,Y9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},cd=function(R){if(!(Dn&&Dn===R)){if((!R||typeof R!="object")&&(R={}),R=fi(R),un=Tr.indexOf(R.PARSER_MEDIA_TYPE)===-1?un=mt:un=R.PARSER_MEDIA_TYPE,Ze=un==="application/xhtml+xml"?Nd:hu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Ze):U,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Ze):j,br="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,Nd):Pa,ka="ADD_URI_SAFE_ATTR"in R?Oe(fi(ui),R.ADD_URI_SAFE_ATTR,Ze):ui,Co="ADD_DATA_URI_TAGS"in R?Oe(fi(ir),R.ADD_DATA_URI_TAGS,Ze):ir,sn="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Ze):In,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Ze):{},ue="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Ze):{},xt="USE_PROFILES"in R?R.USE_PROFILES:!1,ae=R.ALLOW_ARIA_ATTR!==!1,J=R.ALLOW_DATA_ATTR!==!1,ie=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,re=R.RETURN_DOM||!1,xe=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ne=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,de=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,bt=R.IN_PLACE||!1,C=R.ALLOWED_URI_REGEXP||ih,wn=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(J=!1),xe&&(re=!0),xt&&(P=Oe({},[...eh]),H=[],xt.html===!0&&(Oe(P,Xf),Oe(H,th)),xt.svg===!0&&(Oe(P,Ud),Oe(H,Hd),Oe(H,fu)),xt.svgFilters===!0&&(Oe(P,qd),Oe(H,Hd),Oe(H,fu)),xt.mathMl===!0&&(Oe(P,jd),Oe(H,nh),Oe(H,fu))),R.ADD_TAGS&&(P===U&&(P=fi(P)),Oe(P,R.ADD_TAGS,Ze)),R.ADD_ATTR&&(H===j&&(H=fi(H)),Oe(H,R.ADD_ATTR,Ze)),R.ADD_URI_SAFE_ATTR&&Oe(ka,R.ADD_URI_SAFE_ATTR,Ze),R.FORBID_CONTENTS&&(sn===In&&(sn=fi(sn)),Oe(sn,R.FORBID_CONTENTS,Ze)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Mo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Mo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=jx(g,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));pn&&pn(R),Dn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),Q9=Oe({},["title","style","font","a","script"]),Zs=Oe({},Ud);Oe(Zs,qd),Oe(Zs,Fx);let dd=Oe({},jd);Oe(dd,Mx);let J9=function(R){let le=E(R);(!le||!le.tagName)&&(le={namespaceURI:wn,tagName:"template"});let Z=hu(R.tagName),Ge=hu(le.tagName);return br[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?Z==="svg":le.namespaceURI===$t?Z==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Zs[Z]:R.namespaceURI===$t?le.namespaceURI===Yt?Z==="math":le.namespaceURI===Hn?Z==="math"&&lf[Ge]:!!dd[Z]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!dd[Z]&&(Q9[Z]||!Zs[Z]):!!(un==="application/xhtml+xml"&&br[R.namespaceURI]):!1},li=function(R){Fo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},pd=function(R,le){try{Fo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Fo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(re||xe)try{li(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,Z;if(ne)R=""+R;else{let ln=kx(R,/^[\r\n\t ]+/);Z=ln&&ln[0]}un==="application/xhtml+xml"&&wn===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(wn===Yt)try{le=new m().parseFromString(Ge,un)}catch{}if(!le||!le.documentElement){le=I.createDocument(wn,"template",null);try{le.documentElement.innerHTML=hr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&Z&&Lt.insertBefore(a.createTextNode(Z),Lt.childNodes[0]||null),wn===Yt?L.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Z9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Xs=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},yr=function(R,le,Z){v[R]&&Ax(v[R],Ge=>{Ge.call(e,le,Z,Dn)})},pf=function(R){let le;if(yr("beforeSanitizeElements",R,null),Z9(R))return li(R),!0;let Z=Ze(R.nodeName);if(yr("uponSanitizeElement",R,{tagName:Z,allowedTags:P}),R.hasChildNodes()&&!Xs(R.firstElementChild)&&(!Xs(R.content)||!Xs(R.content.firstElementChild))&&An(/<[/\w]/g,R.innerHTML)&&An(/<[/\w]/g,R.textContent))return li(R),!0;if(!P[Z]||V[Z]){if(!V[Z]&&mf(Z)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z)))return!1;if(Pt&&!sn[Z]){let Ge=E(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let ln=Lt.length;for(let yn=ln-1;yn>=0;--yn)Ge.insertBefore(T(Lt[yn],!0),b(R))}}return li(R),!0}return R instanceof u&&!J9(R)||(Z==="noscript"||Z==="noembed")&&An(/<\/no(script|embed)/i,R.innerHTML)?(li(R),!0):(ee&&R.nodeType===3&&(le=R.textContent,le=Vn(le,O," "),le=Vn(le,_," "),le=Vn(le,k," "),R.textContent!==le&&(Fo(e.removed,{element:R.cloneNode()}),R.textContent=le)),yr("afterSanitizeElements",R,null),!1)},gf=function(R,le,Z){if(_e&&(le==="id"||le==="name")&&(Z in a||Z in Y9))return!1;if(!(J&&!ue[le]&&An(N,le))&&!(ae&&An(z,le))){if(!H[le]||ue[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&An(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z))))return!1}else if(!ka[le]&&!An(C,Vn(Z,F,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&Px(Z,"data:")===0&&Co[R])&&!(ie&&!An(q,Vn(Z,F,"")))&&Z)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,Z,Ge,Lt;yr("beforeSanitizeAttributes",R,null);let{attributes:ln}=R;if(!ln)return;let yn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=ln.length;Lt--;){le=ln[Lt];let{name:It,namespaceURI:ci}=le;if(Z=It==="value"?le.value:Lx(le.value),Ge=Ze(It),yn.attrName=Ge,yn.attrValue=Z,yn.keepAttr=!0,yn.forceKeepAttr=void 0,yr("uponSanitizeAttribute",R,yn),Z=yn.attrValue,yn.forceKeepAttr||(pd(It,R),!yn.keepAttr))continue;if(!ge&&An(/\/>/i,Z)){pd(It,R);continue}ee&&(Z=Vn(Z,O," "),Z=Vn(Z,_," "),Z=Vn(Z,k," "));let hf=Ze(R.nodeName);if(gf(hf,Ge,Z)){if(de&&(Ge==="id"||Ge==="name")&&(pd(It,R),Z=gt+Z),D&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ci)switch(g.getAttributeType(hf,Ge)){case"TrustedHTML":{Z=D.createHTML(Z);break}case"TrustedScriptURL":{Z=D.createScriptURL(Z);break}}try{ci?R.setAttributeNS(ci,It,Z):R.setAttribute(It,Z),Zf(e.removed)}catch{}}}yr("afterSanitizeAttributes",R,null)},X9=function R(le){let Z,Ge=df(le);for(yr("beforeSanitizeShadowDOM",le,null);Z=Ge.nextNode();)yr("uponSanitizeShadowNode",Z,null),!pf(Z)&&(Z.content instanceof i&&R(Z.content),ff(Z));yr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z,Ge,Lt,ln;if(hr=!R,hr&&(R=""),typeof R!="string"&&!Xs(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Mo("dirty is not a string, aborting")}else throw Mo("toString is not a function");if(!e.isSupported)return R;if(be||cd(le),e.removed=[],typeof R=="string"&&(bt=!1),bt){if(R.nodeName){let ci=Ze(R.nodeName);if(!P[ci]||V[ci])throw Mo("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)Z=cf(""),Ge=Z.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Z=Ge:Z.appendChild(Ge);else{if(!re&&!ee&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(Z=cf(R),!Z)return re?null:ze?M:""}Z&&ne&&li(Z.firstChild);let yn=df(bt?R:Z);for(;Lt=yn.nextNode();)pf(Lt)||(Lt.content instanceof i&&X9(Lt.content),ff(Lt));if(bt)return R;if(re){if(xe)for(ln=y.call(Z.ownerDocument);Z.firstChild;)ln.appendChild(Z.firstChild);else ln=Z;return(H.shadowroot||H.shadowrootmod)&&(ln=A.call(n,ln,!0)),ln}let It=Y?Z.outerHTML:Z.innerHTML;return Y&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&An(oh,Z.ownerDocument.doctype.name)&&(It=" -`+It),ee&&(It=Vn(It,O," "),It=Vn(It,_," "),It=Vn(It,k," ")),D&&ze?D.createHTML(It):It},e.setConfig=function(R){cd(R),be=!0},e.clearConfig=function(){Dn=null,be=!1},e.isValidAttribute=function(R,le,Z){Dn||cd({});let Ge=Ze(R),Lt=Ze(le);return gf(Ge,Lt,Z)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Fo(v[R],le))},e.removeHook=function(R){if(v[R])return Zf(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var Ye=sh();d();d();var Hx=Object.create,Vd=Object.defineProperty,Wx=Object.getOwnPropertyDescriptor,Kx=Object.getOwnPropertyNames,Gx=Object.getPrototypeOf,Vx=Object.prototype.hasOwnProperty,$d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),$x=(t,e)=>{for(var n in e)Vd(t,n,{get:e[n],enumerable:!0})},Gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Kx(e))!Vx.call(t,a)&&a!==n&&Vd(t,a,{get:()=>e[a],enumerable:!(r=Wx(e,a))||r.enumerable});return t},Yx=(t,e,n)=>(Gd(t,e,"default"),n&&Gd(n,e,"default")),lh=(t,e,n)=>(n=t!=null?Hx(Gx(t)):{},Gd(e||!t||!t.__esModule?Vd(n,"default",{value:t,enumerable:!0}):n,t)),Qx=$d((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var m=this._doc.createElement("span");l.firstChild;)m.appendChild(l.firstChild);l.parentNode.replaceChild(m,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),m=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),m){var g=m.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",g)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(g){return g.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var m=s(a);return m<=4&&(!o||m!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,m=l.firstChild;m;){var g=m.nextSibling;if(this._isPhrasingContent(m))p!==null?p.appendChild(m):this._isWhitespace(m)||(p=a.createElement("p"),l.replaceChild(p,m),p.appendChild(m));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}m=g}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var xe=this._getInnerText(re);if(!(xe.length<25)){var ze=this._getNodeAncestors(re,5);if(ze.length!==0){var _e=0;_e+=1,_e+=xe.split(",").length,_e+=Math.min(Math.floor(xe.length/100),3),this._forEachNode(ze,function(de,gt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),T.push(de)),gt===0)var Pt=1;else gt===1?Pt=2:Pt=gt*3;de.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,E=T.length;hS.readability.contentScore){b.splice(I,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,L=!1,A;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],O=1;O=.75&&v.push(this._getNodeAncestors(b[O]));var _=3;if(v.length>=_)for(A=y.parentNode;A.tagName!=="BODY";){for(var k=0,N=0;N=_){y=A;break}A=A.parentNode}y.readability||this._initializeNode(y),A=y.parentNode;for(var z=y.readability.contentScore,q=z/3;A.tagName!=="BODY";){if(!A.readability){A=A.parentNode;continue}var F=A.readability.contentScore;if(Fz){y=A;break}z=A.readability.contentScore,A=A.parentNode}for(A=y.parentNode;A.tagName!="BODY"&&A.children.length==1;)y=A,A=y.parentNode;y.readability||this._initializeNode(y)}var C=a.createElement("DIV");i&&(C.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);A=y.parentNode;for(var U=A.children,H=0,j=U.length;H=P)V=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),J=this._getInnerText(W),ie=J.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),C.appendChild(W),U=A.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+C.innerHTML),this._prepArticle(C),this._debug&&this.log("Article content post-prep: "+C.innerHTML),L)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";C.firstChild;)ge.appendChild(C.firstChild);C.appendChild(ge)}this._debug&&this.log("Article content after paging: "+C.innerHTML);var ee=!0,Y=this._getInnerText(C,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(m){return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(m){return m&&typeof m.name=="string"}).map(function(m){return m.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(m){this.log(m.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),m=l.getAttribute("content");if(m){var g=null,f=null;p&&(g=p.match(s),g&&(f=g[0].toLowerCase().replace(/\s/g,""),i[f]=m.trim())),!g&&c&&u.test(c)&&(f=c,m&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=m.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],m=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(m)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var g=this._getRowAndColumnCount(o);if(g.rows>=10||g.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=g.rows*g.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(A){return A._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,A=>u+=this._getInnerText(A).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var m=i.getElementsByTagName("p").length,g=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,E=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&m/g<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>m||T>Math.floor(m/3)||!s&&b<.9&&S<25&&(g===0||g>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&I>.2||c>=25&&I>.5||h===1&&S<75||h>1;if(s&&y){for(var L=0;L1)return y;let A=i.getElementsByTagName("li").length;if(g==A)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),Jx=$d((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(m){c.add(m.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(m){if(!o.visibilityChecker(m))return!1;var g=m.className+" "+m.id;if(n.unlikelyCandidates.test(g)&&!n.okMaybeItsACandidate.test(g)||m.matches("li p"))return!1;var f=m.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),ch=$d((t,e)=>{var n=Qx(),r=Jx();e.exports={Readability:n,isProbablyReaderable:r}}),dh={};$x(dh,{Readability:()=>bu,default:()=>mh,isProbablyReaderable:()=>gh});var ph=lh(ch());Yx(dh,lh(ch()));var{Readability:bu,isProbablyReaderable:gh}=ph,{default:uh,...Zx}=ph,mh=uh!==void 0?uh:Zx;var Na={};eu(Na,{Breadcrumbs:()=>$r,BrowserClient:()=>Ci,Dedupe:()=>Zr,FunctionToString:()=>Ra,GlobalHandlers:()=>cr,HttpContext:()=>Jr,Hub:()=>_r,InboundFilters:()=>Oa,Integrations:()=>FC,LinkedErrors:()=>Qr,SDK_VERSION:()=>Ei,Scope:()=>Nn,TryCatch:()=>Yr,addBreadcrumb:()=>Pu,addGlobalEventProcessor:()=>lr,captureEvent:()=>Au,captureException:()=>Si,captureMessage:()=>Du,chromeStackLineParser:()=>D0,close:()=>D4,configureScope:()=>ku,createTransport:()=>Go,defaultIntegrations:()=>M0,defaultStackLineParsers:()=>P0,defaultStackParser:()=>qu,flush:()=>w4,forceLoad:()=>E4,geckoStackLineParser:()=>A0,getCurrentHub:()=>Le,getHubFromCarrier:()=>Un,init:()=>v4,lastEventId:()=>x4,makeFetchTransport:()=>Vo,makeMain:()=>vi,onLoad:()=>C4,opera10StackLineParser:()=>o4,opera11StackLineParser:()=>s4,setContext:()=>Lu,setExtra:()=>Fu,setExtras:()=>_u,setTag:()=>Bu,setTags:()=>Mu,setUser:()=>Iu,showReportDialog:()=>S4,startTransaction:()=>Ru,winjsStackLineParser:()=>k0,withScope:()=>xi,wrap:()=>A4});d();d();d();d();d();d();d();d();d();var fh=Object.prototype.toString;function Tu(t){switch(fh.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return or(t,Error)}}function Bo(t,e){return fh.call(t)===`[object ${e}]`}function yu(t){return Bo(t,"ErrorEvent")}function hh(t){return Bo(t,"DOMException")}function Dr(t){return Bo(t,"String")}function Io(t){return t===null||typeof t!="object"&&typeof t!="function"}function Yn(t){return Bo(t,"Object")}function Ro(t){return typeof Event<"u"&&or(t,Event)}function bh(t){return!1}function Th(t){return Bo(t,"RegExp")}function hi(t){return!!(t&&t.then&&typeof t.then=="function")}function yh(t){return Yn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function vh(t){return typeof t=="number"&&t!==t}function or(t,e){try{return t instanceof e}catch{return!1}}function Oo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function Xx(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Dr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return xh({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function xh(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function rE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!tE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function vu(t){let e=typeof t=="string"?nE(t):xh(t);return rE(e),e}d();var aE={};function at(){return typeof window<"u"?window:typeof self<"u"?self:aE}function bi(t,e,n){let r=n||at(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var zo=["debug","info","warn","error","log","assert","trace"];function Yd(t){if(!("console"in at()))return t();let n=console,r={};zo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function Eh(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?zo.forEach(n=>{e[n]=(...r)=>{t&&Yd(()=>{})}}):zo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=bi("logger",Eh):Se=Eh();d();d();function Ma(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function Qd(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Xd(t){if(Tu(t))return{message:t.message,name:t.name,stack:t.stack,...wh(t)};if(Ro(t)){let e={type:t.type,target:Ch(t.target),currentTarget:Ch(t.currentTarget),...wh(t)};return typeof CustomEvent<"u"&&or(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Ch(t){try{return bh(t)?Oo(t):Object.prototype.toString.call(t)}catch{return""}}function wh(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ah(t,e=40){let n=Object.keys(Xd(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ma(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:Ma(a,e)}return""}function Ba(t){return Jd(t,new Map)}function Jd(t,e){if(Yn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=Jd(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(Jd(a,e))}),r}return t}d();var iE=50;function t0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return oE(a)}}function kh(t){return Array.isArray(t)?t0(...t):t}function oE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,iE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var e0="";function Jn(t){try{return!t||typeof t!="function"?e0:t.name||e0}catch{return e0}}d();function Ph(){if(!("fetch"in at()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Lh(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function _h(){return!0}var Ar=at(),Uo={},Fh={};function sE(t){if(!Fh[t])switch(Fh[t]=!0,t){case"console":uE();break;case"fetch":lE();break;case"error":pE();break;case"unhandledrejection":gE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function Zn(t,e){Uo[t]=Uo[t]||[],Uo[t].push(e),sE(t)}function yi(t,e){if(!(!t||!Uo[t]))for(let n of Uo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. +`+T+"]"}return r.pop(),a=T,h}},wS={parse:TS,stringify:CS},DS=wS,uu=DS;d();d();var iL=Number.isNaN||function(t){return typeof t=="number"&&t!==t};d();d();var lu=globalThis||(typeof window<"u"?window:self),kS=Object.create,Pd=Object.defineProperty,PS=Object.getOwnPropertyDescriptor,LS=Object.getOwnPropertyNames,_S=Object.getPrototypeOf,FS=Object.prototype.hasOwnProperty,MS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),BS=(t,e)=>{for(var n in e)Pd(t,n,{get:e[n],enumerable:!0})},kd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of LS(e))!FS.call(t,a)&&a!==n&&Pd(t,a,{get:()=>e[a],enumerable:!(r=PS(e,a))||r.enumerable});return t},IS=(t,e,n)=>(kd(t,e,"default"),n&&kd(n,e,"default")),Lf=(t,e,n)=>(n=t!=null?kS(_S(t)):{},kd(e||!t||!t.__esModule?Pd(n,"default",{value:t,enumerable:!0}):n,t)),_f=MS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof lu=="object"&&lu&&lu.Object===Object&&lu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(L,A,v){var O,_,k,N,z,q,F=0,C=!1,P=!1,U=!0;if(typeof L!="function")throw new TypeError(n);A=y(A)||0,M(v)&&(C=!!v.leading,P="maxWait"in v,k=P?T(y(v.maxWait)||0,A):k,U="trailing"in v?!!v.trailing:U);function H(ee){var Y=O,Te=_;return O=_=void 0,F=ee,N=L.apply(Te,Y),N}function j(ee){return F=ee,z=setTimeout(ue,A),C?H(ee):N}function W(ee){var Y=ee-q,Te=ee-F,ne=A-Y;return P?b(ne,k-Te):ne}function $(ee){var Y=ee-q,Te=ee-F;return q===void 0||Y>=A||Y<0||P&&Te>=k}function ue(){var ee=h();if($(ee))return ae(ee);z=setTimeout(ue,W(ee))}function ae(ee){return z=void 0,U&&O?H(ee):(O=_=void 0,N)}function J(){z!==void 0&&clearTimeout(z),F=0,O=q=_=z=void 0}function ie(){return z===void 0?N:ae(h())}function ge(){var ee=h(),Y=$(ee);if(O=arguments,_=this,q=ee,Y){if(z===void 0)return j(q);if(P)return z=setTimeout(ue,A),H(q)}return z===void 0&&(z=setTimeout(ue,A)),N}return ge.cancel=J,ge.flush=ie,ge}function D(L,A,v){var O=!0,_=!0;if(typeof L!="function")throw new TypeError(n);return M(v)&&(O="leading"in v?!!v.leading:O,_="trailing"in v?!!v.trailing:_),E(L,A,{leading:O,maxWait:A,trailing:_})}function M(L){var A=typeof L;return!!L&&(A=="object"||A=="function")}function I(L){return!!L&&typeof L=="object"}function S(L){return typeof L=="symbol"||I(L)&&f.call(L)==a}function y(L){if(typeof L=="number")return L;if(S(L))return r;if(M(L)){var A=typeof L.valueOf=="function"?L.valueOf():L;L=M(A)?A+"":A}if(typeof L!="string")return L===0?L:+L;L=L.replace(i,"");var v=s.test(L);return v||u.test(L)?l(L.slice(2),v?2:8):o.test(L)?r:+L}e.exports=D}),Ff={};BS(Ff,{default:()=>Kn});var RS=Lf(_f());IS(Ff,Lf(_f()));var{default:Pf,...OS}=RS,Kn=Pf!==void 0?Pf:OS;d();d();var cu=globalThis||(typeof window<"u"?window:self),zS=Object.create,_d=Object.defineProperty,NS=Object.getOwnPropertyDescriptor,US=Object.getOwnPropertyNames,qS=Object.getPrototypeOf,jS=Object.prototype.hasOwnProperty,HS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),WS=(t,e)=>{for(var n in e)_d(t,n,{get:e[n],enumerable:!0})},Ld=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of US(e))!jS.call(t,a)&&a!==n&&_d(t,a,{get:()=>e[a],enumerable:!(r=NS(e,a))||r.enumerable});return t},KS=(t,e,n)=>(Ld(t,e,"default"),n&&Ld(n,e,"default")),Bf=(t,e,n)=>(n=t!=null?zS(qS(t)):{},Ld(e||!t||!t.__esModule?_d(n,"default",{value:t,enumerable:!0}):n,t)),If=HS((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof cu=="object"&&cu&&cu.Object===Object&&cu,p=typeof self=="object"&&self&&self.Object===Object&&self,m=c||p||Function("return this")(),g=Object.prototype,f=g.toString,T=Math.max,b=Math.min,h=function(){return m.Date.now()};function E(y,L,A){var v,O,_,k,N,z,q=0,F=!1,C=!1,P=!0;if(typeof y!="function")throw new TypeError(n);L=S(L)||0,D(A)&&(F=!!A.leading,C="maxWait"in A,_=C?T(S(A.maxWait)||0,L):_,P="trailing"in A?!!A.trailing:P);function U(ge){var ee=v,Y=O;return v=O=void 0,q=ge,k=y.apply(Y,ee),k}function H(ge){return q=ge,N=setTimeout($,L),F?U(ge):k}function j(ge){var ee=ge-z,Y=ge-q,Te=L-ee;return C?b(Te,_-Y):Te}function W(ge){var ee=ge-z,Y=ge-q;return z===void 0||ee>=L||ee<0||C&&Y>=_}function $(){var ge=h();if(W(ge))return ue(ge);N=setTimeout($,j(ge))}function ue(ge){return N=void 0,P&&v?U(ge):(v=O=void 0,k)}function ae(){N!==void 0&&clearTimeout(N),q=0,v=z=O=N=void 0}function J(){return N===void 0?k:ue(h())}function ie(){var ge=h(),ee=W(ge);if(v=arguments,O=this,z=ge,ee){if(N===void 0)return H(z);if(C)return N=setTimeout($,L),U(z)}return N===void 0&&(N=setTimeout($,L)),k}return ie.cancel=ae,ie.flush=J,ie}function D(y){var L=typeof y;return!!y&&(L=="object"||L=="function")}function M(y){return!!y&&typeof y=="object"}function I(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(I(y))return r;if(D(y)){var L=typeof y.valueOf=="function"?y.valueOf():y;y=D(L)?L+"":L}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var A=s.test(y);return A||u.test(y)?l(y.slice(2),A?2:8):o.test(y)?r:+y}e.exports=E}),Rf={};WS(Rf,{default:()=>Po});var GS=Bf(If());KS(Rf,Bf(If()));var{default:Mf,...$S}=GS,Po=Mf!==void 0?Mf:$S;d();d();var VS=Object.create,Md=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,QS=Object.getOwnPropertyNames,JS=Object.getPrototypeOf,ZS=Object.prototype.hasOwnProperty,XS=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ex=(t,e)=>{for(var n in e)Md(t,n,{get:e[n],enumerable:!0})},Fd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of QS(e))!ZS.call(t,a)&&a!==n&&Md(t,a,{get:()=>e[a],enumerable:!(r=YS(e,a))||r.enumerable});return t},tx=(t,e,n)=>(Fd(t,e,"default"),n&&Fd(n,e,"default")),zf=(t,e,n)=>(n=t!=null?VS(JS(t)):{},Fd(e||!t||!t.__esModule?Md(n,"default",{value:t,enumerable:!0}):n,t)),Nf=XS((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(g){if(m[g])return m[g].exports;var f=m[g]={i:g,l:!1,exports:{}};return c[g].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var m={};return p.m=c,p.c=m,p.i=function(g){return g},p.d=function(g,f,T){p.o(g,f)||Object.defineProperty(g,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(g){var f=g&&g.__esModule?function(){return g.default}:function(){return g};return p.d(f,"a",f),f},p.o=function(g,f){return Object.prototype.hasOwnProperty.call(g,f)},p.p="",p(p.s=0)}([function(c,p,m){function g(j,W){var $={};for(var ue in j)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(j,ue)&&($[ue]=j[ue]);return $}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+ue+"",Te.onclick=function(){return _(ne,Y)},Te.listener=function(re){(A(re)||v(re))&&z()},O(Te,Y),J&&J<1&&(J=1),!ge&&J&&M(J).then(function(){return _(ne,Y)})},F=p.force=function(j,W){var $=j.type,ue=$===void 0?5:$,ae=j.text,J=j.buttonText,ie=J===void 0?"OK":J,ge=j.callback,ee=j.position,Y=ee===void 0?h.positions.force||Y.top:ee;I(),z();var Te=document.createElement("div"),ne=S();Te.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var xe=document.createElement("div");xe.classList.add(h.classes.button),xe.classList.add(y[ue]),xe.innerHTML=ie,xe.onclick=function(){_(ne,Y),N(),ge?ge():W&&W()},Te.appendChild(re),Te.appendChild(xe),Te.listener=function(ze){A(ze)&&xe.click()},O(Te,Y),k()},C=p.confirm=function(j,W,$){var ue=j.text,ae=j.submitText,J=ae===void 0?"Yes":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,Te=j.position,ne=Te===void 0?h.positions.confirm||ne.top:Te;I(),z();var re=document.createElement("div"),xe=S();re.id=xe;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=J,_e.onclick=function(){_(xe,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=ge,de.onclick=function(){_(xe,ne),N(),Y?Y():$&&$()},re.appendChild(ze),re.appendChild(_e),re.appendChild(de),re.listener=function(gt){A(gt)?_e.click():v(gt)&&de.click()},O(re,ne),k(re,ne)},P=function(j,W,$){var ue=j.text,ae=j.submitText,J=ae===void 0?"Submit":ae,ie=j.cancelText,ge=ie===void 0?"Cancel":ie,ee=j.submitCallback,Y=j.cancelCallback,Te=j.position,ne=Te===void 0?h.positions.input||ne.top:Te,re=g(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);I(),z();var xe=document.createElement("div"),ze=S();xe.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var xt="",sn=re.allowed,In=0;In'+$+"",Y.appendChild(ne),ie.forEach(function(xe,ze){var _e=xe.type,de=_e===void 0?1:_e,gt=xe.text,Pt=xe.handler,bt=document.createElement("div");bt.classList.add(y[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var xt=ie[ze+1];xt&&!xt.type&&(xt.type=1),xt&&xt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=gt,bt.onclick=function(){_(Te,ee),N(),Pt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){_(Te,ee),N(),J?J():W&&W()},Y.appendChild(re),Y.listener=function(xe){v(xe)&&re.click()},O(Y,ee),k(Y,ee)},H=p.date=function(j,W,$){var ue=j.value,ae=ue===void 0?new Date:ue,J=j.submitText,ie=J===void 0?"OK":J,ge=j.cancelText,ee=ge===void 0?"Cancel":ge,Y=j.submitCallback,Te=j.cancelCallback,ne=j.position,re=ne===void 0?h.positions.date||re.top:ne;I(),z();var xe="▾",ze=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),gt=function(mt){ze.innerHTML=h.dateMonths[mt.getMonth()],_e.innerHTML=mt.getDate(),de.innerHTML=mt.getFullYear()},Pt=function(mt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),Dn=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Dn)>Xe&&(Dn=Xe.toString()),mt.target.textContent=Dn,Number(Dn)<1&&(Dn="1"),ae.setDate(Number(Dn))},bt=function(mt){var Xe=mt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);mt.target.textContent=Xe,ae.setFullYear(Number(Xe))},xt=function(mt){gt(ae)},sn=function(mt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+mt+1,0).getDate();ae.getDate()>Xe&&ae.setDate(Xe),ae.setMonth(ae.getMonth()+mt),gt(ae)},In=function(mt){ae.setDate(ae.getDate()+mt),gt(ae)},wo=function(mt){var Xe=ae.getFullYear()+mt;Xe<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+mt),gt(ae)},ir=document.createElement("div"),ka=S();ir.id=ka;var ui=document.createElement("div");ui.classList.add(h.classes.backgroundInfo);var Vt=document.createElement("div");Vt.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=xe;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=xe;var wn=document.createElement("div");wn.classList.add(h.classes.button),wn.classList.add(h.classes.elementThird),wn.classList.add(h.classes.dateSelectorUp),wn.innerHTML=xe,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",xt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",xt),de.innerHTML=ae.getFullYear();var hr=document.createElement("div");hr.classList.add(h.classes.button),hr.classList.add(h.classes.elementThird),hr.innerHTML=xe;var br=document.createElement("div");br.classList.add(h.classes.button),br.classList.add(h.classes.elementThird),br.innerHTML=xe;var Pa=document.createElement("div");Pa.classList.add(h.classes.button),Pa.classList.add(h.classes.elementThird),Pa.innerHTML=xe,Hn.onclick=function(){return sn(1)},Yt.onclick=function(){return In(1)},wn.onclick=function(){return wo(1)},hr.onclick=function(){return sn(-1)},br.onclick=function(){return In(-1)},Pa.onclick=function(){return wo(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){_(ka,re),N(),Y?Y(ae):W&&W(ae)};var Tr=document.createElement("div");Tr.classList.add(h.classes.button),Tr.classList.add(h.classes.elementHalf),Tr.classList.add(h.classes.backgroundError),Tr.innerHTML=ee,Tr.onclick=function(){_(ka,re),N(),Te?Te(ae):$&&$(ae)},Vt.appendChild(Hn),Vt.appendChild(Yt),Vt.appendChild(wn),Vt.appendChild(ze),Vt.appendChild(_e),Vt.appendChild(de),Vt.appendChild(hr),Vt.appendChild(br),Vt.appendChild(Pa),ui.appendChild(Vt),ir.appendChild(ui),ir.appendChild(un),ir.appendChild(Tr),ir.listener=function(mt){A(mt)?un.click():v(mt)&&Tr.click()},O(ir,re),k(ir,re)};p.default={alert:q,force:F,confirm:C,input:P,select:U,date:H,setOptions:E,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),Uf={};ex(Uf,{default:()=>du});var nx=zf(Nf());tx(Uf,zf(Nf()));var{default:Of,...rx}=nx,du=Of!==void 0?Of:rx;d();d();var pu=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Lo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function Bd(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function qf(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;igi[t.toLowerCase()]||Gn[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),ax=t=>Object.keys(gi).find(e=>gi[e]===t),ix=t=>Object.keys(Gn).find(e=>Gn[e]===t);function $f(t){Kf=t||"all"}function _o(){return Kf||"all"}function ox(){return rt.slice(0)}function sx(){return rt.map(t=>ax(t)||ix(t)||String.fromCharCode(t))}function ux(){let t=[];return Object.keys(ft).forEach(e=>{ft[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Fo(o))})})}),t}function lx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function cx(t){return typeof t=="string"&&(t=Fo(t)),rt.indexOf(t)!==-1}function dx(t,e){let n,r;t||(t=_o());for(let a in ft)if(Object.prototype.hasOwnProperty.call(ft,a))for(n=ft[a],r=0;r=0&&rt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&rt.splice(0,rt.length),(e===93||e===224)&&(e=91),e in zt){zt[e]=!1;for(let r in Gn)Gn[r]===e&&(wr[r]=!1)}}function Vf(t,...e){if(typeof t>"u")Object.keys(ft).forEach(n=>delete ft[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&Rd(n)});else if(typeof t=="object")t.key&&Rd(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),Rd({key:t,scope:n,method:r,splitKey:"+"})}}var Rd=({key:t,scope:e,method:n,splitKey:r="+"})=>{Id(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Fo(u);if(!ft[l])return;e||(e=_o());let c=s>1?Bd(Gn,o):[];ft[l]=ft[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&qf(p.mods,c)))})};function Hf(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in zt)Object.prototype.hasOwnProperty.call(zt,i)&&(!zt[i]&&e.mods.indexOf(+i)>-1||zt[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!zt[16]&&!zt[18]&&!zt[17]&&!zt[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(rt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function Wf(t,e){let n=ft["*"],r=t.keyCode||t.which||t.charCode;if(!wr.filter.call(this,t))return;if((r===93||r===224)&&(r=91),rt.indexOf(r)===-1&&r!==229&&rt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=gu[i];t[i]&&rt.indexOf(o)===-1?rt.push(o):!t[i]&&rt.indexOf(o)>-1?rt.splice(rt.indexOf(o),1):i==="metaKey"&&t[i]&&rt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(rt=rt.slice(rt.indexOf(o))))}),r in zt){zt[r]=!0;for(let i in Gn)Gn[i]===r&&(wr[i]=!0);if(!n)return}for(let i in zt)Object.prototype.hasOwnProperty.call(zt,i)&&(zt[i]=t[gu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(rt.indexOf(17)===-1&&rt.push(17),rt.indexOf(18)===-1&&rt.push(18),zt[17]=!0,zt[18]=!0);let a=_o();if(n)for(let i=0;i-1}function wr(t,e,n){rt=[];let r=Id(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,m=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(m=!0)),typeof e=="string"&&(i=e),m&&Vf(t,i);s1&&(a=Bd(Gn,t)),t=t[t.length-1],t=t==="*"?"*":Fo(t),t in ft||(ft[t]=[]),ft[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!gx(o)&&window&&(Gf.push(o),Lo(o,"keydown",g=>{Wf(g,o)},p),jf||(jf=!0,Lo(window,"focus",()=>{rt=[]},p),Lo(window,"click",()=>{rt=[]},!1)),Lo(o,"keyup",g=>{Wf(g,o),px(g)},p))}function mx(t,e="all"){Object.keys(ft).forEach(n=>{ft[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var Od={getPressedKeyString:sx,setScope:$f,getScope:_o,deleteScope:dx,getPressedKeyCodes:ox,getAllKeyCodes:ux,isPressed:cx,filter:lx,trigger:mx,unbind:Vf,keyMap:gi,modifier:Gn,modifierMap:gu};for(let t in Od)Object.prototype.hasOwnProperty.call(Od,t)&&(wr[t]=Od[t]);if(typeof window<"u"){let t=window.hotkeys;wr.noConflict=e=>(e&&window.hotkeys===wr&&(window.hotkeys=t),wr),window.hotkeys=wr}var vn=wr;d();d();var fx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},Qf={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Kr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return fx[t]}static getBrowserTypeByAlias(t){return Qf[t]||""}},at=/version\/(\d+(\.?_?\d+)+)/i,hx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(at,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(at,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],bx=hx,Tx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:dn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:dn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:dn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:dn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:dn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:dn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:dn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:dn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:dn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:dn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:dn.PlayStation4,version:e}}}],yx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],vx=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Kr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Kr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Kr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Kr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Kr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Kr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Kr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],Sx=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(bx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Tx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(yx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(vx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},Yf=Sx,xx=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new Yf(t,e)}static parse(t){return new Yf(t).getResult()}static get BROWSER_MAP(){return Qf}static get ENGINE_MAP(){return Kr}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},mi=xx;d();d();var{entries:ah,setPrototypeOf:Jf,isFrozen:Ex,getPrototypeOf:Cx,getOwnPropertyDescriptor:wx}=Object,{freeze:pn,seal:Vn,create:Dx}=Object,{apply:Hd,construct:Wd}=typeof Reflect<"u"&&Reflect;Hd||(Hd=function(t,e,n){return t.apply(e,n)});pn||(pn=function(t){return t});Vn||(Vn=function(t){return t});Wd||(Wd=function(t,e){return new t(...e)});var Ax=zn(Array.prototype.forEach),Zf=zn(Array.prototype.pop),Mo=zn(Array.prototype.push),hu=zn(String.prototype.toLowerCase),zd=zn(String.prototype.toString),kx=zn(String.prototype.match),$n=zn(String.prototype.replace),Px=zn(String.prototype.indexOf),Lx=zn(String.prototype.trim),An=zn(RegExp.prototype.test),Bo=_x(TypeError);function zn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Rx=Vn(/\${[\w\W]*}/gm),Ox=Vn(/^data-[\-\w.\u00B7-\uFFFF]/),zx=Vn(/^aria-[\-\w]+$/),ih=Vn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nx=Vn(/^(?:\w+script|data):/i),Ux=Vn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),oh=Vn(/^html$/i),rh=Object.freeze({__proto__:null,MUSTACHE_EXPR:Bx,ERB_EXPR:Ix,TMPLIT_EXPR:Rx,DATA_ATTR:Ox,ARIA_ATTR:zx,IS_ALLOWED_URI:ih,IS_SCRIPT_OR_DATA:Nx,ATTR_WHITESPACE:Ux,DOCTYPE_NAME:oh}),qx=()=>typeof window>"u"?null:window,jx=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function sh(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qx(),e=R=>sh(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:m,trustedTypes:g}=t,f=u.prototype,T=mu(f,"cloneNode"),b=mu(f,"nextSibling"),h=mu(f,"childNodes"),E=mu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:I,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:L}=a,{importNode:A}=n,v={};e.isSupported=typeof ah=="function"&&typeof E=="function"&&I&&I.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:_,TMPLIT_EXPR:k,DATA_ATTR:N,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:F}=rh,{IS_ALLOWED_URI:C}=rh,P=null,U=Oe({},[...Xf,...Nd,...Ud,...qd,...eh]),H=null,j=Oe({},[...th,...jd,...nh,...fu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),$=null,ue=null,ae=!0,J=!0,ie=!1,ge=!0,ee=!1,Y=!1,Te=!1,ne=!1,re=!1,xe=!1,ze=!1,_e=!0,de=!1,gt="user-content-",Pt=!0,bt=!1,xt={},sn=null,In=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),wo=null,ir=Oe({},["audio","video","img","source","image","track"]),ka=null,ui=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",wn=Yt,hr=!1,br=null,Pa=Oe({},[Vt,Hn,Yt],zd),un,Tr=["application/xhtml+xml","text/html"],mt="text/html",Xe,Dn=null,Y9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},ld=function(R){if(!(Dn&&Dn===R)){if((!R||typeof R!="object")&&(R={}),R=fi(R),un=Tr.indexOf(R.PARSER_MEDIA_TYPE)===-1?un=mt:un=R.PARSER_MEDIA_TYPE,Xe=un==="application/xhtml+xml"?zd:hu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Xe):U,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Xe):j,br="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,zd):Pa,ka="ADD_URI_SAFE_ATTR"in R?Oe(fi(ui),R.ADD_URI_SAFE_ATTR,Xe):ui,wo="ADD_DATA_URI_TAGS"in R?Oe(fi(ir),R.ADD_DATA_URI_TAGS,Xe):ir,sn="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Xe):In,$="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Xe):{},ue="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Xe):{},xt="USE_PROFILES"in R?R.USE_PROFILES:!1,ae=R.ALLOW_ARIA_ATTR!==!1,J=R.ALLOW_DATA_ATTR!==!1,ie=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,re=R.RETURN_DOM||!1,xe=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ne=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,de=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,bt=R.IN_PLACE||!1,C=R.ALLOWED_URI_REGEXP||ih,wn=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(J=!1),xe&&(re=!0),xt&&(P=Oe({},[...eh]),H=[],xt.html===!0&&(Oe(P,Xf),Oe(H,th)),xt.svg===!0&&(Oe(P,Nd),Oe(H,jd),Oe(H,fu)),xt.svgFilters===!0&&(Oe(P,Ud),Oe(H,jd),Oe(H,fu)),xt.mathMl===!0&&(Oe(P,qd),Oe(H,nh),Oe(H,fu))),R.ADD_TAGS&&(P===U&&(P=fi(P)),Oe(P,R.ADD_TAGS,Xe)),R.ADD_ATTR&&(H===j&&(H=fi(H)),Oe(H,R.ADD_ATTR,Xe)),R.ADD_URI_SAFE_ATTR&&Oe(ka,R.ADD_URI_SAFE_ATTR,Xe),R.FORBID_CONTENTS&&(sn===In&&(sn=fi(sn)),Oe(sn,R.FORBID_CONTENTS,Xe)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete $.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Bo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Bo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=jx(g,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));pn&&pn(R),Dn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),Q9=Oe({},["title","style","font","a","script"]),Zs=Oe({},Nd);Oe(Zs,Ud),Oe(Zs,Fx);let cd=Oe({},qd);Oe(cd,Mx);let J9=function(R){let le=E(R);(!le||!le.tagName)&&(le={namespaceURI:wn,tagName:"template"});let Z=hu(R.tagName),Ge=hu(le.tagName);return br[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?Z==="svg":le.namespaceURI===Vt?Z==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Zs[Z]:R.namespaceURI===Vt?le.namespaceURI===Yt?Z==="math":le.namespaceURI===Hn?Z==="math"&&lf[Ge]:!!cd[Z]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===Vt&&!uf[Ge]?!1:!cd[Z]&&(Q9[Z]||!Zs[Z]):!!(un==="application/xhtml+xml"&&br[R.namespaceURI]):!1},li=function(R){Mo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},dd=function(R,le){try{Mo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Mo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(re||xe)try{li(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,Z;if(ne)R=""+R;else{let ln=kx(R,/^[\r\n\t ]+/);Z=ln&&ln[0]}un==="application/xhtml+xml"&&wn===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(wn===Yt)try{le=new m().parseFromString(Ge,un)}catch{}if(!le||!le.documentElement){le=I.createDocument(wn,"template",null);try{le.documentElement.innerHTML=hr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&Z&&Lt.insertBefore(a.createTextNode(Z),Lt.childNodes[0]||null),wn===Yt?L.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Z9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},Xs=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},yr=function(R,le,Z){v[R]&&Ax(v[R],Ge=>{Ge.call(e,le,Z,Dn)})},pf=function(R){let le;if(yr("beforeSanitizeElements",R,null),Z9(R))return li(R),!0;let Z=Xe(R.nodeName);if(yr("uponSanitizeElement",R,{tagName:Z,allowedTags:P}),R.hasChildNodes()&&!Xs(R.firstElementChild)&&(!Xs(R.content)||!Xs(R.content.firstElementChild))&&An(/<[/\w]/g,R.innerHTML)&&An(/<[/\w]/g,R.textContent))return li(R),!0;if(!P[Z]||$[Z]){if(!$[Z]&&mf(Z)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z)))return!1;if(Pt&&!sn[Z]){let Ge=E(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let ln=Lt.length;for(let yn=ln-1;yn>=0;--yn)Ge.insertBefore(T(Lt[yn],!0),b(R))}}return li(R),!0}return R instanceof u&&!J9(R)||(Z==="noscript"||Z==="noembed")&&An(/<\/no(script|embed)/i,R.innerHTML)?(li(R),!0):(ee&&R.nodeType===3&&(le=R.textContent,le=$n(le,O," "),le=$n(le,_," "),le=$n(le,k," "),R.textContent!==le&&(Mo(e.removed,{element:R.cloneNode()}),R.textContent=le)),yr("afterSanitizeElements",R,null),!1)},gf=function(R,le,Z){if(_e&&(le==="id"||le==="name")&&(Z in a||Z in Y9))return!1;if(!(J&&!ue[le]&&An(N,le))&&!(ae&&An(z,le))){if(!H[le]||ue[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&An(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&An(W.tagNameCheck,Z)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Z))))return!1}else if(!ka[le]&&!An(C,$n(Z,F,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&Px(Z,"data:")===0&&wo[R])&&!(ie&&!An(q,$n(Z,F,"")))&&Z)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,Z,Ge,Lt;yr("beforeSanitizeAttributes",R,null);let{attributes:ln}=R;if(!ln)return;let yn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=ln.length;Lt--;){le=ln[Lt];let{name:Rt,namespaceURI:ci}=le;if(Z=Rt==="value"?le.value:Lx(le.value),Ge=Xe(Rt),yn.attrName=Ge,yn.attrValue=Z,yn.keepAttr=!0,yn.forceKeepAttr=void 0,yr("uponSanitizeAttribute",R,yn),Z=yn.attrValue,yn.forceKeepAttr||(dd(Rt,R),!yn.keepAttr))continue;if(!ge&&An(/\/>/i,Z)){dd(Rt,R);continue}ee&&(Z=$n(Z,O," "),Z=$n(Z,_," "),Z=$n(Z,k," "));let hf=Xe(R.nodeName);if(gf(hf,Ge,Z)){if(de&&(Ge==="id"||Ge==="name")&&(dd(Rt,R),Z=gt+Z),D&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!ci)switch(g.getAttributeType(hf,Ge)){case"TrustedHTML":{Z=D.createHTML(Z);break}case"TrustedScriptURL":{Z=D.createScriptURL(Z);break}}try{ci?R.setAttributeNS(ci,Rt,Z):R.setAttribute(Rt,Z),Zf(e.removed)}catch{}}}yr("afterSanitizeAttributes",R,null)},X9=function R(le){let Z,Ge=df(le);for(yr("beforeSanitizeShadowDOM",le,null);Z=Ge.nextNode();)yr("uponSanitizeShadowNode",Z,null),!pf(Z)&&(Z.content instanceof i&&R(Z.content),ff(Z));yr("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Z,Ge,Lt,ln;if(hr=!R,hr&&(R=""),typeof R!="string"&&!Xs(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Bo("dirty is not a string, aborting")}else throw Bo("toString is not a function");if(!e.isSupported)return R;if(Te||ld(le),e.removed=[],typeof R=="string"&&(bt=!1),bt){if(R.nodeName){let ci=Xe(R.nodeName);if(!P[ci]||$[ci])throw Bo("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)Z=cf(""),Ge=Z.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Z=Ge:Z.appendChild(Ge);else{if(!re&&!ee&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(Z=cf(R),!Z)return re?null:ze?M:""}Z&&ne&&li(Z.firstChild);let yn=df(bt?R:Z);for(;Lt=yn.nextNode();)pf(Lt)||(Lt.content instanceof i&&X9(Lt.content),ff(Lt));if(bt)return R;if(re){if(xe)for(ln=y.call(Z.ownerDocument);Z.firstChild;)ln.appendChild(Z.firstChild);else ln=Z;return(H.shadowroot||H.shadowrootmod)&&(ln=A.call(n,ln,!0)),ln}let Rt=Y?Z.outerHTML:Z.innerHTML;return Y&&P["!doctype"]&&Z.ownerDocument&&Z.ownerDocument.doctype&&Z.ownerDocument.doctype.name&&An(oh,Z.ownerDocument.doctype.name)&&(Rt=" +`+Rt),ee&&(Rt=$n(Rt,O," "),Rt=$n(Rt,_," "),Rt=$n(Rt,k," ")),D&&ze?D.createHTML(Rt):Rt},e.setConfig=function(R){ld(R),Te=!0},e.clearConfig=function(){Dn=null,Te=!1},e.isValidAttribute=function(R,le,Z){Dn||ld({});let Ge=Xe(R),Lt=Xe(le);return gf(Ge,Lt,Z)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Mo(v[R],le))},e.removeHook=function(R){if(v[R])return Zf(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var Ye=sh();d();d();var Hx=Object.create,Gd=Object.defineProperty,Wx=Object.getOwnPropertyDescriptor,Kx=Object.getOwnPropertyNames,Gx=Object.getPrototypeOf,$x=Object.prototype.hasOwnProperty,$d=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vx=(t,e)=>{for(var n in e)Gd(t,n,{get:e[n],enumerable:!0})},Kd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Kx(e))!$x.call(t,a)&&a!==n&&Gd(t,a,{get:()=>e[a],enumerable:!(r=Wx(e,a))||r.enumerable});return t},Yx=(t,e,n)=>(Kd(t,e,"default"),n&&Kd(n,e,"default")),lh=(t,e,n)=>(n=t!=null?Hx(Gx(t)):{},Kd(e||!t||!t.__esModule?Gd(n,"default",{value:t,enumerable:!0}):n,t)),Qx=$d((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var m=this._doc.createElement("span");l.firstChild;)m.appendChild(l.firstChild);l.parentNode.replaceChild(m,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),m=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),m){var g=m.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",g)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(g){return g.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var m=s(a);return m<=4&&(!o||m!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,m=l.firstChild;m;){var g=m.nextSibling;if(this._isPhrasingContent(m))p!==null?p.appendChild(m):this._isWhitespace(m)||(p=a.createElement("p"),l.replaceChild(p,m),p.appendChild(m));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}m=g}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var xe=this._getInnerText(re);if(!(xe.length<25)){var ze=this._getNodeAncestors(re,5);if(ze.length!==0){var _e=0;_e+=1,_e+=xe.split(",").length,_e+=Math.min(Math.floor(xe.length/100),3),this._forEachNode(ze,function(de,gt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),T.push(de)),gt===0)var Pt=1;else gt===1?Pt=2:Pt=gt*3;de.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,E=T.length;hS.readability.contentScore){b.splice(I,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,L=!1,A;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],O=1;O=.75&&v.push(this._getNodeAncestors(b[O]));var _=3;if(v.length>=_)for(A=y.parentNode;A.tagName!=="BODY";){for(var k=0,N=0;N=_){y=A;break}A=A.parentNode}y.readability||this._initializeNode(y),A=y.parentNode;for(var z=y.readability.contentScore,q=z/3;A.tagName!=="BODY";){if(!A.readability){A=A.parentNode;continue}var F=A.readability.contentScore;if(Fz){y=A;break}z=A.readability.contentScore,A=A.parentNode}for(A=y.parentNode;A.tagName!="BODY"&&A.children.length==1;)y=A,A=y.parentNode;y.readability||this._initializeNode(y)}var C=a.createElement("DIV");i&&(C.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);A=y.parentNode;for(var U=A.children,H=0,j=U.length;H=P)$=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),J=this._getInnerText(W),ie=J.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&J.search(/\.( |$)/)!==-1)&&($=!0)}}$&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),C.appendChild(W),U=A.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+C.innerHTML),this._prepArticle(C),this._debug&&this.log("Article content post-prep: "+C.innerHTML),L)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";C.firstChild;)ge.appendChild(C.firstChild);C.appendChild(ge)}this._debug&&this.log("Article content after paging: "+C.innerHTML);var ee=!0,Y=this._getInnerText(C,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(m){return(m["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(m){return m&&typeof m.name=="string"}).map(function(m){return m.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(m){this.log(m.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),m=l.getAttribute("content");if(m){var g=null,f=null;p&&(g=p.match(s),g&&(f=g[0].toLowerCase().replace(/\s/g,""),i[f]=m.trim())),!g&&c&&u.test(c)&&(f=c,m&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=m.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],m=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(m)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var g=this._getRowAndColumnCount(o);if(g.rows>=10||g.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=g.rows*g.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(A){return A._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,A=>u+=this._getInnerText(A).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var m=i.getElementsByTagName("p").length,g=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,E=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&m/g<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>m||T>Math.floor(m/3)||!s&&b<.9&&S<25&&(g===0||g>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&I>.2||c>=25&&I>.5||h===1&&S<75||h>1;if(s&&y){for(var L=0;L1)return y;let A=i.getElementsByTagName("li").length;if(g==A)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),Jx=$d((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(m){c.add(m.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(m){if(!o.visibilityChecker(m))return!1;var g=m.className+" "+m.id;if(n.unlikelyCandidates.test(g)&&!n.okMaybeItsACandidate.test(g)||m.matches("li p"))return!1;var f=m.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),ch=$d((t,e)=>{var n=Qx(),r=Jx();e.exports={Readability:n,isProbablyReaderable:r}}),dh={};Vx(dh,{Readability:()=>bu,default:()=>mh,isProbablyReaderable:()=>gh});var ph=lh(ch());Yx(dh,lh(ch()));var{Readability:bu,isProbablyReaderable:gh}=ph,{default:uh,...Zx}=ph,mh=uh!==void 0?uh:Zx;var Na={};eu(Na,{Breadcrumbs:()=>Vr,BrowserClient:()=>Ci,Dedupe:()=>Zr,FunctionToString:()=>Ra,GlobalHandlers:()=>cr,HttpContext:()=>Jr,Hub:()=>_r,InboundFilters:()=>Oa,Integrations:()=>FC,LinkedErrors:()=>Qr,SDK_VERSION:()=>Ei,Scope:()=>Nn,TryCatch:()=>Yr,addBreadcrumb:()=>Pu,addGlobalEventProcessor:()=>lr,captureEvent:()=>Au,captureException:()=>Si,captureMessage:()=>Du,chromeStackLineParser:()=>w0,close:()=>D4,configureScope:()=>ku,createTransport:()=>$o,defaultIntegrations:()=>F0,defaultStackLineParsers:()=>k0,defaultStackParser:()=>qu,flush:()=>w4,forceLoad:()=>E4,geckoStackLineParser:()=>D0,getCurrentHub:()=>Le,getHubFromCarrier:()=>Un,init:()=>v4,lastEventId:()=>x4,makeFetchTransport:()=>Vo,makeMain:()=>vi,onLoad:()=>C4,opera10StackLineParser:()=>o4,opera11StackLineParser:()=>s4,setContext:()=>Lu,setExtra:()=>Fu,setExtras:()=>_u,setTag:()=>Bu,setTags:()=>Mu,setUser:()=>Iu,showReportDialog:()=>S4,startTransaction:()=>Ru,winjsStackLineParser:()=>A0,withScope:()=>xi,wrap:()=>A4});d();d();d();d();d();d();d();d();d();var fh=Object.prototype.toString;function Tu(t){switch(fh.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return or(t,Error)}}function Io(t,e){return fh.call(t)===`[object ${e}]`}function yu(t){return Io(t,"ErrorEvent")}function hh(t){return Io(t,"DOMException")}function Dr(t){return Io(t,"String")}function Ro(t){return t===null||typeof t!="object"&&typeof t!="function"}function Yn(t){return Io(t,"Object")}function Oo(t){return typeof Event<"u"&&or(t,Event)}function bh(t){return!1}function Th(t){return Io(t,"RegExp")}function hi(t){return!!(t&&t.then&&typeof t.then=="function")}function yh(t){return Yn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function vh(t){return typeof t=="number"&&t!==t}function or(t,e){try{return t instanceof e}catch{return!1}}function zo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function Xx(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Dr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return xh({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function xh(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function rE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!tE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function vu(t){let e=typeof t=="string"?nE(t):xh(t);return rE(e),e}d();var aE={};function it(){return typeof window<"u"?window:typeof self<"u"?self:aE}function bi(t,e,n){let r=n||it(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var No=["debug","info","warn","error","log","assert","trace"];function Vd(t){if(!("console"in it()))return t();let n=console,r={};No.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function Eh(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?No.forEach(n=>{e[n]=(...r)=>{t&&Vd(()=>{})}}):No.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=bi("logger",Eh):Se=Eh();d();d();function Ma(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function Yd(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function Zd(t){if(Tu(t))return{message:t.message,name:t.name,stack:t.stack,...wh(t)};if(Oo(t)){let e={type:t.type,target:Ch(t.target),currentTarget:Ch(t.currentTarget),...wh(t)};return typeof CustomEvent<"u"&&or(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function Ch(t){try{return bh(t)?zo(t):Object.prototype.toString.call(t)}catch{return""}}function wh(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ah(t,e=40){let n=Object.keys(Zd(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Ma(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:Ma(a,e)}return""}function Ba(t){return Qd(t,new Map)}function Qd(t,e){if(Yn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=Qd(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(Qd(a,e))}),r}return t}d();var iE=50;function e0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return oE(a)}}function kh(t){return Array.isArray(t)?e0(...t):t}function oE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,iE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var Xd="";function Jn(t){try{return!t||typeof t!="function"?Xd:t.name||Xd}catch{return Xd}}d();function Ph(){if(!("fetch"in it()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Lh(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function _h(){return!0}var Ar=it(),qo={},Fh={};function sE(t){if(!Fh[t])switch(Fh[t]=!0,t){case"console":uE();break;case"fetch":lE();break;case"error":pE();break;case"unhandledrejection":gE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function Zn(t,e){qo[t]=qo[t]||[],qo[t].push(e),sE(t)}function yi(t,e){if(!(!t||!qo[t]))for(let n of qo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${Jn(n)} -Error:`,r)}}function uE(){"console"in Ar&&zo.forEach(function(t){t in console&&Qn(console,t,function(e){return function(...n){yi("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function lE(){_h()&&Qn(Ar,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:cE(e),url:dE(e)},startTimestamp:Date.now()};return yi("fetch",{...n}),t.apply(Ar,e).then(r=>(yi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function cE(t=[]){return"Request"in Ar&&or(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function dE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Ar&&or(t[0],Request)?t[0].url:String(t[0])}var n0=null;function pE(){n0=Ar.onerror,Ar.onerror=function(t,e,n,r,a){return yi("error",{column:r,error:a,line:n,msg:t,url:e}),n0?n0.apply(this,arguments):!1}}var r0=null;function gE(){r0=Ar.onunhandledrejection,Ar.onunhandledrejection=function(t){return yi("unhandledrejection",t),r0?r0.apply(this,arguments):!0}}d();function Mh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function xu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function Bh(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Pr(t){let{message:e,event_id:n}=t;if(e)return e;let r=Bh(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function qo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Gr(t,e){let n=Bh(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function a0(t){if(t&&t.__sentry_captured__)return!0;try{No(t,"__sentry_captured__",!0)}catch{}return!1}d();function Ih(){return!1}d();function Lr(t,e=1/0,n=1/0){try{return i0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function o0(t,e=3,n=100*1024){let r=Lr(t,e);return hE(r)>n?o0(t,e-1,n):r}function i0(t,e,n=1/0,r=1/0,a=Mh()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!vh(e))return e;let s=mE(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return i0("",m,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=Xd(e);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(c>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=i0(m,g,n-1,r,a),c+=1}return o(e),l}function mE(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":yh(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Jn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function fE(t){return~-encodeURI(t).split(/%..|./).length}function hE(t){return fE(JSON.stringify(t))}d();d();d();function Sn(t){return new sr(e=>{e(t)})}function jo(t){return new sr((e,n)=>{n(t)})}var sr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(hi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Rh(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new sr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{Sn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var bE=["fatal","error","warning","log","info","debug"];function Oh(t){return t==="warn"?"warning":bE.includes(t)?t:"log"}d();var u0={nowSeconds:()=>Date.now()/1e3};function TE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var s0=TE(),zh=s0===void 0?u0:{nowSeconds:()=>(s0.timeOrigin+s0.now())/1e3},Vr=u0.nowSeconds.bind(u0),l0=zh.nowSeconds.bind(zh);var Eu,DF=(()=>{if(!performance||!performance.now){Eu="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function c0(t,e){return(e||new TextEncoder).encode(t)}function Cu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[c0(a,e),o]:a.push(typeof o=="string"?c0(o,e):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function uE(){"console"in Ar&&No.forEach(function(t){t in console&&Qn(console,t,function(e){return function(...n){yi("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function lE(){_h()&&Qn(Ar,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:cE(e),url:dE(e)},startTimestamp:Date.now()};return yi("fetch",{...n}),t.apply(Ar,e).then(r=>(yi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function cE(t=[]){return"Request"in Ar&&or(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function dE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Ar&&or(t[0],Request)?t[0].url:String(t[0])}var t0=null;function pE(){t0=Ar.onerror,Ar.onerror=function(t,e,n,r,a){return yi("error",{column:r,error:a,line:n,msg:t,url:e}),t0?t0.apply(this,arguments):!1}}var n0=null;function gE(){n0=Ar.onunhandledrejection,Ar.onunhandledrejection=function(t){return yi("unhandledrejection",t),n0?n0.apply(this,arguments):!0}}d();function Mh(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function xu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function Bh(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Pr(t){let{message:e,event_id:n}=t;if(e)return e;let r=Bh(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function jo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Gr(t,e){let n=Bh(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function r0(t){if(t&&t.__sentry_captured__)return!0;try{Uo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Ih(){return!1}d();function Lr(t,e=1/0,n=1/0){try{return a0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function i0(t,e=3,n=100*1024){let r=Lr(t,e);return hE(r)>n?i0(t,e-1,n):r}function a0(t,e,n=1/0,r=1/0,a=Mh()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!vh(e))return e;let s=mE(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return a0("",m,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=Zd(e);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(c>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=a0(m,g,n-1,r,a),c+=1}return o(e),l}function mE(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":yh(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Jn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function fE(t){return~-encodeURI(t).split(/%..|./).length}function hE(t){return fE(JSON.stringify(t))}d();d();d();function Sn(t){return new sr(e=>{e(t)})}function Ho(t){return new sr((e,n)=>{n(t)})}var sr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(hi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Rh(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new sr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{Sn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var bE=["fatal","error","warning","log","info","debug"];function Oh(t){return t==="warn"?"warning":bE.includes(t)?t:"log"}d();var s0={nowSeconds:()=>Date.now()/1e3};function TE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var o0=TE(),zh=o0===void 0?s0:{nowSeconds:()=>(o0.timeOrigin+o0.now())/1e3},$r=s0.nowSeconds.bind(s0),u0=zh.nowSeconds.bind(zh);var Eu,DF=(()=>{if(!performance||!performance.now){Eu="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function l0(t,e){return(e||new TextEncoder).encode(t)}function Cu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[l0(a,e),o]:a.push(typeof o=="string"?l0(o,e):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:yE(a)}function yE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function Uh(t,e){let n=typeof t.data=="string"?c0(t.data,e):t.data;return[Ba({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var vE={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function p0(t){return vE[t]}d();function qh(t,e,n){let r=[{type:"client_report"},{timestamp:n||Vr(),discarded_events:t}];return Ia(e?{dsn:e}:{},[r])}d();var SE=60*1e3;function xE(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?SE:r-e}function EE(t,e){return t[e]||t.all||0}function jh(t,e,n=Date.now()){return EE(t,e)>n}function Hh(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let m of l.split(";"))a[m]=r+p}else o?a.all=r+xE(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Wh(t){return t[0]}d();function g0(t){let e=l0(),n={sid:kr(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CE(n)};return t&&ur(n,t),n}function ur(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||l0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:kr()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function m0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),ur(t,n)}function CE(t){return Ba({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Kh=100,Nn=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ur(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Yn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Kh):Kh;if(r<=0)return this;let a={timestamp:Vr(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Gh(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new sr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),hi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Gh(){return bi("globalEventProcessors",()=>[])}function lr(t){Gh().push(t)}d();d();var f0=4,wE=100,_r=class{constructor(e,n=new Nn,r=f0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:kr(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:kr();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=wE}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:Vr(),...e},l=i?Yd(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=vi(this);try{e(this)}finally{vi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&m0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=at(),{userAgent:s}=o.navigator||{},u=g0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ur(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=Ho().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Ho(){let t=at();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function vi(t){let e=Ho(),n=Un(e);return wu(e,t),n}function Le(){let t=Ho();return(!Vh(t)||Un(t).isOlderThan(f0))&&wu(t,new _r),Ih()?DE(t):Un(t)}function DE(t){try{let e=Ho().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return Un(t);if(!Vh(n)||Un(n).isOlderThan(f0)){let r=Un(t).getStackTop();wu(n,new _r(r.client,Nn.clone(r.scope)))}return Un(n)}catch{return Un(t)}}function Vh(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Un(t){return bi("hub",()=>new _r,t)}function wu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Si(t,e){return Le().captureException(t,{captureContext:e})}function Du(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Au(t,e){return Le().captureEvent(t,e)}function ku(t){Le().configureScope(t)}function Pu(t){Le().addBreadcrumb(t)}function Lu(t,e){Le().setContext(t,e)}function _u(t){Le().setExtras(t)}function Fu(t,e){Le().setExtra(t,e)}function Mu(t){Le().setTags(t)}function Bu(t,e){Le().setTag(t,e)}function Iu(t){Le().setUser(t)}function xi(t){Le().withScope(t)}function Ru(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var AE="7";function $h(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function kE(t){return`${$h(t)}${t.projectId}/envelope/`}function PE(t,e){return Dh({sentry_key:t.publicKey,sentry_version:AE,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Wo(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${kE(t)}?${PE(t,r)}`}function h0(t,e){let n=vu(t),r=`${$h(n)}embed/error-page/`,a=`dsn=${Fa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Yh(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function LE(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Qh(t,e,n,r){let a=Yh(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:Fa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Ia(i,[o])}function Jh(t,e,n,r){let a=Yh(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};LE(t,n&&n.sdk);let l=_E(t,a,r,e);return delete t.sdkProcessingMetadata,Ia(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function _E(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Wh(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:Fa(r)},...t.type==="transaction"&&i&&{trace:Ba({...i})}}}d();var Zh=[];function Xh(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function b0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Xh(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Xh(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function e4(t){let e={};return t.forEach(n=>{e[n.name]=n,Zh.indexOf(n.name)===-1&&(n.setupOnce(lr,Le),Zh.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var t4="Not capturing exception because it's already been captured.",Ko=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=vu(e.dsn);let n=Wo(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(a0(e)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Io(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&a0(n.originalException)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ur(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):Sn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=e4(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=Jh(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Nh(r,Uh(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=Qh(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ur(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new sr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||kr(),timestamp:e.timestamp||Vr()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Nn.clone(s).update(n.captureContext));let u=Sn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Lr(i.data,n,r)}}))},...e.user&&{user:Lr(e.user,n,r)},...e.contexts&&{contexts:Lr(e.contexts,n,r)},...e.extra&&{extra:Lr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Lr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Lr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ma(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ma(s.value,o));let u=e.request;u&&u.url&&(u.url=Ma(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return jo(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),jo(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return FE(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function FE(t){let e="`beforeSend` method has to return `null` or a valid event.";if(hi(t))return t.then(n=>{if(!(Yn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Yn(t)||t===null))throw new Tt(e);return t}d();function T0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var ME=30;function Go(t,e,n=Rh(t.bufferSize||ME)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(d0(o,(p,m)=>{let g=p0(m);jh(r,g)?t.recordDroppedEvent("ratelimit_backoff",g):s.push(p)}),s.length===0)return Sn();let u=Ia(o[0],s),l=p=>{d0(u,(m,g)=>{t.recordDroppedEvent(p,p0(g))})},c=()=>e({body:Cu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Hh(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),Sn();throw p})}return{send:i,flush:a}}d();var Ei="7.7.0";var za={};eu(za,{FunctionToString:()=>Ra,InboundFilters:()=>Oa});d();d();var n4,Ra=class t{static id="FunctionToString";name=t.id;setupOnce(){n4=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ti(this)||this;return n4.apply(n,e)}}};d();var BE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Oa=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=IE(o._options,u);return RE(a,l)?null:a}}return a};r.id=this.name,e(r)}};function IE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...BE],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function RE(t,e){return e.ignoreInternal&&qE(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:yE(a)}function yE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function Uh(t,e){let n=typeof t.data=="string"?l0(t.data,e):t.data;return[Ba({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var vE={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function d0(t){return vE[t]}d();function qh(t,e,n){let r=[{type:"client_report"},{timestamp:n||$r(),discarded_events:t}];return Ia(e?{dsn:e}:{},[r])}d();var SE=60*1e3;function xE(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?SE:r-e}function EE(t,e){return t[e]||t.all||0}function jh(t,e,n=Date.now()){return EE(t,e)>n}function Hh(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let m of l.split(";"))a[m]=r+p}else o?a.all=r+xE(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Wh(t){return t[0]}d();function p0(t){let e=u0(),n={sid:kr(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>CE(n)};return t&&ur(n,t),n}function ur(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||u0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:kr()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function g0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),ur(t,n)}function CE(t){return Ba({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Kh=100,Nn=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&ur(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Yn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Kh):Kh;if(r<=0)return this;let a={timestamp:$r(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Gh(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new sr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),hi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Gh(){return bi("globalEventProcessors",()=>[])}function lr(t){Gh().push(t)}d();d();var m0=4,wE=100,_r=class{constructor(e,n=new Nn,r=m0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:kr(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:kr();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=wE}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:$r(),...e},l=i?Vd(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=vi(this);try{e(this)}finally{vi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&g0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=it(),{userAgent:s}=o.navigator||{},u=p0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ur(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=Wo().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function Wo(){let t=it();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function vi(t){let e=Wo(),n=Un(e);return wu(e,t),n}function Le(){let t=Wo();return(!$h(t)||Un(t).isOlderThan(m0))&&wu(t,new _r),Ih()?DE(t):Un(t)}function DE(t){try{let e=Wo().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return Un(t);if(!$h(n)||Un(n).isOlderThan(m0)){let r=Un(t).getStackTop();wu(n,new _r(r.client,Nn.clone(r.scope)))}return Un(n)}catch{return Un(t)}}function $h(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Un(t){return bi("hub",()=>new _r,t)}function wu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Si(t,e){return Le().captureException(t,{captureContext:e})}function Du(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Au(t,e){return Le().captureEvent(t,e)}function ku(t){Le().configureScope(t)}function Pu(t){Le().addBreadcrumb(t)}function Lu(t,e){Le().setContext(t,e)}function _u(t){Le().setExtras(t)}function Fu(t,e){Le().setExtra(t,e)}function Mu(t){Le().setTags(t)}function Bu(t,e){Le().setTag(t,e)}function Iu(t){Le().setUser(t)}function xi(t){Le().withScope(t)}function Ru(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var AE="7";function Vh(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function kE(t){return`${Vh(t)}${t.projectId}/envelope/`}function PE(t,e){return Dh({sentry_key:t.publicKey,sentry_version:AE,...e&&{sentry_client:`${e.name}/${e.version}`}})}function Ko(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${kE(t)}?${PE(t,r)}`}function f0(t,e){let n=vu(t),r=`${Vh(n)}embed/error-page/`,a=`dsn=${Fa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Yh(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function LE(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Qh(t,e,n,r){let a=Yh(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:Fa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Ia(i,[o])}function Jh(t,e,n,r){let a=Yh(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};LE(t,n&&n.sdk);let l=_E(t,a,r,e);return delete t.sdkProcessingMetadata,Ia(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function _E(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Wh(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:Fa(r)},...t.type==="transaction"&&i&&{trace:Ba({...i})}}}d();var Zh=[];function Xh(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function h0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Xh(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Xh(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function e4(t){let e={};return t.forEach(n=>{e[n.name]=n,Zh.indexOf(n.name)===-1&&(n.setupOnce(lr,Le),Zh.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var t4="Not capturing exception because it's already been captured.",Go=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=vu(e.dsn);let n=Ko(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(r0(e)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Ro(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&r0(n.originalException)){!1&&Se.log(t4);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),ur(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):Sn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=e4(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=Jh(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Nh(r,Uh(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=Qh(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(ur(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new sr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||kr(),timestamp:e.timestamp||$r()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Nn.clone(s).update(n.captureContext));let u=Sn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Lr(i.data,n,r)}}))},...e.user&&{user:Lr(e.user,n,r)},...e.contexts&&{contexts:Lr(e.contexts,n,r)},...e.extra&&{extra:Lr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Lr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Lr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=Ma(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Ma(s.value,o));let u=e.request;u&&u.url&&(u.url=Ma(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Ho(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),Ho(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return FE(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function FE(t){let e="`beforeSend` method has to return `null` or a valid event.";if(hi(t))return t.then(n=>{if(!(Yn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Yn(t)||t===null))throw new Tt(e);return t}d();function b0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var ME=30;function $o(t,e,n=Rh(t.bufferSize||ME)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(c0(o,(p,m)=>{let g=d0(m);jh(r,g)?t.recordDroppedEvent("ratelimit_backoff",g):s.push(p)}),s.length===0)return Sn();let u=Ia(o[0],s),l=p=>{c0(u,(m,g)=>{t.recordDroppedEvent(p,d0(g))})},c=()=>e({body:Cu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Hh(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),Sn();throw p})}return{send:i,flush:a}}d();var Ei="7.7.0";var za={};eu(za,{FunctionToString:()=>Ra,InboundFilters:()=>Oa});d();d();var n4,Ra=class t{static id="FunctionToString";name=t.id;setupOnce(){n4=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ti(this)||this;return n4.apply(n,e)}}};d();var BE=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Oa=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=IE(o._options,u);return RE(a,l)?null:a}}return a};r.id=this.name,e(r)}};function IE(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...BE],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function RE(t,e){return e.ignoreInternal&&qE(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. Event: ${Pr(t)}`),!0):OE(t,e.ignoreErrors)?(!1&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Pr(t)}`),!0):zE(t,e.denyUrls)?(!1&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Pr(t)}. Url: ${Ou(t)}`),!0):NE(t,e.allowUrls)?!1:(!1&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Pr(t)}. -Url: ${Ou(t)}`),!0)}function OE(t,e){return!e||!e.length?!1:UE(t).some(n=>e.some(r=>Su(n,r)))}function zE(t,e){if(!e||!e.length)return!1;let n=Ou(t);return n?e.some(r=>Su(n,r)):!1}function NE(t,e){if(!e||!e.length)return!0;let n=Ou(t);return n?e.some(r=>Su(n,r)):!0}function UE(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Pr(t)}`),[]}return[]}function qE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function jE(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Ou(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?jE(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Pr(t)}`),null}}d();d();function S0(t,e){let n=x0(t,e),r={type:e&&e.name,value:GE(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HE(t,e,n,r){let a={exception:{values:[{type:Ro(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Ah(e)}`}]},extra:{__serialized__:o0(e)}};if(n){let i=x0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function y0(t,e){return{exception:{values:[S0(t,e)]}}}function x0(t,e){let n=e.stacktrace||e.stack||"",r=KE(e);try{return t(n,r)}catch{}return[]}var WE=/Minified React error #\d+;/i;function KE(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(WE.test(t.message))return 1}return 0}function GE(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function r4(t,e,n,r){let a=n&&n.syntheticException||void 0,i=zu(t,e,a,r);return Gr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Sn(i)}function a4(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=v0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Sn(o)}function zu(t,e,n,r,a){let i;if(yu(e)&&e.error)return y0(t,e.error);if(hh(e)){let o=e;if("stack"in e)i=y0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=v0(t,u,n,r),qo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Tu(e)?y0(t,e):Yn(e)||Ro(e)?(i=HE(t,e,n,a),Gr(i,{synthetic:!0}),i):(i=v0(t,e,n,r),qo(i,`${e}`,void 0),Gr(i,{synthetic:!0}),i)}function v0(t,e,n,r){let a={message:e};if(r&&n){let i=x0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var E0="Breadcrumbs",$r=class t{static id=E0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Zn("console",$E),this.options.dom&&Zn("dom",VE(this.options.dom)),this.options.xhr&&Zn("xhr",YE),this.options.fetch&&Zn("fetch",QE),this.options.history&&Zn("history",JE)}};function VE(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Oo(n.event.target,a):Oo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function $E(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Oh(t.level),message:Qd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Qd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function YE(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function QE(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function JE(t){let e=at(),n=t.from,r=t.to,a=xu(e.location.href),i=xu(n),o=xu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var Uu=at(),Nu;function C0(){if(Nu)return Nu;if(Lh(fetch))return Nu=fetch.bind(Uu);let t=Uu.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Nu=e.bind(Uu)}function i4(t,e){Object.prototype.toString.call(Uu&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):Ph()&&C0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var w0=at(),Ci=class extends Ko{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ei}],version:Ei},super(e),e.sendClientReports&&w0.document&&w0.document.addEventListener("visibilitychange",()=>{w0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return r4(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return a4(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(E0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Pr(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=Wo(this._dsn,this._options),r=qh(e,this._options.tunnel&&Fa(this._dsn));try{i4(n,Cu(r))}catch(a){!1&&Se.error(a)}}};d();d();function Vo(t,e=C0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Go(t,n)}d();var wi="?",ZE=10,XE=20,eC=30,tC=40,nC=50;function $o(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var rC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aC=/\((\S*)(?::(\d+))(?::(\d+))\)/,iC=t=>{let e=rC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=aC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=u4(e[1]||wi,e[2]);return $o(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},D0=[eC,iC],oC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uC=t=>{let e=oC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=sC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||wi;return[a,r]=u4(a,r),$o(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},A0=[nC,uC],lC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cC=t=>{let e=lC.exec(t);return e?$o(e[2],e[1]||wi,+e[3],e[4]?+e[4]:void 0):void 0},k0=[tC,cC],dC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pC=t=>{let e=dC.exec(t);return e?$o(e[2],e[3]||wi,+e[1]):void 0},o4=[ZE,pC],gC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mC=t=>{let e=gC.exec(t);return e?$o(e[5],e[3]||e[4]||wi,+e[1],+e[2]):void 0},s4=[XE,mC],P0=[D0,A0,k0],qu=t0(...P0),u4=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:wi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var L0=0;function _0(){return L0>0}function fC(){L0+=1,setTimeout(()=>{L0-=1})}function Fr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ti(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>Fr(o,e));return t.apply(this,i)}catch(i){throw fC(),xi(o=>{o.addEventProcessor(s=>(e.mechanism&&(qo(s,void 0,void 0),Gr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Si(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}Zd(r,t),No(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var F0={};eu(F0,{Breadcrumbs:()=>$r,Dedupe:()=>Zr,GlobalHandlers:()=>cr,HttpContext:()=>Jr,LinkedErrors:()=>Qr,TryCatch:()=>Yr});d();d();var cr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:hC,onunhandledrejection:bC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(vC(n),r(),this._installFunc[n]=void 0)}}};function hC(){Zn("error",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(_0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Dr(a)?yC(a,i,o,s):l4(zu(n,u||a,void 0,r,!1),i,o,s);l.level="error",c4(e,u,l,"onerror")})}function bC(){Zn("unhandledrejection",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(_0()||a&&a.__sentry_own_request__)return!0;let i=Io(a)?TC(a):zu(n,a,void 0,r,!0);i.level="error",c4(e,a,i,"onunhandledrejection")})}function TC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function yC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=yu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),l4({exception:{values:[{type:o,value:i}]}},e,n,r)}function l4(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Dr(e)&&e.length>0?e:Sh();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function vC(t){!1&&Se.log(`Global Handler attached: ${t}`)}function c4(t,e,n,r){Gr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function d4(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var SC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yr=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=at();this._options.setTimeout&&Qn(e,"setTimeout",p4),this._options.setInterval&&Qn(e,"setInterval",p4),this._options.requestAnimationFrame&&Qn(e,"requestAnimationFrame",xC),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Qn(XMLHttpRequest.prototype,"send",EC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:SC).forEach(CC)}};function p4(t){return function(...e){let n=e[0];return e[0]=Fr(n,{mechanism:{data:{function:Jn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function xC(t){return function(e){return t.apply(this,[Fr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Jn(t)},handled:!0,type:"instrument"}})])}}function EC(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Qn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Jn(i)},handled:!0,type:"instrument"}},s=Ti(i);return s&&(o.mechanism.data.handler=Jn(s)),Fr(i,o)})}),t.apply(this,e)}}function CC(t){let e=at(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Qn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Fr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=Fr(i,{mechanism:{data:{function:"addEventListener",handler:Jn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Qn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var wC="cause",DC=5,Qr=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||wC,this._limit=e.limit||DC}setupOnce(){let e=Le().getClient();e&&lr((n,r)=>{let a=Le().getIntegration(t);return a?AC(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function AC(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!or(a.originalException,Error))return r;let i=g4(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function g4(t,e,n,r,a=[]){if(!or(n[r],Error)||a.length+1>=e)return a;let i=S0(t,n[r]);return g4(t,e,n[r],r,[i,...a])}d();var m4=at(),Jr=class t{static id="HttpContext";name=t.id;setupOnce(){lr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!m4.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=m4.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var Zr=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(kC(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function kC(t,e){return e?!!(PC(t,e)||LC(t,e)):!1}function PC(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!T4(t,e)||!b4(t,e))}function LC(t,e){let n=f4(e),r=f4(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!T4(t,e)||!b4(t,e))}function b4(t,e){let n=h4(t),r=h4(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(y4(n),Zn("history",({from:r,to:a})=>{r===void 0||r===a||y4(Le())}))}var k4={},B0=at();B0.Sentry&&B0.Sentry.Integrations&&(k4=B0.Sentry.Integrations);var FC={...k4,...za,...F0};var MC=du.alert;d();d();d();var P4={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${Ou(t)}`),!0)}function OE(t,e){return!e||!e.length?!1:UE(t).some(n=>e.some(r=>Su(n,r)))}function zE(t,e){if(!e||!e.length)return!1;let n=Ou(t);return n?e.some(r=>Su(n,r)):!1}function NE(t,e){if(!e||!e.length)return!0;let n=Ou(t);return n?e.some(r=>Su(n,r)):!0}function UE(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Pr(t)}`),[]}return[]}function qE(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function jE(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Ou(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?jE(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Pr(t)}`),null}}d();d();function v0(t,e){let n=S0(t,e),r={type:e&&e.name,value:GE(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function HE(t,e,n,r){let a={exception:{values:[{type:Oo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Ah(e)}`}]},extra:{__serialized__:i0(e)}};if(n){let i=S0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function T0(t,e){return{exception:{values:[v0(t,e)]}}}function S0(t,e){let n=e.stacktrace||e.stack||"",r=KE(e);try{return t(n,r)}catch{}return[]}var WE=/Minified React error #\d+;/i;function KE(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(WE.test(t.message))return 1}return 0}function GE(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function r4(t,e,n,r){let a=n&&n.syntheticException||void 0,i=zu(t,e,a,r);return Gr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Sn(i)}function a4(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=y0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Sn(o)}function zu(t,e,n,r,a){let i;if(yu(e)&&e.error)return T0(t,e.error);if(hh(e)){let o=e;if("stack"in e)i=T0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=y0(t,u,n,r),jo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Tu(e)?T0(t,e):Yn(e)||Oo(e)?(i=HE(t,e,n,a),Gr(i,{synthetic:!0}),i):(i=y0(t,e,n,r),jo(i,`${e}`,void 0),Gr(i,{synthetic:!0}),i)}function y0(t,e,n,r){let a={message:e};if(r&&n){let i=S0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var x0="Breadcrumbs",Vr=class t{static id=x0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Zn("console",VE),this.options.dom&&Zn("dom",$E(this.options.dom)),this.options.xhr&&Zn("xhr",YE),this.options.fetch&&Zn("fetch",QE),this.options.history&&Zn("history",JE)}};function $E(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?zo(n.event.target,a):zo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function VE(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:Oh(t.level),message:Yd(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Yd(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function YE(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function QE(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function JE(t){let e=it(),n=t.from,r=t.to,a=xu(e.location.href),i=xu(n),o=xu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var Uu=it(),Nu;function E0(){if(Nu)return Nu;if(Lh(fetch))return Nu=fetch.bind(Uu);let t=Uu.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return Nu=e.bind(Uu)}function i4(t,e){Object.prototype.toString.call(Uu&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):Ph()&&E0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var C0=it(),Ci=class extends Go{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ei}],version:Ei},super(e),e.sendClientReports&&C0.document&&C0.document.addEventListener("visibilitychange",()=>{C0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return r4(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return a4(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(x0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Pr(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=Ko(this._dsn,this._options),r=qh(e,this._options.tunnel&&Fa(this._dsn));try{i4(n,Cu(r))}catch(a){!1&&Se.error(a)}}};d();d();function Vo(t,e=E0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return $o(t,n)}d();var wi="?",ZE=10,XE=20,eC=30,tC=40,nC=50;function Yo(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var rC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,aC=/\((\S*)(?::(\d+))(?::(\d+))\)/,iC=t=>{let e=rC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=aC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=u4(e[1]||wi,e[2]);return Yo(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},w0=[eC,iC],oC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,sC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,uC=t=>{let e=oC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=sC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||wi;return[a,r]=u4(a,r),Yo(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},D0=[nC,uC],lC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,cC=t=>{let e=lC.exec(t);return e?Yo(e[2],e[1]||wi,+e[3],e[4]?+e[4]:void 0):void 0},A0=[tC,cC],dC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,pC=t=>{let e=dC.exec(t);return e?Yo(e[2],e[3]||wi,+e[1]):void 0},o4=[ZE,pC],gC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,mC=t=>{let e=gC.exec(t);return e?Yo(e[5],e[3]||e[4]||wi,+e[1],+e[2]):void 0},s4=[XE,mC],k0=[w0,D0,A0],qu=e0(...k0),u4=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:wi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var P0=0;function L0(){return P0>0}function fC(){P0+=1,setTimeout(()=>{P0-=1})}function Fr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ti(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>Fr(o,e));return t.apply(this,i)}catch(i){throw fC(),xi(o=>{o.addEventProcessor(s=>(e.mechanism&&(jo(s,void 0,void 0),Gr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Si(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}Jd(r,t),Uo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var _0={};eu(_0,{Breadcrumbs:()=>Vr,Dedupe:()=>Zr,GlobalHandlers:()=>cr,HttpContext:()=>Jr,LinkedErrors:()=>Qr,TryCatch:()=>Yr});d();d();var cr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:hC,onunhandledrejection:bC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(vC(n),r(),this._installFunc[n]=void 0)}}};function hC(){Zn("error",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(L0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Dr(a)?yC(a,i,o,s):l4(zu(n,u||a,void 0,r,!1),i,o,s);l.level="error",c4(e,u,l,"onerror")})}function bC(){Zn("unhandledrejection",t=>{let[e,n,r]=d4();if(!e.getIntegration(cr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(L0()||a&&a.__sentry_own_request__)return!0;let i=Ro(a)?TC(a):zu(n,a,void 0,r,!0);i.level="error",c4(e,a,i,"onunhandledrejection")})}function TC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function yC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=yu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),l4({exception:{values:[{type:o,value:i}]}},e,n,r)}function l4(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Dr(e)&&e.length>0?e:Sh();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function vC(t){!1&&Se.log(`Global Handler attached: ${t}`)}function c4(t,e,n,r){Gr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function d4(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var SC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Yr=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=it();this._options.setTimeout&&Qn(e,"setTimeout",p4),this._options.setInterval&&Qn(e,"setInterval",p4),this._options.requestAnimationFrame&&Qn(e,"requestAnimationFrame",xC),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Qn(XMLHttpRequest.prototype,"send",EC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:SC).forEach(CC)}};function p4(t){return function(...e){let n=e[0];return e[0]=Fr(n,{mechanism:{data:{function:Jn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function xC(t){return function(e){return t.apply(this,[Fr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Jn(t)},handled:!0,type:"instrument"}})])}}function EC(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Qn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Jn(i)},handled:!0,type:"instrument"}},s=Ti(i);return s&&(o.mechanism.data.handler=Jn(s)),Fr(i,o)})}),t.apply(this,e)}}function CC(t){let e=it(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Qn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=Fr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Jn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=Fr(i,{mechanism:{data:{function:"addEventListener",handler:Jn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Qn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var wC="cause",DC=5,Qr=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||wC,this._limit=e.limit||DC}setupOnce(){let e=Le().getClient();e&&lr((n,r)=>{let a=Le().getIntegration(t);return a?AC(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function AC(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!or(a.originalException,Error))return r;let i=g4(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function g4(t,e,n,r,a=[]){if(!or(n[r],Error)||a.length+1>=e)return a;let i=v0(t,n[r]);return g4(t,e,n[r],r,[i,...a])}d();var m4=it(),Jr=class t{static id="HttpContext";name=t.id;setupOnce(){lr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!m4.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=m4.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var Zr=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(kC(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function kC(t,e){return e?!!(PC(t,e)||LC(t,e)):!1}function PC(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!T4(t,e)||!b4(t,e))}function LC(t,e){let n=f4(e),r=f4(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!T4(t,e)||!b4(t,e))}function b4(t,e){let n=h4(t),r=h4(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(y4(n),Zn("history",({from:r,to:a})=>{r===void 0||r===a||y4(Le())}))}var k4={},M0=it();M0.Sentry&&M0.Sentry.Integrations&&(k4=M0.Sentry.Integrations);var FC={...k4,...za,..._0};var MC=du.alert;d();d();d();var P4={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5256,13 +5256,13 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var H4=[{code:"zh-CN",messages:P4},{code:"zh-TW",messages:L4},{code:"en",messages:_4},{code:"ja",messages:F4},{code:"ar",messages:M4},{code:"de",messages:B4},{code:"es",messages:I4},{code:"fa",messages:R4},{code:"fr",messages:O4},{code:"hi",messages:z4},{code:"it",messages:N4},{code:"ru",messages:U4},{code:"ko",messages:q4},{code:"pt",messages:j4}];var I0="immersiveTranslateBingGlobalState",R0="immersiveTranslateYandexGlobalState",zt={};for(let t of H4)zt[t.code]=t.messages;var Ua="Immersive Translate",Q="immersive-translate";var me="immersiveTranslate";var K4=me+"GoogleAccessToken",G4=me+"AuthFlow";var $C=me+"AuthState",ju=me+"IframeMessage",BO=me+"WaitForRateLimit",Hu=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",qa=me+"showError",V4=me+"DocumentMessageThirdPartyTell",$4=me+"DocumentMessageEventUpload",Wu=me+"DocumentMessageHandler",Ku=`${me}Share`,Yo=`${me}ToggleMouseHoverTranslateDirectly`,Y4=`${me}ReqDraft`,Q4=`${me}ResDraft`,YC=`${me}Container`,J4=`${me}SpecifiedContainer`,Xr="buildinConfig",Qo="localConfig",O0="openOptionsPage",z0="openAboutPage";var N0="openEbookViewer",U0="openEbookBuilder";var ja=`${me}PageTranslatedStatus`,IO=`${me}PageUrlChanged`,Mr=`${me}ReceiveCommand`,Z4=me+"LastUseMouseHoverTime",Gu=me+"LastUseInputTime",Xn=me+"LastUseManualTranslatePageTime",RO=`${me}PopupReceiveMessage`,QC="immersivetranslate.com",JC="config.immersivetranslate.com",OO=`https://${QC}/`,Jo=`https://${JC}/default_config.json`,zO=`${me}Mark`,xn=`${me}Root`,X4=`${me}Walked`,NO=`data-${Q}-walked`,eb=`${me}Paragraph`,tb=`data-${Q}-paragraph`,dr=`data-${Q}-translation-element-mark`,nb=`${me}TranslationElementMark`,UO=`${me}TranslatedMark`,rb=`${me}LoadingId`,q0=`data-${Q}-loading-id`,ab=`${me}ErrorId`,Vu=`data-${Q}-error-id`,ZC=`${me}AtomicBlockMark`,ib=`${me}ExcludeMark`,qO=`data-${Q}-exclude-mark`,XC=`${me}StayOriginalMark`,jO=`${me}PreWhitespaceMark`,$u=`${me}InlineMark`,ob=`${me}BlockMark`,HO=`${me}Left`,WO=`${me}Right`,KO=`${me}Width`,GO=`${me}Height`,VO=`${me}Top`,$O=`${me}FontSize`,Zo="lastRunTime",YO=`${me}GlobalStyleMark`,Xo=["@","#"],Yu=" --- ",sb=` -`,yt=`${Q}-target-wrapper`,QO=`${Q}-pdf-target-container`,Qu=`${Q}-target-inner`,JO=`${Q}-source-wrapper`,j0=`${Q}-target-translation-block-wrapper`,ZO=`${Q}-root-translation-theme`,Di=`${me}RootTranslationTheme`,ub=`${Q}-target-translation-vertical-block-wrapper`,XO=`${Q}-target-translation-pdf-block-wrapper`,lb=`${Q}-target-translation-pre-whitespace`,H0=`${Q}-target-translation-inline-wrapper`;var cb={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},kn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],db={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},pb={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},gb={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var mb=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],fb=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],pr="zh-CN";var W4=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Ju=["caiyun","cai"],gr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var H4=[{code:"zh-CN",messages:P4},{code:"zh-TW",messages:L4},{code:"en",messages:_4},{code:"ja",messages:F4},{code:"ar",messages:M4},{code:"de",messages:B4},{code:"es",messages:I4},{code:"fa",messages:R4},{code:"fr",messages:O4},{code:"hi",messages:z4},{code:"it",messages:N4},{code:"ru",messages:U4},{code:"ko",messages:q4},{code:"pt",messages:j4}];var B0="immersiveTranslateBingGlobalState",I0="immersiveTranslateYandexGlobalState",Nt={};for(let t of H4)Nt[t.code]=t.messages;var Ua="Immersive Translate",Q="immersive-translate";var me="immersiveTranslate";var K4=me+"GoogleAccessToken",G4=me+"AuthFlow";var VC=me+"AuthState",ju=me+"IframeMessage",BO=me+"WaitForRateLimit",Hu=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",qa=me+"showError",$4=me+"DocumentMessageThirdPartyTell",V4=me+"DocumentMessageEventUpload",Wu=me+"DocumentMessageHandler",Ku=`${me}Share`,Qo=`${me}ToggleMouseHoverTranslateDirectly`,Y4=`${me}ReqDraft`,Q4=`${me}ResDraft`,YC=`${me}Container`,J4=`${me}SpecifiedContainer`,Xr="buildinConfig",Jo="localConfig",R0="openOptionsPage",O0="openAboutPage";var z0="openEbookViewer",N0="openEbookBuilder";var ja=`${me}PageTranslatedStatus`,IO=`${me}PageUrlChanged`,Mr=`${me}ReceiveCommand`,Z4=me+"LastUseMouseHoverTime",Gu=me+"LastUseInputTime",Xn=me+"LastUseManualTranslatePageTime",RO=`${me}PopupReceiveMessage`,QC="immersivetranslate.com",JC="config.immersivetranslate.com",OO=`https://${QC}/`,Zo=`https://${JC}/default_config.json`,zO=`${me}Mark`,xn=`${me}Root`,X4=`${me}Walked`,NO=`data-${Q}-walked`,eb=`${me}Paragraph`,tb=`data-${Q}-paragraph`,dr=`data-${Q}-translation-element-mark`,nb=`${me}TranslationElementMark`,UO=`${me}TranslatedMark`,rb=`${me}LoadingId`,U0=`data-${Q}-loading-id`,ab=`${me}ErrorId`,$u=`data-${Q}-error-id`,ZC=`${me}AtomicBlockMark`,ib=`${me}ExcludeMark`,qO=`data-${Q}-exclude-mark`,XC=`${me}StayOriginalMark`,jO=`${me}PreWhitespaceMark`,Vu=`${me}InlineMark`,ob=`${me}BlockMark`,HO=`${me}Left`,WO=`${me}Right`,KO=`${me}Width`,GO=`${me}Height`,$O=`${me}Top`,VO=`${me}FontSize`,Xo="lastRunTime",YO=`${me}GlobalStyleMark`,es=["@","#"],Yu=" --- ",sb=` +`,yt=`${Q}-target-wrapper`,QO=`${Q}-pdf-target-container`,Qu=`${Q}-target-inner`,JO=`${Q}-source-wrapper`,q0=`${Q}-target-translation-block-wrapper`,ZO=`${Q}-root-translation-theme`,Di=`${me}RootTranslationTheme`,ub=`${Q}-target-translation-vertical-block-wrapper`,XO=`${Q}-target-translation-pdf-block-wrapper`,lb=`${Q}-target-translation-pre-whitespace`,j0=`${Q}-target-translation-inline-wrapper`;var cb={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},kn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],db={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},pb={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},gb={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var mb=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],fb=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],pr="zh-CN";var W4=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Ju=["caiyun","cai"],gr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Xo,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...W4,{type:"password",name:"apikey",required:!0}],props:W4},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Zu={type:me+"ChildFrameToRootFrameIdentifier"},W0=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],es=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],hb=["ctrl","alt","shift","cmd","command","option","control"];var ez=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",K0="user_from_plugin",Ft="user_info",ts=Qt()||Rn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",bb=Qt()||Rn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",Tb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Xu=Qt()||Rn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ai=Qt()||Rn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",ew=Qt()||Rn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",tw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",nw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",tz=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",nz=ew+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",vb=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",el=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Sb=tw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xb=nw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eb=Xu+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Cb="https://immersivetranslate.com/docs/usage/";var wb=Me().TRANSLATE_FILE_URL,rz=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Db=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var ki=console,G0=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=On.green;r>1e4?a=On.red:r>1e3&&(a=On.yellow),ki.debug(On.dim(Ua+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},ns=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&ki.log(On.dim(Ua+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&ki.log(On.green(Ua+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&ki.warn(On.yellow(Ua+" WARN:"),...e)}error(...e){this.#e<=3&&ki.error(On.red(Ua+" ERROR:"),...e)}fatal(...e){this.#e<=4&&ki.error(On.red(Ua+" FATAL:"),...e)}timing(){return this.level===0?new G0:{reset:()=>{},stop:()=>{}}}},B=new ns;d();d();d();var V0=/iPhone/i,Ab=/iPod/i,kb=/iPad/i,Pb=/\biOS-universal(?:.+)Mac\b/i,$0=/\bAndroid(?:.+)Mobile\b/i,Lb=/Android/i,Pi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,tl=/Silk/i,Br=/Windows Phone/i,_b=/\bWindows(?:.+)ARM\b/i,Fb=/BlackBerry/i,Mb=/BB10/i,Bb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rb=/Mobile(?:.+)Firefox\b/i,Ob=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function rw(t){return e=>e.test(t)}function ut(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=rw(n),i={apple:{phone:a(V0)&&!a(Br),ipod:a(Ab),tablet:!a(V0)&&(a(kb)||Ob(e))&&!a(Br),universal:a(Pb),device:(a(V0)||a(Ab)||a(kb)||a(Pb)||Ob(e))&&!a(Br)},amazon:{phone:a(Pi),tablet:!a(Pi)&&a(tl),device:a(Pi)||a(tl)},android:{phone:!a(Br)&&a(Pi)||!a(Br)&&a($0),tablet:!a(Br)&&!a(Pi)&&!a($0)&&(a(tl)||a(Lb)),device:!a(Br)&&(a(Pi)||a(tl)||a($0)||a(Lb))||a(/\bokhttp\b/i)},windows:{phone:a(Br),tablet:a(_b),device:a(Br)||a(_b)},other:{blackberry:a(Fb),blackberry10:a(Mb),opera:a(Bb),firefox:a(Rb),chrome:a(Ib),device:a(Fb)||a(Mb)||a(Bb)||a(Rb)||a(Ib)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Y0="DENO",nl="CHROME",rl="FIREFOX";function zb(t){let e=nl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=rl:/deno/i.test(n)&&(e=Y0)}catch{}return t===nl&&e===nl||t===rl&&e===rl||t===Y0&&e===Y0}function aw(){return zb(nl)}function Nb(){return typeof Deno<"u"}function Ir(){return zb(rl)}function al(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function rs(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function Ub(){return ye()?"monkey":aw()?"chrome":Ir()?"firefox":et()?"safari":null}d();var qb={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jb={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:qb,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:qb,query:()=>{},sendMessage:()=>{}}};var oe;Nb()?oe=jb:oe=globalThis.immersiveTranslateBrowserAPI;d();d();d();d();d();var Dz=Wb(2),Hb=Wb(3);function Wb(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var iw=/\s+/g,ow=/[\t\n\v\f\r ]+/g;function Kb(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?sw:uw;return String(t).replace(e.style==="html"?ow:iw,e.trim?lw(n):n)}function sw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function uw(){return" "}function lw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var Gb={}.hasOwnProperty;function cw(t){return t==null?"":Kb(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function dw(t){return Hb(" "+cw(t)+" ")}function pw(t){let e=dw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function yw(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function vw(t,e,n,r){e=xw(e,n,r);let a=[],i;if(e)for(i in e)il.call(e,i)&&a.push([i,Sw(t,e[i])]);return a.length===0?J0():a.sort(Ew)}function Sw(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of Mw){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?e3(t)?"zh-TW":"zh-CN":e:"auto"}var n3=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Z0=new Map(n3),Bw=new Map(n3.map(([t,e])=>[e,t]));function r3(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>Bw.get(s));!e&&e!==0&&(e=25);let a=sl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Z0.keys()]},o=Yb(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&m<.95)break;return Z0.get(p)}}let[s,u]=o[0],l=Z0.get(s);if(l&&u>.9)return l}}catch(r){B.error(r)}return"auto"}d();d();function Te(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=kn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":kn[a]}else return"auto";else return kn[r]}function ht(){return Te(document?.documentElement?.lang||"en")}d();function Jt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function a3(t){if(t){let e=new Date(t.createTime),n=Iw(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function Iw(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var i3=me+"SyncStoreKey_";function At(t,e){let n=i3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Xe(t,e){let n=i3+t;return oe.storage.sync.set({[n]:e})}d();var o3=me+"StoreKey_";function Rr(t,e){let n=o3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function s3(t,e){let n=o3+t;return oe.storage.local.set({[n]:e})}d();var Ha=me+"CacheKey_";function X0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function Rw(){let t=oe.storage.local.refresh;t&&t()}function ep(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Ha)).filter(r=>r!==Ha+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:X0,set:np,getExpired:ep,setExpired:tp,remove:rp,clear:u3,refresh:Rw};d();d();d();d();function l3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function ap(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Ow(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),m=Object.keys(o).filter(g=>g!=="tag").map(g=>`${g}="${o[g]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${m}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function is(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function mr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=is(t,n,e);return i===e&&n!==r&&(i=is(t,r,e)),ap(i,a)}function Ow(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return mr(zt,e,t.config.interfaceLanguage,"en",n)}d();function c3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function d3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:es,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...W4,{type:"password",name:"apikey",required:!0}],props:W4},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Zu={type:me+"ChildFrameToRootFrameIdentifier"},H0=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],ts=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],hb=["ctrl","alt","shift","cmd","command","option","control"];var ez=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",W0="user_from_plugin",Ft="user_info",ns=Qt()||Rn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",bb=Qt()||Rn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",Tb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yb=bb+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Xu=Qt()||Rn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ai=Qt()||Rn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",ew=Qt()||Rn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",tw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",nw=Qt()||Rn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",tz=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",nz=ew+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",vb=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",el=Ai+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Sb=tw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xb=nw+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eb=Xu+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Cb="https://immersivetranslate.com/docs/usage/";var wb=Me().TRANSLATE_FILE_URL,rz=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Db=wb+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var ki=console,K0=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=On.green;r>1e4?a=On.red:r>1e3&&(a=On.yellow),ki.debug(On.dim(Ua+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},rs=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&ki.log(On.dim(Ua+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&ki.log(On.green(Ua+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&ki.warn(On.yellow(Ua+" WARN:"),...e)}error(...e){this.#e<=3&&ki.error(On.red(Ua+" ERROR:"),...e)}fatal(...e){this.#e<=4&&ki.error(On.red(Ua+" FATAL:"),...e)}timing(){return this.level===0?new K0:{reset:()=>{},stop:()=>{}}}},B=new rs;d();d();d();var G0=/iPhone/i,Ab=/iPod/i,kb=/iPad/i,Pb=/\biOS-universal(?:.+)Mac\b/i,$0=/\bAndroid(?:.+)Mobile\b/i,Lb=/Android/i,Pi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,tl=/Silk/i,Br=/Windows Phone/i,_b=/\bWindows(?:.+)ARM\b/i,Fb=/BlackBerry/i,Mb=/BB10/i,Bb=/Opera Mini/i,Ib=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rb=/Mobile(?:.+)Firefox\b/i,Ob=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function rw(t){return e=>e.test(t)}function ut(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=rw(n),i={apple:{phone:a(G0)&&!a(Br),ipod:a(Ab),tablet:!a(G0)&&(a(kb)||Ob(e))&&!a(Br),universal:a(Pb),device:(a(G0)||a(Ab)||a(kb)||a(Pb)||Ob(e))&&!a(Br)},amazon:{phone:a(Pi),tablet:!a(Pi)&&a(tl),device:a(Pi)||a(tl)},android:{phone:!a(Br)&&a(Pi)||!a(Br)&&a($0),tablet:!a(Br)&&!a(Pi)&&!a($0)&&(a(tl)||a(Lb)),device:!a(Br)&&(a(Pi)||a(tl)||a($0)||a(Lb))||a(/\bokhttp\b/i)},windows:{phone:a(Br),tablet:a(_b),device:a(Br)||a(_b)},other:{blackberry:a(Fb),blackberry10:a(Mb),opera:a(Bb),firefox:a(Rb),chrome:a(Ib),device:a(Fb)||a(Mb)||a(Bb)||a(Rb)||a(Ib)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var V0="DENO",nl="CHROME",rl="FIREFOX";function zb(t){let e=nl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=rl:/deno/i.test(n)&&(e=V0)}catch{}return t===nl&&e===nl||t===rl&&e===rl||t===V0&&e===V0}function aw(){return zb(nl)}function Nb(){return typeof Deno<"u"}function Ir(){return zb(rl)}function al(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function as(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function Ub(){return ye()?"monkey":aw()?"chrome":Ir()?"firefox":tt()?"safari":null}d();var qb={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jb={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:qb,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:qb,query:()=>{},sendMessage:()=>{}}};var oe;Nb()?oe=jb:oe=globalThis.immersiveTranslateBrowserAPI;d();d();d();d();d();var Dz=Wb(2),Hb=Wb(3);function Wb(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var iw=/\s+/g,ow=/[\t\n\v\f\r ]+/g;function Kb(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?sw:uw;return String(t).replace(e.style==="html"?ow:iw,e.trim?lw(n):n)}function sw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function uw(){return" "}function lw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var Gb={}.hasOwnProperty;function cw(t){return t==null?"":Kb(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function dw(t){return Hb(" "+cw(t)+" ")}function pw(t){let e=dw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function yw(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function vw(t,e,n,r){e=xw(e,n,r);let a=[],i;if(e)for(i in e)il.call(e,i)&&a.push([i,Sw(t,e[i])]);return a.length===0?Q0():a.sort(Ew)}function Sw(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of Mw){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?e3(t)?"zh-TW":"zh-CN":e:"auto"}var n3=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],J0=new Map(n3),Bw=new Map(n3.map(([t,e])=>[e,t]));function r3(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>Bw.get(s));!e&&e!==0&&(e=25);let a=sl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...J0.keys()]},o=Yb(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&m<.95)break;return J0.get(p)}}let[s,u]=o[0],l=J0.get(s);if(l&&u>.9)return l}}catch(r){B.error(r)}return"auto"}d();d();function he(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=kn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":kn[a]}else return"auto";else return kn[r]}function ht(){return he(document?.documentElement?.lang||"en")}d();function Jt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function a3(t){if(t){let e=new Date(t.createTime),n=Iw(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function Iw(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var i3=me+"SyncStoreKey_";function At(t,e){let n=i3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function et(t,e){let n=i3+t;return oe.storage.sync.set({[n]:e})}d();var o3=me+"StoreKey_";function Rr(t,e){let n=o3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function s3(t,e){let n=o3+t;return oe.storage.local.set({[n]:e})}d();var Ha=me+"CacheKey_";function Z0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function Rw(){let t=oe.storage.local.refresh;t&&t()}function X0(t,e){let n=Ha+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Ha)).filter(r=>r!==Ha+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Z0,set:tp,getExpired:X0,setExpired:ep,remove:np,clear:u3,refresh:Rw};d();d();d();d();function l3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function rp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Ow(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),m=Object.keys(o).filter(g=>g!=="tag").map(g=>`${g}="${o[g]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${m}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function os(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function mr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=os(t,n,e);return i===e&&n!==r&&(i=os(t,r,e)),rp(i,a)}function Ow(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return mr(Nt,e,t.config.interfaceLanguage,"en",n)}d();function c3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function d3(t){return new Date(t).getTime()}var V=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",m=this.data?.translationService=="deepl"?"Deepl":"OpenAI",g=n("errorReason",{message:r});if(i=="onetime_7day")g+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:el});else{let f="";m=="OpenAI"?f=Sb:f=xb,o?g+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:Eb}):g+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:m}),!o&&(a.cancelAtPeriodEnd==="false"||d3(u)>s)&&(g+=n("proQuotaExceededError.resetTime",{resetTime:c3(s,"YYYY-MM-DD HH:mm:ss")}))}return g}}};async function Wa(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Sd(p3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await p3(t);return e}async function p3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){B.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of zw(s.body)){let p=new TextDecoder().decode(c);u+=p;let m;for(;(m=u.indexOf(` -`))>=0;){let g=u.slice(0,m).trim();if(u=u.slice(m+1),g.startsWith("event:")||g==="")continue;let f="";if(g.startsWith("data:")&&(f=g.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){B.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(g){B.error("parse response failed",g)}u&&B.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,m=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),m&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*zw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Nw=new Map;function ul(t){let e=Uw(64),n=new CustomEvent(Hu,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Nw.set(e,(i,o)=>{i?a(i):r(o)})})}function Uw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var jw="";function Nt(){return jw||ll.version}function ip(){return oe.runtime.getManifest().version}d();function He(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var os=new Map,ea=class{fromType;logger;constructor(e,n=!1){this.logger=new ns,n&&this.logger.setLevel("debug"),this.fromType=e,os.has(e)||(os.set(e,new Map),oe.runtime.onMessage.addListener((r,a,i)=>{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=sp(s),{type:m,name:g}=p;if(m!==e)return!1;let f=sp(o),b=os.get(m).get(g);if(!b)return this.logger.debug(`no message handler for ${m}:${s}, but it's ok`),!1;let{messageHandler:h,sync:E}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(E){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=os.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new op(`${i}:${e}`,this.logger);return os.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},op=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=sp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return g3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return g3(o,s,this.logger)}}};function g3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function sp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var Hw="";function Li(){return Hw||globalThis.navigator.userAgent}function up(){return Li().includes("ImtFxiOS")}function m3(){let e=Li().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function Ww(){return Li().includes("ImtFxAndroid")}function f3(){let t=Li();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function h3(){let e=Li().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function ss(){let t=Li();if(up()||Ww()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var cl;function Kw(){return cl||(cl=new ea("content_script",!1).getConnection("pure_main",()=>{}),cl)}var b3="G-MKMD9LWFTR";async function us(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(ss()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=He(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Rr("fakeUserId",""),u&&await Xe("fakeUserId",u));let l=Nt(),c=new Date,p=await At("installedAt","");p||(p=await Rr("installedAt",""),p&&await Xe("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Xe("installedAt",p)):(u=Gw(32),await Xe("fakeUserId",u)),p||(p=c.toISOString(),await Xe("installedAt",p));let m=new Date(p),g=T3(m),f=T3(c),T=g===f,b=c.getTime()-m.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${b3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${b3}&api_secret=${s}`);let E="";typeof navigator<"u"&&(E=window.navigator.userAgent);let D=mi.parse(E),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let L=ss();L&&(y.browser_name=L.name,y.browser_version=L.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),g&&(y.install_day=Vw(m)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),I=await dl({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Gw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",m=this.data?.translationService=="deepl"?"Deepl":"OpenAI",g=n("errorReason",{message:r});if(i=="onetime_7day")g+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:el});else{let f="";m=="OpenAI"?f=Sb:f=xb,o?g+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:Eb}):g+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:m}),!o&&(a.cancelAtPeriodEnd==="false"||d3(u)>s)&&(g+=n("proQuotaExceededError.resetTime",{resetTime:c3(s,"YYYY-MM-DD HH:mm:ss")}))}return g}}};async function Wa(t){let e;if(t&&t.retry&&t.retry>0)try{e=await vd(p3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await p3(t);return e}async function p3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){B.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new V("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of zw(s.body)){let p=new TextDecoder().decode(c);u+=p;let m;for(;(m=u.indexOf(` +`))>=0;){let g=u.slice(0,m).trim();if(u=u.slice(m+1),g.startsWith("event:")||g==="")continue;let f="";if(g.startsWith("data:")&&(f=g.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){B.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(g){B.error("parse response failed",g)}u&&B.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,m=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),m&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new V("fetchError",c).initNetWork(s.status)}}async function*zw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Nw=new Map;function ul(t){let e=Uw(64),n=new CustomEvent(Hu,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Nw.set(e,(i,o)=>{i?a(i):r(o)})})}function Uw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var jw="";function Ut(){return jw||ll.version}function ap(){return oe.runtime.getManifest().version}d();function He(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var ss=new Map,ea=class{fromType;logger;constructor(e,n=!1){this.logger=new rs,n&&this.logger.setLevel("debug"),this.fromType=e,ss.has(e)||(ss.set(e,new Map),oe.runtime.onMessage.addListener((r,a,i)=>{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=op(s),{type:m,name:g}=p;if(m!==e)return!1;let f=op(o),b=ss.get(m).get(g);if(!b)return this.logger.debug(`no message handler for ${m}:${s}, but it's ok`),!1;let{messageHandler:h,sync:E}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(E){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=ss.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new ip(`${i}:${e}`,this.logger);return ss.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},ip=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=op(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return g3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return g3(o,s,this.logger)}}};function g3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new V(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new V("noResponse","Unknown error")}function op(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var Hw="";function Li(){return Hw||globalThis.navigator.userAgent}function sp(){return Li().includes("ImtFxiOS")}function m3(){let e=Li().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function Ww(){return Li().includes("ImtFxAndroid")}function f3(){let t=Li();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function h3(){let e=Li().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function us(){let t=Li();if(sp()||Ww()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var cl;function Kw(){return cl||(cl=new ea("content_script",!1).getConnection("pure_main",()=>{}),cl)}var b3="G-MKMD9LWFTR";async function ls(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(us()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=He(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Rr("fakeUserId",""),u&&await et("fakeUserId",u));let l=Ut(),c=new Date,p=await At("installedAt","");p||(p=await Rr("installedAt",""),p&&await et("installedAt",p)),u?p||(p=new Date(0).toISOString(),await et("installedAt",p)):(u=Gw(32),await et("fakeUserId",u)),p||(p=c.toISOString(),await et("installedAt",p));let m=new Date(p),g=T3(m),f=T3(c),T=g===f,b=c.getTime()-m.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${b3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${b3}&api_secret=${s}`);let E="";typeof navigator<"u"&&(E=window.navigator.userAgent);let D=mi.parse(E),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let L=us();L&&(y.browser_name=L.name,y.browser_version=L.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),g&&(y.install_day=$w(m)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),I=await dl({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Gw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5418,44 +5418,44 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function pl(t){if(t.beta)return!1;if(et()&&t.spVersion)return ls(ip(),t.spVersion);if(f3()&&t.gspVersion){let e=h3();if(e)return ls(e,t.gspVersion)}if(up()&&t.ispVersion){let e=m3();if(e)return ls(e,t.ispVersion)}return!1}function ls(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function lp(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function gl(t){return Array.isArray(t)?t:t?[t]:[]}function ml(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function fl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function hl(t,e){let n={...t};return x3(n,e),Qw(n,e),n}function S3(t,e,n){let r={...e};return Ka({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ka({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function Qw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;x3(t,a)}function Ka({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Jw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=gl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!y3(s))return;c=cp(l,u)}else if(o=="remove_v"){if(!y3(s))return;c=v3(l,u)}else o==="add"?c=cp(l,u):o=="remove"&&(c=v3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=cp(l,u):c=u,r(i,c)})}function x3(t,e){return Ka({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function cp(t,e){let n;if(Array.isArray(t)){let r=gl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Jw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function y3(t){let e=Nt();return t&&ls(e,t)}function v3(t,e){if(Array.isArray(t)){let n=gl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}function E3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Zt(){let t=await oe.storage.local.get(Qo);if(t[Qo]){let e=t[Qo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Xt(i),i}else return{}}async function Xt(t){await oe.storage.local.set({[Qo]:t})}async function C3(t){await oe.storage.local.set({[Xr]:t})}async function w3(){let t=await oe.storage.local.get(Xr),n={...await dp(),..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let r=t[Xr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Pn(){let t=await oe.storage.local.get(Xr),e={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let C=t[Xr];if(C&&C.buildinConfigUpdatedAt){let P=new Date(C.buildinConfigUpdatedAt),U=new Date(e.buildinConfigUpdatedAt);P>U&&(e=C)}}let n=await eD(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let C=await oe.commands.getAll();for(let P of C)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await dp(),o=E3(),s=await Or(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Zt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let C=await Zw();p.interfaceLanguage=C}let m=p.interfaceLanguage==="en",g=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!m&&!g&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,E=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(E=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(E.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,I=await At("installedAt",""),S=Number(await Rr("translage_page_daily",0)),y=Number(await At(Xn,0)),L;y>0&&(Date.now()-y0&&(Date.now()-S0){let C=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(C.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],U=Array.isArray(P)?P:[P],H=Array.from(new Set(U.concat(C.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let _=Object.assign(i,e);Ka({rule:e,valueIsArray:C=>Array.isArray(i[C]),getMergedValue:C=>i[C],onMergedResult:(C,P)=>{C!="generalRule"&&(_[C]=P)}});let k=Jt(r),N={};p.translationServices&&p.translationServices.deepl&&(N=p.translationServices.deepl);let z={};p.translationServices&&p.translationServices.openai&&(z=p.translationServices.openai),!k&&N.authKey&&!N.provider?(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="custom"):N&&N.provider||(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="pro"),!k&&z.APIKEY&&!z.provider?(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="custom"):z&&z.provider||(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="pro");let q=Object.keys(_),F=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let C of q){let P=C;if(P==="generalRule")typeof p[P]=="object"&&(_[P]=hl(i[P],p[P]));else if(P==="translationServices")tD(p,_);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&F.includes(P))p[P]&&(_[P]=Object.assign(_[P],p[P])),P==="shortcuts"&&(ye()||et()?_[P]={..._[P],...a}:_[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let U=_.rules||[],H={};for(let W of U)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?S3(e.generalRule,H[W.id],W):W);_[P]=[...j,..._[P]]}if(we.PROD==="0"&&we.DEV_RULES){let U=JSON.parse(we.DEV_RULES);_[P]=[...U,..._[P]]}}else p[P]!==void 0&&(_[P]=p[P])}return _.donateUrl=e.donateUrl,_.minVersion=e.minVersion,_.feedbackUrl=e.feedbackUrl,_.rawUserConfig=s,_}async function Or(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function cs(t){await oe.storage.sync.set({userConfig:t})}async function ds(t,e){await oe.storage.local.set({[t]:e})}async function bl(t){return(await oe.storage.local.get(t))[t]||""}var Zw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){B.warn("get browser language error:",r)}let n=t.map(r=>Te(r)).find(r=>zt[r]);return n||"en"},dp=async()=>{let t={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:pr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Xw(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function eD(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return pr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ka({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ka({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();function ta(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function nD(t,e){return t<>>32-e}function yl(t,e,n,r,a,i){return ta(nD(ta(ta(e,t),ta(r,i)),a),n)}function en(t,e,n,r,a,i,o){return yl(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return yl(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return yl(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return yl(n^(e|~r),t,e,a,i,o)}function Tl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function pp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Tl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Tl(a.concat(pp(e)),512+e.length*8),D3(Tl(i.concat(o),512+128))}function A3(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function gp(t){return unescape(encodeURIComponent(t))}function k3(t){return rD(gp(t))}function iD(t){return A3(k3(t))}function P3(t,e){return aD(gp(t),gp(e))}function oD(t,e){return A3(P3(t,e))}function Ln(t,e,n){return e?n?P3(e,t):oD(e,t):n?k3(t):iD(t)}d();function L3(t,e,n){let r=sD(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function sD(t,e){let n=[],r=[];for(let a=0;a0?T"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function pl(t){if(t.beta)return!1;if(tt()&&t.spVersion)return cs(ap(),t.spVersion);if(f3()&&t.gspVersion){let e=h3();if(e)return cs(e,t.gspVersion)}if(sp()&&t.ispVersion){let e=m3();if(e)return cs(e,t.ispVersion)}return!1}function cs(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function up(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function gl(t){return Array.isArray(t)?t:t?[t]:[]}function ml(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function fl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function hl(t,e){let n={...t};return x3(n,e),Qw(n,e),n}function S3(t,e,n){let r={...e};return Ka({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ka({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function Qw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;x3(t,a)}function Ka({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Jw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=gl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!y3(s))return;c=lp(l,u)}else if(o=="remove_v"){if(!y3(s))return;c=v3(l,u)}else o==="add"?c=lp(l,u):o=="remove"&&(c=v3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=lp(l,u):c=u,r(i,c)})}function x3(t,e){return Ka({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function lp(t,e){let n;if(Array.isArray(t)){let r=gl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Jw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function y3(t){let e=Ut();return t&&cs(e,t)}function v3(t,e){if(Array.isArray(t)){let n=gl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}function E3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Zt(){let t=await oe.storage.local.get(Jo);if(t[Jo]){let e=t[Jo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Xt(i),i}else return{}}async function Xt(t){await oe.storage.local.set({[Jo]:t})}async function C3(t){await oe.storage.local.set({[Xr]:t})}async function w3(){let t=await oe.storage.local.get(Xr),n={...await cp(),..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let r=t[Xr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Pn(){let t=await oe.storage.local.get(Xr),e={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Xr]){let C=t[Xr];if(C&&C.buildinConfigUpdatedAt){let P=new Date(C.buildinConfigUpdatedAt),U=new Date(e.buildinConfigUpdatedAt);P>U&&(e=C)}}let n=await eD(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let C=await oe.commands.getAll();for(let P of C)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await cp(),o=E3(),s=await Or(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Zt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let C=await Zw();p.interfaceLanguage=C}let m=p.interfaceLanguage==="en",g=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!m&&!g&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,E=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(E=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(E.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,I=await At("installedAt",""),S=Number(await Rr("translage_page_daily",0)),y=Number(await At(Xn,0)),L;y>0&&(Date.now()-y0&&(Date.now()-S0){let C=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(C.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],U=Array.isArray(P)?P:[P],H=Array.from(new Set(U.concat(C.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let _=Object.assign(i,e);Ka({rule:e,valueIsArray:C=>Array.isArray(i[C]),getMergedValue:C=>i[C],onMergedResult:(C,P)=>{C!="generalRule"&&(_[C]=P)}});let k=Jt(r),N={};p.translationServices&&p.translationServices.deepl&&(N=p.translationServices.deepl);let z={};p.translationServices&&p.translationServices.openai&&(z=p.translationServices.openai),!k&&N.authKey&&!N.provider?(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="custom"):N&&N.provider||(_.translationServices.deepl||(_.translationServices.deepl={}),_.translationServices.deepl.provider="pro"),!k&&z.APIKEY&&!z.provider?(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="custom"):z&&z.provider||(_.translationServices.openai||(_.translationServices.openai={}),_.translationServices.openai.provider="pro");let q=Object.keys(_),F=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let C of q){let P=C;if(P==="generalRule")typeof p[P]=="object"&&(_[P]=hl(i[P],p[P]));else if(P==="translationServices")tD(p,_);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&F.includes(P))p[P]&&(_[P]=Object.assign(_[P],p[P])),P==="shortcuts"&&(ye()||tt()?_[P]={..._[P],...a}:_[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let U=_.rules||[],H={};for(let W of U)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?S3(e.generalRule,H[W.id],W):W);_[P]=[...j,..._[P]]}if(we.PROD==="0"&&we.DEV_RULES){let U=JSON.parse(we.DEV_RULES);_[P]=[...U,..._[P]]}}else p[P]!==void 0&&(_[P]=p[P])}return _.donateUrl=e.donateUrl,_.minVersion=e.minVersion,_.feedbackUrl=e.feedbackUrl,_.rawUserConfig=s,_}async function Or(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function ds(t){await oe.storage.sync.set({userConfig:t})}async function ps(t,e){await oe.storage.local.set({[t]:e})}async function bl(t){return(await oe.storage.local.get(t))[t]||""}var Zw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){B.warn("get browser language error:",r)}let n=t.map(r=>he(r)).find(r=>Nt[r]);return n||"en"},cp=async()=>{let t={..._i,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:pr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Xw(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function eD(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return pr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ka({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ka({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();function ta(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function nD(t,e){return t<>>32-e}function yl(t,e,n,r,a,i){return ta(nD(ta(ta(e,t),ta(r,i)),a),n)}function en(t,e,n,r,a,i,o){return yl(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return yl(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return yl(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return yl(n^(e|~r),t,e,a,i,o)}function Tl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function dp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Tl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Tl(a.concat(dp(e)),512+e.length*8),D3(Tl(i.concat(o),512+128))}function A3(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function pp(t){return unescape(encodeURIComponent(t))}function k3(t){return rD(pp(t))}function iD(t){return A3(k3(t))}function P3(t,e){return aD(pp(t),pp(e))}function oD(t,e){return A3(P3(t,e))}function Ln(t,e,n){return e?n?P3(e,t):oD(e,t):n?k3(t):iD(t)}d();function L3(t,e,n){let r=sD(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function sD(t,e){let n=[],r=[];for(let a=0;a0?Te){let E=[];mp(b,e,E);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&mp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?g.push(T):m.push(T))});let f=g.concat(m).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:g,explicitProps:m}}var ps=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Jt(s),l=Object.keys(gr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=gr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&et())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let m=!!p.canary,g=!!p.alpha,f=!!p.beta;return c===t[e]||m&&i||g&&(r||i)||f&&(a||r||i)?!0:!g&&!f&&!m}).map(c=>vl(e,c,t))};function gs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function _3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}var Fi=[];async function Sl(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function F3(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await cD(e,t)}async function M3(t){let e=Ln(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await lD(n,e)}async function lD(t,e){let n=await Sl(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function cD(t,e){let n=await Sl(t);return(await pD()).includes(t)||await dD(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function dD(t){let e="cache_list",n=await Sl(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Fi.push(t)},a.onerror=i=>{n.close()}}async function pD(){if(Fi&&Fi.length>0)return Fi;let t=await Sl(Q+"-cacheList","cache_list");return Fi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Fi}d();d();var fp="Original";function Qe(){return fp}function gn(t){fp=t,B3(fp)}d();var R3="auto",xl="auto",I3="auto";function O3(t){R3=t}function qn(t){xl=t}function vt(){return xl!=="auto"?xl:I3!=="auto"?I3:R3}function El(){return xl}d();function Ga(t){return t?.id?.endsWith("pdfWebPage")||!1}function ra(t){try{if(!t||!Ga(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Je={},aa=async function(t,e){let{method:n,data:r}=t,a=await Je.updateGlobalContext(),i=Date.now();if(B.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Je.translateTheWholePage(r),Xe(Xn,i);else if(n==="translateTheMainPage")await Je.translateTheMainPage(r),Xe(Xn,i);else if(n==="translateToThePageEndImmediately")await Je.translateToThePageEndImmediately(r),Xe(Xn,i);else if(n==="toggleTranslatePage")await Je.toggleTranslatePage(r),Xe(Xn,i);else if(n==="toggleTranslateTheWholePage")await Je.toggleTranslateTheWholePage(r),Xe(Xn,i);else if(n==="toggleTranslateTheMainPage")await Je.toggleTranslateTheMainPage(r),Xe(Xn,i);else if(n==="toggleOnlyTransation")await Je.ensureSwitchTranslationMode(r),Xe(Xn,i);else if(n==="translatePage")await Je.translatePage(a,r),Xe(Xn,i);else if(n==="toggleTranslationMask")await Je.toggleTranslationMask(r);else if(n==="restorePage")Je.restorePage();else if(n==="retryFailedParagraphs")Je.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Je.switchTranslationMode(r.mode),await Je.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Je.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Ku,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Je.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Yo,{detail:r}));else if(n==="translateWithOpenAI")await Je.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Je.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Je.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Je.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Je.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Je.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Je.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")He()||await Je.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!He())return JSON.stringify(a)}};function z3(t){Object.assign(Je,t)}function N3(t){Object.assign(Je,t)}function U3(t){Object.assign(Je,t)}var gD=function(t,e){let{method:n,data:r}=t;if(B.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Qe();if(n==="getCurrentPageLanguage"){let a=vt();return Je.detectCurrentPageLanguage().catch(i=>{B.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return qn(r),vt();if(n==="getContextString"){let a=Je.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Je.getPureGlobalContext();return ra(a?.rule)}}},Cl,wl;function q3(){let t=Dl();He()||mD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Dl(){return Cl||(Cl=new ea("content_script",!1).getConnection("main",aa),Cl)}function mD(){return wl||(wl=new ea("content_script",!1).getConnection("main_sync",gD,{sync:!0}),wl)}d();var hp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Al="https://transmart.qq.com/api/imt",zr=class t{static langMapReverse=new Map(hp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await ce({url:Al,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function fD(t,e){return Math.floor(Math.random()*(e-t+1))+t}var hD=30,bp="RATE_LIMITER_TICKS",Mi=class t{static strictTicks={};static clearStrictTicks(){ds(bp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await bl(bp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){B.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await ds(bp,JSON.stringify(this.strictTicks))}catch(a){B.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=fD(4,hD);await vr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function St(t){return await Dl().sendMessage("background:main",t)}function ce(t){return au()?ul({method:"request",data:t}):ye()||ru()?(t.fetchPolyfill=globalThis.GM_fetch,Wa(t)):St({method:"fetch",data:t})}function an(){return ye()?Pn():St({method:"getConfig"})}function mn(t){return ye()?cs(t):St({method:"setUserConfig",data:t})}function fn(){return ye()?Or():St({method:"getUserConfig"})}function ms(){return ye()?Zt():St({method:"getLocalConfig"})}function kl(t){return ye()?Xt(t):St({method:"setLocalConfig",data:t})}function j3(t){return ye()?C3(t):St({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=sl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||et()){if(t.translateService&&!Ju.includes(t.translateService))return Promise.resolve("auto");let r=r3(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await St({method:"detectLanguage",data:t});return Promise.resolve(e)}function H3(){return St({method:"detectTabLanguage"})}async function Pl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||et()){let n=t.substring(0,200);e=await zr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function B3(t){let e=new CustomEvent(ja,{detail:t});if(document.dispatchEvent(e),ye())return;Dl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function W3(t){return ye()?M3(t):St({method:"queryParagraphCache",data:t})}async function K3(t){if(ye()){await F3(t);return}return St({method:"setParagraphCache",data:t})}async function G3(){if(ye())return Promise.resolve();await St({method:"mockRequest"})}function Bi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):St({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function Ii(t=""){return ye()||et()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function V3(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Ll(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):St({method:"openAboutPage"})}function Ri(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):St({method:"openInTab",data:t})}function $3(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):St({method:"openEbookViewerPage"})}function Y3(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):St({method:"openEbookBuilderPage"})}function _l(t){et()}function Oi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):St({method:"openPdfViewerPage",data:{url:e}})}function Q3(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):St({method:"openSubtitleBuilderPage"})}function zi(t){return ye()?Promise.resolve():St({method:"setBadge",data:{text:t}})}function J3(){return ye()?(B.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):St({method:"autoSyncLatestConfig"})}function Fl(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function Z3(t,e){return ye()?Mi.getDelay(t,e):St({method:"getDelay",data:{key:t,options:e}})}var X3="G-MKMD9LWFTR";async function it(t,e,n){try{let r=ss(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=He(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let A=await Rr(l,0),v=Ml(new Date(A)),O=Date.now(),_=Ml(new Date(O));if(v===_)return;await s3(l,O)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",m=await At("fakeUserId","");m||(m=await Rr("fakeUserId",""),m&&await Xe("fakeUserId",m));let g=Nt(),f=new Date,T=await At("installedAt","");T||(T=await Rr("installedAt",""),T&&await Xe("installedAt",T)),m?T||(T=new Date(0).toISOString(),await Xe("installedAt",T)):(m=bD(32),await Xe("fakeUserId",m)),T||(T=f.toISOString(),await Xe("installedAt",T));let b=new Date(T),h=Ml(b),E=Ml(f),D=h===E,M=f.getTime()-b.getTime()<7*24*60*60*1e3,I=`https://www.google-analytics.com/mp/collect?measurement_id=${X3}&api_secret=${p}`;u||(I=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${X3}&api_secret=${p}`);let S=mi.parse(window.navigator.userAgent),y=e.map(A=>{let v=A.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",g&&(v.version=g),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=TD(b)),n.user){let _=a3(n.user);_&&Object.keys(_).forEach(k=>{v[k]=_[k]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),v.page_type=O,s?v.main_frame=0:v.main_frame=1,!c){let _=n.url;try{let k=new URL(_);v.site_host=k.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...A,params:v}});if(i)return;let L=await ce({responseType:"text",url:I,method:"POST",body:JSON.stringify({client_id:m,user_id:m,events:y})})}catch{}}function bD(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;ae.removeEventListener("message",n)),t.length=0}function xD(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vD(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function ED(t,e,n,r){let a=i=>{let o=i.data;a1(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function e1(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(a1(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yD(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CD(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(r1(e,"tell",n,i,r),a)}async function t1(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),m=await xD(t,n,r,s);clearTimeout(p),l(m)});return e.postMessage(r1(n,"ask",r,s,a),i),u}var oa=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;e1(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ia(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await t1(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(ED(this.thisWindow,this.protocol,e,n))}tell(e,n){CD(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(e1(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return t1(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SD(this.listeners)}};var i1;async function o1(){if(He()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=oa.iframe(Zu,"*",{targetWindow:e});i1=n,await oa.connect(n).catch(r=>{B.error("connect with parent frame error",r)})}}function s1(){return i1}d();function u1(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();d();d();d();function l1(t){return t.replace(//g,">")}d();var Bl=!1,wD=ye();function c1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function DD(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&d1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(sa(i,$u)){if(a===!0)return!0;continue}if(fs(i.nodeName,e.inlineTags))return!0;if(!Tp(i,e))return!1}}return!0}function yp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(fs(t.nodeName,n)||Tp(t,e)){if(sa(t,ob)||fs(t.nodeName,["BR"]))return!1;if(sa(t,$u))return!0;if(Tp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return DD(t,e)}else return sa(t,$u);return!1}function d1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&sa(t,ib,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&sa(t,J4))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||fs(t.nodeName,i))}function Ni(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!g1(r)&&r.length>=n}function p1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(g1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function g1(t){for(let e=0;e127)return!1;return!0}function m1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function f1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function h1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function b1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function T1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function sa(t,e,n=!1){return vp(t,e,"1",n)}function vp(t,e,n,r=!1){return Bl&&!r?t[xn]?!!(t[xn]&&t[xn][e]===n):!1:t.dataset[e]===n}function Ui(t){return(t.innerText||t.textContent||"").trim()}function Sp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Il(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function lt(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(Bl&&!r?(t[xn]||(t[xn]={}),t[xn][e]||(t[xn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Rl(t,e,n=!1){if(Bl&&!n){if(!t[xn]||!t[xn][e])return;delete t[xn][e]}else delete t.dataset[e]}function qi(t,e,n=!1){return Bl&&!n?!t[xn]||!t[xn][e]?void 0:t[xn][e]:t.dataset[e]}function Tp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!fs(t.nodeName,n)}function Ee(){if(!globalThis||!globalThis.location)return"https://example.com";if(!He())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function En(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){B.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else B.warn("injectCSS failed, rootDocument does not have head node",t)}function ji(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(wD){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function fs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function y1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function v1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||d1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return B.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function S1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();d();d();var ql,Fe,D1,AD,hs,x1,A1,zl={},k1=[],kD=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(t,e){for(var n in e)t[n]=e[n];return t}function P1(t){var e=t.parentNode;e&&e.removeChild(t)}function Ep(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ql.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return Ol(t,o,r,a,null)}function Ol(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++D1};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function qt(t){return t.children}function Hi(t,e){this.props=t,this.context=e}function Wi(t,e){if(e==null)return t.__?Wi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?Ol(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null){if(g.__=n,g.__b=n.__b+1,(m=h[c])===null||m&&g.key==m.key&&g.type===m.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:jl}),n.__[t]}function se(t){return bs=1,FD(G1,t)}function FD(t,e,n){var r=Wl(Ts++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):G1(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=wt,!wt.u)){wt.u=!0;var a=wt.shouldComponentUpdate;wt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ae(t,e){var n=Wl(Ts++,3);!Fe.__s&&K1(n.__H,e)&&(n.__=t,n.i=e,wt.__H.__h.push(n))}function Ve(t){return bs=5,Ue(function(){return{current:t}},[])}function Ue(t,e){var n=Wl(Ts++,7);return K1(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function $e(t,e){return bs=8,Ue(function(){return t},e)}function Kl(t){var e=wt.context[t.__c],n=Wl(Ts++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(wt)),e.props.value):t.__}function MD(){for(var t;t=W1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Hl),t.__H.__h.forEach(Dp),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===qt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),wt=null,z1&&z1(t)},Fe.__r=function(t){N1&&N1(t),Ts=0;var e=(wt=t.__c).__H;e&&(wp===wt?(e.__h=[],wt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jl,n.__N=n.i=void 0})):(e.__h.forEach(Hl),e.__h.forEach(Dp),e.__h=[])),wp=wt},Fe.diffed=function(t){U1&&U1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(W1.push(e)!==1&&O1===Fe.requestAnimationFrame||((O1=Fe.requestAnimationFrame)||BD)(MD)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jl&&(n.__=n.__V),n.i=void 0,n.__V=jl})),wp=wt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Hl),n.__h=n.__h.filter(function(r){return!r.__||Dp(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),q1&&q1(t,e)},Fe.unmount=function(t){j1&&j1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hl(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var H1=typeof requestAnimationFrame=="function";function BD(t){var e,n=function(){clearTimeout(r),H1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);H1&&(e=requestAnimationFrame(n))}function Hl(t){var e=wt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),wt=e}function Dp(t){var e=wt;t.__c=t.__(),wt=e}function K1(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function G1(t,e){return typeof e=="function"?e(t):e}d();var V1=["*://*/*","*","*://*"],Y1="immersive-translate-wildcard-placeholder.com";function Ap(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>V1.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(V1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return RD(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,Y1),m;try{m=new URL(p)}catch{return B.debug("invalid match pattern",p,"raw match value:",c),!1}let g=m.host,f=m.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=ID(l+":",$1(g),$1(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function $1(t){return t.replaceAll(Y1,"*")}function ID(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function dt(t,e){return Ap(t,e)!==null}function RD(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var OD=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Cn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(Cn(t,i))return!1;if(Cn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!Cn(t,o)),c;function p(){return n&&n.display?!!OD.includes(n.display):Cn(t,r)}}var Kt=Cn;function $a(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function ys(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function fr(t,e=!1){let n=Xo;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Va(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return fr(n,e)}function Vi(t,e){return na(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function kp(t){let{rule:e}=t,n=zD(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function zD(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function vs(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),lt(r,rb,e.toString());let a=kp(t);return r.append(Ye.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function $i(t,e){return t.querySelector(`[${q0}='${e}']`)}function Q1(){document.querySelectorAll(`[${q0}]`).forEach(e=>{e.remove()})}function J1(){document.querySelectorAll(`.${yt}-error`).forEach(e=>{e.remove()})}function Z1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{ji(n)&&e.push(n)}),e}function Pp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},m=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),g=new RegExp(a.replace("{word}",m.map(f=>f.k).join("|")),"g");l=l.replace(g,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let m=new RegExp(p,"gi");l=l.replace(m,(g,f)=>{let T=c++;return e[`${T}`]=l1(f),o.length>2?g.replace(f,`<${o[2]}${T}>`):g.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){B.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function Ss(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||T1(s)||m1(s)||b1(s)||f1(s)||h1(s)||UD(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ni(i,n,r)}function Nr(t){return t.nodeType===Node.ELEMENT_NODE}function X1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Lp(){return await At("fakeUserId","")}async function ND(){return await At("installedAt","")}async function Gl(t){let n=Me().INSTALL_FROM,r=Nt(),a=await ND(),i=await Lp(),o=await Pn(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function e2(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await Fp(t,e);r(a)})()},[t,e,r]),n}async function Fp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!et()&&ye()||ut().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>dt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>dt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}d();function Mp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(lb),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${H0}-theme-${t}`):a.push(`${j0}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(H0):a.push(j0),a}function Bp(t){let e=["notranslate",Qu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function a2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Va(n,!0),m="afterend",g=p[0],f=p[1],T=`${g}(\\d+)${f}`,b=new RegExp(T,"g"),h=Ye.sanitize(u);o.length>0&&(h=h.replace(b,I=>{let S=h.indexOf(I),y=h[S-1]===" ",L=h[S+I.length]===" ",v=I.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),O=Number(v);if(isNaN(O))return I;let _=o[O];if(_&&_.type==="element"){let k=_.value.outerHTML;return y||(k=" "+k),L||(k=k+" "),k}else B.error("variable type not supported",_,I);return I}));let E=Mp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&E.push(ub);let D=Bp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${E.join(" ")}" ${dr}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${dr}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${dr}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:m}}function Vl(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";m&&(T=ca(Ip(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Kt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let E=Rp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",I=ys(E+D+M),S=I[0]+h+I[1];if(E===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=ys(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Rp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);m&&(b=ca(Ip(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",E=ys(T+b+h),D=E[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+E[1];if(T===" ")D=D.trimStart();else{let M=ys(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Rp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Ip(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(m=s[c-1].text),c/g,">"))}t.targetText=Ye.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Va(e);if(l.length>2){let c=l[2];return qD({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=a2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Ip(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function qD(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=Ye.sanitize(p);let m=p,g=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(m=m.replace(g,E=>{let D=m.indexOf(E),M=m[D-1]===" ",I=m[D+E.length]===" ",S=E.match(f);if(!S)return E;let y=S[1],L=Number(y);if(isNaN(L))return E;let A=o[Number(L)];if(A&&A.type==="element"){let v=A.value.outerHTML;return M||(v=" "+v),I||(v=v+" "),v}else if(A&&A.type==="text"){let v=A.value;return M||(v=" "+v),I||(v=v+" "),v}else B.error("variable type not supported",A,E);return E}));let T=Mp(l,n,r||[],s),b=Bp(l),h="";return c&&(h=`style="${c}"`),m=`<${a} ${h} class="${T.join(" ")}" ${dr}="1"><${a} class="${b.join(" ")}" ${dr}="1">${m}`,n||(i==="smart"?m=`
${m}`:m=`${i}${m}`),n&&(i!=="smart"?m=`${i}${m}`:m=`<${a} class="notranslate" ${dr}="1"> ${m}`),u==="smart"?m=`${m}`:m=`${m}${u}`,{html:m,position:"afterend"}}function Rp(t){let e=t[t.length-1];return e?e.text:""}function Op(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let m=p[1],g=Number(m);if(isNaN(g))return c;let f=r[m];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=L3(a,c,p)}catch(b){if(r)for(let h=0;hb));let m=[],g=[],f=(b,h,E)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),g[b]||(g[b]=h,g[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),g[b].hasError)return;if(E){let S=E instanceof $?new $(E.name,E.message).initNetWork(E.status).initData(E.data):E;g[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}g[b].translatedTexts[h.partIndex]=D;let M=g[b],I=0;for(let S=0;S{let I=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(I=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:I,to:h.to,url:E,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=sb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],A=fr(this.serviceConfig);if(h.tempSentences.forEach((q,F)=>{let C=Pp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:A,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(C&&C.text&&C.text.trim().lengthF.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:I,to:h.to})}let v="";y&&y.length>=2?v=L.map((q,F)=>{let{item:C}=q;return F===L.length-1?C.text:C.text+y[0]+(F+1)+y[1]}).join(""):v=L.map(({item:q})=>q.text).join(S);let O=await this.translate({text:v,from:I,to:h.to,url:E,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:_}=O,k=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let F=new RegExp(q,"g");k=_.split(F)}else k=_.split(S);let N=[];if(k.length>L.length){for(let q=0;qq.text);return A=fr(this.serviceConfig,!0),N.forEach((q,F)=>{let C=L[F],P=C.index,U=C.variables||{};Object.keys(U).length>0&&(q=Op({text:q,delimiters:A,variables:U})),z[P]=q}),{sourceTempSentences:h.tempSentences,text:z,from:O.from,to:O.to}}};m.push(M().then(I=>{let{text:S,sourceTempSentences:y}=I;for(let L=0;L{if(I instanceof $&&I.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=fr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,m)=>{let g=Pp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[m]!==!0&&(g&&g.text&&g.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){B.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=fr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let m=p.index,g=p.variables,f=Object.keys(g);u[m]=l,f.length>0&&(u[m]=Op({text:l,delimiters:i,variables:g}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[vt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};d();d();var Qi="input is invalid type",zp=typeof window=="object",da=zp?window:{};da.JS_SHA256_NO_WINDOW&&(zp=!1);var jD=!zp&&typeof self=="object",HD=!da.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;HD?da=global:jD&&(da=self);var jH=!da.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,HH=typeof define=="function"&&define.amd,xs=!da.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),WD=[-2147483648,8388608,32768,128],er=[24,16,8,0],$l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Yl=["hex","array","digest","arrayBuffer"],jt=[];(da.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});xs&&(da.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var o2=function(t,e){return function(n){return new Ht(e,!0).update(n)[t]()}},u2=function(t){var e=o2("hex",t);e.create=function(){return new Ht(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Ht.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=WD[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};Ht.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,m,g,f,T,b,h,E,D;for(l=16;l<64;++l)g=u[l-15],c=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=u[l-2],p=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,g=u[0]-1413257819,s=g-150054599<<0,r=g+24177077<<0):(b=704751109,g=u[0]-210244248,s=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,m=b^t&n^D,T=a&i^~a&o,g=s+p+T+$l[l]+u[l],f=c+m,s=r+g<<0,r=g+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,m=h^r&e^b,T=s&a^~s&i,g=o+p+T+$l[l+1]+u[l+1],f=c+m,o=n+g<<0,n=g+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),E=n&r,m=E^n&t^h,T=o&s^~o&a,g=i+p+T+$l[l+2]+u[l+2],f=c+m,i=e+g<<0,e=g+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,m=D^e&r^E,T=i&o^~i&s,g=a+p+T+$l[l+3]+u[l+3],f=c+m,a=t+g<<0,t=g+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};Ht.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};Ht.prototype.toString=Ht.prototype.hex;Ht.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};Ht.prototype.array=Ht.prototype.digest;Ht.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Ql(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Qi);if(xs&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!xs||!ArrayBuffer.isView(t)))throw new Error(Qi)}else throw new Error(Qi);t.length>64&&(t=new Ht(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}Ht.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Ql.prototype=new Ht;Ql.prototype.finalize=function(){if(Ht.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Ht.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Ht.prototype.finalize.call(this)}};var Ji=u2();Ji.sha256=Ji;Ji.sha224=u2(!0);Ji.sha256.hmac=l2();Ji.sha224.hmac=l2(!0);var c2=Ji;var d2=c2.sha256;function tr(t){return Promise.resolve(d2(t))}function Jl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function pa(t,e){let n=d2.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function p2(t,e){let n=await pa(t,e);return Jl(n)}async function Zl(t,e){let n=KD(e),r=await pa(t,n);return Jl(r)}function KD(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}var g2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Es=class t extends De{static langMap=new Map(g2);maxTextGroupLength=50;static langMapReverse=new Map(g2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await tr(a)].join(` +`;continue}else if(b.length>e){let E=[];gp(b,e,E);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&gp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?g.push(T):m.push(T))});let f=g.concat(m).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:g,explicitProps:m}}var gs=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Jt(s),l=Object.keys(gr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=gr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&tt())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let m=!!p.canary,g=!!p.alpha,f=!!p.beta;return c===t[e]||m&&i||g&&(r||i)||f&&(a||r||i)?!0:!g&&!f&&!m}).map(c=>vl(e,c,t))};function ms(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function _3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}var Fi=[];async function Sl(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function F3(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await cD(e,t)}async function M3(t){let e=Ln(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await lD(n,e)}async function lD(t,e){let n=await Sl(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function cD(t,e){let n=await Sl(t);return(await pD()).includes(t)||await dD(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function dD(t){let e="cache_list",n=await Sl(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Fi.push(t)},a.onerror=i=>{n.close()}}async function pD(){if(Fi&&Fi.length>0)return Fi;let t=await Sl(Q+"-cacheList","cache_list");return Fi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Fi}d();d();var mp="Original";function Qe(){return mp}function gn(t){mp=t,B3(mp)}d();var R3="auto",xl="auto",I3="auto";function O3(t){R3=t}function qn(t){xl=t}function vt(){return xl!=="auto"?xl:I3!=="auto"?I3:R3}function El(){return xl}d();function Ga(t){return t?.id?.endsWith("pdfWebPage")||!1}function ra(t){try{if(!t||!Ga(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Je={},aa=async function(t,e){let{method:n,data:r}=t,a=await Je.updateGlobalContext(),i=Date.now();if(B.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Je.translateTheWholePage(r),et(Xn,i);else if(n==="translateTheMainPage")await Je.translateTheMainPage(r),et(Xn,i);else if(n==="translateToThePageEndImmediately")await Je.translateToThePageEndImmediately(r),et(Xn,i);else if(n==="toggleTranslatePage")await Je.toggleTranslatePage(r),et(Xn,i);else if(n==="toggleTranslateTheWholePage")await Je.toggleTranslateTheWholePage(r),et(Xn,i);else if(n==="toggleTranslateTheMainPage")await Je.toggleTranslateTheMainPage(r),et(Xn,i);else if(n==="toggleOnlyTransation")await Je.ensureSwitchTranslationMode(r),et(Xn,i);else if(n==="translatePage")await Je.translatePage(a,r),et(Xn,i);else if(n==="toggleTranslationMask")await Je.toggleTranslationMask(r);else if(n==="restorePage")Je.restorePage();else if(n==="retryFailedParagraphs")Je.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Je.switchTranslationMode(r.mode),await Je.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Je.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Ku,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Je.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Qo,{detail:r}));else if(n==="translateWithOpenAI")await Je.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Je.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Je.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Je.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Je.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Je.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Je.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")He()||await Je.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!He())return JSON.stringify(a)}};function z3(t){Object.assign(Je,t)}function N3(t){Object.assign(Je,t)}function U3(t){Object.assign(Je,t)}var gD=function(t,e){let{method:n,data:r}=t;if(B.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Qe();if(n==="getCurrentPageLanguage"){let a=vt();return Je.detectCurrentPageLanguage().catch(i=>{B.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return qn(r),vt();if(n==="getContextString"){let a=Je.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Je.getPureGlobalContext();return ra(a?.rule)}}},Cl,wl;function q3(){let t=Dl();He()||mD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Dl(){return Cl||(Cl=new ea("content_script",!1).getConnection("main",aa),Cl)}function mD(){return wl||(wl=new ea("content_script",!1).getConnection("main_sync",gD,{sync:!0}),wl)}d();var fp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Al="https://transmart.qq.com/api/imt",zr=class t{static langMapReverse=new Map(fp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await ce({url:Al,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function fD(t,e){return Math.floor(Math.random()*(e-t+1))+t}var hD=30,hp="RATE_LIMITER_TICKS",Mi=class t{static strictTicks={};static clearStrictTicks(){ps(hp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await bl(hp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){B.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await ps(hp,JSON.stringify(this.strictTicks))}catch(a){B.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=fD(4,hD);await vr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function St(t){return await Dl().sendMessage("background:main",t)}function ce(t){return au()?ul({method:"request",data:t}):ye()||ru()?(t.fetchPolyfill=globalThis.GM_fetch,Wa(t)):St({method:"fetch",data:t})}function an(){return ye()?Pn():St({method:"getConfig"})}function mn(t){return ye()?ds(t):St({method:"setUserConfig",data:t})}function fn(){return ye()?Or():St({method:"getUserConfig"})}function fs(){return ye()?Zt():St({method:"getLocalConfig"})}function kl(t){return ye()?Xt(t):St({method:"setLocalConfig",data:t})}function j3(t){return ye()?C3(t):St({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=sl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||tt()){if(t.translateService&&!Ju.includes(t.translateService))return Promise.resolve("auto");let r=r3(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await St({method:"detectLanguage",data:t});return Promise.resolve(e)}function H3(){return St({method:"detectTabLanguage"})}async function Pl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||tt()){let n=t.substring(0,200);e=await zr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function B3(t){let e=new CustomEvent(ja,{detail:t});if(document.dispatchEvent(e),ye())return;Dl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function W3(t){return ye()?M3(t):St({method:"queryParagraphCache",data:t})}async function K3(t){if(ye()){await F3(t);return}return St({method:"setParagraphCache",data:t})}async function G3(){if(ye())return Promise.resolve();await St({method:"mockRequest"})}function Bi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):St({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function Ii(t=""){return ye()||tt()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function $3(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Ll(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):St({method:"openAboutPage"})}function Ri(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):St({method:"openInTab",data:t})}function V3(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):St({method:"openEbookViewerPage"})}function Y3(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):St({method:"openEbookBuilderPage"})}function _l(t){tt()}function Oi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):St({method:"openPdfViewerPage",data:{url:e}})}function Q3(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):St({method:"openSubtitleBuilderPage"})}function zi(t){return ye()?Promise.resolve():St({method:"setBadge",data:{text:t}})}function J3(){return ye()?(B.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):St({method:"autoSyncLatestConfig"})}function Fl(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function Z3(t,e){return ye()?Mi.getDelay(t,e):St({method:"getDelay",data:{key:t,options:e}})}var X3="G-MKMD9LWFTR";async function ot(t,e,n){try{let r=us(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=He(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let A=await Rr(l,0),v=Ml(new Date(A)),O=Date.now(),_=Ml(new Date(O));if(v===_)return;await s3(l,O)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",m=await At("fakeUserId","");m||(m=await Rr("fakeUserId",""),m&&await et("fakeUserId",m));let g=Ut(),f=new Date,T=await At("installedAt","");T||(T=await Rr("installedAt",""),T&&await et("installedAt",T)),m?T||(T=new Date(0).toISOString(),await et("installedAt",T)):(m=bD(32),await et("fakeUserId",m)),T||(T=f.toISOString(),await et("installedAt",T));let b=new Date(T),h=Ml(b),E=Ml(f),D=h===E,M=f.getTime()-b.getTime()<7*24*60*60*1e3,I=`https://www.google-analytics.com/mp/collect?measurement_id=${X3}&api_secret=${p}`;u||(I=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${X3}&api_secret=${p}`);let S=mi.parse(window.navigator.userAgent),y=e.map(A=>{let v=A.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",g&&(v.version=g),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=TD(b)),n.user){let _=a3(n.user);_&&Object.keys(_).forEach(k=>{v[k]=_[k]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),v.page_type=O,s?v.main_frame=0:v.main_frame=1,!c){let _=n.url;try{let k=new URL(_);v.site_host=k.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...A,params:v}});if(i)return;let L=await ce({responseType:"text",url:I,method:"POST",body:JSON.stringify({client_id:m,user_id:m,events:y})})}catch{}}function bD(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;ae.removeEventListener("message",n)),t.length=0}function xD(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vD(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function ED(t,e,n,r){let a=i=>{let o=i.data;a1(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function e1(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(a1(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yD(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CD(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(r1(e,"tell",n,i,r),a)}async function t1(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),m=await xD(t,n,r,s);clearTimeout(p),l(m)});return e.postMessage(r1(n,"ask",r,s,a),i),u}var oa=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;e1(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ia(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await t1(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(ED(this.thisWindow,this.protocol,e,n))}tell(e,n){CD(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(e1(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return t1(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SD(this.listeners)}};var i1;async function o1(){if(He()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=oa.iframe(Zu,"*",{targetWindow:e});i1=n,await oa.connect(n).catch(r=>{B.error("connect with parent frame error",r)})}}function s1(){return i1}d();function u1(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();d();d();d();function l1(t){return t.replace(//g,">")}d();var Bl=!1,wD=ye();function c1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function DD(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&d1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(sa(i,Vu)){if(a===!0)return!0;continue}if(hs(i.nodeName,e.inlineTags))return!0;if(!bp(i,e))return!1}}return!0}function Tp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(hs(t.nodeName,n)||bp(t,e)){if(sa(t,ob)||hs(t.nodeName,["BR"]))return!1;if(sa(t,Vu))return!0;if(bp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return DD(t,e)}else return sa(t,Vu);return!1}function d1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&sa(t,ib,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&sa(t,J4))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||hs(t.nodeName,i))}function Ni(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!g1(r)&&r.length>=n}function p1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(g1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function g1(t){for(let e=0;e127)return!1;return!0}function m1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function f1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function h1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function b1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function T1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function sa(t,e,n=!1){return yp(t,e,"1",n)}function yp(t,e,n,r=!1){return Bl&&!r?t[xn]?!!(t[xn]&&t[xn][e]===n):!1:t.dataset[e]===n}function Ui(t){return(t.innerText||t.textContent||"").trim()}function vp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Il(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function lt(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(Bl&&!r?(t[xn]||(t[xn]={}),t[xn][e]||(t[xn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Rl(t,e,n=!1){if(Bl&&!n){if(!t[xn]||!t[xn][e])return;delete t[xn][e]}else delete t.dataset[e]}function qi(t,e,n=!1){return Bl&&!n?!t[xn]||!t[xn][e]?void 0:t[xn][e]:t.dataset[e]}function bp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!hs(t.nodeName,n)}function Ee(){if(!globalThis||!globalThis.location)return"https://example.com";if(!He())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function En(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){B.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else B.warn("injectCSS failed, rootDocument does not have head node",t)}function ji(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(wD){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function hs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function y1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function v1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||d1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return B.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function S1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();d();d();var ql,Fe,D1,AD,bs,x1,A1,zl={},k1=[],kD=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(t,e){for(var n in e)t[n]=e[n];return t}function P1(t){var e=t.parentNode;e&&e.removeChild(t)}function xp(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?ql.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return Ol(t,o,r,a,null)}function Ol(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++D1};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function jt(t){return t.children}function Hi(t,e){this.props=t,this.context=e}function Wi(t,e){if(e==null)return t.__?Wi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?Ol(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null){if(g.__=n,g.__b=n.__b+1,(m=h[c])===null||m&&g.key==m.key&&g.type===m.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:jl}),n.__[t]}function se(t){return Ts=1,FD(G1,t)}function FD(t,e,n){var r=Wl(ys++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):G1(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=wt,!wt.u)){wt.u=!0;var a=wt.shouldComponentUpdate;wt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ae(t,e){var n=Wl(ys++,3);!Fe.__s&&K1(n.__H,e)&&(n.__=t,n.i=e,wt.__H.__h.push(n))}function $e(t){return Ts=5,Ue(function(){return{current:t}},[])}function Ue(t,e){var n=Wl(ys++,7);return K1(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return Ts=8,Ue(function(){return t},e)}function Kl(t){var e=wt.context[t.__c],n=Wl(ys++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(wt)),e.props.value):t.__}function MD(){for(var t;t=W1.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Hl),t.__H.__h.forEach(wp),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===jt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),wt=null,z1&&z1(t)},Fe.__r=function(t){N1&&N1(t),ys=0;var e=(wt=t.__c).__H;e&&(Cp===wt?(e.__h=[],wt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jl,n.__N=n.i=void 0})):(e.__h.forEach(Hl),e.__h.forEach(wp),e.__h=[])),Cp=wt},Fe.diffed=function(t){U1&&U1(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(W1.push(e)!==1&&O1===Fe.requestAnimationFrame||((O1=Fe.requestAnimationFrame)||BD)(MD)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jl&&(n.__=n.__V),n.i=void 0,n.__V=jl})),Cp=wt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Hl),n.__h=n.__h.filter(function(r){return!r.__||wp(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),q1&&q1(t,e)},Fe.unmount=function(t){j1&&j1(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hl(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var H1=typeof requestAnimationFrame=="function";function BD(t){var e,n=function(){clearTimeout(r),H1&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);H1&&(e=requestAnimationFrame(n))}function Hl(t){var e=wt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),wt=e}function wp(t){var e=wt;t.__c=t.__(),wt=e}function K1(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function G1(t,e){return typeof e=="function"?e(t):e}d();var $1=["*://*/*","*","*://*"],Y1="immersive-translate-wildcard-placeholder.com";function Dp(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>$1.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if($1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return RD(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,Y1),m;try{m=new URL(p)}catch{return B.debug("invalid match pattern",p,"raw match value:",c),!1}let g=m.host,f=m.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=ID(l+":",V1(g),V1(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function V1(t){return t.replaceAll(Y1,"*")}function ID(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function dt(t,e){return Dp(t,e)!==null}function RD(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var OD=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Cn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(Cn(t,i))return!1;if(Cn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!Cn(t,o)),c;function p(){return n&&n.display?!!OD.includes(n.display):Cn(t,r)}}var Gt=Cn;function Va(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function vs(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function fr(t,e=!1){let n=es;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function $a(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return fr(n,e)}function $i(t,e){return na(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function Ap(t){let{rule:e}=t,n=zD(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function zD(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function Ss(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),lt(r,rb,e.toString());let a=Ap(t);return r.append(Ye.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Vi(t,e){return t.querySelector(`[${U0}='${e}']`)}function Q1(){document.querySelectorAll(`[${U0}]`).forEach(e=>{e.remove()})}function J1(){document.querySelectorAll(`.${yt}-error`).forEach(e=>{e.remove()})}function Z1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{ji(n)&&e.push(n)}),e}function kp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},m=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),g=new RegExp(a.replace("{word}",m.map(f=>f.k).join("|")),"g");l=l.replace(g,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let m=new RegExp(p,"gi");l=l.replace(m,(g,f)=>{let T=c++;return e[`${T}`]=l1(f),o.length>2?g.replace(f,`<${o[2]}${T}>`):g.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){B.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function xs(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||T1(s)||m1(s)||b1(s)||f1(s)||h1(s)||UD(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ni(i,n,r)}function Nr(t){return t.nodeType===Node.ELEMENT_NODE}function X1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Pp(){return await At("fakeUserId","")}async function ND(){return await At("installedAt","")}async function Gl(t){let n=Me().INSTALL_FROM,r=Ut(),a=await ND(),i=await Pp(),o=await Pn(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function e2(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await _p(t,e);r(a)})()},[t,e,r]),n}async function _p(t,e){if(!t||!e)return;let n=!1,r,a=!0;!tt()&&ye()||ut().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>dt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>dt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}d();function Fp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(lb),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${j0}-theme-${t}`):a.push(`${q0}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(j0):a.push(q0),a}function Mp(t){let e=["notranslate",Qu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function a2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=$a(n,!0),m="afterend",g=p[0],f=p[1],T=`${g}(\\d+)${f}`,b=new RegExp(T,"g"),h=Ye.sanitize(u);o.length>0&&(h=h.replace(b,I=>{let S=h.indexOf(I),y=h[S-1]===" ",L=h[S+I.length]===" ",v=I.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),O=Number(v);if(isNaN(O))return I;let _=o[O];if(_&&_.type==="element"){let k=_.value.outerHTML;return y||(k=" "+k),L||(k=k+" "),k}else B.error("variable type not supported",_,I);return I}));let E=Fp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&E.push(ub);let D=Mp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${E.join(" ")}" ${dr}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${dr}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${dr}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:m}}function $l(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";m&&(T=ca(Bp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Gt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let E=Ip(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",I=vs(E+D+M),S=I[0]+h+I[1];if(E===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=vs(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Ip(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);m&&(b=ca(Bp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",E=vs(T+b+h),D=E[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+E[1];if(T===" ")D=D.trimStart();else{let M=vs(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Ip(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Bp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(m=s[c-1].text),c/g,">"))}t.targetText=Ye.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=$a(e);if(l.length>2){let c=l[2];return qD({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=a2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Bp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function qD(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=Ye.sanitize(p);let m=p,g=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(m=m.replace(g,E=>{let D=m.indexOf(E),M=m[D-1]===" ",I=m[D+E.length]===" ",S=E.match(f);if(!S)return E;let y=S[1],L=Number(y);if(isNaN(L))return E;let A=o[Number(L)];if(A&&A.type==="element"){let v=A.value.outerHTML;return M||(v=" "+v),I||(v=v+" "),v}else if(A&&A.type==="text"){let v=A.value;return M||(v=" "+v),I||(v=v+" "),v}else B.error("variable type not supported",A,E);return E}));let T=Fp(l,n,r||[],s),b=Mp(l),h="";return c&&(h=`style="${c}"`),m=`<${a} ${h} class="${T.join(" ")}" ${dr}="1"><${a} class="${b.join(" ")}" ${dr}="1">${m}`,n||(i==="smart"?m=`
${m}`:m=`${i}${m}`),n&&(i!=="smart"?m=`${i}${m}`:m=`<${a} class="notranslate" ${dr}="1"> ${m}`),u==="smart"?m=`${m}`:m=`${m}${u}`,{html:m,position:"afterend"}}function Ip(t){let e=t[t.length-1];return e?e.text:""}function Rp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let m=p[1],g=Number(m);if(isNaN(g))return c;let f=r[m];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=L3(a,c,p)}catch(b){if(r)for(let h=0;hb));let m=[],g=[],f=(b,h,E)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),g[b]||(g[b]=h,g[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),g[b].hasError)return;if(E){let S=E instanceof V?new V(E.name,E.message).initNetWork(E.status).initData(E.data):E;g[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}g[b].translatedTexts[h.partIndex]=D;let M=g[b],I=0;for(let S=0;S{let I=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(I=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:I,to:h.to,url:E,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=sb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],A=fr(this.serviceConfig);if(h.tempSentences.forEach((q,F)=>{let C=kp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:A,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(C&&C.text&&C.text.trim().lengthF.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:I,to:h.to})}let v="";y&&y.length>=2?v=L.map((q,F)=>{let{item:C}=q;return F===L.length-1?C.text:C.text+y[0]+(F+1)+y[1]}).join(""):v=L.map(({item:q})=>q.text).join(S);let O=await this.translate({text:v,from:I,to:h.to,url:E,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:_}=O,k=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let F=new RegExp(q,"g");k=_.split(F)}else k=_.split(S);let N=[];if(k.length>L.length){for(let q=0;qq.text);return A=fr(this.serviceConfig,!0),N.forEach((q,F)=>{let C=L[F],P=C.index,U=C.variables||{};Object.keys(U).length>0&&(q=Rp({text:q,delimiters:A,variables:U})),z[P]=q}),{sourceTempSentences:h.tempSentences,text:z,from:O.from,to:O.to}}};m.push(M().then(I=>{let{text:S,sourceTempSentences:y}=I;for(let L=0;L{if(I instanceof V&&I.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=fr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,m)=>{let g=kp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[m]!==!0&&(g&&g.text&&g.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){B.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=fr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let m=p.index,g=p.variables,f=Object.keys(g);u[m]=l,f.length>0&&(u[m]=Rp({text:l,delimiters:i,variables:g}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[vt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};d();d();var Qi="input is invalid type",Op=typeof window=="object",da=Op?window:{};da.JS_SHA256_NO_WINDOW&&(Op=!1);var jD=!Op&&typeof self=="object",HD=!da.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;HD?da=global:jD&&(da=self);var jH=!da.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,HH=typeof define=="function"&&define.amd,Es=!da.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",be="0123456789abcdef".split(""),WD=[-2147483648,8388608,32768,128],er=[24,16,8,0],Vl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Yl=["hex","array","digest","arrayBuffer"],Ht=[];(da.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});Es&&(da.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var o2=function(t,e){return function(n){return new Wt(e,!0).update(n)[t]()}},u2=function(t){var e=o2("hex",t);e.create=function(){return new Wt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Wt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=WD[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};Wt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,m,g,f,T,b,h,E,D;for(l=16;l<64;++l)g=u[l-15],c=(g>>>7|g<<25)^(g>>>18|g<<14)^g>>>3,g=u[l-2],p=(g>>>17|g<<15)^(g>>>19|g<<13)^g>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,g=u[0]-1413257819,s=g-150054599<<0,r=g+24177077<<0):(b=704751109,g=u[0]-210244248,s=g-1521486534<<0,r=g+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,m=b^t&n^D,T=a&i^~a&o,g=s+p+T+Vl[l]+u[l],f=c+m,s=r+g<<0,r=g+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,m=h^r&e^b,T=s&a^~s&i,g=o+p+T+Vl[l+1]+u[l+1],f=c+m,o=n+g<<0,n=g+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),E=n&r,m=E^n&t^h,T=o&s^~o&a,g=i+p+T+Vl[l+2]+u[l+2],f=c+m,i=e+g<<0,e=g+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,m=D^e&r^E,T=i&o^~i&s,g=a+p+T+Vl[l+3]+u[l+3],f=c+m,a=t+g<<0,t=g+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};Wt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=be[t>>28&15]+be[t>>24&15]+be[t>>20&15]+be[t>>16&15]+be[t>>12&15]+be[t>>8&15]+be[t>>4&15]+be[t&15]+be[e>>28&15]+be[e>>24&15]+be[e>>20&15]+be[e>>16&15]+be[e>>12&15]+be[e>>8&15]+be[e>>4&15]+be[e&15]+be[n>>28&15]+be[n>>24&15]+be[n>>20&15]+be[n>>16&15]+be[n>>12&15]+be[n>>8&15]+be[n>>4&15]+be[n&15]+be[r>>28&15]+be[r>>24&15]+be[r>>20&15]+be[r>>16&15]+be[r>>12&15]+be[r>>8&15]+be[r>>4&15]+be[r&15]+be[a>>28&15]+be[a>>24&15]+be[a>>20&15]+be[a>>16&15]+be[a>>12&15]+be[a>>8&15]+be[a>>4&15]+be[a&15]+be[i>>28&15]+be[i>>24&15]+be[i>>20&15]+be[i>>16&15]+be[i>>12&15]+be[i>>8&15]+be[i>>4&15]+be[i&15]+be[o>>28&15]+be[o>>24&15]+be[o>>20&15]+be[o>>16&15]+be[o>>12&15]+be[o>>8&15]+be[o>>4&15]+be[o&15];return this.is224||(u+=be[s>>28&15]+be[s>>24&15]+be[s>>20&15]+be[s>>16&15]+be[s>>12&15]+be[s>>8&15]+be[s>>4&15]+be[s&15]),u};Wt.prototype.toString=Wt.prototype.hex;Wt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};Wt.prototype.array=Wt.prototype.digest;Wt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Ql(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Qi);if(Es&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!Es||!ArrayBuffer.isView(t)))throw new Error(Qi)}else throw new Error(Qi);t.length>64&&(t=new Wt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}Wt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Ql.prototype=new Wt;Ql.prototype.finalize=function(){if(Wt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();Wt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),Wt.prototype.finalize.call(this)}};var Ji=u2();Ji.sha256=Ji;Ji.sha224=u2(!0);Ji.sha256.hmac=l2();Ji.sha224.hmac=l2(!0);var c2=Ji;var d2=c2.sha256;function tr(t){return Promise.resolve(d2(t))}function Jl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function pa(t,e){let n=d2.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function p2(t,e){let n=await pa(t,e);return Jl(n)}async function Zl(t,e){let n=KD(e),r=await pa(t,n);return Jl(r)}function KD(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}var g2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Cs=class t extends De{static langMap=new Map(g2);maxTextGroupLength=50;static langMapReverse=new Map(g2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new V("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await tr(a)].join(` `),p=t.getUTCDate(u),m=["TC3-HMAC-SHA256",l,`${p}/${i}/tc3_request`,await tr(c)].join(` -`),g=await p2(p,`TC3${n}`),f=await Zl(i,g),T=await Zl("tc3_request",f),b=await Zl(m,T),h=await ce({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var m2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],GD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Cs=class t extends De{static langMap=new Map(m2);static langMapReverse=new Map(m2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await ce({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:GD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var f2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ya=class t extends De{static langMap=new Map(f2);static langMapReverse=new Map(f2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function VD(t,e){return e?t+(e-t%e):t}function $D(t,e){return t.split(e).length-1}function Np(t){let e=Date.now(),n=1;for(let r of t)n+=$D(r,"i");return VD(e,n)}function YD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Up(){return YD(1e6,1e8)}d();d();d();var qp="https://www2.deepl.com/jsonrpc",jp="auto",h2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function QD(t=h2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Hp(t){return QD()[t.toLowerCase()]}var JD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function ZD(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function XD(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function eA(t,e,n,r,a,i,o){let s=Up(),u=XD(r,n),l=[];e.forEach(m=>{l.push({text:m,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Np(e);let c=await ce({retry:2,method:"POST",url:t,body:ZD(u),headers:JD}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(m=>{p.text.push(m.text)}),p}async function b2(t,e,n,r=jp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:eA(t,e,Hp(n),Hp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var T2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Zi=class t extends De{static langMap=new Map(T2);static langMapReverse=new Map(T2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=qp;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=Ut(qp,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await b2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var ws=class t extends De{static langMap=new Map(hp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=zr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=y2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await ce({url:Al,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=y2()),r.length===1){let g=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[g.text],from:g.from,to:g.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),m=await ce({url:Al,body:p,method:"POST"});if(m.header.ret_code!=="succ")throw new $(m.message||m.header.ret_code);return{text:m.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function y2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Wp(){return Math.random()>=.1}var Xi=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Wp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await G3(),!Wp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var S2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Kp=new Map(S2),v2=new Map(S2.map(([t,e])=>[e,t])),Gp=class t extends De{static langMap=Kp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Kp.get(r)||"auto",target_lang:Kp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:v2.get(o.source_lang),to:v2.get(o.target_lang)}}else throw new $(i.msg)}},Xl=Gp;d();var x2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ds=new Map(x2),tA=new Map(x2.map(([t,e])=>[e,t])),Vp=class extends De{static langMap=Ds;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=Ut(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=Ut(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=Ut(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=Ut(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=Ut(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:Ds.get(n)||"",target_lang:Ds.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:Ds.get(n)||"auto",target_lang:Ds.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let m,g={};e.refresh&&(g={"X-Refresh":"True"}),e.debug&&(g={...g,"X-Debug":"True"}),this.provider==="pro"?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):m=await ce({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(m,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let E=await new Ya(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` +`),g=await p2(p,`TC3${n}`),f=await Zl(i,g),T=await Zl("tc3_request",f),b=await Zl(m,T),h=await ce({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new V(h.Response.Error.Message);return h}};d();var m2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],GD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},ws=class t extends De{static langMap=new Map(m2);static langMapReverse=new Map(m2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await ce({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:GD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var f2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ya=class t extends De{static langMap=new Map(f2);static langMapReverse=new Map(f2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new V("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new V("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new V("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new V("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function $D(t,e){return e?t+(e-t%e):t}function VD(t,e){return t.split(e).length-1}function zp(t){let e=Date.now(),n=1;for(let r of t)n+=VD(r,"i");return $D(e,n)}function YD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Np(){return YD(1e6,1e8)}d();d();d();var Up="https://www2.deepl.com/jsonrpc",qp="auto",h2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function QD(t=h2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function jp(t){return QD()[t.toLowerCase()]}var JD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function ZD(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function XD(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function eA(t,e,n,r,a,i,o){let s=Np(),u=XD(r,n),l=[];e.forEach(m=>{l.push({text:m,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=zp(e);let c=await ce({retry:2,method:"POST",url:t,body:ZD(u),headers:JD}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(m=>{p.text.push(m.text)}),p}async function b2(t,e,n,r=qp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:eA(t,e,jp(n),jp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var T2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Zi=class t extends De{static langMap=new Map(T2);static langMapReverse=new Map(T2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Up;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=qt(Up,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await b2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var Ds=class t extends De{static langMap=new Map(fp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=zr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=y2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await ce({url:Al,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new V(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=y2()),r.length===1){let g=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[g.text],from:g.from,to:g.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),m=await ce({url:Al,body:p,method:"POST"});if(m.header.ret_code!=="succ")throw new V(m.message||m.header.ret_code);return{text:m.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function y2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Hp(){return Math.random()>=.1}var Xi=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Hp())throw new V("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await G3(),!Hp())throw new V("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var S2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Wp=new Map(S2),v2=new Map(S2.map(([t,e])=>[e,t])),Kp=class t extends De{static langMap=Wp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new V("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Wp.get(r)||"auto",target_lang:Wp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:v2.get(o.source_lang),to:v2.get(o.target_lang)}}else throw new V(i.msg)}},Xl=Kp;d();var x2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],As=new Map(x2),tA=new Map(x2.map(([t,e])=>[e,t])),Gp=class extends De{static langMap=As;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new V("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new V("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new V("authKey are required");if(!this.authKey)throw new V("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=qt(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=qt(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=qt(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=qt(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=qt(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:As.get(n)||"",target_lang:As.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:As.get(n)||"auto",target_lang:As.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let m,g={};e.refresh&&(g={"X-Refresh":"True"}),e.debug&&(g={...g,"X-Debug":"True"}),this.provider==="pro"?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?m=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...g,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):m=await ce({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(m,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let E=await new Ya(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` `),url:"",options:{}});E&&E.text&&(T=E.text.split(` -`))}return{text:T,from:f[0]&&tA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},E2=Vp;d();var nA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],$p=new Map(nA),Yp=class extends De{static langMap=$p;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:$p.get(r)||r,to:$p.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},C2=Yp;d();var rA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Qp=new Map(rA),Jp=class extends De{static langMap=Qp;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Qp.get(a)||a};r!=="auto"&&(i.from=Qp.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(m=>({text:m}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((m,g)=>{o.append(g,m)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await ce(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(m=>m.translations.map(f=>f.text).join(" "))}}},w2=Jp;d();var aA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],eo=new Map(aA),Zp=class extends De{static langMap=eo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:T,from:f[0]&&tA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},E2=Gp;d();var nA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],$p=new Map(nA),Vp=class extends De{static langMap=$p;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new V("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:$p.get(r)||r,to:$p.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new V(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},C2=Vp;d();var rA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Yp=new Map(rA),Qp=class extends De{static langMap=Yp;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new V("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Yp.get(a)||a};r!=="auto"&&(i.from=Yp.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(m=>({text:m}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((m,g)=>{o.append(g,m)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await ce(c);if(p.length===0)throw new V("server response invalid");return{from:r,to:a,text:p.map(m=>m.translations.map(f=>f.text).join(" "))}}},w2=Qp;d();var aA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],eo=new Map(aA),Jp=class extends De{static langMap=eo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!eo.get(r)?(i=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||eo.get(r)||r,target:eo.get(a)||a})):u.body=JSON.stringify({text:s,source:eo.get(r),target:eo.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},D2=Zp;d();function k2(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function hn(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:m,sourceLanguageUrlPattern:g,immediateTranslationPattern:f}=n,T=m||"zh-CN",b=to(e,o),h=to(e,f),E=s,D=Object.keys(u);for(let ne of D){let re=u[ne];if(to(e,re)){E=ne;break}}let M=l,I=Object.keys(c);for(let ne of I){let re=c[ne];if(re&&to(e,re)){M=ne;break}}let S=to(e,p),y=A2(e,p);y||(y=dt(e,fb)),y||(y=dt(e,n.blockUrls));let L=A2(e,n.inputTranslationUrlPattern);L||(L=dt(e,n.inputTranslationBlockUrls));let A=dt(e,n.mutationBlockUrls),v=Object.keys(g),O={};for(let ne of v){let re=g[ne];if(re&&re.matches)for(let xe of re.matches)O[xe]=ne}let _=Object.keys(O),k=Ap(e,_);k&&(i=O[k]??"auto",O[k]&&O[k]!=="auto"&&qn(O[k]));let N=a.hostname,z=await tr(N),q=a.pathname+a.search+a.hash,F=await tr(q),C=`https://${z}.com/${F}`,P=await Zt(),U=await w3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=E;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=E;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=E;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ue=await Mt.get(Ft,null),ae=!1;ue&&(ae=Jt(ue));let J={targetLanguage:T,config:n,translationService:E,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:A,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:e,encryptedUrl:C,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};ue&&(J.user=ue,ae?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(ne=>!J.config.generalRule.bodyTranslateTags.includes(ne)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[J.translationService]||{};ie.immediateTranslationTextCount!==void 0&&iA(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),J.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&J.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(J.state.translationDebounce=ie.translationDebounce);let ge=U.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>to(e,ne)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let be=n.generalRule;if(Y&&(J.rule=hl(be,Y)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(ne=>!J.rule.bodyTranslateTags.includes(ne)&&!J.rule.forceTranslateTags.includes(ne))),J.rule.mainFrameSelector){let ne=document.querySelector(J.rule.mainFrameSelector);ne&&(J.mainFrame=ne)}return J}function to(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&dt(t,r)?!1:n&&n.length>0&&dt(t,n)?!0:i&&i.length>0&&Il(i)?!1:!!(a&&a.length>0&&Il(a))}function A2(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&dt(t,n)||r&&r.length>0&&Il(r))}function iA(t){return typeof t=="number"}d();d();d();function P2(t){let e=t.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!eo.get(r)?(i=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||eo.get(r)||r,target:eo.get(a)||a})):u.body=JSON.stringify({text:s,source:eo.get(r),target:eo.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new V("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},D2=Jp;d();function k2(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function hn(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:m,sourceLanguageUrlPattern:g,immediateTranslationPattern:f}=n,T=m||"zh-CN",b=to(e,o),h=to(e,f),E=s,D=Object.keys(u);for(let ne of D){let re=u[ne];if(to(e,re)){E=ne;break}}let M=l,I=Object.keys(c);for(let ne of I){let re=c[ne];if(re&&to(e,re)){M=ne;break}}let S=to(e,p),y=A2(e,p);y||(y=dt(e,fb)),y||(y=dt(e,n.blockUrls));let L=A2(e,n.inputTranslationUrlPattern);L||(L=dt(e,n.inputTranslationBlockUrls));let A=dt(e,n.mutationBlockUrls),v=Object.keys(g),O={};for(let ne of v){let re=g[ne];if(re&&re.matches)for(let xe of re.matches)O[xe]=ne}let _=Object.keys(O),k=Dp(e,_);k&&(i=O[k]??"auto",O[k]&&O[k]!=="auto"&&qn(O[k]));let N=a.hostname,z=await tr(N),q=a.pathname+a.search+a.hash,F=await tr(q),C=`https://${z}.com/${F}`,P=await Zt(),U=await w3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=E;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=E;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let $=E;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&($=n.subtitleTranslateService);let ue=await Mt.get(Ft,null),ae=!1;ue&&(ae=Jt(ue));let J={targetLanguage:T,config:n,translationService:E,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:$,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:A,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:e,encryptedUrl:C,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};ue&&(J.user=ue,ae?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(ne=>!J.config.generalRule.bodyTranslateTags.includes(ne)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[J.translationService]||{};ie.immediateTranslationTextCount!==void 0&&iA(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),J.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&J.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(J.state.translationDebounce=ie.translationDebounce);let ge=U.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>to(e,ne)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Te=n.generalRule;if(Y&&(J.rule=hl(Te,Y)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(ne=>!J.rule.bodyTranslateTags.includes(ne)&&!J.rule.forceTranslateTags.includes(ne))),J.rule.mainFrameSelector){let ne=document.querySelector(J.rule.mainFrameSelector);ne&&(J.mainFrame=ne)}return J}function to(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&dt(t,r)?!1:n&&n.length>0&&dt(t,n)?!0:i&&i.length>0&&Il(i)?!1:!!(a&&a.length>0&&Il(a))}function A2(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&dt(t,n)||r&&r.length>0&&Il(r))}function iA(t){return typeof t=="number"}d();d();d();function P2(t){let e=t.split(` `),n=[],r,a="",i="";for(let o of e){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Xp=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Zp=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(e,n,r){if(super(e,n,r),e||(e={}),e.APIKEY){let a=e.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(e.ignoreResRegexs)&&(this.ignoreResReges=e.ignoreResRegexs),e.translationTextSeparator&&(this.translationTextSeparator=e.translationTextSeparator),e.model&&(this.model=e.model),e.systemPrompt&&(this.systemPrompt=e.systemPrompt),e.prompt&&(this.prompt=e.prompt),e.multiplePrompt&&(this.multiplePrompt=e.multiplePrompt),e.subtitlePrompt&&(this.subtitlePrompt=e.subtitlePrompt),e.bodyConfigs&&(this.bodyConfigs=e.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a,options:i}=e;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},p=i?.sourceProgram,m=["subtitle","videoSubtitle"].includes(p),g=[n];i?.rawTextArrayLength&&(g=n.split(this.translationTextSeparator)),g.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),m&&this.subtitlePrompt&&g.length>1&&(s=this.subtitlePrompt);let f="",T="",b=s.includes("{{json}}"),h=s.includes("{{yaml}}");if(b){let I=[],S=c.imt_json_item||"";m&&(S=c.imt_subtitle_json_item||S);for(let y=0;yS==="from"?u:S==="to"?l+" Language":S==="text"?n:S=="json"?f:S=="yaml"?T:c[S]||I).replace(/{{(.+?)}}/g,(I,S)=>c[S]||I);let E=await this.handleOptions(s,e);B.debug("request options",E);let D=await ce(E),M=this.parseResponse(D);if(M=this.filterContent(n,M,s,g),B.debug("filterContent after",M),!b&&!h||!M)return{from:r,to:a,text:M||n};M=oA(n,M),M=_3(M);try{let I={};if(b){B.debug("extractValidJson before",M);let L=this.extractValidJson(M);B.debug("parse before",M),I=uu.parse(L)}else if(h){B.debug("parseYAML before",M);let L=this.extractValidYaml(M);I=P2(L)}let S=c.imt_trans_field;m&&(S=c.imt_sub_trans_field||S);let y=c.imt_source_field;return m&&(y=c.imt_sub_source_field||y),M=this.restoreText(g,I,S,this.translationTextSeparator,y),{from:r,to:a,text:M}}catch(I){return B.error("parse response failed",M,I),{from:r,to:a,text:M}}}extractValidJson(e){let n=e.indexOf("["),r=e.lastIndexOf("]");return n!==-1&&r!==-1?e.slice(n,r+1):""}extractValidYaml(e){let n=e.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=e)}catch(o){B.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},no=Xp;function oA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var sA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],L2=new Map(sA),eg=class extends no{static langMap=L2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=Ut(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=Ut(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=Ut(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return L2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},_2=eg;d();var B2=u6(F2());var M2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],ks=class t extends De{static langMap=new Map(M2);static langMapReverse=new Map(M2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new B2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(E=>`${this.encode(E)}=${this.encode(T[E])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),m=this.SHA1.b64_hmac(`${n}&`,p),g=new URLSearchParams(Object.assign({},l,{Signature:m})).toString(),f=await ce({retry:this.retry,url:`https://${i}.aliyuncs.com?${g}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var uA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},tg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},ng=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=tg(e);if(r)return Array.isArray(n)?`${r}=${n.map(tg).sort().join(`&${r}=`)}`:`${r}=${tg(n)}`}).filter(e=>e).join("&"),ro=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,ng(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await tr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return Jl(await pa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=ng(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} +`)}restoreText(e,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=e)}catch(o){B.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},no=Zp;function oA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var sA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],L2=new Map(sA),Xp=class extends no{static langMap=L2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Rn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new V("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new V("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=qt(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=qt(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=qt(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return L2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Ln(e.join("_"))}},_2=Xp;d();var B2=u6(F2());var M2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Ps=class t extends De{static langMap=new Map(M2);static langMapReverse=new Map(M2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new V("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new B2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(E=>`${this.encode(E)}=${this.encode(T[E])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),m=this.SHA1.b64_hmac(`${n}&`,p),g=new URLSearchParams(Object.assign({},l,{Signature:m})).toString(),f=await ce({retry:this.retry,url:`https://${i}.aliyuncs.com?${g}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new V(f.Message);return f}};d();d();var uA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},eg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},tg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=eg(e);if(r)return Array.isArray(n)?`${r}=${n.map(eg).sort().join(`&${r}=`)}`:`${r}=${eg(n)}`}).filter(e=>e).join("&"),ro=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,tg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await tr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return Jl(await pa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=tg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} `),e.push(this.signedHeaders()),e.push(await this.hexEncodedBodyHash()),e.join(` -`)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new $(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await tr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(ng(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return uA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await pa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await pa(r,i),s=await pa(a,o);return pa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var I2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],rg=new Map(I2),lA=new Map(I2.map(([t,e])=>[e,t])),ag=class extends De{static langMap=rg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new ro(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=rg.get(r),o={TargetLanguage:rg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ro(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(g=>g.Translation),m=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(m=lA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:m,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},R2=ag;d();var O2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ig=new Map(O2),cA=new Map(O2.map(([t,e])=>[e,t])),Ps=class extends De{static langMap=ig;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=ig.get(r)||"detect",o=ig.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=cA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var dA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],og=new Map(dA),Ls=class extends De{static langMap=og;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await ce({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:og.get(r)||r,target_lang:og.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var sg="https://{s}bing.com",j2=sg+"/translator",pA=sg+"/ttranslatev3",gA=sg+"/tspellcheckv3",tc="bingGlobalConfig",H2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],z2=new Map(H2),N2=new Map(H2.map(([t,e])=>[e,t])),U2=1e3,nr,ao;function ug(t,e){return t.replace("{s}",e?e+".":"")}async function mA(){if(!nr){let n=await oe.storage.local.get(tc);return n&&(nr=n[tc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=nr;return Date.now()-t>e}async function q2(){let t,e,n,r,a,i,o,s,u,l;try{let c=ug(j2,t),p=await ce({retry:2,url:c,responseType:"raw"}),{body:m,headers:g,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=g["set-cookie"],e=m.match(/IG:"([^"]+)"/)[1],n=m.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(m.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return nr={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[tc]:nr}),nr}function fA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=nr;return ug(t?gA:pA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+nr.count++:"")}function hA(t,e,n,r){let{token:a,key:i}=nr,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function W2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>U2)throw new Error(`The supported maximum length of text is ${U2}. Please shorten the text.`);ao||(ao=q2()),await ao,await mA()&&(ao=q2(),await ao),e=e||"auto",n=n||"zh-CN",e=z2.get(e)||e,n=z2.get(n)||n;let a=fA(!1),i=hA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:ug(j2,nr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(nr=null,ao=null,await oe.storage.local.remove(tc),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new V(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` +`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await tr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(tg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return uA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await pa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await pa(r,i),s=await pa(a,o);return pa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var I2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ng=new Map(I2),lA=new Map(I2.map(([t,e])=>[e,t])),rg=class extends De{static langMap=ng;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new V("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new ro(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new V(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new V(s.Code,s.Message)}else throw new V("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=ng.get(r),o={TargetLanguage:ng.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ro(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(g=>g.Translation),m=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(m=lA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:m,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new V(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new V(p.Code,p.Message)}else throw new V("response: "+JSON.stringify(c))}},R2=rg;d();var O2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],ag=new Map(O2),cA=new Map(O2.map(([t,e])=>[e,t])),Ls=class extends De{static langMap=ag;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=ag.get(r)||"detect",o=ag.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=cA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new V(l.status_code.toString(),l.status_message)}}};d();var dA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ig=new Map(dA),_s=class extends De{static langMap=ig;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new V("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await ce({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:ig.get(r)||r,target_lang:ig.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new V(s.message||s.message||"API Error")}};d();d();var og="https://{s}bing.com",j2=og+"/translator",pA=og+"/ttranslatev3",gA=og+"/tspellcheckv3",tc="bingGlobalConfig",H2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],z2=new Map(H2),N2=new Map(H2.map(([t,e])=>[e,t])),U2=1e3,nr,ao;function sg(t,e){return t.replace("{s}",e?e+".":"")}async function mA(){if(!nr){let n=await oe.storage.local.get(tc);return n&&(nr=n[tc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=nr;return Date.now()-t>e}async function q2(){let t,e,n,r,a,i,o,s,u,l;try{let c=sg(j2,t),p=await ce({retry:2,url:c,responseType:"raw"}),{body:m,headers:g,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=g["set-cookie"],e=m.match(/IG:"([^"]+)"/)[1],n=m.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(m.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return nr={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[tc]:nr}),nr}function fA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=nr;return sg(t?gA:pA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+nr.count++:"")}function hA(t,e,n,r){let{token:a,key:i}=nr,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function W2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>U2)throw new Error(`The supported maximum length of text is ${U2}. Please shorten the text.`);ao||(ao=q2()),await ao,await mA()&&(ao=q2(),await ao),e=e||"auto",n=n||"zh-CN",e=z2.get(e)||e,n=z2.get(n)||n;let a=fA(!1),i=hA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:sg(j2,nr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(nr=null,ao=null,await oe.storage.local.remove(tc),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],m=c[0].detectedLanguage;return{text:p.text,from:N2.get(m.language),to:N2.get(p.to)}}d();var nc=new Map;async function lg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=Ln(t.body)),nc.has(e))return nc.get(e);let n=ce(t);nc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{nc.delete(e)},3e3)}}async function K2(t){return lg(t)}async function rc(t){if(He()){let n=s1();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw B.error("can not comunicate with root frame, use strict limiter",r),r}else return lg(t)}else return lg(t)}d();function G2(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function ac(t){await rp(t)}async function ic(t,e){let n=await ep(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return V2(t,e)}return V2(t,e)}async function V2(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await tp(t,n,i-1e3),n}var bA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],cg=new Map(bA),_s=class extends De{static langMap=cg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await ac(I0)}async translate(e){let{text:n,from:r,to:a}=e;return n?await W2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await ic(I0,async()=>{let e=await rc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return G2(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=cg.get(n)||"auto",o=cg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let m of a)u.push({Text:m});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(m=>m.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var $2=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],dg=new Map($2),TA=new Map($2.map(([t,e])=>[e,t])),pg=class extends De{static langMap=dg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=Ln(a+o+n+i);this.domain&&(l=Ln(a+o+n+this.domain+i));let c=new URLSearchParams({from:dg.get(s)||"auto",to:dg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let m=await ce({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(m.error_code)throw new $("API_SERVER_ERROR",m.error_msg);let{trans_result:g,from:f}=m,T=g.map(({dst:h})=>h);return{from:TA.get(f)||f,to:u,text:T.join(` -`)}}},Y2=pg;d();d();var Qa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,m)=>{let[g,f]=m.split(":"),T=o[g];return f==="random"?yA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function yA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var Q2=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],gg=class extends Qa{static langMap=new Map(Q2);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:Q2,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},J2=gg;d();var vA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],oc=new Map(vA),mg=class extends De{static langMap=oc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!oc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${oc.get(r)||"auto"}2${oc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},Z2=mg;d();var X2=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],fg=new Map(X2),SA=new Map(X2.map(([t,e])=>[e,t]));function xA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var hg=class extends De{static langMap=fg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=EA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+xA(n)+i+o+this.appSecret,u=await tr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:fg.get(r)||"auto",to:fg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),m=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!m.translation)throw new $(JSON.stringify(m));let g=m.l,[f,T]=g.split("2");return{text:m.translation.join(` -`),from:SA.get(f),to:a}}};function EA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var Tg=class extends De{static langMap=bg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:bg.get(r)||"auto",to:bg.get(a)||a},o=new URLSearchParams(i),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},nT=Tg;d();var Fs=class extends Qa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Xo,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var rT="immersive-translate-gemini-fake-user-key",CA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],aT=new Map(CA),yg=class extends no{static langMap=aT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return aT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await X0(rT,""),this.fakeId||(this.fakeId=wA(10),await np(rT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function wA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await rc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":Sg.get(r)+"-"}${Sg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var kA={mock:Xi,mock2:Xi,custom:Fs,google:Ya,transmart:ws,deepl:E2,volc:R2,volcAlpha:Ps,bing:_s,tencent:Es,tenAlpha:Cs,baidu:Y2,caiyun:J2,cai:Z2,openl:Xl,youdao:eT,you:nT,d:Zi,dpro:Zi,deeplx:Ls,niu:C2,azure:w2,openai:_2,gemini:iT,claude:sT,papago:D2,aliyun:ks,yandex:Ms},ga={};Object.keys(gr).forEach(t=>{ga[t]={...gr[t],class:kA[t]}});function sc(t,e){let n=kn;if(ga[t]&&ga[t].class&&ga[t].class.langMap&&ga[t].class.langMap.size>0){let r=ga[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return kn}async function ma(t,e,n){if(!t.text)return t;let r=null,a=await tt({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function uT(t,e){for(let n of t)try{return await ma({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function xg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Jt(t.user);await new ga[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function PA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function tt(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=k2(p,{sourceLanguage:PA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let m=a.beta,g=o.cache===!1&&m,f=a.debug===!0&&m;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(g&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,E=-1,D=Jt(e.user),M;try{M=new ga[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let L={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let A of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||L):y;n(v,null,A)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){E++;let L=l;l==="openl"&&(L=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let A=M.getCacheKeyPrefix();A&&(L=A+"-"+L);let v=null;try{v=await iu(W3({originalText:y.text,from:y.from,to:y.to,service:L}),200)}catch(O){B.warn("query cache DB error, but it's ok",O)}if(v){let O={...y,text:v.translatedText};b.sentences[E]=O,n&&n(null,O,y)}else T.push(y)}else T.push(...t.sentences);let I=T.length;if(h-I>0&&B.debug(`use ${h-I} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,L,A)=>{if(n&&n(y,L,A),!y&&L&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let O=M.getCacheKeyPrefix();O&&(v=O+"-"+v),o.cache&&iu(K3({translatedText:L.text,from:A.from,to:A.to,detectedFrom:L.from,key:Ln(A.text),service:v}),3e3).catch(_=>{B.warn("set cache DB error",_)})}});for(let y of S?.sentences||[]){let L=b.sentences.findIndex(A=>!A);if(L===-1)throw new $("translateFailed","can not match the result");b.sentences[L]=y}return b}d();d();function lT(t){let e=null,n=null,r=t.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:e,articleNode:n};if(r.bodySelector&&(e=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),e||n)return B.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:e,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return B.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new bu(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=LA(s.content,s.textContent),e&&(n=dT(r,e))}catch(i){B.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function cT(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&B.debug("update article node",n),t.articleNode=n)}function Eg(t,e){return e&&t?.contains(e)||!1}function LA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=_A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function _A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function dT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let C=q(F);return C==NodeFilter.FILTER_ACCEPT?pt.mark(F,k,T):C==NodeFilter.FILTER_REJECT,C}),z=v;if(q(z)===NodeFilter.FILTER_REJECT)return;for(pt.mark(z,k,T);z;){if(s=Eg(i,z),c&&c.length>0){let{currentNode:F,isMatchedSelection:C}=M(N,z,c);if(F)z=F;else break;if(!C)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let F=z;if(F.nodeName==="IFRAME"){O&&O(F),I(),Cg(b,!0),z=N.nextNode();continue}F.nodeType===Node.ELEMENT_NODE&&(l&&Dg(F,l),g&&kg(F,g));let C=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},F.immersiveTranslateComputedStyle||null);if(C&&n.paragraphFirstLetterFontSize>0&&F.childNodes.length==1&&F.childNodes[0].nodeType===Node.TEXT_NODE&&F.innerText?.length==1&&F?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(C=!1),Kt(F,u)&&!C){S(F);let H=null;for(;!(H=N.nextSibling())&&N.parentNode(););z=H;continue}let P=$a(F);if(!pT(b,F)||C){I(F);let H=C?F:F.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&F.shadowRoot?.mode==="open"&&(C?O?.(F.shadowRoot):D({...A,container:F.shadowRoot})),F.nodeType===Node.ELEMENT_NODE&&F.nodeName==="PRE"&&p&&OA(F)}else if(z.nodeType===Node.TEXT_NODE)S(z);else throw new Error("should not be here");z=N.nextNode(),b.commonAncestorContainer&&z&&z.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(z)}function q(F){if(F.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Nr(F)){if(g){let H=Object.keys(g);if(H.length>0&&Kt(F,H))for(let W of H){let V=g[W];if(F.matches(W)){let ue=g[W],ae=Object.keys(ue);for(let J of ae){let ie=ue[J];F.getAttribute(J)!==ie&&(ie===null?F.removeAttribute(J):F.setAttribute(J,ie))}break}}}if(!A.force&&pt.isMarked(F,k)||X1(F,k)||lc(F,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||F.nodeName==="IFRAME"&&!ji(F))return NodeFilter.FILTER_REJECT;if(F.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(F);if(F.immersiveTranslateComputedStyle=H,Ag(H))return _&&_(F),NodeFilter.FILTER_REJECT;let j=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Kt(F,u)&&j)return NodeFilter.FILTER_REJECT}let C=F.getBoundingClientRect(),{width:P,height:U}=C;return F.nodeName==="IMG"&&(P>48&&U>48?F.immersiveTranslateComputedStyle={display:"block"}:P>0&&U>0&&f!==!1&&(F.setAttribute("width",P),F.setAttribute("height",U))),!F.childNodes||F.childNodes&&F.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||U>0&&U<4)&&(F.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(F.nodeType===Node.TEXT_NODE){let C=F.textContent?.trim();if(!C)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=F.parentNode;if(P.getBoundingClientRect){let{width:U,height:H}=P.getBoundingClientRect();if(U>0&&U<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return m>0&&C.length>=m&&wg(F,m),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&I();function M(A,v,O){let _=v.immersiveTranslateComputedStyle||null;if(E){if(!E.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function I(A){if(A&&A.nodeName==="BR"){b.commonAncestorContainer=A.parentNode;let O=[...b.flatNodes],_=b.flatNodes.filter(k=>A.parentNode?.contains(k));_.length>0&&O.length!=_.length&&(b.flatNodes=_,b.flatNodes.original=O)}let v=RA(b,a,n);v&&(v.xpath=e2(r,s,v.commonAncestorContainer,i),e&&e(v)),Cg(b)}function S(A){if(!pT(b,A)){I(),Cg(b);let v=A.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(A)}function y(A,v,O){A.commonAncestorContainer=v;let _=L(O);A.isPreWhitespace=_}function L(A){return A&&A.whiteSpace&&A.whiteSpace.startsWith("pre")||A&&A.whiteSpace==="break-spaces"||!1}}function pT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=$a(e));let r=IA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function MA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function BA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Dg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function IA(t){return t&&t._currentStacks?t._currentStacks.some(e=>$a(e)):!1}function RA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(g=>g.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=zA(r,a,n);o||(o=a);let s=[];for(let g of r){let f=BA(t,o,g);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,m=0;for(;p&&(c.push(p),p!==l);){if(m++,m>FA){B.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Cg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Ag(t){return t.display==="none"}var pt={_marked_key:X4,isMarked(t,e){return vp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||$a(t)))return Rl(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)pt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||$a(t)))return lt(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=qi(t,"markWalk")||"";return lt(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||$a(t)):!1}};function OA(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function zA(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Cn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function wg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&wg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=c1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function mT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let m of c){let g=l[m];if(m==="translate"&&g==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||NA(p,a,i,o)||!p1(T,n,r))continue}p.getAttribute(m)!==g&&(g===null?p.removeAttribute(m):p.setAttribute(m,g))}}}function kg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function lc(t,e){return Kt(t,e.excludeSelectors||[])?Kt(t,e.selectors||[])?!1:!Kt(t,e.stayOriginalSelectors||[]):!1}function uc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Kt(t,e.concat(n))}function NA(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&lc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ni(o,e,n))return!0}}return!1}d();d();d();function fT(t,e,n,r,a){let i=e,o=cb[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let m=n[p];if(["borderRadius"].includes(p)&&(m+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${m}; + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],m=c[0].detectedLanguage;return{text:p.text,from:N2.get(m.language),to:N2.get(p.to)}}d();var nc=new Map;async function ug(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=Ln(t.body)),nc.has(e))return nc.get(e);let n=ce(t);nc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{nc.delete(e)},3e3)}}async function K2(t){return ug(t)}async function rc(t){if(He()){let n=s1();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw B.error("can not comunicate with root frame, use strict limiter",r),r}else return ug(t)}else return ug(t)}d();function G2(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function ac(t){await np(t)}async function ic(t,e){let n=await X0(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return $2(t,e)}return $2(t,e)}async function $2(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await ep(t,n,i-1e3),n}var bA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],lg=new Map(bA),Fs=class extends De{static langMap=lg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await ac(B0)}async translate(e){let{text:n,from:r,to:a}=e;return n?await W2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await ic(B0,async()=>{let e=await rc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return G2(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=lg.get(n)||"auto",o=lg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let m of a)u.push({Text:m});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(m=>m.translations[0]?.text||""),from:n,to:r};throw new V("Microsoft translate error "+JSON.stringify(p))}};d();var V2=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],cg=new Map(V2),TA=new Map(V2.map(([t,e])=>[e,t])),dg=class extends De{static langMap=cg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new V("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=Ln(a+o+n+i);this.domain&&(l=Ln(a+o+n+this.domain+i));let c=new URLSearchParams({from:cg.get(s)||"auto",to:cg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let m=await ce({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(m.error_code)throw new V("API_SERVER_ERROR",m.error_msg);let{trans_result:g,from:f}=m,T=g.map(({dst:h})=>h);return{from:TA.get(f)||f,to:u,text:T.join(` +`)}}},Y2=dg;d();d();var Qa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new V(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new V("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new V(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await dl(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,m)=>{let[g,f]=m.split(":"),T=o[g];return f==="random"?yA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return zr.detectLanguageRemotelyByTransmart(e)}};function yA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var Q2=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],pg=class extends Qa{static langMap=new Map(Q2);constructor(e,n,r){if(!e?.token)throw new V("token are required");super({...e,isSupportList:!0,langs:Q2,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},J2=pg;d();var vA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],oc=new Map(vA),gg=class extends De{static langMap=oc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!oc.get(a))throw new V(`Unsupported language: ${a}`);if(r==="auto")throw new V("Unsupported language: auto");let o=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${oc.get(r)||"auto"}2${oc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},Z2=gg;d();var X2=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],mg=new Map(X2),SA=new Map(X2.map(([t,e])=>[e,t]));function xA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var fg=class extends De{static langMap=mg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new V("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=EA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+xA(n)+i+o+this.appSecret,u=await tr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:mg.get(r)||"auto",to:mg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),m=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!m.translation)throw new V(JSON.stringify(m));let g=m.l,[f,T]=g.split("2");return{text:m.translation.join(` +`),from:SA.get(f),to:a}}};function EA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var bg=class extends De{static langMap=hg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:hg.get(r)||"auto",to:hg.get(a)||a},o=new URLSearchParams(i),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new V("Youdao translation failed: "+JSON.stringify(s))}},nT=bg;d();var Ms=class extends Qa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||es,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var rT="immersive-translate-gemini-fake-user-key",CA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],aT=new Map(CA),Tg=class extends no{static langMap=aT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return aT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Z0(rT,""),this.fakeId||(this.fakeId=wA(10),await tp(rT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function wA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await rc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":vg.get(r)+"-"}${vg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var kA={mock:Xi,mock2:Xi,custom:Ms,google:Ya,transmart:Ds,deepl:E2,volc:R2,volcAlpha:Ls,bing:Fs,tencent:Cs,tenAlpha:ws,baidu:Y2,caiyun:J2,cai:Z2,openl:Xl,youdao:eT,you:nT,d:Zi,dpro:Zi,deeplx:_s,niu:C2,azure:w2,openai:_2,gemini:iT,claude:sT,papago:D2,aliyun:Ps,yandex:Bs},ga={};Object.keys(gr).forEach(t=>{ga[t]={...gr[t],class:kA[t]}});function sc(t,e){let n=kn;if(ga[t]&&ga[t].class&&ga[t].class.langMap&&ga[t].class.langMap.size>0){let r=ga[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return kn}async function ma(t,e,n){if(!t.text)return t;let r=null,a=await Ze({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new V("translateFailed","translate failed")}async function uT(t,e){for(let n of t)try{return await ma({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Sg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Jt(t.user);await new ga[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function PA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Ze(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=k2(p,{sourceLanguage:PA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let m=a.beta,g=o.cache===!1&&m,f=a.debug===!0&&m;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(g&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,E=-1,D=Jt(e.user),M;try{M=new ga[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let L={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let A of T){let v=y instanceof V?new V(y.name,y.message).initNetWork(y.status).initData(y.data||L):y;n(v,null,A)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){E++;let L=l;l==="openl"&&(L=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let A=M.getCacheKeyPrefix();A&&(L=A+"-"+L);let v=null;try{v=await iu(W3({originalText:y.text,from:y.from,to:y.to,service:L}),200)}catch(O){B.warn("query cache DB error, but it's ok",O)}if(v){let O={...y,text:v.translatedText};b.sentences[E]=O,n&&n(null,O,y)}else T.push(y)}else T.push(...t.sentences);let I=T.length;if(h-I>0&&B.debug(`use ${h-I} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,L,A)=>{if(n&&n(y,L,A),!y&&L&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||Xl.DEFAULT_CODENAME);let O=M.getCacheKeyPrefix();O&&(v=O+"-"+v),o.cache&&iu(K3({translatedText:L.text,from:A.from,to:A.to,detectedFrom:L.from,key:Ln(A.text),service:v}),3e3).catch(_=>{B.warn("set cache DB error",_)})}});for(let y of S?.sentences||[]){let L=b.sentences.findIndex(A=>!A);if(L===-1)throw new V("translateFailed","can not match the result");b.sentences[L]=y}return b}d();d();function lT(t){let e=null,n=null,r=t.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:e,articleNode:n};if(r.bodySelector&&(e=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),e||n)return B.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:e,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return B.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new bu(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=LA(s.content,s.textContent),e&&(n=dT(r,e))}catch(i){B.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function cT(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&B.debug("update article node",n),t.articleNode=n)}function xg(t,e){return e&&t?.contains(e)||!1}function LA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=_A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function _A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function dT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let C=q(F);return C==NodeFilter.FILTER_ACCEPT?pt.mark(F,k,T):C==NodeFilter.FILTER_REJECT,C}),z=v;if(q(z)===NodeFilter.FILTER_REJECT)return;for(pt.mark(z,k,T);z;){if(s=xg(i,z),c&&c.length>0){let{currentNode:F,isMatchedSelection:C}=M(N,z,c);if(F)z=F;else break;if(!C)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let F=z;if(F.nodeName==="IFRAME"){O&&O(F),I(),Eg(b,!0),z=N.nextNode();continue}F.nodeType===Node.ELEMENT_NODE&&(l&&wg(F,l),g&&Ag(F,g));let C=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},F.immersiveTranslateComputedStyle||null);if(C&&n.paragraphFirstLetterFontSize>0&&F.childNodes.length==1&&F.childNodes[0].nodeType===Node.TEXT_NODE&&F.innerText?.length==1&&F?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(C=!1),Gt(F,u)&&!C){S(F);let H=null;for(;!(H=N.nextSibling())&&N.parentNode(););z=H;continue}let P=Va(F);if(!pT(b,F)||C){I(F);let H=C?F:F.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&F.shadowRoot?.mode==="open"&&(C?O?.(F.shadowRoot):D({...A,container:F.shadowRoot})),F.nodeType===Node.ELEMENT_NODE&&F.nodeName==="PRE"&&p&&OA(F)}else if(z.nodeType===Node.TEXT_NODE)S(z);else throw new Error("should not be here");z=N.nextNode(),b.commonAncestorContainer&&z&&z.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(z)}function q(F){if(F.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Nr(F)){if(g){let H=Object.keys(g);if(H.length>0&&Gt(F,H))for(let W of H){let $=g[W];if(F.matches(W)){let ue=g[W],ae=Object.keys(ue);for(let J of ae){let ie=ue[J];F.getAttribute(J)!==ie&&(ie===null?F.removeAttribute(J):F.setAttribute(J,ie))}break}}}if(!A.force&&pt.isMarked(F,k)||X1(F,k)||lc(F,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||F.nodeName==="IFRAME"&&!ji(F))return NodeFilter.FILTER_REJECT;if(F.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(F);if(F.immersiveTranslateComputedStyle=H,Dg(H))return _&&_(F),NodeFilter.FILTER_REJECT;let j=la(F,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Gt(F,u)&&j)return NodeFilter.FILTER_REJECT}let C=F.getBoundingClientRect(),{width:P,height:U}=C;return F.nodeName==="IMG"&&(P>48&&U>48?F.immersiveTranslateComputedStyle={display:"block"}:P>0&&U>0&&f!==!1&&(F.setAttribute("width",P),F.setAttribute("height",U))),!F.childNodes||F.childNodes&&F.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||U>0&&U<4)&&(F.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(F.nodeType===Node.TEXT_NODE){let C=F.textContent?.trim();if(!C)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=F.parentNode;if(P.getBoundingClientRect){let{width:U,height:H}=P.getBoundingClientRect();if(U>0&&U<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return m>0&&C.length>=m&&Cg(F,m),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&I();function M(A,v,O){let _=v.immersiveTranslateComputedStyle||null;if(E){if(!E.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(uc(v,O))h=!0,E=v,I(),y(b,E,_);else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=A.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function I(A){if(A&&A.nodeName==="BR"){b.commonAncestorContainer=A.parentNode;let O=[...b.flatNodes],_=b.flatNodes.filter(k=>A.parentNode?.contains(k));_.length>0&&O.length!=_.length&&(b.flatNodes=_,b.flatNodes.original=O)}let v=RA(b,a,n);v&&(v.xpath=e2(r,s,v.commonAncestorContainer,i),e&&e(v)),Eg(b)}function S(A){if(!pT(b,A)){I(),Eg(b);let v=A.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(A)}function y(A,v,O){A.commonAncestorContainer=v;let _=L(O);A.isPreWhitespace=_}function L(A){return A&&A.whiteSpace&&A.whiteSpace.startsWith("pre")||A&&A.whiteSpace==="break-spaces"||!1}}function pT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Va(e));let r=IA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function MA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function BA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function wg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function IA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Va(e)):!1}function RA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(g=>g.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=zA(r,a,n);o||(o=a);let s=[];for(let g of r){let f=BA(t,o,g);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,m=0;for(;p&&(c.push(p),p!==l);){if(m++,m>FA){B.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Eg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Dg(t){return t.display==="none"}var pt={_marked_key:X4,isMarked(t,e){return yp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Va(t)))return Rl(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)pt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Va(t)))return lt(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=qi(t,"markWalk")||"";return lt(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Va(t)):!1}};function OA(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function zA(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Cn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Cg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Cg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=c1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function mT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let m of c){let g=l[m];if(m==="translate"&&g==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||NA(p,a,i,o)||!p1(T,n,r))continue}p.getAttribute(m)!==g&&(g===null?p.removeAttribute(m):p.setAttribute(m,g))}}}function Ag(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function lc(t,e){return Gt(t,e.excludeSelectors||[])?Gt(t,e.selectors||[])?!1:!Gt(t,e.stayOriginalSelectors||[]):!1}function uc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Gt(t,e.concat(n))}function NA(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&lc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ni(o,e,n))return!0}}return!1}d();d();d();function fT(t,e,n,r,a){let i=e,o=cb[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let m=n[p];if(["borderRadius"].includes(p)&&(m+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${m}; `,e==="marker"&&p==="backgroundColor"&&typeof m=="string"){let{r:g,g:f,b:T}=y1(m);s+=`--immersive-translate-theme-${i}-${p}-rgb: ${g}, ${f}, ${T}; `}}}),r||(r="inherit"),t&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5469,9 +5469,9 @@ ${s}} `):e.rule.injectedCss&&(s+=e.rule.injectedCss),e.rule.additionalInjectedCss&&Array.isArray(e.rule.additionalInjectedCss)&&e.rule.additionalInjectedCss.length>0?s+=` `+e.rule.additionalInjectedCss.join(` `):e.rule.additionalInjectedCss&&(s+=` -`+e.rule.additionalInjectedCss)),s&&En(t,s,"immersive-translate-dynamic-injected-css")}d();async function hT(){let t="auto",e=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Ui(document.body),pageLangs:e})),t}d();d();function bT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Yu)||Pg(t).catch(i=>{B.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var cc="";async function Pg(t){let e=document.title;if(!e||e.includes(Yu))return;cc!==e&&(cc=e);let n=await Ie({text:e,pageLangs:[vt(),"en"]});if(!Vi(t,n))try{let r=await ma({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Yu+cc)}catch(r){throw r}}function TT(t){t.rule.isTranslateTitle&&(document.title=cc)}function oo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function on(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var UA={sanitize:t=>t};function Mg(t,e){if(t.interruptEffectDOM)return;let n=on(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:Za.bind(null,t),onFrame:r=>{_g(t,r,!0)},onIgnoreElement:r=>{pt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),di&<(e,"consumeContainer",t.id)}function _g(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!ji(e))return;B.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(Ja(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else B.debug("onFrame shadowRoot",e.host),Ja(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ja(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=on(e.ctx),i=0;if(u(e,t,n))return;if(Nr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(Nr(c)&&(r&&Dg(c,r),a&&kg(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){pt.clearMark(l),i++,e.immediateTranslateCapacity>=0?Mg(e,l):(di&<(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return _g(e,l.shadowRoot,n),!1;if(c==="iframe")return _g(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return uc(l,p.selectors);if(p.pageHeight){let m=l.scrollHeight;if(m>0&&m0)return!0}return!1}function u(l,c,p){if(cT(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&pt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let g=on(l.ctx);return!!lc(c,{excludeSelectors:g.excludeSelectors,selectors:g.selectors,stayOriginalSelectors:g.stayOriginalSelectors})}}function Bs(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!pt.isSkipMarkEle(r)&&!pt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(dc(t.rootNodes),vT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Lg(t.rootNodes);if(dc(t.rootNodes),yT(o))return;so(o,r,t.targetNodes||[]),vT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];so(o,r,t.rootNodes||[]),ST(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Lg(t.rootNodes);if(yT(o))return;so(o,r,t.targetNodes||[]),ST(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Lg(t.targetNodes);dc(t.targetNodes),so(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&dc(t.targetNodes),Rg(t)}catch(o){B.error(o)}}}function yT(t){return!t||!Nr(t)?!1:t.classList.contains(yt)}function vT(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{lt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ST(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=qi(r,"immersiveTranslateClassBak");Rl(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Lg(t){return t?t[t.length-1].nextSibling:null}function dc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function so(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var qA=ko(pc,300);async function Za(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||jA(e.rootNodes)||e.stepState>=2)return;e.stepState=2,di&<(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Va(i),u=Vl(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:$A(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Ig(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:fr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(B.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),HA(t,e.text),Bg(t,e,r)):(di&<(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function jA(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?Nr(e)&&e.classList.contains(yt):!1}function HA(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Bg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),di&<(e.commonAncestorContainer,"consumeParagraph",t.id),lt(e.commonAncestorContainer,eb,"1",!0),n=="hover"){pc.call(t,t.ctx);return}qA.call(t,t.ctx)}async function pc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await tt(r,e,(a,i,o)=>{let s=o.id,u=WA(t,s.toString());u&&KA.call(null,a,i,o,u,e,n)})}catch(a){B.error("translateCurrentQueue error",a);return}}function WA(t,e){return t.find(n=>n.id===e)}function KA(t,e,n,r,a,i){let o=!1,s=r;if($i(s.commonAncestorContainer,n.id)?.remove(),Rg(r),s&&(t||!e)){t||(B.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);lt(c,ab,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(so(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let m=GA(a,t).replaceAll(` +`+e.rule.additionalInjectedCss)),s&&En(t,s,"immersive-translate-dynamic-injected-css")}d();async function hT(){let t="auto",e=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Ui(document.body),pageLangs:e})),t}d();d();function bT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Yu)||kg(t).catch(i=>{B.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var cc="";async function kg(t){let e=document.title;if(!e||e.includes(Yu))return;cc!==e&&(cc=e);let n=await Ie({text:e,pageLangs:[vt(),"en"]});if(!$i(t,n))try{let r=await ma({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Yu+cc)}catch(r){throw r}}function TT(t){t.rule.isTranslateTitle&&(document.title=cc)}function oo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function on(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var UA={sanitize:t=>t};function Fg(t,e){if(t.interruptEffectDOM)return;let n=on(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:Za.bind(null,t),onFrame:r=>{Lg(t,r,!0)},onIgnoreElement:r=>{pt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),di&<(e,"consumeContainer",t.id)}function Lg(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!ji(e))return;B.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(Ja(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else B.debug("onFrame shadowRoot",e.host),Ja(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ja(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=on(e.ctx),i=0;if(u(e,t,n))return;if(Nr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(Nr(c)&&(r&&wg(c,r),a&&Ag(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(pt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){pt.clearMark(l),i++,e.immediateTranslateCapacity>=0?Fg(e,l):(di&<(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Lg(e,l.shadowRoot,n),!1;if(c==="iframe")return Lg(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return uc(l,p.selectors);if(p.pageHeight){let m=l.scrollHeight;if(m>0&&m0)return!0}return!1}function u(l,c,p){if(cT(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&pt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let g=on(l.ctx);return!!lc(c,{excludeSelectors:g.excludeSelectors,selectors:g.selectors,stayOriginalSelectors:g.stayOriginalSelectors})}}function Is(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!pt.isSkipMarkEle(r)&&!pt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(dc(t.rootNodes),vT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Pg(t.rootNodes);if(dc(t.rootNodes),yT(o))return;so(o,r,t.targetNodes||[]),vT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];so(o,r,t.rootNodes||[]),ST(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Pg(t.rootNodes);if(yT(o))return;so(o,r,t.targetNodes||[]),ST(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Pg(t.targetNodes);dc(t.targetNodes),so(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&dc(t.targetNodes),Ig(t)}catch(o){B.error(o)}}}function yT(t){return!t||!Nr(t)?!1:t.classList.contains(yt)}function vT(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{lt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ST(t){if(!Nr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=qi(r,"immersiveTranslateClassBak");Rl(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Pg(t){return t?t[t.length-1].nextSibling:null}function dc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function so(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var qA=Po(pc,300);async function Za(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||jA(e.rootNodes)||e.stepState>=2)return;e.stepState=2,di&<(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=$a(i),u=$l(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:VA(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Bg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:fr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(B.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),HA(t,e.text),Mg(t,e,r)):(di&<(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function jA(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?Nr(e)&&e.classList.contains(yt):!1}function HA(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Mg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),di&<(e.commonAncestorContainer,"consumeParagraph",t.id),lt(e.commonAncestorContainer,eb,"1",!0),n=="hover"){pc.call(t,t.ctx);return}qA.call(t,t.ctx)}async function pc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Ze(r,e,(a,i,o)=>{let s=o.id,u=WA(t,s.toString());u&&KA.call(null,a,i,o,u,e,n)})}catch(a){B.error("translateCurrentQueue error",a);return}}function WA(t,e){return t.find(n=>n.id===e)}function KA(t,e,n,r,a,i){let o=!1,s=r;if(Vi(s.commonAncestorContainer,n.id)?.remove(),Ig(r),s&&(t||!e)){t||(B.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);lt(c,ab,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(so(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let m=GA(a,t).replaceAll(` `,"").replaceAll('"',"""),g=t.message.replaceAll(` -`,"").replaceAll('"',"""),f=mr(zt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=mr(zt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+g,b=mr(zt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=mr(zt,"error.reason",a.config.interfaceLanguage,"zh-CN"),E=`<${u.targetWrapperTag} class="${Q}-error notranslate"> +`,"").replaceAll('"',"""),f=mr(Nt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=mr(Nt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+g,b=mr(Nt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=mr(Nt,"error.reason",a.config.interfaceLanguage,"zh-CN"),E=`<${u.targetWrapperTag} class="${Q}-error notranslate"> <${u.targetWrapperTag} class="${Q}-error-wrapper"> @@ -5486,17 +5486,17 @@ ${s}} ${h} - `;c.innerHTML=Ye.sanitize(E)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=i2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",yt),oo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(dr,"1");let p=UA.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Bs(r,i)}o=!0}else B.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Ig(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[vt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!Ss({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=El();n.isDetectParagraphLanguage&&(u="auto");let l=vt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Ju.includes(t.translationService)&&(ye()||et())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return na(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>na(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function Is(){Fg=0}var Fg=0;function GA(t,e){Fg+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),Fg!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(qa,{detail:r}))}return n}function Rg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,VA(e,`[${tb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function VA(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function $A(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();var YA=[];function xT(t){YA.push(t)}d();var Og;function ET(t){let e=t.ctx.rule.aiRule;if(B.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=on(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{Rs(t,i,e,r)}),Og=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Cn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||Ng(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Rs(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Yi(r,u.parentElement);c&&(pt.clearToParentMark(u,c),Rs(t,c,e,r));continue}Rs(t,u,e,r)}catch(u){B.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{pt.isMarked(o,t.id)||Rs(t,o,e,r)})}),Og.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Rs(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&zg(e),Ur({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{Za(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function CT(){Og?.disconnect()}d();d();d();d();d();d();var uo={},QA={root:"",lang:"en",fallbackLang:"en"};function Ug(t,e){let n=Object.assign({},QA,t);uo=e||uo;let[r,a]=se(n.lang),[i,o]=se(uo),[s,u]=se(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let m=l3(n.root||"",p);n.getUrl&&(m=n.getUrl(n.root||"",p),fetch(m).then(g=>g.json()).then(g=>{uo[p]=g,o({...uo}),u(!0)}).catch(g=>{o({...uo}),u(!0)}))};return Ae(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,m)=>{if(!i.hasOwnProperty(r))return p;let g=is(i,r,p);return g===p&&r!==n.fallbackLang&&(g=is(i,n.fallbackLang,p)),ap(g,m)},isReady:s}}d();d();var JA=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--JA,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var jg=Gi(null),qg={root:"assets",lang:"en",fallbackLang:"en"},mc=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Ug({root:t.root||qg.root,lang:t.lang||qg.lang,fallbackLang:t.fallbackLang||qg.fallbackLang,getUrl:t.getUrl},t.translations);return w(jg.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function Ce(){return Kl(jg)}d();function fc({parent:t,ctx:e,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||Q+n.name;t.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&En(l,a),t.appendChild(u),Ki(w(mc,{lang:e.config.interfaceLanguage,fallbackLang:"zh-CN",translations:zt,children:w(n,{...r})}),l)}d();d();d();function lo(t){return fa(t).subtitles}function fa(t){let e=[],n=t.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${tm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`${n}`,r},Ik=t=>/]*>[\s\S]*]*>/.test(t),ay=Wt({name:ry,build:Bk,detect:Ik,helper:tm,parse:Mk});d();var Rk="srt",Us={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Ok=(t,e)=>{let n=[],r=e.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${e.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${tm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`
${n}`,r},Ik=t=>/]*>[\s\S]*]*>/.test(t),ay=Kt({name:ry,build:Bk,detect:Ik,helper:tm,parse:Mk});d();var Rk="srt",Us={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Ok=(t,e)=>{let n=[],r=e.eol||`\r `,a=t.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Us.toMilliseconds(s[2]),u.end=Us.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}e.verbose}return n},zk=(t,e)=>{let n="",r=e.eol||`\r -`;for(let a=0;a ${Us.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},Nk=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),iy=Wt({name:Rk,build:zk,detect:Nk,helper:Us,parse:Ok});d();var Uk="sub",nm=25,qk=(t,e)=>{e.fps||=nm;let n=e.fps>0?e.fps:nm,r=[],a=e.eol||`\r +`;for(let a=0;a ${Us.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},Nk=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),iy=Kt({name:Rk,build:zk,detect:Nk,helper:Us,parse:Ok});d();var Uk="sub",nm=25,qk=(t,e)=>{e.fps||=nm;let n=e.fps>0?e.fps:nm,r=[],a=e.eol||`\r `,i=t.split(/\r?\n/g);for(let o=0;o{let n=(e.fps||0)>0?e.fps:nm,r="",a=e.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Hk=t=>/^\{\d+\}\{\d+\}.*/.test(t),oy=Wt({name:Uk,build:jk,detect:Hk,parse:qk});d();var Wk="vtt",qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Kk=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=qs.toMilliseconds(s[2]),l.end=qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},Gk=(t,e)=>{let n=e.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},Vk=t=>/^\s*WEBVTT\r?\n/.test(t),sy=Wt({name:Wk,build:Gk,detect:Vk,helper:qs,parse:Kk});var $k={vtt:sy,lrc:ty,smi:ay,ssa:ZT,ass:XT,sub:oy,srt:iy,sbv:ny,json:ey},uy=$k;var Yk=t=>JSON.parse(JSON.stringify(t)),rm=class{format=uy;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` -`),pageLangs:[ht(),"en"]});if(ot(Te(o),this.ctx.targetLanguage))return null;qe(this.ctx,Te(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),js.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};d();var Oc=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` -`),pageLangs:[ht(),"en"]});return ot(Te(o),this.ctx.targetLanguage)?null:(qe(this.ctx,Te(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),Te(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var zc=class extends je{hasSubtitle=!1;async mutationVideoChange(){let e=Qk(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,qr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await ce({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return js.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){B.error("fetchSubtitle",n);return}}};function Qk(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var Jk={youtube:xc,netflix:Ec,webvtt:po,khanacademy:Cc,bilibili:wc,udemy:Dc,hulu:Mc,text_track:ba,text_track_dynamic:mo,general:Ac,live:go,ebutt:Lc,disneyplus:_c,"fmp4.xml":Fc,multi_attach_vtt:Bc,twitter:Ic,subsrt:Rc,xml:Oc,av:zc},Nc;function cy(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=Jk[e.type];if(!n)return;Nc=new n(t)}catch(e){B.error(e)}}async function am(){Nc?.onPageStatusChange()}async function Zk(t,e){if(Nc?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&He())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),it("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function Xk(){Nc?.onTranslationModeChanged()}U3({autoEnableSubtitleChanged:Zk,reloadSubtitleWithTranslationModeChanged:Xk});var pe=null;function Hs(){return pe||null}function fo(t){e5(t),s5(t),a5(t),o5(t),io(document,t),gn("Translated"),i5(pe),r5(pe),xT(ti),t5(pe),am(),f5()}function e5(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=on(t);mT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}oo(t)&<(document.documentElement,me+"_rtl",t.targetLanguage)}function t5(t){ET(t)}function n5(){CT()}function r5(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=lT(t.ctx);if(B.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&Ja(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Ja(i,t)})}async function a5(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Zt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Xt({...e,tempTranslationUrlMatches:[...i]})}}function i5(t){t.ctx.rule.isTranslateTitle&&(Pg(t.ctx),t.titleDynamicObserver=bT(t.ctx))}function o5(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function im(t){if(!pe)return;let e=on(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function s5(t){let e=gs();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],im(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||g5(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||m5(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||c5(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||d5(pe),pe.injectCssToDocument=Uc,pe.walkContainer=Ur,pe.allInlineWindows=[window],window.onerror=l5(pe,t),window.immersiveTranslateSwitchTranslateState=sm.bind(pe)}function my(t,e){e.getRootNode()instanceof ShadowRoot?Uc(e.getRootNode(),t):Uc(e.ownerDocument,t),u5(t)}function u5(t){pe||(pe={},pe.ctx=t,pe.id=gs(),om(pe,t))}function om(t,e){t.paragraphQueue=[],t.injectCssToDocument=Uc;let n=on(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=sm.bind(t),t}function ti(t=!0){pe&&(gn("Original"),am(),n5(),Is(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),TT(pe.ctx),Q1(),J1(),t&&sm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function l5(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),ti(),n=setTimeout(()=>{fo(e)},t.urlChangeDelay||2e3)),!0}}function c5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(Mg(t,r.target),n.unobserve(r.target))})})}function d5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Bg(t,o)}),n.unobserve(a)}})})}var dy;function p5(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(dy),t.translateState=="original"?!1:(ti(t.urlChangeDelay>20),dy=setTimeout(()=>{let a=t.ctx;fo(a)},t.urlChangeDelay),!0)):!1}function g5(t){let e=t.ctx.rule,n=on(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&p5(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!Cn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&Cn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Qu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&py(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&Ng(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&py(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!pt.isSkipMarkEle(a.target)&&!pt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Yi(n,i.parentElement);u&&(pt.clearToParentMark(i,u),gy(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Kt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:i.contains(u)).length&&gy(t,a.target)}catch(i){B.error(i)}}})}function py(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Kt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{zg(n),Ur({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{Za(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function gy(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;pt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Ja(e,t,n),i.timer=null},a)}function zg(t){t.paragraphs=[],pt.clearMark(t),t.querySelectorAll("."+yt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,pt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function Ng(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Kt(n,["."+yt]))).length==0}function m5(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Ag(i)||(n.unobserve(r.target),pt.clearMark(a),Ja(a,t))}})}function sm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Bs(e,t)}),t=="original"&&document.querySelectorAll(`.${yt}`).forEach(e=>e.remove())}function Uc(t,e){if(t instanceof HTMLIFrameElement){io(t.contentDocument,e);return}io(t,e)}async function fy(t){let e=He(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Sp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Ui(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ht(),"en"]}))}else if(e)n=await Ie({text:Ui(t.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Sp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await H3();return n==="auto"&&(n=await hT()),O3(n),n}async function hy(){if(!pe)return;Is(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${Vu}='${n}']`);i&&i.remove()}}pc.call(pe,pe.ctx)}async function um(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),it("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:vt()});let r=pe?.ctx||e,a=await Zt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(g=>{[...i?.querySelectorAll(g),...s?.querySelectorAll(g)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?n2():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(g=>{p+=`${g}="${globalThis.document.documentElement.getAttribute(g)}" `});let m="";globalThis.document.body.getAttributeNames().forEach(g=>{m+=`${g}="${globalThis.document.body.getAttribute(g)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Hk=t=>/^\{\d+\}\{\d+\}.*/.test(t),oy=Kt({name:Uk,build:jk,detect:Hk,parse:qk});d();var Wk="vtt",qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Kk=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=qs.toMilliseconds(s[2]),l.end=qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},Gk=(t,e)=>{let n=e.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},$k=t=>/^\s*WEBVTT\r?\n/.test(t),sy=Kt({name:Wk,build:Gk,detect:$k,helper:qs,parse:Kk});var Vk={vtt:sy,lrc:ty,smi:ay,ssa:ZT,ass:XT,sub:oy,srt:iy,sbv:ny,json:ey},uy=Vk;var Yk=t=>JSON.parse(JSON.stringify(t)),rm=class{format=uy;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` +`),pageLangs:[ht(),"en"]});if(nt(he(o),this.ctx.targetLanguage))return null;qe(this.ctx,he(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),js.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};d();var Rc=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` +`),pageLangs:[ht(),"en"]});return nt(he(o),this.ctx.targetLanguage)?null:(qe(this.ctx,he(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),he(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return B.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var Oc=class extends je{hasSubtitle=!1;async mutationVideoChange(){let e=Qk(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,qr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await ce({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return js.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){B.error("fetchSubtitle",n);return}}};function Qk(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var Jk={youtube:Sc,netflix:xc,webvtt:go,khanacademy:Ec,bilibili:Cc,udemy:wc,hulu:Fc,text_track:ba,text_track_dynamic:fo,general:Dc,live:mo,ebutt:Pc,disneyplus:Lc,"fmp4.xml":_c,multi_attach_vtt:Mc,twitter:Bc,subsrt:Ic,xml:Rc,av:Oc},zc;function cy(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=Jk[e.type];if(!n)return;zc=new n(t)}catch(e){B.error(e)}}async function am(){zc?.onPageStatusChange()}async function Zk(t,e){if(zc?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&He())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),ot("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function Xk(){zc?.onTranslationModeChanged()}U3({autoEnableSubtitleChanged:Zk,reloadSubtitleWithTranslationModeChanged:Xk});var pe=null;function Hs(){return pe||null}function ho(t){e5(t),s5(t),a5(t),o5(t),io(document,t),gn("Translated"),i5(pe),r5(pe),xT(ti),t5(pe),am(),f5()}function e5(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=on(t);mT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}oo(t)&<(document.documentElement,me+"_rtl",t.targetLanguage)}function t5(t){ET(t)}function n5(){CT()}function r5(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=lT(t.ctx);if(B.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&Ja(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Ja(i,t)})}async function a5(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Zt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Xt({...e,tempTranslationUrlMatches:[...i]})}}function i5(t){t.ctx.rule.isTranslateTitle&&(kg(t.ctx),t.titleDynamicObserver=bT(t.ctx))}function o5(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function im(t){if(!pe)return;let e=on(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function s5(t){let e=ms();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],im(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||g5(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||m5(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||c5(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||d5(pe),pe.injectCssToDocument=Nc,pe.walkContainer=Ur,pe.allInlineWindows=[window],window.onerror=l5(pe,t),window.immersiveTranslateSwitchTranslateState=sm.bind(pe)}function my(t,e){e.getRootNode()instanceof ShadowRoot?Nc(e.getRootNode(),t):Nc(e.ownerDocument,t),u5(t)}function u5(t){pe||(pe={},pe.ctx=t,pe.id=ms(),om(pe,t))}function om(t,e){t.paragraphQueue=[],t.injectCssToDocument=Nc;let n=on(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=sm.bind(t),t}function ti(t=!0){pe&&(gn("Original"),am(),n5(),Rs(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),TT(pe.ctx),Q1(),J1(),t&&sm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function l5(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),ti(),n=setTimeout(()=>{ho(e)},t.urlChangeDelay||2e3)),!0}}function c5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(Fg(t,r.target),n.unobserve(r.target))})})}function d5(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Mg(t,o)}),n.unobserve(a)}})})}var dy;function p5(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(dy),t.translateState=="original"?!1:(ti(t.urlChangeDelay>20),dy=setTimeout(()=>{let a=t.ctx;ho(a)},t.urlChangeDelay),!0)):!1}function g5(t){let e=t.ctx.rule,n=on(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&p5(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!Cn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&Cn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Qu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&py(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&zg(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&py(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!pt.isSkipMarkEle(a.target)&&!pt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Yi(n,i.parentElement);u&&(pt.clearToParentMark(i,u),gy(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Gt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:i.contains(u)).length&&gy(t,a.target)}catch(i){B.error(i)}}})}function py(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Gt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Og(n),Ur({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{Za(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function gy(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;pt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Ja(e,t,n),i.timer=null},a)}function Og(t){t.paragraphs=[],pt.clearMark(t),t.querySelectorAll("."+yt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,pt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function zg(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Gt(n,["."+yt]))).length==0}function m5(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Dg(i)||(n.unobserve(r.target),pt.clearMark(a),Ja(a,t))}})}function sm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Is(e,t)}),t=="original"&&document.querySelectorAll(`.${yt}`).forEach(e=>e.remove())}function Nc(t,e){if(t instanceof HTMLIFrameElement){io(t.contentDocument,e);return}io(t,e)}async function fy(t){let e=He(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=vp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Ui(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ht(),"en"]}))}else if(e)n=await Ie({text:Ui(t.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=vp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await H3();return n==="auto"&&(n=await hT()),O3(n),n}async function hy(){if(!pe)return;Rs(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${$u}='${n}']`);i&&i.remove()}}pc.call(pe,pe.ctx)}async function um(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),ot("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:vt()});let r=pe?.ctx||e,a=await Zt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(g=>{[...i?.querySelectorAll(g),...s?.querySelectorAll(g)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?n2():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(g=>{p+=`${g}="${globalThis.document.documentElement.getAttribute(g)}" `});let m="";globalThis.document.body.getAttributeNames().forEach(g=>{m+=`${g}="${globalThis.document.body.getAttribute(g)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Xt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Ri(f)}catch(g){B.error(g)}}async function by(){let t=await Zt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Q4,{detail:JSON.stringify(t.draft)}))}async function f5(){try{if(await bl("reportActive"))return;B.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Lp();await ce({url:ts+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),ds("reportActive","1")}catch(t){B.error(t)}}d();d();var Ty={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},yy={...zt,"zh-CN":{...Ty["zh-CN"],...zt["zh-CN"]},"zh-TW":{...Ty["zh-TW"],...zt["zh-TW"]}},vy=yy;function ho(t,e,n){return mr(yy,t,e,pr,n)}var Ta=(t,e,n,r)=>{let a=db[t]||t,i=pb[t],o=gb[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();function lm(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&vn(o,s=>{s.preventDefault();let u=r[i];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var Sy=`${Q}-float-ball`;function ya(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${Sy}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${Sy}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function xy(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let m of p)a[m]||(a[m]=[]),a[m].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Ey(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var qc="DROP_DOWN_DEFAULT_VALUE";function cm(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=Ve(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:qc,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==qc){s.current.value=qc,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:qc,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function bo(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var h5=({date:t})=>{let{t:e}=Ce(),[n,r]=se(!1);return Ae(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},b5=({minVersion:t})=>{let{t:e}=Ce();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},T5=()=>{let{t}=Ce();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},y5=({message:t,handleSyncing:e,date:n})=>{let{t:r}=Ce();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function dm(t){let{isShowError:e,request:n}=t,[r,a]=se(null),{t:i}=Ce(),[o,s]=se(null),[u,l]=se(null),[c,p]=se(""),[m,g]=se(!1),[f,T]=se(!1),[b,h]=se(!1),[E,D]=se(null),[M,I]=se(null),S=Nt(),y=async()=>{p("");let L=o;if(o===null)try{let A=await n({url:Jo});A?(s(A),L=A,g(!0)):(p(i("unknownError")),l(null))}catch(A){l(null),p(A.message);return}L!==null?(t.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ae(()=>{Pn().then(L=>{let A=L.buildinConfigUpdatedAt;D(L);let v=new Date(A);if(a(A),S==="0.0.0"){h(!0);return}n({url:Jo}).then(O=>{let _=O,k=_.minVersion,N=S;s(_);let z=_.latestVersion;if(z&&(bo(N,z)?I(!0):I(!1)),bo(N,k)){let q=_.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(O=>{l(null),p(O.message)})})},[]),Ae(()=>{Pn().then(L=>{D(L)})},[r]),E?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(T5,{}):c?e===!1?null:w(y5,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(b5,{minVersion:o.minVersion}):u===null||u===!0?null:m?w(h5,{date:r}):null}):null}d();function v5(){return navigator.userAgent.indexOf("Mac")!==-1}var Cy={Alt:"\u2325"};function jc(t=""){return v5()?Object.keys(Cy).reduce((e,n)=>e.replace(n,Cy[n]),t):t}d();function wy({config:t,isLogin:e,isProUser:n}){let{t:r}=Ce();return pl(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?Xu:yb,children:[w("img",{src:e?WT:HT}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Xu:vb,children:w("img",{src:n?qT:jT})})]})}d();function Dy({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=Ce();if(!e)return null;let i=sc(e.config.translationService,e.config.targetLanguage),o=kn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(S5,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:KT,style:{maxWidth:"unset"},class:"mx-2"}),w(x5,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function S5(t){let{t:e}=Ce(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=Ta(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=Ta(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function x5(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=Ta(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=Ce();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function Ay(t){let{t:e}=Ce(),{translationServiceItems:n,translationServiceOptions:r}=D5(t);return n.length?w(qt,{children:[w(ky,{class:"mt-3",label:e("popupService"),items:r}),w(E5,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function ky(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function E5({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=Ce(),a=w5(t),i=C5(t),o=$e((u,l)=>{e(c=>{let p=c.translationServices||{},m=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...m,[u]:l}}}})},[]),s=Ue(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(qt,{children:s.map(({label:u,items:l},c)=>w(ky,{class:"mt-2",label:u,items:l},"field-"+c))})}function C5(t){return Ue(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function w5(t){return Ue(()=>{let{translationService:n}=t.config;if(gr[n])return vl("translationService",n,t)},[gr,vl,t])}function D5({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=Ce(),u=Ue(()=>e?ps(e,"translationService"):[],[ps,e]),l=$e(p=>{let m=u.find(g=>g.id===p.value);if(m.ok){if(n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;m.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ue(()=>{let p=et();return u.filter(g=>e.config.showUnconfiguredTranslationServiceInPopup===!1?g.ok:!0).map(g=>({label:`${s("translationServices."+g.id)}${g.ok?"":" "+(" "+(!t&&!p&&g.providers&&g.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:g.id,selected:g.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function Py(t){let e;try{e=new URL(t)}catch{return!1}let n=V3(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(A5(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function A5(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function Ly(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function _y(t){let{t:e}=Ce(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=k5(t),[o,s]=se(()=>a?"excludeMatches":"matches"),u=Ue(()=>r||a||!1,[r,a]),l=$e(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function k5({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,m=null,g=null,{translationUrlPattern:f}=e.config;if(l=Ue(()=>new URL(t||""),[t]),e.config&&t&&Py(t)){c=Ly(t);let{matches:h,excludeMatches:E}=f;p=!!h.find(D=>dt(t,D)),m=!!E.find(D=>dt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:E}=h;E.includes(n)?g=!0:g=!1}let T=$e(()=>{let h=l.hostname,E=e.localConfig.tempTranslationUrlMatches||[],D=E.filter(I=>I.match!==h),M=!1;D.length!==E.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=$e((h,E)=>{if(h==="default"){s(I=>{let S={...I.translationUrlPattern};return{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,matches:pm(t,S.matches),excludeMatches:pm(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(I=>{let S={...I.translationUrlPattern};return S[M]=pm(t,S[M]),S[D]=ml(E,S[D]),{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:m,isAlwaysTranslateLang:g,handleTranslationUrlPatternSelected:b}}function pm(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!dt(t,n)):e):[]}d();d();d();var P5=new AbortController,{signal:L5}=P5,Hc=0,Wc=0,To=!1,ni,Fy=0,Sa=[];function yo(t,e){_5();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(B.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(B.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(Yo,s),Sa.push(()=>{document.removeEventListener(Yo,s)});let u=Kn(m=>{if(!(Math.abs(m.clientX-Hc)+Math.abs(m.clientY-Wc)<=3)&&(Hc=m.clientX,Wc=m.clientY,o||To&&!ni)){let g=Ry(n.rule,e);if(g){if(hm(g))return;fm(n,!1,g)}}},o?700:300),l=m=>{let g=m.target;hm(g)||fm(n,!0)},c=m=>{let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=vn.getPressedKeyCodes();if(f.length>1&&vn[g]&&(Fy=Date.now(),To=!1),f.length===1&&vn[g]){let T=Date.now();To=!0,ni&&clearTimeout(ni),ni=setTimeout(()=>{let b=Fy-T;b>0&&b<=i?To=!1:l(m),ni=void 0},i)}};if(Sa.push(()=>{ni&&clearTimeout(ni)}),a)return;gm("mousemove",u,e),Sa.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():To=!1}if(gm("blur",p,e),Sa.push(()=>{e.removeEventListener("blur",p)}),!o){let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",g=hb;gm("keyup",My,e),Sa.push(()=>{e.removeEventListener("keyup",My)}),g.includes(m)?vn("*","mouseHover",c):vn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),vn.setScope("mouseHover"),Sa.push(()=>{vn.deleteScope("mouseHover")})}}function _5(){Sa.forEach(t=>t()),Sa=[],vn.setScope("all")}function My(t){To=!1}function gm(t,e,n=window){return n.addEventListener(t,e,{signal:L5})}function fm(t,e,n,r=window){if(n=n||Ry(t.rule,r),!n){B.debug("can not find selection part!");return}if(M5(n,e))return;if(hm(n)){B.debug("exclude dom");return}my(t,n);let i=Hs();i&&(i.setupMouseHoverListener=yo);let o=on(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=om({...i},t);Ur({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Za(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Xe(Z4,p),it("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function Ry(t,e){return F5(Hc,Wc,t,e)}function F5(t,e,n,r){let a=v1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=S1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:Iy(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){B.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{I5(r)}),!0}function B5(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function I5(t){let e=Hs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Bs(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function mm(t){return!!(t.host&&t.mode)}function By(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||mm(n))return t;for(;n&&n.nodeName!=="BODY"&&!mm(n)&&yp(n,e);){let r=n.parentNode;if(r&&mm(r))break;n=r}return n}function Iy(t,e){return t.nodeType===Node.TEXT_NODE||yp(t,e)?By(t,e):t}function Oy(t,e){Hc=e.clientX,Wc=e.clientY,fm(t,!0)}var Ws=[];function bm(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Ws.push(()=>{document.removeEventListener("click",i)})}function zy(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Ws.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function Kc(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ws.push(()=>{document.removeEventListener("touchstart",r)})}var Tm={touchShortcutsOff:()=>{},"multipleClick.2":bm,"multipleClick.3":bm,"multipleClick.4":bm,"slide.left":zy,"slide.right":zy,"fingers.2":Kc,"fingers.3":Kc,"fingers.4":Kc,"fingers.5":Kc};async function Uy(t){try{q5();let e=await Or(),n=mb.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=R5(t,e,r.command),i=Tm[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{U5(r.command,t,u)})})}catch(e){B.error(e)}}function R5(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var O5=()=>{ym();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},z5=()=>{Sm();let t=new CustomEvent(Mr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},N5=()=>{vm();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},Ny=0,U5=(t,e,n)=>{new Date().getTime()-Ny<200||(Ny=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?O5():t==="touchShortcutsToggleTranslationMask"?N5():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?z5():t==="touchShortcutsToggleTranslateTouchElement"&&Oy(e,n))};function q5(){Ws.forEach(t=>{t()}),Ws=[]}function qy(t){let{t:e}=Ce(),{ctx:n,setSettings:r}=t,a=j5(t);return rs(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||es[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(H5,{...t})}function j5({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=Ce(),a=Ue(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ue(()=>es.filter(s=>!(s==="Off"||es.includes(a)&&s==="OtherCustom")),[t,a]);return Ue(()=>i.map(s=>{let u=r("mouseHoldKey",{key:jc(s)}),l=es.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(m=>{let g={...m.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(g.mouseHoverHoldKey=p.value),{...m,generalRule:g}})}}}),[i,a])}function H5(t){let{ctx:e,setSettings:n}=t,{t:r}=Ce(),a=e.config.generalRule,i=Object.keys(Tm).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(m=>{let g={...m.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(g.touchShortcutsToggleTranslateTouchElement=p.value),{...m,generalRule:g}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let m=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?m:"touchShortcutsOff"}}})}})]})}d();function jy(t){let{isAlwaysTranslateLang:e}=W5({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=Ce();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Ta(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:fl(t.currentLang,u.matches),excludeMatches:fl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=ml(t.currentLang,u[i]),u[o]=fl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function W5({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var K5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:m})=>{let[g,f]=se(!1),T=Ve(null),b=Ve(null),h=()=>{u||!l&&ut().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),m?.()},s))},E=()=>{ut().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ue(()=>{let I={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(I.maxWidth="200px",o&&(I.width=o+"px"),I.whiteSpace="normal"),n){case"top":return{...I,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...I,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...I,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...I,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&E()},children:e}),g&&w("div",{style:M,role:"tooltip",children:t})]})},xa=K5;d();var Hy=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Wy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ky=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),Gy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),Vy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),$y=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Yy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function Jy({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=Ce(),a=Me(),i=Math.round((_i.supportedVideoSubtitleSites||[]).length/10),o=Ue(()=>[{title:r("widget.translateFile"),icon:Hy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Wy,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:Ky,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(Cb)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(xa,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(Qy,{...s})}):w(Qy,{...s}))})}function Qy(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function xm(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=se(""),[l,c]=se(i),[p,m]=se(null),[g,f]=se(null);Ae(()=>{Mt.get(Ft,null).then(E=>{E?(m(E),f(Jt(E))):f(!1)}).catch(E=>{f(!1)})},[]);let T=!0,b=et();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=pl(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(wy,{isLogin:!!p,isProUser:!!g,config:n}),w(J5,{openSharePage:r})]}),w(Dy,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(Ay,{isProUser:!!g,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(V5,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(Y5,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(dm,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(_y,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(qy,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(jy,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(G5,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(Jy,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w($5,{...t,isProUser:!!g,isShowPricing:T,setMessage:u})]})}function G5(t){let{t:e}=Ce(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ue(()=>!n.rule.subtitleRule.disabled&&W0.includes(n.rule.subtitleRule.type||""),[n,W0])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function V5(t){let{t:e}=Ce(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(xa,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?Vy:$y})})}function $5(t){let{t:e,lang:n}=Ce(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[Gy,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(Q5,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(cm,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:g=>{g.value==="openPremium"?(globalThis.open(Ai),t.onClose()):g.value==="changeToOnlyTranslationMode"?c("translation"):g.value==="changeToDualTranslationMode"?c("dual"):g.value==="translateTheWholePage"?t.onTranslateTheWholePage():g.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():g.value==="translateTheMainPage"?t.onTranslateTheMainPage():g.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):g.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):g.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):g.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):g.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):g.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):g.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):g.value==="options"?(t.openOptionsPage(),t.onClose()):g.value==="changeToTranslateTheWholePage"?p():g.value==="changeToTranslateTheMainPage"?m():g.value==="about"?t.openAboutPage():g.value==="toggleEnabled"?t.onToggleEnabled():g.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):g.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):g.value==="goPro"&&t.onOpenUrl(Ai,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(g){g.preventDefault(),t.openOptionsPage()}function c(g){t.setSettings(f=>({...f,translationMode:g})),t.onSwitchTranslationMode(g)}function p(){t.setSettings(g=>({...g,translationArea:"body"})),t.onTranslateTheWholePage()}function m(){t.setSettings(g=>({...g,translationArea:"main"})),t.onTranslateTheMainPage()}}function Y5({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=Ce(),l=r.config,c=Ue(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Ga(r?.rule)&&!p&&(p=!0);let m=s("translate");e==="Translated"||e==="Error"?m=s("show-original"):e==="Original"?p?Ir()&&c.protocol==="file:"||o?m=s("translate-firefox-local-pdf"):ye()?m=s("noSupportTranslate-pdf"):m=s("translate-pdf"):m=s("translate"):m=s(e);let g=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(al()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(m+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):m+=` (${jc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(g+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:m})}function Q5({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=Ce(),o=Nt();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Ey(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function J5(t){let{t:e}=Ce();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),Yy]})}d();d();d();d();var Em={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Gc(t,e,n){let[r]=se(()=>typeof e=="function"?e():e),[a]=se(n),[i,o]=se(r),[s,u]=se(!1),[l,c]=se("");Ae(()=>{Em.get(t,r,a).then(m=>{m[t]&&o(m[t]),u(!0),c("")}).catch(m=>{u(!1),c(m)})},[t,r,a]);let p=$e(m=>{let g=typeof m=="function"?m(i):m;B.debug("new settings",g),Em.set(t,g,a).then(()=>{o(g),u(!0),c("")}).catch(f=>{o(g),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Cm(t,e,n){let r=[];return function(){let[i,o,s,u]=Gc(t,e,n),l=$e(c=>{for(let p of r)p(c)},[]);return Ae(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Zy(t,e){return Cm(t,e,"sync")}var Z5="userConfig",X5=null,e8=Zy(Z5,X5);function jr(t){let[e,n,r,a]=e8(),i=$e(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();async function Vc(t){try{let e=new Date;B.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Zo]:e.toISOString()}),await t8(),ye()||await J3()}catch(e){B.error("run cron task failed",e)}}async function Xy(){let e=(await an()).interval;if(e){let n=await oe.storage.local.get(Zo);if(n&&n[Zo]){let r=n[Zo];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:e}),B.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),aa({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{B.error("send content message request failed from cron task",u)})):B.debug(`no need to sync rules, latest: ${r}`):B.info(`local version is too old, please update to ${o} or later`)}catch(t){B.error("sync rules error: ",t)}}d();d();d();d();d();d();var wm;function Im(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function uv(t,e=","){return t.map(Im).join(e)}var lv=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Yc(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Qc(t,e="@media "){return e+Mn(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Mn(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function n8(){}var Vt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function cv(t){return t.match(/[-=:;]/g)?.length||0}function _m(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(cv(t),15)<<18}var r8=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Rm({n:t,i:e,v:n=[]},r,a,i){t&&(t=Im({n:t,i:e,v:n})),i=[...Mn(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Mn(u&&Qc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|_m(l):s=="dark"?1073741824:l[0]=="@"?_m(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~r8.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var Om=new Map;function ev(t){if(t.d){let e=[],n=Dm(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Dm(r,i=>Dm(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Am(i,o)}return Am(o,i)})):r,"&"),r=>Am(r,t.n?"."+lv(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Dm(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Am(t,e){return t.replace(/&/g,e)}var tv=new Intl.Collator("en",{numeric:!0});function a8(t,e){for(var n=0,r=t.length;n>1;0>=dv(t[a],e)?n=a+1:r=a}return r}function dv(t,e){let n=t.p&Vt.o;return n==(e.p&Vt.o)&&(n==Vt.b||n==Vt.o)?0:t.p-e.p||t.o-e.o||tv.compare(nv(t.n),nv(e.n))||tv.compare(rv(t.n),rv(e.n))}function nv(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function rv(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function km(t,e){return Math.round(parseInt(t,16)*e)}function Ea(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[km(t.substr(1,i),o),km(t.substr(1+i,i),o),km(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function pv(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let m=[],g="",f=0,T=0;for(let E in o||{}){var b,h;let D=o[E];if(E[0]=="@"){if(!D)continue;if(E[1]=="a"){m.push(...mv(s,u,Nm(""+D),p,u,l,c,!0));continue}if(E[1]=="l"){for(let M of Mn(D))m.push(...i(M,{n:s,p:(b=Vt[E[7]],u&~Vt.o|b),r:E[7]=="d"?[]:l,i:c},p));continue}if(E[1]=="i"){m.push(...Mn(D).map(M=>({p:-1,o:0,r:[],d:E+" "+M})));continue}if(E[1]=="k"){m.push({p:Vt.d,o:0,r:[E],d:i(D,{p:Vt.d},p).map(ev).join("")});continue}if(E[1]=="f"){m.push(...Mn(D).map(M=>({p:Vt.d,o:0,r:[E],d:i(M,{p:Vt.d},p).map(ev).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))E=="label"&&D?s=D+Yc(JSON.stringify([u,c,o])):(D||D===0)&&(E=E.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=E)[0]=="-"?0:cv(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+Mn(D).map(M=>p.s(E,gv(""+M,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let M=u;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(I,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Qc(y,"")):I}),M|=_m(E)),m.push(...i(D,{n:s,p:M,r:[...l,E],i:c},p))}else m.push(...i(D,{p:u,r:[...l,E]},p))}return m.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:g}),m.sort(dv)}(t,Rm(e,n,r,a),n)}function gv(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Ea(s):""+Mn(s).filter(u=>Object(u)!==u)})}function zm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function Fm(t,e,n=Vt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,m){u={...u,i:u.i||m};let g=function(f,T){let b=Om.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return g?typeof g=="string"?({r:p,p:c}=Rm(u,l,c,p),zm(Fm(Nm(g),l,c,p,u.i),u.n)):Array.isArray(g)?g.map(f=>{var T,b;return{o:0,...f,r:[...Mn(p),...Mn(f.r)],p:(T=c,b=f.p??c,T&~Vt.o|b)}}):pv(g,u,l,c,p):[{c:Im(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(a8(i,s),0,s);return i}function mv(t,e,n,r,a,i,o,s){return zm((s?n.flatMap(u=>Fm([u],r,a,i,o)):Fm(n,r,a,i,o)).map(u=>u.p&Vt.o&&(u.n||e==Vt.b)?{...u,p:u.p&~Vt.o|e,o:0}:u),t)}function i8(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Rm(i,o,e);return n&&mv(s,e,n,o,u,l,c,r)},Om.set(t,a),t}function Pm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(o8),i:a}))}}function o8(t,e,n){return n.indexOf(t)==e}var av=new Map;function Nm(t){let e=av.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&Pm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Yc(JSON.stringify([p,m])):p+"("+uv(m)+")",Vt.a,m,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),av.set(t,e=r[0])}return e}function fv(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function hv(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?fv(t,e,n=>Lm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+Lm(r),t?Lm(t):"")}function Lm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=hv(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var lse=bv("@"),cse=bv("~");function bv(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return uv(Nm(n+t+"("+hv(r,a)+")"))}}function Mm(t,e){return Array.isArray(t)?iv(fv(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?iv(t):[t]}var s8=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function iv(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=s8.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function Tv(t,...e){var n;let r=Mm(t,e),a=(r.find(i=>i.label)?.label||"css")+Yc(JSON.stringify(r));return n=(i,o)=>zm(r.flatMap(s=>pv(s,i,o,Vt.o)),a),Om.set(a,n),a}var dse=new Proxy(function(t,e){return ov("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ov(e,n,r)}}});function ov(t,e,n){return{toString(){return Tv({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function X(t,e,n){return[t,u8(e,n)]}function u8(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):Bm(n,1)}):n=>t||{[n[1]]:Bm(n,2)}}function Bm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function te(t,e,n,r){return[t,l8(e,n,r)]}function l8(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=yv(t||a[1]),s=i.theme(o,a.$$)??vo(a.$$,o,i);if(s!=null)return a._=Bm(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,c8(e,n)]}function c8(t={},e){return(n,r)=>{let{section:a=yv(n[0]).replace("-","")+"Color"}=t,[i,o]=d8(n.$$);if(!i)return;let s=r.theme(a,i)||vo(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,m=r.theme(l,o||"DEFAULT")||o&&vo(o,l,r),g=e||(({_:T})=>{let b=Ks(c,T);return p?{[p]:b}:b});n._={value:Ea(s,{opacityVariable:u||void 0,opacityValue:m||void 0}),color:T=>Ea(s,T),opacityVariable:u||void 0,opacityValue:m||void 0};let f=g(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:Ea(T,{opacityVariable:u||void 0,opacityValue:m||"1"}),color:b=>Ea(T,b),opacityVariable:u||void 0,opacityValue:m||void 0},f={"&":f,[r.v("dark")]:g(n,r)})}return f}}function d8(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ks(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function vo(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=$c(gv(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function yv(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function $c(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>$c(n)+r+$c(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var pse=Symbol();var vv=new Proxy(n8,{apply(t,e,n){return wm(n[0])},get(t,e){let n=wm[e];return typeof n=="function"?function(){return n.apply(wm,arguments)}:n}});var gse=function t(e){return new Proxy(function(n,...r){return sv(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return sv(e,r,a,i)}}})}();function sv(t,e,n,r){return{toString(){let a=Mm(n,r),i=lv(e+Yc(JSON.stringify([e,a])));return(typeof t=="function"?t:vv)(Tv({[`@keyframes ${i}`]:Mm(n,r)})),i}}}d();d();d();d();d();var Sv={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Bn(4,"rem",4,.5,.5),...Bn(12,"rem",4,5),14:"3.5rem",...Bn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ke("blur"),backdropBrightness:Ke("brightness"),backdropContrast:Ke("contrast"),backdropGrayscale:Ke("grayscale"),backdropHueRotate:Ke("hueRotate"),backdropInvert:Ke("invert"),backdropOpacity:Ke("opacity"),backdropSaturate:Ke("saturate"),backdropSepia:Ke("sepia"),backgroundColor:Ke("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ke("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Bn(200,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:Ke("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ke("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ke("colors"),caretColor:Ke("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Bn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ke("borderColor"),divideOpacity:Ke("borderOpacity"),divideWidth:Ke("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Gs(2,6),...Gs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ke("spacing"),gradientColorStops:Ke("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Gs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Gs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Bn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Bn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ke("spacing"),placeholderColor:Ke("colors"),placeholderOpacity:Ke("opacity"),outlineColor:Ke("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ke("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:Bn(200,"",100,0,50),scale:{...Bn(150,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ke("spacing"),scrollPadding:Ke("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:Ke("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Bn(2),textColor:Ke("colors"),textDecorationColor:Ke("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:Ke("spacing"),textOpacity:Ke("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:Ke("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Gs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Bn(50,"",1,0,10),auto:"auto"}};function Gs(t,e){let n={};do for(var r=1;re(t)}var _se={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Sv.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Sv.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},Mse=[X("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:vo(`[${e}]`,"",n)}}})),X("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),te("aspect-","aspectRatio"),X("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Qc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),X("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),X("box-(border|content)","boxSizing",({1:t})=>t+"-box"),X("hidden",{display:"none"}),X("table-(auto|fixed)","tableLayout"),X(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",X("isolate","isolation"),X("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),X("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Jc),X("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),X("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),te("-?(top|bottom|left|right)(?:$|-)","inset"),X("(visible|collapse)","visibility"),X("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),X("flex-((row|col)(-reverse)?)","flexDirection",xv),X("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),X("grid-cols-(\\d+)","gridTemplateColumns",Dv),te("col-","gridColumn"),X("col-(span)-(\\d+)","gridColumn",wv),te("col-start-","gridColumnStart"),X("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),X("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),X("grid-rows-(\\d+)","gridTemplateRows",Dv),te("row-","gridRow"),X("row-(span)-(\\d+)","gridRow",wv),te("row-start-","gridRowStart"),X("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),X("row-end-(auto|\\d+)","gridRowEnd"),X("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Jc(xv(t))),X("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",X("justify-","justifyContent",Ev),X("(content|items|self)-",t=>({["align-"+t[1]]:Ev(t)})),X("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),te("p([xytrbl])?(?:$|-)","padding",So("padding")),te("-?m([xytrbl])?(?:$|-)","margin",So("margin")),te("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),X("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:t})=>typeof(t=Mn(t))[1]=="string"?{fontFamily:rr(t)}:{fontFamily:rr(t[0]),...t[1]}),X("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),X("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),X("italic","fontStyle"),X("not-italic",{fontStyle:"normal"}),X("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),X("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),X("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),X("text-(left|center|right|justify|start|end)","textAlign"),X("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),te("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),te("indent-","textIndent"),X("(overline|underline|line-through)","textDecorationLine"),X("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),X("decoration-","textDecorationStyle"),X("(uppercase|lowercase|capitalize)","textTransform"),X("normal-case",{textTransform:"none"}),X("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),X("align-","verticalAlign"),X("whitespace-","whiteSpace"),X("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),X("break-words",{overflowWrap:"break-word"}),X("break-all",{wordBreak:"break-all"}),X("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),X("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ri(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),X("bg-(fixed|local|scroll)","backgroundAttachment"),X("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),X(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),X("bg-blend-","backgroundBlendMode"),X("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),X("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Jc),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ri(n[0])}-radius`]:e,[`border-${ri(n[1])}-radius`]:e}}),X("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),X("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},So("border","Color")),Bt("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",So("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),X("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),X("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ri(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ri(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),X("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Ea(e("ringOffsetColor","","#fff")),"--tw-ring-color":Ea(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:t})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(t),"--tw-shadow-colored":rr(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),X("mix-blend-","mixBlendMode"),...Cv(),...Cv("backdrop-"),te("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:rr(t),transitionTimingFunction:t._=="none"?void 0:rr(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:rr(e("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",rr),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),te("delay(?:$|-)","transitionDelay","transitionDelay",rr),te("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=rr(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",X("transform",qm),X("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Av(t=="gpu")})),te("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...qm()})),te("-?(rotate)-","rotate",Um),te("-?(translate-[xy])-","translate",Um),te("-?(skew-[xy])-","skew",Um),X("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Jc),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",X("snap-(none)","scroll-snap-type"),X("snap-(x|y|both)",({1:t})=>({...Ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),X("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),X("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),X("snap-(normal|always)","scroll-snap-stop"),X("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",So("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",So("scroll-margin")),X("touch-(auto|none|manipulation)","touch-action"),X("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),X("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),X("outline",{outlineStyle:"solid"}),X("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],X("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),X("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),X("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Jc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function xv(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ri(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function rr(t){return t&&""+(t._||t)}function Ev({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function So(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ks(t+"-"+ri(a[0])+e,r),...Ks(t+"-"+ri(a[1])+e,r)}:Ks(t+e,r)}}function Cv(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ca(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,X(`${t}filter`,n),...e.map(r=>te(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Mn(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Um({1:t,_:e}){return{["--tw-"+t]:e,...qm()}}function qm(){return{...Ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Av()}),transform:"var(--tw-transform)"}}function Av(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function wv({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Dv({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ca(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Zc=globalThis||(typeof window<"u"?window:self),m8=Object.create,Hm=Object.defineProperty,f8=Object.getOwnPropertyDescriptor,h8=Object.getOwnPropertyNames,b8=Object.getPrototypeOf,T8=Object.prototype.hasOwnProperty,y8=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),v8=(t,e)=>{for(var n in e)Hm(t,n,{get:e[n],enumerable:!0})},jm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of h8(e))!T8.call(t,a)&&a!==n&&Hm(t,a,{get:()=>e[a],enumerable:!(r=f8(e,a))||r.enumerable});return t},S8=(t,e,n)=>(jm(t,e,"default"),n&&jm(n,e,"default")),Pv=(t,e,n)=>(n=t!=null?m8(b8(t)):{},jm(e||!t||!t.__esModule?Hm(n,"default",{value:t,enumerable:!0}):n,t)),Lv=y8((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var m=new XMLHttpRequest;m.open("GET",l),m.responseType="blob",m.onload=function(){u(m.response,c,p)},m.onerror=function(){},m.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Zc=="object"&&Zc.global===Zc?Zc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var m=o.URL||o.webkitURL,g=document.createElement("a");c=c||l.name||"download",g.download=c,g.rel="noopener",typeof l=="string"?(g.href=l,g.origin===location.origin?i(g):a(g.href)?r(l,c,p):i(g,g.target="_blank")):(g.href=m.createObjectURL(l),setTimeout(function(){m.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var m=document.createElement("a");m.href=l,m.target="_blank",setTimeout(function(){i(m)})}}:function(l,c,p,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var g=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=D:location=D,m=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,E=h.createObjectURL(l);m?m.location=E:location.href=E,m=null,setTimeout(function(){h.revokeObjectURL(E)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),_v={};v8(_v,{default:()=>Xc});var x8=Pv(Lv());S8(_v,Pv(Lv()));var{default:kv,...E8}=x8,Xc=kv!==void 0?kv:E8;d();d();d();d();d();d();var yue=Me().REDIRECT_URL;d();var Jue=Gi([]);function Bv(t){let[e,n]=se(null);return Ae(()=>{Pn().then(r=>{n(r),B.debug("current config",r)})},[]),Ae(()=>{Pn().then(r=>{n(r)})},[t]),e}function Iv(t){let[e,n]=se(null);return Ae(()=>{t&&hn({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function Rv(){let[t,e]=se(null);return Ae(()=>{Zt().then(r=>{e(r)})},[]),[t,r=>{e(r),Xt(r)}]}d();async function _8(t,e,n){try{if(e===null)return"noupdate";let r=await Zt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await Wm(t,e),await Xt(r),"upload"}let a=await zv(t);r.accountLastSyncedAt=Date.now(),B.debug("settings",e),B.debug("local settings.updatedAt",e.updatedAt),B.debug("remote settings.updatedAt",a.updatedAt),B.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),B.debug("isUpload",i),i)return await Wm(t,e),await Xt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||F8(n)&&_8(n.token,t,e).then(i=>{B.debug("syncUserSetting result",i)})},[t,n])}function F8(t){return Jt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function zv(t){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ts+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function Wm(t,e){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ts+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function td(t){let{onClose:e}=t,[n,r]=se("Original"),[a,i,o,s]=jr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});ed(a,i);let[u,l]=se(null),[c,p]=se(globalThis.location.href),[m,g]=se("auto"),[f,T]=se(null),b=O=>{r(O.detail)};if(Ae(()=>(document.addEventListener(ja,b,!1),an().then(O=>{l(O);let _=vt();g(_);let k=Qe();r(k),Vc(O.interval)}),document.addEventListener("urlChange",E),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",E)}),[]),Ae(()=>{an().then(O=>{l(O)})},[a]),Ae(()=>{c&&u&&Km().then(O=>{T(O)})},[c,u]),!u||!f)return null;return w(xm,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:O=>{D("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:M,onToggleEnabled:I,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ra(f.rule)||c)},openAboutPage:A,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:m,onSetLocalConfig:kl,onSetBuildinConfig:j3,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(O){g(O);let _=xy(c,O,u.sourceLanguageUrlPattern);i(k=>({...k,sourceLanguageUrlPattern:_})),qn(O)}function E(){p(globalThis.location.href)}function D(O,_,k={}){let N={trigger:"page_popup",...k};return()=>{_n({method:O,data:N}),_&&e()}}function M(){e()}function I(){i(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{M()},50)}function S(O,_){let k=O;_&&(k=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${_}`),Fl(k,!0),setTimeout(()=>{M()},50)}function y(O){O&&(Oi(!1,O),setTimeout(()=>{M()},50))}function L(O=""){Bi(!0,O),setTimeout(()=>{e()},50)}function A(){Ll(),setTimeout(()=>{e()},50)}function v(){Q3(),setTimeout(()=>{e()},50)}}d();function jv(){let[t,e]=se("Original");return Ae(()=>{let n=Qe();e(n);let r=a=>{e(a.detail)};return document.addEventListener(ja,r),()=>{document.removeEventListener(ja,r)}},[]),{pageStatus:t}}var Nv=6,B8={position:"right",top:335};function Hv({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=Ve(null),o=Ve(null),[s,u]=se(!1),l=Ve(null),c=Ve(!1),p=Ve(n.floatBallConfig||B8),m=Ve(0),g=Ve(0),f=Ve(0),T=Ve(!1),b=Ve(0),h=Ve(0),E=Ve(0),D=Ve(0),M=Ve(!1),I=$e(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},ut().any?3e3:0))},[u,l,T,a]);return Ae(()=>{a||u(!1)},[a]),Ae(()=>{if(i.current&&p.current){let S=Gm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ae(()=>{if(!o.current||!i.current)return;let S=k=>{k.preventDefault&&k.preventDefault(),m.current=k.clientX,g.current=k.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),I(!0),E.current=k.clientX,D.current=k.clientY,M.current=!1,ut().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Uv({startX:m.current,startY:g.current,endX:E.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",L),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},y=k=>{if(k.preventDefault&&k.preventDefault(),!c.current||!i.current||(E.current=k.clientX,D.current=k.clientY,M.current))return;let N=k.clientY-g.current+f.current,z=Gm(N);i.current.style.top=`${z}px`},L=k=>{if(k.preventDefault&&k.preventDefault(),_(),c.current=!1,clearTimeout(l.current),T.current||I(!1),M.current)return;Uv({startX:m.current,startY:g.current,endX:k.clientX,endY:k.clientY})||(clearTimeout(h.current),t());let z=Gm(k.clientY-30);p.current.top=z;let q=ms();kl({...q,floatBallConfig:p.current})},A=k=>{k.preventDefault&&k.preventDefault(),S(k.changedTouches[0])},v=k=>{k.preventDefault&&k.preventDefault(),y(k.changedTouches[0])},O=k=>{k.preventDefault&&k.preventDefault(),L(k.changedTouches[0])},_=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",A),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",A))}},[e,o,i,l,c,n,I,t]),Ae(()=>{if(ut().any)return;let S=L=>{L.target===i.current&&!T.current||(T.current=!0,I(!0),clearTimeout(l.current))},y=L=>{if(c.current){T.current=!1;return}L.target===i.current&&!T.current||I(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,I,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:I}}function Uv({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>Nv||i>Nv}function Wv(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ue(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ue(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ue(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Kv(){let[t,e]=se(!1);return Ae(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var qv="hasShownFloatingBallGuide",I8="2024-01-06";function Gv(t){let[e,n]=se(!1);Ae(()=>{!t.config.enableShowFloatingBallGuide||vt()==t.targetLanguage||(async()=>{let a=await At(qv,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function Vv(t,e){let n=Ve(0),[r,a]=se(!0),[i,o]=se(!1),s=jr(),[u,l]=s,{t:c}=Ce(),p=$e(()=>{t?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ae(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let m=$e(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return ut().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),g=Ue(()=>ut().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ue(()=>ut().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:Ta(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:g,tooltipText:f,handleShowTooltip:m}}function Gm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ai=`${Q}-float-ball`;function $v(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(R8,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function R8(t){let{t:e}=Ce(),[n,r]=se("UntilNext"),a=Ii()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ai}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ai}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(ya,{type:"modal-close"})})]}),w("div",{class:`${ai}-close-radio-content mt-3`,children:o.map(s=>w(O8,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ri(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ai}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ai}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function O8(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=z8(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ai}-radio-sel`:`${ai}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function z8(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();d();function Yv(t){return we.ASSETS_BASE_URL+t}var ii=`${Q}-float-ball`;function Qv(t){let{t:e}=Ce(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ue(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ii}-guide-container`,style:r,children:[w("img",{class:`${ii}-guide-bg ${t.fixedPosition}`,src:N8}),w("div",{class:`${ii}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ii}-guide-img`,src:Yv("images/float_ball_intro.png")}),w("div",{class:`${ii}-guide-message`,children:[e("floatBall.guideClickToTranslate"),ut().any?` -${e("floatBall.longPress")}`:""]}),w("div",{class:`${ii}-primary-btn ${ii}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var N8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function U8({isVisible:t,onClose:e,children:n}){return w(qt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Jv=U8;var Vs=`${Q}-float-ball`;function Vm(t){let{t:e}=Ce(),n=jr(),[r,a,i,o]=n;ed(r,a);let s=Bv(r),u=Iv(s),{isFullScreen:l}=Kv(),[c,p]=se(!1),[m,g]=se(!0),{pageStatus:f}=jv(),T=_p(u,r),b=$e(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ee();if(Ga(u?.rule)){let U=ra(u.rule);Oi(!0,U||P);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,_n,p]),h=$e(()=>{p(!0)},[p]),E=m&&!!s,{containerRef:D,active:M,ballRef:I,floatBallConfigRef:S,setActive:y}=Hv({handleBallClick:b,handleMobileBallLongPress:h,isShow:E,localConfig:t.localConfig,popupVisible:c}),L=T?.fixedPosition||"right",A=L==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:O}=Gv(t.ctx),{closeTransform:_,logoContainerTransform:k,settingTransform:N}=Wv(T,M||v),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:F,handleShowTooltip:C}=Vv(u,f);return E?w("div",{class:`${Vs}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(q8,{ctx:u,setVisible:g,closeTransform:_,setActive:y,getModalStyle:()=>Zv(S.current.top,300,L)}),w(xa,{enableMobile:!0,text:F,position:A,delay:z,onShow:C,disable:q,children:w("div",{class:`${Vs}-btn ${L} btn-animate `,ref:I,style:{transform:k,opacity:M||v?1:.5},children:w("div",{children:[w(ya,{type:"logo"}),f!=="Original"?w(ya,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:N},class:`${Vs}-more-buttons btn-animate`,children:[w(xa,{text:e("translateFileTooltip"),multiple:!0,width:200,position:A,containerClass:"btn-animate",children:w("div",{class:`${Vs}-more-button`,onClick:()=>{Fl(Db,!0)},children:w(ya,{type:"file"})})}),w(xa,{text:e("floatBall.setting"),position:A,containerClass:"btn-animate",children:w("div",{class:`${Vs}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(ya,{type:"setting"})})})]}),w(j8,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Zv(S.current.top,500,L)}),w(Qv,{visible:v,top:S.current.top,fixedPosition:L,onClose:()=>{O(),y(!1)}})]}):null}function q8(t){let{t:e}=Ce(),[n,r]=se(!1),a=jr(),[i,o,s,u]=a,l=_p(t.ctx,i),c=$e(m=>{t.ctx&&o(g=>t2({...g},m))},[t.ctx,o]),p=$e(m=>{l&&(t.setVisible(!1),m==="AlwaysClose"?c({...l,enable:!1}):m==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(qt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(ya,{type:"close"})}),w($v,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function j8(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Jv,{isVisible:t.visible,onClose:t.onClose,children:w(td,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(td,{onClose:t.onClose})})}):null}function H8(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Zv=(t,e,n)=>{let a=H8().height,i={position:"fixed"},o=0;return xf()&&(t=W8.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},W8={position:"right",right:0,top:335};function K8(t,e){for(let n of e){if(ye()&&!Ir()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $m(){let t=Me(),e=await an(),n=await Or(),r={url:globalThis.location.href,config:e},a=await hn(r),i=await Fp(a,n),o=dt(a.url,i?.blockUrls),s=await Zt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return K8(l,[c]),G8(l,e,s,a)}function G8(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),Ki(w(mc,{lang:e.interfaceLanguage,fallbackLang:"en",translations:vy,children:w(Vm,{localConfig:n,ctx:r})}),a)}var Ym=!1;async function Xv(t){if(!t){let e=await an(),n={url:globalThis.location.href,config:e};t=await hn(n)}t.config.debug&&B.setLevel("debug"),t.isTranslateExcludeUrl?B.debug("detect exclude url, do not inject anything."):(Ym=!0,$m().catch(e=>{B.debug("init popup error",e)}))}async function e9(){Ym||(Ym=!0,$m().catch(t=>{B.error("init popup error",t)}))}var t9=!1,i9=[()=>{vn.unbind()}],n9=[...i9],V8=Kn(async()=>{await Bi()},50),$8=Kn(async()=>{await Ll()},50),Y8=Kn(async()=>{await Y3()},50),Q8=Kn(async()=>{await $3()},50),o9=Kn(t=>{_n({method:t,data:{trigger:"userscript_menu"}})},50);function J8(t,e){let n=t.document;if(t9)return;t9=!0,ye()||q3(),n.addEventListener("securitypolicyviolation",u7),document.addEventListener(me+"DocumentMessageUser",l9),document.addEventListener(me+"DocumentMessageUpdateUser",c9),document.addEventListener(me+"ChangeSuccessService",d9.bind(null,e)),document.addEventListener(me+"ChangeService",p9.bind(null,e)),document.addEventListener(qa,i7.bind(null,e)),n.addEventListener(me+"EbookLoaded",s7),n.addEventListener(V4,o7.bind(null,e)),n.addEventListener($4,l7.bind(null,e)),n.addEventListener(Ku,a=>{He()||um(a,e)}),n.addEventListener(Y4,by),n.addEventListener("click",a=>{e7(a,e)}),He()&&t.addEventListener("message",X8,!1),ye()&&(He()||n.addEventListener(Mr,Z8)),He()||oa.rootIframe(Zu).handleAsk("throttleRequest",K2)}function $s(t,e){c7(),J8(e,t),ye()&&(He()||(lm(t.config),d7(t.config))),al()&&Uy(t),et()&&lm(t.config)}function Z8(t){e9()}function X8(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===ju&&aa(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function e7(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&it(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Qm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}s9(u9.bind(null,e,o,i,s));return}}}async function t7(){let t=await fn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await mn(t)}async function n7(){let t=await fn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await mn(t)}var r9=0;function s9(t){let e=Date.now();if(e-r9<2e3||(r9=e,r7()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let m=document.createElement("div");m.className=Q+"-modal-content notranslate",u.appendChild(m);let g=document.createElement("span");g.textContent="\xD7",g.className=Q+"-close",m.appendChild(g);let f=document.createElement("div");f.className=i+" notranslate",m.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",m.appendChild(T);let b=document.createElement("div");b.className=s,m.appendChild(b),l.appendChild(u),g.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{a7()},100)}function u9(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=Ye.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",m=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),m.setAttribute(`data-${Q}-action`,"retry");let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 16 16"),g.setAttribute("width","20"),g.setAttribute("height","20"),g.innerHTML='',m.appendChild(g),m.onclick=()=>{a.style.display="none",Qm({method:"retryFailedParagraphs"}),wa(m,!0)}}else if(r=="login")p=u("goLogin"),m.onclick=()=>{wa(m,!0),window.open(Tb)};else if(r=="upgrade")p=u("upgradeToPro"),m.onclick=()=>{wa(m,!0),window.open(el)};else if(r=="setting")p=u("goSettings"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)},Zm(t,t.config.translationService,!1).then(g=>{g?(p=u("toggleToService",{service:u("translationServices."+g)}),m.innerHTML=Ye.sanitize(p),m.onclick=()=>{g9(g),wa(m,!0)}):(p=u("goSettings"),m.innerHTML=Ye.sanitize(p))});else if(r=="none")return;m.className="immersive-translate-btn",m.innerHTML+=Ye.sanitize(p),s.appendChild(m)}function r7(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function a7(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function i7(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;s9(u9.bind(null,t,a,i,o))}catch(r){B.warn("parse message error",r)}}async function o7(t,e){let n=e;if(B.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Qm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")_l(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")t7();else if(a.type==="toggleEnableInputTranslation")n7();else if(a.type==="translatePage")p7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ps(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=sc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await g7(a.data,i)}catch(o){a9(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Pl(a.data):a.type==="sharePage"?um({detail:a.data},t):a.type==="switchTranslationMode"?Jm(a.data):o9(a.type);r&&a.id&&a9(a.type,r,a.id)}}catch(a){B.warn("parse message error",a)}}}function s7(t){setTimeout(()=>{nd()},10)}function u7(t){we.HAS_CSP_ERROR="1"}function l7(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&it(n.name,[{name:n.name}],{...t})}function c7(){n9.forEach(t=>{t()}),n9=i9}function d7(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=ll.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ho(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:N0,title:ho("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:U0,title:ho("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:O0,title:ho("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:z0,title:ho("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===O0?V8():i.id===z0?$8():i.id===U0?Y8():i.id===N0?Q8():o9(i.id)},i.key)}}function Qm(t){aa(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{B.error("send content message request failed",t,n)});let e=new CustomEvent(Mr,{detail:t});globalThis.document.dispatchEvent(e)}async function p7(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await We(Ee(),e);Tn(n)}function a9(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function g7({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await tt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var oi={};async function Xm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ht(),"en"]});return qn(n),n}async function m9(t){gn("Translating");let e=vt(),n=El(),r=[...document.querySelectorAll(".source-text")];if(Vi(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return lt(i,"id",o+""),s&&($i(s,o)?.remove(),s.appendChild(vs(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await tt({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=$i(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=Ye.sanitize(`${i.message}`),oi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=Ye.sanitize(o.text),oi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{gn("Translated")}}async function f9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(oi),n=[],r=[];for(let a of e){let i=oi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete oi[a],u.appendChild(vs(t,a)),r.push(i.sentence))}}}try{await tt({sentences:r},t,(a,i,o)=>{let s=o.id,u=$i(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ye.sanitize(`${a.message}`),oi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=Ye.sanitize(i.text),oi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function ef(){gn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var tf={};async function h9(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return qn(n),n}async function b9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(tf),n=[];for(let r of e){let a=tf[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${Vu}='${r}']`);o&&o.remove(),n.push(a)}}try{Is(),await gc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}function T9(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function y9(t){gn("Translating");let e=gs(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;io(u,t);let l=u.body;if(!l)continue;let c=on(t);c.isModifyImage=!1,Ur({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=fr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=Vl(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Ig(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),tf[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await gc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}d();var ar=!1,rd,v9=!1,ad=null;function nf(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){B.debug("exclude url for input");return}if(ad===!1){B.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};kn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();rd&&self.removeEventListener("keydown",rd),rd=u,self.addEventListener("keydown",rd);function u(c){if(ar||ad===!1)return;let p=c,m=p.target||p.srcElement,g=m?.tagName;(m?.isContentEditable||g=="INPUT"||g=="SELECT"||g=="TEXTAREA")&&(A7(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&h7()&&(o=0,f7(c,t,i))}k7(t)}function x9({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function id(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var xo;function E9(t){let e=t.parentElement;if(!e)return;xo=document.createElement("div"),xo.className=Q+"-input",xo.innerHTML=`
`,e.appendChild(xo);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function C9(){xo&&xo.remove()}async function m7(t){if(!ar)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=id(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=x9(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let E=l.slice(s.length+1,l.indexOf(u)).trim();if(c=id(E,i.codeAlias),!c){B.warn("not found alias",E);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};kn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;ar=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=w9(u,i),m=await Ie({text:p,pageLangs:["en"]});B.debug("translateContent",p,m);let g={text:p||"",id:0,from:m,to:c,url:"https://google.com",fromByClient:m,force:!0};if(!g.text||g.text.length>5e3)return;E9(o),Xe(Gu,Date.now());try{let b=await ma(g,{...t,translationService:t.inputTranslationService});A9(t),D9(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:h}))}}finally{ar=!1}}catch(e){throw ar=!1,e}finally{ar=!1,C9()}}async function f7(t,e,n){if(!ar)try{let p=function(){s=e.config.inputTargetLanguage;let g=o.split(" ")[0];g&&g[0]&&(g=g[0].toLowerCase()+g.slice(1)),g.trim()&&n.flatAlias.includes(g)?(s=id(g,n.codeAlias),i=o.slice(g.length+1)):i=o},m=function(){s="";let g=x9(n),f=o.split(g);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=id(T,n.codeAlias),!s){B.warn("not found alias",T);return}},r=document.activeElement;ar=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(m(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=w9(i,n),l=await Ie({text:u,pageLangs:["en"]});B.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!v9){v9=!0;let g=await P7(e);if(t.target&&t.target.focus(),g==="open_settings"){Bi(!0,"#input");return}else if(g==="open_learn_more"){Ri("https://immersivetranslate.com/docs/input/");return}else if(g==="disable_once"||g==="disable_forever"){if(ad=!1,g==="disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="disable_once"){let f=await fn();f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="close_disable_once"||g==="close_disable_forever"){if(ad=!1,g==="close_disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="enable"){let f=await fn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="close_enable"){let f=await fn();f.enableInputTranslation=!0,await mn(f)}}E9(r),Xe(Gu,Date.now());try{let g=await ma(c,{...e,translationService:e.inputTranslationService});A9(e),D9(e,r,a+g.text)}catch(g){if(g instanceof $){let f=g.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:f}))}}finally{ar=!1}}catch(r){throw ar=!1,r}finally{ar=!1,C9()}}function h7(){let t=document.activeElement;if(!t)return!1;if(od(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Xt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Ri(f)}catch(g){B.error(g)}}async function by(){let t=await Zt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Q4,{detail:JSON.stringify(t.draft)}))}async function f5(){try{if(await bl("reportActive"))return;B.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Pp();await ce({url:ns+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),ps("reportActive","1")}catch(t){B.error(t)}}d();d();var Ty={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},yy={...Nt,"zh-CN":{...Ty["zh-CN"],...Nt["zh-CN"]},"zh-TW":{...Ty["zh-TW"],...Nt["zh-TW"]}},vy=yy;function bo(t,e,n){return mr(yy,t,e,pr,n)}var Ta=(t,e,n,r)=>{let a=db[t]||t,i=pb[t],o=gb[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();function lm(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&vn(o,s=>{s.preventDefault();let u=r[i];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var Sy=`${Q}-float-ball`;function ya(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${Sy}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${Sy}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function xy(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let m of p)a[m]||(a[m]=[]),a[m].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Ey(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var Uc="DROP_DOWN_DEFAULT_VALUE";function cm(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=$e(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:Uc,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==Uc){s.current.value=Uc,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:Uc,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function To(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var h5=({date:t})=>{let{t:e}=Ce(),[n,r]=se(!1);return Ae(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},b5=({minVersion:t})=>{let{t:e}=Ce();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},T5=()=>{let{t}=Ce();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},y5=({message:t,handleSyncing:e,date:n})=>{let{t:r}=Ce();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function dm(t){let{isShowError:e,request:n}=t,[r,a]=se(null),{t:i}=Ce(),[o,s]=se(null),[u,l]=se(null),[c,p]=se(""),[m,g]=se(!1),[f,T]=se(!1),[b,h]=se(!1),[E,D]=se(null),[M,I]=se(null),S=Ut(),y=async()=>{p("");let L=o;if(o===null)try{let A=await n({url:Zo});A?(s(A),L=A,g(!0)):(p(i("unknownError")),l(null))}catch(A){l(null),p(A.message);return}L!==null?(t.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ae(()=>{Pn().then(L=>{let A=L.buildinConfigUpdatedAt;D(L);let v=new Date(A);if(a(A),S==="0.0.0"){h(!0);return}n({url:Zo}).then(O=>{let _=O,k=_.minVersion,N=S;s(_);let z=_.latestVersion;if(z&&(To(N,z)?I(!0):I(!1)),To(N,k)){let q=_.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(O=>{l(null),p(O.message)})})},[]),Ae(()=>{Pn().then(L=>{D(L)})},[r]),E?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(T5,{}):c?e===!1?null:w(y5,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(b5,{minVersion:o.minVersion}):u===null||u===!0?null:m?w(h5,{date:r}):null}):null}d();function v5(){return navigator.userAgent.indexOf("Mac")!==-1}var Cy={Alt:"\u2325"};function qc(t=""){return v5()?Object.keys(Cy).reduce((e,n)=>e.replace(n,Cy[n]),t):t}d();function wy({config:t,isLogin:e,isProUser:n}){let{t:r}=Ce();return pl(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?Xu:yb,children:[w("img",{src:e?WT:HT}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Xu:vb,children:w("img",{src:n?qT:jT})})]})}d();function Dy({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=Ce();if(!e)return null;let i=sc(e.config.translationService,e.config.targetLanguage),o=kn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(S5,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:KT,style:{maxWidth:"unset"},class:"mx-2"}),w(x5,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function S5(t){let{t:e}=Ce(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=Ta(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=Ta(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function x5(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=Ta(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=Ce();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function Ay(t){let{t:e}=Ce(),{translationServiceItems:n,translationServiceOptions:r}=D5(t);return n.length?w(jt,{children:[w(ky,{class:"mt-3",label:e("popupService"),items:r}),w(E5,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function ky(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function E5({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=Ce(),a=w5(t),i=C5(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},m=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...m,[u]:l}}}})},[]),s=Ue(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(jt,{children:s.map(({label:u,items:l},c)=>w(ky,{class:"mt-2",label:u,items:l},"field-"+c))})}function C5(t){return Ue(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function w5(t){return Ue(()=>{let{translationService:n}=t.config;if(gr[n])return vl("translationService",n,t)},[gr,vl,t])}function D5({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=Ce(),u=Ue(()=>e?gs(e,"translationService"):[],[gs,e]),l=Ve(p=>{let m=u.find(g=>g.id===p.value);if(m.ok){if(n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;m.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(g=>({...g,translationService:m.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ue(()=>{let p=tt();return u.filter(g=>e.config.showUnconfiguredTranslationServiceInPopup===!1?g.ok:!0).map(g=>({label:`${s("translationServices."+g.id)}${g.ok?"":" "+(" "+(!t&&!p&&g.providers&&g.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:g.id,selected:g.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function Py(t){let e;try{e=new URL(t)}catch{return!1}let n=$3(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(A5(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function A5(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function Ly(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function _y(t){let{t:e}=Ce(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=k5(t),[o,s]=se(()=>a?"excludeMatches":"matches"),u=Ue(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function k5({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,m=null,g=null,{translationUrlPattern:f}=e.config;if(l=Ue(()=>new URL(t||""),[t]),e.config&&t&&Py(t)){c=Ly(t);let{matches:h,excludeMatches:E}=f;p=!!h.find(D=>dt(t,D)),m=!!E.find(D=>dt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:E}=h;E.includes(n)?g=!0:g=!1}let T=Ve(()=>{let h=l.hostname,E=e.localConfig.tempTranslationUrlMatches||[],D=E.filter(I=>I.match!==h),M=!1;D.length!==E.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,E)=>{if(h==="default"){s(I=>{let S={...I.translationUrlPattern};return{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,matches:pm(t,S.matches),excludeMatches:pm(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(I=>{let S={...I.translationUrlPattern};return S[M]=pm(t,S[M]),S[D]=ml(E,S[D]),{...I,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...I.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:m,isAlwaysTranslateLang:g,handleTranslationUrlPatternSelected:b}}function pm(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!dt(t,n)):e):[]}d();d();d();var P5=new AbortController,{signal:L5}=P5,jc=0,Hc=0,yo=!1,ni,Fy=0,Sa=[];function vo(t,e){_5();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(B.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,vo(n,e)):(B.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,vo(n,e))}document.addEventListener(Qo,s),Sa.push(()=>{document.removeEventListener(Qo,s)});let u=Kn(m=>{if(!(Math.abs(m.clientX-jc)+Math.abs(m.clientY-Hc)<=3)&&(jc=m.clientX,Hc=m.clientY,o||yo&&!ni)){let g=Ry(n.rule,e);if(g){if(hm(g))return;fm(n,!1,g)}}},o?700:300),l=m=>{let g=m.target;hm(g)||fm(n,!0)},c=m=>{let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=vn.getPressedKeyCodes();if(f.length>1&&vn[g]&&(Fy=Date.now(),yo=!1),f.length===1&&vn[g]){let T=Date.now();yo=!0,ni&&clearTimeout(ni),ni=setTimeout(()=>{let b=Fy-T;b>0&&b<=i?yo=!1:l(m),ni=void 0},i)}};if(Sa.push(()=>{ni&&clearTimeout(ni)}),a)return;gm("mousemove",u,e),Sa.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():yo=!1}if(gm("blur",p,e),Sa.push(()=>{e.removeEventListener("blur",p)}),!o){let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",g=hb;gm("keyup",My,e),Sa.push(()=>{e.removeEventListener("keyup",My)}),g.includes(m)?vn("*","mouseHover",c):vn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),vn.setScope("mouseHover"),Sa.push(()=>{vn.deleteScope("mouseHover")})}}function _5(){Sa.forEach(t=>t()),Sa=[],vn.setScope("all")}function My(t){yo=!1}function gm(t,e,n=window){return n.addEventListener(t,e,{signal:L5})}function fm(t,e,n,r=window){if(n=n||Ry(t.rule,r),!n){B.debug("can not find selection part!");return}if(M5(n,e))return;if(hm(n)){B.debug("exclude dom");return}my(t,n);let i=Hs();i&&(i.setupMouseHoverListener=vo);let o=on(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=om({...i},t);Ur({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Za(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();et(Z4,p),ot("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function Ry(t,e){return F5(jc,Hc,t,e)}function F5(t,e,n,r){let a=v1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=S1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:Iy(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){B.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{I5(r)}),!0}function B5(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function I5(t){let e=Hs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Is(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function mm(t){return!!(t.host&&t.mode)}function By(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||mm(n))return t;for(;n&&n.nodeName!=="BODY"&&!mm(n)&&Tp(n,e);){let r=n.parentNode;if(r&&mm(r))break;n=r}return n}function Iy(t,e){return t.nodeType===Node.TEXT_NODE||Tp(t,e)?By(t,e):t}function Oy(t,e){jc=e.clientX,Hc=e.clientY,fm(t,!0)}var Ws=[];function bm(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Ws.push(()=>{document.removeEventListener("click",i)})}function zy(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Ws.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function Wc(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ws.push(()=>{document.removeEventListener("touchstart",r)})}var Tm={touchShortcutsOff:()=>{},"multipleClick.2":bm,"multipleClick.3":bm,"multipleClick.4":bm,"slide.left":zy,"slide.right":zy,"fingers.2":Wc,"fingers.3":Wc,"fingers.4":Wc,"fingers.5":Wc};async function Uy(t){try{q5();let e=await Or(),n=mb.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=R5(t,e,r.command),i=Tm[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{U5(r.command,t,u)})})}catch(e){B.error(e)}}function R5(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var O5=()=>{ym();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},z5=()=>{Sm();let t=new CustomEvent(Mr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},N5=()=>{vm();let t=new CustomEvent(Mr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},Ny=0,U5=(t,e,n)=>{new Date().getTime()-Ny<200||(Ny=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?O5():t==="touchShortcutsToggleTranslationMask"?N5():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?z5():t==="touchShortcutsToggleTranslateTouchElement"&&Oy(e,n))};function q5(){Ws.forEach(t=>{t()}),Ws=[]}function qy(t){let{t:e}=Ce(),{ctx:n,setSettings:r}=t,a=j5(t);return as(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||ts[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(H5,{...t})}function j5({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=Ce(),a=Ue(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ue(()=>ts.filter(s=>!(s==="Off"||ts.includes(a)&&s==="OtherCustom")),[t,a]);return Ue(()=>i.map(s=>{let u=r("mouseHoldKey",{key:qc(s)}),l=ts.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(m=>{let g={...m.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(g.mouseHoverHoldKey=p.value),{...m,generalRule:g}})}}}),[i,a])}function H5(t){let{ctx:e,setSettings:n}=t,{t:r}=Ce(),a=e.config.generalRule,i=Object.keys(Tm).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(m=>{let g={...m.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(g.touchShortcutsToggleTranslateTouchElement=p.value),{...m,generalRule:g}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let m=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?m:"touchShortcutsOff"}}})}})]})}d();function jy(t){let{isAlwaysTranslateLang:e}=W5({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=Ce();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Ta(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:fl(t.currentLang,u.matches),excludeMatches:fl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=ml(t.currentLang,u[i]),u[o]=fl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function W5({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var K5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:m})=>{let[g,f]=se(!1),T=$e(null),b=$e(null),h=()=>{u||!l&&ut().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),m?.()},s))},E=()=>{ut().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ue(()=>{let I={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(I.maxWidth="200px",o&&(I.width=o+"px"),I.whiteSpace="normal"),n){case"top":return{...I,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...I,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...I,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...I,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&E()},children:e}),g&&w("div",{style:M,role:"tooltip",children:t})]})},xa=K5;d();var Hy=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Wy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ky=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),Gy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),$y=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Vy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Yy=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function Jy({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=Ce(),a=Me(),i=Math.round((_i.supportedVideoSubtitleSites||[]).length/10),o=Ue(()=>[{title:r("widget.translateFile"),icon:Hy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Wy,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:Ky,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(Cb)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(xa,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(Qy,{...s})}):w(Qy,{...s}))})}function Qy(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function xm(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=se(""),[l,c]=se(i),[p,m]=se(null),[g,f]=se(null);Ae(()=>{Mt.get(Ft,null).then(E=>{E?(m(E),f(Jt(E))):f(!1)}).catch(E=>{f(!1)})},[]);let T=!0,b=tt();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=pl(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(wy,{isLogin:!!p,isProUser:!!g,config:n}),w(J5,{openSharePage:r})]}),w(Dy,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(Ay,{isProUser:!!g,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w($5,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(Y5,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(dm,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(_y,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(qy,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(jy,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(G5,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(Jy,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(V5,{...t,isProUser:!!g,isShowPricing:T,setMessage:u})]})}function G5(t){let{t:e}=Ce(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ue(()=>!n.rule.subtitleRule.disabled&&H0.includes(n.rule.subtitleRule.type||""),[n,H0])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function $5(t){let{t:e}=Ce(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(xa,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?$y:Vy})})}function V5(t){let{t:e,lang:n}=Ce(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[Gy,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(Q5,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(cm,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:g=>{g.value==="openPremium"?(globalThis.open(Ai),t.onClose()):g.value==="changeToOnlyTranslationMode"?c("translation"):g.value==="changeToDualTranslationMode"?c("dual"):g.value==="translateTheWholePage"?t.onTranslateTheWholePage():g.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():g.value==="translateTheMainPage"?t.onTranslateTheMainPage():g.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):g.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):g.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):g.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):g.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):g.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):g.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):g.value==="options"?(t.openOptionsPage(),t.onClose()):g.value==="changeToTranslateTheWholePage"?p():g.value==="changeToTranslateTheMainPage"?m():g.value==="about"?t.openAboutPage():g.value==="toggleEnabled"?t.onToggleEnabled():g.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):g.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):g.value==="goPro"&&t.onOpenUrl(Ai,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(g){g.preventDefault(),t.openOptionsPage()}function c(g){t.setSettings(f=>({...f,translationMode:g})),t.onSwitchTranslationMode(g)}function p(){t.setSettings(g=>({...g,translationArea:"body"})),t.onTranslateTheWholePage()}function m(){t.setSettings(g=>({...g,translationArea:"main"})),t.onTranslateTheMainPage()}}function Y5({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=Ce(),l=r.config,c=Ue(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Ga(r?.rule)&&!p&&(p=!0);let m=s("translate");e==="Translated"||e==="Error"?m=s("show-original"):e==="Original"?p?Ir()&&c.protocol==="file:"||o?m=s("translate-firefox-local-pdf"):ye()?m=s("noSupportTranslate-pdf"):m=s("translate-pdf"):m=s("translate"):m=s(e);let g=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(al()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(m+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):m+=` (${qc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(g+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:m})}function Q5({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=Ce(),o=Ut();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Ey(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function J5(t){let{t:e}=Ce();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),Yy]})}d();d();d();d();var Em={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Kc(t,e,n){let[r]=se(()=>typeof e=="function"?e():e),[a]=se(n),[i,o]=se(r),[s,u]=se(!1),[l,c]=se("");Ae(()=>{Em.get(t,r,a).then(m=>{m[t]&&o(m[t]),u(!0),c("")}).catch(m=>{u(!1),c(m)})},[t,r,a]);let p=Ve(m=>{let g=typeof m=="function"?m(i):m;B.debug("new settings",g),Em.set(t,g,a).then(()=>{o(g),u(!0),c("")}).catch(f=>{o(g),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Cm(t,e,n){let r=[];return function(){let[i,o,s,u]=Kc(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ae(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Zy(t,e){return Cm(t,e,"sync")}var Z5="userConfig",X5=null,e8=Zy(Z5,X5);function jr(t){let[e,n,r,a]=e8(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();async function Gc(t){try{let e=new Date;B.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Xo]:e.toISOString()}),await t8(),ye()||await J3()}catch(e){B.error("run cron task failed",e)}}async function Xy(){let e=(await an()).interval;if(e){let n=await oe.storage.local.get(Xo);if(n&&n[Xo]){let r=n[Xo];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:e}),B.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),aa({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{B.error("send content message request failed from cron task",u)})):B.debug(`no need to sync rules, latest: ${r}`):B.info(`local version is too old, please update to ${o} or later`)}catch(t){B.error("sync rules error: ",t)}}d();d();d();d();d();d();var wm;function Im(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function uv(t,e=","){return t.map(Im).join(e)}var lv=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Vc(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Yc(t,e="@media "){return e+Mn(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Mn(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function n8(){}var $t={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function cv(t){return t.match(/[-=:;]/g)?.length||0}function _m(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(cv(t),15)<<18}var r8=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Rm({n:t,i:e,v:n=[]},r,a,i){t&&(t=Im({n:t,i:e,v:n})),i=[...Mn(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Mn(u&&Yc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|_m(l):s=="dark"?1073741824:l[0]=="@"?_m(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~r8.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var Om=new Map;function ev(t){if(t.d){let e=[],n=Dm(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Dm(r,i=>Dm(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Am(i,o)}return Am(o,i)})):r,"&"),r=>Am(r,t.n?"."+lv(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Dm(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Am(t,e){return t.replace(/&/g,e)}var tv=new Intl.Collator("en",{numeric:!0});function a8(t,e){for(var n=0,r=t.length;n>1;0>=dv(t[a],e)?n=a+1:r=a}return r}function dv(t,e){let n=t.p&$t.o;return n==(e.p&$t.o)&&(n==$t.b||n==$t.o)?0:t.p-e.p||t.o-e.o||tv.compare(nv(t.n),nv(e.n))||tv.compare(rv(t.n),rv(e.n))}function nv(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function rv(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function km(t,e){return Math.round(parseInt(t,16)*e)}function Ea(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[km(t.substr(1,i),o),km(t.substr(1+i,i),o),km(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function pv(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let m=[],g="",f=0,T=0;for(let E in o||{}){var b,h;let D=o[E];if(E[0]=="@"){if(!D)continue;if(E[1]=="a"){m.push(...mv(s,u,Nm(""+D),p,u,l,c,!0));continue}if(E[1]=="l"){for(let M of Mn(D))m.push(...i(M,{n:s,p:(b=$t[E[7]],u&~$t.o|b),r:E[7]=="d"?[]:l,i:c},p));continue}if(E[1]=="i"){m.push(...Mn(D).map(M=>({p:-1,o:0,r:[],d:E+" "+M})));continue}if(E[1]=="k"){m.push({p:$t.d,o:0,r:[E],d:i(D,{p:$t.d},p).map(ev).join("")});continue}if(E[1]=="f"){m.push(...Mn(D).map(M=>({p:$t.d,o:0,r:[E],d:i(M,{p:$t.d},p).map(ev).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))E=="label"&&D?s=D+Vc(JSON.stringify([u,c,o])):(D||D===0)&&(E=E.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=E)[0]=="-"?0:cv(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),g+=(g?";":"")+Mn(D).map(M=>p.s(E,gv(""+M,p.theme)+(c?" !important":""))).join(";"));else if(E[0]=="@"||E.includes("&")){let M=u;E[0]=="@"&&(E=E.replace(/\bscreen\(([^)]+)\)/g,(I,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Yc(y,"")):I}),M|=_m(E)),m.push(...i(D,{n:s,p:M,r:[...l,E],i:c},p))}else m.push(...i(D,{p:u,r:[...l,E]},p))}return m.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:g}),m.sort(dv)}(t,Rm(e,n,r,a),n)}function gv(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Ea(s):""+Mn(s).filter(u=>Object(u)!==u)})}function zm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function Fm(t,e,n=$t.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,m){u={...u,i:u.i||m};let g=function(f,T){let b=Om.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return g?typeof g=="string"?({r:p,p:c}=Rm(u,l,c,p),zm(Fm(Nm(g),l,c,p,u.i),u.n)):Array.isArray(g)?g.map(f=>{var T,b;return{o:0,...f,r:[...Mn(p),...Mn(f.r)],p:(T=c,b=f.p??c,T&~$t.o|b)}}):pv(g,u,l,c,p):[{c:Im(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(a8(i,s),0,s);return i}function mv(t,e,n,r,a,i,o,s){return zm((s?n.flatMap(u=>Fm([u],r,a,i,o)):Fm(n,r,a,i,o)).map(u=>u.p&$t.o&&(u.n||e==$t.b)?{...u,p:u.p&~$t.o|e,o:0}:u),t)}function i8(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Rm(i,o,e);return n&&mv(s,e,n,o,u,l,c,r)},Om.set(t,a),t}function Pm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(o8),i:a}))}}function o8(t,e,n){return n.indexOf(t)==e}var av=new Map;function Nm(t){let e=av.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&Pm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Vc(JSON.stringify([p,m])):p+"("+uv(m)+")",$t.a,m,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),av.set(t,e=r[0])}return e}function fv(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function hv(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?fv(t,e,n=>Lm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+Lm(r),t?Lm(t):"")}function Lm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=hv(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var dse=bv("@"),pse=bv("~");function bv(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return uv(Nm(n+t+"("+hv(r,a)+")"))}}function Mm(t,e){return Array.isArray(t)?iv(fv(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?iv(t):[t]}var s8=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function iv(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=s8.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function Tv(t,...e){var n;let r=Mm(t,e),a=(r.find(i=>i.label)?.label||"css")+Vc(JSON.stringify(r));return n=(i,o)=>zm(r.flatMap(s=>pv(s,i,o,$t.o)),a),Om.set(a,n),a}var gse=new Proxy(function(t,e){return ov("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ov(e,n,r)}}});function ov(t,e,n){return{toString(){return Tv({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function X(t,e,n){return[t,u8(e,n)]}function u8(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):Bm(n,1)}):n=>t||{[n[1]]:Bm(n,2)}}function Bm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function te(t,e,n,r){return[t,l8(e,n,r)]}function l8(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=yv(t||a[1]),s=i.theme(o,a.$$)??So(a.$$,o,i);if(s!=null)return a._=Bm(a,0,s),r(a,i,o)}}function It(t,e={},n){return[t,c8(e,n)]}function c8(t={},e){return(n,r)=>{let{section:a=yv(n[0]).replace("-","")+"Color"}=t,[i,o]=d8(n.$$);if(!i)return;let s=r.theme(a,i)||So(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,m=r.theme(l,o||"DEFAULT")||o&&So(o,l,r),g=e||(({_:T})=>{let b=Ks(c,T);return p?{[p]:b}:b});n._={value:Ea(s,{opacityVariable:u||void 0,opacityValue:m||void 0}),color:T=>Ea(s,T),opacityVariable:u||void 0,opacityValue:m||void 0};let f=g(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:Ea(T,{opacityVariable:u||void 0,opacityValue:m||"1"}),color:b=>Ea(T,b),opacityVariable:u||void 0,opacityValue:m||void 0},f={"&":f,[r.v("dark")]:g(n,r)})}return f}}function d8(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ks(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function So(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=$c(gv(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function yv(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function $c(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>$c(n)+r+$c(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var mse=Symbol();var vv=new Proxy(n8,{apply(t,e,n){return wm(n[0])},get(t,e){let n=wm[e];return typeof n=="function"?function(){return n.apply(wm,arguments)}:n}});var fse=function t(e){return new Proxy(function(n,...r){return sv(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return sv(e,r,a,i)}}})}();function sv(t,e,n,r){return{toString(){let a=Mm(n,r),i=lv(e+Vc(JSON.stringify([e,a])));return(typeof t=="function"?t:vv)(Tv({[`@keyframes ${i}`]:Mm(n,r)})),i}}}d();d();d();d();d();var Sv={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Bn(4,"rem",4,.5,.5),...Bn(12,"rem",4,5),14:"3.5rem",...Bn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ke("blur"),backdropBrightness:Ke("brightness"),backdropContrast:Ke("contrast"),backdropGrayscale:Ke("grayscale"),backdropHueRotate:Ke("hueRotate"),backdropInvert:Ke("invert"),backdropOpacity:Ke("opacity"),backdropSaturate:Ke("saturate"),backdropSepia:Ke("sepia"),backgroundColor:Ke("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ke("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Bn(200,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:Ke("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ke("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ke("colors"),caretColor:Ke("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{...Bn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ke("borderColor"),divideOpacity:Ke("borderOpacity"),divideWidth:Ke("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Gs(2,6),...Gs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ke("spacing"),gradientColorStops:Ke("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Gs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Gs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Bn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Bn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ke("spacing"),placeholderColor:Ke("colors"),placeholderOpacity:Ke("opacity"),outlineColor:Ke("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ke("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:Bn(200,"",100,0,50),scale:{...Bn(150,"",100,0,50),...Bn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ke("spacing"),scrollPadding:Ke("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:Ke("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:Bn(2),textColor:Ke("colors"),textDecorationColor:Ke("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:Ke("spacing"),textOpacity:Ke("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:Ke("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Gs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Bn(50,"",1,0,10),auto:"auto"}};function Gs(t,e){let n={};do for(var r=1;re(t)}var Mse={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Sv.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Sv.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},Ise=[X("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:So(`[${e}]`,"",n)}}})),X("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),te("aspect-","aspectRatio"),X("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Yc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),X("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),X("box-(border|content)","boxSizing",({1:t})=>t+"-box"),X("hidden",{display:"none"}),X("table-(auto|fixed)","tableLayout"),X(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",X("isolate","isolation"),X("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),X("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Qc),X("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),X("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),te("-?(top|bottom|left|right)(?:$|-)","inset"),X("(visible|collapse)","visibility"),X("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),X("flex-((row|col)(-reverse)?)","flexDirection",xv),X("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),X("grid-cols-(\\d+)","gridTemplateColumns",Dv),te("col-","gridColumn"),X("col-(span)-(\\d+)","gridColumn",wv),te("col-start-","gridColumnStart"),X("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),X("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),X("grid-rows-(\\d+)","gridTemplateRows",Dv),te("row-","gridRow"),X("row-(span)-(\\d+)","gridRow",wv),te("row-start-","gridRowStart"),X("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),X("row-end-(auto|\\d+)","gridRowEnd"),X("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>Qc(xv(t))),X("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",X("justify-","justifyContent",Ev),X("(content|items|self)-",t=>({["align-"+t[1]]:Ev(t)})),X("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),te("p([xytrbl])?(?:$|-)","padding",xo("padding")),te("-?m([xytrbl])?(?:$|-)","margin",xo("margin")),te("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),X("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:t})=>typeof(t=Mn(t))[1]=="string"?{fontFamily:rr(t)}:{fontFamily:rr(t[0]),...t[1]}),X("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),X("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),X("italic","fontStyle"),X("not-italic",{fontStyle:"normal"}),X("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),X("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),X("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),It("placeholder-",{property:"color",selector:"&::placeholder"}),X("text-(left|center|right|justify|start|end)","textAlign"),X("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),It("text-",{property:"color"}),te("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),te("indent-","textIndent"),X("(overline|underline|line-through)","textDecorationLine"),X("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),It("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),X("decoration-","textDecorationStyle"),X("(uppercase|lowercase|capitalize)","textTransform"),X("normal-case",{textTransform:"none"}),X("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),X("align-","verticalAlign"),X("whitespace-","whiteSpace"),X("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),X("break-words",{overflowWrap:"break-word"}),X("break-all",{wordBreak:"break-all"}),X("break-keep",{wordBreak:"keep-all"}),It("caret-",{opacityVariable:!1,opacitySection:"opacity"}),It("accent-",{opacityVariable:!1,opacitySection:"opacity"}),X("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ri(t," ")},var(--tw-gradient-stops))`),It("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),It("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),It("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),X("bg-(fixed|local|scroll)","backgroundAttachment"),X("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),X(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),X("bg-blend-","backgroundBlendMode"),X("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),It("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),X("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Qc),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ri(n[0])}-radius`]:e,[`border-${ri(n[1])}-radius`]:e}}),X("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),X("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),It("border-([xytrbl])-",{section:"borderColor"},xo("border","Color")),It("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",xo("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),X("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),X("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ri(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ri(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),It("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),It("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),X("ring-inset",{"--tw-ring-inset":"inset"}),It("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Ea(e("ringOffsetColor","","#fff")),"--tw-ring-color":Ea(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),It("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:t})=>({...Ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(t),"--tw-shadow-colored":rr(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),X("mix-blend-","mixBlendMode"),...Cv(),...Cv("backdrop-"),te("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:rr(t),transitionTimingFunction:t._=="none"?void 0:rr(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:rr(e("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",rr),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),te("delay(?:$|-)","transitionDelay","transitionDelay",rr),te("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=rr(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",X("transform",qm),X("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":Av(t=="gpu")})),te("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...qm()})),te("-?(rotate)-","rotate",Um),te("-?(translate-[xy])-","translate",Um),te("-?(skew-[xy])-","skew",Um),X("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Qc),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",X("snap-(none)","scroll-snap-type"),X("snap-(x|y|both)",({1:t})=>({...Ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),X("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),X("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),X("snap-(normal|always)","scroll-snap-stop"),X("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",xo("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",xo("scroll-margin")),X("touch-(auto|none|manipulation)","touch-action"),X("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),X("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),X("outline",{outlineStyle:"solid"}),X("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),It("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],X("select-(none|text|all|auto)","userSelect"),It("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),It("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),X("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),X("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Qc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function xv(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ri(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function rr(t){return t&&""+(t._||t)}function Ev({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function xo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ks(t+"-"+ri(a[0])+e,r),...Ks(t+"-"+ri(a[1])+e,r)}:Ks(t+e,r)}}function Cv(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ca(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,X(`${t}filter`,n),...e.map(r=>te(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Mn(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Um({1:t,_:e}){return{["--tw-"+t]:e,...qm()}}function qm(){return{...Ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":Av()}),transform:"var(--tw-transform)"}}function Av(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function wv({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Dv({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ca(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Jc=globalThis||(typeof window<"u"?window:self),m8=Object.create,Hm=Object.defineProperty,f8=Object.getOwnPropertyDescriptor,h8=Object.getOwnPropertyNames,b8=Object.getPrototypeOf,T8=Object.prototype.hasOwnProperty,y8=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),v8=(t,e)=>{for(var n in e)Hm(t,n,{get:e[n],enumerable:!0})},jm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of h8(e))!T8.call(t,a)&&a!==n&&Hm(t,a,{get:()=>e[a],enumerable:!(r=f8(e,a))||r.enumerable});return t},S8=(t,e,n)=>(jm(t,e,"default"),n&&jm(n,e,"default")),Pv=(t,e,n)=>(n=t!=null?m8(b8(t)):{},jm(e||!t||!t.__esModule?Hm(n,"default",{value:t,enumerable:!0}):n,t)),Lv=y8((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var m=new XMLHttpRequest;m.open("GET",l),m.responseType="blob",m.onload=function(){u(m.response,c,p)},m.onerror=function(){},m.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Jc=="object"&&Jc.global===Jc?Jc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var m=o.URL||o.webkitURL,g=document.createElement("a");c=c||l.name||"download",g.download=c,g.rel="noopener",typeof l=="string"?(g.href=l,g.origin===location.origin?i(g):a(g.href)?r(l,c,p):i(g,g.target="_blank")):(g.href=m.createObjectURL(l),setTimeout(function(){m.revokeObjectURL(g.href)},4e4),setTimeout(function(){i(g)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var m=document.createElement("a");m.href=l,m.target="_blank",setTimeout(function(){i(m)})}}:function(l,c,p,m){if(m=m||open("","_blank"),m&&(m.document.title=m.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var g=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||g&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),m?m.location.href=D:location=D,m=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,E=h.createObjectURL(l);m?m.location=E:location.href=E,m=null,setTimeout(function(){h.revokeObjectURL(E)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),_v={};v8(_v,{default:()=>Zc});var x8=Pv(Lv());S8(_v,Pv(Lv()));var{default:kv,...E8}=x8,Zc=kv!==void 0?kv:E8;d();d();d();d();d();d();var Sue=Me().REDIRECT_URL;d();var Xue=Gi([]);function Bv(t){let[e,n]=se(null);return Ae(()=>{Pn().then(r=>{n(r),B.debug("current config",r)})},[]),Ae(()=>{Pn().then(r=>{n(r)})},[t]),e}function Iv(t){let[e,n]=se(null);return Ae(()=>{t&&hn({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function Rv(){let[t,e]=se(null);return Ae(()=>{Zt().then(r=>{e(r)})},[]),[t,r=>{e(r),Xt(r)}]}d();async function _8(t,e,n){try{if(e===null)return"noupdate";let r=await Zt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await Wm(t,e),await Xt(r),"upload"}let a=await zv(t);r.accountLastSyncedAt=Date.now(),B.debug("settings",e),B.debug("local settings.updatedAt",e.updatedAt),B.debug("remote settings.updatedAt",a.updatedAt),B.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),B.debug("isUpload",i),i)return await Wm(t,e),await Xt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||F8(n)&&_8(n.token,t,e).then(i=>{B.debug("syncUserSetting result",i)})},[t,n])}function F8(t){return Jt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function zv(t){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ns+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function Wm(t,e){return(location.href?.indexOf("popup.html")>0?Wa:ce)({responseType:"json",url:ns+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function ed(t){let{onClose:e}=t,[n,r]=se("Original"),[a,i,o,s]=jr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});Xc(a,i);let[u,l]=se(null),[c,p]=se(globalThis.location.href),[m,g]=se("auto"),[f,T]=se(null),b=O=>{r(O.detail)};if(Ae(()=>(document.addEventListener(ja,b,!1),an().then(O=>{l(O);let _=vt();g(_);let k=Qe();r(k),Gc(O.interval)}),document.addEventListener("urlChange",E),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",E)}),[]),Ae(()=>{an().then(O=>{l(O)})},[a]),Ae(()=>{c&&u&&Km().then(O=>{T(O)})},[c,u]),!u||!f)return null;return w(xm,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:O=>{D("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:M,onToggleEnabled:I,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ra(f.rule)||c)},openAboutPage:A,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:m,onSetLocalConfig:kl,onSetBuildinConfig:j3,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(O){g(O);let _=xy(c,O,u.sourceLanguageUrlPattern);i(k=>({...k,sourceLanguageUrlPattern:_})),qn(O)}function E(){p(globalThis.location.href)}function D(O,_,k={}){let N={trigger:"page_popup",...k};return()=>{_n({method:O,data:N}),_&&e()}}function M(){e()}function I(){i(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{M()},50)}function S(O,_){let k=O;_&&(k=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${_}`),Fl(k,!0),setTimeout(()=>{M()},50)}function y(O){O&&(Oi(!1,O),setTimeout(()=>{M()},50))}function L(O=""){Bi(!0,O),setTimeout(()=>{e()},50)}function A(){Ll(),setTimeout(()=>{e()},50)}function v(){Q3(),setTimeout(()=>{e()},50)}}d();function jv(){let[t,e]=se("Original");return Ae(()=>{let n=Qe();e(n);let r=a=>{e(a.detail)};return document.addEventListener(ja,r),()=>{document.removeEventListener(ja,r)}},[]),{pageStatus:t}}var Nv=6,B8={position:"right",top:335};function Hv({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=$e(null),o=$e(null),[s,u]=se(!1),l=$e(null),c=$e(!1),p=$e(n.floatBallConfig||B8),m=$e(0),g=$e(0),f=$e(0),T=$e(!1),b=$e(0),h=$e(0),E=$e(0),D=$e(0),M=$e(!1),I=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},ut().any?3e3:0))},[u,l,T,a]);return Ae(()=>{a||u(!1)},[a]),Ae(()=>{if(i.current&&p.current){let S=Gm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ae(()=>{if(!o.current||!i.current)return;let S=k=>{k.preventDefault&&k.preventDefault(),m.current=k.clientX,g.current=k.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),I(!0),E.current=k.clientX,D.current=k.clientY,M.current=!1,ut().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Uv({startX:m.current,startY:g.current,endX:E.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",L),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},y=k=>{if(k.preventDefault&&k.preventDefault(),!c.current||!i.current||(E.current=k.clientX,D.current=k.clientY,M.current))return;let N=k.clientY-g.current+f.current,z=Gm(N);i.current.style.top=`${z}px`},L=k=>{if(k.preventDefault&&k.preventDefault(),_(),c.current=!1,clearTimeout(l.current),T.current||I(!1),M.current)return;Uv({startX:m.current,startY:g.current,endX:k.clientX,endY:k.clientY})||(clearTimeout(h.current),t());let z=Gm(k.clientY-30);p.current.top=z;let q=fs();kl({...q,floatBallConfig:p.current})},A=k=>{k.preventDefault&&k.preventDefault(),S(k.changedTouches[0])},v=k=>{k.preventDefault&&k.preventDefault(),y(k.changedTouches[0])},O=k=>{k.preventDefault&&k.preventDefault(),L(k.changedTouches[0])},_=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",A),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",A))}},[e,o,i,l,c,n,I,t]),Ae(()=>{if(ut().any)return;let S=L=>{L.target===i.current&&!T.current||(T.current=!0,I(!0),clearTimeout(l.current))},y=L=>{if(c.current){T.current=!1;return}L.target===i.current&&!T.current||I(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,I,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:I}}function Uv({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>Nv||i>Nv}function Wv(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ue(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ue(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ue(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Kv(){let[t,e]=se(!1);return Ae(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var qv="hasShownFloatingBallGuide",I8="2024-01-06";function Gv(t){let[e,n]=se(!1);Ae(()=>{!t.config.enableShowFloatingBallGuide||vt()==t.targetLanguage||(async()=>{let a=await At(qv,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function $v(t,e){let n=$e(0),[r,a]=se(!0),[i,o]=se(!1),s=jr(),[u,l]=s,{t:c}=Ce(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ae(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let m=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return ut().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),g=Ue(()=>ut().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ue(()=>ut().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:Ta(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:g,tooltipText:f,handleShowTooltip:m}}function Gm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ai=`${Q}-float-ball`;function Vv(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(R8,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function R8(t){let{t:e}=Ce(),[n,r]=se("UntilNext"),a=Ii()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ai}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ai}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(ya,{type:"modal-close"})})]}),w("div",{class:`${ai}-close-radio-content mt-3`,children:o.map(s=>w(O8,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ri(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ai}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ai}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function O8(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=z8(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ai}-radio-sel`:`${ai}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function z8(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();d();function Yv(t){return we.ASSETS_BASE_URL+t}var ii=`${Q}-float-ball`;function Qv(t){let{t:e}=Ce(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ue(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ii}-guide-container`,style:r,children:[w("img",{class:`${ii}-guide-bg ${t.fixedPosition}`,src:N8}),w("div",{class:`${ii}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ii}-guide-img`,src:Yv("images/float_ball_intro.png")}),w("div",{class:`${ii}-guide-message`,children:[e("floatBall.guideClickToTranslate"),ut().any?` +${e("floatBall.longPress")}`:""]}),w("div",{class:`${ii}-primary-btn ${ii}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var N8="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function U8({isVisible:t,onClose:e,children:n}){return w(jt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Jv=U8;var $s=`${Q}-float-ball`;function $m(t){let{t:e}=Ce(),n=jr(),[r,a,i,o]=n;Xc(r,a);let s=Bv(r),u=Iv(s),{isFullScreen:l}=Kv(),[c,p]=se(!1),[m,g]=se(!0),{pageStatus:f}=jv(),T=Lp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ee();if(Ga(u?.rule)){let U=ra(u.rule);Oi(!0,U||P);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,_n,p]),h=Ve(()=>{p(!0)},[p]),E=m&&!!s,{containerRef:D,active:M,ballRef:I,floatBallConfigRef:S,setActive:y}=Hv({handleBallClick:b,handleMobileBallLongPress:h,isShow:E,localConfig:t.localConfig,popupVisible:c}),L=T?.fixedPosition||"right",A=L==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:O}=Gv(t.ctx),{closeTransform:_,logoContainerTransform:k,settingTransform:N}=Wv(T,M||v),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:F,handleShowTooltip:C}=$v(u,f);return E?w("div",{class:`${$s}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(q8,{ctx:u,setVisible:g,closeTransform:_,setActive:y,getModalStyle:()=>Zv(S.current.top,300,L)}),w(xa,{enableMobile:!0,text:F,position:A,delay:z,onShow:C,disable:q,children:w("div",{class:`${$s}-btn ${L} btn-animate `,ref:I,style:{transform:k,opacity:M||v?1:.5},children:w("div",{children:[w(ya,{type:"logo"}),f!=="Original"?w(ya,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:N},class:`${$s}-more-buttons btn-animate`,children:[w(xa,{text:e("translateFileTooltip"),multiple:!0,width:200,position:A,containerClass:"btn-animate",children:w("div",{class:`${$s}-more-button`,onClick:()=>{Fl(Db,!0)},children:w(ya,{type:"file"})})}),w(xa,{text:e("floatBall.setting"),position:A,containerClass:"btn-animate",children:w("div",{class:`${$s}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(ya,{type:"setting"})})})]}),w(j8,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Zv(S.current.top,500,L)}),w(Qv,{visible:v,top:S.current.top,fixedPosition:L,onClose:()=>{O(),y(!1)}})]}):null}function q8(t){let{t:e}=Ce(),[n,r]=se(!1),a=jr(),[i,o,s,u]=a,l=Lp(t.ctx,i),c=Ve(m=>{t.ctx&&o(g=>t2({...g},m))},[t.ctx,o]),p=Ve(m=>{l&&(t.setVisible(!1),m==="AlwaysClose"?c({...l,enable:!1}):m==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(jt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(ya,{type:"close"})}),w(Vv,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function j8(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Jv,{isVisible:t.visible,onClose:t.onClose,children:w(ed,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(ed,{onClose:t.onClose})})}):null}function H8(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Zv=(t,e,n)=>{let a=H8().height,i={position:"fixed"},o=0;return xf()&&(t=W8.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},W8={position:"right",right:0,top:335};function K8(t,e){for(let n of e){if(ye()&&!Ir()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function Vm(){let t=Me(),e=await an(),n=await Or(),r={url:globalThis.location.href,config:e},a=await hn(r),i=await _p(a,n),o=dt(a.url,i?.blockUrls),s=await Zt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return K8(l,[c]),G8(l,e,s,a)}function G8(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),Ki(w(mc,{lang:e.interfaceLanguage,fallbackLang:"en",translations:vy,children:w($m,{localConfig:n,ctx:r})}),a)}var Ym=!1;async function Xv(t){if(!t){let e=await an(),n={url:globalThis.location.href,config:e};t=await hn(n)}t.config.debug&&B.setLevel("debug"),t.isTranslateExcludeUrl?B.debug("detect exclude url, do not inject anything."):(Ym=!0,Vm().catch(e=>{B.debug("init popup error",e)}))}async function e9(){Ym||(Ym=!0,Vm().catch(t=>{B.error("init popup error",t)}))}var t9=!1,i9=[()=>{vn.unbind()}],n9=[...i9],$8=Kn(async()=>{await Bi()},50),V8=Kn(async()=>{await Ll()},50),Y8=Kn(async()=>{await Y3()},50),Q8=Kn(async()=>{await V3()},50),o9=Kn(t=>{_n({method:t,data:{trigger:"userscript_menu"}})},50);function J8(t,e){let n=t.document;if(t9)return;t9=!0,ye()||q3(),n.addEventListener("securitypolicyviolation",u7),document.addEventListener(me+"DocumentMessageUser",l9),document.addEventListener(me+"DocumentMessageUpdateUser",c9),document.addEventListener(me+"ChangeSuccessService",d9.bind(null,e)),document.addEventListener(me+"ChangeService",p9.bind(null,e)),document.addEventListener(qa,i7.bind(null,e)),n.addEventListener(me+"EbookLoaded",s7),n.addEventListener($4,o7.bind(null,e)),n.addEventListener(V4,l7.bind(null,e)),n.addEventListener(Ku,a=>{He()||um(a,e)}),n.addEventListener(Y4,by),n.addEventListener("click",a=>{e7(a,e)}),He()&&t.addEventListener("message",X8,!1),ye()&&(He()||n.addEventListener(Mr,Z8)),He()||oa.rootIframe(Zu).handleAsk("throttleRequest",K2)}function Vs(t,e){c7(),J8(e,t),ye()&&(He()||(lm(t.config),d7(t.config))),al()&&Uy(t),tt()&&lm(t.config)}function Z8(t){e9()}function X8(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===ju&&aa(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function e7(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ot(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Qm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}s9(u9.bind(null,e,o,i,s));return}}}async function t7(){let t=await fn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await mn(t)}async function n7(){let t=await fn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await mn(t)}var r9=0;function s9(t){let e=Date.now();if(e-r9<2e3||(r9=e,r7()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let m=document.createElement("div");m.className=Q+"-modal-content notranslate",u.appendChild(m);let g=document.createElement("span");g.textContent="\xD7",g.className=Q+"-close",m.appendChild(g);let f=document.createElement("div");f.className=i+" notranslate",m.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",m.appendChild(T);let b=document.createElement("div");b.className=s,m.appendChild(b),l.appendChild(u),g.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{a7()},100)}function u9(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=Ye.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",m=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),m.setAttribute(`data-${Q}-action`,"retry");let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("viewBox","0 0 16 16"),g.setAttribute("width","20"),g.setAttribute("height","20"),g.innerHTML='',m.appendChild(g),m.onclick=()=>{a.style.display="none",Qm({method:"retryFailedParagraphs"}),wa(m,!0)}}else if(r=="login")p=u("goLogin"),m.onclick=()=>{wa(m,!0),window.open(Tb)};else if(r=="upgrade")p=u("upgradeToPro"),m.onclick=()=>{wa(m,!0),window.open(el)};else if(r=="setting")p=u("goSettings"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),m.onclick=()=>{wa(m,!0),window.open(we.OPTIONS_URL)},Zm(t,t.config.translationService,!1).then(g=>{g?(p=u("toggleToService",{service:u("translationServices."+g)}),m.innerHTML=Ye.sanitize(p),m.onclick=()=>{g9(g),wa(m,!0)}):(p=u("goSettings"),m.innerHTML=Ye.sanitize(p))});else if(r=="none")return;m.className="immersive-translate-btn",m.innerHTML+=Ye.sanitize(p),s.appendChild(m)}function r7(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function a7(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function i7(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;s9(u9.bind(null,t,a,i,o))}catch(r){B.warn("parse message error",r)}}async function o7(t,e){let n=e;if(B.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Qm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")_l(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")t7();else if(a.type==="toggleEnableInputTranslation")n7();else if(a.type==="translatePage")p7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=gs(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=sc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await g7(a.data,i)}catch(o){a9(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Pl(a.data):a.type==="sharePage"?um({detail:a.data},t):a.type==="switchTranslationMode"?Jm(a.data):o9(a.type);r&&a.id&&a9(a.type,r,a.id)}}catch(a){B.warn("parse message error",a)}}}function s7(t){setTimeout(()=>{td()},10)}function u7(t){we.HAS_CSP_ERROR="1"}function l7(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ot(n.name,[{name:n.name}],{...t})}function c7(){n9.forEach(t=>{t()}),n9=i9}function d7(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=ll.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=bo(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:z0,title:bo("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:N0,title:bo("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:R0,title:bo("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:O0,title:bo("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===R0?$8():i.id===O0?V8():i.id===N0?Y8():i.id===z0?Q8():o9(i.id)},i.key)}}function Qm(t){aa(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{B.error("send content message request failed",t,n)});let e=new CustomEvent(Mr,{detail:t});globalThis.document.dispatchEvent(e)}async function p7(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await We(Ee(),e);Tn(n)}function a9(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function g7({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Ze({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var oi={};async function Xm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ht(),"en"]});return qn(n),n}async function m9(t){gn("Translating");let e=vt(),n=El(),r=[...document.querySelectorAll(".source-text")];if($i(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return lt(i,"id",o+""),s&&(Vi(s,o)?.remove(),s.appendChild(Ss(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Ze({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Vi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=Ye.sanitize(`${i.message}`),oi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=Ye.sanitize(o.text),oi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{gn("Translated")}}async function f9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(oi),n=[],r=[];for(let a of e){let i=oi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete oi[a],u.appendChild(Ss(t,a)),r.push(i.sentence))}}}try{await Ze({sentences:r},t,(a,i,o)=>{let s=o.id,u=Vi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ye.sanitize(`${a.message}`),oi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=Ye.sanitize(i.text),oi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function ef(){gn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var tf={};async function h9(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return qn(n),n}async function b9(t){gn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(tf),n=[];for(let r of e){let a=tf[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${$u}='${r}']`);o&&o.remove(),n.push(a)}}try{Rs(),await gc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}function T9(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function y9(t){gn("Translating");let e=ms(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;io(u,t);let l=u.body;if(!l)continue;let c=on(t);c.isModifyImage=!1,Ur({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=fr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=$l(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Bg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),tf[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await gc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{gn("Translated")}}d();var ar=!1,nd,v9=!1,rd=null;function nf(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){B.debug("exclude url for input");return}if(rd===!1){B.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};kn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();nd&&self.removeEventListener("keydown",nd),nd=u,self.addEventListener("keydown",nd);function u(c){if(ar||rd===!1)return;let p=c,m=p.target||p.srcElement,g=m?.tagName;(m?.isContentEditable||g=="INPUT"||g=="SELECT"||g=="TEXTAREA")&&(A7(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&h7()&&(o=0,f7(c,t,i))}k7(t)}function x9({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function ad(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var Eo;function E9(t){let e=t.parentElement;if(!e)return;Eo=document.createElement("div"),Eo.className=Q+"-input",Eo.innerHTML=`
`,e.appendChild(Eo);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function C9(){Eo&&Eo.remove()}async function m7(t){if(!ar)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=ad(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=x9(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let E=l.slice(s.length+1,l.indexOf(u)).trim();if(c=ad(E,i.codeAlias),!c){B.warn("not found alias",E);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};kn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;ut().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;ar=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=w9(u,i),m=await Ie({text:p,pageLangs:["en"]});B.debug("translateContent",p,m);let g={text:p||"",id:0,from:m,to:c,url:"https://google.com",fromByClient:m,force:!0};if(!g.text||g.text.length>5e3)return;E9(o),et(Gu,Date.now());try{let b=await ma(g,{...t,translationService:t.inputTranslationService});A9(t),D9(t,o,s+b.text)}catch(b){if(b instanceof V){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:h}))}}finally{ar=!1}}catch(e){throw ar=!1,e}finally{ar=!1,C9()}}async function f7(t,e,n){if(!ar)try{let p=function(){s=e.config.inputTargetLanguage;let g=o.split(" ")[0];g&&g[0]&&(g=g[0].toLowerCase()+g.slice(1)),g.trim()&&n.flatAlias.includes(g)?(s=ad(g,n.codeAlias),i=o.slice(g.length+1)):i=o},m=function(){s="";let g=x9(n),f=o.split(g);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=ad(T,n.codeAlias),!s){B.warn("not found alias",T);return}},r=document.activeElement;ar=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(m(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=w9(i,n),l=await Ie({text:u,pageLangs:["en"]});B.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!v9){v9=!0;let g=await P7(e);if(t.target&&t.target.focus(),g==="open_settings"){Bi(!0,"#input");return}else if(g==="open_learn_more"){Ri("https://immersivetranslate.com/docs/input/");return}else if(g==="disable_once"||g==="disable_forever"){if(rd=!1,g==="disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="disable_once"){let f=await fn();f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="close_disable_once"||g==="close_disable_forever"){if(rd=!1,g==="close_disable_forever"){let f=await fn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await mn(f)}return}else if(g==="enable"){let f=await fn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await mn(f)}else if(g==="close_enable"){let f=await fn();f.enableInputTranslation=!0,await mn(f)}}E9(r),et(Gu,Date.now());try{let g=await ma(c,{...e,translationService:e.inputTranslationService});A9(e),D9(e,r,a+g.text)}catch(g){if(g instanceof V){let f=g.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(qa,{detail:f}))}}finally{ar=!1}}catch(r){throw ar=!1,r}finally{ar=!1,C9()}}function h7(){let t=document.activeElement;if(!t)return!1;if(id(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` `).reverse()[0].trim(),i=n<=e;return B.debug("cursorPosition",e,"textLength",n),B.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let e=window.getSelection();if(!e)return B.debug("No active selection found."),!1;if(e.rangeCount>0){let n=e.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=b7(r,t);B.debug("Current text node:",r.textContent),B.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=t.innerText?.split(` -`).reverse(),s=et()?o[0]||o[1]:o[0];return B.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else B.debug("Cursor is not within a text node.")}}return!1}function b7(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function w9(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function T7(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function S9(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function y7(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function v7(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function S7(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function x7(t,e){od(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var E7=[y7.bind(null,["plain"])];function C7(t){let e;od(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function od(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function w7(t){if(od(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function D9(t,e,n){await w7(e),await Aa(50);let r=t.rule.inputConfig,a=T7(n,e);try{r?.clearContentEnable&&C7(e),await Aa(50),r?.execCommandDeleteEnable&&!Ir()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),B.debug("clearContent",Da(e))}catch(i){B.error(i)}for(let i of[...E7,S7,x7,v7]){await i(a,e);let o=D7();if(!o)return;if(B.debug("setContent",i.name,S9(a,o),Da(o),a),S9(a,o))break}}function D7(){return document.activeElement}function A9(t){it("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function A7(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function k7(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Gu,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{L7()},100),new Promise(p=>{let m=p;if(o){let A=o.shadowRoot;if(!A)return;s=A.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),O=s.querySelector(`.${i}`),_=s.querySelector(`.${a}`)}else{let A=document.createElement("div");A.setAttribute("translate","no"),A.className="no-translate immersive-translate-error-modal-input-shadow-root",A.id=e,A.style.all="initial",A.style.zIndex="2147483647",document.body.appendChild(A);let v=A.attachShadow({mode:"open"}),O=document.createElement("style"),_=Me();O.textContent=_.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let k=document.createElement("div");k.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(k);let N=document.createElement("span");N.textContent="\xD7",N.className=Q+"-close",k.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",k.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",k.appendChild(c),l=document.createElement("div"),l.className=i,k.appendChild(l),v.appendChild(s),N.onclick=function(){I(),p("close")},v.addEventListener("click",z=>{z.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",L);let g=kt.bind(null,t);u.innerHTML=`
${Sc} ${g("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=g("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=Ye.sanitize(g("disableInputTranslationTips",{option:`${g("option")}`,learnMore:`${g("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:g("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:g("disableOnce")},{id:"disable-global",value:"global",text:g("disableGlobal")}];for(let A=0;Al===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:_7,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=rf(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=rf(s.denyUrls)),s?.allowUrls&&(u.allowUrls=rf(s.allowUrls)),u.release=`${n}@${e}`,Na.init(u),ud()}catch{}}async function ud(){try{let t=await Mt.get(Ft,null);if(!Ys||!t)return;Na.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function P9(t,e){try{if(!Ys)return;Na.setContext(t,e)}catch{}}function L9(t){try{if(!Ys)return;Na.setTags(t)}catch{}}function rf(t){return t.map(e=>new RegExp(e))}var fe=null,ld={},Eo,_9=!1;async function nd(){Mi.clearStrictTicks();let t=await We(Ee(),{}),e=await ms();if(B.debug("init page ctx",t),cy(t),t.rule.pageType=="subtitleBuilder"){Xm();return}if(t.rule.pageType=="ebookBuilder"){h9();return}if(Eo||(Eo=t.state.translationTheme),t.rule.urlChangeDelay&&await vr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await j7(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=Ii(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){B.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&gT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){Tn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&dt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let g=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(g)try{let h=g.split(".")[0],E=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${E}-${D}-27`),I=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}_9||(_9=!0,He()&&t.rule.useIframePostMessage&&await o1());let n=t.sourceLanguage;n==="auto"?n=await F9():qn(n);let r=r2(t,n);if(r&&(t=await We(Ee(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await Gl(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=wo(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){B.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(B.debug(`detect page language: ${t.url} ${n}`),na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||u1(n,t.config.translationLanguagePattern)&&(o=!0,B.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&rs(e)&&yo(t,window),o)fe.state.isAutoTranslate=!0,Tn(fe);else if(B.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(ld[t.translationService]||(ld[t.translationService]=!0,He()||xg(t).catch(s=>{B.warn("init translation engine error",s)})))}}async function ym(t){if(Qe()==="Original"){let e={};Eo&&(e.translationTheme=Eo),fe&&(e={...fe.state,...e});let n=await We(Ee(),e);if(t?.trigger=="right_menu"&&Ga(n?.rule)){let r=ra(n.rule);Oi(!0,r||Ee());return}await Tn(fe,t)}else(Qe()==="Translated"||Qe()==="Error")&&si()}async function F7(){if(fe=await We(Ee(),{}),fe.rule.pageType=="ebookBuilder")return b9(fe);if(fe.rule.pageType=="subtitleBuilder")return f9(fe);hy()}async function vm(t){if(Qe()==="Original"){fe=await We(Ee(),{}),Eo||(Eo=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await We(Ee(),{translationTheme:e}),await Tn(fe,t)}else if(Qe()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=Z1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=qi(i,Di,!0);a==="mask"||a==="opacity"?o!=="none"?lt(i,Di,"none",!0):lt(i,Di,e,!0):o!=="mask"&&o!=="opacity"?lt(i,Di,e,!0):lt(i,Di,"none",!0)}}}async function F9(){let t=await We(Ee(),{});return t.rule.pageType=="subtitleBuilder"?Xm():fy(t)}function M7(t){Qe()==="Original"?k9(t):ti()}function B7(t){Qe()==="Original"?m9(t):ef()}function I7(t){Qe()==="Original"?fo(t):ti()}async function si(){zi(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await We(Ee(),{});if(t.rule.pageType=="subtitleBuilder"){ef();return}else t.rule.pageType=="ebookBuilder"&&T9();ti()}async function Tn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&sd(t.config?.sentryConfig);let n=Qe(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};P9("translatePage",r),L9(r),n!=="Original"&&await si(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),ld[t.translationService]||(ld[t.translationService]=!0,He()||xg(t).catch(i=>{B.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),it("translage_page_daily",[{name:"translage_page_daily",params:a}],t),it("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:vt()}),t.rule.pageType=="subtitleBuilder"){B7(t),zi("yes");return}if(t.rule.pageType=="ebookBuilder"){y9(t),zi("yes");return}if(t.rule.pageType==="pdfReader"){M7(t),zi("yes");return}I7(t),zi("yes")}async function R7(t,e){let n=fe?.translationService;if(Qe()==="Original"||n!=t){fe=await We(Ee(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);nu({text:r}),await Tn(fe,e)}else{si();let r=await an(),a={url:Ee(),config:r,state:{}},i=await hn(a);fe=await We(Ee(),{translationService:i.translationService})}}async function O7(t){Qe()==="Original"?await af(t):(Qe()==="Translated"||Qe()==="Error")&&(fe=await We(Ee(),{}),fe.state.translationArea!=="main"?await af(t):si())}async function af(t){fe=await We(Ee(),{translationArea:"main"}),await Tn(fe,t)}async function M9(t){fe=await We(Ee(),{translationArea:"body"}),await Tn(fe,t)}async function Sm(t){let e=await We(Ee(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await We(Ee(),{translationMode:n}),Qe()==="Original"){Tn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function Jm(t){if(fe=await We(Ee(),{translationMode:t}),it("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),Qe()==="Original"){Tn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function z7(t){if(Qe()==="Original")await M9(t);else if(Qe()==="Translated"||Qe()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await We(Ee(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await We(Ee(),fe.state),await Tn(fe,t)):si()}}async function B9(t){fe=await We(Ee(),{translationStartMode:"immediate"}),await Tn(fe,t)}async function N7(t){Qe()==="Original"?await B9(t):(Qe()==="Translated"||Qe()==="Error")&&si()}async function I9(){let t=await We(Ee(),{});if(!dt(t.url,t.config.inputStyleBlockUrls)){let n=Me().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;En(document,n,"immersive-translate-input-injected-css")}t.rule.pageType&&t.rule.pageType!=="html"||t.config.enableInputTranslation&&nf(t)}function U7(){return fe}async function We(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await hn(r)}else{let r=await an(),a=e;n.length===0&&(a=void 0),fe=await hn({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function q7(){let t=await fn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await mn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?nu({text:kt(fe,"videoSubtitlePreTranslationOn")}):nu({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Km(){let t=await an(),e=await ms(),n;fe&&fe.state&&(n=fe.state);let r={url:Ee(),config:t,state:n},a=await hn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,im(fe);let i=Hs(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{$s(a,s),rs(e)&&yo(a,s),nf(a)}),a}function j7(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function l9(t){let e=t.detail,n=fn();await Ov(e.token,n,mn),Mt.set(Ft,e);let r=await Mt.get(K0,!1);Mt.set(K0,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),ud()}function c9(t){B.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),ud()}async function d9(t){let e=await fn();if(e.translationService)return;let n=t.config.translationService,r=await Zm(t,n);if(t.translationService!==r){if(!r){us([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,mn(e),t.translationService=r,us([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function p9(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await fn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),mn(i)}async function Zm(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await uT(r,t)}async function g9(t){let e=await fn();e.translationService=t,await mn(e);let n=await We(Ee(),{});n.translationService=t,await Tn(n)}z3({detectCurrentPageLanguage:F9,ensureSwitchTranslationMode:Sm,restorePage:si,retryFailedParagraphs:F7,switchTranslationMode:Jm,toggleTranslatePage:ym,toggleTranslateTheMainPage:O7,toggleTranslateTheWholePage:z7,toggleTranslationMask:vm,toggleVideoSubtitlePreTranslation:q7,translatePage:Tn,translatePageWithTranslationService:R7,translateTheMainPage:af,translateTheWholePage:M9,translateToThePageEndImmediately:B9,toggleTranslateToThePageEndImmediately:N7,updateGlobalContext:Km,getPureGlobalContext:U7});async function R9(t){if(!t){let n=await an();t=await hn({config:n,url:Ee()})}if(t.config.debug?B.setLevel("debug"):B.setLevel("info"),!t.isTranslateExcludeUrl){if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){if(t.rule.isInjectMeta){try{let n=await Gl("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=wo(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){B.warn("inject meta failed",n)}if(t.rule.isInjectOptionsUrl){let n=Ii(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject options url failed",a)}}if(t.rule.isInjectVersion){let n=Nt(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject version failed",a)}}}}else await nd();He()||await Xv().catch(n=>{B.error(`init popup page error: ${n}`)}),He()||Xy()}await I9()}d();var Qs={capture:!0,once:!0,passive:!0},N9=()=>document.readyState==="interactive"||document.readyState==="complete",H7=t=>document.readyState===t,Js=(t,e)=>H7(t)||N9()?(e(t),!0):!1,W7=()=>new Promise(t=>{Js("loading",t)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&t("loading")},Qs)}),K7=()=>new Promise(t=>{Js("interactive",t)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&t("interactive")},Qs)}),G7=()=>new Promise(t=>{Js("complete",t)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t("complete")},Qs)}),O9=()=>new Promise(t=>{Js("domready",t)||document.addEventListener("DOMContentLoaded",()=>{t("domready")},Qs)}),z9=()=>new Promise(t=>{Js("load",t)||window.addEventListener("load",()=>{t("load")},Qs)}),U9={};Object.defineProperties(U9,{state:{get:function(){return document.readyState}},loading:{get:function(){return W7()}},interactive:{get:function(){return K7()}},complete:{get:function(){return G7()}},window:{get:function(){return z9()}},load:{get:function(){return z9()}},domready:{get:function(){return O9()}},dom:{get:function(){return O9()}},ready:{get:function(){return N9()}}});var q9=U9;d();d();var j9={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function V7(t){return()=>Promise.resolve().then(()=>t()).catch(e=>{throw e})}function $7(t){if(typeof t!="function")throw new Error(j9.NOT_FUNCTION)}var of=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:e=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:i=1,backoffMaxInterval:o,message:s=""}={}){this._interval=e,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=i,this._backoffMaxInterval=o||n,this.start=+Date.now()}tryEvery(e){return this._interval=e,this}stopAfter(e){return this._timeout=e,this}execute(e){return this._applyPromiseHandlers(),$7(e),this._executeFn=V7(e),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(e){return this._stopOnFailure=e,this}_applyPromiseHandlers(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let e=this._interval,n=e*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),e)}_failedToWait(){let e=`${j9.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(e=`${e}: ${this._userMessage}`),this._lastError){this._lastError.message=`${e} +`).reverse(),s=tt()?o[0]||o[1]:o[0];return B.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else B.debug("Cursor is not within a text node.")}}return!1}function b7(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function w9(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function T7(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function S9(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function y7(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function v7(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function S7(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function x7(t,e){id(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var E7=[y7.bind(null,["plain"])];function C7(t){let e;id(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function id(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function w7(t){if(id(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function D9(t,e,n){await w7(e),await Aa(50);let r=t.rule.inputConfig,a=T7(n,e);try{r?.clearContentEnable&&C7(e),await Aa(50),r?.execCommandDeleteEnable&&!Ir()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),B.debug("clearContent",Da(e))}catch(i){B.error(i)}for(let i of[...E7,S7,x7,v7]){await i(a,e);let o=D7();if(!o)return;if(B.debug("setContent",i.name,S9(a,o),Da(o),a),S9(a,o))break}}function D7(){return document.activeElement}function A9(t){ot("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function A7(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function k7(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Gu,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{L7()},100),new Promise(p=>{let m=p;if(o){let A=o.shadowRoot;if(!A)return;s=A.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),O=s.querySelector(`.${i}`),_=s.querySelector(`.${a}`)}else{let A=document.createElement("div");A.setAttribute("translate","no"),A.className="no-translate immersive-translate-error-modal-input-shadow-root",A.id=e,A.style.all="initial",A.style.zIndex="2147483647",document.body.appendChild(A);let v=A.attachShadow({mode:"open"}),O=document.createElement("style"),_=Me();O.textContent=_.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let k=document.createElement("div");k.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(k);let N=document.createElement("span");N.textContent="\xD7",N.className=Q+"-close",k.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",k.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",k.appendChild(c),l=document.createElement("div"),l.className=i,k.appendChild(l),v.appendChild(s),N.onclick=function(){I(),p("close")},v.addEventListener("click",z=>{z.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",L);let g=kt.bind(null,t);u.innerHTML=`
${vc} ${g("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=g("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=Ye.sanitize(g("disableInputTranslationTips",{option:`${g("option")}`,learnMore:`${g("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:g("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:g("disableOnce")},{id:"disable-global",value:"global",text:g("disableGlobal")}];for(let A=0;Al===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:_7,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=rf(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=rf(s.denyUrls)),s?.allowUrls&&(u.allowUrls=rf(s.allowUrls)),u.release=`${n}@${e}`,Na.init(u),sd()}catch{}}async function sd(){try{let t=await Mt.get(Ft,null);if(!Ys||!t)return;Na.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function P9(t,e){try{if(!Ys)return;Na.setContext(t,e)}catch{}}function L9(t){try{if(!Ys)return;Na.setTags(t)}catch{}}function rf(t){return t.map(e=>new RegExp(e))}var fe=null,ud={},Co,_9=!1;async function td(){Mi.clearStrictTicks();let t=await We(Ee(),{}),e=await fs();if(B.debug("init page ctx",t),cy(t),t.rule.pageType=="subtitleBuilder"){Xm();return}if(t.rule.pageType=="ebookBuilder"){h9();return}if(Co||(Co=t.state.translationTheme),t.rule.urlChangeDelay&&await vr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await j7(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=Ii(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){B.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&gT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){Tn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&dt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let g=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(g)try{let h=g.split(".")[0],E=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${E}-${D}-27`),I=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}_9||(_9=!0,He()&&t.rule.useIframePostMessage&&await o1());let n=t.sourceLanguage;n==="auto"?n=await F9():qn(n);let r=r2(t,n);if(r&&(t=await We(Ee(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await Gl(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=Do(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){B.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(B.debug(`detect page language: ${t.url} ${n}`),na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||u1(n,t.config.translationLanguagePattern)&&(o=!0,B.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&as(e)&&vo(t,window),o)fe.state.isAutoTranslate=!0,Tn(fe);else if(B.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(na(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(ud[t.translationService]||(ud[t.translationService]=!0,He()||Sg(t).catch(s=>{B.warn("init translation engine error",s)})))}}async function ym(t){if(Qe()==="Original"){let e={};Co&&(e.translationTheme=Co),fe&&(e={...fe.state,...e});let n=await We(Ee(),e);if(t?.trigger=="right_menu"&&Ga(n?.rule)){let r=ra(n.rule);Oi(!0,r||Ee());return}await Tn(fe,t)}else(Qe()==="Translated"||Qe()==="Error")&&si()}async function F7(){if(fe=await We(Ee(),{}),fe.rule.pageType=="ebookBuilder")return b9(fe);if(fe.rule.pageType=="subtitleBuilder")return f9(fe);hy()}async function vm(t){if(Qe()==="Original"){fe=await We(Ee(),{}),Co||(Co=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await We(Ee(),{translationTheme:e}),await Tn(fe,t)}else if(Qe()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=Z1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=qi(i,Di,!0);a==="mask"||a==="opacity"?o!=="none"?lt(i,Di,"none",!0):lt(i,Di,e,!0):o!=="mask"&&o!=="opacity"?lt(i,Di,e,!0):lt(i,Di,"none",!0)}}}async function F9(){let t=await We(Ee(),{});return t.rule.pageType=="subtitleBuilder"?Xm():fy(t)}function M7(t){Qe()==="Original"?k9(t):ti()}function B7(t){Qe()==="Original"?m9(t):ef()}function I7(t){Qe()==="Original"?ho(t):ti()}async function si(){zi(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await We(Ee(),{});if(t.rule.pageType=="subtitleBuilder"){ef();return}else t.rule.pageType=="ebookBuilder"&&T9();ti()}async function Tn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&od(t.config?.sentryConfig);let n=Qe(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};P9("translatePage",r),L9(r),n!=="Original"&&await si(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),ud[t.translationService]||(ud[t.translationService]=!0,He()||Sg(t).catch(i=>{B.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),ot("translage_page_daily",[{name:"translage_page_daily",params:a}],t),ot("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:vt()}),t.rule.pageType=="subtitleBuilder"){B7(t),zi("yes");return}if(t.rule.pageType=="ebookBuilder"){y9(t),zi("yes");return}if(t.rule.pageType==="pdfReader"){M7(t),zi("yes");return}I7(t),zi("yes")}async function R7(t,e){let n=fe?.translationService;if(Qe()==="Original"||n!=t){fe=await We(Ee(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);nu({text:r}),await Tn(fe,e)}else{si();let r=await an(),a={url:Ee(),config:r,state:{}},i=await hn(a);fe=await We(Ee(),{translationService:i.translationService})}}async function O7(t){Qe()==="Original"?await af(t):(Qe()==="Translated"||Qe()==="Error")&&(fe=await We(Ee(),{}),fe.state.translationArea!=="main"?await af(t):si())}async function af(t){fe=await We(Ee(),{translationArea:"main"}),await Tn(fe,t)}async function M9(t){fe=await We(Ee(),{translationArea:"body"}),await Tn(fe,t)}async function Sm(t){let e=await We(Ee(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await We(Ee(),{translationMode:n}),Qe()==="Original"){Tn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function Jm(t){if(fe=await We(Ee(),{translationMode:t}),ot("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),Qe()==="Original"){Tn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function z7(t){if(Qe()==="Original")await M9(t);else if(Qe()==="Translated"||Qe()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await We(Ee(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await We(Ee(),fe.state),await Tn(fe,t)):si()}}async function B9(t){fe=await We(Ee(),{translationStartMode:"immediate"}),await Tn(fe,t)}async function N7(t){Qe()==="Original"?await B9(t):(Qe()==="Translated"||Qe()==="Error")&&si()}async function I9(){let t=await We(Ee(),{});if(!dt(t.url,t.config.inputStyleBlockUrls)){let n=Me().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;En(document,n,"immersive-translate-input-injected-css")}t.rule.pageType&&t.rule.pageType!=="html"||t.config.enableInputTranslation&&nf(t)}function U7(){return fe}async function We(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await hn(r)}else{let r=await an(),a=e;n.length===0&&(a=void 0),fe=await hn({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function q7(){let t=await fn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await mn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?nu({text:kt(fe,"videoSubtitlePreTranslationOn")}):nu({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Km(){let t=await an(),e=await fs(),n;fe&&fe.state&&(n=fe.state);let r={url:Ee(),config:t,state:n},a=await hn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,im(fe);let i=Hs(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{Vs(a,s),as(e)&&vo(a,s),nf(a)}),a}function j7(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function l9(t){let e=t.detail,n=fn();await Ov(e.token,n,mn),Mt.set(Ft,e);let r=await Mt.get(W0,!1);Mt.set(W0,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),sd()}function c9(t){B.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),sd()}async function d9(t){let e=await fn();if(e.translationService)return;let n=t.config.translationService,r=await Zm(t,n);if(t.translationService!==r){if(!r){ls([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,mn(e),t.translationService=r,ls([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function p9(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await fn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),mn(i)}async function Zm(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await uT(r,t)}async function g9(t){let e=await fn();e.translationService=t,await mn(e);let n=await We(Ee(),{});n.translationService=t,await Tn(n)}z3({detectCurrentPageLanguage:F9,ensureSwitchTranslationMode:Sm,restorePage:si,retryFailedParagraphs:F7,switchTranslationMode:Jm,toggleTranslatePage:ym,toggleTranslateTheMainPage:O7,toggleTranslateTheWholePage:z7,toggleTranslationMask:vm,toggleVideoSubtitlePreTranslation:q7,translatePage:Tn,translatePageWithTranslationService:R7,translateTheMainPage:af,translateTheWholePage:M9,translateToThePageEndImmediately:B9,toggleTranslateToThePageEndImmediately:N7,updateGlobalContext:Km,getPureGlobalContext:U7});async function R9(t){if(!t){let n=await an();t=await hn({config:n,url:Ee()})}if(t.config.debug?B.setLevel("debug"):B.setLevel("info"),!t.isTranslateExcludeUrl){if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){if(t.rule.isInjectMeta){try{let n=await Gl("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=Do(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){B.warn("inject meta failed",n)}if(t.rule.isInjectOptionsUrl){let n=Ii(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject options url failed",a)}}if(t.rule.isInjectVersion){let n=Ut(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){B.warn("inject version failed",a)}}}}else await td();He()||await Xv().catch(n=>{B.error(`init popup page error: ${n}`)}),He()||Xy()}await I9()}d();var Qs={capture:!0,once:!0,passive:!0},N9=()=>document.readyState==="interactive"||document.readyState==="complete",H7=t=>document.readyState===t,Js=(t,e)=>H7(t)||N9()?(e(t),!0):!1,W7=()=>new Promise(t=>{Js("loading",t)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&t("loading")},Qs)}),K7=()=>new Promise(t=>{Js("interactive",t)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&t("interactive")},Qs)}),G7=()=>new Promise(t=>{Js("complete",t)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&t("complete")},Qs)}),O9=()=>new Promise(t=>{Js("domready",t)||document.addEventListener("DOMContentLoaded",()=>{t("domready")},Qs)}),z9=()=>new Promise(t=>{Js("load",t)||window.addEventListener("load",()=>{t("load")},Qs)}),U9={};Object.defineProperties(U9,{state:{get:function(){return document.readyState}},loading:{get:function(){return W7()}},interactive:{get:function(){return K7()}},complete:{get:function(){return G7()}},window:{get:function(){return z9()}},load:{get:function(){return z9()}},domready:{get:function(){return O9()}},dom:{get:function(){return O9()}},ready:{get:function(){return N9()}}});var q9=U9;d();d();var j9={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function $7(t){return()=>Promise.resolve().then(()=>t()).catch(e=>{throw e})}function V7(t){if(typeof t!="function")throw new Error(j9.NOT_FUNCTION)}var of=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:e=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:i=1,backoffMaxInterval:o,message:s=""}={}){this._interval=e,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=i,this._backoffMaxInterval=o||n,this.start=+Date.now()}tryEvery(e){return this._interval=e,this}stopAfter(e){return this._timeout=e,this}execute(e){return this._applyPromiseHandlers(),V7(e),this._executeFn=$7(e),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(e){return this._stopOnFailure=e,this}_applyPromiseHandlers(){this.promise=new Promise((e,n)=>{this.resolve=e,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let e=this._interval,n=e*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),e)}_failedToWait(){let e=`${j9.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(e=`${e}: ${this._userMessage}`),this._lastError){this._lastError.message=`${e} ${this._lastError.message}`;let n=this.originalStacktraceError.stack;n&&(this._lastError.stack+=n.substring(n.indexOf(` -`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=e;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(e=>{if(e===!1){this._log(`then execute again with result: ${e}`),this._executeAgain();return}this.resolve?.(e),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${e}`)}).catch(e=>this._stopOnFailure?(this._log(`stopped on failure with err: ${e}`),this.reject?.(e)):(this._lastError=e,this._log(`catch with err: ${e}`),this._executeAgain()))}_log(e){this._verbose&&this._Console&&this._Console.log&&this._Console.log(e)}},H9=(t,e)=>new of(e).execute(t);async function W9(t){try{let e=t.config.domReadyDetectTimeout;return await H9(()=>{let r=t.mainFrame.innerText||"";if(Ni(r,t.rule.mainFrameMinTextCount,t.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:e!==void 0?e:3e3}),!0}catch(e){if(He())throw e;return B.debug("check dom element ready failed:",e,t),!0}}d();function K9(){let t=document.querySelector("meta[name=immersive-translate-options]");return!!(t&&t.getAttribute("content")==="true")}d();async function V9(){if(!document.getElementById("immersive-translate-status")){B.error("Could not find status element");return}await G9("local"),await G9("sync"),Q7();let e=document.getElementById("immersive-translate-page-ready");e&&setTimeout(()=>{e.value="true",e.dispatchEvent(new Event("change"))},100)}async function Y7(t,e){let n;try{n=JSON.parse(t.detail)}catch(a){B.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},i=await e(a),o={id:r,ok:!0,data:i};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...o,type:"answer"})}))}catch(a){let i={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...i,id:r,type:"answer"})}))}}function Q7(){document.addEventListener(Hu,r=>{let a=r;if(B.debug("document message",a),a&&a.detail){let i;try{i=JSON.parse(a.detail)}catch(o){B.error("parse detail failed",o);return}i.type==="ask"?i.method==="request"&&Y7(a,ce):i.type==="tell"&&i.method==="updateCommands"&&_l(i.data)}});let t=document.getElementById("immersive-translate-manifest");if(!t){B.error("Could not find manifest element");return}let e=oe.runtime.getManifest();et()&&(e._isSafari=!0),t.value=JSON.stringify(e),t.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){B.error("parse message error",a)}})}async function G9(t){let e=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${t}-storage`);if(n){B.debug("init storage");let r=await oe.storage[t].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let i=JSON.parse(a.target.value);oe.storage[t].set(i)}catch(i){B.error("save to storage error",i)}}),n.addEventListener("refresh-"+t,async a=>{let i=await oe.storage[t].get(null);n.value=JSON.stringify(i),B.debug("refresh ",t,"storage")})}else{B.error(`Could not find storage ${t} element`),e.innerText="Could not find storage local input element";return}}var $9=["textarea","input","button","select","option","iframe","strong","form","body"];async function J7(){let t=await Pn();t.sentryConfig?.contentInitTime=="init"&&sd(t.sentryConfig),t.excludeTranslationHtmlTags&&($9=t.excludeTranslationHtmlTags),Ye.addHook("beforeSanitizeElements",function(r,a,i){let o=(r.nodeName||"").toLowerCase();if($9.includes(o)){let u=`<${o}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ye.addHook("uponSanitizeElement",function(r,a){let i=r.nodeName||"";/\d+$/.test(i)&&(a.allowedTags[a.tagName]=!0)});let e=Ee(),n=await hn({config:t,url:e});it("init_page_daily",[{name:"init_page_daily"}],n),q9.domready.then(()=>{if(n.isTranslateExcludeUrl&&K9())B.debug("detect web options page"),$s(n,window),V9();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Nt(),i=document.createElement("meta");i.name="immersive-translate-version",i.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(i)}catch(o){B.warn("inject version failed",o)}}if(dt(n.url,n.config.blockUrls))return;$s(n,window),W9(n).then(()=>{R9(n).catch(a=>{a&&B.debug("translate page error",a.name,a.message,a)})}).catch(a=>{B.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&B.debug("translate dom ready detect error",r)})}J7().catch(t=>{B.debug("init error",t)});})(); +`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=e;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(e=>{if(e===!1){this._log(`then execute again with result: ${e}`),this._executeAgain();return}this.resolve?.(e),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${e}`)}).catch(e=>this._stopOnFailure?(this._log(`stopped on failure with err: ${e}`),this.reject?.(e)):(this._lastError=e,this._log(`catch with err: ${e}`),this._executeAgain()))}_log(e){this._verbose&&this._Console&&this._Console.log&&this._Console.log(e)}},H9=(t,e)=>new of(e).execute(t);async function W9(t){try{let e=t.config.domReadyDetectTimeout;return await H9(()=>{let r=t.mainFrame.innerText||"";if(Ni(r,t.rule.mainFrameMinTextCount,t.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:e!==void 0?e:3e3}),!0}catch(e){if(He())throw e;return B.debug("check dom element ready failed:",e,t),!0}}d();function K9(){let t=document.querySelector("meta[name=immersive-translate-options]");return!!(t&&t.getAttribute("content")==="true")}d();async function $9(){if(!document.getElementById("immersive-translate-status")){B.error("Could not find status element");return}await G9("local"),await G9("sync"),Q7();let e=document.getElementById("immersive-translate-page-ready");e&&setTimeout(()=>{e.value="true",e.dispatchEvent(new Event("change"))},100)}async function Y7(t,e){let n;try{n=JSON.parse(t.detail)}catch(a){B.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},i=await e(a),o={id:r,ok:!0,data:i};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...o,type:"answer"})}))}catch(a){let i={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(Wu,{detail:JSON.stringify({...i,id:r,type:"answer"})}))}}function Q7(){document.addEventListener(Hu,r=>{let a=r;if(B.debug("document message",a),a&&a.detail){let i;try{i=JSON.parse(a.detail)}catch(o){B.error("parse detail failed",o);return}i.type==="ask"?i.method==="request"&&Y7(a,ce):i.type==="tell"&&i.method==="updateCommands"&&_l(i.data)}});let t=document.getElementById("immersive-translate-manifest");if(!t){B.error("Could not find manifest element");return}let e=oe.runtime.getManifest();tt()&&(e._isSafari=!0),t.value=JSON.stringify(e),t.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){B.error("parse message error",a)}})}async function G9(t){let e=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${t}-storage`);if(n){B.debug("init storage");let r=await oe.storage[t].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let i=JSON.parse(a.target.value);oe.storage[t].set(i)}catch(i){B.error("save to storage error",i)}}),n.addEventListener("refresh-"+t,async a=>{let i=await oe.storage[t].get(null);n.value=JSON.stringify(i),B.debug("refresh ",t,"storage")})}else{B.error(`Could not find storage ${t} element`),e.innerText="Could not find storage local input element";return}}var V9=["textarea","input","button","select","option","iframe","strong","form","body"];async function J7(){let t=await Pn();t.sentryConfig?.contentInitTime=="init"&&od(t.sentryConfig),t.excludeTranslationHtmlTags&&(V9=t.excludeTranslationHtmlTags),Ye.addHook("beforeSanitizeElements",function(r,a,i){let o=(r.nodeName||"").toLowerCase();if(V9.includes(o)){let u=`<${o}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ye.addHook("uponSanitizeElement",function(r,a){let i=r.nodeName||"";/\d+$/.test(i)&&(a.allowedTags[a.tagName]=!0)});let e=Ee(),n=await hn({config:t,url:e});ot("init_page_daily",[{name:"init_page_daily"}],n),q9.domready.then(()=>{if(n.isTranslateExcludeUrl&&K9())B.debug("detect web options page"),Vs(n,window),$9();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Ut(),i=document.createElement("meta");i.name="immersive-translate-version",i.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(i)}catch(o){B.warn("inject version failed",o)}}if(dt(n.url,n.config.blockUrls))return;Vs(n,window),W9(n).then(()=>{R9(n).catch(a=>{a&&B.debug("translate page error",a.name,a.message,a)})}).catch(a=>{B.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&B.debug("translate dom ready detect error",r)})}J7().catch(t=>{B.debug("init error",t)});})(); /*! * Toastify js 1.12.0 * https://github.com/apvarun/toastify-js diff --git a/dist/firefox/content_start.js b/dist/firefox/content_start.js index 0792161..351dabb 100644 --- a/dist/firefox/content_start.js +++ b/dist/firefox/content_start.js @@ -1,4 +1,4 @@ -(()=>{var nu=Object.defineProperty;var qn=(t,e)=>{for(var r in e)nu(t,r,{get:e[r],enumerable:!0})};var b={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var nu=Object.defineProperty;var qn=(t,e)=>{for(var r in e)nu(t,r,{get:e[r],enumerable:!0})};var b={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -5162,7 +5162,7 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda {{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Us,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...Rs,{type:"password",name:"apikey",required:!0}],props:Rs},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},TD={type:V+"ChildFrameToRootFrameIdentifier"};var vD=Je()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general";var Ft="user_info",yD=Je()||St()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",js=Je()||St()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",SD=js+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xD=js+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Fm=Je()||St()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Ha=Je()||St()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",Bm=Je()||St()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",Im=Je()||St()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",zm=Je()||St()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",wD=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",AD=Bm+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",DD=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Ws=Ha+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Ks=Im+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Gs=zm+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Vs=Fm+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true";var $s=Oe().TRANSLATE_FILE_URL,ED=$s+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",_D=$s+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var cr=console,ja=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let r=performance.now(),n=Math.round(r-this.#e),a=Ye.green;n>1e4?a=Ye.red:n>1e3&&(a=Ye.yellow),cr.debug(Ye.dim(Vt+" TIMING:"),e,"in",a(n+"ms")),this.#e=r}},Hr=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&cr.log(Ye.dim(Vt+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&cr.log(Ye.green(Vt+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&cr.warn(Ye.yellow(Vt+" WARN:"),...e)}error(...e){this.#e<=3&&cr.error(Ye.red(Vt+" ERROR:"),...e)}fatal(...e){this.#e<=4&&cr.error(Ye.red(Vt+" FATAL:"),...e)}timing(){return this.level===0?new ja:{reset:()=>{},stop:()=>{}}}},$e=new Hr;function Sn(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let r=yn.map(a=>a.toLowerCase()),n=r.indexOf(e);if(n===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=r.indexOf(e);return a===-1?"auto":yn[a]}else return"auto";else return yn[n]}function dr(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}var Qs=V+"SyncStoreKey_";function Bt(t,e){let r=Qs+t;return se.storage.sync.get(r).then(n=>n[r]===void 0?e:n[r])}function pr(t,e){let r=Qs+t;return se.storage.sync.set({[r]:e})}var Mm=V+"StoreKey_";function jr(t,e){let r=Mm+t;return se.storage.local.get(r).then(n=>n[r]===void 0?e:n[r])}var Qt=V+"CacheKey_";function Om(t,e){let r=Qt+t;return se.storage.local.get(r).then(n=>n[r]===void 0?e:n[r])}function Rm(){let t=se.storage.local.refresh;t&&t()}function Nm(t,e){let r=Qt+t;return se.storage.local.get(r).then(n=>{if(n[r]===void 0)return e;let{value:a,expired:i}=n[r];return i&&in.startsWith(Qt)).filter(n=>n!==Qt+Ft);if(r.length>0)return se.storage.local.remove(r)}}var mr={get:Om,set:Um,getExpired:Nm,setExpired:qm,remove:Hm,clear:jm,refresh:Rm};function Wm(t,e){let r=t;return e&&Object.keys(e).forEach(n=>{let a=e[n];if(a===void 0)return;let i=Gm(n);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let l=`<${n}>`,s=r.indexOf(l);if(s!==-1){let u=o.tag||"a",c=r.indexOf(``);if(c!==-1){let d=r.substring(s+l.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");r=r.replace(`${l}${d}`,`<${u} ${g}>${d}`)}}}else if(a){let o=new RegExp("{"+n+"}","gm");r=r.replace(o,a.toString())}}),r}function Ys(t,e,r){let n=t[e];if(!n)return r;if(!r)return"";let a=r.split("."),i="";do{i+=a.shift();let o=n[i];o!==void 0&&(typeof o=="object"||!a.length)?(n=o,i=""):a.length?i+=".":n=r}while(a.length);return n}function Km(t,e,r,n,a){if(!t.hasOwnProperty(r))return e;let i=Ys(t,r,e);return i===e&&r!==n&&(i=Ys(t,n,e)),Wm(i,a)}function Gm(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function It(t,e,r){return Km(qr,e,t.config.interfaceLanguage,"en",r)}function Xs(t,e){let r=new Date(t),n=r.getFullYear().toString(),a=(r.getMonth()+1).toString().padStart(2,"0"),i=r.getDate().toString().padStart(2,"0"),o=r.getHours().toString().padStart(2,"0"),l=r.getMinutes().toString().padStart(2,"0"),s=r.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",n).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",l).replace("ss",s)}function Zs(t){return new Date(t).getTime()}var zt=class extends Error{status;constructor(e,r){if(e&&r){super(r),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let r=null;if(r=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!r){let n=It.bind(null,e),a=this.getErrorMsg();r={type:"error",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:a}),action:"changeService"}}return r}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let r=It.bind(null,e),n=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(n||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let r=It.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:r("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+r("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let r=It.bind(null,e),n="retry",a="network",i=r("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${r("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${r("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${r("error.openAIExceededQuota")}

${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${r("error.gemini.429")}

${o}`:o=`${r("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${r("error.claude.403")}

${o}`:o=`${r("error.403")}

${o}`:this.status===400?o=`${r("error.400")}

${o}`:this.status===502?o=`${r("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${r("error.subscriptionExpired")}

${o}`,n="setting",a="configError",i=r("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:n}}handleFetchError(e){let r=It.bind(null,e);if(this.status!==-999)return;let n=this.getErrorMsg();return{type:"network",title:"",errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:n}),action:"changeService"}}handleProUser(e){let r=It.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:r("upgradeToProErrorTitle"),errMsg:r("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:r("notLoginPro"),errMsg:r("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let r=It.bind(null,e);this.message=this.message.replace("ProQuota:","");let n=this.message;try{n=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:l,subscriptionTo:s}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let d=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=r("errorReason",{message:n});if(i=="onetime_7day")m+=r("proQuotaExceededError.onetime7day",{anotherService:d,brandId:ke,href:Ws});else{let T="";g=="OpenAI"?T=Ks:T=Gs,o?m+=r("proQuotaExceededError.trial",{anotherService:d,brandId:ke,href:Vs}):m+=r("proQuotaExceededError.nonTrial",{anotherService:d,brandId:ke,href:T,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||Zs(s)>l)&&(m+=r("proQuotaExceededError.resetTime",{resetTime:Xs(l,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function el(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Kn(Js.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(r){throw r&&r.name==="RetryError"&&r.cause?r.cause:r}else e=await Js(t);return e}async function Js(t){t.body;let{url:e,responseType:r,...n}=t;r||(r="json"),n={mode:"cors",...n};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let s=new AbortController,u=s.signal;setTimeout(()=>{s.abort()},o),n.signal=u}let l;try{l=await i(e,n)}catch(s){$e.debug("fetch error",e,s);let u=s.message||"Unknown Error";throw new zt("fetchError",u).initNetWork(-999).initStack(s.stack)}if(l.ok&&l.status>=200&&l.status<400){if(r==="json")return await l.json();if(r==="text")return await l.text();if(r==="raw"){let s=await l.text(),u=Object.fromEntries([...l.headers.entries()]),c=l.url;return c||(l.headers.get("X-Final-URL")?c=l.headers.get("X-Final-URL"):c=e),{body:s,headers:u,status:l.status,statusText:l.statusText,url:c}}else if(r==="stream"){let s="",u;if(l.body&&l.body instanceof ReadableStream)for await(let c of Vm(l.body)){let d=new TextDecoder().decode(c);s+=d;let g;for(;(g=s.indexOf(` -`))>=0;){let m=s.slice(0,g).trim();if(s=s.slice(g+1),m.startsWith("event:")||m==="")continue;let T="";if(m.startsWith("data:")&&(T=m.slice(5).trim()),T==="[DONE]")break;let j;try{j=JSON.parse(T??"")}catch(k){$e.debug("json error",k);continue}u=j}}return u}}else{let s;try{s=await l.text()}catch(m){$e.error("parse response failed",m)}s&&$e.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),g&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new zt("fetchError",c).initNetWork(l.status)}}async function*Vm(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}var $m=new Map;function tl(t){let e=Qm(64),r=new CustomEvent(Ns,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((n,a)=>{$m.set(e,(i,o)=>{i?a(i):n(o)})})}function Qm(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var Xm="";function Wr(){return Xm||rl.version}function xn(){try{let t=[Oe().EBOOK_BUILDER_URL,Oe().EBOOK_VIEWER_URL,Oe().SUBTITLE_BUILDER_URL,Oe().HTML_VIEWER_URL,Oe().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Je()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var Kr=new Map,Gr=class{fromType;logger;constructor(e,r=!1){this.logger=new Hr,r&&this.logger.setLevel("debug"),this.fromType=e,Kr.has(e)||(Kr.set(e,new Map),se.runtime.onMessage.addListener((n,a,i)=>{let o=n.from,l=n.to,s,u,c;a.tab&&a.tab.id&&(s=a.tab.id,o=`${o}:${s}`,u=a.tab.url,c=a.tab.active),this.logger.debug(`${n.to} received message [${n.payload.method}] from ${n.from}`,n.payload.data?n.payload.data:" ");let d=Ka(l),{type:g,name:m}=d;if(g!==e)return!1;let T=Ka(o),k=Kr.get(g).get(m);if(!k)return this.logger.debug(`no message handler for ${g}:${l}, but it's ok`),!1;let{messageHandler:h,sync:Q}=k,P={type:e,name:T.name,id:s,url:u,active:c};if(Q){try{let $=h(n.payload,P);i({ok:!0,data:$})}catch($){i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.details,errorStatus:$.status})}return!1}else return h(n.payload,P).then($=>{i({ok:!0,data:$})}).catch($=>{i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.message,errorStatus:$.status})}),!0}))}getConnection(e,r,n){let a=!1;n&&n.sync&&(a=!0);let i=this.fromType,o=Kr.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Wa(`${i}:${e}`,this.logger);return Kr.get(i).set(e,{messageHandler:r,sync:a,connectionInstance:l}),l}}},Wa=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let n=Ka(e),{type:a,id:i}=n;if(a!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await se.runtime.sendMessage(o);return nl(o,l,this.logger)}catch(l){if(a==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await se.tabs.sendMessage(i,o);return nl(o,l,this.logger)}}};function nl(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new zt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new zt("noResponse","Unknown error")}function Ka(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let n=parseInt(e[2]);if(!isNaN(n))r.id=n;else throw new Error("tab id not a valid number")}return r}var Zm="";function Ga(){return Zm||globalThis.navigator.userAgent}function al(){return Ga().includes("ImtFxiOS")}function Jm(){return Ga().includes("ImtFxAndroid")}function Va(){let t=Ga();if(al()||Jm()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),n=r[0];return r[2]&&(n+="_"+r[2]),{name:n,version:r[1]}}}return null}var wn;function $a(){return wn||(wn=new Gr("content_script",!1).getConnection("pure_main",()=>{}),wn)}var il="G-MKMD9LWFTR";async function sl(t){try{let e=Oe(),r=e.INSTALL_FROM==="firefox_store";if(Va()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let a=Ge(),i=xn(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Bt("fakeUserId","");s||(s=await jr("fakeUserId",""),s&&await pr("fakeUserId",s));let u=Wr(),c=new Date,d=await Bt("installedAt","");d||(d=await jr("installedAt",""),d&&await pr("installedAt",d)),s?d||(d=new Date(0).toISOString(),await pr("installedAt",d)):(s=eg(32),await pr("fakeUserId",s)),d||(d=c.toISOString(),await pr("installedAt",d));let g=new Date(d),m=ol(g),T=ol(c),j=m===T,k=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${il}&api_secret=${l}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${il}&api_secret=${l}`);let Q="";typeof navigator<"u"&&(Q=window.navigator.userAgent);let P=nn.parse(Q),$=t.map(A=>{let f=A.params||{};if(P.os&&(f.os_name=P.os.name||"unknown",f.os_version=P.os.version||"unknown",f.os_version_name=P.os.versionName||"unknown"),P.browser){f.browser_name=P.browser.name||"unknown",f.browser_version=P.browser.version||"unknown";let y=Va();y&&(f.browser_name=y.name,f.browser_version=y.version)}return P.platform&&(f.platform_type=P.platform.type||"unknown"),P.engine&&(f.engine_name=P.engine.name||"unknown",f.engine_version=P.engine.version||"unknown"),u&&(f.version=u),e.INSTALL_FROM&&(f.install_from=e.INSTALL_FROM),m&&(f.install_day=tg(g)),f.userscript=a.toString(),j?f.is_new_user_today="1":f.is_new_user_today="0",k?f.is_new_user_this_week="1":f.is_new_user_this_week="0",i?f.main_frame=0:f.main_frame=1,{...A,params:f}}),oe=await ng({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:$})})}catch{}}function eg(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} +`))>=0;){let m=s.slice(0,g).trim();if(s=s.slice(g+1),m.startsWith("event:")||m==="")continue;let T="";if(m.startsWith("data:")&&(T=m.slice(5).trim()),T==="[DONE]")break;let j;try{j=JSON.parse(T??"")}catch(k){$e.debug("json error",k);continue}u=j}}return u}}else{let s;try{s=await l.text()}catch(m){$e.error("parse response failed",m)}s&&$e.error("fail response",s);let u="";s&&(u=s.slice(0,500));let c=u,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+u),g&&u.includes("quota exceeded")&&(c="ProQuota:"+u),new zt("fetchError",c).initNetWork(l.status)}}async function*Vm(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}var $m=new Map;function tl(t){let e=Qm(64),r=new CustomEvent(Ns,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(r),new Promise((n,a)=>{$m.set(e,(i,o)=>{i?a(i):n(o)})})}function Qm(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var Xm="";function Wr(){return Xm||rl.version}function xn(){try{let t=[Oe().EBOOK_BUILDER_URL,Oe().EBOOK_VIEWER_URL,Oe().SUBTITLE_BUILDER_URL,Oe().HTML_VIEWER_URL,Oe().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Je()||e.push("localhost:38001");let r=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return r.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}var Kr=new Map,Gr=class{fromType;logger;constructor(e,r=!1){this.logger=new Hr,r&&this.logger.setLevel("debug"),this.fromType=e,Kr.has(e)||(Kr.set(e,new Map),se.runtime.onMessage.addListener((n,a,i)=>{let o=n.from,l=n.to,s,u,c;a.tab&&a.tab.id&&(s=a.tab.id,o=`${o}:${s}`,u=a.tab.url,c=a.tab.active),this.logger.debug(`${n.to} received message [${n.payload.method}] from ${n.from}`,n.payload.data?n.payload.data:" ");let d=Ka(l),{type:g,name:m}=d;if(g!==e)return!1;let T=Ka(o),k=Kr.get(g).get(m);if(!k)return this.logger.debug(`no message handler for ${g}:${l}, but it's ok`),!1;let{messageHandler:h,sync:Q}=k,P={type:e,name:T.name,id:s,url:u,active:c};if(Q){try{let $=h(n.payload,P);i({ok:!0,data:$})}catch($){i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.details,errorStatus:$.status})}return!1}else return h(n.payload,P).then($=>{i({ok:!0,data:$})}).catch($=>{i({ok:!1,errorName:$.name,errorMessage:$.message,errorDetails:$.message,errorStatus:$.status})}),!0}))}getConnection(e,r,n){let a=!1;n&&n.sync&&(a=!0);let i=this.fromType,o=Kr.get(i);if(o.has(e))return o.get(e).connectionInstance;{let l=new Wa(`${i}:${e}`,this.logger);return Kr.get(i).set(e,{messageHandler:r,sync:a,connectionInstance:l}),l}}},Wa=class{from;logger;constructor(e,r){this.from=e,this.logger=r}async sendMessage(e,r){let n=Ka(e),{type:a,id:i}=n;if(a!=="content_script"){let o={to:e,from:this.from,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let l=await se.runtime.sendMessage(o);return nl(o,l,this.logger)}catch(l){if(a==="popup"){let s=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(r)}`;return this.logger.debug(s,r,e,l),Promise.resolve({message:s})}else throw l}}else{let o={from:this.from,to:e,payload:r};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let l=await se.tabs.sendMessage(i,o);return nl(o,l,this.logger)}}};function nl(t,e,r){if(e){if(e.ok)return r.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new zt(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new zt("noResponse","Unknown error")}function Ka(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let r={type:e[0],name:e[1]};if(e[0]==="content_script"){let n=parseInt(e[2]);if(!isNaN(n))r.id=n;else throw new Error("tab id not a valid number")}return r}var Zm="";function Ga(){return Zm||globalThis.navigator.userAgent}function al(){return Ga().includes("ImtFxiOS")}function Jm(){return Ga().includes("ImtFxAndroid")}function Va(){let t=Ga();if(al()||Jm()){let e=t.match(/Imt[\w/.]+/);if(e){let r=e[0].split("/"),n=r[0];return r[2]&&(n+="_"+r[2]),{name:n,version:r[1]}}}return null}var wn;function $a(){return wn||(wn=new Gr("content_script",!1).getConnection("pure_main",()=>{}),wn)}var il="G-MKMD9LWFTR";async function sl(t){try{let e=Oe(),r=e.INSTALL_FROM==="firefox_store";if(Va()?.name?.startsWith("ImtFx")&&(r=!1),r)return;let a=Ge(),i=xn(),o=e.PROD==="1",l="sitc4WmvShWYwfU0dANM3Q",s=await Bt("fakeUserId","");s||(s=await jr("fakeUserId",""),s&&await pr("fakeUserId",s));let u=Wr(),c=new Date,d=await Bt("installedAt","");d||(d=await jr("installedAt",""),d&&await pr("installedAt",d)),s?d||(d=new Date(0).toISOString(),await pr("installedAt",d)):(s=eg(32),await pr("fakeUserId",s)),d||(d=c.toISOString(),await pr("installedAt",d));let g=new Date(d),m=ol(g),T=ol(c),j=m===T,k=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${il}&api_secret=${l}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${il}&api_secret=${l}`);let Q="";typeof navigator<"u"&&(Q=window.navigator.userAgent);let P=nn.parse(Q),$=t.map(A=>{let f=A.params||{};if(P.os&&(f.os_name=P.os.name||"unknown",f.os_version=P.os.version||"unknown",f.os_version_name=P.os.versionName||"unknown"),P.browser){f.browser_name=P.browser.name||"unknown",f.browser_version=P.browser.version||"unknown";let y=Va();y&&(f.browser_name=y.name,f.browser_version=y.version)}return P.platform&&(f.platform_type=P.platform.type||"unknown"),P.engine&&(f.engine_name=P.engine.name||"unknown",f.engine_version=P.engine.version||"unknown"),u&&(f.version=u),e.INSTALL_FROM&&(f.install_from=e.INSTALL_FROM),m&&(f.install_day=tg(g)),f.userscript=a.toString(),j?f.is_new_user_today="1":f.is_new_user_today="0",k?f.is_new_user_this_week="1":f.is_new_user_this_week="0",i?f.main_frame=0:f.main_frame=1,{...A,params:f}}),oe=await ng({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:s,user_id:s,events:$})})}catch{}}function eg(t){let e="",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=r.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 diff --git a/dist/firefox/manifest.json b/dist/firefox/manifest.json index 285ba33..af63b4c 100644 --- a/dist/firefox/manifest.json +++ b/dist/firefox/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "__MSG_brandName__", "description": "__MSG_brandDescription__", - "version": "1.4.4", + "version": "1.4.5", "default_locale": "en", "background": { "scripts": [ diff --git a/dist/firefox/options.js b/dist/firefox/options.js index 8c16487..e67b7ab 100644 --- a/dist/firefox/options.js +++ b/dist/firefox/options.js @@ -1,4 +1,4 @@ -(()=>{var GS=Object.create;var yd=Object.defineProperty;var VS=Object.getOwnPropertyDescriptor;var $S=Object.getOwnPropertyNames;var YS=Object.getPrototypeOf,QS=Object.prototype.hasOwnProperty;var ZS=(e,t)=>()=>(e&&(t=e(e=0)),t);var JS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ol=(e,t)=>{for(var n in t)yd(e,n,{get:t[n],enumerable:!0})},XS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $S(t))!QS.call(e,a)&&a!==n&&yd(e,a,{get:()=>t[a],enumerable:!(r=VS(t,a))||r.enumerable});return e};var eC=(e,t,n)=>(n=e!=null?GS(YS(e)):{},XS(t||!e||!e.__esModule?yd(n,"default",{value:e,enumerable:!0}):n,e));var E,p=ZS(()=>{E={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var GS=Object.create;var bd=Object.defineProperty;var VS=Object.getOwnPropertyDescriptor;var $S=Object.getOwnPropertyNames;var YS=Object.getPrototypeOf,QS=Object.prototype.hasOwnProperty;var ZS=(e,t)=>()=>(e&&(t=e(e=0)),t);var JS=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ol=(e,t)=>{for(var n in t)bd(e,n,{get:t[n],enumerable:!0})},XS=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $S(t))!QS.call(e,a)&&a!==n&&bd(e,a,{get:()=>t[a],enumerable:!(r=VS(t,a))||r.enumerable});return e};var eC=(e,t,n)=>(n=e!=null?GS(YS(e)):{},XS(t||!e||!e.__esModule?bd(n,"default",{value:e,enumerable:!0}):n,e));var E,p=ZS(()=>{E={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,35 +4936,35 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var YT=JS((g0,Mu)=>{p();(function(){var e;function t(h){var y,T,b="",x=-1,w;if(h&&h.length)for(w=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,T,b,x,w,L=[],M;if(y=T=b=x=w=0,h&&h.length)for(M=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),L[T]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),w=h.charCodeAt(y+2),L[T]=String.fromCharCode((b&15)<<12|(x&63)<<6|w&63),y+=3);return L.join("")}function r(h,y){var T=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(T>>16);return b<<16|T&65535}function a(h,y){return h<>>32-y}function i(h,y){for(var T=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,w=0,L=h.length;w>>4&15)+T.charAt(x&15);return b}function o(h){var y,T=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,T=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,T=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function f(h,y){var T=y.length,b=Array(),x,w,L,M,C,v,A,D;for(v=Array(Math.ceil(h.length/2)),M=v.length,x=0;x0;){for(C=Array(),L=0,x=0;x0||w>0)&&(C[C.length]=w);b[b.length]=L,v=C}for(A="",x=b.length-1;x>=0;x--)A+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=A.length;xh.length*8?b+=y:b+=T.charAt(M>>>6*(3-L)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",T=!1,b=!0;this.encode=function(x){var w,L,M,C="";for(y=y||"=",x=b?t(x):x,len=x.length,w=0;wlen*8?C+=y:C+=h.charAt(M>>>6*(3-L)&63);return C},this.decode=function(x){var w,L,M,C,v,A,D,S,N,F,P="",O=[];if(!x)return x;w=F=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(w++)),A=h.indexOf(x.charAt(w++)),D=h.indexOf(x.charAt(w++)),S=h.indexOf(x.charAt(w++)),N=v<<18|A<<12|D<<6|S,L=N>>16&255,M=N>>8&255,C=N&255,F+=1,D===64?O[F]=String.fromCharCode(L):S===64?O[F]=String.fromCharCode(L,M):O[F]=String.fromCharCode(L,M,C);while(w>>8^T;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(S){return i(x(S,b),y)},this.b64=function(S){return m(x(S),T)},this.any=function(S,N){return f(x(S,b),N)},this.raw=function(S){return x(S,b)},this.hex_hmac=function(S,N){return i(w(S,N),y)},this.b64_hmac=function(S,N){return m(w(S,N),T)},this.any_hmac=function(S,N,F){return f(w(S,N),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(S){return typeof S=="boolean"&&(y=S),this},this.setPad=function(S){return T=S||T,this},this.setUTF8=function(S){return typeof S=="boolean"&&(b=S),this};function x(S){return S=b?t(S):S,l(L(c(S),S.length*8))}function w(S,N){var F,P,O,z,q;for(S=b?t(S):S,N=b?t(N):N,F=c(S),F.length>16&&(F=L(F,S.length*8)),P=Array(16),O=Array(16),q=0;q<16;q+=1)P[q]=F[q]^909522486,O[q]=F[q]^1549556828;return z=L(P.concat(c(N)),512+N.length*8),l(L(O.concat(z),512+128))}function L(S,N){var F,P,O,z,q,I=1732584193,k=-271733879,_=-1732584194,B=271733878;for(S[N>>5]|=128<>>9<<4)+14]=N,F=0;F16&&(D=L(D,v.length*8)),S=Array(16),N=Array(16),F=0;F<16;F+=1)S[F]=D[F]^909522486,N[F]=D[F]^1549556828;return P=L(S.concat(g(A)),512+A.length*8),u(L(N.concat(P),512+160))}function L(v,A){var D,S,N,F,P,O,z,q,I=Array(80),k=1732584193,_=-271733879,B=-1732584194,H=271733878,j=-1009589776;for(v[A>>5]|=128<<24-A%32,v[(A+64>>9<<4)+15]=A,D=0;D16&&(j=I(j,k.length*8));H<16;H+=1)G[H]=j[H]^909522486,V[H]=j[H]^1549556828;return B=I(G.concat(g(_)),512+_.length*8),u(I(V.concat(B),512+256))}function M(k,_){return k>>>_|k<<32-_}function C(k,_){return k>>>_}function v(k,_,B){return k&_^~k&B}function A(k,_,B){return k&_^k&B^_&B}function D(k){return M(k,2)^M(k,13)^M(k,22)}function S(k){return M(k,6)^M(k,11)^M(k,25)}function N(k){return M(k,7)^M(k,18)^C(k,3)}function F(k){return M(k,17)^M(k,19)^C(k,10)}function P(k){return M(k,28)^M(k,34)^M(k,39)}function O(k){return M(k,14)^M(k,18)^M(k,41)}function z(k){return M(k,1)^M(k,8)^C(k,7)}function q(k){return M(k,19)^M(k,61)^C(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function I(k,_){var B=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,G,V,ie,te,J,ce,he,ae,X,Se,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=M(k,O.length*8));I<32;I+=1)_[I]=k[I]^909522486,B[I]=k[I]^1549556828;return q=M(_.concat(g(z)),1024+z.length*8),u(M(B.concat(q),1024+512))}function M(O,z){var q,I,k,_=new Array(80),B=new Array(16),H=[new C(1779033703,-205731576),new C(-1150833019,-2067093701),new C(1013904242,-23791573),new C(-1521486534,1595750129),new C(1359893119,-1377402159),new C(-1694144372,725511199),new C(528734635,-79577749),new C(1541459225,327033209)],j=new C(0,0),G=new C(0,0),V=new C(0,0),ie=new C(0,0),te=new C(0,0),J=new C(0,0),ce=new C(0,0),he=new C(0,0),ae=new C(0,0),X=new C(0,0),Se=new C(0,0),se=new C(0,0),ue=new C(0,0),ke=new C(0,0),We=new C(0,0),Re=new C(0,0),me=new C(0,0);for(x===void 0&&(x=[new C(1116352408,-685199838),new C(1899447441,602891725),new C(-1245643825,-330482897),new C(-373957723,-2121671748),new C(961987163,-213338824),new C(1508970993,-1241133031),new C(-1841331548,-1357295717),new C(-1424204075,-630357736),new C(-670586216,-1560083902),new C(310598401,1164996542),new C(607225278,1323610764),new C(1426881987,-704662302),new C(1925078388,-226784913),new C(-2132889090,991336113),new C(-1680079193,633803317),new C(-1046744716,-815192428),new C(-459576895,-1628353838),new C(-272742522,944711139),new C(264347078,-1953704523),new C(604807628,2007800933),new C(770255983,1495990901),new C(1249150122,1856431235),new C(1555081692,-1119749164),new C(1996064986,-2096016459),new C(-1740746414,-295247957),new C(-1473132947,766784016),new C(-1341970488,-1728372417),new C(-1084653625,-1091629340),new C(-958395405,1034457026),new C(-710438585,-1828018395),new C(113926993,-536640913),new C(338241895,168717936),new C(666307205,1188179964),new C(773529912,1546045734),new C(1294757372,1522805485),new C(1396182291,-1651133473),new C(1695183700,-1951439906),new C(1986661051,1014477480),new C(-2117940946,1206759142),new C(-1838011259,344077627),new C(-1564481375,1290863460),new C(-1474664885,-1136513023),new C(-1035236496,-789014639),new C(-949202525,106217008),new C(-778901479,-688958952),new C(-694614492,1432725776),new C(-200395387,1467031594),new C(275423344,851169720),new C(430227734,-1194143544),new C(506948616,1363258195),new C(659060556,-544281703),new C(883997877,-509917016),new C(958139571,-976659869),new C(1322822218,-482243893),new C(1537002063,2003034995),new C(1747873779,-692930397),new C(1955562222,1575990012),new C(2024104815,1125592928),new C(-2067236844,-1578062990),new C(-1933114872,442776044),new C(-1866530822,593698344),new C(-1538233109,-561857047),new C(-1090935817,-1295615723),new C(-965641998,-479046869),new C(-903397682,-366583396),new C(-779700025,566280711),new C(-354779690,-840897762),new C(-176337025,-294727304),new C(116418474,1914138554),new C(174292421,-1563912026),new C(289380356,-1090974290),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,-1676669620),new C(1288033470,-885112138),new C(1501505948,-60457430),new C(1607167915,987167468),new C(1816402316,1246189591)]),I=0;I<80;I+=1)_[I]=new C(0,0);for(O[z>>5]|=128<<24-(z&31),O[(z+128>>10<<5)+31]=z,k=O.length,I=0;I>>q|z.h<<32-q,O.h=z.h>>>q|z.l<<32-q}function D(O,z,q){O.l=z.h>>>q|z.l<<32-q,O.h=z.l>>>q|z.h<<32-q}function S(O,z,q){O.l=z.l>>>q|z.h<<32-q,O.h=z.h>>>q}function N(O,z,q){var I=(z.l&65535)+(q.l&65535),k=(z.l>>>16)+(q.l>>>16)+(I>>>16),_=(z.h&65535)+(q.h&65535)+(k>>>16),B=(z.h>>>16)+(q.h>>>16)+(_>>>16);O.l=I&65535|k<<16,O.h=_&65535|B<<16}function F(O,z,q,I,k){var _=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535),B=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_>>>16),H=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(B>>>16),j=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(H>>>16);O.l=_&65535|B<<16,O.h=H&65535|j<<16}function P(O,z,q,I,k,_){var B=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535)+(_.l&65535),H=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_.l>>>16)+(B>>>16),j=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(_.h&65535)+(H>>>16),G=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(_.h>>>16)+(j>>>16);O.l=B&65535|H<<16,O.h=j&65535|G<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],L=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(P){return i(C(P,b))},this.b64=function(P){return m(C(P,b),T)},this.any=function(P,O){return f(C(P,b),O)},this.raw=function(P){return C(P,b)},this.hex_hmac=function(P,O){return i(v(P,O))},this.b64_hmac=function(P,O){return m(v(P,O),T)},this.any_hmac=function(P,O,z){return f(v(P,O),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(P){return typeof P=="boolean"&&(y=P),this},this.setPad=function(P){return typeof P<"u"&&(T=P),this},this.setUTF8=function(P){return typeof P=="boolean"&&(b=P),this};function C(P){return P=b?t(P):P,A(D(c(P),P.length*8))}function v(P,O){P=b?t(P):P,O=b?t(O):O;var z,q,I=c(P),k=Array(16),_=Array(16);for(I.length>16&&(I=D(I,P.length*8)),z=0;z<16;z+=1)k[z]=I[z]^909522486,_[z]=I[z]^1549556828;return q=D(k.concat(c(O)),512+O.length*8),A(D(_.concat(q),512+160))}function A(P){var O,z="",q=P.length*32;for(O=0;O>5]>>>O%32&255);return z}function D(P,O){var z,q,I,k,_=1732584193,B=4023233417,H=2562383102,j=271733878,G=3285377520,V,ie,te,J,ce,he,ae,X,Se,se;for(P[O>>5]|=128<>>9<<4)+14]=O,k=P.length,I=0;Ifunction(){return t||(0,e[Jh(e)[0]])((t={exports:{}}).exports,t),t.exports},sC=(e,t)=>{for(var n in t)vd(e,n,{get:t[n],enumerable:!0})},Td=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jh(t))!iC.call(e,a)&&a!==n&&vd(e,a,{get:()=>t[a],enumerable:!(r=rC(t,a))||r.enumerable});return e},uC=(e,t,n)=>(Td(e,t,"default"),n&&Td(n,t,"default")),Xh=(e,t,n)=>(n=e!=null?nC(aC(e)):{},Td(t||!e||!e.__esModule?vd(n,"default",{value:e,enumerable:!0}):n,e)),e4=oC({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(e,t){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof e<"u")r(t);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:e,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(v,A=void 0){super(A),this.createItem=v}get(v){return this.has(v)||this.set(v,this.createItem(v)),super.get(v)}}let u=C=>C&&typeof C=="object"&&typeof C.then=="function",l=(C,v)=>(...A)=>{i.runtime.lastError?C.reject(new Error(i.runtime.lastError.message)):v.singleCallbackArg||A.length<=1&&v.singleCallbackArg!==!1?C.resolve(A[0]):C.resolve(A)},c=C=>C==1?"argument":"arguments",g=(C,v)=>function(D,...S){if(S.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${S.length}`);return new Promise((N,F)=>{if(v.fallbackToNoCallback)try{D[C](...S,l({resolve:N,reject:F},v))}catch{D[C](...S),v.fallbackToNoCallback=!1,v.noCallback=!0,N()}else v.noCallback?(D[C](...S),N()):D[C](...S,l({resolve:N,reject:F},v))})},f=(C,v,A)=>new Proxy(v,{apply(D,S,N){return A.call(S,C,...N)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),h=(C,v={},A={})=>{let D=Object.create(null),S={has(F,P){return P in C||P in D},get(F,P,O){if(P in D)return D[P];if(!(P in C))return;let z=C[P];if(typeof z=="function")if(typeof v[P]=="function")z=f(C,C[P],v[P]);else if(m(A,P)){let q=g(P,A[P]);z=f(C,C[P],q)}else z=z.bind(C);else if(typeof z=="object"&&z!==null&&(m(v,P)||m(A,P)))z=h(z,v[P],A[P]);else if(m(A,"*"))z=h(z,v[P],A["*"]);else return Object.defineProperty(D,P,{configurable:!0,enumerable:!0,get(){return C[P]},set(q){C[P]=q}}),z;return D[P]=z,z},set(F,P,O,z){return P in D?D[P]=O:C[P]=O,!0},defineProperty(F,P,O){return Reflect.defineProperty(D,P,O)},deleteProperty(F,P){return Reflect.deleteProperty(D,P)}},N=Object.create(C);return new Proxy(N,S)},y=C=>({addListener(v,A,...D){v.addListener(C.get(A),...D)},hasListener(v,A){return v.hasListener(C.get(A))},removeListener(v,A){v.removeListener(C.get(A))}}),T=new s(C=>typeof C!="function"?C:function(A){let D=h(A,{},{getContent:{minArgs:0,maxArgs:0}});C(D)}),b=new s(C=>typeof C!="function"?C:function(A,D,S){let N=!1,F,P=new Promise(I=>{F=function(k){N=!0,I(k)}}),O;try{O=C(A,D,F)}catch(I){O=Promise.reject(I)}let z=O!==!0&&u(O);if(O!==!0&&!z&&!N)return!1;let q=I=>{I.then(k=>{S(k)},k=>{let _;k&&(k instanceof Error||typeof k.message=="string")?_=k.message:_="An unexpected error occurred",S({__mozWebExtensionPolyfillReject__:!0,message:_})}).catch(k=>{})};return q(z?O:P),!0}),x=({reject:C,resolve:v},A)=>{i.runtime.lastError?i.runtime.lastError.message===r?v():C(new Error(i.runtime.lastError.message)):A&&A.__mozWebExtensionPolyfillReject__?C(new Error(A.message)):v(A)},w=(C,v,A,...D)=>{if(D.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${D.length}`);return new Promise((S,N)=>{let F=x.bind(null,{resolve:S,reject:N});D.push(F),A.sendMessage(...D)})},L={devtools:{network:{onRequestFinished:y(T)}},runtime:{onMessage:y(b),onMessageExternal:y(b),sendMessage:w.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:w.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},M={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":M},services:{"*":M},websites:{"*":M}},h(i,L,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),t4={};sC(t4,{default:()=>sl});var lC=Xh(e4());uC(t4,Xh(e4()));var{default:Zh,...cC}=lC,sl=Zh!==void 0?Zh:cC;globalThis.immersiveTranslateBrowserAPI=sl;p();p();p();p();var gl,Oe,o4,dC,Ss,n4,s4,ll={},u4=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ya(e,t){for(var n in t)e[n]=t[n];return e}function l4(e){var t=e.parentNode;t&&t.removeChild(e)}function Cs(e,t,n){var r,a,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?gl.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ul(e,o,r,a,null)}function ul(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++o4};return a==null&&Oe.vnode!=null&&Oe.vnode(i),i}function xe(e){return e.children}function pi(e,t){this.props=e,this.context=t}function io(e,t){if(t==null)return e.__?io(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?ul(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(f=b[c])===null||f&&m.key==f.key&&m.type===f.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:pl}),n.__[e]}function K(e){return xs=1,hC(D4,e)}function hC(e,t,n){var r=fl(Es++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):D4(void 0,t),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){It.u=!0;var a=It.shouldComponentUpdate;It.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function le(e,t){var n=fl(Es++,3);!Oe.__s&&w4(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function Ve(e){return xs=5,ze(function(){return{current:e}},[])}function ze(e,t){var n=fl(Es++,7);return w4(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qe(e,t){return xs=8,ze(function(){return e},t)}function Me(e){var t=It.context[e.__c],n=fl(Es++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function bC(){for(var e;e=E4.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ml),e.__H.__h.forEach(Ed),e.__H.__h=[]}catch(t){e.__H.__h=[],Oe.__e(t,e.__v)}}Oe.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),It=null,y4&&y4(e)},Oe.__r=function(e){T4&&T4(e),Es=0;var t=(It=e.__c).__H;t&&(xd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=pl,n.__N=n.i=void 0})):(t.__h.forEach(ml),t.__h.forEach(Ed),t.__h=[])),xd=It},Oe.diffed=function(e){v4&&v4(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E4.push(t)!==1&&b4===Oe.requestAnimationFrame||((b4=Oe.requestAnimationFrame)||yC)(bC)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==pl&&(n.__=n.__V),n.i=void 0,n.__V=pl})),xd=It=null},Oe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ml),n.__h=n.__h.filter(function(r){return!r.__||Ed(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Oe.__e(r,n.__v)}}),S4&&S4(e,t)},Oe.unmount=function(e){C4&&C4(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ml(r)}catch(a){t=a}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var x4=typeof requestAnimationFrame=="function";function yC(e){var t,n=function(){clearTimeout(r),x4&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);x4&&(t=requestAnimationFrame(n))}function ml(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function Ed(e){var t=It;e.__c=e.__(),It=t}function w4(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function D4(e,t){return typeof t=="function"?t(e):t}p();p();p();var ws;function Rd(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function R4(e,t=","){return e.map(Rd).join(t)}var Od=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function so(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function bl(e,t="@media "){return t+dt(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function dt(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function A4(e){return e}function As(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function O4(e){return e.match(/[-=:;]/g)?.length||0}function Ld(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(O4(e),15)<<18}var TC=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function zd({n:e,i:t,v:n=[]},r,a,i){e&&(e=Rd({n:e,i:t,v:n})),i=[...dt(i)];for(let s of n){let u=r.theme("screens",s);for(let l of dt(u&&bl(u)||r.v(s))){var o;i.push(l),a|=u?67108864|Ld(l):s=="dark"?1073741824:l[0]=="@"?Ld(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~TC.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:i,i:t}}var Nd=new Map;function _d(e){if(e.d){let t=[],n=wd(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?wd(r,i=>wd(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Dd(i,o)}return Dd(o,i)})):r,"&"),r=>Dd(r,e.n?"."+Od(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function wd(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function Dd(e,t){return e.replace(/&/g,t)}var k4=new Intl.Collator("en",{numeric:!0});function z4(e,t){for(var n=0,r=e.length;n>1;0>=N4(e[a],t)?n=a+1:r=a}return r}function N4(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||k4.compare(P4(e.n),P4(t.n))||k4.compare(L4(e.n),L4(t.n))}function P4(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function L4(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Ad(e,t){return Math.round(parseInt(e,16)*t)}function Gr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let i=(e.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[Ad(e.substr(1,i),o),Ad(e.substr(1+i,i),o),Ad(e.substr(1+2*i,i),o),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Ud(e,t,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},g){let f=[],m="",h=0,y=0;for(let x in o||{}){var T,b;let w=o[x];if(x[0]=="@"){if(!w)continue;if(x[1]=="a"){f.push(...Hd(s,u,Ds(""+w),g,u,l,c,!0));continue}if(x[1]=="l"){for(let L of dt(w))f.push(...i(L,{n:s,p:(T=Nt[x[7]],u&~Nt.o|T),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){f.push(...dt(w).map(L=>({p:-1,o:0,r:[],d:x+" "+L})));continue}if(x[1]=="k"){f.push({p:Nt.d,o:0,r:[x],d:i(w,{p:Nt.d},g).map(_d).join("")});continue}if(x[1]=="f"){f.push(...dt(w).map(L=>({p:Nt.d,o:0,r:[x],d:i(L,{p:Nt.d},g).map(_d).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))x=="label"&&w?s=w+so(JSON.stringify([u,c,o])):(w||w===0)&&(x=x.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:O4(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+dt(w).map(L=>g.s(x,qd(""+L,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let L=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(M,C)=>{let v=g.theme("screens",C);return v?(L|=67108864,bl(v,"")):M}),L|=Ld(x)),f.push(...i(w,{n:s,p:L,r:[...l,x],i:c},g))}else f.push(...i(w,{p:u,r:[...l,x]},g))}return f.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:m}),f.sort(N4)}(e,zd(t,n,r,a),n)}function qd(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=t(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Gr(s):""+dt(s).filter(u=>Object(u)!==u)})}function jd(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function hl(e,t,n=Nt.u,r,a){let i=[];for(let o of e)for(let s of function(u,l,c,g,f){u={...u,i:u.i||f};let m=function(h,y){let T=Nd.get(h.n);return T?T(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:g,p:c}=zd(u,l,c,g),jd(hl(Ds(m),l,c,g,u.i),u.n)):Array.isArray(m)?m.map(h=>{var y,T;return{o:0,...h,r:[...dt(g),...dt(h.r)],p:(y=c,T=h.p??c,y&~Nt.o|T)}}):Ud(m,u,l,c,g):[{c:Rd(u),p:0,o:0,r:[]}]}(o,t,n,r,a))i.splice(z4(i,s),0,s);return i}function Hd(e,t,n,r,a,i,o,s){return jd((s?n.flatMap(u=>hl([u],r,a,i,o)):hl(n,r,a,i,o)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function vC(e,t,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=zd(i,o,t);return n&&Hd(s,t,n,o,u,l,c,r)},Nd.set(e,a),e}function kd(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),t[0].push({n:o,v:r.filter(SC),i:a}))}}function SC(e,t,n){return n.indexOf(e)==t}var _4=new Map;function Ds(e){let t=_4.get(e);if(!t){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&kd(n,r)),a=s+1};for(;s1?g.slice(0,-1)+so(JSON.stringify([g,f])):g+"("+R4(f)+")",Nt.a,f,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),_4.set(e,t=r[0])}return t}function U4(e,t,n){return t.reduce((r,a,i)=>r+n(a)+e[i+1],e[0])}function q4(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?U4(e,t,n=>Pd(n).trim()):t.filter(Boolean).reduce((n,r)=>n+Pd(r),e?Pd(e):"")}function Pd(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=q4(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var oF=j4("@"),sF=j4("~");function j4(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return t(r,a,i)}}});function t(n,r,a){return R4(Ds(n+e+"("+q4(r,a)+")"))}}function Md(e,t){return Array.isArray(e)?M4(U4(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?M4(e):[e]}var CC=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function M4(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CC.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][t[1]]=t[2]);return r}function H4(e,...t){var n;let r=Md(e,t),a=(r.find(i=>i.label)?.label||"css")+so(JSON.stringify(r));return n=(i,o)=>jd(r.flatMap(s=>Ud(s,i,o,Nt.o)),a),Nd.set(a,n),a}var uF=new Proxy(function(e,t){return F4("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return F4(t,n,r)}}});function F4(e,t,n){return{toString(){return H4({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Fd(t,n)]}function Fd(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Bd(n,1)}):n=>e||{[n[1]]:Bd(n,2)}}function Bd(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function oe(e,t,n,r){return[e,xC(t,n,r)]}function xC(e,t,n){let r=typeof t=="string"?(a,i)=>({[t]:n?n(a,i):a._}):t||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=W4(e||a[1]),s=i.theme(o,a.$$)??Ar(a.$$,o,i);if(s!=null)return a._=Bd(a,0,s),r(a,i,o)}}function $t(e,t={},n){return[e,EC(t,n)]}function EC(e={},t){return(n,r)=>{let{section:a=W4(n[0]).replace("-","")+"Color"}=e,[i,o]=wC(n.$$);if(!i)return;let s=r.theme(a,i)||Ar(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,f=r.theme(l,o||"DEFAULT")||o&&Ar(o,l,r),m=t||(({_:y})=>{let T=ks(c,y);return g?{[g]:T}:T});n._={value:Gr(s,{opacityVariable:u||void 0,opacityValue:f||void 0}),color:y=>Gr(s,y),opacityVariable:u||void 0,opacityValue:f||void 0};let h=m(n,r);if(!n.dark){let y=r.d(a,i,s);y&&y!==s&&(n._={value:Gr(y,{opacityVariable:u||void 0,opacityValue:f||"1"}),color:T=>Gr(y,T),opacityVariable:u||void 0,opacityValue:f||void 0},h={"&":h,[r.v("dark")]:m(n,r)})}return h}}function wC(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ks(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function Ar(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=uo(qd(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function W4(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function uo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>uo(n)+r+uo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var lF=Symbol();function Ps({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:dt(t.variants),rules:dt(t.rules),ignorelist:dt(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of dt([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&dt(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:i=n.darkMode,darkColor:o=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:f=n.stringify,finalize:m}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...dt(a)],darkMode:i,darkColor:o,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...dt(u)],rules:[...n.rules,...dt(l)],ignorelist:[...n.ignorelist,...dt(c)],hash:g,stringify:f,finalize:[...n.finalize,...dt(m)]}}return n}function B4(e,t,n,r,a,i){for(let o of t){let s=n.get(o);s||n.set(o,s=r(o));let u=s(e,a,i);if(u)return u}}function DC(e){var t;return Id(e[0],typeof(t=e[1])=="function"?t:()=>t)}function AC(e){var t,n;return Array.isArray(e)?Id(e[0],Fd(e[1],e[2])):Id(e,Fd(t,n))}function Id(e,t){return K4(e,(n,r,a,i)=>{let o=r.exec(n);if(o)return o.$$=n.slice(o[0].length),o.dark=i,t(o,a)})}function K4(e,t){let n=dt(e).map(kC);return(r,a,i)=>{for(let o of n){let s=t(r,o,a,i);if(s)return s}}}function kC(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function PC(e,t){let n=Ps(e),r=function({theme:u,darkMode:l,darkColor:c=As,variants:g,rules:f,hash:m,stringify:h,ignorelist:y,finalize:T}){let b=new Map,x=new Map,w=new Map,L=new Map,M=K4(y,(A,D)=>D.test(A));g.push(["dark",Array.isArray(l)||l=="class"?`${dt(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let C=typeof m=="function"?A=>m(A,so):m?so:A4;C!==A4&&T.push(A=>({...A,n:A.n&&C(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,S)=>"--"+C(S).replace("#",""))}));let v={theme:function({extend:A={},...D}){let S={},N={get colors(){return F("colors")},theme:F,negative(){return{}},breakpoints(O){let z={};for(let q in O)typeof O[q]=="string"&&(z["screen-"+q]=O[q]);return z}};return F;function F(O,z,q,I){if(O){if({1:O,2:I}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let H=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(j,G,V=G)=>H.push(V)),O=H.shift(),q=z,z=H.join("-")}let _=S[O]||Object.assign(Object.assign(S[O]={},P(D,O)),P(A,O));if(z==null)return _;z||="DEFAULT";let B=_[z]??z.split("-").reduce((H,j)=>H?.[j],_)??q;return I?Gr(B,{opacityValue:qd(I,F)}):B}let k={};for(let _ of[...Object.keys(D),...Object.keys(A)])k[_]=F(_);return k}function P(O,z){let q=O[z];return typeof q=="function"&&(q=q(N)),q&&/color|fill|stroke/i.test(z)?function I(k,_=[]){let B={};for(let H in k){let j=k[H],G=[..._,H];B[G.join("-")]=j,H=="DEFAULT"&&(G=_,B[_.join("-")]=j),typeof j=="object"&&Object.assign(B,I(j,G))}return B}(q):q}}(u),e:Od,h:C,s(A,D){return h(A,D,v)},d(A,D,S){return c(A,D,v,S)},v(A){return b.has(A)||b.set(A,B4(A,g,x,DC,v)||"&:"+A),b.get(A)},r(A,D){let S=JSON.stringify([A,D]);return w.has(S)||w.set(S,!M(A,v)&&B4(A,f,L,AC,v,D)),w.get(S)},f(A){return T.reduce((D,S)=>S(D,v),A)}};return v}(n),a=new Map,i=[],o=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,i.length,l),i.push(l),o.add(u)});function s(u){let l=r.f(u),c=_d(l);if(c&&!o.has(c)){o.add(c);let g=z4(i,u);t.insert(c,g,u),i.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of dt(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?Hd("",Nt.b,Ds(c),r,Nt.b,[],!1,!0):Ud(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of hl(Ds(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(o),c=new Map(a),g=[...i];return()=>{u(),o=l,a=c,i=g}},clear(){t.clear(),o=new Set,a=new Map,i=[]},destroy(){this.clear(),t.destroy()}}))}function LC(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function _C(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:i,target:o}of a)if(i[0]=="a")r(o);else for(let s of o.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let i,o=a.getAttribute?.("class");o&&LC(o,i=e(o))&&a.setAttribute("class",i)}}function MC(e=Wd,t=typeof document<"u"&&document.documentElement){if(t){let n=_C(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function G4(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function FC(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:G4(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:As}}function BC(e){let t=e&&typeof e!="string"?e:G4(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:As}}function IC(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:As}}function V4(e,t){let n=typeof document>"u"?IC(!t):e?BC():FC();return t||(n.resume=OC),n}function RC(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):dt(e)).join("")}function OC(e,t){let n=RC(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let i;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let o of document.querySelectorAll("[class]"))e(o.getAttribute("class"));for(;a=r.exec(n),i&&t(n.slice(i.index+i[0].length,a?.index),{p:parseInt(i[1],36),o:parseInt(i[2],36)/2,n:i[3]}),i=a;);}}var Wd=new Proxy(As,{apply(e,t,n){return ws(n[0])},get(e,t){let n=ws[t];return typeof n=="function"?function(){return n.apply(ws,arguments)}:n}});function $4(e={},t=V4,n){return ws?.destroy(),ws=MC(PC(e,typeof t=="function"?t():t),n)}function Kd(e,t=!0){let n=Ps(e);return $4({...n,hash:n.hash??t},()=>V4(!t))}var cF=function e(t){return new Proxy(function(n,...r){return I4(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...i){return I4(t,r,a,i)}}})}();function I4(e,t,n,r){return{toString(){let a=Md(n,r),i=Od(t+so(JSON.stringify([t,a])));return(typeof e=="function"?e:Wd)(H4({[`@keyframes ${i}`]:Md(n,r)})),i}}}p();p();p();var zC=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Y4(e){return zC.get(e)}function Q4(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Z4(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var NC=[["-webkit-",1],["-moz-",2],["-ms-",4]];function yl(){return({stringify:e})=>({stringify(t,n,r){let a="",i=Y4(t);i&&(a+=e(i,n,r)+";");let o=Q4(t),s=Z4(t,n);for(let u of NC)o&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}p();p();var Vd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Hn(4,"rem",4,.5,.5),...Hn(12,"rem",4,5),14:"3.5rem",...Hn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ze("blur"),backdropBrightness:Ze("brightness"),backdropContrast:Ze("contrast"),backdropGrayscale:Ze("grayscale"),backdropHueRotate:Ze("hueRotate"),backdropInvert:Ze("invert"),backdropOpacity:Ze("opacity"),backdropSaturate:Ze("saturate"),backdropSepia:Ze("sepia"),backgroundColor:Ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Hn(200,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ze("spacing"),borderWidth:{DEFAULT:"1px",...Qn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ze("colors"),caretColor:Ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Hn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ze("borderColor"),divideOpacity:Ze("borderOpacity"),divideWidth:Ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Ls(2,6),...Ls(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ze("spacing"),gradientColorStops:Ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Ls(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Ls(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Hn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Hn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ze("spacing"),placeholderColor:Ze("colors"),placeholderOpacity:Ze("opacity"),outlineColor:Ze("colors"),outlineOffset:Qn(8,"px"),outlineWidth:Qn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ze("colors"),ringOffsetWidth:Qn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Qn(8,"px")},rotate:{...Qn(2,"deg"),...Qn(12,"deg",3),...Qn(180,"deg",45)},saturate:Hn(200,"",100,0,50),scale:{...Hn(150,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ze("spacing"),scrollPadding:Ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Qn(2,"deg"),...Qn(12,"deg",3)},space:Ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Hn(2),textColor:Ze("colors"),textDecorationColor:Ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Qn(8,"px")},textUnderlineOffset:{auto:"auto",...Qn(8,"px")},textIndent:Ze("spacing"),textOpacity:Ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Ls(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Hn(50,"",1,0,10),auto:"auto"}};function Ls(e,t){let n={};do for(var r=1;rt(e)}var UC={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Vd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Vd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},qC=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:Ar(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),oe("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[bl(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),oe("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),oe("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Tl),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),oe("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),oe("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),oe("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",J4),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),oe("(flex-(?:grow|shrink))(?:$|-)"),oe("(flex)-"),oe("grow(?:$|-)","flexGrow"),oe("shrink(?:$|-)","flexShrink"),oe("basis-","flexBasis"),oe("-?(order)-"),"-?(order)-(\\d+)",oe("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",n3),oe("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",t3),oe("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),oe("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),oe("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",n3),oe("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",t3),oe("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),oe("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Tl(J4(e))),re("grid-flow-(dense)","gridAutoFlow"),oe("auto-cols-","gridAutoColumns"),oe("auto-rows-","gridAutoRows"),oe("gap-x(?:$|-)","gap","columnGap"),oe("gap-y(?:$|-)","gap","rowGap"),oe("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",X4),re("(content|items|self)-",e=>({["align-"+e[1]]:X4(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),oe("p([xytrbl])?(?:$|-)","padding",lo("padding")),oe("-?m([xytrbl])?(?:$|-)","margin",lo("margin")),oe("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),oe("w-","width"),oe("min-w-","minWidth"),oe("max-w-","maxWidth"),oe("h-","height"),oe("min-h-","minHeight"),oe("max-h-","maxHeight"),oe("font-","fontWeight"),oe("font-","fontFamily",({_:e})=>typeof(e=dt(e))[1]=="string"?{fontFamily:ur(e)}:{fontFamily:ur(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...va({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),oe("tracking-","letterSpacing"),oe("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),oe("list-","listStyleType"),re("list-","listStyleType"),oe("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),$t("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),oe("text-opacity-","textOpacity","--tw-text-opacity"),$t("text-",{property:"color"}),oe("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),oe("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),oe("underline-offset-","textUnderlineOffset"),$t("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),oe("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),$t("caret-",{opacityVariable:!1,opacitySection:"opacity"}),$t("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${mi(e," ")},var(--tw-gradient-stops))`),$t("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),$t("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),$t("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),oe("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),$t("bg-",{section:"backgroundColor"}),oe("bg-","backgroundImage"),oe("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Tl),oe("bg-","backgroundSize"),oe("rounded(?:$|-)","borderRadius"),oe("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${mi(n[0])}-radius`]:t,[`border-${mi(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),oe("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),oe("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...va({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),$t("border-([xytrbl])-",{section:"borderColor"},lo("border","Color")),$t("border-"),oe("border-([xytrbl])(?:$|-)","borderWidth",lo("border","Width")),oe("border(?:$|-)","borderWidth"),oe("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),oe("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${mi(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${mi(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),$t("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),oe("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),$t("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),oe("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),$t("ring-",{property:"--tw-ring-color"}),oe("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Gr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Gr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),$t("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),oe("shadow(?:$|-)","boxShadow",({_:e})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ur(e),"--tw-shadow-colored":ur(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),oe("(opacity)-"),re("mix-blend-","mixBlendMode"),...e3(),...e3("backdrop-"),oe("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ur(e),transitionTimingFunction:e._=="none"?void 0:ur(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ur(t("transitionDuration",""))})),oe("duration(?:$|-)","transitionDuration","transitionDuration",ur),oe("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ur),oe("delay(?:$|-)","transitionDelay","transitionDelay",ur),oe("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=ur(e),i=a.split(" "),o=t("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",$d),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":r3(e=="gpu")})),oe("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...$d()})),oe("-?(rotate)-","rotate",Gd),oe("-?(translate-[xy])-","translate",Gd),oe("-?(skew-[xy])-","skew",Gd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Tl),"(appearance)-",oe("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",oe("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...va({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),oe("scroll-p([xytrbl])?(?:$|-)","padding",lo("scroll-padding")),oe("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",lo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...va({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),oe("-?(outline-offset)-"),$t("outline-",{opacityVariable:!1,opacitySection:"opacity"}),oe("outline-","outlineWidth"),"(pointer-events)-",oe("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),$t("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),$t("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),oe("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Tl(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function J4(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function mi(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function ur(e){return e&&""+(e._||e)}function X4({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function lo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...ks(e+"-"+mi(a[0])+t,r),...ks(e+"-"+mi(a[1])+t,r)}:ks(e+t,r)}}function e3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...va(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>oe(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:dt(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Gd({1:e,_:t}){return{["--tw-"+e]:t,...$d()}}function $d(){return{...va({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":r3()}),transform:"var(--tw-transform)"}}function r3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function t3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function n3({1:e}){return`repeat(${e},minmax(0,1fr))`}function va(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jC=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||Ar(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:i,h:o,v:s})=>{let u=uo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${i(o(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||Ar(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||Ar(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=Ar(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&uo(e).replace(/[}]+$/,"").split("{")]];function HC({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:UC,theme:{...Vd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jC,rules:qC,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var WC={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},KC={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},GC={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},VC={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$C={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},YC={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},QC={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ZC={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},JC={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},XC={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ex={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},tx={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},nx={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},rx={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ax={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ix={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},ox={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},sx={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ux={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},lx={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},cx={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},dx={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},gx={__proto__:null,slate:WC,gray:KC,zinc:GC,neutral:VC,stone:$C,red:YC,orange:QC,amber:ZC,yellow:JC,lime:XC,green:ex,emerald:tx,teal:nx,cyan:rx,sky:ax,blue:ix,indigo:ox,violet:sx,purple:ux,fuchsia:lx,pink:cx,rose:dx};function vl({disablePreflight:e}={}){return HC({colors:gx,disablePreflight:e})}p();p();var Sl=globalThis||(typeof window<"u"?window:self),px=Object.create,Qd=Object.defineProperty,mx=Object.getOwnPropertyDescriptor,fx=Object.getOwnPropertyNames,hx=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty,yx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tx=(e,t)=>{for(var n in t)Qd(e,n,{get:t[n],enumerable:!0})},Yd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fx(t))!bx.call(e,a)&&a!==n&&Qd(e,a,{get:()=>t[a],enumerable:!(r=mx(t,a))||r.enumerable});return e},vx=(e,t,n)=>(Yd(e,t,"default"),n&&Yd(n,t,"default")),i3=(e,t,n)=>(n=e!=null?px(hx(e)):{},Yd(t||!e||!e.__esModule?Qd(n,"default",{value:e,enumerable:!0}):n,e)),o3=yx((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var f=new XMLHttpRequest;f.open("GET",l),f.responseType="blob",f.onload=function(){u(f.response,c,g)},f.onerror=function(){},f.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Sl=="object"&&Sl.global===Sl?Sl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var f=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,g):i(m,m.target="_blank")):(m.href=f.createObjectURL(l),setTimeout(function(){f.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var f=document.createElement("a");f.href=l,f.target="_blank",setTimeout(function(){i(f)})}}:function(l,c,g,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var m=l.type==="application/octet-stream",h=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&h||s)&&typeof FileReader<"u"){var T=new FileReader;T.onloadend=function(){var w=T.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},T.readAsDataURL(l)}else{var b=o.URL||o.webkitURL,x=b.createObjectURL(l);f?f.location=x:location.href=x,f=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});o.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),s3={};Tx(s3,{default:()=>fi});var Sx=i3(o3());vx(s3,i3(o3()));var{default:a3,...Cx}=Sx,fi=a3!==void 0?a3:Cx;p();p();p();p();p();p();p();function co(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(i){await i,t="fulfilled",r(i)},reject(i){t="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}p();var Zd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Cl(e,t){let n=co(),r=setTimeout(()=>n.reject(new Zd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}p();p();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},e);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}p();var u3=class{#e=0;#t=[];#n=[];#r=co();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tYx,bgBlue:()=>Xx,bgBrightBlack:()=>rE,bgBrightBlue:()=>sE,bgBrightCyan:()=>lE,bgBrightGreen:()=>iE,bgBrightMagenta:()=>uE,bgBrightRed:()=>aE,bgBrightWhite:()=>cE,bgBrightYellow:()=>oE,bgCyan:()=>tE,bgGreen:()=>Zx,bgMagenta:()=>eE,bgRed:()=>Qx,bgRgb24:()=>mE,bgRgb8:()=>gE,bgWhite:()=>nE,bgYellow:()=>Jx,black:()=>Fx,blue:()=>Ox,bold:()=>Dx,brightBlack:()=>d3,brightBlue:()=>Kx,brightCyan:()=>Vx,brightGreen:()=>Hx,brightMagenta:()=>Gx,brightRed:()=>jx,brightWhite:()=>$x,brightYellow:()=>Wx,cyan:()=>Nx,dim:()=>Ax,getColorEnabled:()=>Ex,gray:()=>qx,green:()=>Ix,hidden:()=>_x,inverse:()=>Lx,italic:()=>kx,magenta:()=>zx,red:()=>Bx,reset:()=>wx,rgb24:()=>pE,rgb8:()=>dE,setColorEnabled:()=>xx,strikethrough:()=>Mx,stripColor:()=>hE,underline:()=>Px,white:()=>Ux,yellow:()=>Rx});p();var{Deno:l3}=globalThis,c3=typeof l3?.noColor=="boolean"?l3.noColor:!0,Jd=!c3;function xx(e){c3||(Jd=e)}function Ex(){return Jd}function Fe(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Be(e,t){return Jd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function wx(e){return Be(e,Fe([0],0))}function Dx(e){return Be(e,Fe([1],22))}function Ax(e){return Be(e,Fe([2],22))}function kx(e){return Be(e,Fe([3],23))}function Px(e){return Be(e,Fe([4],24))}function Lx(e){return Be(e,Fe([7],27))}function _x(e){return Be(e,Fe([8],28))}function Mx(e){return Be(e,Fe([9],29))}function Fx(e){return Be(e,Fe([30],39))}function Bx(e){return Be(e,Fe([31],39))}function Ix(e){return Be(e,Fe([32],39))}function Rx(e){return Be(e,Fe([33],39))}function Ox(e){return Be(e,Fe([34],39))}function zx(e){return Be(e,Fe([35],39))}function Nx(e){return Be(e,Fe([36],39))}function Ux(e){return Be(e,Fe([37],39))}function qx(e){return d3(e)}function d3(e){return Be(e,Fe([90],39))}function jx(e){return Be(e,Fe([91],39))}function Hx(e){return Be(e,Fe([92],39))}function Wx(e){return Be(e,Fe([93],39))}function Kx(e){return Be(e,Fe([94],39))}function Gx(e){return Be(e,Fe([95],39))}function Vx(e){return Be(e,Fe([96],39))}function $x(e){return Be(e,Fe([97],39))}function Yx(e){return Be(e,Fe([40],49))}function Qx(e){return Be(e,Fe([41],49))}function Zx(e){return Be(e,Fe([42],49))}function Jx(e){return Be(e,Fe([43],49))}function Xx(e){return Be(e,Fe([44],49))}function eE(e){return Be(e,Fe([45],49))}function tE(e){return Be(e,Fe([46],49))}function nE(e){return Be(e,Fe([47],49))}function rE(e){return Be(e,Fe([100],49))}function aE(e){return Be(e,Fe([101],49))}function iE(e){return Be(e,Fe([102],49))}function oE(e){return Be(e,Fe([103],49))}function sE(e){return Be(e,Fe([104],49))}function uE(e){return Be(e,Fe([105],49))}function lE(e){return Be(e,Fe([106],49))}function cE(e){return Be(e,Fe([107],49))}function Sa(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function dE(e,t){return Be(e,Fe([38,5,Sa(t)],39))}function gE(e,t){return Be(e,Fe([48,5,Sa(t)],49))}function pE(e,t){return typeof t=="number"?Be(e,Fe([38,2,t>>16&255,t>>8&255,t&255],39)):Be(e,Fe([38,2,Sa(t.r),Sa(t.g),Sa(t.b)],39))}function mE(e,t){return typeof t=="number"?Be(e,Fe([48,2,t>>16&255,t>>8&255,t&255],49)):Be(e,Fe([48,2,Sa(t.r),Sa(t.g),Sa(t.b)],49))}var fE=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function hE(e){return e.replace(fE,"")}p();p();var Xd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},bE={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function eg(e,t){let n={...bE,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new Xd(a,n.maxAttempts)}p();var Vr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function tg(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2|t[r]>>6],n+=Vr[t[r]&63];return r===a+1&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2],n+="="),n}p();p();var yE=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,TE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,vE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,ng={Space_Separator:yE,ID_Start:TE,ID_Continue:vE},Rt={isSpaceSeparator(e){return typeof e=="string"&&ng.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||ng.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||ng.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},ag,En,Yr,El,Ca,lr,en,sg,Ms,SE=function(e,t){ag=String(e),En="start",Yr=[],El=0,Ca=1,lr=0,en=void 0,sg=void 0,Ms=void 0;do en=CE(),wE[En]();while(en.type!=="eof");return typeof t=="function"?ig({"":Ms},"",t):Ms};function ig(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var YT=JS((g0,Fu)=>{p();(function(){var e;function t(h){var y,T,b="",x=-1,w;if(h&&h.length)for(w=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,T,b,x,w,L=[],M;if(y=T=b=x=w=0,h&&h.length)for(M=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),L[T]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),w=h.charCodeAt(y+2),L[T]=String.fromCharCode((b&15)<<12|(x&63)<<6|w&63),y+=3);return L.join("")}function r(h,y){var T=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(T>>16);return b<<16|T&65535}function a(h,y){return h<>>32-y}function i(h,y){for(var T=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,w=0,L=h.length;w>>4&15)+T.charAt(x&15);return b}function o(h){var y,T=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,T=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,T=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,T=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function f(h,y){var T=y.length,b=Array(),x,w,L,M,C,v,A,D;for(v=Array(Math.ceil(h.length/2)),M=v.length,x=0;x0;){for(C=Array(),L=0,x=0;x0||w>0)&&(C[C.length]=w);b[b.length]=L,v=C}for(A="",x=b.length-1;x>=0;x--)A+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=A.length;xh.length*8?b+=y:b+=T.charAt(M>>>6*(3-L)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",T=!1,b=!0;this.encode=function(x){var w,L,M,C="";for(y=y||"=",x=b?t(x):x,len=x.length,w=0;wlen*8?C+=y:C+=h.charAt(M>>>6*(3-L)&63);return C},this.decode=function(x){var w,L,M,C,v,A,D,S,N,F,P="",O=[];if(!x)return x;w=F=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(w++)),A=h.indexOf(x.charAt(w++)),D=h.indexOf(x.charAt(w++)),S=h.indexOf(x.charAt(w++)),N=v<<18|A<<12|D<<6|S,L=N>>16&255,M=N>>8&255,C=N&255,F+=1,D===64?O[F]=String.fromCharCode(L):S===64?O[F]=String.fromCharCode(L,M):O[F]=String.fromCharCode(L,M,C);while(w>>8^T;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(S){return i(x(S,b),y)},this.b64=function(S){return m(x(S),T)},this.any=function(S,N){return f(x(S,b),N)},this.raw=function(S){return x(S,b)},this.hex_hmac=function(S,N){return i(w(S,N),y)},this.b64_hmac=function(S,N){return m(w(S,N),T)},this.any_hmac=function(S,N,F){return f(w(S,N),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(S){return typeof S=="boolean"&&(y=S),this},this.setPad=function(S){return T=S||T,this},this.setUTF8=function(S){return typeof S=="boolean"&&(b=S),this};function x(S){return S=b?t(S):S,l(L(c(S),S.length*8))}function w(S,N){var F,P,O,z,q;for(S=b?t(S):S,N=b?t(N):N,F=c(S),F.length>16&&(F=L(F,S.length*8)),P=Array(16),O=Array(16),q=0;q<16;q+=1)P[q]=F[q]^909522486,O[q]=F[q]^1549556828;return z=L(P.concat(c(N)),512+N.length*8),l(L(O.concat(z),512+128))}function L(S,N){var F,P,O,z,q,I=1732584193,k=-271733879,_=-1732584194,B=271733878;for(S[N>>5]|=128<>>9<<4)+14]=N,F=0;F16&&(D=L(D,v.length*8)),S=Array(16),N=Array(16),F=0;F<16;F+=1)S[F]=D[F]^909522486,N[F]=D[F]^1549556828;return P=L(S.concat(g(A)),512+A.length*8),u(L(N.concat(P),512+160))}function L(v,A){var D,S,N,F,P,O,z,q,I=Array(80),k=1732584193,_=-271733879,B=-1732584194,H=271733878,j=-1009589776;for(v[A>>5]|=128<<24-A%32,v[(A+64>>9<<4)+15]=A,D=0;D16&&(j=I(j,k.length*8));H<16;H+=1)G[H]=j[H]^909522486,V[H]=j[H]^1549556828;return B=I(G.concat(g(_)),512+_.length*8),u(I(V.concat(B),512+256))}function M(k,_){return k>>>_|k<<32-_}function C(k,_){return k>>>_}function v(k,_,B){return k&_^~k&B}function A(k,_,B){return k&_^k&B^_&B}function D(k){return M(k,2)^M(k,13)^M(k,22)}function S(k){return M(k,6)^M(k,11)^M(k,25)}function N(k){return M(k,7)^M(k,18)^C(k,3)}function F(k){return M(k,17)^M(k,19)^C(k,10)}function P(k){return M(k,28)^M(k,34)^M(k,39)}function O(k){return M(k,14)^M(k,18)^M(k,41)}function z(k){return M(k,1)^M(k,8)^C(k,7)}function q(k){return M(k,19)^M(k,61)^C(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function I(k,_){var B=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,G,V,ie,te,J,ce,he,ae,X,Se,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=M(k,O.length*8));I<32;I+=1)_[I]=k[I]^909522486,B[I]=k[I]^1549556828;return q=M(_.concat(g(z)),1024+z.length*8),u(M(B.concat(q),1024+512))}function M(O,z){var q,I,k,_=new Array(80),B=new Array(16),H=[new C(1779033703,-205731576),new C(-1150833019,-2067093701),new C(1013904242,-23791573),new C(-1521486534,1595750129),new C(1359893119,-1377402159),new C(-1694144372,725511199),new C(528734635,-79577749),new C(1541459225,327033209)],j=new C(0,0),G=new C(0,0),V=new C(0,0),ie=new C(0,0),te=new C(0,0),J=new C(0,0),ce=new C(0,0),he=new C(0,0),ae=new C(0,0),X=new C(0,0),Se=new C(0,0),se=new C(0,0),ue=new C(0,0),ke=new C(0,0),We=new C(0,0),Re=new C(0,0),me=new C(0,0);for(x===void 0&&(x=[new C(1116352408,-685199838),new C(1899447441,602891725),new C(-1245643825,-330482897),new C(-373957723,-2121671748),new C(961987163,-213338824),new C(1508970993,-1241133031),new C(-1841331548,-1357295717),new C(-1424204075,-630357736),new C(-670586216,-1560083902),new C(310598401,1164996542),new C(607225278,1323610764),new C(1426881987,-704662302),new C(1925078388,-226784913),new C(-2132889090,991336113),new C(-1680079193,633803317),new C(-1046744716,-815192428),new C(-459576895,-1628353838),new C(-272742522,944711139),new C(264347078,-1953704523),new C(604807628,2007800933),new C(770255983,1495990901),new C(1249150122,1856431235),new C(1555081692,-1119749164),new C(1996064986,-2096016459),new C(-1740746414,-295247957),new C(-1473132947,766784016),new C(-1341970488,-1728372417),new C(-1084653625,-1091629340),new C(-958395405,1034457026),new C(-710438585,-1828018395),new C(113926993,-536640913),new C(338241895,168717936),new C(666307205,1188179964),new C(773529912,1546045734),new C(1294757372,1522805485),new C(1396182291,-1651133473),new C(1695183700,-1951439906),new C(1986661051,1014477480),new C(-2117940946,1206759142),new C(-1838011259,344077627),new C(-1564481375,1290863460),new C(-1474664885,-1136513023),new C(-1035236496,-789014639),new C(-949202525,106217008),new C(-778901479,-688958952),new C(-694614492,1432725776),new C(-200395387,1467031594),new C(275423344,851169720),new C(430227734,-1194143544),new C(506948616,1363258195),new C(659060556,-544281703),new C(883997877,-509917016),new C(958139571,-976659869),new C(1322822218,-482243893),new C(1537002063,2003034995),new C(1747873779,-692930397),new C(1955562222,1575990012),new C(2024104815,1125592928),new C(-2067236844,-1578062990),new C(-1933114872,442776044),new C(-1866530822,593698344),new C(-1538233109,-561857047),new C(-1090935817,-1295615723),new C(-965641998,-479046869),new C(-903397682,-366583396),new C(-779700025,566280711),new C(-354779690,-840897762),new C(-176337025,-294727304),new C(116418474,1914138554),new C(174292421,-1563912026),new C(289380356,-1090974290),new C(460393269,320620315),new C(685471733,587496836),new C(852142971,1086792851),new C(1017036298,365543100),new C(1126000580,-1676669620),new C(1288033470,-885112138),new C(1501505948,-60457430),new C(1607167915,987167468),new C(1816402316,1246189591)]),I=0;I<80;I+=1)_[I]=new C(0,0);for(O[z>>5]|=128<<24-(z&31),O[(z+128>>10<<5)+31]=z,k=O.length,I=0;I>>q|z.h<<32-q,O.h=z.h>>>q|z.l<<32-q}function D(O,z,q){O.l=z.h>>>q|z.l<<32-q,O.h=z.l>>>q|z.h<<32-q}function S(O,z,q){O.l=z.l>>>q|z.h<<32-q,O.h=z.h>>>q}function N(O,z,q){var I=(z.l&65535)+(q.l&65535),k=(z.l>>>16)+(q.l>>>16)+(I>>>16),_=(z.h&65535)+(q.h&65535)+(k>>>16),B=(z.h>>>16)+(q.h>>>16)+(_>>>16);O.l=I&65535|k<<16,O.h=_&65535|B<<16}function F(O,z,q,I,k){var _=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535),B=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_>>>16),H=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(B>>>16),j=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(H>>>16);O.l=_&65535|B<<16,O.h=H&65535|j<<16}function P(O,z,q,I,k,_){var B=(z.l&65535)+(q.l&65535)+(I.l&65535)+(k.l&65535)+(_.l&65535),H=(z.l>>>16)+(q.l>>>16)+(I.l>>>16)+(k.l>>>16)+(_.l>>>16)+(B>>>16),j=(z.h&65535)+(q.h&65535)+(I.h&65535)+(k.h&65535)+(_.h&65535)+(H>>>16),G=(z.h>>>16)+(q.h>>>16)+(I.h>>>16)+(k.h>>>16)+(_.h>>>16)+(j>>>16);O.l=B&65535|H<<16,O.h=j&65535|G<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,T=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],L=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(P){return i(C(P,b))},this.b64=function(P){return m(C(P,b),T)},this.any=function(P,O){return f(C(P,b),O)},this.raw=function(P){return C(P,b)},this.hex_hmac=function(P,O){return i(v(P,O))},this.b64_hmac=function(P,O){return m(v(P,O),T)},this.any_hmac=function(P,O,z){return f(v(P,O),z)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(P){return typeof P=="boolean"&&(y=P),this},this.setPad=function(P){return typeof P<"u"&&(T=P),this},this.setUTF8=function(P){return typeof P=="boolean"&&(b=P),this};function C(P){return P=b?t(P):P,A(D(c(P),P.length*8))}function v(P,O){P=b?t(P):P,O=b?t(O):O;var z,q,I=c(P),k=Array(16),_=Array(16);for(I.length>16&&(I=D(I,P.length*8)),z=0;z<16;z+=1)k[z]=I[z]^909522486,_[z]=I[z]^1549556828;return q=D(k.concat(c(O)),512+O.length*8),A(D(_.concat(q),512+160))}function A(P){var O,z="",q=P.length*32;for(O=0;O>5]>>>O%32&255);return z}function D(P,O){var z,q,I,k,_=1732584193,B=4023233417,H=2562383102,j=271733878,G=3285377520,V,ie,te,J,ce,he,ae,X,Se,se;for(P[O>>5]|=128<>>9<<4)+14]=O,k=P.length,I=0;Ifunction(){return t||(0,e[Jh(e)[0]])((t={exports:{}}).exports,t),t.exports},sC=(e,t)=>{for(var n in t)Td(e,n,{get:t[n],enumerable:!0})},yd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jh(t))!iC.call(e,a)&&a!==n&&Td(e,a,{get:()=>t[a],enumerable:!(r=rC(t,a))||r.enumerable});return e},uC=(e,t,n)=>(yd(e,t,"default"),n&&yd(n,t,"default")),Xh=(e,t,n)=>(n=e!=null?nC(aC(e)):{},yd(t||!e||!e.__esModule?Td(n,"default",{value:e,enumerable:!0}):n,e)),e4=oC({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(e,t){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof e<"u")r(t);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:e,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(v,A=void 0){super(A),this.createItem=v}get(v){return this.has(v)||this.set(v,this.createItem(v)),super.get(v)}}let u=C=>C&&typeof C=="object"&&typeof C.then=="function",l=(C,v)=>(...A)=>{i.runtime.lastError?C.reject(new Error(i.runtime.lastError.message)):v.singleCallbackArg||A.length<=1&&v.singleCallbackArg!==!1?C.resolve(A[0]):C.resolve(A)},c=C=>C==1?"argument":"arguments",g=(C,v)=>function(D,...S){if(S.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${S.length}`);return new Promise((N,F)=>{if(v.fallbackToNoCallback)try{D[C](...S,l({resolve:N,reject:F},v))}catch{D[C](...S),v.fallbackToNoCallback=!1,v.noCallback=!0,N()}else v.noCallback?(D[C](...S),N()):D[C](...S,l({resolve:N,reject:F},v))})},f=(C,v,A)=>new Proxy(v,{apply(D,S,N){return A.call(S,C,...N)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),h=(C,v={},A={})=>{let D=Object.create(null),S={has(F,P){return P in C||P in D},get(F,P,O){if(P in D)return D[P];if(!(P in C))return;let z=C[P];if(typeof z=="function")if(typeof v[P]=="function")z=f(C,C[P],v[P]);else if(m(A,P)){let q=g(P,A[P]);z=f(C,C[P],q)}else z=z.bind(C);else if(typeof z=="object"&&z!==null&&(m(v,P)||m(A,P)))z=h(z,v[P],A[P]);else if(m(A,"*"))z=h(z,v[P],A["*"]);else return Object.defineProperty(D,P,{configurable:!0,enumerable:!0,get(){return C[P]},set(q){C[P]=q}}),z;return D[P]=z,z},set(F,P,O,z){return P in D?D[P]=O:C[P]=O,!0},defineProperty(F,P,O){return Reflect.defineProperty(D,P,O)},deleteProperty(F,P){return Reflect.deleteProperty(D,P)}},N=Object.create(C);return new Proxy(N,S)},y=C=>({addListener(v,A,...D){v.addListener(C.get(A),...D)},hasListener(v,A){return v.hasListener(C.get(A))},removeListener(v,A){v.removeListener(C.get(A))}}),T=new s(C=>typeof C!="function"?C:function(A){let D=h(A,{},{getContent:{minArgs:0,maxArgs:0}});C(D)}),b=new s(C=>typeof C!="function"?C:function(A,D,S){let N=!1,F,P=new Promise(I=>{F=function(k){N=!0,I(k)}}),O;try{O=C(A,D,F)}catch(I){O=Promise.reject(I)}let z=O!==!0&&u(O);if(O!==!0&&!z&&!N)return!1;let q=I=>{I.then(k=>{S(k)},k=>{let _;k&&(k instanceof Error||typeof k.message=="string")?_=k.message:_="An unexpected error occurred",S({__mozWebExtensionPolyfillReject__:!0,message:_})}).catch(k=>{})};return q(z?O:P),!0}),x=({reject:C,resolve:v},A)=>{i.runtime.lastError?i.runtime.lastError.message===r?v():C(new Error(i.runtime.lastError.message)):A&&A.__mozWebExtensionPolyfillReject__?C(new Error(A.message)):v(A)},w=(C,v,A,...D)=>{if(D.lengthv.maxArgs)throw new Error(`Expected at most ${v.maxArgs} ${c(v.maxArgs)} for ${C}(), got ${D.length}`);return new Promise((S,N)=>{let F=x.bind(null,{resolve:S,reject:N});D.push(F),A.sendMessage(...D)})},L={devtools:{network:{onRequestFinished:y(T)}},runtime:{onMessage:y(b),onMessageExternal:y(b),sendMessage:w.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:w.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},M={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":M},services:{"*":M},websites:{"*":M}},h(i,L,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),t4={};sC(t4,{default:()=>sl});var lC=Xh(e4());uC(t4,Xh(e4()));var{default:Zh,...cC}=lC,sl=Zh!==void 0?Zh:cC;globalThis.immersiveTranslateBrowserAPI=sl;p();p();p();p();var gl,Oe,o4,dC,Cs,n4,s4,ll={},u4=[],gC=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ya(e,t){for(var n in t)e[n]=t[n];return e}function l4(e){var t=e.parentNode;t&&t.removeChild(e)}function xs(e,t,n){var r,a,i,o={};for(i in t)i=="key"?r=t[i]:i=="ref"?a=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?gl.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return ul(e,o,r,a,null)}function ul(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++o4};return a==null&&Oe.vnode!=null&&Oe.vnode(i),i}function xe(e){return e.children}function pi(e,t){this.props=e,this.context=t}function io(e,t){if(t==null)return e.__?io(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?ul(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(f=b[c])===null||f&&m.key==f.key&&m.type===f.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:pl}),n.__[e]}function K(e){return Es=1,hC(D4,e)}function hC(e,t,n){var r=fl(ws++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):D4(void 0,t),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=It,!It.u)){It.u=!0;var a=It.shouldComponentUpdate;It.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function le(e,t){var n=fl(ws++,3);!Oe.__s&&w4(n.__H,t)&&(n.__=e,n.i=t,It.__H.__h.push(n))}function $e(e){return Es=5,ze(function(){return{current:e}},[])}function ze(e,t){var n=fl(ws++,7);return w4(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function qe(e,t){return Es=8,ze(function(){return e},t)}function Me(e){var t=It.context[e.__c],n=fl(ws++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(It)),t.props.value):e.__}function bC(){for(var e;e=E4.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ml),e.__H.__h.forEach(xd),e.__H.__h=[]}catch(t){e.__H.__h=[],Oe.__e(t,e.__v)}}Oe.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),It=null,y4&&y4(e)},Oe.__r=function(e){T4&&T4(e),ws=0;var t=(It=e.__c).__H;t&&(Cd===It?(t.__h=[],It.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=pl,n.__N=n.i=void 0})):(t.__h.forEach(ml),t.__h.forEach(xd),t.__h=[])),Cd=It},Oe.diffed=function(e){v4&&v4(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(E4.push(t)!==1&&b4===Oe.requestAnimationFrame||((b4=Oe.requestAnimationFrame)||yC)(bC)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==pl&&(n.__=n.__V),n.i=void 0,n.__V=pl})),Cd=It=null},Oe.__c=function(e,t){t.some(function(n){try{n.__h.forEach(ml),n.__h=n.__h.filter(function(r){return!r.__||xd(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Oe.__e(r,n.__v)}}),S4&&S4(e,t)},Oe.unmount=function(e){C4&&C4(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{ml(r)}catch(a){t=a}}),n.__H=void 0,t&&Oe.__e(t,n.__v))};var x4=typeof requestAnimationFrame=="function";function yC(e){var t,n=function(){clearTimeout(r),x4&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);x4&&(t=requestAnimationFrame(n))}function ml(e){var t=It,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),It=t}function xd(e){var t=It;e.__c=e.__(),It=t}function w4(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function D4(e,t){return typeof t=="function"?t(e):t}p();p();p();var Ds;function Id(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function R4(e,t=","){return e.map(Id).join(t)}var Rd=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function so(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function bl(e,t="@media "){return t+gt(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function gt(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function A4(e){return e}function ks(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function O4(e){return e.match(/[-=:;]/g)?.length||0}function Pd(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(O4(e),15)<<18}var TC=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function Od({n:e,i:t,v:n=[]},r,a,i){e&&(e=Id({n:e,i:t,v:n})),i=[...gt(i)];for(let s of n){let u=r.theme("screens",s);for(let l of gt(u&&bl(u)||r.v(s))){var o;i.push(l),a|=u?67108864|Pd(l):s=="dark"?1073741824:l[0]=="@"?Pd(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~TC.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:i,i:t}}var zd=new Map;function Ld(e){if(e.d){let t=[],n=Ed(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?Ed(r,i=>Ed(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):wd(i,o)}return wd(o,i)})):r,"&"),r=>wd(r,e.n?"."+Rd(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function Ed(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function wd(e,t){return e.replace(/&/g,t)}var k4=new Intl.Collator("en",{numeric:!0});function z4(e,t){for(var n=0,r=e.length;n>1;0>=N4(e[a],t)?n=a+1:r=a}return r}function N4(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||k4.compare(P4(e.n),P4(t.n))||k4.compare(L4(e.n),L4(t.n))}function P4(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function L4(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Dd(e,t){return Math.round(parseInt(e,16)*t)}function Gr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let i=(e.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[Dd(e.substr(1,i),o),Dd(e.substr(1+i,i),o),Dd(e.substr(1+2*i,i),o),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Nd(e,t,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},g){let f=[],m="",h=0,y=0;for(let x in o||{}){var T,b;let w=o[x];if(x[0]=="@"){if(!w)continue;if(x[1]=="a"){f.push(...jd(s,u,As(""+w),g,u,l,c,!0));continue}if(x[1]=="l"){for(let L of gt(w))f.push(...i(L,{n:s,p:(T=Nt[x[7]],u&~Nt.o|T),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){f.push(...gt(w).map(L=>({p:-1,o:0,r:[],d:x+" "+L})));continue}if(x[1]=="k"){f.push({p:Nt.d,o:0,r:[x],d:i(w,{p:Nt.d},g).map(Ld).join("")});continue}if(x[1]=="f"){f.push(...gt(w).map(L=>({p:Nt.d,o:0,r:[x],d:i(L,{p:Nt.d},g).map(Ld).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))x=="label"&&w?s=w+so(JSON.stringify([u,c,o])):(w||w===0)&&(x=x.replace(/[A-Z]/g,L=>"-"+L.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:O4(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+gt(w).map(L=>g.s(x,Ud(""+L,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let L=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(M,C)=>{let v=g.theme("screens",C);return v?(L|=67108864,bl(v,"")):M}),L|=Pd(x)),f.push(...i(w,{n:s,p:L,r:[...l,x],i:c},g))}else f.push(...i(w,{p:u,r:[...l,x]},g))}return f.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:m}),f.sort(N4)}(e,Od(t,n,r,a),n)}function Ud(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=t(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Gr(s):""+gt(s).filter(u=>Object(u)!==u)})}function qd(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function hl(e,t,n=Nt.u,r,a){let i=[];for(let o of e)for(let s of function(u,l,c,g,f){u={...u,i:u.i||f};let m=function(h,y){let T=zd.get(h.n);return T?T(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:g,p:c}=Od(u,l,c,g),qd(hl(As(m),l,c,g,u.i),u.n)):Array.isArray(m)?m.map(h=>{var y,T;return{o:0,...h,r:[...gt(g),...gt(h.r)],p:(y=c,T=h.p??c,y&~Nt.o|T)}}):Nd(m,u,l,c,g):[{c:Id(u),p:0,o:0,r:[]}]}(o,t,n,r,a))i.splice(z4(i,s),0,s);return i}function jd(e,t,n,r,a,i,o,s){return qd((s?n.flatMap(u=>hl([u],r,a,i,o)):hl(n,r,a,i,o)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function vC(e,t,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=Od(i,o,t);return n&&jd(s,t,n,o,u,l,c,r)},zd.set(e,a),e}function Ad(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),t[0].push({n:o,v:r.filter(SC),i:a}))}}function SC(e,t,n){return n.indexOf(e)==t}var _4=new Map;function As(e){let t=_4.get(e);if(!t){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Ad(n,r)),a=s+1};for(;s1?g.slice(0,-1)+so(JSON.stringify([g,f])):g+"("+R4(f)+")",Nt.a,f,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),_4.set(e,t=r[0])}return t}function U4(e,t,n){return t.reduce((r,a,i)=>r+n(a)+e[i+1],e[0])}function q4(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?U4(e,t,n=>kd(n).trim()):t.filter(Boolean).reduce((n,r)=>n+kd(r),e?kd(e):"")}function kd(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=q4(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var oF=j4("@"),sF=j4("~");function j4(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return t(r,a,i)}}});function t(n,r,a){return R4(As(n+e+"("+q4(r,a)+")"))}}function _d(e,t){return Array.isArray(e)?M4(U4(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?M4(e):[e]}var CC=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function M4(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CC.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][t[1]]=t[2]);return r}function H4(e,...t){var n;let r=_d(e,t),a=(r.find(i=>i.label)?.label||"css")+so(JSON.stringify(r));return n=(i,o)=>qd(r.flatMap(s=>Nd(s,i,o,Nt.o)),a),zd.set(a,n),a}var uF=new Proxy(function(e,t){return F4("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return F4(t,n,r)}}});function F4(e,t,n){return{toString(){return H4({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Md(t,n)]}function Md(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Fd(n,1)}):n=>e||{[n[1]]:Fd(n,2)}}function Fd(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function oe(e,t,n,r){return[e,xC(t,n,r)]}function xC(e,t,n){let r=typeof t=="string"?(a,i)=>({[t]:n?n(a,i):a._}):t||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=W4(e||a[1]),s=i.theme(o,a.$$)??Ar(a.$$,o,i);if(s!=null)return a._=Fd(a,0,s),r(a,i,o)}}function $t(e,t={},n){return[e,EC(t,n)]}function EC(e={},t){return(n,r)=>{let{section:a=W4(n[0]).replace("-","")+"Color"}=e,[i,o]=wC(n.$$);if(!i)return;let s=r.theme(a,i)||Ar(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,f=r.theme(l,o||"DEFAULT")||o&&Ar(o,l,r),m=t||(({_:y})=>{let T=Ps(c,y);return g?{[g]:T}:T});n._={value:Gr(s,{opacityVariable:u||void 0,opacityValue:f||void 0}),color:y=>Gr(s,y),opacityVariable:u||void 0,opacityValue:f||void 0};let h=m(n,r);if(!n.dark){let y=r.d(a,i,s);y&&y!==s&&(n._={value:Gr(y,{opacityVariable:u||void 0,opacityValue:f||"1"}),color:T=>Gr(y,T),opacityVariable:u||void 0,opacityValue:f||void 0},h={"&":h,[r.v("dark")]:m(n,r)})}return h}}function wC(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ps(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function Ar(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=uo(Ud(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function W4(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function uo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>uo(n)+r+uo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var lF=Symbol();function Ls({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:gt(t.variants),rules:gt(t.rules),ignorelist:gt(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of gt([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&>(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:i=n.darkMode,darkColor:o=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:f=n.stringify,finalize:m}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...gt(a)],darkMode:i,darkColor:o,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...gt(u)],rules:[...n.rules,...gt(l)],ignorelist:[...n.ignorelist,...gt(c)],hash:g,stringify:f,finalize:[...n.finalize,...gt(m)]}}return n}function B4(e,t,n,r,a,i){for(let o of t){let s=n.get(o);s||n.set(o,s=r(o));let u=s(e,a,i);if(u)return u}}function DC(e){var t;return Bd(e[0],typeof(t=e[1])=="function"?t:()=>t)}function AC(e){var t,n;return Array.isArray(e)?Bd(e[0],Md(e[1],e[2])):Bd(e,Md(t,n))}function Bd(e,t){return K4(e,(n,r,a,i)=>{let o=r.exec(n);if(o)return o.$$=n.slice(o[0].length),o.dark=i,t(o,a)})}function K4(e,t){let n=gt(e).map(kC);return(r,a,i)=>{for(let o of n){let s=t(r,o,a,i);if(s)return s}}}function kC(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function PC(e,t){let n=Ls(e),r=function({theme:u,darkMode:l,darkColor:c=ks,variants:g,rules:f,hash:m,stringify:h,ignorelist:y,finalize:T}){let b=new Map,x=new Map,w=new Map,L=new Map,M=K4(y,(A,D)=>D.test(A));g.push(["dark",Array.isArray(l)||l=="class"?`${gt(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let C=typeof m=="function"?A=>m(A,so):m?so:A4;C!==A4&&T.push(A=>({...A,n:A.n&&C(A.n),d:A.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,S)=>"--"+C(S).replace("#",""))}));let v={theme:function({extend:A={},...D}){let S={},N={get colors(){return F("colors")},theme:F,negative(){return{}},breakpoints(O){let z={};for(let q in O)typeof O[q]=="string"&&(z["screen-"+q]=O[q]);return z}};return F;function F(O,z,q,I){if(O){if({1:O,2:I}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let H=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(j,G,V=G)=>H.push(V)),O=H.shift(),q=z,z=H.join("-")}let _=S[O]||Object.assign(Object.assign(S[O]={},P(D,O)),P(A,O));if(z==null)return _;z||="DEFAULT";let B=_[z]??z.split("-").reduce((H,j)=>H?.[j],_)??q;return I?Gr(B,{opacityValue:Ud(I,F)}):B}let k={};for(let _ of[...Object.keys(D),...Object.keys(A)])k[_]=F(_);return k}function P(O,z){let q=O[z];return typeof q=="function"&&(q=q(N)),q&&/color|fill|stroke/i.test(z)?function I(k,_=[]){let B={};for(let H in k){let j=k[H],G=[..._,H];B[G.join("-")]=j,H=="DEFAULT"&&(G=_,B[_.join("-")]=j),typeof j=="object"&&Object.assign(B,I(j,G))}return B}(q):q}}(u),e:Rd,h:C,s(A,D){return h(A,D,v)},d(A,D,S){return c(A,D,v,S)},v(A){return b.has(A)||b.set(A,B4(A,g,x,DC,v)||"&:"+A),b.get(A)},r(A,D){let S=JSON.stringify([A,D]);return w.has(S)||w.set(S,!M(A,v)&&B4(A,f,L,AC,v,D)),w.get(S)},f(A){return T.reduce((D,S)=>S(D,v),A)}};return v}(n),a=new Map,i=[],o=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,i.length,l),i.push(l),o.add(u)});function s(u){let l=r.f(u),c=Ld(l);if(c&&!o.has(c)){o.add(c);let g=z4(i,u);t.insert(c,g,u),i.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of gt(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?jd("",Nt.b,As(c),r,Nt.b,[],!1,!0):Nd(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of hl(As(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(o),c=new Map(a),g=[...i];return()=>{u(),o=l,a=c,i=g}},clear(){t.clear(),o=new Set,a=new Map,i=[]},destroy(){this.clear(),t.destroy()}}))}function LC(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function _C(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:i,target:o}of a)if(i[0]=="a")r(o);else for(let s of o.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let i,o=a.getAttribute?.("class");o&&LC(o,i=e(o))&&a.setAttribute("class",i)}}function MC(e=Hd,t=typeof document<"u"&&document.documentElement){if(t){let n=_C(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function G4(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function FC(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:G4(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:ks}}function BC(e){let t=e&&typeof e!="string"?e:G4(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:ks}}function IC(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:ks}}function V4(e,t){let n=typeof document>"u"?IC(!t):e?BC():FC();return t||(n.resume=OC),n}function RC(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):gt(e)).join("")}function OC(e,t){let n=RC(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let i;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let o of document.querySelectorAll("[class]"))e(o.getAttribute("class"));for(;a=r.exec(n),i&&t(n.slice(i.index+i[0].length,a?.index),{p:parseInt(i[1],36),o:parseInt(i[2],36)/2,n:i[3]}),i=a;);}}var Hd=new Proxy(ks,{apply(e,t,n){return Ds(n[0])},get(e,t){let n=Ds[t];return typeof n=="function"?function(){return n.apply(Ds,arguments)}:n}});function $4(e={},t=V4,n){return Ds?.destroy(),Ds=MC(PC(e,typeof t=="function"?t():t),n)}function Wd(e,t=!0){let n=Ls(e);return $4({...n,hash:n.hash??t},()=>V4(!t))}var cF=function e(t){return new Proxy(function(n,...r){return I4(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...i){return I4(t,r,a,i)}}})}();function I4(e,t,n,r){return{toString(){let a=_d(n,r),i=Rd(t+so(JSON.stringify([t,a])));return(typeof e=="function"?e:Hd)(H4({[`@keyframes ${i}`]:_d(n,r)})),i}}}p();p();p();var zC=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Y4(e){return zC.get(e)}function Q4(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Z4(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var NC=[["-webkit-",1],["-moz-",2],["-ms-",4]];function yl(){return({stringify:e})=>({stringify(t,n,r){let a="",i=Y4(t);i&&(a+=e(i,n,r)+";");let o=Q4(t),s=Z4(t,n);for(let u of NC)o&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}p();p();var Gd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Hn(4,"rem",4,.5,.5),...Hn(12,"rem",4,5),14:"3.5rem",...Hn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ze("blur"),backdropBrightness:Ze("brightness"),backdropContrast:Ze("contrast"),backdropGrayscale:Ze("grayscale"),backdropHueRotate:Ze("hueRotate"),backdropInvert:Ze("invert"),backdropOpacity:Ze("opacity"),backdropSaturate:Ze("saturate"),backdropSepia:Ze("sepia"),backgroundColor:Ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Hn(200,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ze("spacing"),borderWidth:{DEFAULT:"1px",...Qn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ze("colors"),caretColor:Ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Hn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ze("borderColor"),divideOpacity:Ze("borderOpacity"),divideWidth:Ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),..._s(2,6),..._s(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ze("spacing"),gradientColorStops:Ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),..._s(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),..._s(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Hn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Hn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ze("spacing"),placeholderColor:Ze("colors"),placeholderOpacity:Ze("opacity"),outlineColor:Ze("colors"),outlineOffset:Qn(8,"px"),outlineWidth:Qn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ze("colors"),ringOffsetWidth:Qn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Qn(8,"px")},rotate:{...Qn(2,"deg"),...Qn(12,"deg",3),...Qn(180,"deg",45)},saturate:Hn(200,"",100,0,50),scale:{...Hn(150,"",100,0,50),...Hn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ze("spacing"),scrollPadding:Ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Qn(2,"deg"),...Qn(12,"deg",3)},space:Ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Hn(2),textColor:Ze("colors"),textDecorationColor:Ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Qn(8,"px")},textUnderlineOffset:{auto:"auto",...Qn(8,"px")},textIndent:Ze("spacing"),textOpacity:Ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),..._s(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Hn(50,"",1,0,10),auto:"auto"}};function _s(e,t){let n={};do for(var r=1;rt(e)}var UC={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${Gd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${Gd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},qC=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:Ar(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),oe("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[bl(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),oe("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),oe("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Tl),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),oe("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),oe("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),oe("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",J4),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),oe("(flex-(?:grow|shrink))(?:$|-)"),oe("(flex)-"),oe("grow(?:$|-)","flexGrow"),oe("shrink(?:$|-)","flexShrink"),oe("basis-","flexBasis"),oe("-?(order)-"),"-?(order)-(\\d+)",oe("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",n3),oe("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",t3),oe("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),oe("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),oe("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",n3),oe("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",t3),oe("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),oe("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Tl(J4(e))),re("grid-flow-(dense)","gridAutoFlow"),oe("auto-cols-","gridAutoColumns"),oe("auto-rows-","gridAutoRows"),oe("gap-x(?:$|-)","gap","columnGap"),oe("gap-y(?:$|-)","gap","rowGap"),oe("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",X4),re("(content|items|self)-",e=>({["align-"+e[1]]:X4(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),oe("p([xytrbl])?(?:$|-)","padding",lo("padding")),oe("-?m([xytrbl])?(?:$|-)","margin",lo("margin")),oe("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),oe("w-","width"),oe("min-w-","minWidth"),oe("max-w-","maxWidth"),oe("h-","height"),oe("min-h-","minHeight"),oe("max-h-","maxHeight"),oe("font-","fontWeight"),oe("font-","fontFamily",({_:e})=>typeof(e=gt(e))[1]=="string"?{fontFamily:ur(e)}:{fontFamily:ur(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...va({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),oe("tracking-","letterSpacing"),oe("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),oe("list-","listStyleType"),re("list-","listStyleType"),oe("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),$t("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),oe("text-opacity-","textOpacity","--tw-text-opacity"),$t("text-",{property:"color"}),oe("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),oe("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),oe("underline-offset-","textUnderlineOffset"),$t("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),oe("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),$t("caret-",{opacityVariable:!1,opacitySection:"opacity"}),$t("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${mi(e," ")},var(--tw-gradient-stops))`),$t("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),$t("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),$t("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),oe("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),$t("bg-",{section:"backgroundColor"}),oe("bg-","backgroundImage"),oe("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Tl),oe("bg-","backgroundSize"),oe("rounded(?:$|-)","borderRadius"),oe("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${mi(n[0])}-radius`]:t,[`border-${mi(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),oe("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),oe("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...va({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),$t("border-([xytrbl])-",{section:"borderColor"},lo("border","Color")),$t("border-"),oe("border-([xytrbl])(?:$|-)","borderWidth",lo("border","Width")),oe("border(?:$|-)","borderWidth"),oe("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),oe("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${mi(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${mi(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),$t("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),oe("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),$t("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),oe("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),$t("ring-",{property:"--tw-ring-color"}),oe("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Gr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Gr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),$t("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),oe("shadow(?:$|-)","boxShadow",({_:e})=>({...va({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ur(e),"--tw-shadow-colored":ur(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),oe("(opacity)-"),re("mix-blend-","mixBlendMode"),...e3(),...e3("backdrop-"),oe("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:ur(e),transitionTimingFunction:e._=="none"?void 0:ur(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:ur(t("transitionDuration",""))})),oe("duration(?:$|-)","transitionDuration","transitionDuration",ur),oe("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ur),oe("delay(?:$|-)","transitionDelay","transitionDelay",ur),oe("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=ur(e),i=a.split(" "),o=t("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",Vd),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":r3(e=="gpu")})),oe("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Vd()})),oe("-?(rotate)-","rotate",Kd),oe("-?(translate-[xy])-","translate",Kd),oe("-?(skew-[xy])-","skew",Kd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Tl),"(appearance)-",oe("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",oe("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...va({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),oe("scroll-p([xytrbl])?(?:$|-)","padding",lo("scroll-padding")),oe("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",lo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...va({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),oe("-?(outline-offset)-"),$t("outline-",{opacityVariable:!1,opacitySection:"opacity"}),oe("outline-","outlineWidth"),"(pointer-events)-",oe("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),$t("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),$t("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),oe("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Tl(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function J4(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function mi(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function ur(e){return e&&""+(e._||e)}function X4({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function lo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ps(e+"-"+mi(a[0])+t,r),...Ps(e+"-"+mi(a[1])+t,r)}:Ps(e+t,r)}}function e3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...va(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>oe(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:gt(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function Kd({1:e,_:t}){return{["--tw-"+e]:t,...Vd()}}function Vd(){return{...va({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":r3()}),transform:"var(--tw-transform)"}}function r3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function t3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function n3({1:e}){return`repeat(${e},minmax(0,1fr))`}function va(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var jC=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||Ar(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:i,h:o,v:s})=>{let u=uo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${i(o(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||Ar(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||Ar(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=Ar(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&uo(e).replace(/[}]+$/,"").split("{")]];function HC({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:UC,theme:{...Gd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:jC,rules:qC,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var WC={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},KC={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},GC={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},VC={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},$C={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},YC={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},QC={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ZC={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},JC={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},XC={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},ex={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},tx={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},nx={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},rx={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},ax={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},ix={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},ox={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},sx={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},ux={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},lx={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},cx={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},dx={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},gx={__proto__:null,slate:WC,gray:KC,zinc:GC,neutral:VC,stone:$C,red:YC,orange:QC,amber:ZC,yellow:JC,lime:XC,green:ex,emerald:tx,teal:nx,cyan:rx,sky:ax,blue:ix,indigo:ox,violet:sx,purple:ux,fuchsia:lx,pink:cx,rose:dx};function vl({disablePreflight:e}={}){return HC({colors:gx,disablePreflight:e})}p();p();var Sl=globalThis||(typeof window<"u"?window:self),px=Object.create,Yd=Object.defineProperty,mx=Object.getOwnPropertyDescriptor,fx=Object.getOwnPropertyNames,hx=Object.getPrototypeOf,bx=Object.prototype.hasOwnProperty,yx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Tx=(e,t)=>{for(var n in t)Yd(e,n,{get:t[n],enumerable:!0})},$d=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fx(t))!bx.call(e,a)&&a!==n&&Yd(e,a,{get:()=>t[a],enumerable:!(r=mx(t,a))||r.enumerable});return e},vx=(e,t,n)=>($d(e,t,"default"),n&&$d(n,t,"default")),i3=(e,t,n)=>(n=e!=null?px(hx(e)):{},$d(t||!e||!e.__esModule?Yd(n,"default",{value:e,enumerable:!0}):n,e)),o3=yx((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var f=new XMLHttpRequest;f.open("GET",l),f.responseType="blob",f.onload=function(){u(f.response,c,g)},f.onerror=function(){},f.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Sl=="object"&&Sl.global===Sl?Sl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var f=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,g):i(m,m.target="_blank")):(m.href=f.createObjectURL(l),setTimeout(function(){f.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var f=document.createElement("a");f.href=l,f.target="_blank",setTimeout(function(){i(f)})}}:function(l,c,g,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var m=l.type==="application/octet-stream",h=/constructor/i.test(o.HTMLElement)||o.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||m&&h||s)&&typeof FileReader<"u"){var T=new FileReader;T.onloadend=function(){var w=T.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=w:location=w,f=null},T.readAsDataURL(l)}else{var b=o.URL||o.webkitURL,x=b.createObjectURL(l);f?f.location=x:location.href=x,f=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});o.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),s3={};Tx(s3,{default:()=>fi});var Sx=i3(o3());vx(s3,i3(o3()));var{default:a3,...Cx}=Sx,fi=a3!==void 0?a3:Cx;p();p();p();p();p();p();p();function co(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(i){await i,t="fulfilled",r(i)},reject(i){t="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}p();var Qd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Cl(e,t){let n=co(),r=setTimeout(()=>n.reject(new Qd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}p();p();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},e);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}p();var u3=class{#e=0;#t=[];#n=[];#r=co();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tYx,bgBlue:()=>Xx,bgBrightBlack:()=>rE,bgBrightBlue:()=>sE,bgBrightCyan:()=>lE,bgBrightGreen:()=>iE,bgBrightMagenta:()=>uE,bgBrightRed:()=>aE,bgBrightWhite:()=>cE,bgBrightYellow:()=>oE,bgCyan:()=>tE,bgGreen:()=>Zx,bgMagenta:()=>eE,bgRed:()=>Qx,bgRgb24:()=>mE,bgRgb8:()=>gE,bgWhite:()=>nE,bgYellow:()=>Jx,black:()=>Fx,blue:()=>Ox,bold:()=>Dx,brightBlack:()=>d3,brightBlue:()=>Kx,brightCyan:()=>Vx,brightGreen:()=>Hx,brightMagenta:()=>Gx,brightRed:()=>jx,brightWhite:()=>$x,brightYellow:()=>Wx,cyan:()=>Nx,dim:()=>Ax,getColorEnabled:()=>Ex,gray:()=>qx,green:()=>Ix,hidden:()=>_x,inverse:()=>Lx,italic:()=>kx,magenta:()=>zx,red:()=>Bx,reset:()=>wx,rgb24:()=>pE,rgb8:()=>dE,setColorEnabled:()=>xx,strikethrough:()=>Mx,stripColor:()=>hE,underline:()=>Px,white:()=>Ux,yellow:()=>Rx});p();var{Deno:l3}=globalThis,c3=typeof l3?.noColor=="boolean"?l3.noColor:!0,Zd=!c3;function xx(e){c3||(Zd=e)}function Ex(){return Zd}function Fe(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Be(e,t){return Zd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function wx(e){return Be(e,Fe([0],0))}function Dx(e){return Be(e,Fe([1],22))}function Ax(e){return Be(e,Fe([2],22))}function kx(e){return Be(e,Fe([3],23))}function Px(e){return Be(e,Fe([4],24))}function Lx(e){return Be(e,Fe([7],27))}function _x(e){return Be(e,Fe([8],28))}function Mx(e){return Be(e,Fe([9],29))}function Fx(e){return Be(e,Fe([30],39))}function Bx(e){return Be(e,Fe([31],39))}function Ix(e){return Be(e,Fe([32],39))}function Rx(e){return Be(e,Fe([33],39))}function Ox(e){return Be(e,Fe([34],39))}function zx(e){return Be(e,Fe([35],39))}function Nx(e){return Be(e,Fe([36],39))}function Ux(e){return Be(e,Fe([37],39))}function qx(e){return d3(e)}function d3(e){return Be(e,Fe([90],39))}function jx(e){return Be(e,Fe([91],39))}function Hx(e){return Be(e,Fe([92],39))}function Wx(e){return Be(e,Fe([93],39))}function Kx(e){return Be(e,Fe([94],39))}function Gx(e){return Be(e,Fe([95],39))}function Vx(e){return Be(e,Fe([96],39))}function $x(e){return Be(e,Fe([97],39))}function Yx(e){return Be(e,Fe([40],49))}function Qx(e){return Be(e,Fe([41],49))}function Zx(e){return Be(e,Fe([42],49))}function Jx(e){return Be(e,Fe([43],49))}function Xx(e){return Be(e,Fe([44],49))}function eE(e){return Be(e,Fe([45],49))}function tE(e){return Be(e,Fe([46],49))}function nE(e){return Be(e,Fe([47],49))}function rE(e){return Be(e,Fe([100],49))}function aE(e){return Be(e,Fe([101],49))}function iE(e){return Be(e,Fe([102],49))}function oE(e){return Be(e,Fe([103],49))}function sE(e){return Be(e,Fe([104],49))}function uE(e){return Be(e,Fe([105],49))}function lE(e){return Be(e,Fe([106],49))}function cE(e){return Be(e,Fe([107],49))}function Sa(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function dE(e,t){return Be(e,Fe([38,5,Sa(t)],39))}function gE(e,t){return Be(e,Fe([48,5,Sa(t)],49))}function pE(e,t){return typeof t=="number"?Be(e,Fe([38,2,t>>16&255,t>>8&255,t&255],39)):Be(e,Fe([38,2,Sa(t.r),Sa(t.g),Sa(t.b)],39))}function mE(e,t){return typeof t=="number"?Be(e,Fe([48,2,t>>16&255,t>>8&255,t&255],49)):Be(e,Fe([48,2,Sa(t.r),Sa(t.g),Sa(t.b)],49))}var fE=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function hE(e){return e.replace(fE,"")}p();p();var Jd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},bE={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Xd(e,t){let n={...bE,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new Jd(a,n.maxAttempts)}p();var Vr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function eg(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2|t[r]>>6],n+=Vr[t[r]&63];return r===a+1&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Vr[t[r-2]>>2],n+=Vr[(t[r-2]&3)<<4|t[r-1]>>4],n+=Vr[(t[r-1]&15)<<2],n+="="),n}p();p();var yE=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,TE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,vE=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,tg={Space_Separator:yE,ID_Start:TE,ID_Continue:vE},Rt={isSpaceSeparator(e){return typeof e=="string"&&tg.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||tg.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||tg.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},rg,En,Yr,El,Ca,lr,tn,og,Fs,SE=function(e,t){rg=String(e),En="start",Yr=[],El=0,Ca=1,lr=0,tn=void 0,og=void 0,Fs=void 0;do tn=CE(),wE[En]();while(tn.type!=="eof");return typeof t=="function"?ag({"":Fs},"",t):Fs};function ag(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Qr();if(!Rt.isHexDigit(n))throw St($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var wE={start(){if(en.type==="eof")throw bi();rg()},beforePropertyName(){switch(en.type){case"identifier":case"string":sg=en.value,En="afterPropertyName";return;case"punctuator":xl();return;case"eof":throw bi()}},afterPropertyName(){if(en.type==="eof")throw bi();En="beforePropertyValue"},beforePropertyValue(){if(en.type==="eof")throw bi();rg()},beforeArrayValue(){if(en.type==="eof")throw bi();if(en.type==="punctuator"&&en.value==="]"){xl();return}rg()},afterPropertyValue(){if(en.type==="eof")throw bi();switch(en.value){case",":En="beforePropertyName";return;case"}":xl()}},afterArrayValue(){if(en.type==="eof")throw bi();switch(en.value){case",":En="beforeArrayValue";return;case"]":xl()}},end(){}};function rg(){let e;switch(en.type){case"punctuator":switch(en.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=en.value;break}if(Ms===void 0)Ms=e;else{let t=Yr[Yr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,sg,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Yr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Yr[Yr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function xl(){Yr.pop();let e=Yr[Yr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function St(e){return ug(e===void 0?`JSON5: invalid end of input at ${Ca}:${lr}`:`JSON5: invalid character '${DE(e)}' at ${Ca}:${lr}`)}function bi(){return ug(`JSON5: invalid end of input at ${Ca}:${lr}`)}function g3(){return lr-=5,ug(`JSON5: invalid identifier character at ${Ca}:${lr}`)}function DE(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function ug(e){let t=new SyntaxError(e);return t.lineNumber=Ca,t.columnNumber=lr,t}var AE=function(e,t,n){let r=[],a="",i,o,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")o=t;else if(Array.isArray(t)){i=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let T=y[h];switch(T!=null&&(typeof T.toJSON5=="function"?T=T.toJSON5(h):typeof T.toJSON=="function"&&(T=T.toJSON(h))),o&&(T=o.call(y,h,T)),T instanceof Number?T=Number(T):T instanceof String?T=String(T):T instanceof Boolean&&(T=T.valueOf()),T){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof T=="string")return c(T,!1);if(typeof T=="number")return String(T);if(typeof T=="object")return Array.isArray(T)?m(T):g(T)}function c(h){let y={"'":.1,'"':.2},T={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=i||Object.keys(h),b=[];for(let w of T){let L=l(w,h);if(L!==void 0){let M=f(w)+":";s!==""&&(M+=" "),M+=L,b.push(M)}}let x;if(b.length===0)x="{}";else{let w;if(s==="")w=b.join(","),x="{"+w+"}";else{let L=`, +`&&$(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw St($());case void 0:throw St($())}return $()}function EE(){let e="",t=Qr();if(!Rt.isHexDigit(t)||(e+=$(),t=Qr(),!Rt.isHexDigit(t)))throw St($());return e+=$(),String.fromCodePoint(parseInt(e,16))}function ig(){let e="",t=4;for(;t-- >0;){let n=Qr();if(!Rt.isHexDigit(n))throw St($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var wE={start(){if(tn.type==="eof")throw bi();ng()},beforePropertyName(){switch(tn.type){case"identifier":case"string":og=tn.value,En="afterPropertyName";return;case"punctuator":xl();return;case"eof":throw bi()}},afterPropertyName(){if(tn.type==="eof")throw bi();En="beforePropertyValue"},beforePropertyValue(){if(tn.type==="eof")throw bi();ng()},beforeArrayValue(){if(tn.type==="eof")throw bi();if(tn.type==="punctuator"&&tn.value==="]"){xl();return}ng()},afterPropertyValue(){if(tn.type==="eof")throw bi();switch(tn.value){case",":En="beforePropertyName";return;case"}":xl()}},afterArrayValue(){if(tn.type==="eof")throw bi();switch(tn.value){case",":En="beforeArrayValue";return;case"]":xl()}},end(){}};function ng(){let e;switch(tn.type){case"punctuator":switch(tn.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=tn.value;break}if(Fs===void 0)Fs=e;else{let t=Yr[Yr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,og,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Yr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Yr[Yr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function xl(){Yr.pop();let e=Yr[Yr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function St(e){return sg(e===void 0?`JSON5: invalid end of input at ${Ca}:${lr}`:`JSON5: invalid character '${DE(e)}' at ${Ca}:${lr}`)}function bi(){return sg(`JSON5: invalid end of input at ${Ca}:${lr}`)}function g3(){return lr-=5,sg(`JSON5: invalid identifier character at ${Ca}:${lr}`)}function DE(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function sg(e){let t=new SyntaxError(e);return t.lineNumber=Ca,t.columnNumber=lr,t}var AE=function(e,t,n){let r=[],a="",i,o,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")o=t;else if(Array.isArray(t)){i=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&i.indexOf(y)<0&&i.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let T=y[h];switch(T!=null&&(typeof T.toJSON5=="function"?T=T.toJSON5(h):typeof T.toJSON=="function"&&(T=T.toJSON(h))),o&&(T=o.call(y,h,T)),T instanceof Number?T=Number(T):T instanceof String?T=String(T):T instanceof Boolean&&(T=T.valueOf()),T){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof T=="string")return c(T,!1);if(typeof T=="number")return String(T);if(typeof T=="object")return Array.isArray(T)?m(T):g(T)}function c(h){let y={"'":.1,'"':.2},T={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=i||Object.keys(h),b=[];for(let w of T){let L=l(w,h);if(L!==void 0){let M=f(w)+":";s!==""&&(M+=" "),M+=L,b.push(M)}}let x;if(b.length===0)x="{}";else{let w;if(s==="")w=b.join(","),x="{"+w+"}";else{let L=`, `+a;w=b.join(L),x=`{ `+a+w+`, `+y+"}"}}return r.pop(),a=y,x}function f(h){if(h.length===0)return c(h,!0);let y=String.fromCodePoint(h.codePointAt(0));if(!Rt.isIdStartChar(y))return c(h,!0);for(let T=y.length;T=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let T=[];for(let x=0;x()=>(t||e((t={exports:{}}).exports,t),t.exports),OE=(e,t)=>{for(var n in t)cg(e,n,{get:t[n],enumerable:!0})},lg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of FE(t))!IE.call(e,a)&&a!==n&&cg(e,a,{get:()=>t[a],enumerable:!(r=ME(t,a))||r.enumerable});return e},zE=(e,t,n)=>(lg(e,t,"default"),n&&lg(n,t,"default")),f3=(e,t,n)=>(n=e!=null?_E(BE(e)):{},lg(t||!e||!e.__esModule?cg(n,"default",{value:e,enumerable:!0}):n,e)),h3=RE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Dl=="object"&&Dl&&Dl.Object===Object&&Dl,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(A,D,S){var N,F,P,O,z,q,I=0,k=!1,_=!1,B=!0;if(typeof A!="function")throw new TypeError(n);D=v(D)||0,L(S)&&(k=!!S.leading,_="maxWait"in S,P=_?y(v(S.maxWait)||0,D):P,B="trailing"in S?!!S.trailing:B);function H(ae){var X=N,Se=F;return N=F=void 0,I=ae,O=A.apply(Se,X),O}function j(ae){return I=ae,z=setTimeout(ie,D),k?H(ae):O}function G(ae){var X=ae-q,Se=ae-I,se=D-X;return _?T(se,P-Se):se}function V(ae){var X=ae-q,Se=ae-I;return q===void 0||X>=D||X<0||_&&Se>=P}function ie(){var ae=b();if(V(ae))return te(ae);z=setTimeout(ie,G(ae))}function te(ae){return z=void 0,B&&N?H(ae):(N=F=void 0,O)}function J(){z!==void 0&&clearTimeout(z),I=0,N=q=F=z=void 0}function ce(){return z===void 0?O:te(b())}function he(){var ae=b(),X=V(ae);if(N=arguments,F=this,q=ae,X){if(z===void 0)return j(q);if(_)return z=setTimeout(ie,D),H(q)}return z===void 0&&(z=setTimeout(ie,D)),O}return he.cancel=J,he.flush=ce,he}function w(A,D,S){var N=!0,F=!0;if(typeof A!="function")throw new TypeError(n);return L(S)&&(N="leading"in S?!!S.leading:N,F="trailing"in S?!!S.trailing:F),x(A,D,{leading:N,maxWait:D,trailing:F})}function L(A){var D=typeof A;return!!A&&(D=="object"||D=="function")}function M(A){return!!A&&typeof A=="object"}function C(A){return typeof A=="symbol"||M(A)&&h.call(A)==a}function v(A){if(typeof A=="number")return A;if(C(A))return r;if(L(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=L(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=A.replace(i,"");var S=s.test(A);return S||u.test(A)?l(A.slice(2),S?2:8):o.test(A)?r:+A}t.exports=w}),b3={};OE(b3,{default:()=>cr});var NE=f3(h3());zE(b3,f3(h3()));var{default:m3,...UE}=NE,cr=m3!==void 0?m3:UE;p();p();var Al=globalThis||(typeof window<"u"?window:self),qE=Object.create,gg=Object.defineProperty,jE=Object.getOwnPropertyDescriptor,HE=Object.getOwnPropertyNames,WE=Object.getPrototypeOf,KE=Object.prototype.hasOwnProperty,GE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VE=(e,t)=>{for(var n in t)gg(e,n,{get:t[n],enumerable:!0})},dg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HE(t))!KE.call(e,a)&&a!==n&&gg(e,a,{get:()=>t[a],enumerable:!(r=jE(t,a))||r.enumerable});return e},$E=(e,t,n)=>(dg(e,t,"default"),n&&dg(n,t,"default")),T3=(e,t,n)=>(n=e!=null?qE(WE(e)):{},dg(t||!e||!e.__esModule?gg(n,"default",{value:e,enumerable:!0}):n,e)),v3=GE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Al=="object"&&Al&&Al.Object===Object&&Al,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(v,A,D){var S,N,F,P,O,z,q=0,I=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);A=C(A)||0,w(D)&&(I=!!D.leading,k="maxWait"in D,F=k?y(C(D.maxWait)||0,A):F,_="trailing"in D?!!D.trailing:_);function B(he){var ae=S,X=N;return S=N=void 0,q=he,P=v.apply(X,ae),P}function H(he){return q=he,O=setTimeout(V,A),I?B(he):P}function j(he){var ae=he-z,X=he-q,Se=A-ae;return k?T(Se,F-X):Se}function G(he){var ae=he-z,X=he-q;return z===void 0||ae>=A||ae<0||k&&X>=F}function V(){var he=b();if(G(he))return ie(he);O=setTimeout(V,j(he))}function ie(he){return O=void 0,_&&S?B(he):(S=N=void 0,P)}function te(){O!==void 0&&clearTimeout(O),q=0,S=z=N=O=void 0}function J(){return O===void 0?P:ie(b())}function ce(){var he=b(),ae=G(he);if(S=arguments,N=this,z=he,ae){if(O===void 0)return H(z);if(k)return O=setTimeout(V,A),B(z)}return O===void 0&&(O=setTimeout(V,A)),P}return ce.cancel=te,ce.flush=J,ce}function w(v){var A=typeof v;return!!v&&(A=="object"||A=="function")}function L(v){return!!v&&typeof v=="object"}function M(v){return typeof v=="symbol"||L(v)&&h.call(v)==a}function C(v){if(typeof v=="number")return v;if(M(v))return r;if(w(v)){var A=typeof v.valueOf=="function"?v.valueOf():v;v=w(A)?A+"":A}if(typeof v!="string")return v===0?v:+v;v=v.replace(i,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):o.test(v)?r:+v}t.exports=x}),S3={};VE(S3,{default:()=>Fs});var YE=T3(v3());$E(S3,T3(v3()));var{default:y3,...QE}=YE,Fs=y3!==void 0?y3:QE;p();p();var ZE=Object.create,mg=Object.defineProperty,JE=Object.getOwnPropertyDescriptor,XE=Object.getOwnPropertyNames,ew=Object.getPrototypeOf,tw=Object.prototype.hasOwnProperty,nw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rw=(e,t)=>{for(var n in t)mg(e,n,{get:t[n],enumerable:!0})},pg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of XE(t))!tw.call(e,a)&&a!==n&&mg(e,a,{get:()=>t[a],enumerable:!(r=JE(t,a))||r.enumerable});return e},aw=(e,t,n)=>(pg(e,t,"default"),n&&pg(n,t,"default")),x3=(e,t,n)=>(n=e!=null?ZE(ew(e)):{},pg(t||!e||!e.__esModule?mg(n,"default",{value:e,enumerable:!0}):n,e)),E3=nw((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(i)==="object"?i.exports=g():(s=[],o=g,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function g(m){if(f[m])return f[m].exports;var h=f[m]={i:m,l:!1,exports:{}};return c[m].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var f={};return g.m=c,g.c=f,g.i=function(m){return m},g.d=function(m,h,y){g.o(m,h)||Object.defineProperty(m,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(m){var h=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(h,"a",h),h},g.o=function(m,h){return Object.prototype.hasOwnProperty.call(m,h)},g.p="",g(g.s=0)}([function(c,g,f){function m(j,G){var V={};for(var ie in j)G.indexOf(ie)>=0||Object.prototype.hasOwnProperty.call(j,ie)&&(V[ie]=j[ie]);return V}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},y=Object.assign||function(j){for(var G=1;G'+ie+"
",Se.onclick=function(){return F(se,X)},Se.listener=function(ue){(D(ue)||S(ue))&&z()},N(Se,X),J&&J<1&&(J=1),!he&&J&&L(J).then(function(){return F(se,X)})},I=g.force=function(j,G){var V=j.type,ie=V===void 0?5:V,te=j.text,J=j.buttonText,ce=J===void 0?"OK":J,he=j.callback,ae=j.position,X=ae===void 0?b.positions.force||X.top:ae;M(),z();var Se=document.createElement("div"),se=C();Se.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var ke=document.createElement("div");ke.classList.add(b.classes.button),ke.classList.add(v[ie]),ke.innerHTML=ce,ke.onclick=function(){F(se,X),O(),he?he():G&&G()},Se.appendChild(ue),Se.appendChild(ke),Se.listener=function(We){D(We)&&ke.click()},N(Se,X),P()},k=g.confirm=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Yes":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.confirm||se.top:Se;M(),z();var ue=document.createElement("div"),ke=C();ue.id=ke;var We=document.createElement("div");We.classList.add(b.classes.textbox),We.classList.add(b.classes.backgroundInfo),We.innerHTML='
'+ie+"
";var Re=document.createElement("div");Re.classList.add(b.classes.button),Re.classList.add(b.classes.elementHalf),Re.classList.add(b.classes.backgroundSuccess),Re.innerHTML=J,Re.onclick=function(){F(ke,se),O(),ae?ae():G&&G()};var me=document.createElement("div");me.classList.add(b.classes.button),me.classList.add(b.classes.elementHalf),me.classList.add(b.classes.backgroundError),me.innerHTML=he,me.onclick=function(){F(ke,se),O(),X?X():V&&V()},ue.appendChild(We),ue.appendChild(Re),ue.appendChild(me),ue.listener=function(Et){D(Et)?Re.click():S(Et)&&me.click()},N(ue,se),P(ue,se)},_=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Submit":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.input||se.top:Se,ue=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);M(),z();var ke=document.createElement("div"),We=C();ke.id=We;var Re=document.createElement("div");Re.classList.add(b.classes.textbox),Re.classList.add(b.classes.backgroundInfo),Re.innerHTML='
'+ie+"
";var me=document.createElement("input");me.classList.add(b.classes.inputField),me.setAttribute("autocapitalize",ue.autocapitalize||"none"),me.setAttribute("autocomplete",ue.autocomplete||"off"),me.setAttribute("autocorrect",ue.autocorrect||"off"),me.setAttribute("autofocus",ue.autofocus||"true"),me.setAttribute("inputmode",ue.inputmode||"verbatim"),me.setAttribute("max",ue.max||""),me.setAttribute("maxlength",ue.maxlength||""),me.setAttribute("min",ue.min||""),me.setAttribute("minlength",ue.minlength||""),me.setAttribute("placeholder",ue.placeholder||""),me.setAttribute("spellcheck",ue.spellcheck||"default"),me.setAttribute("step",ue.step||"any"),me.setAttribute("type",ue.type||"text"),me.value=ue.value||"",ue.allowed&&(me.oninput=function(){var kt=void 0;if(Array.isArray(ue.allowed)){for(var Bt="",vn=ue.allowed,Yn=0;Yn'+V+"",X.appendChild(se),ce.forEach(function(ke,We){var Re=ke.type,me=Re===void 0?1:Re,Et=ke.text,Gt=ke.handler,kt=document.createElement("div");kt.classList.add(v[me]),kt.classList.add(b.classes.button),kt.classList.add(b.classes.selectChoice);var Bt=ce[We+1];Bt&&!Bt.type&&(Bt.type=1),Bt&&Bt.type===me&&kt.classList.add(b.classes.selectChoiceRepeated),kt.innerHTML=Et,kt.onclick=function(){F(Se,ae),O(),Gt()},X.appendChild(kt)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){F(Se,ae),O(),J?J():G&&G()},X.appendChild(ue),X.listener=function(ke){S(ke)&&ue.click()},N(X,ae),P(X,ae)},H=g.date=function(j,G,V){var ie=j.value,te=ie===void 0?new Date:ie,J=j.submitText,ce=J===void 0?"OK":J,he=j.cancelText,ae=he===void 0?"Cancel":he,X=j.submitCallback,Se=j.cancelCallback,se=j.position,ue=se===void 0?b.positions.date||ue.top:se;M(),z();var ke="▾",We=document.createElement("div"),Re=document.createElement("div"),me=document.createElement("div"),Et=function(wt){We.innerHTML=b.dateMonths[wt.getMonth()],Re.innerHTML=wt.getDate(),me.innerHTML=wt.getFullYear()},Gt=function(wt){var nt=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),jn=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(jn)>nt&&(jn=nt.toString()),wt.target.textContent=jn,Number(jn)<1&&(jn="1"),te.setDate(Number(jn))},kt=function(wt){var nt=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);wt.target.textContent=nt,te.setFullYear(Number(nt))},Bt=function(wt){Et(te)},vn=function(wt){var nt=new Date(te.getFullYear(),te.getMonth()+wt+1,0).getDate();te.getDate()>nt&&te.setDate(nt),te.setMonth(te.getMonth()+wt),Et(te)},Yn=function(wt){te.setDate(te.getDate()+wt),Et(te)},vs=function(wt){var nt=te.getFullYear()+wt;nt<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+wt),Et(te)},Dr=document.createElement("div"),di=C();Dr.id=di;var no=document.createElement("div");no.classList.add(b.classes.backgroundInfo);var dn=document.createElement("div");dn.classList.add(b.classes.dateSelectorInner);var sr=document.createElement("div");sr.classList.add(b.classes.button),sr.classList.add(b.classes.elementThird),sr.classList.add(b.classes.dateSelectorUp),sr.innerHTML=ke;var gn=document.createElement("div");gn.classList.add(b.classes.button),gn.classList.add(b.classes.elementThird),gn.classList.add(b.classes.dateSelectorUp),gn.innerHTML=ke;var qn=document.createElement("div");qn.classList.add(b.classes.button),qn.classList.add(b.classes.elementThird),qn.classList.add(b.classes.dateSelectorUp),qn.innerHTML=ke,We.classList.add(b.classes.element),We.classList.add(b.classes.elementThird),We.innerHTML=b.dateMonths[te.getMonth()],Re.classList.add(b.classes.element),Re.classList.add(b.classes.elementThird),Re.setAttribute("contentEditable",!0),Re.addEventListener("input",Gt),Re.addEventListener("blur",Bt),Re.innerHTML=te.getDate(),me.classList.add(b.classes.element),me.classList.add(b.classes.elementThird),me.setAttribute("contentEditable",!0),me.addEventListener("input",kt),me.addEventListener("blur",Bt),me.innerHTML=te.getFullYear();var jr=document.createElement("div");jr.classList.add(b.classes.button),jr.classList.add(b.classes.elementThird),jr.innerHTML=ke;var Hr=document.createElement("div");Hr.classList.add(b.classes.button),Hr.classList.add(b.classes.elementThird),Hr.innerHTML=ke;var gi=document.createElement("div");gi.classList.add(b.classes.button),gi.classList.add(b.classes.elementThird),gi.innerHTML=ke,sr.onclick=function(){return vn(1)},gn.onclick=function(){return Yn(1)},qn.onclick=function(){return vs(1)},jr.onclick=function(){return vn(-1)},Hr.onclick=function(){return Yn(-1)},gi.onclick=function(){return vs(-1)};var Sn=document.createElement("div");Sn.classList.add(b.classes.button),Sn.classList.add(b.classes.elementHalf),Sn.classList.add(b.classes.backgroundSuccess),Sn.innerHTML=ce,Sn.onclick=function(){F(di,ue),O(),X?X(te):G&&G(te)};var Wr=document.createElement("div");Wr.classList.add(b.classes.button),Wr.classList.add(b.classes.elementHalf),Wr.classList.add(b.classes.backgroundError),Wr.innerHTML=ae,Wr.onclick=function(){F(di,ue),O(),Se?Se(te):V&&V(te)},dn.appendChild(sr),dn.appendChild(gn),dn.appendChild(qn),dn.appendChild(We),dn.appendChild(Re),dn.appendChild(me),dn.appendChild(jr),dn.appendChild(Hr),dn.appendChild(gi),no.appendChild(dn),Dr.appendChild(no),Dr.appendChild(Sn),Dr.appendChild(Wr),Dr.listener=function(wt){D(wt)?Sn.click():S(wt)&&Wr.click()},N(Dr,ue),P(Dr,ue)};g.default={alert:q,force:I,confirm:k,input:_,select:B,date:H,setOptions:x,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),w3={};rw(w3,{default:()=>kl});var iw=x3(E3());aw(w3,x3(E3()));var{default:C3,...ow}=iw,kl=C3!==void 0?C3:ow;p();p();var Pl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Bs(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function fg(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function D3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let i=0;igo[e.toLowerCase()]||dr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),sw=e=>Object.keys(go).find(t=>go[t]===e),uw=e=>Object.keys(dr).find(t=>dr[t]===e);function M3(e){L3=e||"all"}function Is(){return L3||"all"}function lw(){return gt.slice(0)}function cw(){return gt.map(e=>sw(e)||uw(e)||String.fromCharCode(e))}function dw(){let e=[];return Object.keys(Dt).forEach(t=>{Dt[t].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{e.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Rs(o))})})}),e}function gw(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function pw(e){return typeof e=="string"&&(e=Rs(e)),gt.indexOf(e)!==-1}function mw(e,t){let n,r;e||(e=Is());for(let a in Dt)if(Object.prototype.hasOwnProperty.call(Dt,a))for(n=Dt[a],r=0;r=0&>.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&>.splice(0,gt.length),(t===93||t===224)&&(t=91),t in tn){tn[t]=!1;for(let r in dr)dr[r]===t&&(Zr[r]=!1)}}function F3(e,...t){if(typeof e>"u")Object.keys(Dt).forEach(n=>delete Dt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&bg(n)});else if(typeof e=="object")e.key&&bg(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),bg({key:e,scope:n,method:r,splitKey:"+"})}}var bg=({key:e,scope:t,method:n,splitKey:r="+"})=>{hg(e).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Rs(u);if(!Dt[l])return;t||(t=Is());let c=s>1?fg(dr,o):[];Dt[l]=Dt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&D3(g.mods,c)))})};function k3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let i in tn)Object.prototype.hasOwnProperty.call(tn,i)&&(!tn[i]&&t.mods.indexOf(+i)>-1||tn[i]&&t.mods.indexOf(+i)===-1)&&(a=!1);(t.mods.length===0&&!tn[16]&&!tn[18]&&!tn[17]&&!tn[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(gt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function P3(e,t){let n=Dt["*"],r=e.keyCode||e.which||e.charCode;if(!Zr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),gt.indexOf(r)===-1&&r!==229&>.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=Ll[i];e[i]&>.indexOf(o)===-1?gt.push(o):!e[i]&>.indexOf(o)>-1?gt.splice(gt.indexOf(o),1):i==="metaKey"&&e[i]&>.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(gt=gt.slice(gt.indexOf(o))))}),r in tn){tn[r]=!0;for(let i in dr)dr[i]===r&&(Zr[i]=!0);if(!n)return}for(let i in tn)Object.prototype.hasOwnProperty.call(tn,i)&&(tn[i]=e[Ll[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(gt.indexOf(17)===-1&>.push(17),gt.indexOf(18)===-1&>.push(18),tn[17]=!0,tn[18]=!0);let a=Is();if(n)for(let i=0;i-1}function Zr(e,t,n){gt=[];let r=hg(e),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",g=!1,f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(o=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(f=!0)),typeof t=="string"&&(i=t),f&&F3(e,i);s1&&(a=fg(dr,e)),e=e[e.length-1],e=e==="*"?"*":Rs(e),e in Dt||(Dt[e]=[]),Dt[e].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!hw(o)&&window&&(_3.push(o),Bs(o,"keydown",m=>{P3(m,o)},g),A3||(A3=!0,Bs(window,"focus",()=>{gt=[]},g),Bs(window,"click",()=>{gt=[]},!1)),Bs(o,"keyup",m=>{P3(m,o),fw(m)},g))}function bw(e,t="all"){Object.keys(Dt).forEach(n=>{Dt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var yg={getPressedKeyString:cw,setScope:M3,getScope:Is,deleteScope:mw,getPressedKeyCodes:lw,getAllKeyCodes:dw,isPressed:pw,filter:gw,trigger:bw,unbind:F3,keyMap:go,modifier:dr,modifierMap:Ll};for(let e in yg)Object.prototype.hasOwnProperty.call(yg,e)&&(Zr[e]=yg[e]);if(typeof window<"u"){let e=window.hotkeys;Zr.noConflict=t=>(t&&window.hotkeys===Zr&&(window.hotkeys=e),Zr),window.hotkeys=Zr}var Ut=Zr;p();p();var yw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ot={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},wn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),i=Math.max(r,a),o=0,s=Y.map([e,t],u=>{let l=i-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return e}static getBrowserAlias(e){return yw[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},pt=/version\/(\d+(\.?_?\d+)+)/i,Tw=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(pt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(pt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],vw=Tw,Sw=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:wn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:wn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:wn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:wn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:wn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:wn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:wn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:wn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:wn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:wn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:wn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:wn.Linux}}},{test:[/CrOS/],describe(){return{name:wn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:wn.PlayStation4,version:t}}}],Cw=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ot.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ot.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ot.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ot.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ot.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ot.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ot.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ot.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ot.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ot.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ot.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ot.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ot.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ot.tv}}}],xw=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:xa.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:xa.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:xa.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:xa.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:xa.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xa.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:xa.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Ew=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(vw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Sw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Cw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(xw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(i=>{let o=e[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(t[i]=o,n+=1)}),n>0){let i=Object.keys(t),o=Y.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(t[o]);if(u!==void 0)return u}let s=Y.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=Y.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},B3=Ew,ww=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new B3(e,t)}static parse(e){return new B3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return xa}static get OS_MAP(){return wn}static get PLATFORMS_MAP(){return Ot}},po=ww;p();p();var{entries:H3,setPrototypeOf:R3,isFrozen:Dw,getPrototypeOf:Aw,getOwnPropertyDescriptor:kw}=Object,{freeze:Dn,seal:pr,create:Pw}=Object,{apply:Eg,construct:wg}=typeof Reflect<"u"&&Reflect;Eg||(Eg=function(e,t,n){return e.apply(t,n)});Dn||(Dn=function(e){return e});pr||(pr=function(e){return e});wg||(wg=function(e,t){return new e(...t)});var Lw=Jn(Array.prototype.forEach),O3=Jn(Array.prototype.pop),Os=Jn(Array.prototype.push),Fl=Jn(String.prototype.toLowerCase),Tg=Jn(String.prototype.toString),_w=Jn(String.prototype.match),gr=Jn(String.prototype.replace),Mw=Jn(String.prototype.indexOf),Fw=Jn(String.prototype.trim),Wn=Jn(RegExp.prototype.test),zs=Bw(TypeError);function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Nw=pr(/\${[\w\W]*}/gm),Uw=pr(/^data-[\-\w.\u00B7-\uFFFF]/),qw=pr(/^aria-[\-\w]+$/),W3=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=pr(/^(?:\w+script|data):/i),Hw=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K3=pr(/^html$/i),j3=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ow,ERB_EXPR:zw,TMPLIT_EXPR:Nw,DATA_ATTR:Uw,ARIA_ATTR:qw,IS_ALLOWED_URI:W3,IS_SCRIPT_OR_DATA:jw,ATTR_WHITESPACE:Hw,DOCTYPE_NAME:K3}),Ww=()=>typeof window>"u"?null:window,Kw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function G3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww(),t=U=>G3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:f,trustedTypes:m}=e,h=u.prototype,y=_l(h,"cloneNode"),T=_l(h,"nextSibling"),b=_l(h,"childNodes"),x=_l(h,"parentNode");if(typeof o=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let w,L="",{implementation:M,createNodeIterator:C,createDocumentFragment:v,getElementsByTagName:A}=a,{importNode:D}=n,S={};t.isSupported=typeof H3=="function"&&typeof x=="function"&&M&&M.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:F,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:I}=j3,{IS_ALLOWED_URI:k}=j3,_=null,B=He({},[...z3,...vg,...Sg,...Cg,...N3]),H=null,j=He({},[...U3,...xg,...q3,...Ml]),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ie=null,te=!0,J=!0,ce=!1,he=!0,ae=!1,X=!1,Se=!1,se=!1,ue=!1,ke=!1,We=!1,Re=!0,me=!1,Et="user-content-",Gt=!0,kt=!1,Bt={},vn=null,Yn=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),vs=null,Dr=He({},["audio","video","img","source","image","track"]),di=null,no=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml",qn=gn,jr=!1,Hr=null,gi=He({},[dn,sr,gn],Tg),Sn,Wr=["application/xhtml+xml","text/html"],wt="text/html",nt,jn=null,qS=a.createElement("form"),qh=function(U){return U instanceof RegExp||U instanceof Function},fd=function(U){if(!(jn&&jn===U)){if((!U||typeof U!="object")&&(U={}),U=mo(U),Sn=Wr.indexOf(U.PARSER_MEDIA_TYPE)===-1?Sn=wt:Sn=U.PARSER_MEDIA_TYPE,nt=Sn==="application/xhtml+xml"?Tg:Fl,_="ALLOWED_TAGS"in U?He({},U.ALLOWED_TAGS,nt):B,H="ALLOWED_ATTR"in U?He({},U.ALLOWED_ATTR,nt):j,Hr="ALLOWED_NAMESPACES"in U?He({},U.ALLOWED_NAMESPACES,Tg):gi,di="ADD_URI_SAFE_ATTR"in U?He(mo(no),U.ADD_URI_SAFE_ATTR,nt):no,vs="ADD_DATA_URI_TAGS"in U?He(mo(Dr),U.ADD_DATA_URI_TAGS,nt):Dr,vn="FORBID_CONTENTS"in U?He({},U.FORBID_CONTENTS,nt):Yn,V="FORBID_TAGS"in U?He({},U.FORBID_TAGS,nt):{},ie="FORBID_ATTR"in U?He({},U.FORBID_ATTR,nt):{},Bt="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,J=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,ke=U.RETURN_DOM_FRAGMENT||!1,We=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Re=U.SANITIZE_DOM!==!1,me=U.SANITIZE_NAMED_PROPS||!1,Gt=U.KEEP_CONTENT!==!1,kt=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||W3,qn=U.NAMESPACE||gn,G=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(J=!1),ke&&(ue=!0),Bt&&(_=He({},[...N3]),H=[],Bt.html===!0&&(He(_,z3),He(H,U3)),Bt.svg===!0&&(He(_,vg),He(H,xg),He(H,Ml)),Bt.svgFilters===!0&&(He(_,Sg),He(H,xg),He(H,Ml)),Bt.mathMl===!0&&(He(_,Cg),He(H,q3),He(H,Ml))),U.ADD_TAGS&&(_===B&&(_=mo(_)),He(_,U.ADD_TAGS,nt)),U.ADD_ATTR&&(H===j&&(H=mo(H)),He(H,U.ADD_ATTR,nt)),U.ADD_URI_SAFE_ATTR&&He(di,U.ADD_URI_SAFE_ATTR,nt),U.FORBID_CONTENTS&&(vn===Yn&&(vn=mo(vn)),He(vn,U.FORBID_CONTENTS,nt)),Gt&&(_["#text"]=!0),X&&He(_,["html","head","body"]),_.table&&(He(_,["tbody"]),delete V.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw zs('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw zs('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=U.TRUSTED_TYPES_POLICY,L=w.createHTML("")}else w===void 0&&(w=Kw(m,r)),w!==null&&typeof L=="string"&&(L=w.createHTML(""));Dn&&Dn(U),jn=U}},jh=He({},["mi","mo","mn","ms","mtext"]),Hh=He({},["foreignobject","desc","title","annotation-xml"]),jS=He({},["title","style","font","a","script"]),al=He({},vg);He(al,Sg),He(al,Iw);let hd=He({},Cg);He(hd,Rw);let HS=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:qn,tagName:"template"});let ne=Fl(U.tagName),Xe=Fl(ge.tagName);return Hr[U.namespaceURI]?U.namespaceURI===sr?ge.namespaceURI===gn?ne==="svg":ge.namespaceURI===dn?ne==="svg"&&(Xe==="annotation-xml"||jh[Xe]):!!al[ne]:U.namespaceURI===dn?ge.namespaceURI===gn?ne==="math":ge.namespaceURI===sr?ne==="math"&&Hh[Xe]:!!hd[ne]:U.namespaceURI===gn?ge.namespaceURI===sr&&!Hh[Xe]||ge.namespaceURI===dn&&!jh[Xe]?!1:!hd[ne]&&(jS[ne]||!al[ne]):!!(Sn==="application/xhtml+xml"&&Hr[U.namespaceURI]):!1},ro=function(U){Os(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},bd=function(U,ge){try{Os(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{Os(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!H[U])if(ue||ke)try{ro(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Wh=function(U){let ge,ne;if(se)U=""+U;else{let Cn=_w(U,/^[\r\n\t ]+/);ne=Cn&&Cn[0]}Sn==="application/xhtml+xml"&&qn===gn&&(U=''+U+"");let Xe=w?w.createHTML(U):U;if(qn===gn)try{ge=new f().parseFromString(Xe,Sn)}catch{}if(!ge||!ge.documentElement){ge=M.createDocument(qn,"template",null);try{ge.documentElement.innerHTML=jr?L:Xe}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),qn===gn?A.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},Kh=function(U){return C.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},WS=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},il=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Kr=function(U,ge,ne){S[U]&&Lw(S[U],Xe=>{Xe.call(t,ge,ne,jn)})},Gh=function(U){let ge;if(Kr("beforeSanitizeElements",U,null),WS(U))return ro(U),!0;let ne=nt(U.nodeName);if(Kr("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!il(U.firstElementChild)&&(!il(U.content)||!il(U.content.firstElementChild))&&Wn(/<[/\w]/g,U.innerHTML)&&Wn(/<[/\w]/g,U.textContent))return ro(U),!0;if(!_[ne]||V[ne]){if(!V[ne]&&$h(ne)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne)))return!1;if(Gt&&!vn[ne]){let Xe=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Xe){let Cn=Vt.length;for(let Fn=Cn-1;Fn>=0;--Fn)Xe.insertBefore(y(Vt[Fn],!0),T(U))}}return ro(U),!0}return U instanceof u&&!HS(U)||(ne==="noscript"||ne==="noembed")&&Wn(/<\/no(script|embed)/i,U.innerHTML)?(ro(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=gr(ge,N," "),ge=gr(ge,F," "),ge=gr(ge,P," "),U.textContent!==ge&&(Os(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Kr("afterSanitizeElements",U,null),!1)},Vh=function(U,ge,ne){if(Re&&(ge==="id"||ge==="name")&&(ne in a||ne in qS))return!1;if(!(J&&!ie[ge]&&Wn(O,ge))&&!(te&&Wn(z,ge))){if(!H[ge]||ie[ge]){if(!($h(U)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))&&(G.attributeNameCheck instanceof RegExp&&Wn(G.attributeNameCheck,ge)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(ge))||ge==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne))))return!1}else if(!di[ge]&&!Wn(k,gr(ne,I,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&Mw(ne,"data:")===0&&vs[U])&&!(ce&&!Wn(q,gr(ne,I,"")))&&ne)return!1}return!0},$h=function(U){return U.indexOf("-")>0},Yh=function(U){let ge,ne,Xe,Vt;Kr("beforeSanitizeAttributes",U,null);let{attributes:Cn}=U;if(!Cn)return;let Fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Vt=Cn.length;Vt--;){ge=Cn[Vt];let{name:Xt,namespaceURI:ao}=ge;if(ne=Xt==="value"?ge.value:Fw(ge.value),Xe=nt(Xt),Fn.attrName=Xe,Fn.attrValue=ne,Fn.keepAttr=!0,Fn.forceKeepAttr=void 0,Kr("uponSanitizeAttribute",U,Fn),ne=Fn.attrValue,Fn.forceKeepAttr||(bd(Xt,U),!Fn.keepAttr))continue;if(!he&&Wn(/\/>/i,ne)){bd(Xt,U);continue}ae&&(ne=gr(ne,N," "),ne=gr(ne,F," "),ne=gr(ne,P," "));let Qh=nt(U.nodeName);if(Vh(Qh,Xe,ne)){if(me&&(Xe==="id"||Xe==="name")&&(bd(Xt,U),ne=Et+ne),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ao)switch(m.getAttributeType(Qh,Xe)){case"TrustedHTML":{ne=w.createHTML(ne);break}case"TrustedScriptURL":{ne=w.createScriptURL(ne);break}}try{ao?U.setAttributeNS(ao,Xt,ne):U.setAttribute(Xt,ne),O3(t.removed)}catch{}}}Kr("afterSanitizeAttributes",U,null)},KS=function U(ge){let ne,Xe=Kh(ge);for(Kr("beforeSanitizeShadowDOM",ge,null);ne=Xe.nextNode();)Kr("uponSanitizeShadowNode",ne,null),!Gh(ne)&&(ne.content instanceof i&&U(ne.content),Yh(ne));Kr("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Xe,Vt,Cn;if(jr=!U,jr&&(U=""),typeof U!="string"&&!il(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw zs("dirty is not a string, aborting")}else throw zs("toString is not a function");if(!t.isSupported)return U;if(Se||fd(ge),t.removed=[],typeof U=="string"&&(kt=!1),kt){if(U.nodeName){let ao=nt(U.nodeName);if(!_[ao]||V[ao])throw zs("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Wh(""),Xe=ne.ownerDocument.importNode(U,!0),Xe.nodeType===1&&Xe.nodeName==="BODY"||Xe.nodeName==="HTML"?ne=Xe:ne.appendChild(Xe);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return w&&We?w.createHTML(U):U;if(ne=Wh(U),!ne)return ue?null:We?L:""}ne&&se&&ro(ne.firstChild);let Fn=Kh(kt?U:ne);for(;Vt=Fn.nextNode();)Gh(Vt)||(Vt.content instanceof i&&KS(Vt.content),Yh(Vt));if(kt)return U;if(ue){if(ke)for(Cn=v.call(ne.ownerDocument);ne.firstChild;)Cn.appendChild(ne.firstChild);else Cn=ne;return(H.shadowroot||H.shadowrootmod)&&(Cn=D.call(n,Cn,!0)),Cn}let Xt=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Wn(K3,ne.ownerDocument.doctype.name)&&(Xt=" -`+Xt),ae&&(Xt=gr(Xt,N," "),Xt=gr(Xt,F," "),Xt=gr(Xt,P," ")),w&&We?w.createHTML(Xt):Xt},t.setConfig=function(U){fd(U),Se=!0},t.clearConfig=function(){jn=null,Se=!1},t.isValidAttribute=function(U,ge,ne){jn||fd({});let Xe=nt(U),Vt=nt(ge);return Vh(Xe,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(S[U]=S[U]||[],Os(S[U],ge))},t.removeHook=function(U){if(S[U])return O3(S[U])},t.removeHooks=function(U){S[U]&&(S[U]=[])},t.removeAllHooks=function(){S={}},t}var rt=G3();p();p();var Gw=Object.create,Ag=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,$w=Object.getOwnPropertyNames,Yw=Object.getPrototypeOf,Qw=Object.prototype.hasOwnProperty,kg=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zw=(e,t)=>{for(var n in t)Ag(e,n,{get:t[n],enumerable:!0})},Dg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $w(t))!Qw.call(e,a)&&a!==n&&Ag(e,a,{get:()=>t[a],enumerable:!(r=Vw(t,a))||r.enumerable});return e},Jw=(e,t,n)=>(Dg(e,t,"default"),n&&Dg(n,t,"default")),$3=(e,t,n)=>(n=e!=null?Gw(Yw(e)):{},Dg(t||!e||!e.__esModule?Ag(n,"default",{value:e,enumerable:!0}):n,e)),Xw=kg((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var f=this._doc.createElement("span");l.firstChild;)f.appendChild(l.firstChild);l.parentNode.replaceChild(f,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),f=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),g&&l.setAttribute("poster",o(g)),f){var m=f.replace(this.REGEXPS.srcsetUrl,function(h,y,T,b){return o(y)+(T||"")+b});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var f=s(a);return f<=4&&(!o||f!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,f=l.firstChild;f;){var m=f.nextSibling;if(this._isPhrasingContent(f))g!==null?g.appendChild(f):this._isWhitespace(f)||(g=a.createElement("p"),l.replaceChild(g,f),g.appendChild(f));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}f=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var ke=this._getInnerText(ue);if(!(ke.length<25)){var We=this._getNodeAncestors(ue,5);if(We.length!==0){var Re=0;Re+=1,Re+=ke.split(",").length,Re+=Math.min(Math.floor(ke.length/100),3),this._forEachNode(We,function(me,Et){if(!(!me.tagName||!me.parentNode||typeof me.parentNode.tagName>"u")){if(typeof me.readability>"u"&&(this._initializeNode(me),y.push(me)),Et===0)var Gt=1;else Et===1?Gt=2:Gt=Et*3;me.readability.contentScore+=Re/Gt}})}}}});for(var T=[],b=0,x=y.length;bC.readability.contentScore){T.splice(M,0,w),T.length>this._nbTopCandidates&&T.pop();break}}}var v=T[0]||null,A=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),A=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var S=[],N=1;N=.75&&S.push(this._getNodeAncestors(T[N]));var F=3;if(S.length>=F)for(D=v.parentNode;D.tagName!=="BODY";){for(var P=0,O=0;O=F){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var z=v.readability.contentScore,q=z/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var I=D.readability.contentScore;if(Iz){v=D;break}z=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");i&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var B=D.children,H=0,j=B.length;H=_)V=!0;else if(G.nodeName==="P"){var te=this._getLinkDensity(G),J=this._getInnerText(G),ce=J.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",G),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)===-1&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),k.appendChild(G),B=D.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),A)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(f){return(f["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(f){return f&&typeof f.name=="string"}).map(function(f){return f.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(f){this.log(f.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),f=l.getAttribute("content");if(f){var m=null,h=null;g&&(m=g.match(s),m&&(h=m[0].toLowerCase().replace(/\s/g,""),i[h]=f.trim())),!m&&c&&u.test(c)&&(h=c,f&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[h]=f.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],f=function(h){return!!o.getElementsByTagName(h)[0]};if(g.some(f)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var g=0;if(c+g<0)return!0;if(this._getCharCount(i,",")<10){for(var f=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,h=i.getElementsByTagName("li").length-100,y=i.getElementsByTagName("input").length,T=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(i,["object","embed","iframe"]),w=0;w1&&f/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&h>f||y>Math.floor(f/3)||!s&&T<.9&&C<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&M>.2||c>=25&&M>.5||b===1&&C<75||b>1;if(s&&v){for(var A=0;A1)return v;let D=i.getElementsByTagName("li").length;if(m==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),e5=kg((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(f){c.add(f.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(f){if(!o.visibilityChecker(f))return!1;var m=f.className+" "+f.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||f.matches("li p"))return!1;var h=f.textContent.trim().length;return ho.minScore)})}typeof t=="object"&&(t.exports=a)}),Y3=kg((e,t)=>{var n=Xw(),r=e5();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Zw(Q3,{Readability:()=>Bl,default:()=>X3,isProbablyReaderable:()=>J3});var Z3=$3(Y3());Jw(Q3,$3(Y3()));var{Readability:Bl,isProbablyReaderable:J3}=Z3,{default:V3,...t5}=Z3,X3=V3!==void 0?V3:t5;var wi={};ol(wi,{Breadcrumbs:()=>Da,BrowserClient:()=>xo,Dedupe:()=>La,FunctionToString:()=>Ci,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,Hub:()=>ra,InboundFilters:()=>xi,Integrations:()=>I8,LinkedErrors:()=>ka,SDK_VERSION:()=>Co,Scope:()=>Xn,TryCatch:()=>Aa,addBreadcrumb:()=>Gl,addGlobalEventProcessor:()=>_r,captureEvent:()=>Wl,captureException:()=>vo,captureMessage:()=>Hl,chromeStackLineParser:()=>op,close:()=>db,configureScope:()=>Kl,createTransport:()=>Zs,defaultIntegrations:()=>pp,defaultStackLineParsers:()=>lp,defaultStackParser:()=>ac,flush:()=>cb,forceLoad:()=>ub,geckoStackLineParser:()=>sp,getCurrentHub:()=>Ie,getHubFromCarrier:()=>er,init:()=>ib,lastEventId:()=>sb,makeFetchTransport:()=>Js,makeMain:()=>To,onLoad:()=>lb,opera10StackLineParser:()=>K2,opera11StackLineParser:()=>G2,setContext:()=>Vl,setExtra:()=>Yl,setExtras:()=>$l,setTag:()=>Zl,setTags:()=>Ql,setUser:()=>Jl,showReportDialog:()=>ob,startTransaction:()=>Xl,winjsStackLineParser:()=>up,withScope:()=>So,wrap:()=>gb});p();p();p();p();p();p();p();p();p();var e2=Object.prototype.toString;function Il(e){switch(e2.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return kr(e,Error)}}function Ns(e,t){return e2.call(e)===`[object ${t}]`}function Rl(e){return Ns(e,"ErrorEvent")}function t2(e){return Ns(e,"DOMException")}function Jr(e){return Ns(e,"String")}function Us(e){return e===null||typeof e!="object"&&typeof e!="function"}function mr(e){return Ns(e,"Object")}function qs(e){return typeof Event<"u"&&kr(e,Event)}function n2(e){return!1}function r2(e){return Ns(e,"RegExp")}function fo(e){return!!(e&&e.then&&typeof e.then=="function")}function a2(e){return mr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function i2(e){return typeof e=="number"&&e!==e}function kr(e,t){try{return e instanceof t}catch{return!1}}function js(e,t){try{let n=e,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function n5(e,t){let n=e,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Jr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let g=l.match(/^\d+/);g&&(l=g[0])}return s2({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function s2(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function o5(e){if(!!1)return;let{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!e[i])throw new Pt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Pt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!a5(r))throw new Pt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Pt(`Invalid Sentry Dsn: Invalid port ${t}`);return!0}function Ol(e){let t=typeof e=="string"?i5(e):s2(e);return o5(t),t}p();var s5={};function mt(){return typeof window<"u"?window:typeof self<"u"?self:s5}function ho(e,t,n){let r=n||mt(),a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}p();p();var Hs=["debug","info","warn","error","log","assert","trace"];function Pg(e){if(!("console"in mt()))return e();let n=console,r={};Hs.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function u2(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Hs.forEach(n=>{t[n]=(...r)=>{e&&Pg(()=>{})}}):Hs.forEach(n=>{t[n]=()=>{}}),t}var Ee;!1?Ee=ho("logger",u2):Ee=u2();p();p();function Ti(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Lg(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Fg(e){if(Il(e))return{message:e.message,name:e.name,stack:e.stack,...c2(e)};if(qs(e)){let t={type:e.type,target:l2(e.target),currentTarget:l2(e.currentTarget),...c2(e)};return typeof CustomEvent<"u"&&kr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function l2(e){try{return n2(e)?js(e):Object.prototype.toString.call(e)}catch{return""}}function c2(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function g2(e,t=40){let n=Object.keys(Fg(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Ti(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:Ti(a,t)}return""}function vi(e){return _g(e,new Map)}function _g(e,t){if(mr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=_g(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(_g(a,t))}),r}return e}p();var u5=50;function Ig(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of t){let s=o(i);if(s){a.push(s);break}}return l5(a)}}function p2(e){return Array.isArray(e)?Ig(...e):e}function l5(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,u5).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Bg="";function hr(e){try{return!e||typeof e!="function"?Bg:e.name||Bg}catch{return Bg}}p();function m2(){if(!("fetch"in mt()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function f2(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function h2(){return!0}var Xr=mt(),Ks={},b2={};function c5(e){if(!b2[e])switch(b2[e]=!0,e){case"console":d5();break;case"fetch":g5();break;case"error":f5();break;case"unhandledrejection":h5();break;default:!1&&Ee.warn("unknown instrumentation type:",e);return}}function br(e,t){Ks[e]=Ks[e]||[],Ks[e].push(t),c5(e)}function yo(e,t){if(!(!e||!Ks[e]))for(let n of Ks[e]||[])try{n(t)}catch(r){!1&&Ee.error(`Error while triggering instrumentation handler. +`+y+"]"}return r.pop(),a=y,b}},kE={parse:SE,stringify:AE},PE=kE,wl=PE;p();p();var UB=Number.isNaN||function(e){return typeof e=="number"&&e!==e};p();p();var Dl=globalThis||(typeof window<"u"?window:self),_E=Object.create,lg=Object.defineProperty,ME=Object.getOwnPropertyDescriptor,FE=Object.getOwnPropertyNames,BE=Object.getPrototypeOf,IE=Object.prototype.hasOwnProperty,RE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),OE=(e,t)=>{for(var n in t)lg(e,n,{get:t[n],enumerable:!0})},ug=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of FE(t))!IE.call(e,a)&&a!==n&&lg(e,a,{get:()=>t[a],enumerable:!(r=ME(t,a))||r.enumerable});return e},zE=(e,t,n)=>(ug(e,t,"default"),n&&ug(n,t,"default")),f3=(e,t,n)=>(n=e!=null?_E(BE(e)):{},ug(t||!e||!e.__esModule?lg(n,"default",{value:e,enumerable:!0}):n,e)),h3=RE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Dl=="object"&&Dl&&Dl.Object===Object&&Dl,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(A,D,S){var N,F,P,O,z,q,I=0,k=!1,_=!1,B=!0;if(typeof A!="function")throw new TypeError(n);D=v(D)||0,L(S)&&(k=!!S.leading,_="maxWait"in S,P=_?y(v(S.maxWait)||0,D):P,B="trailing"in S?!!S.trailing:B);function H(ae){var X=N,Se=F;return N=F=void 0,I=ae,O=A.apply(Se,X),O}function j(ae){return I=ae,z=setTimeout(ie,D),k?H(ae):O}function G(ae){var X=ae-q,Se=ae-I,se=D-X;return _?T(se,P-Se):se}function V(ae){var X=ae-q,Se=ae-I;return q===void 0||X>=D||X<0||_&&Se>=P}function ie(){var ae=b();if(V(ae))return te(ae);z=setTimeout(ie,G(ae))}function te(ae){return z=void 0,B&&N?H(ae):(N=F=void 0,O)}function J(){z!==void 0&&clearTimeout(z),I=0,N=q=F=z=void 0}function ce(){return z===void 0?O:te(b())}function he(){var ae=b(),X=V(ae);if(N=arguments,F=this,q=ae,X){if(z===void 0)return j(q);if(_)return z=setTimeout(ie,D),H(q)}return z===void 0&&(z=setTimeout(ie,D)),O}return he.cancel=J,he.flush=ce,he}function w(A,D,S){var N=!0,F=!0;if(typeof A!="function")throw new TypeError(n);return L(S)&&(N="leading"in S?!!S.leading:N,F="trailing"in S?!!S.trailing:F),x(A,D,{leading:N,maxWait:D,trailing:F})}function L(A){var D=typeof A;return!!A&&(D=="object"||D=="function")}function M(A){return!!A&&typeof A=="object"}function C(A){return typeof A=="symbol"||M(A)&&h.call(A)==a}function v(A){if(typeof A=="number")return A;if(C(A))return r;if(L(A)){var D=typeof A.valueOf=="function"?A.valueOf():A;A=L(D)?D+"":D}if(typeof A!="string")return A===0?A:+A;A=A.replace(i,"");var S=s.test(A);return S||u.test(A)?l(A.slice(2),S?2:8):o.test(A)?r:+A}t.exports=w}),b3={};OE(b3,{default:()=>cr});var NE=f3(h3());zE(b3,f3(h3()));var{default:m3,...UE}=NE,cr=m3!==void 0?m3:UE;p();p();var Al=globalThis||(typeof window<"u"?window:self),qE=Object.create,dg=Object.defineProperty,jE=Object.getOwnPropertyDescriptor,HE=Object.getOwnPropertyNames,WE=Object.getPrototypeOf,KE=Object.prototype.hasOwnProperty,GE=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VE=(e,t)=>{for(var n in t)dg(e,n,{get:t[n],enumerable:!0})},cg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HE(t))!KE.call(e,a)&&a!==n&&dg(e,a,{get:()=>t[a],enumerable:!(r=jE(t,a))||r.enumerable});return e},$E=(e,t,n)=>(cg(e,t,"default"),n&&cg(n,t,"default")),T3=(e,t,n)=>(n=e!=null?qE(WE(e)):{},cg(t||!e||!e.__esModule?dg(n,"default",{value:e,enumerable:!0}):n,e)),v3=GE((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Al=="object"&&Al&&Al.Object===Object&&Al,g=typeof self=="object"&&self&&self.Object===Object&&self,f=c||g||Function("return this")(),m=Object.prototype,h=m.toString,y=Math.max,T=Math.min,b=function(){return f.Date.now()};function x(v,A,D){var S,N,F,P,O,z,q=0,I=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);A=C(A)||0,w(D)&&(I=!!D.leading,k="maxWait"in D,F=k?y(C(D.maxWait)||0,A):F,_="trailing"in D?!!D.trailing:_);function B(he){var ae=S,X=N;return S=N=void 0,q=he,P=v.apply(X,ae),P}function H(he){return q=he,O=setTimeout(V,A),I?B(he):P}function j(he){var ae=he-z,X=he-q,Se=A-ae;return k?T(Se,F-X):Se}function G(he){var ae=he-z,X=he-q;return z===void 0||ae>=A||ae<0||k&&X>=F}function V(){var he=b();if(G(he))return ie(he);O=setTimeout(V,j(he))}function ie(he){return O=void 0,_&&S?B(he):(S=N=void 0,P)}function te(){O!==void 0&&clearTimeout(O),q=0,S=z=N=O=void 0}function J(){return O===void 0?P:ie(b())}function ce(){var he=b(),ae=G(he);if(S=arguments,N=this,z=he,ae){if(O===void 0)return H(z);if(k)return O=setTimeout(V,A),B(z)}return O===void 0&&(O=setTimeout(V,A)),P}return ce.cancel=te,ce.flush=J,ce}function w(v){var A=typeof v;return!!v&&(A=="object"||A=="function")}function L(v){return!!v&&typeof v=="object"}function M(v){return typeof v=="symbol"||L(v)&&h.call(v)==a}function C(v){if(typeof v=="number")return v;if(M(v))return r;if(w(v)){var A=typeof v.valueOf=="function"?v.valueOf():v;v=w(A)?A+"":A}if(typeof v!="string")return v===0?v:+v;v=v.replace(i,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):o.test(v)?r:+v}t.exports=x}),S3={};VE(S3,{default:()=>Bs});var YE=T3(v3());$E(S3,T3(v3()));var{default:y3,...QE}=YE,Bs=y3!==void 0?y3:QE;p();p();var ZE=Object.create,pg=Object.defineProperty,JE=Object.getOwnPropertyDescriptor,XE=Object.getOwnPropertyNames,ew=Object.getPrototypeOf,tw=Object.prototype.hasOwnProperty,nw=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),rw=(e,t)=>{for(var n in t)pg(e,n,{get:t[n],enumerable:!0})},gg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of XE(t))!tw.call(e,a)&&a!==n&&pg(e,a,{get:()=>t[a],enumerable:!(r=JE(t,a))||r.enumerable});return e},aw=(e,t,n)=>(gg(e,t,"default"),n&&gg(n,t,"default")),x3=(e,t,n)=>(n=e!=null?ZE(ew(e)):{},gg(t||!e||!e.__esModule?pg(n,"default",{value:e,enumerable:!0}):n,e)),E3=nw((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(i)==="object"?i.exports=g():(s=[],o=g,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function g(m){if(f[m])return f[m].exports;var h=f[m]={i:m,l:!1,exports:{}};return c[m].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var f={};return g.m=c,g.c=f,g.i=function(m){return m},g.d=function(m,h,y){g.o(m,h)||Object.defineProperty(m,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(m){var h=m&&m.__esModule?function(){return m.default}:function(){return m};return g.d(h,"a",h),h},g.o=function(m,h){return Object.prototype.hasOwnProperty.call(m,h)},g.p="",g(g.s=0)}([function(c,g,f){function m(j,G){var V={};for(var ie in j)G.indexOf(ie)>=0||Object.prototype.hasOwnProperty.call(j,ie)&&(V[ie]=j[ie]);return V}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},y=Object.assign||function(j){for(var G=1;G'+ie+"",Se.onclick=function(){return F(se,X)},Se.listener=function(ue){(D(ue)||S(ue))&&z()},N(Se,X),J&&J<1&&(J=1),!he&&J&&L(J).then(function(){return F(se,X)})},I=g.force=function(j,G){var V=j.type,ie=V===void 0?5:V,te=j.text,J=j.buttonText,ce=J===void 0?"OK":J,he=j.callback,ae=j.position,X=ae===void 0?b.positions.force||X.top:ae;M(),z();var Se=document.createElement("div"),se=C();Se.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var ke=document.createElement("div");ke.classList.add(b.classes.button),ke.classList.add(v[ie]),ke.innerHTML=ce,ke.onclick=function(){F(se,X),O(),he?he():G&&G()},Se.appendChild(ue),Se.appendChild(ke),Se.listener=function(We){D(We)&&ke.click()},N(Se,X),P()},k=g.confirm=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Yes":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.confirm||se.top:Se;M(),z();var ue=document.createElement("div"),ke=C();ue.id=ke;var We=document.createElement("div");We.classList.add(b.classes.textbox),We.classList.add(b.classes.backgroundInfo),We.innerHTML='
'+ie+"
";var Re=document.createElement("div");Re.classList.add(b.classes.button),Re.classList.add(b.classes.elementHalf),Re.classList.add(b.classes.backgroundSuccess),Re.innerHTML=J,Re.onclick=function(){F(ke,se),O(),ae?ae():G&&G()};var me=document.createElement("div");me.classList.add(b.classes.button),me.classList.add(b.classes.elementHalf),me.classList.add(b.classes.backgroundError),me.innerHTML=he,me.onclick=function(){F(ke,se),O(),X?X():V&&V()},ue.appendChild(We),ue.appendChild(Re),ue.appendChild(me),ue.listener=function(Et){D(Et)?Re.click():S(Et)&&me.click()},N(ue,se),P(ue,se)},_=function(j,G,V){var ie=j.text,te=j.submitText,J=te===void 0?"Submit":te,ce=j.cancelText,he=ce===void 0?"Cancel":ce,ae=j.submitCallback,X=j.cancelCallback,Se=j.position,se=Se===void 0?b.positions.input||se.top:Se,ue=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);M(),z();var ke=document.createElement("div"),We=C();ke.id=We;var Re=document.createElement("div");Re.classList.add(b.classes.textbox),Re.classList.add(b.classes.backgroundInfo),Re.innerHTML='
'+ie+"
";var me=document.createElement("input");me.classList.add(b.classes.inputField),me.setAttribute("autocapitalize",ue.autocapitalize||"none"),me.setAttribute("autocomplete",ue.autocomplete||"off"),me.setAttribute("autocorrect",ue.autocorrect||"off"),me.setAttribute("autofocus",ue.autofocus||"true"),me.setAttribute("inputmode",ue.inputmode||"verbatim"),me.setAttribute("max",ue.max||""),me.setAttribute("maxlength",ue.maxlength||""),me.setAttribute("min",ue.min||""),me.setAttribute("minlength",ue.minlength||""),me.setAttribute("placeholder",ue.placeholder||""),me.setAttribute("spellcheck",ue.spellcheck||"default"),me.setAttribute("step",ue.step||"any"),me.setAttribute("type",ue.type||"text"),me.value=ue.value||"",ue.allowed&&(me.oninput=function(){var kt=void 0;if(Array.isArray(ue.allowed)){for(var Bt="",vn=ue.allowed,Yn=0;Yn'+V+"",X.appendChild(se),ce.forEach(function(ke,We){var Re=ke.type,me=Re===void 0?1:Re,Et=ke.text,Gt=ke.handler,kt=document.createElement("div");kt.classList.add(v[me]),kt.classList.add(b.classes.button),kt.classList.add(b.classes.selectChoice);var Bt=ce[We+1];Bt&&!Bt.type&&(Bt.type=1),Bt&&Bt.type===me&&kt.classList.add(b.classes.selectChoiceRepeated),kt.innerHTML=Et,kt.onclick=function(){F(Se,ae),O(),Gt()},X.appendChild(kt)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){F(Se,ae),O(),J?J():G&&G()},X.appendChild(ue),X.listener=function(ke){S(ke)&&ue.click()},N(X,ae),P(X,ae)},H=g.date=function(j,G,V){var ie=j.value,te=ie===void 0?new Date:ie,J=j.submitText,ce=J===void 0?"OK":J,he=j.cancelText,ae=he===void 0?"Cancel":he,X=j.submitCallback,Se=j.cancelCallback,se=j.position,ue=se===void 0?b.positions.date||ue.top:se;M(),z();var ke="▾",We=document.createElement("div"),Re=document.createElement("div"),me=document.createElement("div"),Et=function(wt){We.innerHTML=b.dateMonths[wt.getMonth()],Re.innerHTML=wt.getDate(),me.innerHTML=wt.getFullYear()},Gt=function(wt){var rt=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),jn=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(jn)>rt&&(jn=rt.toString()),wt.target.textContent=jn,Number(jn)<1&&(jn="1"),te.setDate(Number(jn))},kt=function(wt){var rt=wt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);wt.target.textContent=rt,te.setFullYear(Number(rt))},Bt=function(wt){Et(te)},vn=function(wt){var rt=new Date(te.getFullYear(),te.getMonth()+wt+1,0).getDate();te.getDate()>rt&&te.setDate(rt),te.setMonth(te.getMonth()+wt),Et(te)},Yn=function(wt){te.setDate(te.getDate()+wt),Et(te)},Ss=function(wt){var rt=te.getFullYear()+wt;rt<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+wt),Et(te)},Dr=document.createElement("div"),di=C();Dr.id=di;var no=document.createElement("div");no.classList.add(b.classes.backgroundInfo);var dn=document.createElement("div");dn.classList.add(b.classes.dateSelectorInner);var sr=document.createElement("div");sr.classList.add(b.classes.button),sr.classList.add(b.classes.elementThird),sr.classList.add(b.classes.dateSelectorUp),sr.innerHTML=ke;var gn=document.createElement("div");gn.classList.add(b.classes.button),gn.classList.add(b.classes.elementThird),gn.classList.add(b.classes.dateSelectorUp),gn.innerHTML=ke;var qn=document.createElement("div");qn.classList.add(b.classes.button),qn.classList.add(b.classes.elementThird),qn.classList.add(b.classes.dateSelectorUp),qn.innerHTML=ke,We.classList.add(b.classes.element),We.classList.add(b.classes.elementThird),We.innerHTML=b.dateMonths[te.getMonth()],Re.classList.add(b.classes.element),Re.classList.add(b.classes.elementThird),Re.setAttribute("contentEditable",!0),Re.addEventListener("input",Gt),Re.addEventListener("blur",Bt),Re.innerHTML=te.getDate(),me.classList.add(b.classes.element),me.classList.add(b.classes.elementThird),me.setAttribute("contentEditable",!0),me.addEventListener("input",kt),me.addEventListener("blur",Bt),me.innerHTML=te.getFullYear();var jr=document.createElement("div");jr.classList.add(b.classes.button),jr.classList.add(b.classes.elementThird),jr.innerHTML=ke;var Hr=document.createElement("div");Hr.classList.add(b.classes.button),Hr.classList.add(b.classes.elementThird),Hr.innerHTML=ke;var gi=document.createElement("div");gi.classList.add(b.classes.button),gi.classList.add(b.classes.elementThird),gi.innerHTML=ke,sr.onclick=function(){return vn(1)},gn.onclick=function(){return Yn(1)},qn.onclick=function(){return Ss(1)},jr.onclick=function(){return vn(-1)},Hr.onclick=function(){return Yn(-1)},gi.onclick=function(){return Ss(-1)};var Sn=document.createElement("div");Sn.classList.add(b.classes.button),Sn.classList.add(b.classes.elementHalf),Sn.classList.add(b.classes.backgroundSuccess),Sn.innerHTML=ce,Sn.onclick=function(){F(di,ue),O(),X?X(te):G&&G(te)};var Wr=document.createElement("div");Wr.classList.add(b.classes.button),Wr.classList.add(b.classes.elementHalf),Wr.classList.add(b.classes.backgroundError),Wr.innerHTML=ae,Wr.onclick=function(){F(di,ue),O(),Se?Se(te):V&&V(te)},dn.appendChild(sr),dn.appendChild(gn),dn.appendChild(qn),dn.appendChild(We),dn.appendChild(Re),dn.appendChild(me),dn.appendChild(jr),dn.appendChild(Hr),dn.appendChild(gi),no.appendChild(dn),Dr.appendChild(no),Dr.appendChild(Sn),Dr.appendChild(Wr),Dr.listener=function(wt){D(wt)?Sn.click():S(wt)&&Wr.click()},N(Dr,ue),P(Dr,ue)};g.default={alert:q,force:I,confirm:k,input:_,select:B,date:H,setOptions:x,hideAlerts:z}}])})}).call(r,a(0)(n))}])})}),w3={};rw(w3,{default:()=>kl});var iw=x3(E3());aw(w3,x3(E3()));var{default:C3,...ow}=iw,kl=C3!==void 0?C3:ow;p();p();var Pl=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Is(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function mg(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function D3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let i=0;igo[e.toLowerCase()]||dr[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),sw=e=>Object.keys(go).find(t=>go[t]===e),uw=e=>Object.keys(dr).find(t=>dr[t]===e);function M3(e){L3=e||"all"}function Rs(){return L3||"all"}function lw(){return pt.slice(0)}function cw(){return pt.map(e=>sw(e)||uw(e)||String.fromCharCode(e))}function dw(){let e=[];return Object.keys(Dt).forEach(t=>{Dt[t].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{e.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Os(o))})})}),e}function gw(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function pw(e){return typeof e=="string"&&(e=Os(e)),pt.indexOf(e)!==-1}function mw(e,t){let n,r;e||(e=Rs());for(let a in Dt)if(Object.prototype.hasOwnProperty.call(Dt,a))for(n=Dt[a],r=0;r=0&&pt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&pt.splice(0,pt.length),(t===93||t===224)&&(t=91),t in nn){nn[t]=!1;for(let r in dr)dr[r]===t&&(Zr[r]=!1)}}function F3(e,...t){if(typeof e>"u")Object.keys(Dt).forEach(n=>delete Dt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&hg(n)});else if(typeof e=="object")e.key&&hg(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),hg({key:e,scope:n,method:r,splitKey:"+"})}}var hg=({key:e,scope:t,method:n,splitKey:r="+"})=>{fg(e).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Os(u);if(!Dt[l])return;t||(t=Rs());let c=s>1?mg(dr,o):[];Dt[l]=Dt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&D3(g.mods,c)))})};function k3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let i in nn)Object.prototype.hasOwnProperty.call(nn,i)&&(!nn[i]&&t.mods.indexOf(+i)>-1||nn[i]&&t.mods.indexOf(+i)===-1)&&(a=!1);(t.mods.length===0&&!nn[16]&&!nn[18]&&!nn[17]&&!nn[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(pt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function P3(e,t){let n=Dt["*"],r=e.keyCode||e.which||e.charCode;if(!Zr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),pt.indexOf(r)===-1&&r!==229&&pt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=Ll[i];e[i]&&pt.indexOf(o)===-1?pt.push(o):!e[i]&&pt.indexOf(o)>-1?pt.splice(pt.indexOf(o),1):i==="metaKey"&&e[i]&&pt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(pt=pt.slice(pt.indexOf(o))))}),r in nn){nn[r]=!0;for(let i in dr)dr[i]===r&&(Zr[i]=!0);if(!n)return}for(let i in nn)Object.prototype.hasOwnProperty.call(nn,i)&&(nn[i]=e[Ll[i]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(pt.indexOf(17)===-1&&pt.push(17),pt.indexOf(18)===-1&&pt.push(18),nn[17]=!0,nn[18]=!0);let a=Rs();if(n)for(let i=0;i-1}function Zr(e,t,n){pt=[];let r=fg(e),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",g=!1,f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(i=t.scope),t.element&&(o=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(f=!0)),typeof t=="string"&&(i=t),f&&F3(e,i);s1&&(a=mg(dr,e)),e=e[e.length-1],e=e==="*"?"*":Os(e),e in Dt||(Dt[e]=[]),Dt[e].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!hw(o)&&window&&(_3.push(o),Is(o,"keydown",m=>{P3(m,o)},g),A3||(A3=!0,Is(window,"focus",()=>{pt=[]},g),Is(window,"click",()=>{pt=[]},!1)),Is(o,"keyup",m=>{P3(m,o),fw(m)},g))}function bw(e,t="all"){Object.keys(Dt).forEach(n=>{Dt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var bg={getPressedKeyString:cw,setScope:M3,getScope:Rs,deleteScope:mw,getPressedKeyCodes:lw,getAllKeyCodes:dw,isPressed:pw,filter:gw,trigger:bw,unbind:F3,keyMap:go,modifier:dr,modifierMap:Ll};for(let e in bg)Object.prototype.hasOwnProperty.call(bg,e)&&(Zr[e]=bg[e]);if(typeof window<"u"){let e=window.hotkeys;Zr.noConflict=t=>(t&&window.hotkeys===Zr&&(window.hotkeys=e),Zr),window.hotkeys=Zr}var Ut=Zr;p();p();var yw={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ot={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},wn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},xa={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),i=Math.max(r,a),o=0,s=Y.map([e,t],u=>{let l=i-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return e}static getBrowserAlias(e){return yw[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},mt=/version\/(\d+(\.?_?\d+)+)/i,Tw=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(mt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(mt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],vw=Tw,Sw=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:wn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:wn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:wn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:wn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:wn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:wn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:wn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:wn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:wn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:wn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:wn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:wn.Linux}}},{test:[/CrOS/],describe(){return{name:wn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:wn.PlayStation4,version:t}}}],Cw=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ot.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ot.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ot.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ot.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ot.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ot.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ot.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ot.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ot.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ot.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ot.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ot.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ot.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ot.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ot.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ot.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ot.tv}}}],xw=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:xa.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:xa.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:xa.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:xa.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:xa.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:xa.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:xa.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Ew=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(vw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Sw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Cw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(xw,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(i=>{let o=e[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(t[i]=o,n+=1)}),n>0){let i=Object.keys(t),o=Y.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(t[o]);if(u!==void 0)return u}let s=Y.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=Y.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},B3=Ew,ww=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new B3(e,t)}static parse(e){return new B3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return xa}static get OS_MAP(){return wn}static get PLATFORMS_MAP(){return Ot}},po=ww;p();p();var{entries:H3,setPrototypeOf:R3,isFrozen:Dw,getPrototypeOf:Aw,getOwnPropertyDescriptor:kw}=Object,{freeze:Dn,seal:pr,create:Pw}=Object,{apply:xg,construct:Eg}=typeof Reflect<"u"&&Reflect;xg||(xg=function(e,t,n){return e.apply(t,n)});Dn||(Dn=function(e){return e});pr||(pr=function(e){return e});Eg||(Eg=function(e,t){return new e(...t)});var Lw=Jn(Array.prototype.forEach),O3=Jn(Array.prototype.pop),zs=Jn(Array.prototype.push),Fl=Jn(String.prototype.toLowerCase),yg=Jn(String.prototype.toString),_w=Jn(String.prototype.match),gr=Jn(String.prototype.replace),Mw=Jn(String.prototype.indexOf),Fw=Jn(String.prototype.trim),Wn=Jn(RegExp.prototype.test),Ns=Bw(TypeError);function Jn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),Nw=pr(/\${[\w\W]*}/gm),Uw=pr(/^data-[\-\w.\u00B7-\uFFFF]/),qw=pr(/^aria-[\-\w]+$/),W3=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jw=pr(/^(?:\w+script|data):/i),Hw=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K3=pr(/^html$/i),j3=Object.freeze({__proto__:null,MUSTACHE_EXPR:Ow,ERB_EXPR:zw,TMPLIT_EXPR:Nw,DATA_ATTR:Uw,ARIA_ATTR:qw,IS_ALLOWED_URI:W3,IS_SCRIPT_OR_DATA:jw,ATTR_WHITESPACE:Hw,DOCTYPE_NAME:K3}),Ww=()=>typeof window>"u"?null:window,Kw=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function G3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ww(),t=U=>G3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:f,trustedTypes:m}=e,h=u.prototype,y=_l(h,"cloneNode"),T=_l(h,"nextSibling"),b=_l(h,"childNodes"),x=_l(h,"parentNode");if(typeof o=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let w,L="",{implementation:M,createNodeIterator:C,createDocumentFragment:v,getElementsByTagName:A}=a,{importNode:D}=n,S={};t.isSupported=typeof H3=="function"&&typeof x=="function"&&M&&M.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:N,ERB_EXPR:F,TMPLIT_EXPR:P,DATA_ATTR:O,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:I}=j3,{IS_ALLOWED_URI:k}=j3,_=null,B=He({},[...z3,...Tg,...vg,...Sg,...N3]),H=null,j=He({},[...U3,...Cg,...q3,...Ml]),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ie=null,te=!0,J=!0,ce=!1,he=!0,ae=!1,X=!1,Se=!1,se=!1,ue=!1,ke=!1,We=!1,Re=!0,me=!1,Et="user-content-",Gt=!0,kt=!1,Bt={},vn=null,Yn=He({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ss=null,Dr=He({},["audio","video","img","source","image","track"]),di=null,no=He({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),dn="http://www.w3.org/1998/Math/MathML",sr="http://www.w3.org/2000/svg",gn="http://www.w3.org/1999/xhtml",qn=gn,jr=!1,Hr=null,gi=He({},[dn,sr,gn],yg),Sn,Wr=["application/xhtml+xml","text/html"],wt="text/html",rt,jn=null,qS=a.createElement("form"),qh=function(U){return U instanceof RegExp||U instanceof Function},md=function(U){if(!(jn&&jn===U)){if((!U||typeof U!="object")&&(U={}),U=mo(U),Sn=Wr.indexOf(U.PARSER_MEDIA_TYPE)===-1?Sn=wt:Sn=U.PARSER_MEDIA_TYPE,rt=Sn==="application/xhtml+xml"?yg:Fl,_="ALLOWED_TAGS"in U?He({},U.ALLOWED_TAGS,rt):B,H="ALLOWED_ATTR"in U?He({},U.ALLOWED_ATTR,rt):j,Hr="ALLOWED_NAMESPACES"in U?He({},U.ALLOWED_NAMESPACES,yg):gi,di="ADD_URI_SAFE_ATTR"in U?He(mo(no),U.ADD_URI_SAFE_ATTR,rt):no,Ss="ADD_DATA_URI_TAGS"in U?He(mo(Dr),U.ADD_DATA_URI_TAGS,rt):Dr,vn="FORBID_CONTENTS"in U?He({},U.FORBID_CONTENTS,rt):Yn,V="FORBID_TAGS"in U?He({},U.FORBID_TAGS,rt):{},ie="FORBID_ATTR"in U?He({},U.FORBID_ATTR,rt):{},Bt="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,J=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,ke=U.RETURN_DOM_FRAGMENT||!1,We=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Re=U.SANITIZE_DOM!==!1,me=U.SANITIZE_NAMED_PROPS||!1,Gt=U.KEEP_CONTENT!==!1,kt=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||W3,qn=U.NAMESPACE||gn,G=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&qh(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(G.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(J=!1),ke&&(ue=!0),Bt&&(_=He({},[...N3]),H=[],Bt.html===!0&&(He(_,z3),He(H,U3)),Bt.svg===!0&&(He(_,Tg),He(H,Cg),He(H,Ml)),Bt.svgFilters===!0&&(He(_,vg),He(H,Cg),He(H,Ml)),Bt.mathMl===!0&&(He(_,Sg),He(H,q3),He(H,Ml))),U.ADD_TAGS&&(_===B&&(_=mo(_)),He(_,U.ADD_TAGS,rt)),U.ADD_ATTR&&(H===j&&(H=mo(H)),He(H,U.ADD_ATTR,rt)),U.ADD_URI_SAFE_ATTR&&He(di,U.ADD_URI_SAFE_ATTR,rt),U.FORBID_CONTENTS&&(vn===Yn&&(vn=mo(vn)),He(vn,U.FORBID_CONTENTS,rt)),Gt&&(_["#text"]=!0),X&&He(_,["html","head","body"]),_.table&&(He(_,["tbody"]),delete V.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ns('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ns('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=U.TRUSTED_TYPES_POLICY,L=w.createHTML("")}else w===void 0&&(w=Kw(m,r)),w!==null&&typeof L=="string"&&(L=w.createHTML(""));Dn&&Dn(U),jn=U}},jh=He({},["mi","mo","mn","ms","mtext"]),Hh=He({},["foreignobject","desc","title","annotation-xml"]),jS=He({},["title","style","font","a","script"]),al=He({},Tg);He(al,vg),He(al,Iw);let fd=He({},Sg);He(fd,Rw);let HS=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:qn,tagName:"template"});let ne=Fl(U.tagName),Xe=Fl(ge.tagName);return Hr[U.namespaceURI]?U.namespaceURI===sr?ge.namespaceURI===gn?ne==="svg":ge.namespaceURI===dn?ne==="svg"&&(Xe==="annotation-xml"||jh[Xe]):!!al[ne]:U.namespaceURI===dn?ge.namespaceURI===gn?ne==="math":ge.namespaceURI===sr?ne==="math"&&Hh[Xe]:!!fd[ne]:U.namespaceURI===gn?ge.namespaceURI===sr&&!Hh[Xe]||ge.namespaceURI===dn&&!jh[Xe]?!1:!fd[ne]&&(jS[ne]||!al[ne]):!!(Sn==="application/xhtml+xml"&&Hr[U.namespaceURI]):!1},ro=function(U){zs(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},hd=function(U,ge){try{zs(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{zs(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!H[U])if(ue||ke)try{ro(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Wh=function(U){let ge,ne;if(se)U=""+U;else{let Cn=_w(U,/^[\r\n\t ]+/);ne=Cn&&Cn[0]}Sn==="application/xhtml+xml"&&qn===gn&&(U=''+U+"");let Xe=w?w.createHTML(U):U;if(qn===gn)try{ge=new f().parseFromString(Xe,Sn)}catch{}if(!ge||!ge.documentElement){ge=M.createDocument(qn,"template",null);try{ge.documentElement.innerHTML=jr?L:Xe}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),qn===gn?A.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},Kh=function(U){return C.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},WS=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},il=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Kr=function(U,ge,ne){S[U]&&Lw(S[U],Xe=>{Xe.call(t,ge,ne,jn)})},Gh=function(U){let ge;if(Kr("beforeSanitizeElements",U,null),WS(U))return ro(U),!0;let ne=rt(U.nodeName);if(Kr("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!il(U.firstElementChild)&&(!il(U.content)||!il(U.content.firstElementChild))&&Wn(/<[/\w]/g,U.innerHTML)&&Wn(/<[/\w]/g,U.textContent))return ro(U),!0;if(!_[ne]||V[ne]){if(!V[ne]&&$h(ne)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne)))return!1;if(Gt&&!vn[ne]){let Xe=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Xe){let Cn=Vt.length;for(let Fn=Cn-1;Fn>=0;--Fn)Xe.insertBefore(y(Vt[Fn],!0),T(U))}}return ro(U),!0}return U instanceof u&&!HS(U)||(ne==="noscript"||ne==="noembed")&&Wn(/<\/no(script|embed)/i,U.innerHTML)?(ro(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=gr(ge,N," "),ge=gr(ge,F," "),ge=gr(ge,P," "),U.textContent!==ge&&(zs(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Kr("afterSanitizeElements",U,null),!1)},Vh=function(U,ge,ne){if(Re&&(ge==="id"||ge==="name")&&(ne in a||ne in qS))return!1;if(!(J&&!ie[ge]&&Wn(O,ge))&&!(te&&Wn(z,ge))){if(!H[ge]||ie[ge]){if(!($h(U)&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,U)||G.tagNameCheck instanceof Function&&G.tagNameCheck(U))&&(G.attributeNameCheck instanceof RegExp&&Wn(G.attributeNameCheck,ge)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(ge))||ge==="is"&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Wn(G.tagNameCheck,ne)||G.tagNameCheck instanceof Function&&G.tagNameCheck(ne))))return!1}else if(!di[ge]&&!Wn(k,gr(ne,I,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&Mw(ne,"data:")===0&&Ss[U])&&!(ce&&!Wn(q,gr(ne,I,"")))&&ne)return!1}return!0},$h=function(U){return U.indexOf("-")>0},Yh=function(U){let ge,ne,Xe,Vt;Kr("beforeSanitizeAttributes",U,null);let{attributes:Cn}=U;if(!Cn)return;let Fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Vt=Cn.length;Vt--;){ge=Cn[Vt];let{name:en,namespaceURI:ao}=ge;if(ne=en==="value"?ge.value:Fw(ge.value),Xe=rt(en),Fn.attrName=Xe,Fn.attrValue=ne,Fn.keepAttr=!0,Fn.forceKeepAttr=void 0,Kr("uponSanitizeAttribute",U,Fn),ne=Fn.attrValue,Fn.forceKeepAttr||(hd(en,U),!Fn.keepAttr))continue;if(!he&&Wn(/\/>/i,ne)){hd(en,U);continue}ae&&(ne=gr(ne,N," "),ne=gr(ne,F," "),ne=gr(ne,P," "));let Qh=rt(U.nodeName);if(Vh(Qh,Xe,ne)){if(me&&(Xe==="id"||Xe==="name")&&(hd(en,U),ne=Et+ne),w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ao)switch(m.getAttributeType(Qh,Xe)){case"TrustedHTML":{ne=w.createHTML(ne);break}case"TrustedScriptURL":{ne=w.createScriptURL(ne);break}}try{ao?U.setAttributeNS(ao,en,ne):U.setAttribute(en,ne),O3(t.removed)}catch{}}}Kr("afterSanitizeAttributes",U,null)},KS=function U(ge){let ne,Xe=Kh(ge);for(Kr("beforeSanitizeShadowDOM",ge,null);ne=Xe.nextNode();)Kr("uponSanitizeShadowNode",ne,null),!Gh(ne)&&(ne.content instanceof i&&U(ne.content),Yh(ne));Kr("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Xe,Vt,Cn;if(jr=!U,jr&&(U=""),typeof U!="string"&&!il(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw Ns("dirty is not a string, aborting")}else throw Ns("toString is not a function");if(!t.isSupported)return U;if(Se||md(ge),t.removed=[],typeof U=="string"&&(kt=!1),kt){if(U.nodeName){let ao=rt(U.nodeName);if(!_[ao]||V[ao])throw Ns("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Wh(""),Xe=ne.ownerDocument.importNode(U,!0),Xe.nodeType===1&&Xe.nodeName==="BODY"||Xe.nodeName==="HTML"?ne=Xe:ne.appendChild(Xe);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return w&&We?w.createHTML(U):U;if(ne=Wh(U),!ne)return ue?null:We?L:""}ne&&se&&ro(ne.firstChild);let Fn=Kh(kt?U:ne);for(;Vt=Fn.nextNode();)Gh(Vt)||(Vt.content instanceof i&&KS(Vt.content),Yh(Vt));if(kt)return U;if(ue){if(ke)for(Cn=v.call(ne.ownerDocument);ne.firstChild;)Cn.appendChild(ne.firstChild);else Cn=ne;return(H.shadowroot||H.shadowrootmod)&&(Cn=D.call(n,Cn,!0)),Cn}let en=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Wn(K3,ne.ownerDocument.doctype.name)&&(en=" +`+en),ae&&(en=gr(en,N," "),en=gr(en,F," "),en=gr(en,P," ")),w&&We?w.createHTML(en):en},t.setConfig=function(U){md(U),Se=!0},t.clearConfig=function(){jn=null,Se=!1},t.isValidAttribute=function(U,ge,ne){jn||md({});let Xe=rt(U),Vt=rt(ge);return Vh(Xe,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(S[U]=S[U]||[],zs(S[U],ge))},t.removeHook=function(U){if(S[U])return O3(S[U])},t.removeHooks=function(U){S[U]&&(S[U]=[])},t.removeAllHooks=function(){S={}},t}var at=G3();p();p();var Gw=Object.create,Dg=Object.defineProperty,Vw=Object.getOwnPropertyDescriptor,$w=Object.getOwnPropertyNames,Yw=Object.getPrototypeOf,Qw=Object.prototype.hasOwnProperty,Ag=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zw=(e,t)=>{for(var n in t)Dg(e,n,{get:t[n],enumerable:!0})},wg=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of $w(t))!Qw.call(e,a)&&a!==n&&Dg(e,a,{get:()=>t[a],enumerable:!(r=Vw(t,a))||r.enumerable});return e},Jw=(e,t,n)=>(wg(e,t,"default"),n&&wg(n,t,"default")),$3=(e,t,n)=>(n=e!=null?Gw(Yw(e)):{},wg(t||!e||!e.__esModule?Dg(n,"default",{value:e,enumerable:!0}):n,e)),Xw=Ag((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var f=this._doc.createElement("span");l.firstChild;)f.appendChild(l.firstChild);l.parentNode.replaceChild(f,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),f=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),g&&l.setAttribute("poster",o(g)),f){var m=f.replace(this.REGEXPS.srcsetUrl,function(h,y,T,b){return o(y)+(T||"")+b});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var f=s(a);return f<=4&&(!o||f!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,f=l.firstChild;f;){var m=f.nextSibling;if(this._isPhrasingContent(f))g!==null?g.appendChild(f):this._isWhitespace(f)||(g=a.createElement("p"),l.replaceChild(g,f),g.appendChild(f));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}f=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var ke=this._getInnerText(ue);if(!(ke.length<25)){var We=this._getNodeAncestors(ue,5);if(We.length!==0){var Re=0;Re+=1,Re+=ke.split(",").length,Re+=Math.min(Math.floor(ke.length/100),3),this._forEachNode(We,function(me,Et){if(!(!me.tagName||!me.parentNode||typeof me.parentNode.tagName>"u")){if(typeof me.readability>"u"&&(this._initializeNode(me),y.push(me)),Et===0)var Gt=1;else Et===1?Gt=2:Gt=Et*3;me.readability.contentScore+=Re/Gt}})}}}});for(var T=[],b=0,x=y.length;bC.readability.contentScore){T.splice(M,0,w),T.length>this._nbTopCandidates&&T.pop();break}}}var v=T[0]||null,A=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),A=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var S=[],N=1;N=.75&&S.push(this._getNodeAncestors(T[N]));var F=3;if(S.length>=F)for(D=v.parentNode;D.tagName!=="BODY";){for(var P=0,O=0;O=F){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var z=v.readability.contentScore,q=z/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var I=D.readability.contentScore;if(Iz){v=D;break}z=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");i&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var B=D.children,H=0,j=B.length;H=_)V=!0;else if(G.nodeName==="P"){var te=this._getLinkDensity(G),J=this._getInnerText(G),ce=J.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&J.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",G),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(G.nodeName)===-1&&(this.log("Altering sibling:",G,"to div."),G=this._setNodeTag(G,"DIV")),k.appendChild(G),B=D.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),A)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(f){return(f["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(f){return f&&typeof f.name=="string"}).map(function(f){return f.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(f){this.log(f.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),f=l.getAttribute("content");if(f){var m=null,h=null;g&&(m=g.match(s),m&&(h=m[0].toLowerCase().replace(/\s/g,""),i[h]=f.trim())),!m&&c&&u.test(c)&&(h=c,f&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[h]=f.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],f=function(h){return!!o.getElementsByTagName(h)[0]};if(g.some(f)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var g=0;if(c+g<0)return!0;if(this._getCharCount(i,",")<10){for(var f=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,h=i.getElementsByTagName("li").length-100,y=i.getElementsByTagName("input").length,T=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(i,["object","embed","iframe"]),w=0;w1&&f/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&h>f||y>Math.floor(f/3)||!s&&T<.9&&C<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&M>.2||c>=25&&M>.5||b===1&&C<75||b>1;if(s&&v){for(var A=0;A1)return v;let D=i.getElementsByTagName("li").length;if(m==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),e5=Ag((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(f){c.add(f.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(f){if(!o.visibilityChecker(f))return!1;var m=f.className+" "+f.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||f.matches("li p"))return!1;var h=f.textContent.trim().length;return ho.minScore)})}typeof t=="object"&&(t.exports=a)}),Y3=Ag((e,t)=>{var n=Xw(),r=e5();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Zw(Q3,{Readability:()=>Bl,default:()=>X3,isProbablyReaderable:()=>J3});var Z3=$3(Y3());Jw(Q3,$3(Y3()));var{Readability:Bl,isProbablyReaderable:J3}=Z3,{default:V3,...t5}=Z3,X3=V3!==void 0?V3:t5;var wi={};ol(wi,{Breadcrumbs:()=>Da,BrowserClient:()=>xo,Dedupe:()=>La,FunctionToString:()=>Ci,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,Hub:()=>ra,InboundFilters:()=>xi,Integrations:()=>I8,LinkedErrors:()=>ka,SDK_VERSION:()=>Co,Scope:()=>Xn,TryCatch:()=>Aa,addBreadcrumb:()=>Gl,addGlobalEventProcessor:()=>_r,captureEvent:()=>Wl,captureException:()=>vo,captureMessage:()=>Hl,chromeStackLineParser:()=>ip,close:()=>db,configureScope:()=>Kl,createTransport:()=>Js,defaultIntegrations:()=>gp,defaultStackLineParsers:()=>up,defaultStackParser:()=>ac,flush:()=>cb,forceLoad:()=>ub,geckoStackLineParser:()=>op,getCurrentHub:()=>Ie,getHubFromCarrier:()=>er,init:()=>ib,lastEventId:()=>sb,makeFetchTransport:()=>Xs,makeMain:()=>To,onLoad:()=>lb,opera10StackLineParser:()=>K2,opera11StackLineParser:()=>G2,setContext:()=>Vl,setExtra:()=>Yl,setExtras:()=>$l,setTag:()=>Zl,setTags:()=>Ql,setUser:()=>Jl,showReportDialog:()=>ob,startTransaction:()=>Xl,winjsStackLineParser:()=>sp,withScope:()=>So,wrap:()=>gb});p();p();p();p();p();p();p();p();p();var e2=Object.prototype.toString;function Il(e){switch(e2.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return kr(e,Error)}}function Us(e,t){return e2.call(e)===`[object ${t}]`}function Rl(e){return Us(e,"ErrorEvent")}function t2(e){return Us(e,"DOMException")}function Jr(e){return Us(e,"String")}function qs(e){return e===null||typeof e!="object"&&typeof e!="function"}function mr(e){return Us(e,"Object")}function js(e){return typeof Event<"u"&&kr(e,Event)}function n2(e){return!1}function r2(e){return Us(e,"RegExp")}function fo(e){return!!(e&&e.then&&typeof e.then=="function")}function a2(e){return mr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function i2(e){return typeof e=="number"&&e!==e}function kr(e,t){try{return e instanceof t}catch{return!1}}function Hs(e,t){try{let n=e,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function n5(e,t){let n=e,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Jr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let g=l.match(/^\d+/);g&&(l=g[0])}return s2({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function s2(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function o5(e){if(!!1)return;let{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!e[i])throw new Pt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Pt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!a5(r))throw new Pt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(t&&isNaN(parseInt(t,10)))throw new Pt(`Invalid Sentry Dsn: Invalid port ${t}`);return!0}function Ol(e){let t=typeof e=="string"?i5(e):s2(e);return o5(t),t}p();var s5={};function ft(){return typeof window<"u"?window:typeof self<"u"?self:s5}function ho(e,t,n){let r=n||ft(),a=r.__SENTRY__=r.__SENTRY__||{};return a[e]||(a[e]=t())}p();p();var Ws=["debug","info","warn","error","log","assert","trace"];function kg(e){if(!("console"in ft()))return e();let n=console,r={};Ws.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function u2(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Ws.forEach(n=>{t[n]=(...r)=>{e&&kg(()=>{})}}):Ws.forEach(n=>{t[n]=()=>{}}),t}var Ee;!1?Ee=ho("logger",u2):Ee=u2();p();p();function Ti(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Pg(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Mg(e){if(Il(e))return{message:e.message,name:e.name,stack:e.stack,...c2(e)};if(js(e)){let t={type:e.type,target:l2(e.target),currentTarget:l2(e.currentTarget),...c2(e)};return typeof CustomEvent<"u"&&kr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function l2(e){try{return n2(e)?Hs(e):Object.prototype.toString.call(e)}catch{return""}}function c2(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function g2(e,t=40){let n=Object.keys(Mg(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Ti(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:Ti(a,t)}return""}function vi(e){return Lg(e,new Map)}function Lg(e,t){if(mr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=Lg(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(Lg(a,t))}),r}return e}p();var u5=50;function Bg(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of t){let s=o(i);if(s){a.push(s);break}}return l5(a)}}function p2(e){return Array.isArray(e)?Bg(...e):e}function l5(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,u5).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Fg="";function hr(e){try{return!e||typeof e!="function"?Fg:e.name||Fg}catch{return Fg}}p();function m2(){if(!("fetch"in ft()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function f2(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function h2(){return!0}var Xr=ft(),Gs={},b2={};function c5(e){if(!b2[e])switch(b2[e]=!0,e){case"console":d5();break;case"fetch":g5();break;case"error":f5();break;case"unhandledrejection":h5();break;default:!1&&Ee.warn("unknown instrumentation type:",e);return}}function br(e,t){Gs[e]=Gs[e]||[],Gs[e].push(t),c5(e)}function yo(e,t){if(!(!e||!Gs[e]))for(let n of Gs[e]||[])try{n(t)}catch(r){!1&&Ee.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${hr(n)} -Error:`,r)}}function d5(){"console"in Xr&&Hs.forEach(function(e){e in console&&fr(console,e,function(t){return function(...n){yo("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function g5(){h2()&&fr(Xr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:p5(t),url:m5(t)},startTimestamp:Date.now()};return yo("fetch",{...n}),e.apply(Xr,t).then(r=>(yo("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yo("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function p5(e=[]){return"Request"in Xr&&kr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function m5(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Xr&&kr(e[0],Request)?e[0].url:String(e[0])}var Rg=null;function f5(){Rg=Xr.onerror,Xr.onerror=function(e,t,n,r,a){return yo("error",{column:r,error:a,line:n,msg:e,url:t}),Rg?Rg.apply(this,arguments):!1}}var Og=null;function h5(){Og=Xr.onunhandledrejection,Xr.onunhandledrejection=function(e){return yo("unhandledrejection",e),Og?Og.apply(this,arguments):!0}}p();function y2(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function Nl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function T2(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ta(e){let{message:t,event_id:n}=e;if(t)return t;let r=T2(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Gs(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ea(e,t){let n=T2(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let i={...a&&a.data,...t.data};n.mechanism.data=i}}function zg(e){if(e&&e.__sentry_captured__)return!0;try{Ws(e,"__sentry_captured__",!0)}catch{}return!1}p();function v2(){return!1}p();function na(e,t=1/0,n=1/0){try{return Ng("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ug(e,t=3,n=100*1024){let r=na(e,t);return T5(r)>n?Ug(e,t-1,n):r}function Ng(e,t,n=1/0,r=1/0,a=y2()){let[i,o]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!i2(t))return t;let s=b5(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return Ng("",f,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Fg(t);for(let f in g){if(!Object.prototype.hasOwnProperty.call(g,f))continue;if(c>=r){l[f]="[MaxProperties ~]";break}let m=g[f];l[f]=Ng(f,m,n-1,r,a),c+=1}return o(t),l}function b5(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":a2(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${hr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function y5(e){return~-encodeURI(e).split(/%..|./).length}function T5(e){return y5(JSON.stringify(e))}p();p();p();function Bn(e){return new Pr(t=>{t(e)})}function Vs(e){return new Pr((t,n)=>{n(e)})}var Pr=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,t&&t()},o=>{i=!0,a=o,t&&t()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(fo(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function S2(e){let t=[];function n(){return e===void 0||t.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new Pr((s,u)=>{let l=t.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(g=>{Bn(g).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:i}}p();p();var v5=["fatal","error","warning","log","info","debug"];function C2(e){return e==="warn"?"warning":v5.includes(e)?e:"log"}p();var jg={nowSeconds:()=>Date.now()/1e3};function S5(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var qg=S5(),x2=qg===void 0?jg:{nowSeconds:()=>(qg.timeOrigin+qg.now())/1e3},wa=jg.nowSeconds.bind(jg),Hg=x2.nowSeconds.bind(x2);var Ul,sO=(()=>{if(!performance||!performance.now){Ul="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r{let a=r[0].type;t(r,a)})}function Wg(e,t){return(t||new TextEncoder).encode(e)}function ql(e,t){let[n,r]=e,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[Wg(a,t),o]:a.push(typeof o=="string"?Wg(o,t):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function d5(){"console"in Xr&&Ws.forEach(function(e){e in console&&fr(console,e,function(t){return function(...n){yo("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function g5(){h2()&&fr(Xr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:p5(t),url:m5(t)},startTimestamp:Date.now()};return yo("fetch",{...n}),e.apply(Xr,t).then(r=>(yo("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw yo("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function p5(e=[]){return"Request"in Xr&&kr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function m5(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Xr&&kr(e[0],Request)?e[0].url:String(e[0])}var Ig=null;function f5(){Ig=Xr.onerror,Xr.onerror=function(e,t,n,r,a){return yo("error",{column:r,error:a,line:n,msg:e,url:t}),Ig?Ig.apply(this,arguments):!1}}var Rg=null;function h5(){Rg=Xr.onunhandledrejection,Xr.onunhandledrejection=function(e){return yo("unhandledrejection",e),Rg?Rg.apply(this,arguments):!0}}p();function y2(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function Nl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function T2(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ta(e){let{message:t,event_id:n}=e;if(t)return t;let r=T2(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Vs(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ea(e,t){let n=T2(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let i={...a&&a.data,...t.data};n.mechanism.data=i}}function Og(e){if(e&&e.__sentry_captured__)return!0;try{Ks(e,"__sentry_captured__",!0)}catch{}return!1}p();function v2(){return!1}p();function na(e,t=1/0,n=1/0){try{return zg("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ng(e,t=3,n=100*1024){let r=na(e,t);return T5(r)>n?Ng(e,t-1,n):r}function zg(e,t,n=1/0,r=1/0,a=y2()){let[i,o]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!i2(t))return t;let s=b5(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let f=u.toJSON();return zg("",f,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Mg(t);for(let f in g){if(!Object.prototype.hasOwnProperty.call(g,f))continue;if(c>=r){l[f]="[MaxProperties ~]";break}let m=g[f];l[f]=zg(f,m,n-1,r,a),c+=1}return o(t),l}function b5(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":a2(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${hr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function y5(e){return~-encodeURI(e).split(/%..|./).length}function T5(e){return y5(JSON.stringify(e))}p();p();p();function Bn(e){return new Pr(t=>{t(e)})}function $s(e){return new Pr((t,n)=>{n(e)})}var Pr=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,t&&t()},o=>{i=!0,a=o,t&&t()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(fo(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function S2(e){let t=[];function n(){return e===void 0||t.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new Pr((s,u)=>{let l=t.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);t.forEach(g=>{Bn(g).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:t,add:a,drain:i}}p();p();var v5=["fatal","error","warning","log","info","debug"];function C2(e){return e==="warn"?"warning":v5.includes(e)?e:"log"}p();var qg={nowSeconds:()=>Date.now()/1e3};function S5(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var Ug=S5(),x2=Ug===void 0?qg:{nowSeconds:()=>(Ug.timeOrigin+Ug.now())/1e3},wa=qg.nowSeconds.bind(qg),jg=x2.nowSeconds.bind(x2);var Ul,sO=(()=>{if(!performance||!performance.now){Ul="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r{let a=r[0].type;t(r,a)})}function Hg(e,t){return(t||new TextEncoder).encode(e)}function ql(e,t){let[n,r]=e,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[Hg(a,t),o]:a.push(typeof o=="string"?Hg(o,t):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:C5(a)}function C5(e){let t=e.reduce((a,i)=>a+i.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function w2(e,t){let n=typeof e.data=="string"?Wg(e.data,t):e.data;return[vi({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var x5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Gg(e){return x5[e]}p();function D2(e,t,n){let r=[{type:"client_report"},{timestamp:n||wa(),discarded_events:e}];return Si(t?{dsn:t}:{},[r])}p();var E5=60*1e3;function w5(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?E5:r-t}function D5(e,t){return e[t]||e.all||0}function A2(e,t,n=Date.now()){return D5(e,t)>n}function k2(e,{statusCode:t,headers:n},r=Date.now()){let a={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),g=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+g;else for(let f of l.split(";"))a[f]=r+g}else o?a.all=r+w5(o,r):t===429&&(a.all=r+60*1e3);return a}p();function P2(e){return e[0]}p();function Vg(e){let t=Hg(),n={sid:ea(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>A5(n)};return e&&Lr(n,e),n}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Hg(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ea()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function $g(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Lr(e,n)}function A5(e){return vi({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var L2=100,Xn=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Lr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):mr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,L2):L2;if(r<=0)return this;let a={timestamp:wa(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([..._2(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new Pr((i,o)=>{let s=t[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Ee.log(`Event processor "${s.id}" dropped event`),fo(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(t,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function _2(){return ho("globalEventProcessors",()=>[])}function _r(e){_2().push(e)}p();p();var Yg=4,k5=100,ra=class{constructor(t,n=new Xn,r=Yg){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:ea(),i=new Error(t);return this._withClient((o,s)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:ea();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=k5}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:wa(),...t},l=i?Pg(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=To(this);try{t(this)}finally{To(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&$g(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=mt(),{userAgent:s}=o.navigator||{},u=Vg({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Lr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=$s().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Ee.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function $s(){let e=mt();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function To(e){let t=$s(),n=er(t);return jl(t,e),n}function Ie(){let e=$s();return(!M2(e)||er(e).isOlderThan(Yg))&&jl(e,new ra),v2()?P5(e):er(e)}function P5(e){try{let t=$s().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return er(e);if(!M2(n)||er(n).isOlderThan(Yg)){let r=er(e).getStackTop();jl(n,new ra(r.client,Xn.clone(r.scope)))}return er(n)}catch{return er(e)}}function M2(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function er(e){return ho("hub",()=>new ra,e)}function jl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}p();function vo(e,t){return Ie().captureException(e,{captureContext:t})}function Hl(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ie().captureMessage(e,n,r)}function Wl(e,t){return Ie().captureEvent(e,t)}function Kl(e){Ie().configureScope(e)}function Gl(e){Ie().addBreadcrumb(e)}function Vl(e,t){Ie().setContext(e,t)}function $l(e){Ie().setExtras(e)}function Yl(e,t){Ie().setExtra(e,t)}function Ql(e){Ie().setTags(e)}function Zl(e,t){Ie().setTag(e,t)}function Jl(e){Ie().setUser(e)}function So(e){Ie().withScope(e)}function Xl(e,t){return Ie().startTransaction({metadata:{source:"custom"},...e},t)}p();var L5="7";function F2(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function _5(e){return`${F2(e)}${e.projectId}/envelope/`}function M5(e,t){return d2({sentry_key:e.publicKey,sentry_version:L5,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ys(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${_5(e)}?${M5(e,r)}`}function Qg(e,t){let n=Ol(e),r=`${F2(n)}embed/error-page/`,a=`dsn=${yi(n)}`;for(let i in t)if(i!=="dsn")if(i==="user"){let o=t.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${a}`}p();p();function B2(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function F5(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function I2(e,t,n,r){let a=B2(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:yi(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return Si(i,[o])}function R2(e,t,n,r){let a=B2(n),i=e.type||"event",{transactionSampling:o}=e.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};F5(e,n&&n.sdk);let l=B5(e,a,r,t);return delete e.sdkProcessingMetadata,Si(l,[[{type:i,sample_rates:[{id:s,rate:u}]},e]])}function B5(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,i=a&&P2(a);return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:yi(r)},...e.type==="transaction"&&i&&{trace:vi({...i})}}}p();var O2=[];function z2(e){return e.reduce((t,n)=>(t.every(r=>n.name!==r.name)&&t.push(n),t),[])}function Zg(e){let t=e.defaultIntegrations&&[...e.defaultIntegrations]||[],n=e.integrations,r=[...z2(t)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...z2(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function N2(e){let t={};return e.forEach(n=>{t[n.name]=n,O2.indexOf(n.name)===-1&&(n.setupOnce(_r,Ie),O2.push(n.name),!1&&Ee.log(`Integration installed: ${n.name}`))}),t}var U2="Not capturing exception because it's already been captured.",Qs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(t){if(this._options=t,t.dsn){this._dsn=Ol(t.dsn);let n=Ys(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}else!1&&Ee.warn("No DSN provided, client will not do anything.")}captureException(t,n,r){if(zg(t)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(t,n,r,a){let i=r&&r.event_id,o=Us(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(t,n,r){if(n&&n.originalException&&zg(n.originalException)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{a=i})),a}captureSession(t){if(!this._isEnabled()){!1&&Ee.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?!1&&Ee.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Lr(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(t){let n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(a=>r&&a)):Bn(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=N2(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}sendEvent(t,n={}){if(this._dsn){let r=R2(t,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=E2(r,w2(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(t){if(this._dsn){let n=I2(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(t,n){if(this._options.sendClientReports){let r=`${t}:${n}`;!1&&Ee.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(t,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Lr(t,{...r&&{status:"crashed"},errors:t.errors||Number(a||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,t&&r>=t&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...t,event_id:t.event_id||n.event_id||ea(),timestamp:t.timestamp||wa()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Xn.clone(s).update(n.captureContext));let u=Bn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(t,n,r){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:na(i.data,n,r)}}))},...t.user&&{user:na(t.user,n,r)},...t.contexts&&{contexts:na(t.contexts,n,r)},...t.extra&&{extra:na(t.extra,n,r)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=na(t.contexts.trace.data,n,r))),t.spans&&(a.spans=t.spans.map(i=>(i.data&&(i.data=na(i.data,n,r)),i))),a}_applyClientOptions(t){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in t||(t.environment="environment"in n?r:"production"),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Ti(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Ti(s.value,o));let u=t.request;u&&u.url&&(u.url=Ti(u.url,o))}_applyIntegrationsMetadata(t){let n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(a=>a.event_id,a=>{!1&&Ee.warn(a)})}_processEvent(t,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return Vs(new Pt("SDK not enabled, will not capture event."));let o=t.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),Vs(new Pt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(t,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",t.type||"error"),new Pt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return I5(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",t.type||"error"),new Pt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Pt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(t){this._numProcessing+=1,t.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(t){this._transport&&this._dsn?this._transport.send(t).then(null,n=>{!1&&Ee.error("Error while sending event:",n)}):!1&&Ee.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:t[n]}})}};function I5(e){let t="`beforeSend` method has to return `null` or a valid event.";if(fo(e))return e.then(n=>{if(!(mr(n)||n===null))throw new Pt(t);return n},n=>{throw new Pt(`beforeSend rejected with ${n}`)});if(!(mr(e)||e===null))throw new Pt(t);return e}p();function Jg(e,t){t.debug===!0&&!1&&Ee.enable();let n=Ie(),r=n.getScope();r&&r.update(t.initialScope);let a=new e(t);n.bindClient(a)}p();var R5=30;function Zs(e,t,n=S2(e.bufferSize||R5)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(Kg(o,(g,f)=>{let m=Gg(f);A2(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):s.push(g)}),s.length===0)return Bn();let u=Si(o[0],s),l=g=>{Kg(u,(f,m)=>{e.recordDroppedEvent(g,Gg(m))})},c=()=>t({body:ql(u,e.textEncoder)}).then(g=>{g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&!1&&Ee.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),r=k2(r,g)},g=>{!1&&Ee.error("Failed while sending event:",g),l("network_error")});return n.add(c).then(g=>g,g=>{if(g instanceof Pt)return!1&&Ee.error("Skipped sending event due to full buffer"),l("queue_overflow"),Bn();throw g})}return{send:i,flush:a}}p();var Co="7.7.0";var Ei={};ol(Ei,{FunctionToString:()=>Ci,InboundFilters:()=>xi});p();p();var q2,Ci=class e{static id="FunctionToString";name=e.id;setupOnce(){q2=Function.prototype.toString,Function.prototype.toString=function(...t){let n=bo(this)||this;return q2.apply(n,t)}}};p();var O5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],xi=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(e);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=z5(o._options,u);return N5(a,l)?null:a}}return a};r.id=this.name,t(r)}};function z5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...O5],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function N5(e,t){return t.ignoreInternal&&W5(e)?(!1&&Ee.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:C5(a)}function C5(e){let t=e.reduce((a,i)=>a+i.length,0),n=new Uint8Array(t),r=0;for(let a of e)n.set(a,r),r+=a.length;return n}function w2(e,t){let n=typeof e.data=="string"?Hg(e.data,t):e.data;return[vi({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var x5={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Kg(e){return x5[e]}p();function D2(e,t,n){let r=[{type:"client_report"},{timestamp:n||wa(),discarded_events:e}];return Si(t?{dsn:t}:{},[r])}p();var E5=60*1e3;function w5(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?E5:r-t}function D5(e,t){return e[t]||e.all||0}function A2(e,t,n=Date.now()){return D5(e,t)>n}function k2(e,{statusCode:t,headers:n},r=Date.now()){let a={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),g=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+g;else for(let f of l.split(";"))a[f]=r+g}else o?a.all=r+w5(o,r):t===429&&(a.all=r+60*1e3);return a}p();function P2(e){return e[0]}p();function Gg(e){let t=jg(),n={sid:ea(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>A5(n)};return e&&Lr(n,e),n}function Lr(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||jg(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ea()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Vg(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Lr(e,n)}function A5(e){return vi({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var L2=100,Xn=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Lr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):mr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,L2):L2;if(r<=0)return this;let a={timestamp:wa(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([..._2(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new Pr((i,o)=>{let s=t[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Ee.log(`Event processor "${s.id}" dropped event`),fo(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(t,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function _2(){return ho("globalEventProcessors",()=>[])}function _r(e){_2().push(e)}p();p();var $g=4,k5=100,ra=class{constructor(t,n=new Xn,r=$g){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{i.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:ea(),i=new Error(t);return this._withClient((o,s)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:ea();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=k5}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:wa(),...t},l=i?kg(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=To(this);try{t(this)}finally{To(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&Vg(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=ft(),{userAgent:s}=o.navigator||{},u=Gg({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Lr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Ys().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Ee.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Ys(){let e=ft();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function To(e){let t=Ys(),n=er(t);return jl(t,e),n}function Ie(){let e=Ys();return(!M2(e)||er(e).isOlderThan($g))&&jl(e,new ra),v2()?P5(e):er(e)}function P5(e){try{let t=Ys().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return er(e);if(!M2(n)||er(n).isOlderThan($g)){let r=er(e).getStackTop();jl(n,new ra(r.client,Xn.clone(r.scope)))}return er(n)}catch{return er(e)}}function M2(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function er(e){return ho("hub",()=>new ra,e)}function jl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}p();function vo(e,t){return Ie().captureException(e,{captureContext:t})}function Hl(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return Ie().captureMessage(e,n,r)}function Wl(e,t){return Ie().captureEvent(e,t)}function Kl(e){Ie().configureScope(e)}function Gl(e){Ie().addBreadcrumb(e)}function Vl(e,t){Ie().setContext(e,t)}function $l(e){Ie().setExtras(e)}function Yl(e,t){Ie().setExtra(e,t)}function Ql(e){Ie().setTags(e)}function Zl(e,t){Ie().setTag(e,t)}function Jl(e){Ie().setUser(e)}function So(e){Ie().withScope(e)}function Xl(e,t){return Ie().startTransaction({metadata:{source:"custom"},...e},t)}p();var L5="7";function F2(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function _5(e){return`${F2(e)}${e.projectId}/envelope/`}function M5(e,t){return d2({sentry_key:e.publicKey,sentry_version:L5,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Qs(e,t={}){let n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${_5(e)}?${M5(e,r)}`}function Yg(e,t){let n=Ol(e),r=`${F2(n)}embed/error-page/`,a=`dsn=${yi(n)}`;for(let i in t)if(i!=="dsn")if(i==="user"){let o=t.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`;return`${r}?${a}`}p();p();function B2(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function F5(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function I2(e,t,n,r){let a=B2(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:yi(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e];return Si(i,[o])}function R2(e,t,n,r){let a=B2(n),i=e.type||"event",{transactionSampling:o}=e.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};F5(e,n&&n.sdk);let l=B5(e,a,r,t);return delete e.sdkProcessingMetadata,Si(l,[[{type:i,sample_rates:[{id:s,rate:u}]},e]])}function B5(e,t,n,r){let a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baggage,i=a&&P2(a);return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:yi(r)},...e.type==="transaction"&&i&&{trace:vi({...i})}}}p();var O2=[];function z2(e){return e.reduce((t,n)=>(t.every(r=>n.name!==r.name)&&t.push(n),t),[])}function Qg(e){let t=e.defaultIntegrations&&[...e.defaultIntegrations]||[],n=e.integrations,r=[...z2(t)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...z2(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function N2(e){let t={};return e.forEach(n=>{t[n.name]=n,O2.indexOf(n.name)===-1&&(n.setupOnce(_r,Ie),O2.push(n.name),!1&&Ee.log(`Integration installed: ${n.name}`))}),t}var U2="Not capturing exception because it's already been captured.",Zs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(t){if(this._options=t,t.dsn){this._dsn=Ol(t.dsn);let n=Qs(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}else!1&&Ee.warn("No DSN provided, client will not do anything.")}captureException(t,n,r){if(Og(t)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(t,n,r,a){let i=r&&r.event_id,o=qs(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(t,n,r){if(n&&n.originalException&&Og(n.originalException)){!1&&Ee.log(U2);return}let a=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{a=i})),a}captureSession(t){if(!this._isEnabled()){!1&&Ee.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?!1&&Ee.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Lr(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(t){let n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(a=>r&&a)):Bn(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=N2(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return!1&&Ee.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}sendEvent(t,n={}){if(this._dsn){let r=R2(t,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=E2(r,w2(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(t){if(this._dsn){let n=I2(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(t,n){if(this._options.sendClientReports){let r=`${t}:${n}`;!1&&Ee.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(t,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Lr(t,{...r&&{status:"crashed"},errors:t.errors||Number(a||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,t&&r>=t&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...t,event_id:t.event_id||n.event_id||ea(),timestamp:t.timestamp||wa()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=Xn.clone(s).update(n.captureContext));let u=Bn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(t,n,r){if(!t)return null;let a={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:na(i.data,n,r)}}))},...t.user&&{user:na(t.user,n,r)},...t.contexts&&{contexts:na(t.contexts,n,r)},...t.extra&&{extra:na(t.extra,n,r)}};return t.contexts&&t.contexts.trace&&a.contexts&&(a.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(a.contexts.trace.data=na(t.contexts.trace.data,n,r))),t.spans&&(a.spans=t.spans.map(i=>(i.data&&(i.data=na(i.data,n,r)),i))),a}_applyClientOptions(t){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in t||(t.environment="environment"in n?r:"production"),t.release===void 0&&a!==void 0&&(t.release=a),t.dist===void 0&&i!==void 0&&(t.dist=i),t.message&&(t.message=Ti(t.message,o));let s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=Ti(s.value,o));let u=t.request;u&&u.url&&(u.url=Ti(u.url,o))}_applyIntegrationsMetadata(t){let n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(a=>a.event_id,a=>{!1&&Ee.warn(a)})}_processEvent(t,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return $s(new Pt("SDK not enabled, will not capture event."));let o=t.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),$s(new Pt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(t,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",t.type||"error"),new Pt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return I5(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",t.type||"error"),new Pt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Pt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(t){this._numProcessing+=1,t.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(t){this._transport&&this._dsn?this._transport.send(t).then(null,n=>{!1&&Ee.error("Error while sending event:",n)}):!1&&Ee.error("Transport disabled")}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:t[n]}})}};function I5(e){let t="`beforeSend` method has to return `null` or a valid event.";if(fo(e))return e.then(n=>{if(!(mr(n)||n===null))throw new Pt(t);return n},n=>{throw new Pt(`beforeSend rejected with ${n}`)});if(!(mr(e)||e===null))throw new Pt(t);return e}p();function Zg(e,t){t.debug===!0&&!1&&Ee.enable();let n=Ie(),r=n.getScope();r&&r.update(t.initialScope);let a=new e(t);n.bindClient(a)}p();var R5=30;function Js(e,t,n=S2(e.bufferSize||R5)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(Wg(o,(g,f)=>{let m=Kg(f);A2(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):s.push(g)}),s.length===0)return Bn();let u=Si(o[0],s),l=g=>{Wg(u,(f,m)=>{e.recordDroppedEvent(g,Kg(m))})},c=()=>t({body:ql(u,e.textEncoder)}).then(g=>{g.statusCode!==void 0&&(g.statusCode<200||g.statusCode>=300)&&!1&&Ee.warn(`Sentry responded with status code ${g.statusCode} to sent event.`),r=k2(r,g)},g=>{!1&&Ee.error("Failed while sending event:",g),l("network_error")});return n.add(c).then(g=>g,g=>{if(g instanceof Pt)return!1&&Ee.error("Skipped sending event due to full buffer"),l("queue_overflow"),Bn();throw g})}return{send:i,flush:a}}p();var Co="7.7.0";var Ei={};ol(Ei,{FunctionToString:()=>Ci,InboundFilters:()=>xi});p();p();var q2,Ci=class e{static id="FunctionToString";name=e.id;setupOnce(){q2=Function.prototype.toString,Function.prototype.toString=function(...t){let n=bo(this)||this;return q2.apply(n,t)}}};p();var O5=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],xi=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(e);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=z5(o._options,u);return N5(a,l)?null:a}}return a};r.id=this.name,t(r)}};function z5(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...O5],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function N5(e,t){return t.ignoreInternal&&W5(e)?(!1&&Ee.warn(`Event dropped due to being internal Sentry Error. Event: ${ta(e)}`),!0):U5(e,t.ignoreErrors)?(!1&&Ee.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${ta(e)}`),!0):q5(e,t.denyUrls)?(!1&&Ee.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${ta(e)}. Url: ${ec(e)}`),!0):j5(e,t.allowUrls)?!1:(!1&&Ee.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${ta(e)}. -Url: ${ec(e)}`),!0)}function U5(e,t){return!t||!t.length?!1:H5(e).some(n=>t.some(r=>zl(n,r)))}function q5(e,t){if(!t||!t.length)return!1;let n=ec(e);return n?t.some(r=>zl(n,r)):!1}function j5(e,t){if(!t||!t.length)return!0;let n=ec(e);return n?t.some(r=>zl(n,r)):!0}function H5(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Ee.error(`Cannot extract message for event ${ta(e)}`),[]}return[]}function W5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function K5(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ec(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?K5(t):null}catch{return!1&&Ee.error(`Cannot extract url for event ${ta(e)}`),null}}p();p();function tp(e,t){let n=np(e,t),r={type:t&&t.name,value:Y5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function G5(e,t,n,r){let a={exception:{values:[{type:qs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${g2(t)}`}]},extra:{__serialized__:Ug(t)}};if(n){let i=np(e,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function Xg(e,t){return{exception:{values:[tp(e,t)]}}}function np(e,t){let n=t.stacktrace||t.stack||"",r=$5(t);try{return e(n,r)}catch{}return[]}var V5=/Minified React error #\d+;/i;function $5(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(V5.test(e.message))return 1}return 0}function Y5(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function j2(e,t,n,r){let a=n&&n.syntheticException||void 0,i=tc(e,t,a,r);return Ea(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Bn(i)}function H2(e,t,n="info",r,a){let i=r&&r.syntheticException||void 0,o=ep(e,t,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Bn(o)}function tc(e,t,n,r,a){let i;if(Rl(t)&&t.error)return Xg(e,t.error);if(t2(t)){let o=t;if("stack"in t)i=Xg(e,t);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=ep(e,u,n,r),Gs(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Il(t)?Xg(e,t):mr(t)||qs(t)?(i=G5(e,t,n,a),Ea(i,{synthetic:!0}),i):(i=ep(e,t,n,r),Gs(i,`${t}`,void 0),Ea(i,{synthetic:!0}),i)}function ep(e,t,n,r){let a={message:t};if(r&&n){let i=np(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}p();var rp="Breadcrumbs",Da=class e{static id=rp;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&br("console",Z5),this.options.dom&&br("dom",Q5(this.options.dom)),this.options.xhr&&br("xhr",J5),this.options.fetch&&br("fetch",X5),this.options.history&&br("history",e8)}};function Q5(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?js(n.event.target,a):js(n.event,a)}catch{r=""}r.length!==0&&Ie().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Z5(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:C2(e.level),message:Lg(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Lg(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;Ie().addBreadcrumb(t,{input:e.args,level:e.level})}function J5(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};Ie().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function X5(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?Ie().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Ie().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function e8(e){let t=mt(),n=e.from,r=e.to,a=Nl(t.location.href),i=Nl(n),o=Nl(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Ie().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}p();var rc=mt(),nc;function ap(){if(nc)return nc;if(f2(fetch))return nc=fetch.bind(rc);let e=rc.document,t=fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){!1&&Ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nc=t.bind(rc)}function W2(e,t){Object.prototype.toString.call(rc&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(e,t):m2()&&ap()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Ee.error(i)})}var ip=mt(),xo=class extends Qs{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Co}],version:Co},super(t),t.sendClientReports&&ip.document&&ip.document.addEventListener("visibilitychange",()=>{ip.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return j2(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return H2(this._options.stackParser,t,n,r,this._options.attachStacktrace)}sendEvent(t,n){let r=this.getIntegrationById(rp);r&&r.options&&r.options.sentry&&Ie().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:ta(t)},{event:t}),super.sendEvent(t,n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){!1&&Ee.log("No outcomes to send");return}if(!this._dsn){!1&&Ee.log("No dsn provided, will not send outcomes");return}!1&&Ee.log("Sending outcomes:",t);let n=Ys(this._dsn,this._options),r=D2(t,this._options.tunnel&&yi(this._dsn));try{W2(n,ql(r))}catch(a){!1&&Ee.error(a)}}};p();p();function Js(e,t=ap()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:e.headers,...e.fetchOptions};return t(e.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Zs(e,n)}p();var Eo="?",t8=10,n8=20,r8=30,a8=40,i8=50;function Xs(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var o8=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s8=/\((\S*)(?::(\d+))(?::(\d+))\)/,u8=e=>{let t=o8.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=s8.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,a]=V2(t[1]||Eo,t[2]);return Xs(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},op=[r8,u8],l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d8=e=>{let t=l8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=c8.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],a=t[1]||Eo;return[a,r]=V2(a,r),Xs(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},sp=[i8,d8],g8=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p8=e=>{let t=g8.exec(e);return t?Xs(t[2],t[1]||Eo,+t[3],t[4]?+t[4]:void 0):void 0},up=[a8,p8],m8=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f8=e=>{let t=m8.exec(e);return t?Xs(t[2],t[3]||Eo,+t[1]):void 0},K2=[t8,f8],h8=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,b8=e=>{let t=h8.exec(e);return t?Xs(t[5],t[3]||t[4]||Eo,+t[1],+t[2]):void 0},G2=[n8,b8],lp=[op,sp,up],ac=Ig(...lp),V2=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Eo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};p();p();var cp=0;function dp(){return cp>0}function y8(){cp+=1,setTimeout(()=>{cp-=1})}function aa(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(bo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>aa(o,t));return e.apply(this,i)}catch(i){throw y8(),So(o=>{o.addEventProcessor(s=>(t.mechanism&&(Gs(s,void 0,void 0),Ea(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),vo(i)}),i}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Mg(r,e),Ws(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var gp={};ol(gp,{Breadcrumbs:()=>Da,Dedupe:()=>La,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,LinkedErrors:()=>ka,TryCatch:()=>Aa});p();p();var Mr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:T8,onunhandledrejection:v8};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(x8(n),r(),this._installFunc[n]=void 0)}}};function T8(){br("error",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let{msg:a,url:i,line:o,column:s,error:u}=e;if(dp()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Jr(a)?C8(a,i,o,s):$2(tc(n,u||a,void 0,r,!1),i,o,s);l.level="error",Y2(t,u,l,"onerror")})}function v8(){br("unhandledrejection",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(dp()||a&&a.__sentry_own_request__)return!0;let i=Us(a)?S8(a):tc(n,a,void 0,r,!0);i.level="error",Y2(t,a,i,"onunhandledrejection")})}function S8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function C8(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Rl(e)?e.message:e,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),$2({exception:{values:[{type:o,value:i}]}},t,n,r)}function $2(e,t,n,r){let a=e.exception=e.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Jr(t)&&t.length>0?t:o2();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function x8(e){!1&&Ee.log(`Global Handler attached: ${e}`)}function Y2(e,t,n,r){Ea(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Q2(){let e=Ie(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}p();var E8=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Aa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=mt();this._options.setTimeout&&fr(t,"setTimeout",Z2),this._options.setInterval&&fr(t,"setInterval",Z2),this._options.requestAnimationFrame&&fr(t,"requestAnimationFrame",w8),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&fr(XMLHttpRequest.prototype,"send",D8);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:E8).forEach(A8)}};function Z2(e){return function(...t){let n=t[0];return t[0]=aa(n,{mechanism:{data:{function:hr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function w8(e){return function(t){return e.apply(this,[aa(t,{mechanism:{data:{function:"requestAnimationFrame",handler:hr(e)},handled:!0,type:"instrument"}})])}}function D8(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&fr(n,a,function(i){let o={mechanism:{data:{function:a,handler:hr(i)},handled:!0,type:"instrument"}},s=bo(i);return s&&(o.mechanism.data.handler=hr(s)),aa(i,o)})}),e.apply(this,t)}}function A8(e){let t=mt(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fr(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=aa(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:hr(i),target:e},handled:!0,type:"instrument"}}))}catch{}let s=aa(i,{mechanism:{data:{function:"addEventListener",handler:hr(i),target:e},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),fr(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}p();var k8="cause",P8=5,ka=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||k8,this._limit=t.limit||P8}setupOnce(){let t=Ie().getClient();t&&_r((n,r)=>{let a=Ie().getIntegration(e);return a?L8(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function L8(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!kr(a.originalException,Error))return r;let i=J2(e,n,a.originalException,t);return r.exception.values=[...i,...r.exception.values],r}function J2(e,t,n,r,a=[]){if(!kr(n[r],Error)||a.length+1>=t)return a;let i=tp(e,n[r]);return J2(e,t,n[r],r,[i,...a])}p();var X2=mt(),Pa=class e{static id="HttpContext";name=e.id;setupOnce(){_r(t=>{if(Ie().getIntegration(e)){if(!navigator&&!location&&!X2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=X2.document||{},{userAgent:a}=navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...t,request:o}}return t})}};p();var La=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let i=n().getIntegration(e);if(i){try{if(_8(a,i._previousEvent))return!1&&Ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,t(r)}};function _8(e,t){return t?!!(M8(e,t)||F8(e,t)):!1}function M8(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rb(e,t)||!nb(e,t))}function F8(e,t){let n=eb(t),r=eb(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rb(e,t)||!nb(e,t))}function nb(e,t){let n=tb(e),r=tb(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Ee.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Ie();n.captureSession&&(ab(n),br("history",({from:r,to:a})=>{r===void 0||r===a||ab(Ie())}))}var pb={},mp=mt();mp.Sentry&&mp.Sentry.Integrations&&(pb=mp.Sentry.Integrations);var I8={...pb,...Ei,...gp};var fp=kl.alert;p();p();p();function Le(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():E}var De=Le();function pe(){return De.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function mb(){return De.BETA==="1"}function pn(){return De.PROD==="1"}function tr(){return De.PROD_API==="1"}function fb(){return De.HAS_CSP_ERROR=="1"}function Ge(){if(De.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function wo(){return De.IMMERSIVE_TRANSLATE_SAFARI==="1"}function ic(){return typeof Deno<"u"}var Rq=Le().PROD==="1",Do=Le().PROD!=="1";function oc(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function eu(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}p();var hb={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${ec(e)}`),!0)}function U5(e,t){return!t||!t.length?!1:H5(e).some(n=>t.some(r=>zl(n,r)))}function q5(e,t){if(!t||!t.length)return!1;let n=ec(e);return n?t.some(r=>zl(n,r)):!1}function j5(e,t){if(!t||!t.length)return!0;let n=ec(e);return n?t.some(r=>zl(n,r)):!0}function H5(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Ee.error(`Cannot extract message for event ${ta(e)}`),[]}return[]}function W5(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function K5(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ec(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?K5(t):null}catch{return!1&&Ee.error(`Cannot extract url for event ${ta(e)}`),null}}p();p();function ep(e,t){let n=tp(e,t),r={type:t&&t.name,value:Y5(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function G5(e,t,n,r){let a={exception:{values:[{type:js(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${g2(t)}`}]},extra:{__serialized__:Ng(t)}};if(n){let i=tp(e,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function Jg(e,t){return{exception:{values:[ep(e,t)]}}}function tp(e,t){let n=t.stacktrace||t.stack||"",r=$5(t);try{return e(n,r)}catch{}return[]}var V5=/Minified React error #\d+;/i;function $5(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(V5.test(e.message))return 1}return 0}function Y5(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function j2(e,t,n,r){let a=n&&n.syntheticException||void 0,i=tc(e,t,a,r);return Ea(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Bn(i)}function H2(e,t,n="info",r,a){let i=r&&r.syntheticException||void 0,o=Xg(e,t,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Bn(o)}function tc(e,t,n,r,a){let i;if(Rl(t)&&t.error)return Jg(e,t.error);if(t2(t)){let o=t;if("stack"in t)i=Jg(e,t);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=Xg(e,u,n,r),Vs(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Il(t)?Jg(e,t):mr(t)||js(t)?(i=G5(e,t,n,a),Ea(i,{synthetic:!0}),i):(i=Xg(e,t,n,r),Vs(i,`${t}`,void 0),Ea(i,{synthetic:!0}),i)}function Xg(e,t,n,r){let a={message:t};if(r&&n){let i=tp(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]})}return a}p();var np="Breadcrumbs",Da=class e{static id=np;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&br("console",Z5),this.options.dom&&br("dom",Q5(this.options.dom)),this.options.xhr&&br("xhr",J5),this.options.fetch&&br("fetch",X5),this.options.history&&br("history",e8)}};function Q5(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Hs(n.event.target,a):Hs(n.event,a)}catch{r=""}r.length!==0&&Ie().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Z5(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:C2(e.level),message:Pg(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Pg(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;Ie().addBreadcrumb(t,{input:e.args,level:e.level})}function J5(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};Ie().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function X5(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?Ie().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):Ie().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function e8(e){let t=ft(),n=e.from,r=e.to,a=Nl(t.location.href),i=Nl(n),o=Nl(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Ie().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}p();var rc=ft(),nc;function rp(){if(nc)return nc;if(f2(fetch))return nc=fetch.bind(rc);let e=rc.document,t=fetch;if(e&&typeof e.createElement=="function")try{let n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(n){!1&&Ee.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return nc=t.bind(rc)}function W2(e,t){Object.prototype.toString.call(rc&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(e,t):m2()&&rp()(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Ee.error(i)})}var ap=ft(),xo=class extends Zs{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Co}],version:Co},super(t),t.sendClientReports&&ap.document&&ap.document.addEventListener("visibilitychange",()=>{ap.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return j2(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return H2(this._options.stackParser,t,n,r,this._options.attachStacktrace)}sendEvent(t,n){let r=this.getIntegrationById(np);r&&r.options&&r.options.sentry&&Ie().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:ta(t)},{event:t}),super.sendEvent(t,n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){let t=this._clearOutcomes();if(t.length===0){!1&&Ee.log("No outcomes to send");return}if(!this._dsn){!1&&Ee.log("No dsn provided, will not send outcomes");return}!1&&Ee.log("Sending outcomes:",t);let n=Qs(this._dsn,this._options),r=D2(t,this._options.tunnel&&yi(this._dsn));try{W2(n,ql(r))}catch(a){!1&&Ee.error(a)}}};p();p();function Xs(e,t=rp()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:e.headers,...e.fetchOptions};return t(e.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return Js(e,n)}p();var Eo="?",t8=10,n8=20,r8=30,a8=40,i8=50;function eu(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var o8=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s8=/\((\S*)(?::(\d+))(?::(\d+))\)/,u8=e=>{let t=o8.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let i=s8.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}let[r,a]=V2(t[1]||Eo,t[2]);return eu(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},ip=[r8,u8],l8=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c8=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d8=e=>{let t=l8.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let i=c8.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],a=t[1]||Eo;return[a,r]=V2(a,r),eu(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},op=[i8,d8],g8=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p8=e=>{let t=g8.exec(e);return t?eu(t[2],t[1]||Eo,+t[3],t[4]?+t[4]:void 0):void 0},sp=[a8,p8],m8=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,f8=e=>{let t=m8.exec(e);return t?eu(t[2],t[3]||Eo,+t[1]):void 0},K2=[t8,f8],h8=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,b8=e=>{let t=h8.exec(e);return t?eu(t[5],t[3]||t[4]||Eo,+t[1],+t[2]):void 0},G2=[n8,b8],up=[ip,op,sp],ac=Bg(...up),V2=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Eo,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};p();p();var lp=0;function cp(){return lp>0}function y8(){lp+=1,setTimeout(()=>{lp-=1})}function aa(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(bo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>aa(o,t));return e.apply(this,i)}catch(i){throw y8(),So(o=>{o.addEventProcessor(s=>(t.mechanism&&(Vs(s,void 0,void 0),Ea(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),vo(i)}),i}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}_g(r,e),Ks(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var dp={};ol(dp,{Breadcrumbs:()=>Da,Dedupe:()=>La,GlobalHandlers:()=>Mr,HttpContext:()=>Pa,LinkedErrors:()=>ka,TryCatch:()=>Aa});p();p();var Mr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:T8,onunhandledrejection:v8};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(x8(n),r(),this._installFunc[n]=void 0)}}};function T8(){br("error",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let{msg:a,url:i,line:o,column:s,error:u}=e;if(cp()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Jr(a)?C8(a,i,o,s):$2(tc(n,u||a,void 0,r,!1),i,o,s);l.level="error",Y2(t,u,l,"onerror")})}function v8(){br("unhandledrejection",e=>{let[t,n,r]=Q2();if(!t.getIntegration(Mr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(cp()||a&&a.__sentry_own_request__)return!0;let i=qs(a)?S8(a):tc(n,a,void 0,r,!0);i.level="error",Y2(t,a,i,"onunhandledrejection")})}function S8(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function C8(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Rl(e)?e.message:e,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),$2({exception:{values:[{type:o,value:i}]}},t,n,r)}function $2(e,t,n,r){let a=e.exception=e.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Jr(t)&&t.length>0?t:o2();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function x8(e){!1&&Ee.log(`Global Handler attached: ${e}`)}function Y2(e,t,n,r){Ea(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Q2(){let e=Ie(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}p();var E8=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Aa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=ft();this._options.setTimeout&&fr(t,"setTimeout",Z2),this._options.setInterval&&fr(t,"setInterval",Z2),this._options.requestAnimationFrame&&fr(t,"requestAnimationFrame",w8),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&fr(XMLHttpRequest.prototype,"send",D8);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:E8).forEach(A8)}};function Z2(e){return function(...t){let n=t[0];return t[0]=aa(n,{mechanism:{data:{function:hr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function w8(e){return function(t){return e.apply(this,[aa(t,{mechanism:{data:{function:"requestAnimationFrame",handler:hr(e)},handled:!0,type:"instrument"}})])}}function D8(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&fr(n,a,function(i){let o={mechanism:{data:{function:a,handler:hr(i)},handled:!0,type:"instrument"}},s=bo(i);return s&&(o.mechanism.data.handler=hr(s)),aa(i,o)})}),e.apply(this,t)}}function A8(e){let t=ft(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(fr(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=aa(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:hr(i),target:e},handled:!0,type:"instrument"}}))}catch{}let s=aa(i,{mechanism:{data:{function:"addEventListener",handler:hr(i),target:e},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),fr(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}p();var k8="cause",P8=5,ka=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||k8,this._limit=t.limit||P8}setupOnce(){let t=Ie().getClient();t&&_r((n,r)=>{let a=Ie().getIntegration(e);return a?L8(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function L8(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!kr(a.originalException,Error))return r;let i=J2(e,n,a.originalException,t);return r.exception.values=[...i,...r.exception.values],r}function J2(e,t,n,r,a=[]){if(!kr(n[r],Error)||a.length+1>=t)return a;let i=ep(e,n[r]);return J2(e,t,n[r],r,[i,...a])}p();var X2=ft(),Pa=class e{static id="HttpContext";name=e.id;setupOnce(){_r(t=>{if(Ie().getIntegration(e)){if(!navigator&&!location&&!X2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=X2.document||{},{userAgent:a}=navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...t,request:o}}return t})}};p();var La=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let i=n().getIntegration(e);if(i){try{if(_8(a,i._previousEvent))return!1&&Ee.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,t(r)}};function _8(e,t){return t?!!(M8(e,t)||F8(e,t)):!1}function M8(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!rb(e,t)||!nb(e,t))}function F8(e,t){let n=eb(t),r=eb(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!rb(e,t)||!nb(e,t))}function nb(e,t){let n=tb(e),r=tb(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Ee.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Ie();n.captureSession&&(ab(n),br("history",({from:r,to:a})=>{r===void 0||r===a||ab(Ie())}))}var pb={},pp=ft();pp.Sentry&&pp.Sentry.Integrations&&(pb=pp.Sentry.Integrations);var I8={...pb,...Ei,...dp};var mp=kl.alert;p();p();p();function Le(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():E}var De=Le();function pe(){return De.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function mb(){return De.BETA==="1"}function pn(){return De.PROD==="1"}function tr(){return De.PROD_API==="1"}function fb(){return De.HAS_CSP_ERROR=="1"}function Ge(){if(De.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function wo(){return De.IMMERSIVE_TRANSLATE_SAFARI==="1"}function ic(){return typeof Deno<"u"}var Rq=Le().PROD==="1",Do=Le().PROD!=="1";function oc(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function tu(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}p();var hb={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5173,16 +5173,16 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Lb=[{code:"zh-CN",messages:hb},{code:"zh-TW",messages:bb},{code:"en",messages:yb},{code:"ja",messages:Tb},{code:"ar",messages:vb},{code:"de",messages:Sb},{code:"es",messages:Cb},{code:"fa",messages:xb},{code:"fr",messages:Eb},{code:"hi",messages:wb},{code:"it",messages:Db},{code:"ru",messages:Ab},{code:"ko",messages:kb},{code:"pt",messages:Pb}];var Mb="immersiveTranslateDeeplGlobalState",hp="immersiveTranslateBingGlobalState",bp="immersiveTranslateYandexGlobalState",nn={};for(let e of Lb)nn[e.code]=e.messages;var Di="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",sc="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",_a=be+"GoogleAccessToken",tu=be+"AuthFlow",uc="immersive-translate-config-latest.json",yp=be+"AuthState",lc=be+"IframeMessage",bj=be+"WaitForRateLimit",Fb=be+"DocumentMessageAsk",Yt=be+"DocumentMessageTellThirdParty",Ai=be+"showError",Bb=be+"DocumentMessageThirdPartyTell",Ib=be+"DocumentMessageEventUpload",Q8=be+"DocumentMessageHandler",cc=`${be}Share`,nu=`${be}ToggleMouseHoverTranslateDirectly`,Rb=`${be}ReqDraft`,Ob=`${be}ResDraft`,Z8=`${be}Container`,zb=`${be}SpecifiedContainer`,ia="buildinConfig",Ao="localConfig",ru="openOptionsPage",Tp="openAboutPage",Nb="translateLocalPdfFile";var au="openEbookViewer",iu="openEbookBuilder";var ki=`${be}PageTranslatedStatus`,yj=`${be}PageUrlChanged`,oa=`${be}ReceiveCommand`,Ub=be+"LastUseMouseHoverTime",dc=be+"LastUseInputTime",yr=be+"LastUseManualTranslatePageTime",Tj=`${be}PopupReceiveMessage`,J8="immersivetranslate.com",X8="config.immersivetranslate.com",vj=`https://${J8}/`,Ma=`https://${X8}/default_config.json`,Sj=`${be}Mark`,In=`${be}Root`,qb=`${be}Walked`,Cj=`data-${ee}-walked`,jb=`${be}Paragraph`,Hb=`data-${ee}-paragraph`,Fr=`data-${ee}-translation-element-mark`,Wb=`${be}TranslationElementMark`,xj=`${be}TranslatedMark`,Kb=`${be}LoadingId`,vp=`data-${ee}-loading-id`,Gb=`${be}ErrorId`,gc=`data-${ee}-error-id`,e7=`${be}AtomicBlockMark`,Vb=`${be}ExcludeMark`,Ej=`data-${ee}-exclude-mark`,t7=`${be}StayOriginalMark`,wj=`${be}PreWhitespaceMark`,pc=`${be}InlineMark`,$b=`${be}BlockMark`,Dj=`${be}Left`,Aj=`${be}Right`,kj=`${be}Width`,Pj=`${be}Height`,Lj=`${be}Top`,_j=`${be}FontSize`,Yb="lastRunTime",Mj=`${be}GlobalStyleMark`,ou=["@","#"],mc=" --- ",Qb=` -`,Lt=`${ee}-target-wrapper`,Fj=`${ee}-pdf-target-container`,fc=`${ee}-target-inner`,Bj=`${ee}-source-wrapper`,Sp=`${ee}-target-translation-block-wrapper`,Ij=`${ee}-root-translation-theme`,ko=`${be}RootTranslationTheme`,Zb=`${ee}-target-translation-vertical-block-wrapper`,Rj=`${ee}-target-translation-pdf-block-wrapper`,Jb=`${ee}-target-translation-pre-whitespace`,Cp=`${ee}-target-translation-inline-wrapper`,xp=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],su={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Rn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Xb={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},e1={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},t1={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var hc=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],n1=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Br="zh-CN",bc="https://immersivetranslate.com/docs/communities/",_b=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],yc=["caiyun","cai"],nr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Lb=[{code:"zh-CN",messages:hb},{code:"zh-TW",messages:bb},{code:"en",messages:yb},{code:"ja",messages:Tb},{code:"ar",messages:vb},{code:"de",messages:Sb},{code:"es",messages:Cb},{code:"fa",messages:xb},{code:"fr",messages:Eb},{code:"hi",messages:wb},{code:"it",messages:Db},{code:"ru",messages:Ab},{code:"ko",messages:kb},{code:"pt",messages:Pb}];var Mb="immersiveTranslateDeeplGlobalState",fp="immersiveTranslateBingGlobalState",hp="immersiveTranslateYandexGlobalState",rn={};for(let e of Lb)rn[e.code]=e.messages;var Di="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",sc="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",_a=be+"GoogleAccessToken",nu=be+"AuthFlow",uc="immersive-translate-config-latest.json",bp=be+"AuthState",lc=be+"IframeMessage",bj=be+"WaitForRateLimit",Fb=be+"DocumentMessageAsk",Yt=be+"DocumentMessageTellThirdParty",Ai=be+"showError",Bb=be+"DocumentMessageThirdPartyTell",Ib=be+"DocumentMessageEventUpload",Q8=be+"DocumentMessageHandler",cc=`${be}Share`,ru=`${be}ToggleMouseHoverTranslateDirectly`,Rb=`${be}ReqDraft`,Ob=`${be}ResDraft`,Z8=`${be}Container`,zb=`${be}SpecifiedContainer`,ia="buildinConfig",Ao="localConfig",au="openOptionsPage",yp="openAboutPage",Nb="translateLocalPdfFile";var iu="openEbookViewer",ou="openEbookBuilder";var ki=`${be}PageTranslatedStatus`,yj=`${be}PageUrlChanged`,oa=`${be}ReceiveCommand`,Ub=be+"LastUseMouseHoverTime",dc=be+"LastUseInputTime",yr=be+"LastUseManualTranslatePageTime",Tj=`${be}PopupReceiveMessage`,J8="immersivetranslate.com",X8="config.immersivetranslate.com",vj=`https://${J8}/`,Ma=`https://${X8}/default_config.json`,Sj=`${be}Mark`,In=`${be}Root`,qb=`${be}Walked`,Cj=`data-${ee}-walked`,jb=`${be}Paragraph`,Hb=`data-${ee}-paragraph`,Fr=`data-${ee}-translation-element-mark`,Wb=`${be}TranslationElementMark`,xj=`${be}TranslatedMark`,Kb=`${be}LoadingId`,Tp=`data-${ee}-loading-id`,Gb=`${be}ErrorId`,gc=`data-${ee}-error-id`,e7=`${be}AtomicBlockMark`,Vb=`${be}ExcludeMark`,Ej=`data-${ee}-exclude-mark`,t7=`${be}StayOriginalMark`,wj=`${be}PreWhitespaceMark`,pc=`${be}InlineMark`,$b=`${be}BlockMark`,Dj=`${be}Left`,Aj=`${be}Right`,kj=`${be}Width`,Pj=`${be}Height`,Lj=`${be}Top`,_j=`${be}FontSize`,Yb="lastRunTime",Mj=`${be}GlobalStyleMark`,su=["@","#"],mc=" --- ",Qb=` +`,Lt=`${ee}-target-wrapper`,Fj=`${ee}-pdf-target-container`,fc=`${ee}-target-inner`,Bj=`${ee}-source-wrapper`,vp=`${ee}-target-translation-block-wrapper`,Ij=`${ee}-root-translation-theme`,ko=`${be}RootTranslationTheme`,Zb=`${ee}-target-translation-vertical-block-wrapper`,Rj=`${ee}-target-translation-pdf-block-wrapper`,Jb=`${ee}-target-translation-pre-whitespace`,Sp=`${ee}-target-translation-inline-wrapper`,Cp=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],uu={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Rn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Xb={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},e1={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},t1={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var hc=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],n1=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Br="zh-CN",bc="https://immersivetranslate.com/docs/communities/",_b=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],yc=["caiyun","cai"],nr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:ou,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[..._b,{type:"password",name:"apikey",required:!0}],props:_b},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Tc={type:be+"ChildFrameToRootFrameIdentifier"},Ep=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],sa=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],r1=["ctrl","alt","shift","cmd","command","option","control"],vc=[{key:"/"},{key:"="},{key:";"},{key:","},{key:"."},{key:":"},{key:"space",labelKey:"spaceKey",skipForStarting:!0},{key:"none",labelKey:"noneKey",skipForTrailing:!0}],Oj=pn()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",uu="user_from_plugin",ht="user_info",Pi=pn()||tr()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",Sc=pn()||tr()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",a1=Sc+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",i1=Sc+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Li=pn()||tr()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",Fa=pn()||tr()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",n7=pn()||tr()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",r7=pn()||tr()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",a7=pn()||tr()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",zj=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",o1=n7+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",s1=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Cc=Fa+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",u1=r7+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",l1=a7+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",c1=Li+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",xc="https://immersivetranslate.com/docs/usage/",d1="https://immersivetranslate.com/docs/communities/",g1=Le().TRANSLATE_FILE_URL,p1=g1+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",m1=g1+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var Po=console,wp=class{#e=performance.now();reset(){this.#e=performance.now()}stop(t){let n=performance.now(),r=Math.round(n-this.#e),a=Zn.green;r>1e4?a=Zn.red:r>1e3&&(a=Zn.yellow),Po.debug(Zn.dim(Di+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},lu=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&Po.log(Zn.dim(Di+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&Po.log(Zn.green(Di+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&Po.warn(Zn.yellow(Di+" WARN:"),...t)}error(...t){this.#e<=3&&Po.error(Zn.red(Di+" ERROR:"),...t)}fatal(...t){this.#e<=4&&Po.error(Zn.red(Di+" FATAL:"),...t)}timing(){return this.level===0?new wp:{reset:()=>{},stop:()=>{}}}},R=new lu;p();function ot(){try{let e=[Le().EBOOK_BUILDER_URL,Le().EBOOK_VIEWER_URL,Le().SUBTITLE_BUILDER_URL,Le().HTML_VIEWER_URL,Le().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];pn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&t.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}p();p();var Ec={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.4",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};p();p();p();var Dp=/iPhone/i,f1=/iPod/i,h1=/iPad/i,b1=/\biOS-universal(?:.+)Mac\b/i,Ap=/\bAndroid(?:.+)Mobile\b/i,y1=/Android/i,Lo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,wc=/Silk/i,ua=/Windows Phone/i,T1=/\bWindows(?:.+)ARM\b/i,v1=/BlackBerry/i,S1=/BB10/i,C1=/Opera Mini/i,x1=/\b(CriOS|Chrome)(?:.+)Mobile/i,E1=/Mobile(?:.+)Firefox\b/i,w1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function o7(e){return t=>t.test(e)}function st(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=o7(n),i={apple:{phone:a(Dp)&&!a(ua),ipod:a(f1),tablet:!a(Dp)&&(a(h1)||w1(t))&&!a(ua),universal:a(b1),device:(a(Dp)||a(f1)||a(h1)||a(b1)||w1(t))&&!a(ua)},amazon:{phone:a(Lo),tablet:!a(Lo)&&a(wc),device:a(Lo)||a(wc)},android:{phone:!a(ua)&&a(Lo)||!a(ua)&&a(Ap),tablet:!a(ua)&&!a(Lo)&&!a(Ap)&&(a(wc)||a(y1)),device:!a(ua)&&(a(Lo)||a(wc)||a(Ap)||a(y1))||a(/\bokhttp\b/i)},windows:{phone:a(ua),tablet:a(T1),device:a(ua)||a(T1)},other:{blackberry:a(v1),blackberry10:a(S1),opera:a(C1),firefox:a(E1),chrome:a(x1),device:a(v1)||a(S1)||a(C1)||a(E1)||a(x1)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var kp="DENO",Dc="CHROME",Ac="FIREFOX";function D1(e){let t=Dc;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Ac:/deno/i.test(n)&&(t=kp)}catch{}return e===Dc&&t===Dc||e===Ac&&t===Ac||e===kp&&t===kp}function Pp(){return D1(Dc)}function A1(){return typeof Deno<"u"}function rr(){return D1(Ac)}function Ba(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function k1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function _i(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function P1(){return pe()?"monkey":Pp()?"chrome":rr()?"firefox":Ge()?"safari":null}p();var L1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},_1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:L1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:L1,query:()=>{},sendMessage:()=>{}}};var Z;A1()?Z=_1:Z=globalThis.immersiveTranslateBrowserAPI;var s7="";function On(){return s7||Ec.version}function Ir(){return Z.runtime.getManifest().version}p();function M1(e){return e.replace(//g,">")}p();function Qt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function F1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function B1(e){if(e){let t=new Date(e.createTime),n=u7(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function u7(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}p();p();function ve(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Rn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Rn[a]}else return"auto";else return Rn[r]}function At(){return ve(document?.documentElement?.lang||"en")}function cu(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+o.text.length>t||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function l7(e,t){let n=[],r=[];for(let a=0;a0?y1e4?a=Zn.red:r>1e3&&(a=Zn.yellow),Po.debug(Zn.dim(Di+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},cu=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&Po.log(Zn.dim(Di+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&Po.log(Zn.green(Di+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&Po.warn(Zn.yellow(Di+" WARN:"),...t)}error(...t){this.#e<=3&&Po.error(Zn.red(Di+" ERROR:"),...t)}fatal(...t){this.#e<=4&&Po.error(Zn.red(Di+" FATAL:"),...t)}timing(){return this.level===0?new Ep:{reset:()=>{},stop:()=>{}}}},R=new cu;p();function st(){try{let e=[Le().EBOOK_BUILDER_URL,Le().EBOOK_VIEWER_URL,Le().SUBTITLE_BUILDER_URL,Le().HTML_VIEWER_URL,Le().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];pn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&t.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}p();p();var Ec={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.5",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};p();p();p();var wp=/iPhone/i,f1=/iPod/i,h1=/iPad/i,b1=/\biOS-universal(?:.+)Mac\b/i,Dp=/\bAndroid(?:.+)Mobile\b/i,y1=/Android/i,Lo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,wc=/Silk/i,ua=/Windows Phone/i,T1=/\bWindows(?:.+)ARM\b/i,v1=/BlackBerry/i,S1=/BB10/i,C1=/Opera Mini/i,x1=/\b(CriOS|Chrome)(?:.+)Mobile/i,E1=/Mobile(?:.+)Firefox\b/i,w1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function o7(e){return t=>t.test(e)}function ut(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=o7(n),i={apple:{phone:a(wp)&&!a(ua),ipod:a(f1),tablet:!a(wp)&&(a(h1)||w1(t))&&!a(ua),universal:a(b1),device:(a(wp)||a(f1)||a(h1)||a(b1)||w1(t))&&!a(ua)},amazon:{phone:a(Lo),tablet:!a(Lo)&&a(wc),device:a(Lo)||a(wc)},android:{phone:!a(ua)&&a(Lo)||!a(ua)&&a(Dp),tablet:!a(ua)&&!a(Lo)&&!a(Dp)&&(a(wc)||a(y1)),device:!a(ua)&&(a(Lo)||a(wc)||a(Dp)||a(y1))||a(/\bokhttp\b/i)},windows:{phone:a(ua),tablet:a(T1),device:a(ua)||a(T1)},other:{blackberry:a(v1),blackberry10:a(S1),opera:a(C1),firefox:a(E1),chrome:a(x1),device:a(v1)||a(S1)||a(C1)||a(E1)||a(x1)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Ap="DENO",Dc="CHROME",Ac="FIREFOX";function D1(e){let t=Dc;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Ac:/deno/i.test(n)&&(t=Ap)}catch{}return e===Dc&&t===Dc||e===Ac&&t===Ac||e===Ap&&t===Ap}function kp(){return D1(Dc)}function A1(){return typeof Deno<"u"}function rr(){return D1(Ac)}function Ba(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function k1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function _i(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function P1(){return pe()?"monkey":kp()?"chrome":rr()?"firefox":Ge()?"safari":null}p();var L1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},_1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:L1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:L1,query:()=>{},sendMessage:()=>{}}};var Z;A1()?Z=_1:Z=globalThis.immersiveTranslateBrowserAPI;var s7="";function On(){return s7||Ec.version}function Ir(){return Z.runtime.getManifest().version}p();function M1(e){return e.replace(//g,">")}p();function Qt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function F1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function B1(e){if(e){let t=new Date(e.createTime),n=u7(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function u7(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}p();p();function ye(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Rn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Rn[a]}else return"auto";else return Rn[r]}function At(){return ye(document?.documentElement?.lang||"en")}function du(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+o.text.length>t||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function l7(e,t){let n=[],r=[];for(let a=0;a0?yt){let x=[];Lp(T,t,x);for(let w=0;w0&&y{let s=e.lastIndexOf(o,t);return s>i?s:i},-1);if(a===-1){let i=e.slice(0,t);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),e.length>t&&Lp(e.slice(t),t,n)}else{let i=e.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?m.push(y):f.push(y))});let h=m.concat(f).filter(y=>y.required);if(h.length>0){for(let y of h)if(!i[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:m,explicitProps:f}}var Mi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=e.user,u=Qt(s),l=Object.keys(nr);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=nr[c];if(c.startsWith("mock"))return o?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&Ge())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let f=!!g.canary,m=!!g.alpha,h=!!g.beta;return c===e[t]||f&&i||m&&(r||i)||h&&(a||r||i)?!0:!m&&!h&&!f}).map(c=>_o(t,c,e))};function du(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function R1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}p();var O1=be+"SyncStoreKey_";function qt(e,t){let n=O1+e;return Z.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function at(e,t){let n=O1+e;return Z.storage.sync.set({[n]:t})}p();var Fi=be+"CacheKey_";function _p(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function c7(){let e=Z.storage.local.refresh;e&&e()}function Mp(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Fi)).filter(r=>r!==Fi+ht);if(n.length>0)return Z.storage.local.remove(n)}}var it={get:_p,set:Bp,getExpired:Mp,setExpired:Fp,remove:Ip,clear:Rp,refresh:c7};p();var z1=["*://*/*","*","*://*"],U1="immersive-translate-wildcard-placeholder.com";function Op(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>z1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(z1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,g=l.port===o;return l.port?c&&g:c}else return g7(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let T=u.split("://");l=T[0],l==="*"&&T.length>1&&(l="*",u="https://"+T[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,U1),f;try{f=new URL(g)}catch{return R.debug("invalid match pattern",g,"raw match value:",c),!1}let m=f.host,h=f.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=d7(l+":",N1(m),N1(h));if(y){let T=new URL(a);return y.test(T.href)}else return!1}});if(s)return s}return null}catch{return null}}function N1(e){return e.replaceAll(U1,"*")}function d7(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return Op(e,t)!==null}function g7(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}p();p();var q1=be+"StoreKey_";function la(e,t){let n=q1+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function j1(e,t){let n=q1+e;return Z.storage.local.set({[n]:t})}p();p();p();p();function H1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function zp(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let i=p7(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),f=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${f}>${g}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function gu(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function Rr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let i=gu(e,n,t);return i===t&&n!==r&&(i=gu(e,r,t)),zp(i,a)}function p7(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function jt(e,t,n){return Rr(nn,t,e.config.interfaceLanguage,"en",n)}p();function W1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K1(e){return new Date(e).getTime()}var Q=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=jt.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=jt.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=jt.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=jt.bind(null,t),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+`;continue}else if(T.length>t){let x=[];Pp(T,t,x);for(let w=0;w0&&y{let s=e.lastIndexOf(o,t);return s>i?s:i},-1);if(a===-1){let i=e.slice(0,t);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),e.length>t&&Pp(e.slice(t),t,n)}else{let i=e.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?m.push(y):f.push(y))});let h=m.concat(f).filter(y=>y.required);if(h.length>0){for(let y of h)if(!i[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:m,explicitProps:f}}var Mi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=e.user,u=Qt(s),l=Object.keys(nr);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=nr[c];if(c.startsWith("mock"))return o?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&Ge())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let f=!!g.canary,m=!!g.alpha,h=!!g.beta;return c===e[t]||f&&i||m&&(r||i)||h&&(a||r||i)?!0:!m&&!h&&!f}).map(c=>_o(t,c,e))};function gu(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function R1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}p();var O1=be+"SyncStoreKey_";function qt(e,t){let n=O1+e;return Z.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function it(e,t){let n=O1+e;return Z.storage.sync.set({[n]:t})}p();var Fi=be+"CacheKey_";function Lp(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function c7(){let e=Z.storage.local.refresh;e&&e()}function _p(e,t){let n=Fi+e;return Z.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:i}=r[n];return i&&ir.startsWith(Fi)).filter(r=>r!==Fi+bt);if(n.length>0)return Z.storage.local.remove(n)}}var ot={get:Lp,set:Fp,getExpired:_p,setExpired:Mp,remove:Bp,clear:Ip,refresh:c7};p();var z1=["*://*/*","*","*://*"],U1="immersive-translate-wildcard-placeholder.com";function Rp(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>z1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(z1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,g=l.port===o;return l.port?c&&g:c}else return g7(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let T=u.split("://");l=T[0],l==="*"&&T.length>1&&(l="*",u="https://"+T[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,U1),f;try{f=new URL(g)}catch{return R.debug("invalid match pattern",g,"raw match value:",c),!1}let m=f.host,h=f.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=d7(l+":",N1(m),N1(h));if(y){let T=new URL(a);return y.test(T.href)}else return!1}});if(s)return s}return null}catch{return null}}function N1(e){return e.replaceAll(U1,"*")}function d7(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return Rp(e,t)!==null}function g7(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}p();p();var q1=be+"StoreKey_";function la(e,t){let n=q1+e;return Z.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function j1(e,t){let n=q1+e;return Z.storage.local.set({[n]:t})}p();p();p();p();function H1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function Op(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let i=p7(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),f=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${f}>${g}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function pu(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function Rr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let i=pu(e,n,t);return i===t&&n!==r&&(i=pu(e,r,t)),Op(i,a)}function p7(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function jt(e,t,n){return Rr(rn,t,e.config.interfaceLanguage,"en",n)}p();function W1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K1(e){return new Date(e).getTime()}var Q=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=jt.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=jt.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=jt.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=jt.bind(null,t),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(t){let n=jt.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=jt.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=jt.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",f=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Cc});else{let h="";f=="OpenAI"?h=u1:h=l1,o?m+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:c1}):m+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:f}),!o&&(a.cancelAtPeriodEnd==="false"||K1(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W1(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Tr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await eg(G1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await G1(e);return t}async function G1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let i=e.fetchPolyfill||fetch,o=3e4;if(e.timeout&&(o=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(t,r)}catch(u){R.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new Q("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of m7(s.body)){let g=new TextDecoder().decode(c);u+=g;let f;for(;(f=u.indexOf(` -`))>=0;){let m=u.slice(0,f).trim();if(u=u.slice(f+1),m.startsWith("event:")||m==="")continue;let h="";if(m.startsWith("data:")&&(h=m.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(T){R.debug("json error",T);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(m){R.error("parse response failed",m)}u&&R.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,f=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),f&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new Q("fetchError",c).initNetWork(s.status)}}async function*m7(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}p();var f7=new Map;function kc(e){let t=h7(64),n=new CustomEvent(Fb,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{f7.set(t,(i,o)=>{i?a(i):r(o)})})}function h7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=Up(s),{type:f,name:m}=g;if(f!==t)return!1;let h=Up(o),T=pu.get(f).get(m);if(!T)return this.logger.debug(`no message handler for ${f}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=T,w={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let L=b(r.payload,w);i({ok:!0,data:L})}catch(L){i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.details,errorStatus:L.status})}return!1}else return b(r.payload,w).then(L=>{i({ok:!0,data:L})}).catch(L=>{i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.message,errorStatus:L.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=pu.get(i);if(o.has(t))return o.get(t).connectionInstance;{let s=new Np(`${i}:${t}`,this.logger);return pu.get(i).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},Np=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=Up(t),{type:a,id:i}=r;if(a!=="content_script"){let o={to:t,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await Z.runtime.sendMessage(o);return V1(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:t,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await Z.tabs.sendMessage(i,o);return V1(o,s,this.logger)}}};function V1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new Q(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new Q("noResponse","Unknown error")}function Up(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}p();var b7="";function Mo(){return b7||globalThis.navigator.userAgent}function qp(){return Mo().includes("ImtFxiOS")}function $1(){let t=Mo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function y7(){return Mo().includes("ImtFxAndroid")}function Y1(){let e=Mo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Q1(){let t=Mo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function mu(){let e=Mo();if(qp()||y7()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Pc;function T7(){return Pc||(Pc=new ca("content_script",!1).getConnection("pure_main",()=>{}),Pc)}var Z1="G-MKMD9LWFTR";async function Bi(e){try{let t=Le(),n=t.INSTALL_FROM==="firefox_store";if(mu()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=pe(),i=ot(),o=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await qt("fakeUserId","");u||(u=await la("fakeUserId",""),u&&await at("fakeUserId",u));let l=On(),c=new Date,g=await qt("installedAt","");g||(g=await la("installedAt",""),g&&await at("installedAt",g)),u?g||(g=new Date(0).toISOString(),await at("installedAt",g)):(u=v7(32),await at("fakeUserId",u)),g||(g=c.toISOString(),await at("installedAt",g));let f=new Date(g),m=J1(f),h=J1(c),y=m===h,T=c.getTime()-f.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${Z1}&api_secret=${s}`;o||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Z1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let w=po.parse(x),L=e.map(C=>{let v=C.params||{};if(w.os&&(v.os_name=w.os.name||"unknown",v.os_version=w.os.version||"unknown",v.os_version_name=w.os.versionName||"unknown"),w.browser){v.browser_name=w.browser.name||"unknown",v.browser_version=w.browser.version||"unknown";let A=mu();A&&(v.browser_name=A.name,v.browser_version=A.version)}return w.platform&&(v.platform_type=w.platform.type||"unknown"),w.engine&&(v.engine_name=w.engine.name||"unknown",v.engine_version=w.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),m&&(v.install_day=S7(f)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",T?v.is_new_user_this_week="1":v.is_new_user_this_week="0",i?v.main_frame=0:v.main_frame=1,{...C,params:v}}),M=await Lc({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:L})})}catch{}}function v7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(t){let n=jt.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=jt.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=jt.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",f=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Cc});else{let h="";f=="OpenAI"?h=u1:h=l1,o?m+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:c1}):m+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:f}),!o&&(a.cancelAtPeriodEnd==="false"||K1(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W1(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Tr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await Xd(G1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await G1(e);return t}async function G1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let i=e.fetchPolyfill||fetch,o=3e4;if(e.timeout&&(o=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(t,r)}catch(u){R.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new Q("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of m7(s.body)){let g=new TextDecoder().decode(c);u+=g;let f;for(;(f=u.indexOf(` +`))>=0;){let m=u.slice(0,f).trim();if(u=u.slice(f+1),m.startsWith("event:")||m==="")continue;let h="";if(m.startsWith("data:")&&(h=m.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(T){R.debug("json error",T);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(m){R.error("parse response failed",m)}u&&R.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,f=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),f&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new Q("fetchError",c).initNetWork(s.status)}}async function*m7(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}p();var f7=new Map;function kc(e){let t=h7(64),n=new CustomEvent(Fb,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{f7.set(t,(i,o)=>{i?a(i):r(o)})})}function h7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=Np(s),{type:f,name:m}=g;if(f!==t)return!1;let h=Np(o),T=mu.get(f).get(m);if(!T)return this.logger.debug(`no message handler for ${f}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=T,w={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let L=b(r.payload,w);i({ok:!0,data:L})}catch(L){i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.details,errorStatus:L.status})}return!1}else return b(r.payload,w).then(L=>{i({ok:!0,data:L})}).catch(L=>{i({ok:!1,errorName:L.name,errorMessage:L.message,errorDetails:L.message,errorStatus:L.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=mu.get(i);if(o.has(t))return o.get(t).connectionInstance;{let s=new zp(`${i}:${t}`,this.logger);return mu.get(i).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},zp=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=Np(t),{type:a,id:i}=r;if(a!=="content_script"){let o={to:t,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await Z.runtime.sendMessage(o);return V1(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:t,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await Z.tabs.sendMessage(i,o);return V1(o,s,this.logger)}}};function V1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new Q(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new Q("noResponse","Unknown error")}function Np(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}p();var b7="";function Mo(){return b7||globalThis.navigator.userAgent}function Up(){return Mo().includes("ImtFxiOS")}function $1(){let t=Mo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function y7(){return Mo().includes("ImtFxAndroid")}function Y1(){let e=Mo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Q1(){let t=Mo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function fu(){let e=Mo();if(Up()||y7()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Pc;function T7(){return Pc||(Pc=new ca("content_script",!1).getConnection("pure_main",()=>{}),Pc)}var Z1="G-MKMD9LWFTR";async function Bi(e){try{let t=Le(),n=t.INSTALL_FROM==="firefox_store";if(fu()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=pe(),i=st(),o=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await qt("fakeUserId","");u||(u=await la("fakeUserId",""),u&&await it("fakeUserId",u));let l=On(),c=new Date,g=await qt("installedAt","");g||(g=await la("installedAt",""),g&&await it("installedAt",g)),u?g||(g=new Date(0).toISOString(),await it("installedAt",g)):(u=v7(32),await it("fakeUserId",u)),g||(g=c.toISOString(),await it("installedAt",g));let f=new Date(g),m=J1(f),h=J1(c),y=m===h,T=c.getTime()-f.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${Z1}&api_secret=${s}`;o||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Z1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let w=po.parse(x),L=e.map(C=>{let v=C.params||{};if(w.os&&(v.os_name=w.os.name||"unknown",v.os_version=w.os.version||"unknown",v.os_version_name=w.os.versionName||"unknown"),w.browser){v.browser_name=w.browser.name||"unknown",v.browser_version=w.browser.version||"unknown";let A=fu();A&&(v.browser_name=A.name,v.browser_version=A.version)}return w.platform&&(v.platform_type=w.platform.type||"unknown"),w.engine&&(v.engine_name=w.engine.name||"unknown",v.engine_version=w.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),m&&(v.install_day=S7(f)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",T?v.is_new_user_this_week="1":v.is_new_user_this_week="0",i?v.main_frame=0:v.main_frame=1,{...C,params:v}}),M=await Lc({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:L})})}catch{}}function v7(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5338,7 +5338,7 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};p();p();function da(e){if(e.beta)return!1;if(Ge()&&e.spVersion)return fu(Ir(),e.spVersion);if(Y1()&&e.gspVersion){let t=Q1();if(t)return fu(t,e.gspVersion)}if(qp()&&e.ispVersion){let t=$1();if(t)return fu(t,e.ispVersion)}return!1}function fu(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function hu(e){e.message?.indexOf("token invalid")>=0&&it.remove(ht)}p();function _c(e){return Array.isArray(e)?e:e?[e]:[]}function zn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Ht(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function Mc(e,t){let n={...e};return ny(n,t),E7(n,t),n}function ty(e,t,n){let r={...t};return Ii({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,i)=>r[a]=i}),Ii({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function E7(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;ny(e,a)}function Ii({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[i,o,s]=w7(a);if(!i||e[a]===void 0)return;let u=e[a];n(i)&&(u=_c(e[a]));let l=t(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!X1(s))return;c=jp(l,u)}else if(o=="remove_v"){if(!X1(s))return;c=ey(l,u)}else o==="add"?c=jp(l,u):o=="remove"&&(c=ey(l,u));if(c){r(i,c);return}Array.isArray(e[i])&&i.startsWith("additional")?c=jp(l,u):c=u,r(i,c)})}function ny(e,t){return Ii({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function jp(e,t){let n;if(Array.isArray(e)){let r=_c(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function w7(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function X1(e){let t=On();return e&&fu(t,e)}function ey(e,t){if(Array.isArray(e)){let n=_c(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function Ri(){if(De.PROD==="1")return{};let e={};if(De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(De.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=De.DEEPL_PROXY_ENDPOINT),De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}De.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=De.IMMERSIVE_TRANSLATE_SERVICE);let t={};return De.DEBUG==="1"&&(t.debug=!0,t.cache=!1),De.MOCK==="1"&&(t.translationService="mock"),t}async function Wt(){let e=await Z.storage.local.get(Ao);if(e[Ao]){let t=e[Ao],n=t.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...t,tempTranslationUrlMatches:[...n]};return a&&await Kt(i),i}else return{}}async function Kt(e){await Z.storage.local.set({[Ao]:e})}async function ry(e){await Z.storage.local.set({[ia]:e})}async function Ra(){await Z.storage.local.set({[ia]:{}})}async function Oa(){await Z.storage.local.set({[Ao]:{}})}async function ay(){let e=await Z.storage.local.get(ia),n={...await Hp(),...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let r=e[ia];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function bt(){let e=await Z.storage.local.get(ia),t={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let k=e[ia];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),B=new Date(t.buildinConfigUpdatedAt);_>B&&(t=k)}}let n=await k7(t);t.targetLanguage=n;let r=await it.get(ht,null),a={};if(!pe()&&Z.commands&&Z.commands.getAll){let k=await Z.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let i=await Hp(),o=Ri(),s=await vr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Wt(),c=new Date,g=Object.assign({},u,o,s);if(!g.interfaceLanguage){let k=await D7();g.interfaceLanguage=k}let f=g.interfaceLanguage==="en",m=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!f&&!m&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let T=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(T=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let w=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,w=!0);let L=(g?.translationLanguagePattern?.matches?.length||0)>0,M=await qt("installedAt",""),C=Number(await la("translage_page_daily",0)),v=Number(await qt(yr,0)),A;v>0&&(Date.now()-v0&&(Date.now()-C0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],B=Array.isArray(_)?_:[_],H=Array.from(new Set(B.concat(k.map(j=>j.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:H}}}let F=Object.assign(i,t);Ii({rule:t,valueIsArray:k=>Array.isArray(i[k]),getMergedValue:k=>i[k],onMergedResult:(k,_)=>{k!="generalRule"&&(F[k]=_)}});let P=Qt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let z={};g.translationServices&&g.translationServices.openai&&(z=g.translationServices.openai),!P&&O.authKey&&!O.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):O&&O.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!P&&z.APIKEY&&!z.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):z&&z.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),I=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of q){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(F[_]=Mc(i[_],g[_]));else if(_==="translationServices")P7(g,F);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&I.includes(_))g[_]&&(F[_]=Object.assign(F[_],g[_])),_==="shortcuts"&&(pe()||Ge()?F[_]={...F[_],...a}:F[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let B=F.rules||[],H={};for(let G of B)G.id&&(H[G.id]=G);let j=g[_].map(G=>G.id&&H[G.id]?ty(t.generalRule,H[G.id],G):G);F[_]=[...j,...F[_]]}if(De.PROD==="0"&&De.DEV_RULES){let B=JSON.parse(De.DEV_RULES);F[_]=[...B,...F[_]]}}else g[_]!==void 0&&(F[_]=g[_])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function vr(){return(await Z.storage.sync.get("userConfig")||{}).userConfig||{}}async function Oi(e){await Z.storage.sync.set({userConfig:e})}async function bu(e,t){await Z.storage.local.set({[e]:t})}async function Fc(e){return(await Z.storage.local.get(e))[e]||""}var D7=async()=>{let e=["zh-CN"];try{e=await Z.i18n.getAcceptLanguages()}catch(r){R.warn("get browser language error:",r)}let n=e.map(r=>ve(r)).find(r=>nn[r]);return n||"en"},Hp=async()=>{let e={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};return{...e,targetLanguage:Br,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function A7(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function k7(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Br;let n=await qt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ii({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ii({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>o.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var L7=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Nn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function za(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=t;if(Nn(e,i))return!1;if(Nn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!Nn(e,o)),c;function g(){return n&&n.display?!!L7.includes(n.display):Nn(e,r)}}var ln=Nn;function zi(e){return!!e.shadowRoot}function Na(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function yu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Or(e,t=!1){let n=ou;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ni(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Or(n,t)}function Bo(e,t){return Ia(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Wp(e){let{rule:t}=e,n=_7(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _7(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function Tu(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),vt(r,Kb,t.toString());let a=Wp(e);return r.append(rt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Io(e,t){return e.querySelector(`[${vp}='${t}']`)}function iy(){document.querySelectorAll(`[${vp}]`).forEach(t=>{t.remove()})}function oy(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function sy(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{Oo(n)&&t.push(n)}),t}function Kp(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=e,l=i,c=1001;try{if(r&&r.length>0){let g={},f=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),m=new RegExp(a.replace("{word}",f.map(h=>h.k).join("|")),"g");l=l.replace(m,(h,y)=>{let T=c++;return t[`${T}`]=g[y]||y,o.length>2?h.replace(y,`<${o[2]}${T}>`):h.replace(y,`${o[0]}${T}${o[1]}`)})}s&&s.length>0&&s.forEach(g=>{let f=new RegExp(g,"gi");l=l.replace(f,(m,h)=>{let y=c++;return t[`${y}`]=M1(h),o.length>2?m.replace(h,`<${o[2]}${y}>`):m.replace(h,`${o[0]}${y}${o[1]}`)})})}catch(g){R.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function vu(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:i}=e,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||yy(s)||my(s)||by(s)||fy(s)||hy(s)||F7(s)||o.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ic(i,n,r)}function ga(e){return e.nodeType===Node.ELEMENT_NODE}function uy(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function ly(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),i=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${i}:${o}:${s}`}async function Gp(){return await qt("fakeUserId","")}async function M7(){return await qt("installedAt","")}async function cy(e){let n=Le().INSTALL_FROM,r=On(),a=await M7(),i=await Gp(),o=await bt(),s=!1,u=await it.get(ht,null),l=!1;return u&&Qt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function dy(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!e||!t||(async()=>{let a=await Vp(e,t);r(a)})()},[e,t,r]),n}async function Vp(e,t){if(!e||!t)return;let n=!1,r,a=!0;!Ge()&&pe()||st().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await qt("installedAt","");new Date(i).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var Rc=!1,B7=pe();function Ty(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let i of a)n.push(i)}return n}function I7(e,t){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&vy(i,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(Ua(i,pc)){if(a===!0)return!0;continue}if(Cu(i.nodeName,t.inlineTags))return!0;if(!$p(i,t))return!1}}return!0}function Yp(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(Cu(e.nodeName,n)||$p(e,t)){if(Ua(e,$b)||Cu(e.nodeName,["BR"]))return!1;if(Ua(e,pc))return!0;if($p(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return I7(e,t)}else return Ua(e,pc);return!1}function vy(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Ua(e,Vb,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Ua(e,zb))return!1;let{stayOriginalTags:r,excludeTags:a}=t,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||Cu(e.nodeName,i))}function Ic(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(o=>o.trim()!=="").length>=n||!Cy(r)&&r.length>=n}function Sy(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(Cy(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function Cy(e){for(let t=0;t127)return!1;return!0}function my(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function fy(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function hy(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function by(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function yy(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Ua(e,t,n=!1){return Qp(e,t,"1",n)}function Qp(e,t,n,r=!1){return Rc&&!r?e[In]?!!(e[In]&&e[In][t]===n):!1:e.dataset[t]===n}function zo(e){return(e.innerText||e.textContent||"").trim()}function Zp(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Oc(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function vt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Rc&&!r?(e[In]||(e[In]={}),e[In][t]||(e[In][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function zc(e,t,n=!1){if(Rc&&!n){if(!e[In]||!e[In][t])return;delete e[In][t]}else delete e.dataset[t]}function No(e,t,n=!1){return Rc&&!n?!e[In]||!e[In][t]?void 0:e[In][t]:e.dataset[t]}function $p(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!Cu(e.nodeName,n)}function _e(){if(!globalThis||!globalThis.location)return"https://example.com";if(!ot())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Kn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){R.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else R.warn("injectCSS failed, rootDocument does not have head node",e)}function Oo(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(B7){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function Cu(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function xy(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function Ey(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||vy(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return R.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function wy(e,t,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(e,t,n)}p();function Ui(e,t,n,r,a){let i=t,o=su[i]||[],s="";e&&o&&o.length>0&&o.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let f=n[g];if(["borderRadius"].includes(g)&&(f+="px"),s+=`--immersive-translate-theme-${i}-${g}: ${f}; +`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};p();p();function da(e){if(e.beta)return!1;if(Ge()&&e.spVersion)return hu(Ir(),e.spVersion);if(Y1()&&e.gspVersion){let t=Q1();if(t)return hu(t,e.gspVersion)}if(Up()&&e.ispVersion){let t=$1();if(t)return hu(t,e.ispVersion)}return!1}function hu(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function bu(e){e.message?.indexOf("token invalid")>=0&&ot.remove(bt)}p();function _c(e){return Array.isArray(e)?e:e?[e]:[]}function zn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Ht(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function Mc(e,t){let n={...e};return ny(n,t),E7(n,t),n}function ty(e,t,n){let r={...t};return Ii({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,i)=>r[a]=i}),Ii({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function E7(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;ny(e,a)}function Ii({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[i,o,s]=w7(a);if(!i||e[a]===void 0)return;let u=e[a];n(i)&&(u=_c(e[a]));let l=t(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!X1(s))return;c=qp(l,u)}else if(o=="remove_v"){if(!X1(s))return;c=ey(l,u)}else o==="add"?c=qp(l,u):o=="remove"&&(c=ey(l,u));if(c){r(i,c);return}Array.isArray(e[i])&&i.startsWith("additional")?c=qp(l,u):c=u,r(i,c)})}function ny(e,t){return Ii({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function qp(e,t){let n;if(Array.isArray(e)){let r=_c(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function w7(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function X1(e){let t=On();return e&&hu(t,e)}function ey(e,t){if(Array.isArray(e)){let n=_c(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function Ri(){if(De.PROD==="1")return{};let e={};if(De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:De.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:De.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:De.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:De.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:De.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:De.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:De.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(De.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=De.DEEPL_PROXY_ENDPOINT),De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=De.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:De.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}De.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=De.IMMERSIVE_TRANSLATE_SERVICE);let t={};return De.DEBUG==="1"&&(t.debug=!0,t.cache=!1),De.MOCK==="1"&&(t.translationService="mock"),t}async function Wt(){let e=await Z.storage.local.get(Ao);if(e[Ao]){let t=e[Ao],n=t.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...t,tempTranslationUrlMatches:[...n]};return a&&await Kt(i),i}else return{}}async function Kt(e){await Z.storage.local.set({[Ao]:e})}async function ry(e){await Z.storage.local.set({[ia]:e})}async function Ra(){await Z.storage.local.set({[ia]:{}})}async function Oa(){await Z.storage.local.set({[Ao]:{}})}async function ay(){let e=await Z.storage.local.get(ia),n={...await jp(),...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let r=e[ia];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function yt(){let e=await Z.storage.local.get(ia),t={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};if(e[ia]){let k=e[ia];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),B=new Date(t.buildinConfigUpdatedAt);_>B&&(t=k)}}let n=await k7(t);t.targetLanguage=n;let r=await ot.get(bt,null),a={};if(!pe()&&Z.commands&&Z.commands.getAll){let k=await Z.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let i=await jp(),o=Ri(),s=await vr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Wt(),c=new Date,g=Object.assign({},u,o,s);if(!g.interfaceLanguage){let k=await D7();g.interfaceLanguage=k}let f=g.interfaceLanguage==="en",m=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!f&&!m&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let T=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(T=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let w=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,w=!0);let L=(g?.translationLanguagePattern?.matches?.length||0)>0,M=await qt("installedAt",""),C=Number(await la("translage_page_daily",0)),v=Number(await qt(yr,0)),A;v>0&&(Date.now()-v0&&(Date.now()-C0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],B=Array.isArray(_)?_:[_],H=Array.from(new Set(B.concat(k.map(j=>j.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:H}}}let F=Object.assign(i,t);Ii({rule:t,valueIsArray:k=>Array.isArray(i[k]),getMergedValue:k=>i[k],onMergedResult:(k,_)=>{k!="generalRule"&&(F[k]=_)}});let P=Qt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let z={};g.translationServices&&g.translationServices.openai&&(z=g.translationServices.openai),!P&&O.authKey&&!O.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):O&&O.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!P&&z.APIKEY&&!z.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):z&&z.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),I=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of q){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(F[_]=Mc(i[_],g[_]));else if(_==="translationServices")P7(g,F);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&I.includes(_))g[_]&&(F[_]=Object.assign(F[_],g[_])),_==="shortcuts"&&(pe()||Ge()?F[_]={...F[_],...a}:F[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let B=F.rules||[],H={};for(let G of B)G.id&&(H[G.id]=G);let j=g[_].map(G=>G.id&&H[G.id]?ty(t.generalRule,H[G.id],G):G);F[_]=[...j,...F[_]]}if(De.PROD==="0"&&De.DEV_RULES){let B=JSON.parse(De.DEV_RULES);F[_]=[...B,...F[_]]}}else g[_]!==void 0&&(F[_]=g[_])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function vr(){return(await Z.storage.sync.get("userConfig")||{}).userConfig||{}}async function Oi(e){await Z.storage.sync.set({userConfig:e})}async function yu(e,t){await Z.storage.local.set({[e]:t})}async function Fc(e){return(await Z.storage.local.get(e))[e]||""}var D7=async()=>{let e=["zh-CN"];try{e=await Z.i18n.getAcceptLanguages()}catch(r){R.warn("get browser language error:",r)}let n=e.map(r=>ye(r)).find(r=>rn[r]);return n||"en"},jp=async()=>{let e={...Fo,buildinConfigUpdatedAt:De.BUILD_TIME};return{...e,targetLanguage:Br,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function A7(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function k7(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Br;let n=await qt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ii({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ii({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>o.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var L7=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function Nn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function za(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=t;if(Nn(e,i))return!1;if(Nn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!Nn(e,o)),c;function g(){return n&&n.display?!!L7.includes(n.display):Nn(e,r)}}var cn=Nn;function zi(e){return!!e.shadowRoot}function Na(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function Tu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Or(e,t=!1){let n=su;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ni(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Or(n,t)}function Bo(e,t){return Ia(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Hp(e){let{rule:t}=e,n=_7(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _7(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function vu(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),vt(r,Kb,t.toString());let a=Hp(e);return r.append(at.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Io(e,t){return e.querySelector(`[${Tp}='${t}']`)}function iy(){document.querySelectorAll(`[${Tp}]`).forEach(t=>{t.remove()})}function oy(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function sy(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{Oo(n)&&t.push(n)}),t}function Wp(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=e,l=i,c=1001;try{if(r&&r.length>0){let g={},f=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),m=new RegExp(a.replace("{word}",f.map(h=>h.k).join("|")),"g");l=l.replace(m,(h,y)=>{let T=c++;return t[`${T}`]=g[y]||y,o.length>2?h.replace(y,`<${o[2]}${T}>`):h.replace(y,`${o[0]}${T}${o[1]}`)})}s&&s.length>0&&s.forEach(g=>{let f=new RegExp(g,"gi");l=l.replace(f,(m,h)=>{let y=c++;return t[`${y}`]=M1(h),o.length>2?m.replace(h,`<${o[2]}${y}>`):m.replace(h,`${o[0]}${y}${o[1]}`)})})}catch(g){R.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function Su(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:i}=e,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||yy(s)||my(s)||by(s)||fy(s)||hy(s)||F7(s)||o.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ic(i,n,r)}function ga(e){return e.nodeType===Node.ELEMENT_NODE}function uy(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function ly(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),i=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${i}:${o}:${s}`}async function Kp(){return await qt("fakeUserId","")}async function M7(){return await qt("installedAt","")}async function cy(e){let n=Le().INSTALL_FROM,r=On(),a=await M7(),i=await Kp(),o=await yt(),s=!1,u=await ot.get(bt,null),l=!1;return u&&Qt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function dy(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!e||!t||(async()=>{let a=await Gp(e,t);r(a)})()},[e,t,r]),n}async function Gp(e,t){if(!e||!t)return;let n=!1,r,a=!0;!Ge()&&pe()||ut().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await qt("installedAt","");new Date(i).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var Rc=!1,B7=pe();function Ty(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let i of a)n.push(i)}return n}function I7(e,t){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&vy(i,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(Ua(i,pc)){if(a===!0)return!0;continue}if(xu(i.nodeName,t.inlineTags))return!0;if(!Vp(i,t))return!1}}return!0}function $p(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(xu(e.nodeName,n)||Vp(e,t)){if(Ua(e,$b)||xu(e.nodeName,["BR"]))return!1;if(Ua(e,pc))return!0;if(Vp(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return I7(e,t)}else return Ua(e,pc);return!1}function vy(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Ua(e,Vb,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Ua(e,zb))return!1;let{stayOriginalTags:r,excludeTags:a}=t,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||xu(e.nodeName,i))}function Ic(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(o=>o.trim()!=="").length>=n||!Cy(r)&&r.length>=n}function Sy(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(Cy(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function Cy(e){for(let t=0;t127)return!1;return!0}function my(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function fy(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function hy(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function by(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function yy(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Ua(e,t,n=!1){return Yp(e,t,"1",n)}function Yp(e,t,n,r=!1){return Rc&&!r?e[In]?!!(e[In]&&e[In][t]===n):!1:e.dataset[t]===n}function zo(e){return(e.innerText||e.textContent||"").trim()}function Qp(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Oc(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function vt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Rc&&!r?(e[In]||(e[In]={}),e[In][t]||(e[In][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function zc(e,t,n=!1){if(Rc&&!n){if(!e[In]||!e[In][t])return;delete e[In][t]}else delete e.dataset[t]}function No(e,t,n=!1){return Rc&&!n?!e[In]||!e[In][t]?void 0:e[In][t]:e.dataset[t]}function Vp(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!xu(e.nodeName,n)}function _e(){if(!globalThis||!globalThis.location)return"https://example.com";if(!st())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Kn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){R.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else R.warn("injectCSS failed, rootDocument does not have head node",e)}function Oo(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(B7){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function xu(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function xy(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function Ey(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||vy(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return R.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function wy(e,t,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(e,t,n)}p();function Ui(e,t,n,r,a){let i=t,o=uu[i]||[],s="";e&&o&&o.length>0&&o.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let f=n[g];if(["borderRadius"].includes(g)&&(f+="px"),s+=`--immersive-translate-theme-${i}-${g}: ${f}; `,t==="marker"&&g==="backgroundColor"&&typeof f=="string"){let{r:m,g:h,b:y}=xy(f);s+=`--immersive-translate-theme-${i}-${g}-rgb: ${m}, ${h}, ${y}; `}}}),r||(r="inherit"),e&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5352,53 +5352,53 @@ ${s}} `):t.rule.injectedCss&&(s+=t.rule.injectedCss),t.rule.additionalInjectedCss&&Array.isArray(t.rule.additionalInjectedCss)&&t.rule.additionalInjectedCss.length>0?s+=` `+t.rule.additionalInjectedCss.join(` `):t.rule.additionalInjectedCss&&(s+=` -`+t.rule.additionalInjectedCss)),s&&Kn(e,s,"immersive-translate-dynamic-injected-css")}p();p();p();var R7=0;function d(e,t,n,r,a){var i,o,s={};for(o in t)o=="ref"?i=t[o]:s[o]=t[o];var u={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R7,__source:a,__self:r};if(typeof e=="function"&&(i=e.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Oe.vnode&&Oe.vnode(u),u}function Jp({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}p();function Xp(){let[e,t]=K(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}p();p();p();var Dy={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},Ay={...nn,"zh-CN":{...Dy["zh-CN"],...nn["zh-CN"]},"zh-TW":{...Dy["zh-TW"],...nn["zh-TW"]}},Uo=Ay;function ja(e,t,n){return Rr(Ay,e,t,Br,n)}var Nc=()=>Rn.filter(e=>e!=="auto"),Zt=(e,t,n,r)=>{let a=Xb[e]||e,i=e1[e],o=t1[e],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};p();p();p();p();p();p();p();p();p();p();var zr=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(i=>{throw i});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return R.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=uc){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return R.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw R.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function ky(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${sc}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function Py(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function em(e,t,n,r,a,i,o){if(R.debug(`autoSyncStrategy accessToken: ${e}`),t===null){R.debug("autoSyncStrategy settings is null");return}let s=new zr(e);try{let u=(await s.findByName(uc)).files;R.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:f}=c,m=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(R.debug("remoteUpdatedAt",m,"localUpdatedAt",h),m>h)R.debug("remote is newer, update local config",g),n(g),i&&i(!0);else if(m.getTime()===h.getTime())R.debug("remote and local are the same, do nothing"),i&&i(!1);else if(m(await e.removeAuthInfo(),eu()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Z.storage.local.get(_a);if(t[_a])return t[_a]}static async removeAuthInfo(){return await Z.storage.local.remove(_a)}static setAuthInfo(t){return Z.storage.local.set({[_a]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(R.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await Ly(n.access_token).then(i=>!0).catch(i=>!1))return Promise.resolve(n);let r=ky(this._state,this._redirectUrl);return R.debug(this.CLASSNAME,"auth url: "+r),eu()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Z.storage.local.set({[tu]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,i)=>{let o=()=>{Z.tabs.onUpdated.removeListener(s),Z.tabs.onRemoved.removeListener(u)},s=(f,m,h)=>{if(R.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===f){let y=new URL(h.url||""),T=Py(h.url);y.pathname.startsWith("/auth-done")&&T?.access_token&&(R.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:T.access_token}),r=!0,Z.tabs.remove(f),o())}},u=(f,m)=>{R.debug(this.CLASSNAME,"create tab onRemoved: "+f),(f===n||!r)&&(o(),i(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Z.windows===void 0?g=Z.tabs.create({url:t}).then(f=>{n=f.id}):g=Z.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(f=>{n=f.tabs[0].id}),g.then(()=>{Z.tabs.onUpdated.addListener(s),Z.tabs.onRemoved.addListener(u)}).catch(f=>{R.debug(this.CLASSNAME,"create tab failed: "+f),i(f)})})}};var z7="https://www.googleapis.com/oauth2/v3/tokeninfo",N7=sc,U7=Le().REDIRECT_URL;function Ly(e){if(!e)throw"Authorization failure";let t=`${z7}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((i,o)=>{a.status!=200&&o("Token validation error"),a.json().then(s=>{s.aud&&s.aud===N7?i(e):o("Token validation error")})})}return fetch(n).then(r)}function _y(e,t=!1){let n=U7;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,i=window.location.port;n=`${window.location.protocol}//${a}${i?`:${i}`:""}/auth-done/`}return new Ha(e,n).auth(t)}function tm(e,t=!1){return _y(e,t).then(n=>n.access_token||null)}p();p();p();function Wa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function q7(e,t){return e<>>32-t}function qc(e,t,n,r,a,i){return Wa(q7(Wa(Wa(t,e),Wa(r,i)),a),n)}function mn(e,t,n,r,a,i,o){return qc(t&n|~t&r,e,t,a,i,o)}function fn(e,t,n,r,a,i,o){return qc(t&r|n&~r,e,t,a,i,o)}function hn(e,t,n,r,a,i,o){return qc(t^n^r,e,t,a,i,o)}function bn(e,t,n,r,a,i,o){return qc(n^(t|~r),e,t,a,i,o)}function Uc(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function nm(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=Uc(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Uc(a.concat(nm(t)),512+t.length*8),My(Uc(i.concat(o),512+128))}function Fy(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function rm(e){return unescape(encodeURIComponent(e))}function By(e){return j7(rm(e))}function W7(e){return Fy(By(e))}function Iy(e,t){return H7(rm(e),rm(t))}function K7(e,t){return Fy(Iy(e,t))}function Gn(e,t,n){return t?n?Iy(t,e):K7(t,e):n?By(e):W7(e)}var qo=[];async function xu(e,t){return await new Promise((n,r)=>{let a=e,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function am(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await V7(t,e)}async function im(e){let t=Gn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await G7(n,t)}async function G7(e,t){let n=await xu(e);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function V7(e,t){let n=await xu(e);return(await om()).includes(e)||await $7(e),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function $7(e){let t="cache_list",n=await xu(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=i=>{n.close(),qo.push(e)},a.onerror=i=>{n.close()}}async function om(){if(qo&&qo.length>0)return qo;let e=await xu(ee+"-cacheList","cache_list");return qo=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{e.close(),t(a.result)},a.onerror=i=>{e.close(),t([])}}),qo}async function sm(){try{let e=[];(await om()).forEach(r=>{e.push(Y7(r))});let n=await Promise.all(e);return cu(n.reduce((r,a)=>r+a,0))}catch{return cu(0)}}async function Y7(e){let t=await xu(e),r=[...t.objectStoreNames].reduce((o,s)=>{let u=Q7(t,s);return o.push(u),o},[]),a=await Promise.all(r);return t.close(),a.reduce((o,s)=>o+s,0)}async function Q7(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,i=e.transaction([t]).objectStore(t).openCursor();i.onsuccess=o=>{let s=i.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},i.onerror=o=>r("error in "+t+": "+o)})}async function Ry(){try{let t=(await om()).map(r=>Z7(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function Z7(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}p();function J7(e,t){return Math.floor(Math.random()*(t-e+1))+e}var X7=30,um="RATE_LIMITER_TICKS",qi=class e{static strictTicks={};static clearStrictTicks(){bu(um,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Fc(um);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){R.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await bu(um,JSON.stringify(this.strictTicks))}catch(a){R.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=J7(4,X7);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var Eu=Pp()?["action"]:["browser_action","page_action"],tD=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...Eu]},{id:ru,contexts:Eu},{id:au,contexts:Eu},{id:iu,contexts:Eu},{id:Nb,contexts:Eu}];async function jc(e){e=e||await bt(),R.debug("update ContextMenu",e);for(let t of tD){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=ja(`browser.${t.id}`,e.interfaceLanguage);Z.contextMenus.update(t.id,{title:r,visible:n})}}p();function Oy(e,t){let n=t;n||(n=Le().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,i=new RegExp(a),o=n.match(i);return o?o[1]:""}p();function jo(e,t,n=[],r){let a=["notranslate"];return r&&a.push(Jb),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${Cp}-theme-${e}`):a.push(`${Sp}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Cp):a.push(Sp),a}function Ho(e){let t=["notranslate",fc];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function zy(e,t,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=e;o=o||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ni(n,!0),f="afterend",m=g[0],h=g[1],y=`${m}(\\d+)${h}`,T=new RegExp(y,"g"),b=rt.sanitize(u);o.length>0&&(b=b.replace(T,M=>{let C=b.indexOf(M),v=b[C-1]===" ",A=b[C+M.length]===" ",S=M.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),N=Number(S);if(isNaN(N))return M;let F=o[N];if(F&&F.type==="element"){let P=F.value.outerHTML;return v||(P=" "+P),A||(P=P+" "),P}else R.error("variable type not supported",F,M);return M}));let x=jo(i,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(Zb);let w=Ho(i),L="";return r.translationBlockStyle&&(L=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${L} class="${x.join(" ")}" ${Fr}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${Fr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${Fr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:f}}p();function ut(e){fp({type:"success",text:e})}function an(e){fp({type:"error",text:e})}p();p();p();p();var lm={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Z.storage[n].get(r)},set:(e,t,n)=>Z.storage[n].set({[e]:t})};function Hc(e,t,n){let[r]=K(()=>typeof t=="function"?t():t),[a]=K(n),[i,o]=K(r),[s,u]=K(!1),[l,c]=K("");le(()=>{lm.get(e,r,a).then(f=>{f[e]&&o(f[e]),u(!0),c("")}).catch(f=>{u(!1),c(f)})},[e,r,a]);let g=qe(f=>{let m=typeof f=="function"?f(i):f;R.debug("new settings",m),lm.set(e,m,a).then(()=>{o(m),u(!0),c("")}).catch(h=>{o(m),u(!1),c(h)})},[a,e,i]);return[i,g,s,l]}p();function Wc(e,t,n){let r=[];return function(){let[i,o,s,u]=Hc(e,t,n),l=qe(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Ny(e,t){return Wc(e,t,"local")}function Uy(e,t){return Wc(e,t,"sync")}var nD="userConfig",rD=null,aD=Uy(nD,rD);function $e(e){let[t,n,r,a]=aD(),i=qe(o=>{let s=typeof o=="function"?o(t):o;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,i,r,a,n]}p();p();p();p();function Kc(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=t,s=[],u={};for(let l=0;l2&&(b=`<${i[2]}${T}>`),u[T]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";f&&(y=Na(cm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&ln(c,a)){let T=Object.keys(u).length,b=`${i[0]}${T}${i[1]}`;i.length>2&&(b=`<${i[2]}${T}>`),u[T]=c;let x=dm(s).endsWith(" ")?" ":"",w=Na(c.innerText||c.textContent),L=Na(c.nextSibling).startsWith(" ")?" ":"",M=yu(x+w+L),C=M[0]+b+M[1];if(x===" ")C=C.trimStart();else if(!C.startsWith(" ")){let v=yu(c.previousSibling)[1];v===""&&(v=" "),C=v+C}s.push({text:C,type:"variable"})}else{let y=dm(s).endsWith(" ")?" ":"",T=Na(c.innerText||c.textContent);f&&(T=Na(cm(c)));let b=Na(c.nextSibling).startsWith(" ")?" ":"",x=yu(y+T+b),w=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")w=w.trimStart();else{let L=yu(c.previousSibling)[1];L===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(L=" "),w=L+w}s.push({text:w,type:"text"})}else{let y=dm(s).endsWith(" ")?" ":"",T="";c.textContent&&(T=Na(cm(c))),y===" "&&(T=T.trimStart()),s.push({text:T,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(f=s[c-1].text),c/g,">"))}e.targetText=rt.sanitize(e.targetText);let a=!1,i=e.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ni(t);if(l.length>2){let c=l[2];return iD({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=zy(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function cm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function iD(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;o=o||[];let g=e.targetText;g=rt.sanitize(g);let f=g,m=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);o.length>0&&(f=f.replace(m,x=>{let w=f.indexOf(x),L=f[w-1]===" ",M=f[w+x.length]===" ",C=x.match(h);if(!C)return x;let v=C[1],A=Number(v);if(isNaN(A))return x;let D=o[Number(A)];if(D&&D.type==="element"){let S=D.value.outerHTML;return L||(S=" "+S),M||(S=S+" "),S}else if(D&&D.type==="text"){let S=D.value;return L||(S=" "+S),M||(S=S+" "),S}else R.error("variable type not supported",D,x);return x}));let y=jo(l,n,r||[],s),T=Ho(l),b="";return c&&(b=`style="${c}"`),f=`<${a} ${b} class="${y.join(" ")}" ${Fr}="1"><${a} class="${T.join(" ")}" ${Fr}="1">${f}`,n||(i==="smart"?f=`
${f}`:f=`${i}${f}`),n&&(i!=="smart"?f=`${i}${f}`:f=`<${a} class="notranslate" ${Fr}="1"> ${f}`),u==="smart"?f=`${f}`:f=`${f}${u}`,{html:f,position:"afterend"}}function dm(e){let t=e[e.length-1];return t?t.text:""}function gm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let g=c.match(s);if(!g)return c;let f=g[1],m=Number(f);if(isNaN(m))return c;let h=r[f];return h||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}p();p();p();p();p();p();var H$=Hy(2),jy=Hy(3);function Hy(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-e+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+e);return r}}p();var oD=/\s+/g,sD=/[\t\n\v\f\r ]+/g;function Wy(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?uD:lD;return String(e).replace(t.style==="html"?sD:oD,t.trim?cD(n):n)}function uD(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function lD(){return" "}function cD(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var Ky={}.hasOwnProperty;function dD(e){return e==null?"":Wy(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function gD(e){return jy(" "+dD(e)+" ")}function pD(e){let t=gD(e),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function vD(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function SD(e,t,n,r){t=xD(t,n,r);let a=[],i;if(t)for(i in t)Gc.call(t,i)&&a.push([i,CD(e,t[i])]);return a.length===0?mm():a.sort(ED)}function CD(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharacterso+s.length,0));let i=e.length-r;for(let o of BD){let s=o[1],u=o[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/i>.5?t==="zh-CN"?Xy(e)?"zh-TW":"zh-CN":t:"auto"}var tT=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],fm=new Map(tT),ID=new Map(tT.map(([e,t])=>[t,e]));function nT(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>ID.get(s));!t&&t!==0&&(t=25);let a=$c(e);if(a!=="auto")return a;let i={minLength:t,whitelist:[...fm.keys()]},o=$y(e,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(g=="eng"&&f<.95)break;return fm.get(g)}}let[s,u]=o[0],l=fm.get(s);if(l&&u>.9)return l}}catch(r){R.error(r)}return"auto"}p();p();var hm="Original";function et(){return hm}function An(e){hm=e,rT(hm)}p();var iT="auto",Yc="auto",aT="auto";function oT(e){iT=e}function ar(e){Yc=e}function Mt(){return Yc!=="auto"?Yc:aT!=="auto"?aT:iT}function Qc(){return Yc}p();function ji(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ga(e){try{if(!e||!ji(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";t=o.getAttribute(i)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var tt={},Va=async function(e,t){let{method:n,data:r}=e,a=await tt.updateGlobalContext(),i=Date.now();if(R.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await tt.translateTheWholePage(r),at(yr,i);else if(n==="translateTheMainPage")await tt.translateTheMainPage(r),at(yr,i);else if(n==="translateToThePageEndImmediately")await tt.translateToThePageEndImmediately(r),at(yr,i);else if(n==="toggleTranslatePage")await tt.toggleTranslatePage(r),at(yr,i);else if(n==="toggleTranslateTheWholePage")await tt.toggleTranslateTheWholePage(r),at(yr,i);else if(n==="toggleTranslateTheMainPage")await tt.toggleTranslateTheMainPage(r),at(yr,i);else if(n==="toggleOnlyTransation")await tt.ensureSwitchTranslationMode(r),at(yr,i);else if(n==="translatePage")await tt.translatePage(a,r),at(yr,i);else if(n==="toggleTranslationMask")await tt.toggleTranslationMask(r);else if(n==="restorePage")tt.restorePage();else if(n==="retryFailedParagraphs")tt.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await tt.switchTranslationMode(r.mode),await tt.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")tt.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(cc,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await tt.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(nu,{detail:r}));else if(n==="translateWithOpenAI")await tt.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await tt.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await tt.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await tt.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await tt.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await tt.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await tt.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")ot()||await tt.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!ot())return JSON.stringify(a)}};function sT(e){Object.assign(tt,e)}function uT(e){Object.assign(tt,e)}function lT(e){Object.assign(tt,e)}var RD=function(e,t){let{method:n,data:r}=e;if(R.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return et();if(n==="getCurrentPageLanguage"){let a=Mt();return tt.detectCurrentPageLanguage().catch(i=>{R.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return ar(r),Mt();if(n==="getContextString"){let a=tt.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=tt.getPureGlobalContext();return Ga(a?.rule)}}},Zc,Jc;function cT(){let e=Xc();ot()||OD(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Xc(){return Zc||(Zc=new ca("content_script",!1).getConnection("main",Va),Zc)}function OD(){return Jc||(Jc=new ca("content_script",!1).getConnection("main_sync",RD,{sync:!0}),Jc)}p();var bm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],e0="https://transmart.qq.com/api/imt",pa=class e{static langMapReverse=new Map(bm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:e0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=e.langMapReverse.get(a);return i||a}};async function Ft(e){return await Xc().sendMessage("background:main",e)}function de(e){return oc()?kc({method:"request",data:e}):pe()||ic()?(e.fetchPolyfill=globalThis.GM_fetch,Tr(e)):Ft({method:"fetch",data:e})}function ir(){return pe()?bt():Ft({method:"getConfig"})}function kn(e){return pe()?Oi(e):Ft({method:"setUserConfig",data:e})}function Pn(){return pe()?vr():Ft({method:"getUserConfig"})}function Du(){return pe()?Wt():Ft({method:"getLocalConfig"})}function t0(e){return pe()?Kt(e):Ft({method:"setLocalConfig",data:e})}function dT(e){return pe()?ry(e):Ft({method:"setBuildinConfig",data:e})}async function Ue(e){if(e.text){let n=$c(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(pe()||Ge()){if(e.translateService&&!yc.includes(e.translateService))return Promise.resolve("auto");let r=nT(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Ft({method:"detectLanguage",data:e});return Promise.resolve(t)}function gT(){return Ft({method:"detectTabLanguage"})}async function n0(e){let t=await Ue({text:e,pageLangs:["en"]});try{if(pe()||Ge()){let n=e.substring(0,200);t=await pa.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function rT(e){let t=new CustomEvent(ki,{detail:e});if(document.dispatchEvent(t),pe())return;Xc().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function pT(e){return pe()?im(e):Ft({method:"queryParagraphCache",data:e})}async function mT(e){if(pe()){await am(e);return}return Ft({method:"setParagraphCache",data:e})}async function fT(){if(pe())return Promise.resolve();await Ft({method:"mockRequest"})}function Wo(e=!1,t=""){return pe()?(Z.runtime.openOptionsPage(e,t),Promise.resolve()):Ft({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function r0(e=""){return pe()||Ge()?Le().OPTIONS_URL:Z.runtime.getURL("options.html")}function hT(e=""){return Z&&Z.runtime&&Z.runtime.getURL?Z.runtime.getURL("options.html"):""}function a0(e=!1){return pe()?(Z.extra.openAboutPage(e),Promise.resolve()):Ft({method:"openAboutPage"})}function Ko(e){return pe()?(Z.extra.openInTab(e),Promise.resolve()):Ft({method:"openInTab",data:e})}function bT(e=!1){return pe()?(Z.extra.openEbookViewerPage(e),Promise.resolve()):Ft({method:"openEbookViewerPage"})}function yT(e=!1){return pe()?(Z.extra.openEbookBuilderPage(e),Promise.resolve()):Ft({method:"openEbookBuilderPage"})}function TT(e){Ge()}function Go(e=!1,t){return pe()?(Z.extra.openPdfViewerPage(e),Promise.resolve()):Ft({method:"openPdfViewerPage",data:{url:t}})}function vT(e=!1){return pe()?(Z.extra.openSubtitleBuilderPage(e),Promise.resolve()):Ft({method:"openSubtitleBuilderPage"})}function Vo(e){return pe()?Promise.resolve():Ft({method:"setBadge",data:{text:e}})}function ST(){return pe()?(R.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Ft({method:"autoSyncLatestConfig"})}function i0(e,t=!1){return pe()?Z.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function CT(e,t){return pe()?qi.getDelay(e,t):Ft({method:"getDelay",data:{key:e,options:t}})}var Pe=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,i=!1,o=!1,s=[],u=null,l=new Set;for(let T of a)T.from&&T.from!=="auto"&&l.add(T.from),T.refresh&&(i=!0),T.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=I1(a,c,g)}catch(T){if(r)for(let b=0;bT));let f=[],m=[],h=(T,b,x)=>{let w="";if(b.translatedTexts&&b.translatedTexts[0]&&(w=b.translatedTexts[0]),m[T]||(m[T]=b,m[T].translatedTexts=Array(b.sentenceTotalParts).fill(null)),m[T].hasError)return;if(x){let C=x instanceof Q?new Q(x.name,x.message).initNetWork(x.status).initData(x.data):x;m[T].hasError=!0,b.callback&&b.callback(C,null,b.sentence);return}m[T].translatedTexts[b.partIndex]=w;let L=m[T],M=0;for(let C=0;C{let M=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(M=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:M,to:b.to,url:x,options:n,refresh:i,debug:o}),sourceTempSentences:b.tempSentences};{let C=Qb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(C=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let A=[],D=Or(this.serviceConfig);if(b.tempSentences.forEach((q,I)=>{let k=Kp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});q.force!==!0&&(k&&k.text&&k.text.trim().lengthI.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:q,from:M,to:b.to})}let S="";v&&v.length>=2?S=A.map((q,I)=>{let{item:k}=q;return I===A.length-1?k.text:k.text+v[0]+(I+1)+v[1]}).join(""):S=A.map(({item:q})=>q.text).join(C);let N=await this.translate({text:S,from:M,to:b.to,url:x,options:{...n,rawTextArrayLength:A.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=N,P=[];if(v&&v.length>=2){let q=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(q=v[2]);let I=new RegExp(q,"g");P=F.split(I)}else P=F.split(C);let O=[];if(P.length>A.length){for(let q=0;qq.text);return D=Or(this.serviceConfig,!0),O.forEach((q,I)=>{let k=A[I],_=k.index,B=k.variables||{};Object.keys(B).length>0&&(q=gm({text:q,delimiters:D,variables:B})),z[_]=q}),{sourceTempSentences:b.tempSentences,text:z,from:N.from,to:N.to}}};f.push(L().then(M=>{let{text:C,sourceTempSentences:v}=M;for(let A=0;A{if(M instanceof Q&&M.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let C=0;C{let b=T.sentence.text;return T.translatedTexts&&T.translatedTexts.length>0&&(b=T.translatedTexts.join("")),{...T.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],i=Or(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,f)=>{let m=Kp({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[f]!==!0&&(m&&m.text&&m.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){R.debug("formatAndTranslateList error",t,l)}let o=await this.translateList(n),{text:s}=o,u=t.text.map(l=>l);return i=Or(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let f=g.index,m=g.variables,h=Object.keys(m);u[f]=l,h.length>0&&(u[f]=gm({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(t){return Ue({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};p();p();var $o="input is invalid type",ym=typeof window=="object",$a=ym?window:{};$a.JS_SHA256_NO_WINDOW&&(ym=!1);var zD=!ym&&typeof self=="object",ND=!$a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;ND?$a=global:zD&&($a=self);var pQ=!$a.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,mQ=typeof define=="function"&&define.amd,Au=!$a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Te="0123456789abcdef".split(""),UD=[-2147483648,8388608,32768,128],Sr=[24,16,8,0],o0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s0=["hex","array","digest","arrayBuffer"],on=[];($a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});Au&&($a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var xT=function(e,t){return function(n){return new sn(t,!0).update(n)[e]()}},wT=function(e){var t=xT("hex",e);t.create=function(){return new sn(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};sn.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=UD[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};sn.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,g,f,m,h,y,T,b,x,w;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],g=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(T=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(T=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),T=e&t,f=T^e&n^w,y=a&i^~a&o,m=s+g+y+o0[l]+u[l],h=c+f,s=r+m<<0,r=m+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,f=b^r&t^T,y=s&a^~s&i,m=o+g+y+o0[l+1]+u[l+1],h=c+f,o=n+m<<0,n=m+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),x=n&r,f=x^n&e^b,y=o&s^~o&a,m=i+g+y+o0[l+2]+u[l+2],h=c+f,i=t+m<<0,t=m+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),w=t&n,f=w^t&r^x,y=i&o^~i&s,m=a+g+y+o0[l+3]+u[l+3],h=c+f,a=e+m<<0,e=m+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};sn.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=Te[e>>28&15]+Te[e>>24&15]+Te[e>>20&15]+Te[e>>16&15]+Te[e>>12&15]+Te[e>>8&15]+Te[e>>4&15]+Te[e&15]+Te[t>>28&15]+Te[t>>24&15]+Te[t>>20&15]+Te[t>>16&15]+Te[t>>12&15]+Te[t>>8&15]+Te[t>>4&15]+Te[t&15]+Te[n>>28&15]+Te[n>>24&15]+Te[n>>20&15]+Te[n>>16&15]+Te[n>>12&15]+Te[n>>8&15]+Te[n>>4&15]+Te[n&15]+Te[r>>28&15]+Te[r>>24&15]+Te[r>>20&15]+Te[r>>16&15]+Te[r>>12&15]+Te[r>>8&15]+Te[r>>4&15]+Te[r&15]+Te[a>>28&15]+Te[a>>24&15]+Te[a>>20&15]+Te[a>>16&15]+Te[a>>12&15]+Te[a>>8&15]+Te[a>>4&15]+Te[a&15]+Te[i>>28&15]+Te[i>>24&15]+Te[i>>20&15]+Te[i>>16&15]+Te[i>>12&15]+Te[i>>8&15]+Te[i>>4&15]+Te[i&15]+Te[o>>28&15]+Te[o>>24&15]+Te[o>>20&15]+Te[o>>16&15]+Te[o>>12&15]+Te[o>>8&15]+Te[o>>4&15]+Te[o&15];return this.is224||(u+=Te[s>>28&15]+Te[s>>24&15]+Te[s>>20&15]+Te[s>>16&15]+Te[s>>12&15]+Te[s>>8&15]+Te[s>>4&15]+Te[s&15]),u};sn.prototype.toString=sn.prototype.hex;sn.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};sn.prototype.array=sn.prototype.digest;sn.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function u0(e,t,n){var r,a=typeof e;if(a==="string"){var i=[],o=e.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);e=i}else if(a==="object"){if(e===null)throw new Error($o);if(Au&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!Au||!ArrayBuffer.isView(e)))throw new Error($o)}else throw new Error($o);e.length>64&&(e=new sn(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}sn.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}u0.prototype=new sn;u0.prototype.finalize=function(){if(sn.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();sn.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),sn.prototype.finalize.call(this)}};var Yo=wT();Yo.sha256=Yo;Yo.sha224=wT(!0);Yo.sha256.hmac=DT();Yo.sha224.hmac=DT(!0);var AT=Yo;var kT=AT.sha256;function Cr(e){return Promise.resolve(kT(e))}function l0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Ya(e,t){let n=kT.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function PT(e,t){let n=await Ya(e,t);return l0(n)}async function c0(e,t){let n=qD(t),r=await Ya(e,n);return l0(r)}function qD(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var LT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],ku=class e extends Pe{static langMap=new Map(LT);maxTextGroupLength=50;static langMapReverse=new Map(LT.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new Q("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Cr(a)].join(` +`+t.rule.additionalInjectedCss)),s&&Kn(e,s,"immersive-translate-dynamic-injected-css")}p();p();p();var R7=0;function d(e,t,n,r,a){var i,o,s={};for(o in t)o=="ref"?i=t[o]:s[o]=t[o];var u={type:e,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R7,__source:a,__self:r};if(typeof e=="function"&&(i=e.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Oe.vnode&&Oe.vnode(u),u}function Zp({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}p();function Jp(){let[e,t]=K(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}p();p();p();var Dy={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},Ay={...rn,"zh-CN":{...Dy["zh-CN"],...rn["zh-CN"]},"zh-TW":{...Dy["zh-TW"],...rn["zh-TW"]}},Uo=Ay;function ja(e,t,n){return Rr(Ay,e,t,Br,n)}var Nc=()=>Rn.filter(e=>e!=="auto"),Zt=(e,t,n,r)=>{let a=Xb[e]||e,i=e1[e],o=t1[e],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};p();p();p();p();p();p();p();p();p();p();var zr=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(i=>{throw i});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return R.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=uc){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return R.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw R.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function ky(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${sc}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function Py(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function Xp(e,t,n,r,a,i,o){if(R.debug(`autoSyncStrategy accessToken: ${e}`),t===null){R.debug("autoSyncStrategy settings is null");return}let s=new zr(e);try{let u=(await s.findByName(uc)).files;R.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:f}=c,m=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(R.debug("remoteUpdatedAt",m,"localUpdatedAt",h),m>h)R.debug("remote is newer, update local config",g),n(g),i&&i(!0);else if(m.getTime()===h.getTime())R.debug("remote and local are the same, do nothing"),i&&i(!1);else if(m(await e.removeAuthInfo(),tu()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Z.storage.local.get(_a);if(t[_a])return t[_a]}static async removeAuthInfo(){return await Z.storage.local.remove(_a)}static setAuthInfo(t){return Z.storage.local.set({[_a]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(R.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await Ly(n.access_token).then(i=>!0).catch(i=>!1))return Promise.resolve(n);let r=ky(this._state,this._redirectUrl);return R.debug(this.CLASSNAME,"auth url: "+r),tu()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Z.storage.local.set({[nu]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,i)=>{let o=()=>{Z.tabs.onUpdated.removeListener(s),Z.tabs.onRemoved.removeListener(u)},s=(f,m,h)=>{if(R.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===f){let y=new URL(h.url||""),T=Py(h.url);y.pathname.startsWith("/auth-done")&&T?.access_token&&(R.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:T.access_token}),r=!0,Z.tabs.remove(f),o())}},u=(f,m)=>{R.debug(this.CLASSNAME,"create tab onRemoved: "+f),(f===n||!r)&&(o(),i(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Z.windows===void 0?g=Z.tabs.create({url:t}).then(f=>{n=f.id}):g=Z.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(f=>{n=f.tabs[0].id}),g.then(()=>{Z.tabs.onUpdated.addListener(s),Z.tabs.onRemoved.addListener(u)}).catch(f=>{R.debug(this.CLASSNAME,"create tab failed: "+f),i(f)})})}};var z7="https://www.googleapis.com/oauth2/v3/tokeninfo",N7=sc,U7=Le().REDIRECT_URL;function Ly(e){if(!e)throw"Authorization failure";let t=`${z7}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((i,o)=>{a.status!=200&&o("Token validation error"),a.json().then(s=>{s.aud&&s.aud===N7?i(e):o("Token validation error")})})}return fetch(n).then(r)}function _y(e,t=!1){let n=U7;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,i=window.location.port;n=`${window.location.protocol}//${a}${i?`:${i}`:""}/auth-done/`}return new Ha(e,n).auth(t)}function em(e,t=!1){return _y(e,t).then(n=>n.access_token||null)}p();p();p();function Wa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function q7(e,t){return e<>>32-t}function qc(e,t,n,r,a,i){return Wa(q7(Wa(Wa(t,e),Wa(r,i)),a),n)}function mn(e,t,n,r,a,i,o){return qc(t&n|~t&r,e,t,a,i,o)}function fn(e,t,n,r,a,i,o){return qc(t&r|n&~r,e,t,a,i,o)}function hn(e,t,n,r,a,i,o){return qc(t^n^r,e,t,a,i,o)}function bn(e,t,n,r,a,i,o){return qc(n^(t|~r),e,t,a,i,o)}function Uc(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function tm(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=Uc(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Uc(a.concat(tm(t)),512+t.length*8),My(Uc(i.concat(o),512+128))}function Fy(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function nm(e){return unescape(encodeURIComponent(e))}function By(e){return j7(nm(e))}function W7(e){return Fy(By(e))}function Iy(e,t){return H7(nm(e),nm(t))}function K7(e,t){return Fy(Iy(e,t))}function Gn(e,t,n){return t?n?Iy(t,e):K7(t,e):n?By(e):W7(e)}var qo=[];async function Eu(e,t){return await new Promise((n,r)=>{let a=e,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function rm(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await V7(t,e)}async function am(e){let t=Gn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await G7(n,t)}async function G7(e,t){let n=await Eu(e);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function V7(e,t){let n=await Eu(e);return(await im()).includes(e)||await $7(e),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function $7(e){let t="cache_list",n=await Eu(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=i=>{n.close(),qo.push(e)},a.onerror=i=>{n.close()}}async function im(){if(qo&&qo.length>0)return qo;let e=await Eu(ee+"-cacheList","cache_list");return qo=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{e.close(),t(a.result)},a.onerror=i=>{e.close(),t([])}}),qo}async function om(){try{let e=[];(await im()).forEach(r=>{e.push(Y7(r))});let n=await Promise.all(e);return du(n.reduce((r,a)=>r+a,0))}catch{return du(0)}}async function Y7(e){let t=await Eu(e),r=[...t.objectStoreNames].reduce((o,s)=>{let u=Q7(t,s);return o.push(u),o},[]),a=await Promise.all(r);return t.close(),a.reduce((o,s)=>o+s,0)}async function Q7(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,i=e.transaction([t]).objectStore(t).openCursor();i.onsuccess=o=>{let s=i.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},i.onerror=o=>r("error in "+t+": "+o)})}async function Ry(){try{let t=(await im()).map(r=>Z7(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function Z7(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}p();function J7(e,t){return Math.floor(Math.random()*(t-e+1))+e}var X7=30,sm="RATE_LIMITER_TICKS",qi=class e{static strictTicks={};static clearStrictTicks(){yu(sm,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Fc(sm);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){R.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await yu(sm,JSON.stringify(this.strictTicks))}catch(a){R.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=J7(4,X7);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var wu=kp()?["action"]:["browser_action","page_action"],tD=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...wu]},{id:au,contexts:wu},{id:iu,contexts:wu},{id:ou,contexts:wu},{id:Nb,contexts:wu}];async function jc(e){e=e||await yt(),R.debug("update ContextMenu",e);for(let t of tD){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=ja(`browser.${t.id}`,e.interfaceLanguage);Z.contextMenus.update(t.id,{title:r,visible:n})}}p();function Oy(e,t){let n=t;n||(n=Le().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,i=new RegExp(a),o=n.match(i);return o?o[1]:""}p();function jo(e,t,n=[],r){let a=["notranslate"];return r&&a.push(Jb),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${Sp}-theme-${e}`):a.push(`${vp}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Sp):a.push(vp),a}function Ho(e){let t=["notranslate",fc];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function zy(e,t,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=e;o=o||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ni(n,!0),f="afterend",m=g[0],h=g[1],y=`${m}(\\d+)${h}`,T=new RegExp(y,"g"),b=at.sanitize(u);o.length>0&&(b=b.replace(T,M=>{let C=b.indexOf(M),v=b[C-1]===" ",A=b[C+M.length]===" ",S=M.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),N=Number(S);if(isNaN(N))return M;let F=o[N];if(F&&F.type==="element"){let P=F.value.outerHTML;return v||(P=" "+P),A||(P=P+" "),P}else R.error("variable type not supported",F,M);return M}));let x=jo(i,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(Zb);let w=Ho(i),L="";return r.translationBlockStyle&&(L=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${L} class="${x.join(" ")}" ${Fr}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${Fr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${Fr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:f}}p();function lt(e){mp({type:"success",text:e})}function on(e){mp({type:"error",text:e})}p();p();p();p();var um={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Z.storage[n].get(r)},set:(e,t,n)=>Z.storage[n].set({[e]:t})};function Hc(e,t,n){let[r]=K(()=>typeof t=="function"?t():t),[a]=K(n),[i,o]=K(r),[s,u]=K(!1),[l,c]=K("");le(()=>{um.get(e,r,a).then(f=>{f[e]&&o(f[e]),u(!0),c("")}).catch(f=>{u(!1),c(f)})},[e,r,a]);let g=qe(f=>{let m=typeof f=="function"?f(i):f;R.debug("new settings",m),um.set(e,m,a).then(()=>{o(m),u(!0),c("")}).catch(h=>{o(m),u(!1),c(h)})},[a,e,i]);return[i,g,s,l]}p();function Wc(e,t,n){let r=[];return function(){let[i,o,s,u]=Hc(e,t,n),l=qe(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function Ny(e,t){return Wc(e,t,"local")}function Uy(e,t){return Wc(e,t,"sync")}var nD="userConfig",rD=null,aD=Uy(nD,rD);function Ye(e){let[t,n,r,a]=aD(),i=qe(o=>{let s=typeof o=="function"?o(t):o;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,i,r,a,n]}p();p();p();p();function Kc(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=t,s=[],u={};for(let l=0;l2&&(b=`<${i[2]}${T}>`),u[T]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";f&&(y=Na(lm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&cn(c,a)){let T=Object.keys(u).length,b=`${i[0]}${T}${i[1]}`;i.length>2&&(b=`<${i[2]}${T}>`),u[T]=c;let x=cm(s).endsWith(" ")?" ":"",w=Na(c.innerText||c.textContent),L=Na(c.nextSibling).startsWith(" ")?" ":"",M=Tu(x+w+L),C=M[0]+b+M[1];if(x===" ")C=C.trimStart();else if(!C.startsWith(" ")){let v=Tu(c.previousSibling)[1];v===""&&(v=" "),C=v+C}s.push({text:C,type:"variable"})}else{let y=cm(s).endsWith(" ")?" ":"",T=Na(c.innerText||c.textContent);f&&(T=Na(lm(c)));let b=Na(c.nextSibling).startsWith(" ")?" ":"",x=Tu(y+T+b),w=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")w=w.trimStart();else{let L=Tu(c.previousSibling)[1];L===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(L=" "),w=L+w}s.push({text:w,type:"text"})}else{let y=cm(s).endsWith(" ")?" ":"",T="";c.textContent&&(T=Na(lm(c))),y===" "&&(T=T.trimStart()),s.push({text:T,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(f=s[c-1].text),c/g,">"))}e.targetText=at.sanitize(e.targetText);let a=!1,i=e.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ni(t);if(l.length>2){let c=l[2];return iD({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=zy(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function lm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function iD(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;o=o||[];let g=e.targetText;g=at.sanitize(g);let f=g,m=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);o.length>0&&(f=f.replace(m,x=>{let w=f.indexOf(x),L=f[w-1]===" ",M=f[w+x.length]===" ",C=x.match(h);if(!C)return x;let v=C[1],A=Number(v);if(isNaN(A))return x;let D=o[Number(A)];if(D&&D.type==="element"){let S=D.value.outerHTML;return L||(S=" "+S),M||(S=S+" "),S}else if(D&&D.type==="text"){let S=D.value;return L||(S=" "+S),M||(S=S+" "),S}else R.error("variable type not supported",D,x);return x}));let y=jo(l,n,r||[],s),T=Ho(l),b="";return c&&(b=`style="${c}"`),f=`<${a} ${b} class="${y.join(" ")}" ${Fr}="1"><${a} class="${T.join(" ")}" ${Fr}="1">${f}`,n||(i==="smart"?f=`
${f}`:f=`${i}${f}`),n&&(i!=="smart"?f=`${i}${f}`:f=`<${a} class="notranslate" ${Fr}="1"> ${f}`),u==="smart"?f=`${f}`:f=`${f}${u}`,{html:f,position:"afterend"}}function cm(e){let t=e[e.length-1];return t?t.text:""}function dm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let g=c.match(s);if(!g)return c;let f=g[1],m=Number(f);if(isNaN(m))return c;let h=r[f];return h||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}p();p();p();p();p();p();var H$=Hy(2),jy=Hy(3);function Hy(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-e+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+e);return r}}p();var oD=/\s+/g,sD=/[\t\n\v\f\r ]+/g;function Wy(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?uD:lD;return String(e).replace(t.style==="html"?sD:oD,t.trim?cD(n):n)}function uD(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function lD(){return" "}function cD(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var Ky={}.hasOwnProperty;function dD(e){return e==null?"":Wy(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function gD(e){return jy(" "+dD(e)+" ")}function pD(e){let t=gD(e),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function vD(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function SD(e,t,n,r){t=xD(t,n,r);let a=[],i;if(t)for(i in t)Gc.call(t,i)&&a.push([i,CD(e,t[i])]);return a.length===0?pm():a.sort(ED)}function CD(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharacterso+s.length,0));let i=e.length-r;for(let o of BD){let s=o[1],u=o[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/i>.5?t==="zh-CN"?Xy(e)?"zh-TW":"zh-CN":t:"auto"}var tT=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],mm=new Map(tT),ID=new Map(tT.map(([e,t])=>[t,e]));function nT(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>ID.get(s));!t&&t!==0&&(t=25);let a=$c(e);if(a!=="auto")return a;let i={minLength:t,whitelist:[...mm.keys()]},o=$y(e,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(g=="eng"&&f<.95)break;return mm.get(g)}}let[s,u]=o[0],l=mm.get(s);if(l&&u>.9)return l}}catch(r){R.error(r)}return"auto"}p();p();var fm="Original";function et(){return fm}function An(e){fm=e,rT(fm)}p();var iT="auto",Yc="auto",aT="auto";function oT(e){iT=e}function ar(e){Yc=e}function Mt(){return Yc!=="auto"?Yc:aT!=="auto"?aT:iT}function Qc(){return Yc}p();function ji(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ga(e){try{if(!e||!ji(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";t=o.getAttribute(i)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var tt={},Va=async function(e,t){let{method:n,data:r}=e,a=await tt.updateGlobalContext(),i=Date.now();if(R.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await tt.translateTheWholePage(r),it(yr,i);else if(n==="translateTheMainPage")await tt.translateTheMainPage(r),it(yr,i);else if(n==="translateToThePageEndImmediately")await tt.translateToThePageEndImmediately(r),it(yr,i);else if(n==="toggleTranslatePage")await tt.toggleTranslatePage(r),it(yr,i);else if(n==="toggleTranslateTheWholePage")await tt.toggleTranslateTheWholePage(r),it(yr,i);else if(n==="toggleTranslateTheMainPage")await tt.toggleTranslateTheMainPage(r),it(yr,i);else if(n==="toggleOnlyTransation")await tt.ensureSwitchTranslationMode(r),it(yr,i);else if(n==="translatePage")await tt.translatePage(a,r),it(yr,i);else if(n==="toggleTranslationMask")await tt.toggleTranslationMask(r);else if(n==="restorePage")tt.restorePage();else if(n==="retryFailedParagraphs")tt.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await tt.switchTranslationMode(r.mode),await tt.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")tt.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(cc,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await tt.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(ru,{detail:r}));else if(n==="translateWithOpenAI")await tt.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await tt.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await tt.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await tt.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await tt.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await tt.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await tt.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")st()||await tt.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!st())return JSON.stringify(a)}};function sT(e){Object.assign(tt,e)}function uT(e){Object.assign(tt,e)}function lT(e){Object.assign(tt,e)}var RD=function(e,t){let{method:n,data:r}=e;if(R.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return et();if(n==="getCurrentPageLanguage"){let a=Mt();return tt.detectCurrentPageLanguage().catch(i=>{R.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return ar(r),Mt();if(n==="getContextString"){let a=tt.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=tt.getPureGlobalContext();return Ga(a?.rule)}}},Zc,Jc;function cT(){let e=Xc();st()||OD(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Xc(){return Zc||(Zc=new ca("content_script",!1).getConnection("main",Va),Zc)}function OD(){return Jc||(Jc=new ca("content_script",!1).getConnection("main_sync",RD,{sync:!0}),Jc)}p();var hm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],e0="https://transmart.qq.com/api/imt",pa=class e{static langMapReverse=new Map(hm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:e0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=e.langMapReverse.get(a);return i||a}};async function Ft(e){return await Xc().sendMessage("background:main",e)}function de(e){return oc()?kc({method:"request",data:e}):pe()||ic()?(e.fetchPolyfill=globalThis.GM_fetch,Tr(e)):Ft({method:"fetch",data:e})}function ir(){return pe()?yt():Ft({method:"getConfig"})}function kn(e){return pe()?Oi(e):Ft({method:"setUserConfig",data:e})}function Pn(){return pe()?vr():Ft({method:"getUserConfig"})}function Au(){return pe()?Wt():Ft({method:"getLocalConfig"})}function t0(e){return pe()?Kt(e):Ft({method:"setLocalConfig",data:e})}function dT(e){return pe()?ry(e):Ft({method:"setBuildinConfig",data:e})}async function Ue(e){if(e.text){let n=$c(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(pe()||Ge()){if(e.translateService&&!yc.includes(e.translateService))return Promise.resolve("auto");let r=nT(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Ft({method:"detectLanguage",data:e});return Promise.resolve(t)}function gT(){return Ft({method:"detectTabLanguage"})}async function n0(e){let t=await Ue({text:e,pageLangs:["en"]});try{if(pe()||Ge()){let n=e.substring(0,200);t=await pa.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function rT(e){let t=new CustomEvent(ki,{detail:e});if(document.dispatchEvent(t),pe())return;Xc().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function pT(e){return pe()?am(e):Ft({method:"queryParagraphCache",data:e})}async function mT(e){if(pe()){await rm(e);return}return Ft({method:"setParagraphCache",data:e})}async function fT(){if(pe())return Promise.resolve();await Ft({method:"mockRequest"})}function Wo(e=!1,t=""){return pe()?(Z.runtime.openOptionsPage(e,t),Promise.resolve()):Ft({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function r0(e=""){return pe()||Ge()?Le().OPTIONS_URL:Z.runtime.getURL("options.html")}function hT(e=""){return Z&&Z.runtime&&Z.runtime.getURL?Z.runtime.getURL("options.html"):""}function a0(e=!1){return pe()?(Z.extra.openAboutPage(e),Promise.resolve()):Ft({method:"openAboutPage"})}function Ko(e){return pe()?(Z.extra.openInTab(e),Promise.resolve()):Ft({method:"openInTab",data:e})}function bT(e=!1){return pe()?(Z.extra.openEbookViewerPage(e),Promise.resolve()):Ft({method:"openEbookViewerPage"})}function yT(e=!1){return pe()?(Z.extra.openEbookBuilderPage(e),Promise.resolve()):Ft({method:"openEbookBuilderPage"})}function TT(e){Ge()}function Go(e=!1,t){return pe()?(Z.extra.openPdfViewerPage(e),Promise.resolve()):Ft({method:"openPdfViewerPage",data:{url:t}})}function vT(e=!1){return pe()?(Z.extra.openSubtitleBuilderPage(e),Promise.resolve()):Ft({method:"openSubtitleBuilderPage"})}function Vo(e){return pe()?Promise.resolve():Ft({method:"setBadge",data:{text:e}})}function ST(){return pe()?(R.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Ft({method:"autoSyncLatestConfig"})}function i0(e,t=!1){return pe()?Z.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function CT(e,t){return pe()?qi.getDelay(e,t):Ft({method:"getDelay",data:{key:e,options:t}})}var Pe=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,i=!1,o=!1,s=[],u=null,l=new Set;for(let T of a)T.from&&T.from!=="auto"&&l.add(T.from),T.refresh&&(i=!0),T.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=I1(a,c,g)}catch(T){if(r)for(let b=0;bT));let f=[],m=[],h=(T,b,x)=>{let w="";if(b.translatedTexts&&b.translatedTexts[0]&&(w=b.translatedTexts[0]),m[T]||(m[T]=b,m[T].translatedTexts=Array(b.sentenceTotalParts).fill(null)),m[T].hasError)return;if(x){let C=x instanceof Q?new Q(x.name,x.message).initNetWork(x.status).initData(x.data):x;m[T].hasError=!0,b.callback&&b.callback(C,null,b.sentence);return}m[T].translatedTexts[b.partIndex]=w;let L=m[T],M=0;for(let C=0;C{let M=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(M=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:M,to:b.to,url:x,options:n,refresh:i,debug:o}),sourceTempSentences:b.tempSentences};{let C=Qb;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(C=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let A=[],D=Or(this.serviceConfig);if(b.tempSentences.forEach((q,I)=>{let k=Wp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});q.force!==!0&&(k&&k.text&&k.text.trim().lengthI.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:q,from:M,to:b.to})}let S="";v&&v.length>=2?S=A.map((q,I)=>{let{item:k}=q;return I===A.length-1?k.text:k.text+v[0]+(I+1)+v[1]}).join(""):S=A.map(({item:q})=>q.text).join(C);let N=await this.translate({text:S,from:M,to:b.to,url:x,options:{...n,rawTextArrayLength:A.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=N,P=[];if(v&&v.length>=2){let q=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(q=v[2]);let I=new RegExp(q,"g");P=F.split(I)}else P=F.split(C);let O=[];if(P.length>A.length){for(let q=0;qq.text);return D=Or(this.serviceConfig,!0),O.forEach((q,I)=>{let k=A[I],_=k.index,B=k.variables||{};Object.keys(B).length>0&&(q=dm({text:q,delimiters:D,variables:B})),z[_]=q}),{sourceTempSentences:b.tempSentences,text:z,from:N.from,to:N.to}}};f.push(L().then(M=>{let{text:C,sourceTempSentences:v}=M;for(let A=0;A{if(M instanceof Q&&M.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let C=0;C{let b=T.sentence.text;return T.translatedTexts&&T.translatedTexts.length>0&&(b=T.translatedTexts.join("")),{...T.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],i=Or(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,f)=>{let m=Wp({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[f]!==!0&&(m&&m.text&&m.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){R.debug("formatAndTranslateList error",t,l)}let o=await this.translateList(n),{text:s}=o,u=t.text.map(l=>l);return i=Or(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let f=g.index,m=g.variables,h=Object.keys(m);u[f]=l,h.length>0&&(u[f]=dm({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(t){return Ue({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};p();p();var $o="input is invalid type",bm=typeof window=="object",$a=bm?window:{};$a.JS_SHA256_NO_WINDOW&&(bm=!1);var zD=!bm&&typeof self=="object",ND=!$a.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;ND?$a=global:zD&&($a=self);var pQ=!$a.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,mQ=typeof define=="function"&&define.amd,ku=!$a.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",ve="0123456789abcdef".split(""),UD=[-2147483648,8388608,32768,128],Sr=[24,16,8,0],o0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s0=["hex","array","digest","arrayBuffer"],sn=[];($a.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});ku&&($a.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var xT=function(e,t){return function(n){return new un(t,!0).update(n)[e]()}},wT=function(e){var t=xT("hex",e);t.create=function(){return new un(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};un.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=UD[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};un.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,g,f,m,h,y,T,b,x,w;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],g=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(T=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(T=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),T=e&t,f=T^e&n^w,y=a&i^~a&o,m=s+g+y+o0[l]+u[l],h=c+f,s=r+m<<0,r=m+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,f=b^r&t^T,y=s&a^~s&i,m=o+g+y+o0[l+1]+u[l+1],h=c+f,o=n+m<<0,n=m+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),x=n&r,f=x^n&e^b,y=o&s^~o&a,m=i+g+y+o0[l+2]+u[l+2],h=c+f,i=t+m<<0,t=m+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),w=t&n,f=w^t&r^x,y=i&o^~i&s,m=a+g+y+o0[l+3]+u[l+3],h=c+f,a=e+m<<0,e=m+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};un.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=ve[e>>28&15]+ve[e>>24&15]+ve[e>>20&15]+ve[e>>16&15]+ve[e>>12&15]+ve[e>>8&15]+ve[e>>4&15]+ve[e&15]+ve[t>>28&15]+ve[t>>24&15]+ve[t>>20&15]+ve[t>>16&15]+ve[t>>12&15]+ve[t>>8&15]+ve[t>>4&15]+ve[t&15]+ve[n>>28&15]+ve[n>>24&15]+ve[n>>20&15]+ve[n>>16&15]+ve[n>>12&15]+ve[n>>8&15]+ve[n>>4&15]+ve[n&15]+ve[r>>28&15]+ve[r>>24&15]+ve[r>>20&15]+ve[r>>16&15]+ve[r>>12&15]+ve[r>>8&15]+ve[r>>4&15]+ve[r&15]+ve[a>>28&15]+ve[a>>24&15]+ve[a>>20&15]+ve[a>>16&15]+ve[a>>12&15]+ve[a>>8&15]+ve[a>>4&15]+ve[a&15]+ve[i>>28&15]+ve[i>>24&15]+ve[i>>20&15]+ve[i>>16&15]+ve[i>>12&15]+ve[i>>8&15]+ve[i>>4&15]+ve[i&15]+ve[o>>28&15]+ve[o>>24&15]+ve[o>>20&15]+ve[o>>16&15]+ve[o>>12&15]+ve[o>>8&15]+ve[o>>4&15]+ve[o&15];return this.is224||(u+=ve[s>>28&15]+ve[s>>24&15]+ve[s>>20&15]+ve[s>>16&15]+ve[s>>12&15]+ve[s>>8&15]+ve[s>>4&15]+ve[s&15]),u};un.prototype.toString=un.prototype.hex;un.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};un.prototype.array=un.prototype.digest;un.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function u0(e,t,n){var r,a=typeof e;if(a==="string"){var i=[],o=e.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);e=i}else if(a==="object"){if(e===null)throw new Error($o);if(ku&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ku||!ArrayBuffer.isView(e)))throw new Error($o)}else throw new Error($o);e.length>64&&(e=new un(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}un.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}u0.prototype=new un;u0.prototype.finalize=function(){if(un.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();un.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),un.prototype.finalize.call(this)}};var Yo=wT();Yo.sha256=Yo;Yo.sha224=wT(!0);Yo.sha256.hmac=DT();Yo.sha224.hmac=DT(!0);var AT=Yo;var kT=AT.sha256;function Cr(e){return Promise.resolve(kT(e))}function l0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Ya(e,t){let n=kT.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function PT(e,t){let n=await Ya(e,t);return l0(n)}async function c0(e,t){let n=qD(t),r=await Ya(e,n);return l0(r)}function qD(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var LT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Pu=class e extends Pe{static langMap=new Map(LT);maxTextGroupLength=50;static langMapReverse=new Map(LT.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new Q("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:e.langMapReverse.get(o.Response.Source)||r,to:e.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Cr(a)].join(` `),g=e.getUTCDate(u),f=["TC3-HMAC-SHA256",l,`${g}/${i}/tc3_request`,await Cr(c)].join(` -`),m=await PT(g,`TC3${n}`),h=await c0(i,m),y=await c0("tc3_request",h),T=await c0(f,y),b=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${T}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new Q(b.Response.Error.Message);return b}};p();var _T=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],jD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Pu=class e extends Pe{static langMap=new Map(_T);static langMapReverse=new Map(_T.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:jD,timeout:this.requestTimeout});return{text:o.targetText,from:e.langMapReverse.get(o.source)||r,to:e.langMapReverse.get(o.target)||a}}};p();var MT=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Hi=class e extends Pe{static langMap=new Map(MT);static langMapReverse=new Map(MT.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};p();p();p();function HD(e,t){return t?e+(t-e%t):e}function WD(e,t){return e.split(t).length-1}function Tm(e){let t=Date.now(),n=1;for(let r of e)n+=WD(r,"i");return HD(t,n)}function KD(e,t){return Math.floor(Math.random()*(t-e+1))+e}function vm(){return KD(1e6,1e8)}p();p();p();var Sm="https://www2.deepl.com/jsonrpc",Cm="auto",FT=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];p();function GD(e=FT){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function xm(e){return GD()[e.toLowerCase()]}var VD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function $D(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function YD(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function QD(e,t,n,r,a,i,o){let s=vm(),u=YD(r,n),l=[];t.forEach(f=>{l.push({text:f,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Tm(t);let c=await de({retry:2,method:"POST",url:e,body:$D(u),headers:VD}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(f=>{g.text.push(f.text)}),g}async function BT(e,t,n,r=Cm,a,i,o){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:QD(e,t,xm(n),xm(r)??"auto",a,i,o):{text:[],from:r,to:n}}var IT=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Qo=class e extends Pe{static langMap=new Map(IT);static langMapReverse=new Map(IT.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Sm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=rn(Sm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,i=await BT(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:i.text,from:e.langMapReverse.get(i.from),to:e.langMapReverse.get(i.to)}}};p();var Lu=class e extends Pe{static langMap=new Map(bm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=pa.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),i=e.langMap.get(a)||a,o=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Le(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=RT());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),g=await de({url:e0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new Q(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,i=Le(),o=t.url;if(i.INSTALL_FROM==="firefox_store"&&(o=RT()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:t.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),f=await de({url:e0,body:g,method:"POST"});if(f.header.ret_code!=="succ")throw new Q(f.message||f.header.ret_code);return{text:f.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function RT(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}p();p();function Em(){return Math.random()>=.1}var Zo=class extends Pe{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Em())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await fT(),!Em())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};p();var zT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],wm=new Map(zT),OT=new Map(zT.map(([e,t])=>[t,e])),Dm=class e extends Pe{static langMap=wm;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new Q("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:wm.get(r)||"auto",target_lang:wm.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:OT.get(o.source_lang),to:OT.get(o.target_lang)}}else throw new Q(i.msg)}},d0=Dm;p();var NT=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],_u=new Map(NT),ZD=new Map(NT.map(([e,t])=>[t,e])),Am=class extends Pe{static langMap=_u;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new Q("authKey are required");if(!this.authKey)throw new Q("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=rn(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=rn(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=rn(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=rn(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=rn(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(t),s={source_lang:_u.get(n)||"",target_lang:_u.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(T=>{u.append("text",T)});let l=u.toString(),c={text:i,source_lang:_u.get(n)||"auto",target_lang:_u.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let f,m={};t.refresh&&(m={"X-Refresh":"True"}),t.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):f=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(f,o,!!t.debug),y=h.map(T=>T.text);if(r==="zh-TW"){let T=this.serviceConfig||{};T&&T.googleApiUrl&&(T.apiUrl=T.googleApiUrl);let x=await new Hi(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(w=>w.text).join(` +`),m=await PT(g,`TC3${n}`),h=await c0(i,m),y=await c0("tc3_request",h),T=await c0(f,y),b=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${T}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new Q(b.Response.Error.Message);return b}};p();var _T=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],jD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Lu=class e extends Pe{static langMap=new Map(_T);static langMapReverse=new Map(_T.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:jD,timeout:this.requestTimeout});return{text:o.targetText,from:e.langMapReverse.get(o.source)||r,to:e.langMapReverse.get(o.target)||a}}};p();var MT=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Hi=class e extends Pe{static langMap=new Map(MT);static langMapReverse=new Map(MT.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=e.langMap.get(r)||"auto",o=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new Q("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new Q("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};p();p();p();function HD(e,t){return t?e+(t-e%t):e}function WD(e,t){return e.split(t).length-1}function ym(e){let t=Date.now(),n=1;for(let r of e)n+=WD(r,"i");return HD(t,n)}function KD(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Tm(){return KD(1e6,1e8)}p();p();p();var vm="https://www2.deepl.com/jsonrpc",Sm="auto",FT=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];p();function GD(e=FT){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function Cm(e){return GD()[e.toLowerCase()]}var VD={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function $D(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function YD(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function QD(e,t,n,r,a,i,o){let s=Tm(),u=YD(r,n),l=[];t.forEach(f=>{l.push({text:f,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=ym(t);let c=await de({retry:2,method:"POST",url:e,body:$D(u),headers:VD}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(f=>{g.text.push(f.text)}),g}async function BT(e,t,n,r=Sm,a,i,o){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:QD(e,t,Cm(n),Cm(r)??"auto",a,i,o):{text:[],from:r,to:n}}var IT=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Qo=class e extends Pe{static langMap=new Map(IT);static langMapReverse=new Map(IT.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=vm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=an(vm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,i=await BT(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:i.text,from:e.langMapReverse.get(i.from),to:e.langMapReverse.get(i.to)}}};p();var _u=class e extends Pe{static langMap=new Map(hm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=pa.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),i=e.langMap.get(a)||a,o=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Le(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=RT());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),g=await de({url:e0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new Q(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,i=Le(),o=t.url;if(i.INSTALL_FROM==="firefox_store"&&(o=RT()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:t.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),f=await de({url:e0,body:g,method:"POST"});if(f.header.ret_code!=="succ")throw new Q(f.message||f.header.ret_code);return{text:f.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function RT(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}p();p();function xm(){return Math.random()>=.1}var Zo=class extends Pe{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!xm())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await fT(),!xm())throw new Q("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};p();var zT=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Em=new Map(zT),OT=new Map(zT.map(([e,t])=>[t,e])),wm=class e extends Pe{static langMap=Em;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new Q("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Em.get(r)||"auto",target_lang:Em.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:OT.get(o.source_lang),to:OT.get(o.target_lang)}}else throw new Q(i.msg)}},d0=wm;p();var NT=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Mu=new Map(NT),ZD=new Map(NT.map(([e,t])=>[t,e])),Dm=class extends Pe{static langMap=Mu;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new Q("authKey are required");if(!this.authKey)throw new Q("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=an(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=an(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=an(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=an(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=an(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(t),s={source_lang:Mu.get(n)||"",target_lang:Mu.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(T=>{u.append("text",T)});let l=u.toString(),c={text:i,source_lang:Mu.get(n)||"auto",target_lang:Mu.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let f,m={};t.refresh&&(m={"X-Refresh":"True"}),t.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?f=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):f=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(f,o,!!t.debug),y=h.map(T=>T.text);if(r==="zh-TW"){let T=this.serviceConfig||{};T&&T.googleApiUrl&&(T.apiUrl=T.googleApiUrl);let x=await new Hi(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(w=>w.text).join(` `),url:"",options:{}});x&&x.text&&(y=x.text.split(` -`))}return{text:y,from:h[0]&&ZD.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!pn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...t,translations:i}}},UT=Am;p();var JD=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],km=new Map(JD),Pm=class extends Pe{static langMap=km;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:km.get(r)||r,to:km.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new Q(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},qT=Pm;p();var XD=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Lm=new Map(XD),_m=class extends Pe{static langMap=Lm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Lm.get(a)||a};r!=="auto"&&(i.from=Lm.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(f=>({text:f}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((f,m)=>{o.append(m,f)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new Q("server response invalid");return{from:r,to:a,text:g.map(f=>f.translations.map(h=>h.text).join(" "))}}},jT=_m;p();var eA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Jo=new Map(eA),Mm=class extends Pe{static langMap=Jo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:y,from:h[0]&&ZD.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!pn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...t,translations:i}}},UT=Dm;p();var JD=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],Am=new Map(JD),km=class extends Pe{static langMap=Am;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:Am.get(r)||r,to:Am.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new Q(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},qT=km;p();var XD=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Pm=new Map(XD),Lm=class extends Pe{static langMap=Pm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new Q("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:Pm.get(a)||a};r!=="auto"&&(i.from=Pm.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(f=>({text:f}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((f,m)=>{o.append(m,f)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new Q("server response invalid");return{from:r,to:a,text:g.map(f=>f.translations.map(h=>h.text).join(" "))}}},jT=Lm;p();var eA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Jo=new Map(eA),_m=class extends Pe{static langMap=Jo;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Jo.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||Jo.get(r)||r,target:Jo.get(a)||a})):u.body=JSON.stringify({text:s,source:Jo.get(r),target:Jo.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new Q("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},HT=Mm;p();function KT(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",t.sourceLanguage].includes(o)&&["auto",t.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function yn(e){let{url:t,config:n,state:r}=e,a=new URL(t),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:f,sourceLanguageUrlPattern:m,immediateTranslationPattern:h}=n,y=f||"zh-CN",T=Xo(t,o),b=Xo(t,h),x=s,w=Object.keys(u);for(let se of w){let ue=u[se];if(Xo(t,ue)){x=se;break}}let L=l,M=Object.keys(c);for(let se of M){let ue=c[se];if(ue&&Xo(t,ue)){L=se;break}}let C=Xo(t,g),v=WT(t,g);v||(v=_t(t,n1)),v||(v=_t(t,n.blockUrls));let A=WT(t,n.inputTranslationUrlPattern);A||(A=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),S=Object.keys(m),N={};for(let se of S){let ue=m[se];if(ue&&ue.matches)for(let ke of ue.matches)N[ke]=se}let F=Object.keys(N),P=Op(t,F);P&&(i=N[P]??"auto",N[P]&&N[P]!=="auto"&&ar(N[P]));let O=a.hostname,z=await Cr(O),q=a.pathname+a.search+a.hash,I=await Cr(q),k=`https://${z}.com/${I}`,_=await Wt(),B=await ay(),H=n.translationStartMode;H==="dynamic"&&b&&(H="immediate");let j=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let G=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(G=n.mouseHoverTranslationService);let V=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ie=await it.get(ht,null),te=!1;ie&&(te=Qt(ie));let J={targetLanguage:y,config:n,translationService:x,inputTranslationService:j,mouseHoverTranslationService:G,subtitleTranslateService:V,isTranslateUrl:C,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:A,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},localConfig:_};ie&&(J.user=ie,te?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(se=>!J.config.generalRule.bodyTranslateTags.includes(se)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[J.translationService]||{};ce.immediateTranslationTextCount!==void 0&&tA(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),J.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&J.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(J.state.translationDebounce=ce.translationDebounce);let he=B.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Xo(t,se)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Se=n.generalRule;if(X&&(J.rule=Mc(Se,X)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(se=>!J.rule.bodyTranslateTags.includes(se)&&!J.rule.forceTranslateTags.includes(se))),J.rule.mainFrameSelector){let se=document.querySelector(J.rule.mainFrameSelector);se&&(J.mainFrame=se)}return J}function Xo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:i&&i.length>0&&Oc(i)?!1:!!(a&&a.length>0&&Oc(a))}function WT(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&Oc(r))}function tA(e){return typeof e=="number"}p();p();p();function GT(e){let t=e.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Jo.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||Jo.get(r)||r,target:Jo.get(a)||a})):u.body=JSON.stringify({text:s,source:Jo.get(r),target:Jo.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new Q("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},HT=_m;p();function KT(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",t.sourceLanguage].includes(o)&&["auto",t.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function yn(e){let{url:t,config:n,state:r}=e,a=new URL(t),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:f,sourceLanguageUrlPattern:m,immediateTranslationPattern:h}=n,y=f||"zh-CN",T=Xo(t,o),b=Xo(t,h),x=s,w=Object.keys(u);for(let se of w){let ue=u[se];if(Xo(t,ue)){x=se;break}}let L=l,M=Object.keys(c);for(let se of M){let ue=c[se];if(ue&&Xo(t,ue)){L=se;break}}let C=Xo(t,g),v=WT(t,g);v||(v=_t(t,n1)),v||(v=_t(t,n.blockUrls));let A=WT(t,n.inputTranslationUrlPattern);A||(A=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),S=Object.keys(m),N={};for(let se of S){let ue=m[se];if(ue&&ue.matches)for(let ke of ue.matches)N[ke]=se}let F=Object.keys(N),P=Rp(t,F);P&&(i=N[P]??"auto",N[P]&&N[P]!=="auto"&&ar(N[P]));let O=a.hostname,z=await Cr(O),q=a.pathname+a.search+a.hash,I=await Cr(q),k=`https://${z}.com/${I}`,_=await Wt(),B=await ay(),H=n.translationStartMode;H==="dynamic"&&b&&(H="immediate");let j=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let G=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(G=n.mouseHoverTranslationService);let V=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ie=await ot.get(bt,null),te=!1;ie&&(te=Qt(ie));let J={targetLanguage:y,config:n,translationService:x,inputTranslationService:j,mouseHoverTranslationService:G,subtitleTranslateService:V,isTranslateUrl:C,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:A,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:T,cache:n.cache,translationTheme:L,isTranslateDirectlyOnHover:!1},localConfig:_};ie&&(J.user=ie,te?J.isPro=!0:J.isPro=!1),J.state.translationArea==="body"&&(J.config.generalRule.excludeTags=J.config.generalRule.excludeTags.filter(se=>!J.config.generalRule.bodyTranslateTags.includes(se)),J.config.generalRule.additionalExcludeSelectors=J.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[J.translationService]||{};ce.immediateTranslationTextCount!==void 0&&tA(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),J.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&J.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(J.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(J.state.translationDebounce=ce.translationDebounce);let he=B.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(J.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Xo(t,se)),J.state.translationArea==="body"&&(J.rule.paragraphMinTextCount=1,J.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(J.state.translationStartMode="immediate");let Se=n.generalRule;if(X&&(J.rule=Mc(Se,X)),J.rule.selectors.length>0&&(J.rule.paragraphMinTextCount=2,J.rule.paragraphMinWordCount=1),J.state.translationArea==="body"&&J.rule.excludeTags&&(J.rule.excludeTags=J.rule.excludeTags.filter(se=>!J.rule.bodyTranslateTags.includes(se)&&!J.rule.forceTranslateTags.includes(se))),J.rule.mainFrameSelector){let se=document.querySelector(J.rule.mainFrameSelector);se&&(J.mainFrame=se)}return J}function Xo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:i&&i.length>0&&Oc(i)?!1:!!(a&&a.length>0&&Oc(a))}function WT(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&Oc(r))}function tA(e){return typeof e=="number"}p();p();p();function GT(e){let t=e.split(` `),n=[],r,a="",i="";for(let o of t){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Fm=class extends Pe{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var Mm=class extends Pe{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(t,n,r){if(super(t,n,r),t||(t={}),t.APIKEY){let a=t.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(t.ignoreResRegexs)&&(this.ignoreResReges=t.ignoreResRegexs),t.translationTextSeparator&&(this.translationTextSeparator=t.translationTextSeparator),t.model&&(this.model=t.model),t.systemPrompt&&(this.systemPrompt=t.systemPrompt),t.prompt&&(this.prompt=t.prompt),t.multiplePrompt&&(this.multiplePrompt=t.multiplePrompt),t.subtitlePrompt&&(this.subtitlePrompt=t.subtitlePrompt),t.bodyConfigs&&(this.bodyConfigs=t.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a,options:i}=t;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},g=i?.sourceProgram,f=["subtitle","videoSubtitle"].includes(g),m=[n];i?.rawTextArrayLength&&(m=n.split(this.translationTextSeparator)),m.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),f&&this.subtitlePrompt&&m.length>1&&(s=this.subtitlePrompt);let h="",y="",T=s.includes("{{json}}"),b=s.includes("{{yaml}}");if(T){let M=[],C=c.imt_json_item||"";f&&(C=c.imt_subtitle_json_item||C);for(let v=0;vC==="from"?u:C==="to"?l+" Language":C==="text"?n:C=="json"?h:C=="yaml"?y:c[C]||M).replace(/{{(.+?)}}/g,(M,C)=>c[C]||M);let x=await this.handleOptions(s,t);R.debug("request options",x);let w=await de(x),L=this.parseResponse(w);if(L=this.filterContent(n,L,s,m),R.debug("filterContent after",L),!T&&!b||!L)return{from:r,to:a,text:L||n};L=nA(n,L),L=R1(L);try{let M={};if(T){R.debug("extractValidJson before",L);let A=this.extractValidJson(L);R.debug("parse before",L),M=wl.parse(A)}else if(b){R.debug("parseYAML before",L);let A=this.extractValidYaml(L);M=GT(A)}let C=c.imt_trans_field;f&&(C=c.imt_sub_trans_field||C);let v=c.imt_source_field;return f&&(v=c.imt_sub_source_field||v),L=this.restoreText(m,M,C,this.translationTextSeparator,v),{from:r,to:a,text:L}}catch(M){return R.error("parse response failed",L,M),{from:r,to:a,text:L}}}extractValidJson(t){let n=t.indexOf("["),r=t.lastIndexOf("]");return n!==-1&&r!==-1?t.slice(n,r+1):""}extractValidYaml(t){let n=t.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=t)}catch(o){R.debug("e",o)}return i}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},es=Fm;function nA(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var rA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],VT=new Map(rA),Bm=class extends es{static langMap=VT;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=rn(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=rn(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return VT}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},$T=Bm;p();var ZT=eC(YT());var QT=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Fu=class e extends Pe{static langMap=new Map(QT);static langMapReverse=new Map(QT.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new Q("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new ZT.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),f=this.SHA1.b64_hmac(`${n}&`,g),m=new URLSearchParams(Object.assign({},l,{Signature:f})).toString(),h=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new Q(h.Message);return h}};p();p();var aA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],zt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},Im=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},Rm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=Im(t);if(r)return Array.isArray(n)?`${r}=${n.map(Im).sort().join(`&${r}=`)}`:`${r}=${Im(n)}`}).filter(t=>t).join("&"),ts=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${zt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;t.sessionToken&&(a[zt.tokenHeader]=t.sessionToken),a[zt.dateHeader]=r,a[zt.notSignBody]="",a[zt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[zt.algorithmKey]=zt.algorithm,a[zt.signHeadersKey]="",a[zt.signQueriesKey]=void 0,a[zt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=i,this.request.headers=o,a[zt.signQueriesKey]=Object.keys(a).sort().join(";"),a[zt.signatureKey]=s,Rm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[zt.dateHeader]=n,t.sessionToken&&(this.request.headers[zt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[zt.contentSha256Header]=await Cr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return l0(await Ya(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(zt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=Rm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} +`)}restoreText(t,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=t)}catch(o){R.debug("e",o)}return i}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},es=Mm;function nA(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var rA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],VT=new Map(rA),Fm=class extends es{static langMap=VT;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=pn()||tr()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new Q("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new Q("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=an(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=an(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=an(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return VT}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return Gn(t.join("_"))}},$T=Fm;p();var ZT=eC(YT());var QT=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Bu=class e extends Pe{static langMap=new Map(QT);static langMapReverse=new Map(QT.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new Q("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new ZT.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),f=this.SHA1.b64_hmac(`${n}&`,g),m=new URLSearchParams(Object.assign({},l,{Signature:f})).toString(),h=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new Q(h.Message);return h}};p();p();var aA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],zt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},Bm=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},Im=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=Bm(t);if(r)return Array.isArray(n)?`${r}=${n.map(Bm).sort().join(`&${r}=`)}`:`${r}=${Bm(n)}`}).filter(t=>t).join("&"),ts=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${zt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;t.sessionToken&&(a[zt.tokenHeader]=t.sessionToken),a[zt.dateHeader]=r,a[zt.notSignBody]="",a[zt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[zt.algorithmKey]=zt.algorithm,a[zt.signHeadersKey]="",a[zt.signQueriesKey]=void 0,a[zt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=i,this.request.headers=o,a[zt.signQueriesKey]=Object.keys(a).sort().join(";"),a[zt.signatureKey]=s,Im(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[zt.dateHeader]=n,t.sessionToken&&(this.request.headers[zt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[zt.contentSha256Header]=await Cr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return l0(await Ya(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(zt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=Im(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} `),t.push(this.signedHeaders()),t.push(await this.hexEncodedBodyHash()),t.join(` `)}canonicalHeaders(){let t=[];Object.keys(this.request.headers).forEach(r=>{t.push([r,this.request.headers[r]])}),t.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new Q(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Cr(t)}async hexEncodedBodyHash(){return this.request.headers[zt.contentSha256Header]?this.request.headers[zt.contentSha256Header]:this.request.body?await this.hexEncodedHash(Rm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return aA.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let i=await Ya(n,`${zt.kDatePrefix}${t.secretKey}`),o=await Ya(r,i),s=await Ya(a,o);return Ya(zt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,zt.v4Identifier].join("/")}};var JT=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Om=new Map(JT),iA=new Map(JT.map(([e,t])=>[t,e])),zm=class extends Pe{static langMap=Om;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new Q("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ts(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new Q(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new Q(s.Code,s.Message)}else throw new Q("response: "+JSON.stringify(o))}async translateList(t){let{text:n,from:r,to:a}=t,i=Om.get(r),o={TargetLanguage:Om.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ts(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(m=>m.Translation),f=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(f=iA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:f,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new Q(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new Q(g.Code,g.Message)}else throw new Q("response: "+JSON.stringify(c))}},XT=zm;p();var ev=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Nm=new Map(ev),oA=new Map(ev.map(([e,t])=>[t,e])),Bu=class extends Pe{static langMap=Nm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,i=Nm.get(r)||"detect",o=Nm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=oA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new Q(l.status_code.toString(),l.status_message)}}};p();var sA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Um=new Map(sA),Iu=class extends Pe{static langMap=Um;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new Q("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:Um.get(r)||r,target_lang:Um.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new Q(s.message||s.message||"API Error")}};p();p();var qm="https://{s}bing.com",iv=qm+"/translator",uA=qm+"/ttranslatev3",lA=qm+"/tspellcheckv3",p0="bingGlobalConfig",ov=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],tv=new Map(ov),nv=new Map(ov.map(([e,t])=>[t,e])),rv=1e3,xr,ns;function jm(e,t){return e.replace("{s}",t?t+".":"")}async function cA(){if(!xr){let n=await Z.storage.local.get(p0);return n&&(xr=n[p0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=xr;return Date.now()-e>t}async function av(){let e,t,n,r,a,i,o,s,u,l;try{let c=jm(iv,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:f,headers:m,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],t=f.match(/IG:"([^"]+)"/)[1],n=f.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(f.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return xr={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Z.storage.local.set({[p0]:xr}),xr}function dA(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=xr;return jm(e?lA:uA,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+xr.count++:"")}function gA(e,t,n,r){let{token:a,key:i}=xr,o={fromLang:n,text:t,token:a,key:i};return!e&&r&&(o.to=r),o}async function sv(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>rv)throw new Error(`The supported maximum length of text is ${rv}. Please shorten the text.`);ns||(ns=av()),await ns,await cA()&&(ns=av(),await ns),t=t||"auto",n=n||"zh-CN",t=tv.get(t)||t,n=tv.get(n)||n;let a=dA(!1),i=gA(!1,e,t,n==="auto-detect"?"zh-Hans":n),o={referer:jm(iv,xr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(xr=null,ns=null,await Z.storage.local.remove(p0),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Cr(t)}async hexEncodedBodyHash(){return this.request.headers[zt.contentSha256Header]?this.request.headers[zt.contentSha256Header]:this.request.body?await this.hexEncodedHash(Im(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return aA.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let i=await Ya(n,`${zt.kDatePrefix}${t.secretKey}`),o=await Ya(r,i),s=await Ya(a,o);return Ya(zt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,zt.v4Identifier].join("/")}};var JT=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Rm=new Map(JT),iA=new Map(JT.map(([e,t])=>[t,e])),Om=class extends Pe{static langMap=Rm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new Q("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ts(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new Q(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new Q(s.Code,s.Message)}else throw new Q("response: "+JSON.stringify(o))}async translateList(t){let{text:n,from:r,to:a}=t,i=Rm.get(r),o={TargetLanguage:Rm.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new ts(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(m=>m.Translation),f=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(f=iA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:f,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new Q(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new Q(g.Code,g.Message)}else throw new Q("response: "+JSON.stringify(c))}},XT=Om;p();var ev=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],zm=new Map(ev),oA=new Map(ev.map(([e,t])=>[t,e])),Iu=class extends Pe{static langMap=zm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,i=zm.get(r)||"detect",o=zm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=oA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new Q(l.status_code.toString(),l.status_message)}}};p();var sA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Nm=new Map(sA),Ru=class extends Pe{static langMap=Nm;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new Q("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:Nm.get(r)||r,target_lang:Nm.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new Q(s.message||s.message||"API Error")}};p();p();var Um="https://{s}bing.com",iv=Um+"/translator",uA=Um+"/ttranslatev3",lA=Um+"/tspellcheckv3",p0="bingGlobalConfig",ov=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],tv=new Map(ov),nv=new Map(ov.map(([e,t])=>[t,e])),rv=1e3,xr,ns;function qm(e,t){return e.replace("{s}",t?t+".":"")}async function cA(){if(!xr){let n=await Z.storage.local.get(p0);return n&&(xr=n[p0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=xr;return Date.now()-e>t}async function av(){let e,t,n,r,a,i,o,s,u,l;try{let c=qm(iv,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:f,headers:m,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],t=f.match(/IG:"([^"]+)"/)[1],n=f.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(f.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return xr={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Z.storage.local.set({[p0]:xr}),xr}function dA(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=xr;return qm(e?lA:uA,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+xr.count++:"")}function gA(e,t,n,r){let{token:a,key:i}=xr,o={fromLang:n,text:t,token:a,key:i};return!e&&r&&(o.to=r),o}async function sv(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>rv)throw new Error(`The supported maximum length of text is ${rv}. Please shorten the text.`);ns||(ns=av()),await ns,await cA()&&(ns=av(),await ns),t=t||"auto",n=n||"zh-CN",t=tv.get(t)||t,n=tv.get(n)||n;let a=dA(!1),i=gA(!1,e,t,n==="auto-detect"?"zh-Hans":n),o={referer:qm(iv,xr.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(xr=null,ns=null,await Z.storage.local.remove(p0),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],f=c[0].detectedLanguage;return{text:g.text,from:nv.get(f.language),to:nv.get(g.to)}}p();p();p();p();p();function Qa(e){return e!=null}function cv(e,t,n){return`${e.type}#${t}#${n}`}function dv(e,t,n,r,a){return{body:a,id:r,type:cv(e,t,n)}}function pA(e,t,n,r){return{id:n,response:r,type:cv(e,"ask",t)}}function gv(e,t,n,r){if(Qa(r)){let a=r.type;if(Qa(a)&&Qa(r.body)){let[i,o,s]=a.split("#");return i===e.type&&o===t&&s===n}else return!1}else return!1}function mA(e,t,n){if(Qa(n)){let r=n.type;if(Qa(r)&&Qa(n.response)){let[a,i,o]=r.split("#");return a===e.type&&i==="ask"&&o===t}else return!1}else return!1}function fA(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function hA(e,t,n,r){return new Promise(a=>{let i=o=>{let s=o.data;mA(t,n,s)&&s.id===r&&(e.removeEventListener("message",i),a(s.response))};e.addEventListener("message",i)})}function bA(e,t,n,r){let a=i=>{let o=i.data;gv(t,"tell",n,o)&&r(o.body)};return e.addEventListener("message",a),[e,a]}function uv(e,t,n,r,a,i){let o=async s=>{let u=s.data;if(gv(n,"ask",r,u)){let l=await i(u.body);t=s.source,t.postMessage(pA(n,r,u.id,l),s.origin)}};return e.addEventListener("message",o),[e,o]}function yA(e,t,n,r,a){let i=Math.random().toString();return e.postMessage(dv(t,"tell",n,i,r),a)}async function lv(e,t,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),f=await hA(e,n,r,s);clearTimeout(g),l(f)});return t.postMessage(dv(n,"ask",r,s,a),i),u}var Za=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;uv(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let i=n.contentWindow;if(Qa(i))return new e(t,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await lv(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(bA(this.thisWindow,this.protocol,t,n))}tell(t,n){yA(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(uv(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return lv(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){fA(this.listeners)}};var pv;async function mv(){if(ot()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=Za.iframe(Tc,"*",{targetWindow:t});pv=n,await Za.connect(n).catch(r=>{R.error("connect with parent frame error",r)})}}function fv(){return pv}var m0=new Map;async function Hm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=Gn(e.body)),m0.has(t))return m0.get(t);let n=de(e);m0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{m0.delete(t)},3e3)}}async function hv(e){return Hm(e)}async function f0(e){if(ot()){let n=fv();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw R.error("can not comunicate with root frame, use strict limiter",r),r}else return Hm(e)}else return Hm(e)}p();function bv(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:e,accessTokenExpiresAt:o.toISOString()}}p();async function h0(e){await Ip(e)}async function b0(e,t){let n=await Mp(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return yv(e,t)}return yv(e,t)}async function yv(e,t){let n=await t(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Fp(e,n,i-1e3),n}var TA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Wm=new Map(TA),Ru=class extends Pe{static langMap=Wm;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await h0(hp)}async translate(t){let{text:n,from:r,to:a}=t;return n?await sv(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await b0(hp,async()=>{let t=await f0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return bv(t)})}async translateList(t){let{from:n,to:r,text:a}=t,i=Wm.get(n)||"auto",o=Wm.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let f of a)u.push({Text:f});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(f=>f.translations[0]?.text||""),from:n,to:r};throw new Q("Microsoft translate error "+JSON.stringify(g))}};p();var Tv=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Km=new Map(Tv),vA=new Map(Tv.map(([e,t])=>[t,e])),Gm=class extends Pe{static langMap=Km;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new Q("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=t,l=Gn(a+o+n+i);this.domain&&(l=Gn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Km.get(s)||"auto",to:Km.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let f=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(f.error_code)throw new Q("API_SERVER_ERROR",f.error_msg);let{trans_result:m,from:h}=f,y=m.map(({dst:b})=>b);return{from:vA.get(h)||h,to:u,text:y.join(` -`)}}},vv=Gm;p();p();var Wi=class extends Pe{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new Q("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,f)=>{let[m,h]=f.split(":"),y=o[m];return h==="random"?SA(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function SA(e){let t=Math.floor(Math.random()*e.length);return e[t]}var Sv=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Vm=class extends Wi{static langMap=new Map(Sv);constructor(t,n,r){if(!t?.token)throw new Q("token are required");super({...t,isSupportList:!0,langs:Sv,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},Cv=Vm;p();var CA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],y0=new Map(CA),$m=class extends Pe{static langMap=y0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!y0.get(a))throw new Q(`Unsupported language: ${a}`);if(r==="auto")throw new Q("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${y0.get(r)||"auto"}2${y0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},xv=$m;p();var Ev=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Ym=new Map(Ev),xA=new Map(Ev.map(([e,t])=>[t,e]));function EA(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var Qm=class extends Pe{static langMap=Ym;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new Q("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i=wA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+EA(n)+i+o+this.appSecret,u=await Cr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:Ym.get(r)||"auto",to:Ym.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),f=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!f.translation)throw new Q(JSON.stringify(f));let m=f.l,[h,y]=m.split("2");return{text:f.translation.join(` -`),from:xA.get(h),to:a}}};function wA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Jm=class extends Pe{static langMap=Zm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i={q:n,from:Zm.get(r)||"auto",to:Zm.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new Q("Youdao translation failed: "+JSON.stringify(s))}},Av=Jm;p();var Ou=class extends Wi{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||ou,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};p();var kv="immersive-translate-gemini-fake-user-key",DA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],Pv=new Map(DA),Xm=class extends es{static langMap=Pv;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return Pv}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await _p(kv,""),this.fakeId||(this.fakeId=AA(10),await Bp(kv,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+t;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let i=super.filterContent(t,n,r);return i.includes(this.fakeId)&&a.length<=1?t:i}};function AA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await f0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":tf.get(r)+"-"}${tf.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var LA={mock:Zo,mock2:Zo,custom:Ou,google:Hi,transmart:Lu,deepl:UT,volc:XT,volcAlpha:Bu,bing:Ru,tencent:ku,tenAlpha:Pu,baidu:vv,caiyun:Cv,cai:xv,openl:d0,youdao:wv,you:Av,d:Qo,dpro:Qo,deeplx:Iu,niu:qT,azure:jT,openai:$T,gemini:Lv,claude:Mv,papago:HT,aliyun:Fu,yandex:zu},Ja={};Object.keys(nr).forEach(e=>{Ja[e]={...nr[e],class:LA[e]}});function Xa(e,t){let n=Rn;if(Ja[e]&&Ja[e].class&&Ja[e].class.langMap&&Ja[e].class.langMap.size>0){let r=Ja[e].class.langMap,a=n.filter(i=>r.get(i));return a.includes(t)||a.unshift("placeholder"),a}else return Rn}async function Nr(e,t,n){if(!e.text)return e;let r=null,a=await lt({sentences:[e]},t,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new Q("translateFailed","translate failed")}async function Fv(e,t){for(let n of e)try{return await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function nf(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,i=n,o=a[i]||{},s=Qt(e.user);await new Ja[i].class(o,r,{translationService:i,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _A(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function lt(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:i,state:o}=t,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=KT(g,{sourceLanguage:_A(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let f=a.beta,m=o.cache===!1&&f,h=a.debug===!0&&f;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(m&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],T={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,w=Qt(t.user),L;try{L=new Ja[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await L.init()}catch(v){if(n){y.push(...e.sentences);let A={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let S=v instanceof Q?new Q(v.name,v.message).initNetWork(v.status).initData(v.data||A):v;n(S,null,D)}}return{sentences:[]}}if(o.cache)for(let v of e.sentences){x++;let A=l;l==="openl"&&(A=l+"-"+g.codename||d0.DEFAULT_CODENAME);let D=L.getCacheKeyPrefix();D&&(A=D+"-"+A);let S=null;try{S=await Cl(pT({originalText:v.text,from:v.from,to:v.to,service:A}),200)}catch(N){R.warn("query cache DB error, but it's ok",N)}if(S){let N={...v,text:S.translatedText};T.sentences[x]=N,n&&n(null,N,v)}else y.push(v)}else y.push(...e.sentences);let M=y.length;if(b-M>0&&R.debug(`use ${b-M} sentences from cache`),!y.length)return T;let C=await L.multipleTranslate({sentences:y},g,(v,A,D)=>{if(n&&n(v,A,D),!v&&A&&!l.startsWith("mock")&&o.cache){let S=l;l==="openl"&&(S=l+"-"+g.codename||d0.DEFAULT_CODENAME);let N=L.getCacheKeyPrefix();N&&(S=N+"-"+S),o.cache&&Cl(mT({translatedText:A.text,from:D.from,to:D.to,detectedFrom:A.from,key:Gn(D.text),service:S}),3e3).catch(F=>{R.warn("set cache DB error",F)})}});for(let v of C?.sentences||[]){let A=T.sentences.findIndex(D=>!D);if(A===-1)throw new Q("translateFailed","can not match the result");T.sentences[A]=v}return T}p();p();p();var rs={},MA={root:"",lang:"en",fallbackLang:"en"};function rf(e,t){let n=Object.assign({},MA,e);rs=t||rs;let[r,a]=K(n.lang),[i,o]=K(rs),[s,u]=K(!1),l=g=>{if(i.hasOwnProperty(g))return;u(!1);let f=H1(n.root||"",g);n.getUrl&&(f=n.getUrl(n.root||"",g),fetch(f).then(m=>m.json()).then(m=>{rs[g]=m,o({...rs}),u(!0)}).catch(m=>{o({...rs}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,f)=>{if(!i.hasOwnProperty(r))return g;let m=gu(i,r,g);return m===g&&r!==n.fallbackLang&&(m=gu(i,n.fallbackLang,g)),zp(m,f)},isReady:s}}var of=oo(null),af={root:"assets",lang:"en",fallbackLang:"en"},as=e=>{let{t,setLang:n,lang:r,isReady:a}=rf({root:e.root||af.root,lang:e.lang||af.lang,fallbackLang:e.fallbackLang||af.fallbackLang,getUrl:e.getUrl},e.translations);return d(of.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Me(of)}p();function Ae(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}p();p();function Ur(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:i}=W();return n=n||(i==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((o,s)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function sf(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:i=>{e.onChange(i.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(i=>i.selected)?.value,onChange:i=>{let o=i.target.value,s=t.find(u=>u.value===o);s&&s.onSelected(s)},children:t.map((i,o)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+o))})}p();function Ki(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=K(e.value),{config:i,field:o,onFinish:s}=e,u=o.name;o.label&&(u=o.label),o.labelKey&&(u=t(o.labelKey));let l={},c={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(c=i.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let f=0;f{let f=g.target.value,m=Array.isArray(r)?f.split(","):f;a(m),e.onChange(m)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function is(e){let{t}=W(),[n,r]=K(!0),[a,i]=K(!1),{config:o,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:f}=e;g=g??(l.default||"");let m={},h={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(h=o.translationServices[e.service]),h.env){let T=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||i(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(sf,{maxWidth:200,items:l.options.map(T=>({label:`${T.label?t(T.label):T.value}`,value:T.value,selected:g===T.value,onSelected:()=>{c(T.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let T=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(sf,{maxWidth:250,items:T.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(T[0]),i(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Ki,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Ki,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Ki,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let T=g,b="";T||(T="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:w}=FA(T);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:L=>{c(L.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:w},onInput:L=>{c(L.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:T=>{c(T.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,m)}}):null]})}):null}}function FA(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}p();function Bv(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let i=Zt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),i]})},"language-"+a)})})]})}function Nu(e){let{selectLanguages:t,languages:n}=e,r=ze(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d(Bv,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,i)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Zt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:o=>{o.preventDefault(),e.onChange(!1,t[i])}})]},"lang-"+i))})]}):null}p();p();function ma(e){let{t}=W(),n=Ve(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:i=>{i.target&&i.target.id==="immersive-translate-overlay"&&r(i)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:i=>{if(i.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function ei(e){let{t}=W(),[n,r]=K([]),[a,i]=K(!1),[o,s]=K(!1);function u(){e.onDeleteUrl(n,e.type),r([]),i(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,f)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[o&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:m=>{m.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:m=>{e.onEditUrl(g,e.type,f)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:m=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+f))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:o?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let m=g.target.checked;r(m?e.urls:[]),i(m)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function Uu(e){let{t}=W(),[n,r]=K(!1),[a,i]=K(""),[o,s]=K(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,f)=>{r(!n),i(c),s(f)},l=(c,g,f,m)=>{e.onSubmitAddUrl?.(c,g,f,m),r(!n),i(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(ma,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:o}):null]}),d(ei,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}p();async function ti(){let e=["bingGlobalConfig","baiduGlobalConfig",Mb,_a];for(let t of e)await Z.storage.local.remove(t);pe()||await Ry(),await Rp()}function Iv(){return pe()?Promise.resolve("0 B"):sm()}p();var T0='',qu="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Rv="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",zv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",Nv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Uv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";p();p();function os(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}p();function BA(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[i,o]=K(!1);function s(u,l){u.preventDefault(),o(!0),new zr(n).delete(l).catch(c=>{an(t("delete"))}).then(()=>a()).finally(()=>o(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":i,children:t("delete")})}function uf(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[i,o,s,u]=$e(),[l,c]=K([]),[g,f]=K(!0),[m,h]=K(!1),[y,T]=K({});le(()=>{n&&x().then(()=>f(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new zr(n).listAll().then(A=>{c(A)}).catch(A=>r())}function w(v){if(v.preventDefault(),l.length>=10)return an(a("maxBackupFiles",{count:10}));h(!0);let A="immersive-translate-config-"+os()+".json";new zr(n).uploadConfig(i,A).catch(D=>{an(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function L(v,A,D){v.preventDefault(),T({[D]:!0}),new zr(n).getConfig(A).then(S=>{o(()=>({...S})),ut(a("importSuccess"))}).catch(S=>{R.error(S),an(a("importFail"))}).finally(()=>T({}))}function M(v,A){new zr(n).getConfig(v).then(D=>{let S=document.createElement("a");S.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),S.setAttribute("download",A),S.style.display="none",document.body.appendChild(S),S.click(),document.body.removeChild(S)}).catch(D=>{R.error("download google config file failed",D),an(a("downloadFail")+": "+D.message)})}function C(v){v.preventDefault(),o({...i,autoSync:!1}),Ha.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,A)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),M(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",cu(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[A],disabled:y[A],onClick:D=>L(D,v.id,A),children:a("import_hint")}),d(BA,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+A))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":m,onClick:w,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:C,disabled:g,children:a("revokeAuth")})]})]})})}p();p();function qr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var we=oo([]);function Jt(e){let[t,n]=K(null);return le(()=>{bt().then(r=>{n(r),R.debug("current config",r)})},[]),le(()=>{bt().then(r=>{n(r)})},[e]),t}function Un(e){let[t,n]=K(null);return le(()=>{e&&yn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function qv(){let[e,t]=K(!1),n=Ir();return le(()=>{pe()&&(!n||n=="0.0.0"||qr(n,"0.9.0")||t(!0))},[n]),[e,t]}function fa(){let[e,t]=K(null);return le(()=>{Wt().then(r=>{t(r)})},[]),[e,r=>{t(r),Kt(r)}]}p();var ct=class extends pi{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(R.error("ErrorBoundary",this.error,this.info),d(IA,{error:this.error,info:this.info})):this.props.children}};function IA({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var lf=R;function RA(){let[e,t]=K(null);return le(()=>{bt().then(n=>{t(n)})},[]),e}function df(){let[e,t,n,r,a]=$e(),i=RA(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!wo()&&d(f,{}),d(m,{config:i})]})});function c(){let h=b=>{b.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(x=>{lf.error("clean local config error",x)}),Ra().catch(x=>{lf.error("clean buildin config error",x)}),ti().catch(x=>{lf.error("clean cache error",x)}),ut(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},T=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=w=>{let L=w.target,M=new FileReader;M.onload=function(){try{let C=JSON.parse(M.result);y(C),ut(o("successImportConfig"))}catch(C){an(`Invalid JSON ${C.message}`)}},M.readAsText(L.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:T,href:"#",role:"button",children:[zA,o("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),wo()){let x=Le();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(x,"immersive-translate-config-"+os()+".txt")}},role:"button",children:[NA,o("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:o("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:o("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function f(){let[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(!1),[L,M]=K("");le(()=>{if(eu()&&n){let P=localStorage.getItem(tu);if(localStorage.removeItem(tu),P){let O=globalThis.localStorage.getItem(yp);R.debug("import_export","rawAuthInfoStr",O);let z={},q={},I="";if(O){globalThis.localStorage.removeItem(yp);try{z=JSON.parse(O),q=z.state||{},I=z.access_token||""}catch(k){R.error("parse state error",k)}}if(I&&q&&(Ha.setAuthInfo({access_token:I}),R.debug("import_export","Google OAuth:",z),z)){let k=z.state;R.debug("state",k),k?.mode==="auto"?(b(!0),N(I)):(w(!0),D(I))}}}},[n]);function C(){b(!0),tm({source:globalThis.location.href,mode:"auto"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&N(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function v(){w(!0),y(!1),tm({source:globalThis.location.href,mode:"manual"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&D(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function A(){M(""),C()}function D(P){M(P),w(!1),y(!0)}function S(P){b(!1),w(!1),y(!1),t({...e,autoSync:!1}),R.error("import_export","Google OAuth error:"+P),an(o("authFail"))}function N(P){b(!0),R.debug("sync latest with drive",P,e),M(P),em(P,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?ut(o("successSyncConfig")):ut(o("successSyncButNoChange"))},O=>an(o("syncFail")+O)).finally(()=>{b(!1)})}function F(P){t({...e,autoSync:P.checked}),P.checked&&C()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:o("syncToCloud")}),d("h6",{class:"!text-sm",children:o("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),C()},"aria-busy":T,href:"#",role:"button",children:[T?d(xe,{}):jv,o("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:P=>{P.preventDefault(),v()},class:"secondary text-sm",children:o("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&o("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(uf,{onClose:()=>y(!1),authExpire:A,accessToken:L}):null]})}function m({config:h}){let y=Wv(),[T,b]=K(!1),[x,w]=K(""),[L,M]=K(""),[C,v]=K(null),{t:A}=W();if(!y||!y.token)return null;let D=Qt(y);async function S(){try{if(T)return;b(!0),M("");let P=await v0(y?.token,e,a),O="";switch(P){case"upload":{O=A("successSyncConfigToAccount");break}case"override":{O=A("successSyncConfigInAccount");break}default:O=A("syncConfigNoUpdate")}w(O)}catch(P){w(""),M(P.message)}finally{b(!1)}}let N=P=>{l({...u,proAutoSync:P})},F=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:A("syncToAccount")}),d("h6",{class:"!text-sm",children:A("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{N(!F)},checked:F}),A("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),S()},"aria-busy":T,href:"#",role:"button",children:[jv," ",A("syncToAccountButton")]}),L?d("p",{class:"text-xs text-red-500",children:L}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&A("lastSyncedAt",{date:ly(u.accountLastSyncedAt)})})]})}}async function v0(e,t,n){try{if(t===null)return"noupdate";let r=await Wt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await cf(e,t),await Kt(r),"upload"}let a=await Kv(e);r.accountLastSyncedAt=Date.now(),R.debug("settings",t),R.debug("local settings.updatedAt",t.updatedAt),R.debug("remote settings.updatedAt",a.updatedAt),R.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&t.updatedAt>a.updatedAt&&(i=!0),R.debug("isUpload",i),i)return await cf(e,t),await Kt(r),"upload";let o=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(o=!0),!o&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||OA(n)&&v0(n.token,e,t).then(i=>{R.debug("syncUserSetting result",i)})},[e,n])}function OA(e){return Qt(e)?!0:new Date(e.createTime){it.get(ht,null).then(n=>{t(n)})},[t]),e}function Kv(e){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function cf(e,t){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var jv=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),zA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),NA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});p();var UA=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Gv=UA;p();var gf="Arial",pf=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===gf.toLowerCase()?!0:Vv(gf,t).join("")!==Vv(e,t).join("")}catch{return!1}};function Vv(e,t){let n=t.length*12,r=20,a=new Date().getTime(),i=document.createElement("canvas"),o=i.getContext("2d");if(!o)return[];i.width=n,i.height=r,o.textAlign="center",o.fillStyle="black",o.textBaseline="middle",o.clearRect(0,0,n,r),o.font="12px "+e+", "+gf,o.fillText(t,n/2,r/2);let s=o.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}p();p();function mf(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:i,onChange:o}=e,s=t(i.descriptionKey,{1:i.descriptionLink1,2:i.descriptionLink2});return!r&&i.descriptionKeyForNormal&&(s=t(i.descriptionKeyForNormal,{1:i.descriptionLink1,2:i.descriptionLink2})),(!n||da(n))&&!r&&i.name=="pro"?null:d("label",{class:"pro-radio-label",for:i.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:i.name,name:i.name,value:i.name,onClick:o,checked:i.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(i.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function ni({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:i}=W(),o=Ge(),[s,u]=K(!1),[l,c]=K(""),[g,f]=K(""),[m,h]=K(null),[y,T]=K(null),[b,x,w,L,M]=Me(we),C=B=>{x(H=>{let j={...H,[n]:B};return n==="translationService"&&(j.translationServiceChangedbyUserAt=new Date().toISOString()),j})},v=t&&Mi(t,n)||[],A=ze(()=>{if(e&&t){let{translationServices:B}=e,H=t[n],j=B?.[H];return j?{...j}:{}}return null},[e,t]),D=ze(()=>{if(e&&t){let B=t[n];if(nr[B])return _o(n,B,t)}return null},[e,t]);if(le(()=>{it.get(ht,null).then(B=>{B?(h(B),T(Qt(B))):T(!1)}).catch(B=>{T(!1)})},[]),y===null)return null;let S=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:r||i("service"),description:a||i("select translation service")}),d(F,{})]}),d(P,{}),d(O,{}),S&&d("article",{children:[d(z,{}),d(q,{}),d(I,{}),d(N,{}),k(),_()]})]});function N(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:i("geminiWarning")}):null}function F(){return d("select",{class:"select",onChange:B=>{B.preventDefault(),c(""),f(""),C(B.target.value)},children:v.map((B,H)=>d("option",{value:B.id,selected:B.id===t?.config?.[n],children:`${i("translationServices."+B.id)}${B.ok?"":" "+(!y&&!o&&B.providers&&B.providers.length>0?i("needLoginAction"):i("needActionForOptions"))}`},"service-item="+H))})}function P(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!A||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:i("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async B=>{B.preventDefault();try{c(""),f(""),u(!0),await xn(500);let H=D.class;H&&H.clearState&&await H.clearState(),await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),f("verified")}catch(H){let j=H.message;try{j=H?.uiConfig?.(t)?.errMsg||H.message}catch{}c(j)}finally{u(!1)}},children:i("verifyService")})]})}function z(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:i("chooseProviderLabel")}),D.providers.map((B,H)=>d(mf,{userConfig:e,isProUser:!!y,provider:B,currentProvider:D.currentProvider,onChange:j=>{j.preventDefault();let V=j.target.value;V&&x(ie=>{let te=ie.translationServices||{},J=te[D.id]||{};return{...ie,translationServices:{...te,[D.id]:{...J,provider:V}}}})}}))]}):null}function q(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:rt.sanitize(i(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function I(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:i(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:i("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:i("KeyAndConfigurationTutorial")})]})}function k(){return!A||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((B,H)=>d("div",{class:"mt-2",children:d(is,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:B,value:A[B.name],onChange:j=>{x(G=>{let V=G.translationServices||{},ie=V[D.id]||{};return{...G,translationServices:{...V,[D.id]:{...ie,[B.name]:j}}}})},onFinish:()=>{ut(i("saved"))}},B.name+D.id)},"service-item-prop-"+B.name+H))})}function _(){return!A||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[i("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((B,H)=>{let j=A[B.name];return B.name==="apiUrl"&&D?.id==="openai"&&A?.APIKEY?.startsWith("immersiveopenai_")&&(B={...B,disabled:!0},j="https://openai-api.immersivetranslate.com/v1/chat/completions"),B.name=="placeholderDelimiters"&&(B.default=A.placeholderDelimiters||B.default),d("div",{class:"mt-2",children:d(is,{config:e,service:D?.id,field:B,value:j,onChange:G=>{x(V=>{let ie=V.translationServices||{},te=ie[D.id]||{};return{...V,translationServices:{...ie,[D.id]:{...te,[B.name]:G}}}})},onFinish:()=>{ut(i("saved"))}},B.name+D.id)},"service-item-optional-prop-"+B.name+H)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:B=>{B.preventDefault(),window.confirm(i("confirmResetToDefaultSettings"))&&(x(j=>{let G=j.translationServices||{};return{...j,translationServices:{...G,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:i("resetToDefaultSettings")})]})})}}var qA=Object.keys(Uo),Yv=Nc();function S0(){let e=$e(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o);Ct(t,n);let[u,l]=qv();return le(()=>()=>{Ut.unbind("esc")},[]),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d(jA,{}),d(QA,{config:o}),d(KA,{config:o}),d(ni,{config:o,ctx:s,serviceType:"translationService"}),d(HA,{config:o}),d(GA,{config:o}),d(VA,{config:o}),d($A,{config:o}),d(YA,{config:o}),d(WA,{config:o,ctx:s}),d(Gv,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function jA(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=s=>{s.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(u=>{R.error("clean local config error",u)}),Ra().catch(u=>{R.error("clean buildin config error",u)}),ti().catch(u=>{R.error("clean cache error",u)}),ut(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:i("general")}),d("a",{class:"text-sm",href:"#",onClick:o,children:i("reset")})]})}function HA({config:e}){let[t,n,r,a,i]=Me(we),{t:o,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(Ae,{title:o("interface language"),description:o("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),pe()||setTimeout(()=>{jc()},200)},children:qA.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Zt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function WA({config:e,ctx:t}){let{t:n}=W(),[r,a]=K(0),[i,o]=K(""),[s,u]=K(!1),l=$e(),c=(w,L,M)=>{u(!s),h(C=>{let v=C.translationThemePatterns||{},A=v[L]||{},D=A.matches||[],S=[...D];return M==="edit"&&(S=Ht(i,D)),S=zn(w,S),{...C,translationThemePatterns:{...v,[L]:{...A,matches:S}}}})},g=(w,L)=>{h(M=>{let C=M.translationThemePatterns||{},v=C[L]||{},D=[...v.matches||[]];return w.forEach(S=>{D=Ht(S,D)}),{...M,translationThemePatterns:{...C,[L]:{...v,matches:D}}}})},f=(w,L,M)=>{u(!s),o(w),a(M)},[m,h,y,T,b]=l,x=w=>{h(L=>{let M={matches:[],excludeMatches:[]};return L&&L.translationThemePatterns&&L.translationThemePatterns[w]&&(M=L.translationThemePatterns[w]),Ui(document,w,M,L.selectTranslationFont),{...L,translationTheme:w}})};return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:w=>{x(w.target.value)},children:xp.map((w,L)=>d("option",{value:w,selected:w===e.translationTheme,children:n(`translationTheme.${w}`)},"theme"+L))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:jo(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ho(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&hf(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[hf(e.translationTheme).map((w,L)=>{w.label=n(`customThemeLabel.${w.name}`);let M=e.translationThemePatterns||{},C=e.translationTheme,v=M[C]||{},A=`theme-${C}-${w.name}`,D=Oy(A)||void 0,S=v[w.name]||D;return d(is,{config:e,field:w,value:S,onChange:N=>{h(F=>{let P=F.translationThemePatterns||{},z={...P[e.translationTheme]||{},[w.name]:N},q={...F,translationThemePatterns:{...P,[e.translationTheme]:z}};return Ui(document,e.translationTheme,z,F.selectTranslationFont),q})}},"theme-prop"+L)}),d("a",{href:"#",class:"text-sm secondary",onClick:w=>{w.preventDefault(),h(L=>{let M=L.translationThemePatterns||{},C={...M[e.translationTheme]};hf(e.translationTheme).forEach(A=>{delete C[A.name]});let v={...L,translationThemePatterns:{...M,[e.translationTheme]:C}};return Ui(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(nk,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),xp.map((w,L)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:w,checked:w===e.translationTheme,onChange:M=>{x(M.target.value)}}),n(`translationTheme.${w}`)]})}),d("p",{children:d("font",{class:jo(w,!1,[],!1).join(" "),children:d("font",{class:Ho(w).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+L))]})]})}),d("div",{class:"nav",children:[d(Ae,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:w=>{w.preventDefault(),u(!s)},children:n("add")})})]}),s?d(ma,{toggleModal:w=>{w.preventDefault(),u(!s)},onAddInterfaceUrl:(w,L)=>{c(w,e.translationTheme,L)},urlValue:i,index:r}):null,d(ei,{urls:tk(e),type:"matches",onDeleteUrl:w=>{g(w,e.translationTheme)},onEditUrl:f})]})}function KA({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("target"),description:o("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Zt(l,e?.interfaceLanguage)},"language"+c))})]})}function GA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(Nu,{title:t("always languages"),description:t("always translate the following languages"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function VA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(Nu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function $A({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];if(f==="edit"){if(!b[c])return m;b[c]=l}return b=zn(l,b),x=Ht(l,T),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await Wt();for(let f of l){let m=f,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==m),T=!1;y.length!==h.length&&(T=!0),T&&Kt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let f=g.translationUrlPattern,m=[];f&&f.matches&&(m=f.matches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Uu,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function YA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];return f==="edit"&&(x[c]=l),b=Ht(l,y),x=zn(l,x),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let f=g.translationUrlPattern,m=[];f&&f.excludeMatches&&(m=f.excludeMatches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Uu,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Qv(e){return{handleTranslationLanguagePatternSelected:qe((n,r)=>{if(!n){e(o=>{let s={...o.translationLanguagePattern};return{...o,translationLanguagePattern:{...o.translationLanguagePattern,matches:Ht(r,s.matches),excludeMatches:Ht(r,s.excludeMatches)}}});return}let a=n,i=a==="matches"?"excludeMatches":"matches";r&&e(o=>{let s={...o.translationLanguagePattern};return s[a]=zn(r,s[a]),s[i]=Ht(r,s[i]),{...o,translationLanguagePattern:{...o.translationLanguagePattern,...s}}})},[e])}}var ff=0,yf;async function Zv(e){if(ff>60*10)return null;ff++,it.refresh(),await xn(300);let t=await it.get(ht,null);R.debug("loopCheckUser",ff,t),t?(clearTimeout(yf),e(t)):yf=setTimeout(Zv.bind(null,e),1500)}function $v(e){let{user:t,lang:n}=e,r=Ge(),a=t&&t.email==="test@immersivetranslate.com",{t:i}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let o=t,s=o.subscription,u=ek(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",f="";if(g){let m="";s.isTrial&&(m=i("autoRenewTrialSuffix")),f=i("currentPlanDescriptionForContinuous",{plan:`${i(l)}${m}`,endAt:u})}else c?f=i("currentPlanDescriptionForOneTime",{plan:i(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):F1(o)?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):f=i("currentPlanDescriptionForAutoRenewCaceling",{plan:i(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:f}})}else return d("span",{class:"info-subtitle",children:r||a?"":i("currentPlanDescriptionForFree")})}function QA({config:e}){let{t}=W(),n=Ge(),[r,a]=K(null),i=!!e.showSponsorOnSafari,[o,s,u,l,c]=Me(we),g=e.interfaceLanguage;le(()=>(it.get(ht,null).then(y=>{y&&(a(y),ZA(y.token).then(T=>{let b=T.data;b.token=y.token,it.set(ht,b),a(b)}).catch(T=>{hu(T),a(null)}))}),()=>{clearTimeout(yf)}),[]);let f=qe(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&JA(r.token).finally(async()=>{await it.remove(ht),await xn(200),await it.refresh(),a(null)})},[r]),m=qe(async y=>{y&&y.preventDefault&&y.preventDefault(),XA(Sc),await it.set(uu,!0),Zv(T=>{v0(T.token,o,s),a(T),Tf?.close(),window.location.reload()})},[a]),h=r?.avatar||Ov;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?da(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d($v,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&i===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${Fa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:qu})]}),d("div",{class:"",children:d("a",{href:`${Li}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:qu})]}),d($v,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Li,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]}):da(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:m,children:t(n?"loginForSafari":"login")})]})}var Jv=Pi;function ZA(e){return de({responseType:"json",url:Jv+"/v1/user",method:"get",headers:{token:e}})}function JA(e){return de({responseType:"json",url:Jv+"/v1/user/logout",method:"delete",headers:{token:e}})}var Tf=null;function XA(e){let r=screen.width/2-230,a=screen.height/2-640/2;return Tf=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),Tf}function ek(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function hf(e){let t=[];return su[e]&&(t=t.concat(su[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function tk(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var bf="";function nk({config:e}){let{t}=W(),[n,r]=K(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(rk,{config:e,isOpen:n})]})}function rk({config:e,isOpen:t}){let{t:n}=W(),[r,a]=K([]),[i,o]=K(!1);le(()=>{if(!t||r.length)return;let m=e.translationFonts.filter(y=>pf(y,n("sampleTargetText").charAt(0)+"a"));m.length&&m.unshift("none");let h=e.selectTranslationFont&&!m.find(y=>y===e.selectTranslationFont);(!m.length||h)&&o(!0),a(m)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Me(we),f=m=>{m!==bf&&!pf(m,n("sampleTargetText").charAt(0)+"a")&&an(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,T={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(T=h.translationThemePatterns[y]),Ui(document,y,T,m),{...h,selectTranslationFont:m}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{o(!i),i&&(r.find(h=>h===e.selectTranslationFont)||f(bf))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:i}),n("translationFont.custom")]}):null,i?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:m=>f(m.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:m=>{f(m.target.value)},children:r.map((m,h)=>{let y=n(`font.${m}`);y.startsWith("font.")&&(y=m);let T=m=="none"?bf:m;return d("option",{value:T,selected:m===e?.selectTranslationFont,children:y},"locale"+h)})})]})}p();var Ln={};vc.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function vf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=K(null),{t:u}=W();if(le(()=>{bt().then(c=>{yn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!o)return d("div",{children:"loading"});let l=o.config;return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(ak,{config:l}),d(ik,{config:l}),d(ok,{config:l}),d(ni,{config:l,ctx:o,serviceType:"inputTranslationService"}),d(sk,{config:l}),d(uk,{config:l}),d(ck,{config:l}),d(lk,{config:l})]})})}function ak({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[o("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?o("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):o("enableInputTranslationDescription",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function ik({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?o("inputTargetLanguageDescriptionForNoneKey"):o("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Zt(l,e.interfaceLanguage)},"language"+c))})]})}function ok({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function sk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(Ae,{title:o("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?o("inputStartingTriggerKeyDescriptionForNoneKey"):o("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}):null}function uk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTrailingTriggerKeyTitle"),description:o("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:o("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function lk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),[s,u]=K(!1),l=b=>{u(!s)},[c,g]=K(0),[f,m]=K(""),h=(b,x,w,L)=>{l(w),n(M=>{let C=M.inputTranslationUrlPattern,v=[],A=[];C&&C.matches&&C.excludeMatches&&(v=C.matches,A=C.excludeMatches);let D=[...v],S=[...A];return L==="edit"&&(w==="matches"?D[x]=b:S[x]=b),w==="matches"?(D=zn(b,D),S=Ht(b,A)):(D=Ht(b,v),S=zn(b,S)),{...M,inputTranslationUrlPattern:{...M.inputTranslationUrlPattern,matches:D,excludeMatches:S}}})},y=(b,x)=>{n(w=>{let L=w.inputTranslationUrlPattern,M=[];x==="matches"?L&&L.matches&&(M=L.matches):L&&L.excludeMatches&&(M=L.excludeMatches);let C=[...M];return b.forEach(v=>{C=Ht(v,C)}),{...w,inputTranslationUrlPattern:{...w.inputTranslationUrlPattern,[x]:C}}})},T=(b,x,w)=>{l(x),m(b),g(w)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTranslationBlockUrlsTitle"),description:o("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:o("add")})}),s?d(ma,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:f,index:c}):null]}),d(ei,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:T})]}):null}function ck({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=()=>st().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>st().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(Ae,{title:o("inputTrailingTriggerKeyTimeout"),description:o("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}p();function Sf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),{t:s}=W(),[u,l]=K({}),[c,g]=K({});return le(()=>{Z.storage.sync.get(null).then(f=>{l(f),Z.storage.local.get(null).then(m=>{g(m)})})},[t]),!o||!t?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(fk,{}),d(mk,{}),d(hk,{}),d(dk,{}),d(gk,{}),d(pk,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(o,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function dk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let f=JSON.parse(c);if(!Array.isArray(f)){an("Invalid rules, rules must be an array");return}g.rules=f}t(()=>g),ut(i("saved"))}catch(c){an(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(i("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),ut(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:o,placeholder:`[{ + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],f=c[0].detectedLanguage;return{text:g.text,from:nv.get(f.language),to:nv.get(g.to)}}p();p();p();p();p();function Qa(e){return e!=null}function cv(e,t,n){return`${e.type}#${t}#${n}`}function dv(e,t,n,r,a){return{body:a,id:r,type:cv(e,t,n)}}function pA(e,t,n,r){return{id:n,response:r,type:cv(e,"ask",t)}}function gv(e,t,n,r){if(Qa(r)){let a=r.type;if(Qa(a)&&Qa(r.body)){let[i,o,s]=a.split("#");return i===e.type&&o===t&&s===n}else return!1}else return!1}function mA(e,t,n){if(Qa(n)){let r=n.type;if(Qa(r)&&Qa(n.response)){let[a,i,o]=r.split("#");return a===e.type&&i==="ask"&&o===t}else return!1}else return!1}function fA(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function hA(e,t,n,r){return new Promise(a=>{let i=o=>{let s=o.data;mA(t,n,s)&&s.id===r&&(e.removeEventListener("message",i),a(s.response))};e.addEventListener("message",i)})}function bA(e,t,n,r){let a=i=>{let o=i.data;gv(t,"tell",n,o)&&r(o.body)};return e.addEventListener("message",a),[e,a]}function uv(e,t,n,r,a,i){let o=async s=>{let u=s.data;if(gv(n,"ask",r,u)){let l=await i(u.body);t=s.source,t.postMessage(pA(n,r,u.id,l),s.origin)}};return e.addEventListener("message",o),[e,o]}function yA(e,t,n,r,a){let i=Math.random().toString();return e.postMessage(dv(t,"tell",n,i,r),a)}async function lv(e,t,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),f=await hA(e,n,r,s);clearTimeout(g),l(f)});return t.postMessage(dv(n,"ask",r,s,a),i),u}var Za=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;uv(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let i=n.contentWindow;if(Qa(i))return new e(t,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await lv(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(bA(this.thisWindow,this.protocol,t,n))}tell(t,n){yA(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(uv(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return lv(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){fA(this.listeners)}};var pv;async function mv(){if(st()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=Za.iframe(Tc,"*",{targetWindow:t});pv=n,await Za.connect(n).catch(r=>{R.error("connect with parent frame error",r)})}}function fv(){return pv}var m0=new Map;async function jm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=Gn(e.body)),m0.has(t))return m0.get(t);let n=de(e);m0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{m0.delete(t)},3e3)}}async function hv(e){return jm(e)}async function f0(e){if(st()){let n=fv();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw R.error("can not comunicate with root frame, use strict limiter",r),r}else return jm(e)}else return jm(e)}p();function bv(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:e,accessTokenExpiresAt:o.toISOString()}}p();async function h0(e){await Bp(e)}async function b0(e,t){let n=await _p(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return yv(e,t)}return yv(e,t)}async function yv(e,t){let n=await t(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Mp(e,n,i-1e3),n}var TA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Hm=new Map(TA),Ou=class extends Pe{static langMap=Hm;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await h0(fp)}async translate(t){let{text:n,from:r,to:a}=t;return n?await sv(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await b0(fp,async()=>{let t=await f0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return bv(t)})}async translateList(t){let{from:n,to:r,text:a}=t,i=Hm.get(n)||"auto",o=Hm.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let f of a)u.push({Text:f});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(f=>f.translations[0]?.text||""),from:n,to:r};throw new Q("Microsoft translate error "+JSON.stringify(g))}};p();var Tv=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Wm=new Map(Tv),vA=new Map(Tv.map(([e,t])=>[t,e])),Km=class extends Pe{static langMap=Wm;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new Q("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=t,l=Gn(a+o+n+i);this.domain&&(l=Gn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Wm.get(s)||"auto",to:Wm.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let f=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(f.error_code)throw new Q("API_SERVER_ERROR",f.error_msg);let{trans_result:m,from:h}=f,y=m.map(({dst:b})=>b);return{from:vA.get(h)||h,to:u,text:y.join(` +`)}}},vv=Km;p();p();var Wi=class extends Pe{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new Q("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new Q(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Lc(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,f)=>{let[m,h]=f.split(":"),y=o[m];return h==="random"?SA(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(t){return pa.detectLanguageRemotelyByTransmart(t)}};function SA(e){let t=Math.floor(Math.random()*e.length);return e[t]}var Sv=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Gm=class extends Wi{static langMap=new Map(Sv);constructor(t,n,r){if(!t?.token)throw new Q("token are required");super({...t,isSupportList:!0,langs:Sv,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},Cv=Gm;p();var CA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],y0=new Map(CA),Vm=class extends Pe{static langMap=y0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!y0.get(a))throw new Q(`Unsupported language: ${a}`);if(r==="auto")throw new Q("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${y0.get(r)||"auto"}2${y0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},xv=Vm;p();var Ev=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],$m=new Map(Ev),xA=new Map(Ev.map(([e,t])=>[t,e]));function EA(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var Ym=class extends Pe{static langMap=$m;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new Q("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i=wA(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+EA(n)+i+o+this.appSecret,u=await Cr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:$m.get(r)||"auto",to:$m.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),f=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!f.translation)throw new Q(JSON.stringify(f));let m=f.l,[h,y]=m.split("2");return{text:f.translation.join(` +`),from:xA.get(h),to:a}}};function wA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Zm=class extends Pe{static langMap=Qm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,i={q:n,from:Qm.get(r)||"auto",to:Qm.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new Q("Youdao translation failed: "+JSON.stringify(s))}},Av=Zm;p();var zu=class extends Wi{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||su,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};p();var kv="immersive-translate-gemini-fake-user-key",DA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],Pv=new Map(DA),Jm=class extends es{static langMap=Pv;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return Pv}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Lp(kv,""),this.fakeId||(this.fakeId=AA(10),await Fp(kv,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+t;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let i=super.filterContent(t,n,r);return i.includes(this.fakeId)&&a.length<=1?t:i}};function AA(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await f0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":ef.get(r)+"-"}${ef.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var LA={mock:Zo,mock2:Zo,custom:zu,google:Hi,transmart:_u,deepl:UT,volc:XT,volcAlpha:Iu,bing:Ou,tencent:Pu,tenAlpha:Lu,baidu:vv,caiyun:Cv,cai:xv,openl:d0,youdao:wv,you:Av,d:Qo,dpro:Qo,deeplx:Ru,niu:qT,azure:jT,openai:$T,gemini:Lv,claude:Mv,papago:HT,aliyun:Bu,yandex:Nu},Ja={};Object.keys(nr).forEach(e=>{Ja[e]={...nr[e],class:LA[e]}});function Xa(e,t){let n=Rn;if(Ja[e]&&Ja[e].class&&Ja[e].class.langMap&&Ja[e].class.langMap.size>0){let r=Ja[e].class.langMap,a=n.filter(i=>r.get(i));return a.includes(t)||a.unshift("placeholder"),a}else return Rn}async function Nr(e,t,n){if(!e.text)return e;let r=null,a=await nt({sentences:[e]},t,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new Q("translateFailed","translate failed")}async function Fv(e,t){for(let n of e)try{return await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function tf(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,i=n,o=a[i]||{},s=Qt(e.user);await new Ja[i].class(o,r,{translationService:i,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _A(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function nt(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:i,state:o}=t,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=KT(g,{sourceLanguage:_A(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let f=a.beta,m=o.cache===!1&&f,h=a.debug===!0&&f;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(m&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],T={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,w=Qt(t.user),L;try{L=new Ja[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await L.init()}catch(v){if(n){y.push(...e.sentences);let A={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let S=v instanceof Q?new Q(v.name,v.message).initNetWork(v.status).initData(v.data||A):v;n(S,null,D)}}return{sentences:[]}}if(o.cache)for(let v of e.sentences){x++;let A=l;l==="openl"&&(A=l+"-"+g.codename||d0.DEFAULT_CODENAME);let D=L.getCacheKeyPrefix();D&&(A=D+"-"+A);let S=null;try{S=await Cl(pT({originalText:v.text,from:v.from,to:v.to,service:A}),200)}catch(N){R.warn("query cache DB error, but it's ok",N)}if(S){let N={...v,text:S.translatedText};T.sentences[x]=N,n&&n(null,N,v)}else y.push(v)}else y.push(...e.sentences);let M=y.length;if(b-M>0&&R.debug(`use ${b-M} sentences from cache`),!y.length)return T;let C=await L.multipleTranslate({sentences:y},g,(v,A,D)=>{if(n&&n(v,A,D),!v&&A&&!l.startsWith("mock")&&o.cache){let S=l;l==="openl"&&(S=l+"-"+g.codename||d0.DEFAULT_CODENAME);let N=L.getCacheKeyPrefix();N&&(S=N+"-"+S),o.cache&&Cl(mT({translatedText:A.text,from:D.from,to:D.to,detectedFrom:A.from,key:Gn(D.text),service:S}),3e3).catch(F=>{R.warn("set cache DB error",F)})}});for(let v of C?.sentences||[]){let A=T.sentences.findIndex(D=>!D);if(A===-1)throw new Q("translateFailed","can not match the result");T.sentences[A]=v}return T}p();p();p();var rs={},MA={root:"",lang:"en",fallbackLang:"en"};function nf(e,t){let n=Object.assign({},MA,e);rs=t||rs;let[r,a]=K(n.lang),[i,o]=K(rs),[s,u]=K(!1),l=g=>{if(i.hasOwnProperty(g))return;u(!1);let f=H1(n.root||"",g);n.getUrl&&(f=n.getUrl(n.root||"",g),fetch(f).then(m=>m.json()).then(m=>{rs[g]=m,o({...rs}),u(!0)}).catch(m=>{o({...rs}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,f)=>{if(!i.hasOwnProperty(r))return g;let m=pu(i,r,g);return m===g&&r!==n.fallbackLang&&(m=pu(i,n.fallbackLang,g)),Op(m,f)},isReady:s}}var af=oo(null),rf={root:"assets",lang:"en",fallbackLang:"en"},as=e=>{let{t,setLang:n,lang:r,isReady:a}=nf({root:e.root||rf.root,lang:e.lang||rf.lang,fallbackLang:e.fallbackLang||rf.fallbackLang,getUrl:e.getUrl},e.translations);return d(af.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Me(af)}p();function Ae(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}p();p();function Ur(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:i}=W();return n=n||(i==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((o,s)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function of(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:i=>{e.onChange(i.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(i=>i.selected)?.value,onChange:i=>{let o=i.target.value,s=t.find(u=>u.value===o);s&&s.onSelected(s)},children:t.map((i,o)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+o))})}p();function Ki(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=K(e.value),{config:i,field:o,onFinish:s}=e,u=o.name;o.label&&(u=o.label),o.labelKey&&(u=t(o.labelKey));let l={},c={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(c=i.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let f=0;f{let f=g.target.value,m=Array.isArray(r)?f.split(","):f;a(m),e.onChange(m)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function is(e){let{t}=W(),[n,r]=K(!0),[a,i]=K(!1),{config:o,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:f}=e;g=g??(l.default||"");let m={},h={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(h=o.translationServices[e.service]),h.env){let T=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||i(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(of,{maxWidth:200,items:l.options.map(T=>({label:`${T.label?t(T.label):T.value}`,value:T.value,selected:g===T.value,onSelected:()=>{c(T.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let T=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(of,{maxWidth:250,items:T.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(T[0]),i(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Ki,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Ki,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Ki,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Ki,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let T=g,b="";T||(T="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:w}=FA(T);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:L=>{c(L.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:w},onInput:L=>{c(L.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:T=>{c(T.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,m)}}):null]})}):null}}function FA(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}p();function Bv(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let i=Zt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),i]})},"language-"+a)})})]})}function Uu(e){let{selectLanguages:t,languages:n}=e,r=ze(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d(Bv,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,i)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Zt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:o=>{o.preventDefault(),e.onChange(!1,t[i])}})]},"lang-"+i))})]}):null}p();p();function ma(e){let{t}=W(),n=$e(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:i=>{i.target&&i.target.id==="immersive-translate-overlay"&&r(i)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:i=>{if(i.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function ei(e){let{t}=W(),[n,r]=K([]),[a,i]=K(!1),[o,s]=K(!1);function u(){e.onDeleteUrl(n,e.type),r([]),i(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,f)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[o&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:m=>{m.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:m=>{e.onEditUrl(g,e.type,f)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:m=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+f))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:o?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let m=g.target.checked;r(m?e.urls:[]),i(m)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function qu(e){let{t}=W(),[n,r]=K(!1),[a,i]=K(""),[o,s]=K(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,f)=>{r(!n),i(c),s(f)},l=(c,g,f,m)=>{e.onSubmitAddUrl?.(c,g,f,m),r(!n),i(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(ma,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:o}):null]}),d(ei,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}p();async function ti(){let e=["bingGlobalConfig","baiduGlobalConfig",Mb,_a];for(let t of e)await Z.storage.local.remove(t);pe()||await Ry(),await Ip()}function Iv(){return pe()?Promise.resolve("0 B"):om()}p();var T0='',ju="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Rv="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",zv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",Nv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Uv="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";p();p();function os(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}p();function BA(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[i,o]=K(!1);function s(u,l){u.preventDefault(),o(!0),new zr(n).delete(l).catch(c=>{on(t("delete"))}).then(()=>a()).finally(()=>o(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":i,children:t("delete")})}function sf(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[i,o,s,u]=Ye(),[l,c]=K([]),[g,f]=K(!0),[m,h]=K(!1),[y,T]=K({});le(()=>{n&&x().then(()=>f(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new zr(n).listAll().then(A=>{c(A)}).catch(A=>r())}function w(v){if(v.preventDefault(),l.length>=10)return on(a("maxBackupFiles",{count:10}));h(!0);let A="immersive-translate-config-"+os()+".json";new zr(n).uploadConfig(i,A).catch(D=>{on(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function L(v,A,D){v.preventDefault(),T({[D]:!0}),new zr(n).getConfig(A).then(S=>{o(()=>({...S})),lt(a("importSuccess"))}).catch(S=>{R.error(S),on(a("importFail"))}).finally(()=>T({}))}function M(v,A){new zr(n).getConfig(v).then(D=>{let S=document.createElement("a");S.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),S.setAttribute("download",A),S.style.display="none",document.body.appendChild(S),S.click(),document.body.removeChild(S)}).catch(D=>{R.error("download google config file failed",D),on(a("downloadFail")+": "+D.message)})}function C(v){v.preventDefault(),o({...i,autoSync:!1}),Ha.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,A)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),M(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",du(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[A],disabled:y[A],onClick:D=>L(D,v.id,A),children:a("import_hint")}),d(BA,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+A))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":m,onClick:w,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:C,disabled:g,children:a("revokeAuth")})]})]})})}p();p();function qr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var we=oo([]);function Jt(e){let[t,n]=K(null);return le(()=>{yt().then(r=>{n(r),R.debug("current config",r)})},[]),le(()=>{yt().then(r=>{n(r)})},[e]),t}function Un(e){let[t,n]=K(null);return le(()=>{e&&yn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function qv(){let[e,t]=K(!1),n=Ir();return le(()=>{pe()&&(!n||n=="0.0.0"||qr(n,"0.9.0")||t(!0))},[n]),[e,t]}function fa(){let[e,t]=K(null);return le(()=>{Wt().then(r=>{t(r)})},[]),[e,r=>{t(r),Kt(r)}]}p();var ct=class extends pi{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(R.error("ErrorBoundary",this.error,this.info),d(IA,{error:this.error,info:this.info})):this.props.children}};function IA({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var uf=R;function RA(){let[e,t]=K(null);return le(()=>{yt().then(n=>{t(n)})},[]),e}function cf(){let[e,t,n,r,a]=Ye(),i=RA(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!wo()&&d(f,{}),d(m,{config:i})]})});function c(){let h=b=>{b.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(x=>{uf.error("clean local config error",x)}),Ra().catch(x=>{uf.error("clean buildin config error",x)}),ti().catch(x=>{uf.error("clean cache error",x)}),lt(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},T=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=w=>{let L=w.target,M=new FileReader;M.onload=function(){try{let C=JSON.parse(M.result);y(C),lt(o("successImportConfig"))}catch(C){on(`Invalid JSON ${C.message}`)}},M.readAsText(L.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:T,href:"#",role:"button",children:[zA,o("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),wo()){let x=Le();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(x,"immersive-translate-config-"+os()+".txt")}},role:"button",children:[NA,o("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:o("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:o("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function f(){let[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(!1),[L,M]=K("");le(()=>{if(tu()&&n){let P=localStorage.getItem(nu);if(localStorage.removeItem(nu),P){let O=globalThis.localStorage.getItem(bp);R.debug("import_export","rawAuthInfoStr",O);let z={},q={},I="";if(O){globalThis.localStorage.removeItem(bp);try{z=JSON.parse(O),q=z.state||{},I=z.access_token||""}catch(k){R.error("parse state error",k)}}if(I&&q&&(Ha.setAuthInfo({access_token:I}),R.debug("import_export","Google OAuth:",z),z)){let k=z.state;R.debug("state",k),k?.mode==="auto"?(b(!0),N(I)):(w(!0),D(I))}}}},[n]);function C(){b(!0),em({source:globalThis.location.href,mode:"auto"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&N(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function v(){w(!0),y(!1),em({source:globalThis.location.href,mode:"manual"},!0).then(P=>{R.debug("import_export","Google OAuth:"+P),P!==null&&D(P)}).catch(P=>{P&&P.message==="tokenValidateErrorRedirectToAuthUrl"?R.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):S(P)})}function A(){M(""),C()}function D(P){M(P),w(!1),y(!0)}function S(P){b(!1),w(!1),y(!1),t({...e,autoSync:!1}),R.error("import_export","Google OAuth error:"+P),on(o("authFail"))}function N(P){b(!0),R.debug("sync latest with drive",P,e),M(P),Xp(P,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?lt(o("successSyncConfig")):lt(o("successSyncButNoChange"))},O=>on(o("syncFail")+O)).finally(()=>{b(!1)})}function F(P){t({...e,autoSync:P.checked}),P.checked&&C()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:o("syncToCloud")}),d("h6",{class:"!text-sm",children:o("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),C()},"aria-busy":T,href:"#",role:"button",children:[T?d(xe,{}):jv,o("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:P=>{P.preventDefault(),v()},class:"secondary text-sm",children:o("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&o("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(sf,{onClose:()=>y(!1),authExpire:A,accessToken:L}):null]})}function m({config:h}){let y=Wv(),[T,b]=K(!1),[x,w]=K(""),[L,M]=K(""),[C,v]=K(null),{t:A}=W();if(!y||!y.token)return null;let D=Qt(y);async function S(){try{if(T)return;b(!0),M("");let P=await v0(y?.token,e,a),O="";switch(P){case"upload":{O=A("successSyncConfigToAccount");break}case"override":{O=A("successSyncConfigInAccount");break}default:O=A("syncConfigNoUpdate")}w(O)}catch(P){w(""),M(P.message)}finally{b(!1)}}let N=P=>{l({...u,proAutoSync:P})},F=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:A("syncToAccount")}),d("h6",{class:"!text-sm",children:A("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{N(!F)},checked:F}),A("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:P=>{P.preventDefault(),S()},"aria-busy":T,href:"#",role:"button",children:[jv," ",A("syncToAccountButton")]}),L?d("p",{class:"text-xs text-red-500",children:L}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&A("lastSyncedAt",{date:ly(u.accountLastSyncedAt)})})]})}}async function v0(e,t,n){try{if(t===null)return"noupdate";let r=await Wt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await lf(e,t),await Kt(r),"upload"}let a=await Kv(e);r.accountLastSyncedAt=Date.now(),R.debug("settings",t),R.debug("local settings.updatedAt",t.updatedAt),R.debug("remote settings.updatedAt",a.updatedAt),R.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&t.updatedAt>a.updatedAt&&(i=!0),R.debug("isUpload",i),i)return await lf(e,t),await Kt(r),"upload";let o=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(o=!0),!o&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||OA(n)&&v0(n.token,e,t).then(i=>{R.debug("syncUserSetting result",i)})},[e,n])}function OA(e){return Qt(e)?!0:new Date(e.createTime){ot.get(bt,null).then(n=>{t(n)})},[t]),e}function Kv(e){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function lf(e,t){return(location.href?.indexOf("popup.html")>0?Tr:de)({responseType:"json",url:Pi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var jv=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),zA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),NA=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});p();var UA=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Gv=UA;p();var df="Arial",gf=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===df.toLowerCase()?!0:Vv(df,t).join("")!==Vv(e,t).join("")}catch{return!1}};function Vv(e,t){let n=t.length*12,r=20,a=new Date().getTime(),i=document.createElement("canvas"),o=i.getContext("2d");if(!o)return[];i.width=n,i.height=r,o.textAlign="center",o.fillStyle="black",o.textBaseline="middle",o.clearRect(0,0,n,r),o.font="12px "+e+", "+df,o.fillText(t,n/2,r/2);let s=o.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}p();p();function pf(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:i,onChange:o}=e,s=t(i.descriptionKey,{1:i.descriptionLink1,2:i.descriptionLink2});return!r&&i.descriptionKeyForNormal&&(s=t(i.descriptionKeyForNormal,{1:i.descriptionLink1,2:i.descriptionLink2})),(!n||da(n))&&!r&&i.name=="pro"?null:d("label",{class:"pro-radio-label",for:i.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:i.name,name:i.name,value:i.name,onClick:o,checked:i.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(i.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function ni({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:i}=W(),o=Ge(),[s,u]=K(!1),[l,c]=K(""),[g,f]=K(""),[m,h]=K(null),[y,T]=K(null),[b,x,w,L,M]=Me(we),C=B=>{x(H=>{let j={...H,[n]:B};return n==="translationService"&&(j.translationServiceChangedbyUserAt=new Date().toISOString()),j})},v=t&&Mi(t,n)||[],A=ze(()=>{if(e&&t){let{translationServices:B}=e,H=t[n],j=B?.[H];return j?{...j}:{}}return null},[e,t]),D=ze(()=>{if(e&&t){let B=t[n];if(nr[B])return _o(n,B,t)}return null},[e,t]);if(le(()=>{ot.get(bt,null).then(B=>{B?(h(B),T(Qt(B))):T(!1)}).catch(B=>{T(!1)})},[]),y===null)return null;let S=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:r||i("service"),description:a||i("select translation service")}),d(F,{})]}),d(P,{}),d(O,{}),S&&d("article",{children:[d(z,{}),d(q,{}),d(I,{}),d(N,{}),k(),_()]})]});function N(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:i("geminiWarning")}):null}function F(){return d("select",{class:"select",onChange:B=>{B.preventDefault(),c(""),f(""),C(B.target.value)},children:v.map((B,H)=>d("option",{value:B.id,selected:B.id===t?.config?.[n],children:`${i("translationServices."+B.id)}${B.ok?"":" "+(!y&&!o&&B.providers&&B.providers.length>0?i("needLoginAction"):i("needActionForOptions"))}`},"service-item="+H))})}function P(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!A||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:i("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async B=>{B.preventDefault();try{c(""),f(""),u(!0),await xn(500);let H=D.class;H&&H.clearState&&await H.clearState(),await Nr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),f("verified")}catch(H){let j=H.message;try{j=H?.uiConfig?.(t)?.errMsg||H.message}catch{}c(j)}finally{u(!1)}},children:i("verifyService")})]})}function z(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:i("chooseProviderLabel")}),D.providers.map((B,H)=>d(pf,{userConfig:e,isProUser:!!y,provider:B,currentProvider:D.currentProvider,onChange:j=>{j.preventDefault();let V=j.target.value;V&&x(ie=>{let te=ie.translationServices||{},J=te[D.id]||{};return{...ie,translationServices:{...te,[D.id]:{...J,provider:V}}}})}}))]}):null}function q(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:at.sanitize(i(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function I(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:i(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:i("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:i("KeyAndConfigurationTutorial")})]})}function k(){return!A||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((B,H)=>d("div",{class:"mt-2",children:d(is,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:B,value:A[B.name],onChange:j=>{x(G=>{let V=G.translationServices||{},ie=V[D.id]||{};return{...G,translationServices:{...V,[D.id]:{...ie,[B.name]:j}}}})},onFinish:()=>{lt(i("saved"))}},B.name+D.id)},"service-item-prop-"+B.name+H))})}function _(){return!A||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[i("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((B,H)=>{let j=A[B.name];return B.name==="apiUrl"&&D?.id==="openai"&&A?.APIKEY?.startsWith("immersiveopenai_")&&(B={...B,disabled:!0},j="https://openai-api.immersivetranslate.com/v1/chat/completions"),B.name=="placeholderDelimiters"&&(B.default=A.placeholderDelimiters||B.default),d("div",{class:"mt-2",children:d(is,{config:e,service:D?.id,field:B,value:j,onChange:G=>{x(V=>{let ie=V.translationServices||{},te=ie[D.id]||{};return{...V,translationServices:{...ie,[D.id]:{...te,[B.name]:G}}}})},onFinish:()=>{lt(i("saved"))}},B.name+D.id)},"service-item-optional-prop-"+B.name+H)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:B=>{B.preventDefault(),window.confirm(i("confirmResetToDefaultSettings"))&&(x(j=>{let G=j.translationServices||{};return{...j,translationServices:{...G,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:i("resetToDefaultSettings")})]})})}}var qA=Object.keys(Uo),Yv=Nc();function S0(){let e=Ye(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o);Ct(t,n);let[u,l]=qv();return le(()=>()=>{Ut.unbind("esc")},[]),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d(jA,{}),d(QA,{config:o}),d(KA,{config:o}),d(ni,{config:o,ctx:s,serviceType:"translationService"}),d(HA,{config:o}),d(GA,{config:o}),d(VA,{config:o}),d($A,{config:o}),d(YA,{config:o}),d(WA,{config:o,ctx:s}),d(Gv,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function jA(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=s=>{s.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...Ri(),updatedAt:new Date().toISOString()}),Oa().catch(u=>{R.error("clean local config error",u)}),Ra().catch(u=>{R.error("clean buildin config error",u)}),ti().catch(u=>{R.error("clean cache error",u)}),lt(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:i("general")}),d("a",{class:"text-sm",href:"#",onClick:o,children:i("reset")})]})}function HA({config:e}){let[t,n,r,a,i]=Me(we),{t:o,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(Ae,{title:o("interface language"),description:o("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),pe()||setTimeout(()=>{jc()},200)},children:qA.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Zt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function WA({config:e,ctx:t}){let{t:n}=W(),[r,a]=K(0),[i,o]=K(""),[s,u]=K(!1),l=Ye(),c=(w,L,M)=>{u(!s),h(C=>{let v=C.translationThemePatterns||{},A=v[L]||{},D=A.matches||[],S=[...D];return M==="edit"&&(S=Ht(i,D)),S=zn(w,S),{...C,translationThemePatterns:{...v,[L]:{...A,matches:S}}}})},g=(w,L)=>{h(M=>{let C=M.translationThemePatterns||{},v=C[L]||{},D=[...v.matches||[]];return w.forEach(S=>{D=Ht(S,D)}),{...M,translationThemePatterns:{...C,[L]:{...v,matches:D}}}})},f=(w,L,M)=>{u(!s),o(w),a(M)},[m,h,y,T,b]=l,x=w=>{h(L=>{let M={matches:[],excludeMatches:[]};return L&&L.translationThemePatterns&&L.translationThemePatterns[w]&&(M=L.translationThemePatterns[w]),Ui(document,w,M,L.selectTranslationFont),{...L,translationTheme:w}})};return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:w=>{x(w.target.value)},children:Cp.map((w,L)=>d("option",{value:w,selected:w===e.translationTheme,children:n(`translationTheme.${w}`)},"theme"+L))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:jo(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ho(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&ff(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[ff(e.translationTheme).map((w,L)=>{w.label=n(`customThemeLabel.${w.name}`);let M=e.translationThemePatterns||{},C=e.translationTheme,v=M[C]||{},A=`theme-${C}-${w.name}`,D=Oy(A)||void 0,S=v[w.name]||D;return d(is,{config:e,field:w,value:S,onChange:N=>{h(F=>{let P=F.translationThemePatterns||{},z={...P[e.translationTheme]||{},[w.name]:N},q={...F,translationThemePatterns:{...P,[e.translationTheme]:z}};return Ui(document,e.translationTheme,z,F.selectTranslationFont),q})}},"theme-prop"+L)}),d("a",{href:"#",class:"text-sm secondary",onClick:w=>{w.preventDefault(),h(L=>{let M=L.translationThemePatterns||{},C={...M[e.translationTheme]};ff(e.translationTheme).forEach(A=>{delete C[A.name]});let v={...L,translationThemePatterns:{...M,[e.translationTheme]:C}};return Ui(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(nk,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),Cp.map((w,L)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:w,checked:w===e.translationTheme,onChange:M=>{x(M.target.value)}}),n(`translationTheme.${w}`)]})}),d("p",{children:d("font",{class:jo(w,!1,[],!1).join(" "),children:d("font",{class:Ho(w).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+L))]})]})}),d("div",{class:"nav",children:[d(Ae,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:w=>{w.preventDefault(),u(!s)},children:n("add")})})]}),s?d(ma,{toggleModal:w=>{w.preventDefault(),u(!s)},onAddInterfaceUrl:(w,L)=>{c(w,e.translationTheme,L)},urlValue:i,index:r}):null,d(ei,{urls:tk(e),type:"matches",onDeleteUrl:w=>{g(w,e.translationTheme)},onEditUrl:f})]})}function KA({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("target"),description:o("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Zt(l,e?.interfaceLanguage)},"language"+c))})]})}function GA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(Uu,{title:t("always languages"),description:t("always translate the following languages"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function VA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),{handleTranslationLanguagePatternSelected:s}=Qv(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(Uu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Yv,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function $A({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];if(f==="edit"){if(!b[c])return m;b[c]=l}return b=zn(l,b),x=Ht(l,T),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await Wt();for(let f of l){let m=f,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==m),T=!1;y.length!==h.length&&(T=!0),T&&Kt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let f=g.translationUrlPattern,m=[];f&&f.matches&&(m=f.matches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(qu,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function YA({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),s=(l,c,g,f)=>{r(m=>{let h=m.translationUrlPattern,y=[],T=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,T=h.excludeMatches);let b=[...y],x=[...T];return f==="edit"&&(x[c]=l),b=Ht(l,y),x=zn(l,x),{...m,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...m.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let f=g.translationUrlPattern,m=[];f&&f.excludeMatches&&(m=f.excludeMatches);let h=[...m];return l.forEach(y=>{h=Ht(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(qu,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Qv(e){return{handleTranslationLanguagePatternSelected:qe((n,r)=>{if(!n){e(o=>{let s={...o.translationLanguagePattern};return{...o,translationLanguagePattern:{...o.translationLanguagePattern,matches:Ht(r,s.matches),excludeMatches:Ht(r,s.excludeMatches)}}});return}let a=n,i=a==="matches"?"excludeMatches":"matches";r&&e(o=>{let s={...o.translationLanguagePattern};return s[a]=zn(r,s[a]),s[i]=Ht(r,s[i]),{...o,translationLanguagePattern:{...o.translationLanguagePattern,...s}}})},[e])}}var mf=0,bf;async function Zv(e){if(mf>60*10)return null;mf++,ot.refresh(),await xn(300);let t=await ot.get(bt,null);R.debug("loopCheckUser",mf,t),t?(clearTimeout(bf),e(t)):bf=setTimeout(Zv.bind(null,e),1500)}function $v(e){let{user:t,lang:n}=e,r=Ge(),a=t&&t.email==="test@immersivetranslate.com",{t:i}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let o=t,s=o.subscription,u=ek(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",f="";if(g){let m="";s.isTrial&&(m=i("autoRenewTrialSuffix")),f=i("currentPlanDescriptionForContinuous",{plan:`${i(l)}${m}`,endAt:u})}else c?f=i("currentPlanDescriptionForOneTime",{plan:i(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):F1(o)?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?f=i("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:i(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):f=i("currentPlanDescriptionForAutoRenewCaceling",{plan:i(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:f}})}else return d("span",{class:"info-subtitle",children:r||a?"":i("currentPlanDescriptionForFree")})}function QA({config:e}){let{t}=W(),n=Ge(),[r,a]=K(null),i=!!e.showSponsorOnSafari,[o,s,u,l,c]=Me(we),g=e.interfaceLanguage;le(()=>(ot.get(bt,null).then(y=>{y&&(a(y),ZA(y.token).then(T=>{let b=T.data;b.token=y.token,ot.set(bt,b),a(b)}).catch(T=>{bu(T),a(null)}))}),()=>{clearTimeout(bf)}),[]);let f=qe(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&JA(r.token).finally(async()=>{await ot.remove(bt),await xn(200),await ot.refresh(),a(null)})},[r]),m=qe(async y=>{y&&y.preventDefault&&y.preventDefault(),XA(Sc),await ot.set(lu,!0),Zv(T=>{v0(T.token,o,s),a(T),yf?.close(),window.location.reload()})},[a]),h=r?.avatar||Ov;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?da(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d($v,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&i===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${Fa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:ju})]}),d("div",{class:"",children:d("a",{href:`${Li}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:ju})]}),d($v,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Li,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:f,children:t("logout")})})]})]}):da(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:m,children:t(n?"loginForSafari":"login")})]})}var Jv=Pi;function ZA(e){return de({responseType:"json",url:Jv+"/v1/user",method:"get",headers:{token:e}})}function JA(e){return de({responseType:"json",url:Jv+"/v1/user/logout",method:"delete",headers:{token:e}})}var yf=null;function XA(e){let r=screen.width/2-230,a=screen.height/2-640/2;return yf=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),yf}function ek(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function ff(e){let t=[];return uu[e]&&(t=t.concat(uu[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function tk(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var hf="";function nk({config:e}){let{t}=W(),[n,r]=K(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(rk,{config:e,isOpen:n})]})}function rk({config:e,isOpen:t}){let{t:n}=W(),[r,a]=K([]),[i,o]=K(!1);le(()=>{if(!t||r.length)return;let m=e.translationFonts.filter(y=>gf(y,n("sampleTargetText").charAt(0)+"a"));m.length&&m.unshift("none");let h=e.selectTranslationFont&&!m.find(y=>y===e.selectTranslationFont);(!m.length||h)&&o(!0),a(m)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Me(we),f=m=>{m!==hf&&!gf(m,n("sampleTargetText").charAt(0)+"a")&&on(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,T={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(T=h.translationThemePatterns[y]),Ui(document,y,T,m),{...h,selectTranslationFont:m}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{o(!i),i&&(r.find(h=>h===e.selectTranslationFont)||f(hf))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:i}),n("translationFont.custom")]}):null,i?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:m=>f(m.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:m=>{f(m.target.value)},children:r.map((m,h)=>{let y=n(`font.${m}`);y.startsWith("font.")&&(y=m);let T=m=="none"?hf:m;return d("option",{value:T,selected:m===e?.selectTranslationFont,children:y},"locale"+h)})})]})}p();var Ln={};vc.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function Tf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=K(null),{t:u}=W();if(le(()=>{yt().then(c=>{yn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!o)return d("div",{children:"loading"});let l=o.config;return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(ak,{config:l}),d(ik,{config:l}),d(ok,{config:l}),d(ni,{config:l,ctx:o,serviceType:"inputTranslationService"}),d(sk,{config:l}),d(uk,{config:l}),d(ck,{config:l}),d(lk,{config:l})]})})}function ak({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[o("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?o("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):o("enableInputTranslationDescription",{inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function ik({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=Xa(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(Ae,{title:o("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?o("inputTargetLanguageDescriptionForNoneKey"):o("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Zt(l,e.interfaceLanguage)},"language"+c))})]})}function ok({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();return e?d("div",{class:"nav",children:[d(Ae,{title:o("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Zt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function sk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(Ae,{title:o("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?o("inputStartingTriggerKeyDescriptionForNoneKey"):o("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?o(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}):null}function uk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTrailingTriggerKeyTitle"),description:o("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?o(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:vc.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?o(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:o("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function lk({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W(),[s,u]=K(!1),l=b=>{u(!s)},[c,g]=K(0),[f,m]=K(""),h=(b,x,w,L)=>{l(w),n(M=>{let C=M.inputTranslationUrlPattern,v=[],A=[];C&&C.matches&&C.excludeMatches&&(v=C.matches,A=C.excludeMatches);let D=[...v],S=[...A];return L==="edit"&&(w==="matches"?D[x]=b:S[x]=b),w==="matches"?(D=zn(b,D),S=Ht(b,A)):(D=Ht(b,v),S=zn(b,S)),{...M,inputTranslationUrlPattern:{...M.inputTranslationUrlPattern,matches:D,excludeMatches:S}}})},y=(b,x)=>{n(w=>{let L=w.inputTranslationUrlPattern,M=[];x==="matches"?L&&L.matches&&(M=L.matches):L&&L.excludeMatches&&(M=L.excludeMatches);let C=[...M];return b.forEach(v=>{C=Ht(v,C)}),{...w,inputTranslationUrlPattern:{...w.inputTranslationUrlPattern,[x]:C}}})},T=(b,x,w)=>{l(x),m(b),g(w)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:o("inputTranslationBlockUrlsTitle"),description:o("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:o("add")})}),s?d(ma,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:f,index:c}):null]}),d(ei,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:T})]}):null}function ck({config:e}){let[t,n,r,a,i]=Me(we),{t:o}=W();if(!e)return null;let s=()=>ut().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>ut().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(Ae,{title:o("inputTrailingTriggerKeyTimeout"),description:o("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}p();function vf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),{t:s}=W(),[u,l]=K({}),[c,g]=K({});return le(()=>{Z.storage.sync.get(null).then(f=>{l(f),Z.storage.local.get(null).then(m=>{g(m)})})},[t]),!o||!t?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(fk,{}),d(mk,{}),d(hk,{}),d(dk,{}),d(gk,{}),d(pk,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(o,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function dk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let f=JSON.parse(c);if(!Array.isArray(f)){on("Invalid rules, rules must be an array");return}g.rules=f}t(()=>g),lt(i("saved"))}catch(c){on(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(i("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),lt(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:o,placeholder:`[{ "matches": "www.google.com", "selectors": [".title"] }, { "matches": "*.twitter.com", "selectors": [".text"], "excludeSelectors": ["footer"] - }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:i("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function gk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),ut(i("saved"))},s=u=>{if(u.preventDefault(),confirm(i("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),ut(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:o,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function pk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{u.preventDefault(),confirm(i("confirmResetConfig"))&&(t(()=>Ri()),Oa().catch(l=>{R.error("clean local config error",l)}),Ra().catch(l=>{R.error("clean buildin config error",l)}),ti().catch(l=>{R.error("clean cache error",l)}),ut(i("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),ut(i("saved"))}catch(l){an(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:o,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function mk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!i?.beta)},checked:!!i?.beta}),o("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:o("betaDescription",{1:bc})}})]})}function fk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!i?.debug)},checked:i?.debug}),o("toggleDebug")]})})}function hk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W();if(!i?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Bi([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!i?.enableSentryReport)},checked:i?.enableSentryReport}),o("enableSentryReport")]})})}p();p();var bk="buildinConfig",yk={},C0=Ny(bk,yk);p();function ju(e,t=2e3){return n=>{let r,a=0;return i=>{++a==e&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var Tk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},vk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},Sk=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},Ck=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},Ek=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},wk=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},Dk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Cf(){let[e,t]=K(null),{t:n}=W(),[r,a]=K(n("calculating")+"..."),[i,o]=K(null),[s,u]=C0(),[l,c]=K(null),[g,f]=K(""),[m,h]=K(!1),[y,T]=K(!1),[b,x]=K(null),[w,L]=K(null),[M,C,v,A]=$e();Ct(M,C);let[D,S]=K(!1),N=Ir(),F=!0;Ge()&&b&&(F=b.generalRule.showSponsorOnSafari);let P=async()=>{f("");let _=i;if(i===null)try{let B=await Tr({url:Ma});B?(o(B),_=B,h(!0)):(f(n("unknownError")),c(null))}catch(B){c(null),f(B.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(f(n("canNotFetchRemoteRule")),c(null))};le(()=>{bt().then(_=>{let B=_.buildinConfigUpdatedAt;x(_);let H=new Date(B);t(B),Tr({url:Ma}).then(j=>{let G=j.minVersion,V=N;o(j);let ie=j.latestVersion;if(ie&&(qr(V,ie)?L(!0):L(!1)),qr(V,G)){let te=j.buildinConfigUpdatedAt;new Date(te)>H?(c(!0),P()):c(!1)}else T(!0),c(null)}).catch(j=>{c(null),f(j.message)})}),Iv().then(_=>{a(_)})},[]),le(()=>{bt().then(_=>{x(_)})},[M,e]);let O=_=>{C(B=>{let H=!B.alpha;return H?ut(n("enableAlphaSuccess")):ut(n("disableAlphaSuccess")),{...B,alpha:H}})},z=_=>{_.preventDefault(),_.stopPropagation(),S(!0),Ra().catch(B=>{R.error("clear build config failed:",B)}),Oa().catch(B=>{R.error("clear local config failed:",B)}),ti().then(()=>{S(!1),ut("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(B=>{S(!1),an(B.message)})},q=_=>{C(B=>({...B,cache:_}))},I=_=>{C(B=>({...B,enabled:_}))},k="aboutIntro";return F||(k="aboutIntroWithoutSponsor"),b?d(ct,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:ju(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:ju(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",N,mb()?"(Beta)":""]}),w===!1&&d(Ek,{latestVersion:i?.latestVersion}),w===!0&&d(wk,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{I(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{q(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!pe()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:z,children:n("cleanCache")})]}),g?d(Dk,{handleSyncing:P,message:g,date:e||""}):y?d(xk,{minVersion:i.minVersion}):l===null?d(Sk,{}):l===!0?d(Ck,{}):m?d(vk,{date:e}):d(Tk,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:bc,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),F&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}p();p();var Ak=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let i=n[a];t&&t(i,a)};return d("div",{class:"tags-input-container",children:[n.map((a,i)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(i),class:"delete",children:"\xD7"})]},a)),d(kk,{...e})]})};function kk(e){let{onAddTag:t,tags:n}=e,r=Ve(null),[a,i]=K(!1),{t:o}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{i(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{i(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:o("tagsInput.add")})]})}var Xv=Ak;var Pk=Nc();function xf(){let e=$e(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o),{t:u,setLang:l}=W();return Ct(t,n),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_k,{config:o,ctx:s}),d(Mk,{config:o}),d(Lk,{config:o,setSettings:n}),d(Fk,{ctx:s}),d(Bk,{ctx:s}),d(Ik,{config:o}),d(Rk,{config:o}),d(Ok,{config:o}),d(zk,{config:o}),d(Nk,{config:o}),d(Uk,{config:o}),d(qk,{config:o}),d(jk,{config:o}),d(Hk,{config:o,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(Wk,{config:o,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function Lk(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=qe(({tag:i,index:o,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(f=>f.k===i);return s==="add"&&!g&&(c=[...l,{k:i}]),s==="remove"&&(c=l.filter((f,m)=>m!==o)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(Ae,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Xv,{tags:t.generalRule.glossaries.map(i=>i.k),onAddTag:i=>a({tag:i,action:"add"}),onRemoveTag:(i,o)=>a({tag:i,index:o,action:"remove"})})]}):null}function _k({config:e,ctx:t}){let{t:n}=W(),[r,a,i,o,s]=Me(we);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(Ae,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let f=2,m=Math.floor(g/2);m>2&&(f=m),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:f}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function Mk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function Fk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function Bk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(Ae,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function Ik({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function Rk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function Ok({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return pe()?null:d("div",{class:"nav",children:[d(Ae,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;jc({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function zk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function Nk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function Uk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function qk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),[s]=C0();return s.generalRule?d("div",{class:"nav",children:[d(Ae,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function jk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function Hk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(f,m)=>{o(h=>{let y=h.translationModeLanguagePattern,T=y?.[t]||[],b=y?.[c]||[],x=[...T];f?x=Array.from(new Set([...x,m])):x=x.filter(L=>L!==m);let w=b.filter(L=>L!==m);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:w}}})};return d(Nu,{title:n,description:r,languages:Pk,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function Wk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,T,b)=>{o(x=>{let w=x.translationModeUrlPattern,L=w?.[t]||[],M=w?.[c]||[],C=[...L];b==="edit"?C[y]=h:C=Array.from(new Set([...C,h]));let v=M.filter(A=>A!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:C,[c]:v}}})},f=ze(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(Uu,{title:n,description:r,urls:f,onDeleteUrl:(h,y)=>{o(T=>{let b=f.filter(x=>!h.find(w=>w==x));return{...T,translationModeUrlPattern:{...T.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}p();function Ef(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),{t:u}=W();return s?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}p();p();function ss(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}p();function Er(e){return De.ASSETS_BASE_URL+e}function wf(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let{t:o}=W(),s=Jt(t),u=Un(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(f=>{let m="",h="";if(f.includes("[")){let y=f.split("[");h=y[0];let b=new URL(h).hostname;m=y[1]?y[1].slice(0,-1):b}else h=f,m=new URL(h).hostname;return{name:m,url:h}}),g=c.map((f,m)=>{let h=m===c.length-1;return` + }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:i("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function gk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),lt(i("saved"))},s=u=>{if(u.preventDefault(),confirm(i("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),lt(i("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:o,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function pk(){let[e,t,n,r,a]=Me(we),{t:i}=W(),o=u=>{u.preventDefault(),confirm(i("confirmResetConfig"))&&(t(()=>Ri()),Oa().catch(l=>{R.error("clean local config error",l)}),Ra().catch(l=>{R.error("clean buildin config error",l)}),ti().catch(l=>{R.error("clean cache error",l)}),lt(i("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),lt(i("saved"))}catch(l){on(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:i("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[i("help"),"?"]}),d("a",{href:"#",onClick:o,class:"text-sm secondary mr-2",children:i("reset")})]})]})}function mk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!i?.beta)},checked:!!i?.beta}),o("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:o("betaDescription",{1:bc})}})]})}function fk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!i?.debug)},checked:i?.debug}),o("toggleDebug")]})})}function hk(){let[e,t,n,r,a]=Me(we),i=Jt(e),{t:o}=W();if(!i?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Bi([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!i?.enableSentryReport)},checked:i?.enableSentryReport}),o("enableSentryReport")]})})}p();p();var bk="buildinConfig",yk={},C0=Ny(bk,yk);p();function Hu(e,t=2e3){return n=>{let r,a=0;return i=>{++a==e&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var Tk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},vk=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},Sk=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},Ck=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},Ek=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},wk=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},Dk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Sf(){let[e,t]=K(null),{t:n}=W(),[r,a]=K(n("calculating")+"..."),[i,o]=K(null),[s,u]=C0(),[l,c]=K(null),[g,f]=K(""),[m,h]=K(!1),[y,T]=K(!1),[b,x]=K(null),[w,L]=K(null),[M,C,v,A]=Ye();Ct(M,C);let[D,S]=K(!1),N=Ir(),F=!0;Ge()&&b&&(F=b.generalRule.showSponsorOnSafari);let P=async()=>{f("");let _=i;if(i===null)try{let B=await Tr({url:Ma});B?(o(B),_=B,h(!0)):(f(n("unknownError")),c(null))}catch(B){c(null),f(B.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(f(n("canNotFetchRemoteRule")),c(null))};le(()=>{yt().then(_=>{let B=_.buildinConfigUpdatedAt;x(_);let H=new Date(B);t(B),Tr({url:Ma}).then(j=>{let G=j.minVersion,V=N;o(j);let ie=j.latestVersion;if(ie&&(qr(V,ie)?L(!0):L(!1)),qr(V,G)){let te=j.buildinConfigUpdatedAt;new Date(te)>H?(c(!0),P()):c(!1)}else T(!0),c(null)}).catch(j=>{c(null),f(j.message)})}),Iv().then(_=>{a(_)})},[]),le(()=>{yt().then(_=>{x(_)})},[M,e]);let O=_=>{C(B=>{let H=!B.alpha;return H?lt(n("enableAlphaSuccess")):lt(n("disableAlphaSuccess")),{...B,alpha:H}})},z=_=>{_.preventDefault(),_.stopPropagation(),S(!0),Ra().catch(B=>{R.error("clear build config failed:",B)}),Oa().catch(B=>{R.error("clear local config failed:",B)}),ti().then(()=>{S(!1),lt("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(B=>{S(!1),on(B.message)})},q=_=>{C(B=>({...B,cache:_}))},I=_=>{C(B=>({...B,enabled:_}))},k="aboutIntro";return F||(k="aboutIntroWithoutSponsor"),b?d(ct,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:Hu(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:Hu(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",N,mb()?"(Beta)":""]}),w===!1&&d(Ek,{latestVersion:i?.latestVersion}),w===!0&&d(wk,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{I(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{q(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!pe()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:z,children:n("cleanCache")})]}),g?d(Dk,{handleSyncing:P,message:g,date:e||""}):y?d(xk,{minVersion:i.minVersion}):l===null?d(Sk,{}):l===!0?d(Ck,{}):m?d(vk,{date:e}):d(Tk,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:bc,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),F&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}p();p();var Ak=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let i=n[a];t&&t(i,a)};return d("div",{class:"tags-input-container",children:[n.map((a,i)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(i),class:"delete",children:"\xD7"})]},a)),d(kk,{...e})]})};function kk(e){let{onAddTag:t,tags:n}=e,r=$e(null),[a,i]=K(!1),{t:o}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{i(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{i(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:o("tagsInput.add")})]})}var Xv=Ak;var Pk=Nc();function Cf(){let e=Ye(),[t,n,r,a,i]=e,o=Jt(t),s=Un(o),{t:u,setLang:l}=W();return Ct(t,n),!o||!s?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_k,{config:o,ctx:s}),d(Mk,{config:o}),d(Lk,{config:o,setSettings:n}),d(Fk,{ctx:s}),d(Bk,{ctx:s}),d(Ik,{config:o}),d(Rk,{config:o}),d(Ok,{config:o}),d(zk,{config:o}),d(Nk,{config:o}),d(Uk,{config:o}),d(qk,{config:o}),d(jk,{config:o}),d(Hk,{config:o,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(Wk,{config:o,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function Lk(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=qe(({tag:i,index:o,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(f=>f.k===i);return s==="add"&&!g&&(c=[...l,{k:i}]),s==="remove"&&(c=l.filter((f,m)=>m!==o)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(Ae,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Xv,{tags:t.generalRule.glossaries.map(i=>i.k),onAddTag:i=>a({tag:i,action:"add"}),onRemoveTag:(i,o)=>a({tag:i,index:o,action:"remove"})})]}):null}function _k({config:e,ctx:t}){let{t:n}=W(),[r,a,i,o,s]=Me(we);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(Ae,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let f=2,m=Math.floor(g/2);m>2&&(f=m),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:f}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function Mk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function Fk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function Bk({ctx:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(Ae,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function Ik({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function Rk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function Ok({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return pe()?null:d("div",{class:"nav",children:[d(Ae,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;jc({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function zk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function Nk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function Uk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function qk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we),[s]=C0();return s.generalRule?d("div",{class:"nav",children:[d(Ae,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function jk({config:e}){let{t}=W(),[n,r,a,i,o]=Me(we);return d("div",{class:"nav",children:[d(Ae,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function Hk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(f,m)=>{o(h=>{let y=h.translationModeLanguagePattern,T=y?.[t]||[],b=y?.[c]||[],x=[...T];f?x=Array.from(new Set([...x,m])):x=x.filter(L=>L!==m);let w=b.filter(L=>L!==m);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:w}}})};return d(Uu,{title:n,description:r,languages:Pk,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function Wk({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[i,o,s,u,l]=Me(we),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,T,b)=>{o(x=>{let w=x.translationModeUrlPattern,L=w?.[t]||[],M=w?.[c]||[],C=[...L];b==="edit"?C[y]=h:C=Array.from(new Set([...C,h]));let v=M.filter(A=>A!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:C,[c]:v}}})},f=ze(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(qu,{title:n,description:r,urls:f,onDeleteUrl:(h,y)=>{o(T=>{let b=f.filter(x=>!h.find(w=>w==x));return{...T,translationModeUrlPattern:{...T.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}p();function xf(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),{t:u}=W();return s?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}p();p();function ss(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}p();function Er(e){return De.ASSETS_BASE_URL+e}function Ef(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let{t:o}=W(),s=Jt(t),u=Un(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(f=>{let m="",h="";if(f.includes("[")){let y=f.split("[");h=y[0];let b=new URL(h).hostname;m=y[1]?y[1].slice(0,-1):b}else h=f,m=new URL(h).hostname;return{name:m,url:h}}),g=c.map((f,m)=>{let h=m===c.length-1;return` ${f.name} ${h?"":", "} - `}).join("");return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("subtitle")})}),d(ss,{image:Er("images/dual_subtitle_intro.png"),nightImage:Er("images/dual_subtitle_intro_night.png"),title:o("intro.subtitleTitle"),description:o("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(Ae,{title:o("autoEnableSubtitle"),description:o("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:m}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.humanSubtitlesPreferred"),description:o("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:m}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.preTranslation"),description:o("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:m}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d(ni,{title:o("youtubeService"),config:s,ctx:u,description:o("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.showQuickButton"),description:o("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:m}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(Kk,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.disabledSubtitle"),description:o("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:m}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:o("intro.subtitleDescription")+"
"+g}})]})})}function Kk(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(Ae,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}p();var e9=Ps({presets:[yl(),vl()]});p();var t9="G-MKMD9LWFTR";async function ft(e,t,n){try{let r=mu(),a=Le(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=pe(),s=ot(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await la(l,0),S=x0(new Date(D)),N=Date.now(),F=x0(new Date(N));if(S===F)return;await j1(l,N)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",f=await qt("fakeUserId","");f||(f=await la("fakeUserId",""),f&&await at("fakeUserId",f));let m=On(),h=new Date,y=await qt("installedAt","");y||(y=await la("installedAt",""),y&&await at("installedAt",y)),f?y||(y=new Date(0).toISOString(),await at("installedAt",y)):(f=Gk(32),await at("fakeUserId",f)),y||(y=h.toISOString(),await at("installedAt",y));let T=new Date(y),b=x0(T),x=x0(h),w=b===x,L=h.getTime()-T.getTime()<7*24*60*60*1e3,M=`https://www.google-analytics.com/mp/collect?measurement_id=${t9}&api_secret=${g}`;u||(M=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${t9}&api_secret=${g}`);let C=po.parse(window.navigator.userAgent),v=t.map(D=>{let S=D.params||{};if(C.os&&(S.os_name=C.os.name||"unknown",S.os_version=C.os.version||"unknown",S.os_version_name=C.os.versionName||"unknown"),C.browser&&(S.browser_name=C.browser.name||"unknown",S.browser_version=C.browser.version||"unknown",r&&(S.browser_name=r.name,S.browser_version=r.version)),C.platform&&(S.platform_type=C.platform.type||"unknown"),C.engine&&(S.engine_name=C.engine.name||"unknown",S.engine_version=C.engine.version||"unknown"),n.translationService&&(S.translation_service||(S.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(S.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?S.openai_is_official="1":S.openai_is_official="0":S.openai_is_official="1"))),n.targetLanguage&&(S.target_language=n.targetLanguage),n.config.interfaceLanguage&&(S.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?S.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":S.enable_default_always_translated_urls="0",m&&(S.version=m),n.config.enableInputTranslation?S.enable_input_translation=n.config.enableInputTranslation?"1":"0":S.enable_input_translation="0",n.config.translationTheme&&(S.translation_theme=n.config.translationTheme),n.config.alpha&&(S.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?S.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):S.always_translate_languages="none",a.INSTALL_FROM&&(S.install_from=a.INSTALL_FROM),n.config.beta&&(S.beta=n.config.alpha.toString()),n.config.translationArea&&(S.translation_area=n.config.translationArea),b&&(S.install_day=Vk(T)),n.user){let F=B1(n.user);F&&Object.keys(F).forEach(P=>{S[P]=F[P]})}else S.user_type="anonymous";n.config.translationMode&&(S.translation_mode=n.config.translationMode),S.userscript=o.toString(),w?S.is_new_user_today="1":S.is_new_user_today="0",L?S.is_new_user_this_week="1":S.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?S.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():S.temp_translate_domain_minutes="0";let N="html";if(n.rule.pageType&&(N=n.rule.pageType),S.page_type=N,s?S.main_frame=0:S.main_frame=1,!c){let F=n.url;try{let P=new URL(F);S.site_host=P.hostname}catch{S.site_host="unknown"}n.sourceLanguage&&(S.source_language=n.sourceLanguage)}return{...D,params:S}});if(i)return;let A=await de({responseType:"text",url:M,method:"POST",body:JSON.stringify({client_id:f,user_id:f,events:v})})}catch{}}function Gk(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[m,h]=K(!1),y=Ve(null),T=Ve(null),b=()=>{u||!l&&st().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),f?.()},s))},x=()=>{st().any&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},L=ze(()=>{let M={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(M.maxWidth="200px",o&&(M.width=o+"px"),M.whiteSpace="normal"),n){case"top":return{...M,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...M,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...M,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...M,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:w,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),m&&d("div",{style:L,role:"tooltip",children:e})]})},or=$k;p();p();p();p();p();function r9(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return R.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return R.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let i=window.document.cloneNode(!0),s=new Bl(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=Yk(s.content,s.textContent),t&&(n=i9(r,t))}catch(i){R.debug(i)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function a9(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&R.debug("update article node",n),e.articleNode=n)}function Df(e,t){return t&&e?.contains(t)||!1}function Yk(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=Qk(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=t.length&&t.length>=500?o:null}function Qk(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function i9(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(i=>e.articleChildTags.includes(i.nodeName)).length>=e.articleChildTagsNum)return t;for(let i=0;i{let k=q(I);return k==NodeFilter.FILTER_ACCEPT?xt.mark(I,P,y):k==NodeFilter.FILTER_REJECT,k}),z=S;if(q(z)===NodeFilter.FILTER_REJECT)return;for(xt.mark(z,P,y);z;){if(s=Df(i,z),c&&c.length>0){let{currentNode:I,isMatchedSelection:k}=L(O,z,c);if(I)z=I;else break;if(!k)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let I=z;if(I.nodeName==="IFRAME"){N&&N(I),M(),Af(T,!0),z=O.nextNode();continue}I.nodeType===Node.ELEMENT_NODE&&(l&&Pf(I,l),m&&_f(I,m));let k=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},I.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&I.childNodes.length==1&&I.childNodes[0].nodeType===Node.TEXT_NODE&&I.innerText?.length==1&&I?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),ln(I,u)&&!k){C(I);let H=null;for(;!(H=O.nextSibling())&&O.parentNode(););z=H;continue}let _=zi(I);if(!o9(T,I)||k){M(I);let H=k?I:I.parentElement;H&&H.childNodes.length>0&&v(T,H,H.immersiveTranslateComputedStyle||null)}_&&I.shadowRoot?.mode==="open"&&(k?N?.(I.shadowRoot):w({...D,container:I.shadowRoot})),I.nodeType===Node.ELEMENT_NODE&&I.nodeName==="PRE"&&g&&nP(I)}else if(z.nodeType===Node.TEXT_NODE)C(z);else throw new Error("should not be here");z=O.nextNode(),T.commonAncestorContainer&&z&&z.parentNode===T.commonAncestorContainer&&(T._currentStacks=[]),T.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&T._currentStacks.push(z)}function q(I){if(I.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(ga(I)){if(m){let H=Object.keys(m);if(H.length>0&&ln(I,H))for(let G of H){let V=m[G];if(I.matches(G)){let ie=m[G],te=Object.keys(ie);for(let J of te){let ce=ie[J];I.getAttribute(J)!==ce&&(ce===null?I.removeAttribute(J):I.setAttribute(J,ce))}break}}}if(!D.force&&xt.isMarked(I,P)||uy(I,P)||w0(I,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||I.nodeName==="IFRAME"&&!Oo(I))return NodeFilter.FILTER_REJECT;if(I.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(I);if(I.immersiveTranslateComputedStyle=H,Lf(H))return F&&F(I),NodeFilter.FILTER_REJECT;let j=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(ln(I,u)&&j)return NodeFilter.FILTER_REJECT}let k=I.getBoundingClientRect(),{width:_,height:B}=k;return I.nodeName==="IMG"&&(_>48&&B>48?I.immersiveTranslateComputedStyle={display:"block"}:_>0&&B>0&&h!==!1&&(I.setAttribute("width",_),I.setAttribute("height",B))),!I.childNodes||I.childNodes&&I.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!T.isPreWhitespace&&(_>0&&_<4||B>0&&B<4)&&(I.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(I.nodeType===Node.TEXT_NODE){let k=I.textContent?.trim();if(!k)return T.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=I.parentNode;if(_.getBoundingClientRect){let{width:B,height:H}=_.getBoundingClientRect();if(B>0&&B<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return f>0&&k.length>=f&&kf(I,f),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),T&&T.commonAncestorContainer&&T.flatNodes.length>0&&M();function L(D,S,N){let F=S.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(S))if(b=!1,S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b}}else if(S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};return{currentNode:S,isMatchedSelection:!0}}function M(D){if(D&&D.nodeName==="BR"){T.commonAncestorContainer=D.parentNode;let N=[...T.flatNodes],F=T.flatNodes.filter(P=>D.parentNode?.contains(P));F.length>0&&N.length!=F.length&&(T.flatNodes=F,T.flatNodes.original=N)}let S=tP(T,a,n);S&&(S.xpath=dy(r,s,S.commonAncestorContainer,i),t&&t(S)),Af(T)}function C(D){if(!o9(T,D)){M(),Af(T);let S=D.parentNode;S&&v(T,S,S.computedStyle)}T.flatNodes.push(D)}function v(D,S,N){D.commonAncestorContainer=S;let F=A(N);D.isPreWhitespace=F}function A(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function o9(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=zi(t));let r=eP(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function Jk(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function Xk(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Pf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=e.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),e.style.cssText=o+i;break}}}}function eP(e){return e&&e._currentStacks?e._currentStacks.some(t=>zi(t)):!1}function tP(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let o=rP(r,a,n);o||(o=a);let s=[];for(let m of r){let h=Xk(e,o,m);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,f=0;for(;g&&(c.push(g),g!==l);){if(f++,f>Zk){R.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Af(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Lf(e){return e.display==="none"}var xt={_marked_key:qb,isMarked(e,t){return Qp(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return zc(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return vt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=No(e,"markWalk")||"";return vt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||zi(e)):!1}};function nP(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function rP(e,t,n){if(!e.length)return null;let r=e.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==t););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Nn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function kf(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,t);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>t+20&&kf(e,t+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,e.immersive=!0;let s=e.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=t[r],i=Object.keys(a),o=Ty(e,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function u9(e,t,n,r,a,i,o){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let f of c){let m=l[f];if(f==="translate"&&m==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||aP(g,a,i,o)||!Sy(y,n,r))continue}g.getAttribute(f)!==m&&(m===null?g.removeAttribute(f):g.setAttribute(f,m))}}}function _f(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=t[a],s=Object.keys(o);for(let u of s){let l=o[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function w0(e,t){return ln(e,t.excludeSelectors||[])?ln(e,t.selectors||[])?!1:!ln(e,t.stayOriginalSelectors||[]):!1}function E0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return ln(e,t.concat(n))}function aP(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&w0(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ic(o,t,n))return!0}}return!1}p();function l9(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(mc)||Mf(e).catch(i=>{R.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var D0="";async function Mf(e){let t=document.title;if(!t||t.includes(mc))return;D0!==t&&(D0=t);let n=await Ue({text:t,pageLangs:[Mt(),"en"]});if(!Bo(e,n))try{let r=await Nr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+mc+D0)}catch(r){throw r}}function c9(e){e.rule.isTranslateTitle&&(document.title=D0)}function us(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function Tn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,i=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var iP={sanitize:e=>e};function Rf(e,t){if(e.interruptEffectDOM)return;let n=Tn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Vi.bind(null,e),onFrame:r=>{Bf(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),Do&&vt(t,"consumeContainer",e.id)}function Bf(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!Oo(t))return;R.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Gi(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else R.debug("onFrame shadowRoot",t.host),Gi(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Gi(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=Tn(t.ctx),i=0;if(u(t,e,n))return;if(ga(e)&&s(e)){o(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(ga(c)&&(r&&Pf(c,r),a&&_f(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){o(g);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&e instanceof HTMLElement){o(e);return}return t.observeContainers;function o(l){xt.clearMark(l),i++,t.immediateTranslateCapacity>=0?Rf(t,l):(Do&&vt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Bf(t,l.shadowRoot,n),!1;if(c==="iframe")return Bf(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return E0(l,g.selectors);if(g.pageHeight){let f=l.scrollHeight;if(f>0&&f0)return!0}return!1}function u(l,c,g){if(a9(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=Tn(l.ctx);return!!w0(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Hu(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),i=r.contains(e.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(A0(e.rootNodes),g9(e.commonAncestorContainer)),n=="original"&&t=="translation"){let o=Ff(e.rootNodes);if(A0(e.rootNodes),d9(o))return;ls(o,r,e.targetNodes||[]),g9(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let o=e.targetNodes[0];ls(o,r,e.rootNodes||[]),p9(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let o=Ff(e.rootNodes);if(d9(o))return;ls(o,r,e.targetNodes||[]),p9(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let o=Ff(e.targetNodes);A0(e.targetNodes),ls(o,r,e.rootNodes||[])}n=="dual"&&t=="original"&&A0(e.targetNodes),Nf(e)}catch(o){R.error(o)}}}function d9(e){return!e||!ga(e)?!1:e.classList.contains(Lt)}function g9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{vt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function p9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=No(r,"immersiveTranslateClassBak");zc(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Ff(e){return e?e[e.length-1].nextSibling:null}function A0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function ls(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var oP=Fs(k0,300);async function Vi(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||sP(t.rootNodes)||t.stepState>=2)return;t.stepState=2,Do&&vt(a,"onParseParagraph",e.id);let{ctx:i}=e,{rule:o}=i,s=Ni(i),u=Kc(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:pP(i)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await zf(i,t,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Or(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(R.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),uP(e,t.text),Of(e,t,r)):(Do&&vt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function sP(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?ga(t)&&t.classList.contains(Lt):!1}function uP(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function Of(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),Do&&vt(t.commonAncestorContainer,"consumeParagraph",e.id),vt(t.commonAncestorContainer,jb,"1",!0),n=="hover"){k0.call(e,e.ctx);return}oP.call(e,e.ctx)}async function k0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await lt(r,t,(a,i,o)=>{let s=o.id,u=lP(e,s.toString());u&&cP.call(null,a,i,o,u,t,n)})}catch(a){R.error("translateCurrentQueue error",a);return}}function lP(e,t){return e.find(n=>n.id===t)}function cP(e,t,n,r,a,i){let o=!1,s=r;if(Io(s.commonAncestorContainer,n.id)?.remove(),Nf(r),s&&(e||!t)){e||(R.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);vt(c,Gb,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(ls(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let f=dP(a,e).replaceAll(` +
`}).join("");return d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:o("subtitle")})}),d(ss,{image:Er("images/dual_subtitle_intro.png"),nightImage:Er("images/dual_subtitle_intro_night.png"),title:o("intro.subtitleTitle"),description:o("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(Ae,{title:o("autoEnableSubtitle"),description:o("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:m}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.humanSubtitlesPreferred"),description:o("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:m}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.preTranslation"),description:o("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:m}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d(ni,{title:o("youtubeService"),config:s,ctx:u,description:o("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.showQuickButton"),description:o("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:m}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(Kk,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(Ae,{title:o("subtitle.disabledSubtitle"),description:o("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:f=>{let m=f.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:m}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:o("intro.subtitleDescription")+"
"+g}})]})})}function Kk(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(Ae,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}p();var e9=Ls({presets:[yl(),vl()]});p();var t9="G-MKMD9LWFTR";async function ht(e,t,n){try{let r=fu(),a=Le(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=pe(),s=st(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await la(l,0),S=x0(new Date(D)),N=Date.now(),F=x0(new Date(N));if(S===F)return;await j1(l,N)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",f=await qt("fakeUserId","");f||(f=await la("fakeUserId",""),f&&await it("fakeUserId",f));let m=On(),h=new Date,y=await qt("installedAt","");y||(y=await la("installedAt",""),y&&await it("installedAt",y)),f?y||(y=new Date(0).toISOString(),await it("installedAt",y)):(f=Gk(32),await it("fakeUserId",f)),y||(y=h.toISOString(),await it("installedAt",y));let T=new Date(y),b=x0(T),x=x0(h),w=b===x,L=h.getTime()-T.getTime()<7*24*60*60*1e3,M=`https://www.google-analytics.com/mp/collect?measurement_id=${t9}&api_secret=${g}`;u||(M=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${t9}&api_secret=${g}`);let C=po.parse(window.navigator.userAgent),v=t.map(D=>{let S=D.params||{};if(C.os&&(S.os_name=C.os.name||"unknown",S.os_version=C.os.version||"unknown",S.os_version_name=C.os.versionName||"unknown"),C.browser&&(S.browser_name=C.browser.name||"unknown",S.browser_version=C.browser.version||"unknown",r&&(S.browser_name=r.name,S.browser_version=r.version)),C.platform&&(S.platform_type=C.platform.type||"unknown"),C.engine&&(S.engine_name=C.engine.name||"unknown",S.engine_version=C.engine.version||"unknown"),n.translationService&&(S.translation_service||(S.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(S.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?S.openai_is_official="1":S.openai_is_official="0":S.openai_is_official="1"))),n.targetLanguage&&(S.target_language=n.targetLanguage),n.config.interfaceLanguage&&(S.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?S.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":S.enable_default_always_translated_urls="0",m&&(S.version=m),n.config.enableInputTranslation?S.enable_input_translation=n.config.enableInputTranslation?"1":"0":S.enable_input_translation="0",n.config.translationTheme&&(S.translation_theme=n.config.translationTheme),n.config.alpha&&(S.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?S.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):S.always_translate_languages="none",a.INSTALL_FROM&&(S.install_from=a.INSTALL_FROM),n.config.beta&&(S.beta=n.config.alpha.toString()),n.config.translationArea&&(S.translation_area=n.config.translationArea),b&&(S.install_day=Vk(T)),n.user){let F=B1(n.user);F&&Object.keys(F).forEach(P=>{S[P]=F[P]})}else S.user_type="anonymous";n.config.translationMode&&(S.translation_mode=n.config.translationMode),S.userscript=o.toString(),w?S.is_new_user_today="1":S.is_new_user_today="0",L?S.is_new_user_this_week="1":S.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?S.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():S.temp_translate_domain_minutes="0";let N="html";if(n.rule.pageType&&(N=n.rule.pageType),S.page_type=N,s?S.main_frame=0:S.main_frame=1,!c){let F=n.url;try{let P=new URL(F);S.site_host=P.hostname}catch{S.site_host="unknown"}n.sourceLanguage&&(S.source_language=n.sourceLanguage)}return{...D,params:S}});if(i)return;let A=await de({responseType:"text",url:M,method:"POST",body:JSON.stringify({client_id:f,user_id:f,events:v})})}catch{}}function Gk(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[m,h]=K(!1),y=$e(null),T=$e(null),b=()=>{u||!l&&ut().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),f?.()},s))},x=()=>{ut().any&&(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},L=ze(()=>{let M={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(M.maxWidth="200px",o&&(M.width=o+"px"),M.whiteSpace="normal"),n){case"top":return{...M,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...M,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...M,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...M,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:w,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),m&&d("div",{style:L,role:"tooltip",children:e})]})},or=$k;p();p();p();p();p();function r9(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return R.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return R.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let i=window.document.cloneNode(!0),s=new Bl(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=Yk(s.content,s.textContent),t&&(n=i9(r,t))}catch(i){R.debug(i)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function a9(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&R.debug("update article node",n),e.articleNode=n)}function wf(e,t){return t&&e?.contains(t)||!1}function Yk(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=Qk(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=t.length&&t.length>=500?o:null}function Qk(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function i9(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(i=>e.articleChildTags.includes(i.nodeName)).length>=e.articleChildTagsNum)return t;for(let i=0;i{let k=q(I);return k==NodeFilter.FILTER_ACCEPT?xt.mark(I,P,y):k==NodeFilter.FILTER_REJECT,k}),z=S;if(q(z)===NodeFilter.FILTER_REJECT)return;for(xt.mark(z,P,y);z;){if(s=wf(i,z),c&&c.length>0){let{currentNode:I,isMatchedSelection:k}=L(O,z,c);if(I)z=I;else break;if(!k)continue}if(z.nodeType===Node.ELEMENT_NODE||z.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let I=z;if(I.nodeName==="IFRAME"){N&&N(I),M(),Df(T,!0),z=O.nextNode();continue}I.nodeType===Node.ELEMENT_NODE&&(l&&kf(I,l),m&&Lf(I,m));let k=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},I.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&I.childNodes.length==1&&I.childNodes[0].nodeType===Node.TEXT_NODE&&I.innerText?.length==1&&I?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),cn(I,u)&&!k){C(I);let H=null;for(;!(H=O.nextSibling())&&O.parentNode(););z=H;continue}let _=zi(I);if(!o9(T,I)||k){M(I);let H=k?I:I.parentElement;H&&H.childNodes.length>0&&v(T,H,H.immersiveTranslateComputedStyle||null)}_&&I.shadowRoot?.mode==="open"&&(k?N?.(I.shadowRoot):w({...D,container:I.shadowRoot})),I.nodeType===Node.ELEMENT_NODE&&I.nodeName==="PRE"&&g&&nP(I)}else if(z.nodeType===Node.TEXT_NODE)C(z);else throw new Error("should not be here");z=O.nextNode(),T.commonAncestorContainer&&z&&z.parentNode===T.commonAncestorContainer&&(T._currentStacks=[]),T.commonAncestorContainer&&z&&z.nodeType===Node.ELEMENT_NODE&&T._currentStacks.push(z)}function q(I){if(I.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(ga(I)){if(m){let H=Object.keys(m);if(H.length>0&&cn(I,H))for(let G of H){let V=m[G];if(I.matches(G)){let ie=m[G],te=Object.keys(ie);for(let J of te){let ce=ie[J];I.getAttribute(J)!==ce&&(ce===null?I.removeAttribute(J):I.setAttribute(J,ce))}break}}}if(!D.force&&xt.isMarked(I,P)||uy(I,P)||w0(I,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||I.nodeName==="IFRAME"&&!Oo(I))return NodeFilter.FILTER_REJECT;if(I.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(I);if(I.immersiveTranslateComputedStyle=H,Pf(H))return F&&F(I),NodeFilter.FILTER_REJECT;let j=za(I,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(cn(I,u)&&j)return NodeFilter.FILTER_REJECT}let k=I.getBoundingClientRect(),{width:_,height:B}=k;return I.nodeName==="IMG"&&(_>48&&B>48?I.immersiveTranslateComputedStyle={display:"block"}:_>0&&B>0&&h!==!1&&(I.setAttribute("width",_),I.setAttribute("height",B))),!I.childNodes||I.childNodes&&I.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!T.isPreWhitespace&&(_>0&&_<4||B>0&&B<4)&&(I.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(I.nodeType===Node.TEXT_NODE){let k=I.textContent?.trim();if(!k)return T.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=I.parentNode;if(_.getBoundingClientRect){let{width:B,height:H}=_.getBoundingClientRect();if(B>0&&B<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return f>0&&k.length>=f&&Af(I,f),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),T&&T.commonAncestorContainer&&T.flatNodes.length>0&&M();function L(D,S,N){let F=S.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(S))if(b=!1,S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b}}else if(S&&S.nodeType===Node.ELEMENT_NODE)if(E0(S,N))b=!0,x=S,M(),v(T,x,F);else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};else return b=!1,S=D.nextNode(),{currentNode:S,isMatchedSelection:b};return{currentNode:S,isMatchedSelection:!0}}function M(D){if(D&&D.nodeName==="BR"){T.commonAncestorContainer=D.parentNode;let N=[...T.flatNodes],F=T.flatNodes.filter(P=>D.parentNode?.contains(P));F.length>0&&N.length!=F.length&&(T.flatNodes=F,T.flatNodes.original=N)}let S=tP(T,a,n);S&&(S.xpath=dy(r,s,S.commonAncestorContainer,i),t&&t(S)),Df(T)}function C(D){if(!o9(T,D)){M(),Df(T);let S=D.parentNode;S&&v(T,S,S.computedStyle)}T.flatNodes.push(D)}function v(D,S,N){D.commonAncestorContainer=S;let F=A(N);D.isPreWhitespace=F}function A(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function o9(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=zi(t));let r=eP(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function Jk(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function Xk(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function kf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&cn(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=e.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),e.style.cssText=o+i;break}}}}function eP(e){return e&&e._currentStacks?e._currentStacks.some(t=>zi(t)):!1}function tP(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let o=rP(r,a,n);o||(o=a);let s=[];for(let m of r){let h=Xk(e,o,m);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,f=0;for(;g&&(c.push(g),g!==l);){if(f++,f>Zk){R.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Df(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Pf(e){return e.display==="none"}var xt={_marked_key:qb,isMarked(e,t){return Yp(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return zc(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||zi(e)))return vt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=No(e,"markWalk")||"";return vt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||zi(e)):!1}};function nP(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function rP(e,t,n){if(!e.length)return null;let r=e.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==t););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(Nn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Af(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,t);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>t+20&&Af(e,t+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,e.immersive=!0;let s=e.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=t[r],i=Object.keys(a),o=Ty(e,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function u9(e,t,n,r,a,i,o){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let f of c){let m=l[f];if(f==="translate"&&m==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||aP(g,a,i,o)||!Sy(y,n,r))continue}g.getAttribute(f)!==m&&(m===null?g.removeAttribute(f):g.setAttribute(f,m))}}}function Lf(e,t){if(t){let n=Object.keys(t);if(n.length>0&&cn(e,n))for(let a of n){let i=t[a];if(e.matches(a)){let o=t[a],s=Object.keys(o);for(let u of s){let l=o[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function w0(e,t){return cn(e,t.excludeSelectors||[])?cn(e,t.selectors||[])?!1:!cn(e,t.stayOriginalSelectors||[]):!1}function E0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return cn(e,t.concat(n))}function aP(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&w0(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ic(o,t,n))return!0}}return!1}p();function l9(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(mc)||_f(e).catch(i=>{R.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var D0="";async function _f(e){let t=document.title;if(!t||t.includes(mc))return;D0!==t&&(D0=t);let n=await Ue({text:t,pageLangs:[Mt(),"en"]});if(!Bo(e,n))try{let r=await Nr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+mc+D0)}catch(r){throw r}}function c9(e){e.rule.isTranslateTitle&&(document.title=D0)}function us(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function Tn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,i=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var iP={sanitize:e=>e};function If(e,t){if(e.interruptEffectDOM)return;let n=Tn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Vi.bind(null,e),onFrame:r=>{Ff(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),Do&&vt(t,"consumeContainer",e.id)}function Ff(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!Oo(t))return;R.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Gi(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else R.debug("onFrame shadowRoot",t.host),Gi(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Gi(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=Tn(t.ctx),i=0;if(u(t,e,n))return;if(ga(e)&&s(e)){o(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(ga(c)&&(r&&kf(c,r),a&&Lf(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){o(g);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&e instanceof HTMLElement){o(e);return}return t.observeContainers;function o(l){xt.clearMark(l),i++,t.immediateTranslateCapacity>=0?If(t,l):(Do&&vt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ff(t,l.shadowRoot,n),!1;if(c==="iframe")return Ff(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return E0(l,g.selectors);if(g.pageHeight){let f=l.scrollHeight;if(f>0&&f0)return!0}return!1}function u(l,c,g){if(a9(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=Tn(l.ctx);return!!w0(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Wu(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),i=r.contains(e.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(A0(e.rootNodes),g9(e.commonAncestorContainer)),n=="original"&&t=="translation"){let o=Mf(e.rootNodes);if(A0(e.rootNodes),d9(o))return;ls(o,r,e.targetNodes||[]),g9(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let o=e.targetNodes[0];ls(o,r,e.rootNodes||[]),p9(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let o=Mf(e.rootNodes);if(d9(o))return;ls(o,r,e.targetNodes||[]),p9(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let o=Mf(e.targetNodes);A0(e.targetNodes),ls(o,r,e.rootNodes||[])}n=="dual"&&t=="original"&&A0(e.targetNodes),zf(e)}catch(o){R.error(o)}}}function d9(e){return!e||!ga(e)?!1:e.classList.contains(Lt)}function g9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{vt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function p9(e){if(!ga(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=No(r,"immersiveTranslateClassBak");zc(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Mf(e){return e?e[e.length-1].nextSibling:null}function A0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function ls(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var oP=Bs(k0,300);async function Vi(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||sP(t.rootNodes)||t.stepState>=2)return;t.stepState=2,Do&&vt(a,"onParseParagraph",e.id);let{ctx:i}=e,{rule:o}=i,s=Ni(i),u=Kc(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:pP(i)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Of(i,t,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Or(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(R.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),uP(e,t.text),Rf(e,t,r)):(Do&&vt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function sP(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?ga(t)&&t.classList.contains(Lt):!1}function uP(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function Rf(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),Do&&vt(t.commonAncestorContainer,"consumeParagraph",e.id),vt(t.commonAncestorContainer,jb,"1",!0),n=="hover"){k0.call(e,e.ctx);return}oP.call(e,e.ctx)}async function k0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await nt(r,t,(a,i,o)=>{let s=o.id,u=lP(e,s.toString());u&&cP.call(null,a,i,o,u,t,n)})}catch(a){R.error("translateCurrentQueue error",a);return}}function lP(e,t){return e.find(n=>n.id===t)}function cP(e,t,n,r,a,i){let o=!1,s=r;if(Io(s.commonAncestorContainer,n.id)?.remove(),zf(r),s&&(e||!t)){e||(R.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);vt(c,Gb,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(ls(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let f=dP(a,e).replaceAll(` `,"").replaceAll('"',"""),m=e.message.replaceAll(` -`,"").replaceAll('"',"""),h=Rr(nn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Rr(nn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,T=Rr(nn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Rr(nn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> +`,"").replaceAll('"',"""),h=Rr(rn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Rr(rn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,T=Rr(rn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Rr(rn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> <${u.targetWrapperTag} class="${ee}-error-wrapper"> @@ -5413,7 +5413,7 @@ ${s}} ${b} - `;c.innerHTML=rt.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=qy(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),us(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(Fr,"1");let g=iP.sanitize(l);c.innerHTML=g,r.targetNodes=[c],Hu(r,i)}o=!0}else R.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function zf(e,t,n){let{text:r}=t,a=await Ue({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:i}=n;if(!vu({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Qc();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!yc.includes(e.translationService)&&(pe()||Ge())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Ia(g,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Ia(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Wu(){If=0}var If=0;function dP(e,t){If+=1;let n=t.message;if(t instanceof Q){let r=t.uiConfig(e);if(n=JSON.stringify(r),If!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ai,{detail:r}))}return n}function Nf(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,gP(t,`[${Hb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function gP(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function pP(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}p();p();async function m9(){let e="auto",t=[At(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Ue({text:zo(document.body),pageLangs:t})),e}p();var mP=[];function f9(e){mP.push(e)}p();var Uf;function h9(e){let t=e.ctx.rule.aiRule;if(R.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=Tn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(i=>{Ku(e,i,t,r)}),Uf=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Nn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||jf(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Ku(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!za(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Ro(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Ku(e,c,t,r));continue}Ku(e,u,t,r)}catch(u){R.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(o=>{xt.isMarked(o,e.id)||Ku(e,o,t,r)})}),Uf.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Ku(e,t,n,r,a=!1){let i=t.closest(n.messageWrapperSelector);if(!i)return;let o=t;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=t;s.timer=setTimeout(()=>{a&&qf(t),ha({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Vi(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function b9(){Uf?.disconnect()}p();p();p();p();var fP=` + `;c.innerHTML=at.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=qy(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),us(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(Fr,"1");let g=iP.sanitize(l);c.innerHTML=g,r.targetNodes=[c],Wu(r,i)}o=!0}else R.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Of(e,t,n){let{text:r}=t,a=await Ue({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:i}=n;if(!Su({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Qc();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!yc.includes(e.translationService)&&(pe()||Ge())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Ia(g,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Ia(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Ku(){Bf=0}var Bf=0;function dP(e,t){Bf+=1;let n=t.message;if(t instanceof Q){let r=t.uiConfig(e);if(n=JSON.stringify(r),Bf!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ai,{detail:r}))}return n}function zf(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,gP(t,`[${Hb}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function gP(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function pP(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}p();p();async function m9(){let e="auto",t=[At(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Ue({text:zo(document.body),pageLangs:t})),e}p();var mP=[];function f9(e){mP.push(e)}p();var Nf;function h9(e){let t=e.ctx.rule.aiRule;if(R.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=Tn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(i=>{Gu(e,i,t,r)}),Nf=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&Nn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||qf(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Gu(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!za(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Ro(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Gu(e,c,t,r));continue}Gu(e,u,t,r)}catch(u){R.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(o=>{xt.isMarked(o,e.id)||Gu(e,o,t,r)})}),Nf.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Gu(e,t,n,r,a=!1){let i=t.closest(n.messageWrapperSelector);if(!i)return;let o=t;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=t;s.timer=setTimeout(()=>{a&&Uf(t),ha({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Vi(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function b9(){Nf?.disconnect()}p();p();p();p();var fP=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5496,21 +5496,21 @@ ${s}} max-width: fit-content; } } -`,Hf="immersive-translate-toastify-shadow-root",Wf=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Hf)){let t=document.getElementById(Hf);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Hf,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=fP,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${i})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${t[i]}px`,t[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function L0(e){e=e||{},new Wf({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}p();function y9(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}p();p();p();function Vn(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{R.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:lc,payload:e},"*")});let n=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(n)}function Kf(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((i,o)=>(i[t[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&Ut(o,s=>{s.preventDefault();let u=r[i];Vn({method:u,data:{trigger:"shortcut"}})})}}p();p();p();p();var T9=`${ee}-float-ball`;function ri(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${T9}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${T9}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}p();p();function v9(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},i=Object.keys(n);for(let l of i){let g=n[l].matches;for(let f of g)a[f]||(a[f]=[]),a[f].push(l)}let o=a[e];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}p();p();var _0="DROP_DOWN_DEFAULT_VALUE";function Gf(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=e;r=r||"",t=t??!0,i=i||80;let s=Ve(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:_0,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==_0){s.current.value=_0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:_0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}p();var hP=({date:e})=>{let{t}=W(),[n,r]=K(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},bP=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},yP=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},TP=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Vf(e){let{isShowError:t,request:n}=e,[r,a]=K(null),{t:i}=W(),[o,s]=K(null),[u,l]=K(null),[c,g]=K(""),[f,m]=K(!1),[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(null),[L,M]=K(null),C=On(),v=async()=>{g("");let A=o;if(o===null)try{let D=await n({url:Ma});D?(s(D),A=D,m(!0)):(g(i("unknownError")),l(null))}catch(D){l(null),g(D.message);return}A!==null?(e.setStorageBuildinConfig(A),l(!1),a(A.buildinConfigUpdatedAt)):(g(i("canNotFetchRemoteRule")),l(null))};return le(()=>{bt().then(A=>{let D=A.buildinConfigUpdatedAt;w(A);let S=new Date(D);if(a(D),C==="0.0.0"){b(!0);return}n({url:Ma}).then(N=>{let F=N,P=F.minVersion,O=C;s(F);let z=F.latestVersion;if(z&&(qr(O,z)?M(!0):M(!1)),qr(O,P)){let q=F.buildinConfigUpdatedAt;new Date(q)>S?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(N=>{l(null),g(N.message)})})},[]),le(()=>{bt().then(A=>{w(A)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:T?d(yP,{}):c?t===!1?null:d(TP,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(bP,{minVersion:o.minVersion}):u===null||u===!0?null:f?d(hP,{date:r}):null}):null}p();function vP(){return navigator.userAgent.indexOf("Mac")!==-1}var S9={Alt:"\u2325"};function M0(e=""){return vP()?Object.keys(S9).reduce((t,n)=>t.replace(n,S9[n]),e):e}p();function C9({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return da(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Li:i1,children:[d("img",{src:t?Nv:zv}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Li:s1,children:d("img",{src:n?qu:Rv})})]})}p();function x9({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let i=Xa(t.config.translationService,t.config.targetLanguage),o=Rn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(SP,{supportedLanguages:o,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Uv,style:{maxWidth:"unset"},class:"mx-2"}),d(CP,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function SP(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&e.onSelected(o)},children:e.supportedLanguages.map((i,o)=>{let s=Zt(i,e.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Zt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:i,selected:i===e.value,children:u||s},"selectlink"+o)})})]})}function CP(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Zt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}p();function E9(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=DP(e);return n.length?d(xe,{children:[d(w9,{class:"mt-3",label:t("popupService"),items:r}),d(xP,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function w9(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Ur,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xP({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=wP(e),i=EP(e),o=qe((u,l)=>{t(c=>{let g=c.translationServices||{},f=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...f,[u]:l}}}})},[]),s=ze(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==i[u.name],onSelected:()=>{o(u.name,g.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(w9,{class:"mt-2",label:u,items:l},"field-"+c))})}function EP(e){return ze(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function wP(e){return ze(()=>{let{translationService:n}=e.config;if(nr[n])return _o("translationService",n,e)},[nr,_o,e])}function DP({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=W(),u=ze(()=>t?Mi(t,"translationService"):[],[Mi,t]),l=qe(g=>{let f=u.find(m=>m.id===g.value);if(f.ok){if(n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;f.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=ze(()=>{let g=Ge();return u.filter(m=>t.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!e&&!g&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}p();p();function D9(e){let t;try{t=new URL(e)}catch{return!1}let n=hT(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(AP(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function AP(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}p();function A9(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function k9(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=kP(e),[o,s]=K(()=>a?"excludeMatches":"matches"),u=ze(()=>r||a||!1,[r,a]),l=qe(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Ur,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;i(g?o:"default",n.hostname)}})]})}function kP({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,g=null,f=null,m=null,{translationUrlPattern:h}=t.config;if(l=ze(()=>new URL(e||""),[e]),t.config&&e&&D9(e)){c=A9(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(w=>_t(e,w)),f=!!x.find(w=>_t(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?m=!0:m=!1}let y=qe(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],w=x.filter(M=>M.match!==b),L=!1;w.length!==x.length&&(L=!0),L&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),T=qe((b,x)=>{if(b==="default"){s(M=>{let C={...M.translationUrlPattern};return{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,matches:$f(e,C.matches),excludeMatches:$f(e,C.excludeMatches)}}}),y();return}let w=b,L=w==="matches"?"excludeMatches":"matches";l&&s(M=>{let C={...M.translationUrlPattern};return C[L]=$f(e,C[L]),C[w]=zn(x,C[w]),{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,...C}}}),w==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:f,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:T}}function $f(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}p();function P9(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=PP(e);return _i(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||sa[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:d(LP,{...e})}function PP({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=ze(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),i=ze(()=>sa.filter(s=>!(s==="Off"||sa.includes(a)&&s==="OtherCustom")),[e,a]);return ze(()=>i.map(s=>{let u=r("mouseHoldKey",{key:M0(s)}),l=sa.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(f=>{let m={...f.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=g.value),{...f,generalRule:m}})}}}),[i,a])}function LP(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,i=Object.keys(Gu).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(f=>{let m={...f.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=g.value),{...f,generalRule:m}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let f=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?f:"touchShortcutsOff"}}})}})]})}p();function L9(e){let{isAlwaysTranslateLang:t}=_P({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Zt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Ht(e.currentLang,u.matches),excludeMatches:Ht(e.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=zn(e.currentLang,u[i]),u[o]=Ht(e.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _P({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}p();p();var _9=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),M9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),F9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),B9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),I9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),R9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),O9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function N9({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Le(),i=Math.round((Fo.supportedVideoSubtitleSites||[]).length/10),o=ze(()=>[{title:r("widget.translateFile"),icon:_9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:M9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:F9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(xc)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?d(or,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(z9,{...s})}):d(z9,{...s}))})}function z9(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Yf(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=e,[s,u]=K(""),[l,c]=K(i),[g,f]=K(null),[m,h]=K(null);le(()=>{it.get(ht,null).then(x=>{x?(f(x),h(Qt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,T=Ge();n&&T&&(y=n.generalRule.showSponsorOnSafari);let b=da(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(C9,{isLogin:!!g,isProUser:!!m,config:n}),d(OP,{openSharePage:r})]}),d(x9,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(E9,{isProUser:!!m,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(FP,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(IP,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Vf,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(k9,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(P9,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(L9,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(MP,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:t})]}),d(N9,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(BP,{...e,isProUser:!!m,isShowPricing:y,setMessage:u})]})}function MP(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return ze(()=>!n.rule.subtitleRule.disabled&&Ep.includes(n.rule.subtitleRule.type||""),[n,Ep])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function FP(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(i)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(or,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?I9:R9})})}function BP(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:i}=e.ctx,o=60;n.startsWith("zh")||(o=70);let s=Le(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[B9,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(RP,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Gf,{label:t("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(Fa),e.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?e.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?e.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),e.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),e.onClose()):m.value==="options"?(e.openOptionsPage(),e.onClose()):m.value==="changeToTranslateTheWholePage"?g():m.value==="changeToTranslateTheMainPage"?f():m.value==="about"?e.openAboutPage():m.value==="toggleEnabled"?e.onToggleEnabled():m.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&e.onOpenUrl(Fa,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),e.openOptionsPage()}function c(m){e.setSettings(h=>({...h,translationMode:m})),e.onSwitchTranslationMode(m)}function g(){e.setSettings(m=>({...m,translationArea:"body"})),e.onTranslateTheWholePage()}function f(){e.setSettings(m=>({...m,translationArea:"main"})),e.onTranslateTheMainPage()}}function IP({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=W(),l=r.config,c=ze(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");ji(r?.rule)&&!g&&(g=!0);let f=s("translate");t==="Translated"||t==="Error"?f=s("show-original"):t==="Original"?g?rr()&&c.protocol==="file:"||o?f=s("translate-firefox-local-pdf"):pe()?f=s("noSupportTranslate-pdf"):f=s("translate-pdf"):f=s("translate"):f=s(t);let m=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ba()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(f+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):f+=` (${M0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:i||t==="Translating",children:f})}function RP({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:i}=W(),o=On();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:ju(7)(s),children:["V",o,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function OP(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),O9]})}p();async function U9(e){try{let t=new Date;R.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Z.storage.local.set({[Yb]:t.toISOString()}),await zP(),pe()||await ST()}catch(t){R.error("run cron task failed",t)}}async function zP(){try{let e=await ir(),t=await de({url:Ma}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,i=new Date(a),o=t.minVersion,s=Z.runtime.getManifest().version;qr(s,o)?i>r?(await Z.storage.local.set({buildinConfig:t}),R.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Va({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{R.error("send content message request failed from cron task",u)})):R.debug(`no need to sync rules, latest: ${r}`):R.info(`local version is too old, please update to ${o} or later`)}catch(e){R.error("sync rules error: ",e)}}function F0(e){let{onClose:t}=e,[n,r]=K("Original"),[a,i,o,s]=$e(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});Ct(a,i);let[u,l]=K(null),[c,g]=K(globalThis.location.href),[f,m]=K("auto"),[h,y]=K(null),T=N=>{r(N.detail)};if(le(()=>(document.addEventListener(ki,T,!1),ir().then(N=>{l(N);let F=Mt();m(F);let P=et();r(P),U9(N.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",T),document.removeEventListener("urlChange",x)}),[]),le(()=>{ir().then(N=>{l(N)})},[a]),le(()=>{c&&u&&Qf().then(N=>{y(N)})},[c,u]),!u||!h)return null;return d(Yf,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:N=>{w("switchTranslationMode",!0,{mode:N})()},request:de,onClose:L,onToggleEnabled:M,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:A,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{v(Ga(h.rule)||c)},openAboutPage:D,openSharePage:w("shareToDraft",!0),onSetPageLanguage:b,setSettings:i,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:f,onSetLocalConfig:t0,onSetBuildinConfig:dT,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:C});function b(N){m(N);let F=v9(c,N,u.sourceLanguageUrlPattern);i(P=>({...P,sourceLanguageUrlPattern:F})),ar(N)}function x(){g(globalThis.location.href)}function w(N,F,P={}){let O={trigger:"page_popup",...P};return()=>{Vn({method:N,data:O}),F&&t()}}function L(){t()}function M(){i(N=>({...N,enabled:!N.enabled})),setTimeout(()=>{L()},50)}function C(N,F){let P=N;F&&(P=`${N}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),i0(P,!0),setTimeout(()=>{L()},50)}function v(N){N&&(Go(!1,N),setTimeout(()=>{L()},50))}function A(N=""){Wo(!0,N),setTimeout(()=>{t()},50)}function D(){a0(),setTimeout(()=>{t()},50)}function S(){vT(),setTimeout(()=>{t()},50)}}p();function W9(){let[e,t]=K("Original");return le(()=>{let n=et();t(n);let r=a=>{t(a.detail)};return document.addEventListener(ki,r),()=>{document.removeEventListener(ki,r)}},[]),{pageStatus:e}}var q9=6,NP={position:"right",top:335};function K9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=Ve(null),o=Ve(null),[s,u]=K(!1),l=Ve(null),c=Ve(!1),g=Ve(n.floatBallConfig||NP),f=Ve(0),m=Ve(0),h=Ve(0),y=Ve(!1),T=Ve(0),b=Ve(0),x=Ve(0),w=Ve(0),L=Ve(!1),M=qe(C=>{a||(clearTimeout(l.current),C?u(C):l.current=setTimeout(()=>{u(C),y.current=!1},st().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(i.current&&g.current){let C=Zf(g.current.top);g.current.top=C,i.current.style.top=`${C}px`,i.current.style.display="flex"}},[t,i]),le(()=>{if(!o.current||!i.current)return;let C=P=>{P.preventDefault&&P.preventDefault(),f.current=P.clientX,m.current=P.clientY,T.current=Date.now(),h.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),M(!0),x.current=P.clientX,w.current=P.clientY,L.current=!1,st().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{j9({startX:f.current,startY:m.current,endX:x.current,endY:w.current})||(L.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",S),document.addEventListener("mouseup",A),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N)},v=P=>{if(P.preventDefault&&P.preventDefault(),!c.current||!i.current||(x.current=P.clientX,w.current=P.clientY,L.current))return;let O=P.clientY-m.current+h.current,z=Zf(O);i.current.style.top=`${z}px`},A=P=>{if(P.preventDefault&&P.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||M(!1),L.current)return;j9({startX:f.current,startY:m.current,endX:P.clientX,endY:P.clientY})||(clearTimeout(b.current),e());let z=Zf(P.clientY-30);g.current.top=z;let q=Du();t0({...q,floatBallConfig:g.current})},D=P=>{P.preventDefault&&P.preventDefault(),C(P.changedTouches[0])},S=P=>{P.preventDefault&&P.preventDefault(),v(P.changedTouches[0])},N=P=>{P.preventDefault&&P.preventDefault(),A(P.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",S),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N)};return o.current.addEventListener("mousedown",C),o.current.addEventListener("touchstart",D),()=>{o.current&&(o.current.removeEventListener("mousedown",C),o.current.removeEventListener("touchstart",D))}},[t,o,i,l,c,n,M,e]),le(()=>{if(st().any)return;let C=A=>{A.target===i.current&&!y.current||(y.current=!0,M(!0),clearTimeout(l.current))},v=A=>{if(c.current){y.current=!1;return}A.target===i.current&&!y.current||M(!1)};return i.current?.addEventListener("mouseover",C),i.current?.addEventListener("mouseout",v),()=>{i.current?.removeEventListener("mouseover",C),i.current?.removeEventListener("mouseout",v)}},[i,c,M,t,y]),{ballRef:o,floatBallConfigRef:g,containerRef:i,active:s,setActive:M}}function j9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),i=Math.abs(r-t);return a>q9||i>q9}function G9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=ze(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),i=ze(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),o=ze(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function V9(){let[e,t]=K(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var H9="hasShownFloatingBallGuide",UP="2024-01-06";function $9(e){let[t,n]=K(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await qt(H9,""),i=await qt("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Y9(e,t){let n=Ve(0),[r,a]=K(!0),[i,o]=K(!1),s=$e(),[u,l]=s,{t:c}=W(),g=qe(()=>{e?.config.floatBallTooltipRule&&(st().any?o(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,o]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,st().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let f=qe(()=>{e&&(n.current=n.current+1,g(),l(y=>{let T={...y};return st().any?T.h5FloatBallMainBtnTooltipShownCount=n.current:T.pcFloatBallMainBtnTooltipShownCount=n.current,T}))},[l,g,n,e]),m=ze(()=>st().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=ze(()=>st().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Zt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:h,handleShowTooltip:f}}function Zf(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}p();var $i=`${ee}-float-ball`;function Q9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(qP,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function qP(e){let{t}=W(),[n,r]=K("UntilNext"),a=r0()+"#floating",i=t("closeQuickTranslation.settingOpen",{1:a}),o=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return d("div",{class:`${$i}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${$i}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(ri,{type:"modal-close"})})]}),d("div",{class:`${$i}-close-radio-content mt-3`,children:o.map(s=>d(jP,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ko(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${$i}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${$i}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function jP(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,i=HP(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${$i}-radio-sel`:`${$i}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:d("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function HP(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?t.push({type:"link",href:i,value:o}):s&&t.push({type:"text",value:s})}return t}p();var Yi=`${ee}-float-ball`;function Z9(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=ze(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${Yi}-guide-container`,style:r,children:[d("img",{class:`${Yi}-guide-bg ${e.fixedPosition}`,src:WP}),d("div",{class:`${Yi}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${Yi}-guide-img`,src:Er("images/float_ball_intro.png")}),d("div",{class:`${Yi}-guide-message`,children:[t("floatBall.guideClickToTranslate"),st().any?` -${t("floatBall.longPress")}`:""]}),d("div",{class:`${Yi}-primary-btn ${Yi}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var WP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";p();function KP({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var J9=KP;var Vu=`${ee}-float-ball`;function Jf(e){let{t}=W(),n=$e(),[r,a,i,o]=n;Ct(r,a);let s=Jt(r),u=Un(s),{isFullScreen:l}=V9(),[c,g]=K(!1),[f,m]=K(!0),{pageStatus:h}=W9(),y=Su(u,r),T=qe(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=_e();if(ji(u?.rule)){let B=Ga(u.rule);Go(!0,B||_);return}Vn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Vn,g]),b=qe(()=>{g(!0)},[g]),x=f&&!!s,{containerRef:w,active:L,ballRef:M,floatBallConfigRef:C,setActive:v}=K9({handleBallClick:T,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),A=y?.fixedPosition||"right",D=A==="right"?"left":"right",{isShowGuide:S,handleCloseGuide:N}=$9(e.ctx),{closeTransform:F,logoContainerTransform:P,settingTransform:O}=G9(y,L||S),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:I,handleShowTooltip:k}=Y9(u,h);return x?d("div",{class:`${Vu}-container ${A} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:L||S||c?"all":"none"},ref:w,children:[d(GP,{ctx:u,setVisible:m,closeTransform:F,setActive:v,getModalStyle:()=>X9(C.current.top,300,A)}),d(or,{enableMobile:!0,text:I,position:D,delay:z,onShow:k,disable:q,children:d("div",{class:`${Vu}-btn ${A} btn-animate `,ref:M,style:{transform:P,opacity:L||S?1:.5},children:d("div",{children:[d(ri,{type:"logo"}),h!=="Original"?d(ri,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${Vu}-more-buttons btn-animate`,children:[d(or,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${Vu}-more-button`,onClick:()=>{i0(m1,!0)},children:d(ri,{type:"file"})})}),d(or,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${Vu}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(ri,{type:"setting"})})})]}),d(VP,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>X9(C.current.top,500,A)}),d(Z9,{visible:S,top:C.current.top,fixedPosition:A,onClose:()=>{N(),v(!1)}})]}):null}function GP(e){let{t}=W(),[n,r]=K(!1),a=$e(),[i,o,s,u]=a,l=Su(e.ctx,i),c=qe(f=>{e.ctx&&o(m=>Bc({...m},f))},[e.ctx,o]),g=qe(f=>{l&&(e.setVisible(!1),f==="AlwaysClose"?c({...l,enable:!1}):f==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(ri,{type:"close"})}),d(Q9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function VP(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(J9,{isVisible:e.visible,onClose:e.onClose,children:d(F0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(F0,{onClose:e.onClose})})}):null}function $P(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var X9=(e,t,n)=>{let a=$P().height,i={position:"fixed"},o=0;return fb()&&(e=YP.top),i.top=e-o,i.top+t>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},YP={position:"right",right:0,top:335};function QP(e,t){for(let n of t){if(pe()&&!rr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function e6(){let e=Le(),t=await ir(),n=await vr(),r={url:globalThis.location.href,config:t},a=await yn(r),i=await Vp(a,n),o=_t(a.url,i?.blockUrls),s=await Wt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return QP(l,[c]),ZP(l,t,s,a)}function ZP(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(Jf,{localConfig:n,ctx:r})}),a)}var t6=!1;async function n6(){t6||(t6=!0,e6().catch(e=>{R.error("init popup error",e)}))}var r6=!1,s6=[()=>{Ut.unbind()}],a6=[...s6],JP=cr(async()=>{await Wo()},50),XP=cr(async()=>{await a0()},50),eL=cr(async()=>{await yT()},50),tL=cr(async()=>{await bT()},50),u6=cr(e=>{Vn({method:e,data:{trigger:"userscript_menu"}})},50);function nL(e,t){let n=e.document;if(r6)return;r6=!0,pe()||cT(),n.addEventListener("securitypolicyviolation",pL),document.addEventListener(be+"DocumentMessageUser",p6),document.addEventListener(be+"DocumentMessageUpdateUser",m6),document.addEventListener(be+"ChangeSuccessService",f6.bind(null,t)),document.addEventListener(be+"ChangeService",h6.bind(null,t)),document.addEventListener(Ai,cL.bind(null,t)),n.addEventListener(be+"EbookLoaded",gL),n.addEventListener(Bb,dL.bind(null,t)),n.addEventListener(Ib,mL.bind(null,t)),n.addEventListener(cc,a=>{ot()||nh(a,t)}),n.addEventListener(Rb,y6),n.addEventListener("click",a=>{iL(a,t)}),ot()&&e.addEventListener("message",aL,!1),pe()&&(ot()||n.addEventListener(oa,rL)),ot()||Za.rootIframe(Tc).handleAsk("throttleRequest",hv)}function l6(e,t){fL(),nL(t,e),pe()&&(ot()||(Kf(e.config),hL(e.config))),Ba()&&T6(e),Ge()&&Kf(e.config)}function rL(e){n6()}function aL(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===lc&&Va(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function iL(e,t){let n=e.target;if(!n||!n.getAttribute){ai(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ft(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),Xf({method:"retryFailedParagraphs"}),ai(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${ee}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}c6(d6.bind(null,t,o,i,s));return}}}async function oL(){let e=await Pn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function sL(){let e=await Pn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var i6=0;function c6(e){let t=Date.now();if(t-i6<2e3||(i6=t,uL()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),i=`${ee}-modal-title`,o=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${o}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Le();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let f=document.createElement("div");f.className=ee+"-modal-content notranslate",u.appendChild(f);let m=document.createElement("span");m.textContent="\xD7",m.className=ee+"-close",f.appendChild(m);let h=document.createElement("div");h.className=i+" notranslate",f.appendChild(h);let y=document.createElement("div");y.className=o+" notranslate",f.appendChild(y);let T=document.createElement("div");T.className=s,f.appendChild(T),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,T)}setTimeout(()=>{lL()},100)}function d6(e,t,n,r="retry",a,i,o,s){let u=jt.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=rt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",f=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),f.setAttribute(`data-${ee}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',f.appendChild(m),f.onclick=()=>{a.style.display="none",Xf({method:"retryFailedParagraphs"}),ai(f,!0)}}else if(r=="login")g=u("goLogin"),f.onclick=()=>{ai(f,!0),window.open(a1)};else if(r=="upgrade")g=u("upgradeToPro"),f.onclick=()=>{ai(f,!0),window.open(Cc)};else if(r=="setting")g=u("goSettings"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)},th(e,e.config.translationService,!1).then(m=>{m?(g=u("toggleToService",{service:u("translationServices."+m)}),f.innerHTML=rt.sanitize(g),f.onclick=()=>{b6(m),ai(f,!0)}):(g=u("goSettings"),f.innerHTML=rt.sanitize(g))});else if(r=="none")return;f.className="immersive-translate-btn",f.innerHTML+=rt.sanitize(g),s.appendChild(f)}function uL(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function lL(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function ai(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function cL(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;c6(d6.bind(null,e,a,i,o))}catch(r){R.warn("parse message error",r)}}async function dL(e,t){let n=t;if(R.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Xf({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")TT(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oL();else if(a.type==="toggleEnableInputTranslation")sL();else if(a.type==="translatePage")bL(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Mi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Xa(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:i,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...e,translationService:a.data.service};try{r=await yL(a.data,i)}catch(o){o6(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await n0(a.data):a.type==="sharePage"?nh({detail:a.data},e):a.type==="switchTranslationMode"?eh(a.data):u6(a.type);r&&a.id&&o6(a.type,r,a.id)}}catch(a){R.warn("parse message error",a)}}}function gL(e){setTimeout(()=>{g6()},10)}function pL(e){De.HAS_CSP_ERROR="1"}function mL(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ft(n.name,[{name:n.name}],{...e})}function fL(){a6.forEach(e=>{e()}),a6=s6}function hL(e){if(pe()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Ec.commands,a=[...Object.keys(t).filter(i=>i==="toggleTranslatePage").map(i=>{let o=t[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ja(`browser.${o.slice(6,-2)}`,e.interfaceLanguage)),{id:i,title:s}}),{id:au,title:ja("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:iu,title:ja("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:ru,title:ja("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:Tp,title:ja("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===ru?JP():i.id===Tp?XP():i.id===iu?eL():i.id===au?tL():u6(i.id)},i.key)}}function Xf(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{R.error("send content message request failed",e,n)});let t=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(t)}async function bL(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Je(_e(),t);_n(n)}function o6(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function yL({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),o=null;try{let s=await lt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}p();var Qi={};async function rh(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ue({text:t,minLength:200,pageLangs:[At(),"en"]});return ar(n),n}async function v6(e){An("Translating");let t=Mt(),n=Qc(),r=[...document.querySelectorAll(".source-text")];if(Bo(e,t))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return vt(i,"id",o+""),s&&(Io(s,o)?.remove(),s.appendChild(Tu(e,o))),{text:i.innerText||"",id:o,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await lt({sentences:a},{...e,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Io(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=rt.sanitize(`${i.message}`),Qi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=rt.sanitize(o.text),Qi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{An("Translated")}}async function S6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Qi),n=[],r=[];for(let a of t){let i=Qi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Qi[a],u.appendChild(Tu(e,a)),r.push(i.sentence))}}}try{await lt({sentences:r},e,(a,i,o)=>{let s=o.id,u=Io(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=rt.sanitize(`${a.message}`),Qi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=rt.sanitize(i.text),Qi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{An("Translated")}}function ah(){An("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}p();var ih={};async function C6(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(t=t+i.innerText||"",t.length>1e3))break}let n=await Ue({text:t,pageLangs:["en"]});return ar(n),n}async function x6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(ih),n=[];for(let r of t){let a=ih[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${gc}='${r}']`);o&&o.remove(),n.push(a)}}try{Wu(),await P0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}function E6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}An("Original")}async function w6(e){An("Translating");let t=du(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;qa(u,e);let l=u.body;if(!l)continue;let c=Tn(e);c.isModifyImage=!1,ha({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let i=Or(e.config.translationServices[e.translationService]),o=1;for(let s of r){let u=Kc(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await zf(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:i,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),ih[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await P0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}p();var wr=!1,B0,D6=!1,I0=null;function k6(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){R.debug("exclude url for input");return}if(I0===!1){R.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Rn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=0,s=Date.now();B0&&self.removeEventListener("keydown",B0),B0=u,self.addEventListener("keydown",B0);function u(c){if(wr||I0===!1)return;let g=c,f=g.target||g.srcElement,m=f?.tagName;(f?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(ML(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&SL()&&(o=0,vL(c,e,i))}FL(e)}function P6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let i of a){let o=t.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function R0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var cs;function L6(e){let t=e.parentElement;if(!t)return;cs=document.createElement("div"),cs.className=ee+"-input",cs.innerHTML=`
`,t.appendChild(cs);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function _6(){cs&&cs.remove()}async function TL(e){if(!wr)try{let h=function(){c=e.config.inputTargetLanguage;let T=l.split(" ")[0];T&&T[0]&&(T=T[0].toLowerCase()+T.slice(1)),T.trim()&&i.flatAlias.includes(T)?(c=R0(T,i.codeAlias),u=l.slice(T.length+1)):u=l},y=function(){c="";let T=P6(i),b=l.split(T);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let w=l.lastIndexOf(u),L=l.slice(0,w).lastIndexOf(b[b.length-2]);s=l.slice(0,L+b[b.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=R0(x,i.codeAlias),!c){R.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Rn.forEach(T=>n[T]=[T,...n[T]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;wr=!0;let s="",u="",l=ii(o)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=M6(u,i),f=await Ue({text:g,pageLangs:["en"]});R.debug("translateContent",g,f);let m={text:g||"",id:0,from:f,to:c,url:"https://google.com",fromByClient:f,force:!0};if(!m.text||m.text.length>5e3)return;L6(o),at(dc,Date.now());try{let T=await Nr(m,{...e,translationService:e.inputTranslationService});B6(e),F6(e,o,s+T.text)}catch(T){if(T instanceof Q){let b=T.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:b}))}}finally{wr=!1}}catch(t){throw wr=!1,t}finally{wr=!1,_6()}}async function vL(e,t,n){if(!wr)try{let g=function(){s=t.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=R0(m,n.codeAlias),i=o.slice(m.length+1)):i=o},f=function(){s="";let m=P6(n),h=o.split(m);if(h.length<2)return;if(i=h[h.length-1],a=h[0],h.length>2){let T=o.lastIndexOf(i),b=o.slice(0,T).lastIndexOf(h[h.length-2]);a=o.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let y=o.slice(a.length+1,o.indexOf(i)).trim();if(s=R0(y,n.codeAlias),!s){R.warn("not found alias",y);return}},r=document.activeElement;wr=!0;let a="",i="",o=ii(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(f(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=M6(i,n),l=await Ue({text:u,pageLangs:["en"]});R.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!D6){D6=!0;let m=await BL(t);if(e.target&&e.target.focus(),m==="open_settings"){Wo(!0,"#input");return}else if(m==="open_learn_more"){Ko("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(I0=!1,m==="disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="disable_once"){let h=await Pn();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(I0=!1,m==="close_disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="enable"){let h=await Pn();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="close_enable"){let h=await Pn();h.enableInputTranslation=!0,await kn(h)}}L6(r),at(dc,Date.now());try{let m=await Nr(c,{...t,translationService:t.inputTranslationService});B6(t),F6(t,r,a+m.text)}catch(m){if(m instanceof Q){let h=m.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:h}))}}finally{wr=!1}}catch(r){throw wr=!1,r}finally{wr=!1,_6()}}function SL(){let e=document.activeElement;if(!e)return!1;if(O0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` +`,jf="immersive-translate-toastify-shadow-root",Hf=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(jf)){let t=document.getElementById(jf);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=jf,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=fP,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${i})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${t[i]}px`,t[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function L0(e){e=e||{},new Hf({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}p();function y9(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}p();p();p();function Vn(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{R.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:lc,payload:e},"*")});let n=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(n)}function Wf(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((i,o)=>(i[t[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&Ut(o,s=>{s.preventDefault();let u=r[i];Vn({method:u,data:{trigger:"shortcut"}})})}}p();p();p();p();var T9=`${ee}-float-ball`;function ri(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${T9}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${T9}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}p();p();function v9(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},i=Object.keys(n);for(let l of i){let g=n[l].matches;for(let f of g)a[f]||(a[f]=[]),a[f].push(l)}let o=a[e];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}p();p();var _0="DROP_DOWN_DEFAULT_VALUE";function Kf(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=e;r=r||"",t=t??!0,i=i||80;let s=$e(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:_0,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==_0){s.current.value=_0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:_0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}p();var hP=({date:e})=>{let{t}=W(),[n,r]=K(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},bP=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},yP=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},TP=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Gf(e){let{isShowError:t,request:n}=e,[r,a]=K(null),{t:i}=W(),[o,s]=K(null),[u,l]=K(null),[c,g]=K(""),[f,m]=K(!1),[h,y]=K(!1),[T,b]=K(!1),[x,w]=K(null),[L,M]=K(null),C=On(),v=async()=>{g("");let A=o;if(o===null)try{let D=await n({url:Ma});D?(s(D),A=D,m(!0)):(g(i("unknownError")),l(null))}catch(D){l(null),g(D.message);return}A!==null?(e.setStorageBuildinConfig(A),l(!1),a(A.buildinConfigUpdatedAt)):(g(i("canNotFetchRemoteRule")),l(null))};return le(()=>{yt().then(A=>{let D=A.buildinConfigUpdatedAt;w(A);let S=new Date(D);if(a(D),C==="0.0.0"){b(!0);return}n({url:Ma}).then(N=>{let F=N,P=F.minVersion,O=C;s(F);let z=F.latestVersion;if(z&&(qr(O,z)?M(!0):M(!1)),qr(O,P)){let q=F.buildinConfigUpdatedAt;new Date(q)>S?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(N=>{l(null),g(N.message)})})},[]),le(()=>{yt().then(A=>{w(A)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:T?d(yP,{}):c?t===!1?null:d(TP,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(bP,{minVersion:o.minVersion}):u===null||u===!0?null:f?d(hP,{date:r}):null}):null}p();function vP(){return navigator.userAgent.indexOf("Mac")!==-1}var S9={Alt:"\u2325"};function M0(e=""){return vP()?Object.keys(S9).reduce((t,n)=>t.replace(n,S9[n]),e):e}p();function C9({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return da(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Li:i1,children:[d("img",{src:t?Nv:zv}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Li:s1,children:d("img",{src:n?ju:Rv})})]})}p();function x9({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let i=Xa(t.config.translationService,t.config.targetLanguage),o=Rn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(SP,{supportedLanguages:o,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Uv,style:{maxWidth:"unset"},class:"mx-2"}),d(CP,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function SP(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&e.onSelected(o)},children:e.supportedLanguages.map((i,o)=>{let s=Zt(i,e.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Zt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:i,selected:i===e.value,children:u||s},"selectlink"+o)})})]})}function CP(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Zt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}p();function E9(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=DP(e);return n.length?d(xe,{children:[d(w9,{class:"mt-3",label:t("popupService"),items:r}),d(xP,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function w9(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Ur,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xP({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=wP(e),i=EP(e),o=qe((u,l)=>{t(c=>{let g=c.translationServices||{},f=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...f,[u]:l}}}})},[]),s=ze(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==i[u.name],onSelected:()=>{o(u.name,g.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(w9,{class:"mt-2",label:u,items:l},"field-"+c))})}function EP(e){return ze(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function wP(e){return ze(()=>{let{translationService:n}=e.config;if(nr[n])return _o("translationService",n,e)},[nr,_o,e])}function DP({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=W(),u=ze(()=>t?Mi(t,"translationService"):[],[Mi,t]),l=qe(g=>{let f=u.find(m=>m.id===g.value);if(f.ok){if(n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;f.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:f.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=ze(()=>{let g=Ge();return u.filter(m=>t.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!e&&!g&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}p();p();function D9(e){let t;try{t=new URL(e)}catch{return!1}let n=hT(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(AP(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function AP(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}p();function A9(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function k9(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=kP(e),[o,s]=K(()=>a?"excludeMatches":"matches"),u=ze(()=>r||a||!1,[r,a]),l=qe(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Ur,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;i(g?o:"default",n.hostname)}})]})}function kP({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,g=null,f=null,m=null,{translationUrlPattern:h}=t.config;if(l=ze(()=>new URL(e||""),[e]),t.config&&e&&D9(e)){c=A9(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(w=>_t(e,w)),f=!!x.find(w=>_t(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?m=!0:m=!1}let y=qe(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],w=x.filter(M=>M.match!==b),L=!1;w.length!==x.length&&(L=!0),L&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),T=qe((b,x)=>{if(b==="default"){s(M=>{let C={...M.translationUrlPattern};return{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,matches:Vf(e,C.matches),excludeMatches:Vf(e,C.excludeMatches)}}}),y();return}let w=b,L=w==="matches"?"excludeMatches":"matches";l&&s(M=>{let C={...M.translationUrlPattern};return C[L]=Vf(e,C[L]),C[w]=zn(x,C[w]),{...M,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...M.translationUrlPattern,...C}}}),w==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:f,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:T}}function Vf(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}p();function P9(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=PP(e);return _i(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||sa[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:d(LP,{...e})}function PP({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=ze(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),i=ze(()=>sa.filter(s=>!(s==="Off"||sa.includes(a)&&s==="OtherCustom")),[e,a]);return ze(()=>i.map(s=>{let u=r("mouseHoldKey",{key:M0(s)}),l=sa.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(f=>{let m={...f.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=g.value),{...f,generalRule:m}})}}}),[i,a])}function LP(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,i=Object.keys(Vu).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Ur,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(f=>{let m={...f.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=g.value),{...f,generalRule:m}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let f=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?f:"touchShortcutsOff"}}})}})]})}p();function L9(e){let{isAlwaysTranslateLang:t}=_P({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Zt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Ht(e.currentLang,u.matches),excludeMatches:Ht(e.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=zn(e.currentLang,u[i]),u[o]=Ht(e.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _P({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}p();p();var _9=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),M9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),F9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),B9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),I9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),R9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),O9=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function N9({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Le(),i=Math.round((Fo.supportedVideoSubtitleSites||[]).length/10),o=ze(()=>[{title:r("widget.translateFile"),icon:_9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:M9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:F9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(xc)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?d(or,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(z9,{...s})}):d(z9,{...s}))})}function z9(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function $f(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=e,[s,u]=K(""),[l,c]=K(i),[g,f]=K(null),[m,h]=K(null);le(()=>{ot.get(bt,null).then(x=>{x?(f(x),h(Qt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,T=Ge();n&&T&&(y=n.generalRule.showSponsorOnSafari);let b=da(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(C9,{isLogin:!!g,isProUser:!!m,config:n}),d(OP,{openSharePage:r})]}),d(x9,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(E9,{isProUser:!!m,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(FP,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(IP,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Gf,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(k9,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(P9,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(L9,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(MP,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:t})]}),d(N9,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(BP,{...e,isProUser:!!m,isShowPricing:y,setMessage:u})]})}function MP(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return ze(()=>!n.rule.subtitleRule.disabled&&xp.includes(n.rule.subtitleRule.type||""),[n,xp])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function FP(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(i)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(or,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?I9:R9})})}function BP(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:i}=e.ctx,o=60;n.startsWith("zh")||(o=70);let s=Le(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[B9,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(RP,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Kf,{label:t("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(Fa),e.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?e.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?e.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),e.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),e.onClose()):m.value==="options"?(e.openOptionsPage(),e.onClose()):m.value==="changeToTranslateTheWholePage"?g():m.value==="changeToTranslateTheMainPage"?f():m.value==="about"?e.openAboutPage():m.value==="toggleEnabled"?e.onToggleEnabled():m.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&e.onOpenUrl(Fa,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),e.openOptionsPage()}function c(m){e.setSettings(h=>({...h,translationMode:m})),e.onSwitchTranslationMode(m)}function g(){e.setSettings(m=>({...m,translationArea:"body"})),e.onTranslateTheWholePage()}function f(){e.setSettings(m=>({...m,translationArea:"main"})),e.onTranslateTheMainPage()}}function IP({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=W(),l=r.config,c=ze(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");ji(r?.rule)&&!g&&(g=!0);let f=s("translate");t==="Translated"||t==="Error"?f=s("show-original"):t==="Original"?g?rr()&&c.protocol==="file:"||o?f=s("translate-firefox-local-pdf"):pe()?f=s("noSupportTranslate-pdf"):f=s("translate-pdf"):f=s("translate"):f=s(t);let m=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ba()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(f+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):f+=` (${M0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:i||t==="Translating",children:f})}function RP({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:i}=W(),o=On();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Hu(7)(s),children:["V",o,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function OP(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),O9]})}p();async function U9(e){try{let t=new Date;R.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Z.storage.local.set({[Yb]:t.toISOString()}),await zP(),pe()||await ST()}catch(t){R.error("run cron task failed",t)}}async function zP(){try{let e=await ir(),t=await de({url:Ma}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,i=new Date(a),o=t.minVersion,s=Z.runtime.getManifest().version;qr(s,o)?i>r?(await Z.storage.local.set({buildinConfig:t}),R.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Va({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{R.error("send content message request failed from cron task",u)})):R.debug(`no need to sync rules, latest: ${r}`):R.info(`local version is too old, please update to ${o} or later`)}catch(e){R.error("sync rules error: ",e)}}function F0(e){let{onClose:t}=e,[n,r]=K("Original"),[a,i,o,s]=Ye(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});Ct(a,i);let[u,l]=K(null),[c,g]=K(globalThis.location.href),[f,m]=K("auto"),[h,y]=K(null),T=N=>{r(N.detail)};if(le(()=>(document.addEventListener(ki,T,!1),ir().then(N=>{l(N);let F=Mt();m(F);let P=et();r(P),U9(N.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",T),document.removeEventListener("urlChange",x)}),[]),le(()=>{ir().then(N=>{l(N)})},[a]),le(()=>{c&&u&&Yf().then(N=>{y(N)})},[c,u]),!u||!h)return null;return d($f,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:N=>{w("switchTranslationMode",!0,{mode:N})()},request:de,onClose:L,onToggleEnabled:M,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:A,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{v(Ga(h.rule)||c)},openAboutPage:D,openSharePage:w("shareToDraft",!0),onSetPageLanguage:b,setSettings:i,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:f,onSetLocalConfig:t0,onSetBuildinConfig:dT,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:C});function b(N){m(N);let F=v9(c,N,u.sourceLanguageUrlPattern);i(P=>({...P,sourceLanguageUrlPattern:F})),ar(N)}function x(){g(globalThis.location.href)}function w(N,F,P={}){let O={trigger:"page_popup",...P};return()=>{Vn({method:N,data:O}),F&&t()}}function L(){t()}function M(){i(N=>({...N,enabled:!N.enabled})),setTimeout(()=>{L()},50)}function C(N,F){let P=N;F&&(P=`${N}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),i0(P,!0),setTimeout(()=>{L()},50)}function v(N){N&&(Go(!1,N),setTimeout(()=>{L()},50))}function A(N=""){Wo(!0,N),setTimeout(()=>{t()},50)}function D(){a0(),setTimeout(()=>{t()},50)}function S(){vT(),setTimeout(()=>{t()},50)}}p();function W9(){let[e,t]=K("Original");return le(()=>{let n=et();t(n);let r=a=>{t(a.detail)};return document.addEventListener(ki,r),()=>{document.removeEventListener(ki,r)}},[]),{pageStatus:e}}var q9=6,NP={position:"right",top:335};function K9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=$e(null),o=$e(null),[s,u]=K(!1),l=$e(null),c=$e(!1),g=$e(n.floatBallConfig||NP),f=$e(0),m=$e(0),h=$e(0),y=$e(!1),T=$e(0),b=$e(0),x=$e(0),w=$e(0),L=$e(!1),M=qe(C=>{a||(clearTimeout(l.current),C?u(C):l.current=setTimeout(()=>{u(C),y.current=!1},ut().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(i.current&&g.current){let C=Qf(g.current.top);g.current.top=C,i.current.style.top=`${C}px`,i.current.style.display="flex"}},[t,i]),le(()=>{if(!o.current||!i.current)return;let C=P=>{P.preventDefault&&P.preventDefault(),f.current=P.clientX,m.current=P.clientY,T.current=Date.now(),h.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),M(!0),x.current=P.clientX,w.current=P.clientY,L.current=!1,ut().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{j9({startX:f.current,startY:m.current,endX:x.current,endY:w.current})||(L.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",S),document.addEventListener("mouseup",A),document.addEventListener("touchend",N),document.addEventListener("touchcancel",N)},v=P=>{if(P.preventDefault&&P.preventDefault(),!c.current||!i.current||(x.current=P.clientX,w.current=P.clientY,L.current))return;let O=P.clientY-m.current+h.current,z=Qf(O);i.current.style.top=`${z}px`},A=P=>{if(P.preventDefault&&P.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||M(!1),L.current)return;j9({startX:f.current,startY:m.current,endX:P.clientX,endY:P.clientY})||(clearTimeout(b.current),e());let z=Qf(P.clientY-30);g.current.top=z;let q=Au();t0({...q,floatBallConfig:g.current})},D=P=>{P.preventDefault&&P.preventDefault(),C(P.changedTouches[0])},S=P=>{P.preventDefault&&P.preventDefault(),v(P.changedTouches[0])},N=P=>{P.preventDefault&&P.preventDefault(),A(P.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",S),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",N),document.removeEventListener("touchcancel",N)};return o.current.addEventListener("mousedown",C),o.current.addEventListener("touchstart",D),()=>{o.current&&(o.current.removeEventListener("mousedown",C),o.current.removeEventListener("touchstart",D))}},[t,o,i,l,c,n,M,e]),le(()=>{if(ut().any)return;let C=A=>{A.target===i.current&&!y.current||(y.current=!0,M(!0),clearTimeout(l.current))},v=A=>{if(c.current){y.current=!1;return}A.target===i.current&&!y.current||M(!1)};return i.current?.addEventListener("mouseover",C),i.current?.addEventListener("mouseout",v),()=>{i.current?.removeEventListener("mouseover",C),i.current?.removeEventListener("mouseout",v)}},[i,c,M,t,y]),{ballRef:o,floatBallConfigRef:g,containerRef:i,active:s,setActive:M}}function j9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),i=Math.abs(r-t);return a>q9||i>q9}function G9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=ze(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),i=ze(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),o=ze(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function V9(){let[e,t]=K(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var H9="hasShownFloatingBallGuide",UP="2024-01-06";function $9(e){let[t,n]=K(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await qt(H9,""),i=await qt("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Y9(e,t){let n=$e(0),[r,a]=K(!0),[i,o]=K(!1),s=Ye(),[u,l]=s,{t:c}=W(),g=qe(()=>{e?.config.floatBallTooltipRule&&(ut().any?o(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,o]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,ut().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let f=qe(()=>{e&&(n.current=n.current+1,g(),l(y=>{let T={...y};return ut().any?T.h5FloatBallMainBtnTooltipShownCount=n.current:T.pcFloatBallMainBtnTooltipShownCount=n.current,T}))},[l,g,n,e]),m=ze(()=>ut().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=ze(()=>ut().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Zt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:h,handleShowTooltip:f}}function Qf(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}p();var $i=`${ee}-float-ball`;function Q9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(qP,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function qP(e){let{t}=W(),[n,r]=K("UntilNext"),a=r0()+"#floating",i=t("closeQuickTranslation.settingOpen",{1:a}),o=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return d("div",{class:`${$i}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${$i}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(ri,{type:"modal-close"})})]}),d("div",{class:`${$i}-close-radio-content mt-3`,children:o.map(s=>d(jP,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Ko(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${$i}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${$i}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function jP(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,i=HP(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${$i}-radio-sel`:`${$i}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:d("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function HP(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?t.push({type:"link",href:i,value:o}):s&&t.push({type:"text",value:s})}return t}p();var Yi=`${ee}-float-ball`;function Z9(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=ze(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${Yi}-guide-container`,style:r,children:[d("img",{class:`${Yi}-guide-bg ${e.fixedPosition}`,src:WP}),d("div",{class:`${Yi}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${Yi}-guide-img`,src:Er("images/float_ball_intro.png")}),d("div",{class:`${Yi}-guide-message`,children:[t("floatBall.guideClickToTranslate"),ut().any?` +${t("floatBall.longPress")}`:""]}),d("div",{class:`${Yi}-primary-btn ${Yi}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var WP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";p();function KP({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var J9=KP;var $u=`${ee}-float-ball`;function Zf(e){let{t}=W(),n=Ye(),[r,a,i,o]=n;Ct(r,a);let s=Jt(r),u=Un(s),{isFullScreen:l}=V9(),[c,g]=K(!1),[f,m]=K(!0),{pageStatus:h}=W9(),y=Cu(u,r),T=qe(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=_e();if(ji(u?.rule)){let B=Ga(u.rule);Go(!0,B||_);return}Vn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Vn,g]),b=qe(()=>{g(!0)},[g]),x=f&&!!s,{containerRef:w,active:L,ballRef:M,floatBallConfigRef:C,setActive:v}=K9({handleBallClick:T,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),A=y?.fixedPosition||"right",D=A==="right"?"left":"right",{isShowGuide:S,handleCloseGuide:N}=$9(e.ctx),{closeTransform:F,logoContainerTransform:P,settingTransform:O}=G9(y,L||S),{tooltipDelay:z,disableTooltipDelay:q,tooltipText:I,handleShowTooltip:k}=Y9(u,h);return x?d("div",{class:`${$u}-container ${A} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:L||S||c?"all":"none"},ref:w,children:[d(GP,{ctx:u,setVisible:m,closeTransform:F,setActive:v,getModalStyle:()=>X9(C.current.top,300,A)}),d(or,{enableMobile:!0,text:I,position:D,delay:z,onShow:k,disable:q,children:d("div",{class:`${$u}-btn ${A} btn-animate `,ref:M,style:{transform:P,opacity:L||S?1:.5},children:d("div",{children:[d(ri,{type:"logo"}),h!=="Original"?d(ri,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${$u}-more-buttons btn-animate`,children:[d(or,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${$u}-more-button`,onClick:()=>{i0(m1,!0)},children:d(ri,{type:"file"})})}),d(or,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${$u}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(ri,{type:"setting"})})})]}),d(VP,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>X9(C.current.top,500,A)}),d(Z9,{visible:S,top:C.current.top,fixedPosition:A,onClose:()=>{N(),v(!1)}})]}):null}function GP(e){let{t}=W(),[n,r]=K(!1),a=Ye(),[i,o,s,u]=a,l=Cu(e.ctx,i),c=qe(f=>{e.ctx&&o(m=>Bc({...m},f))},[e.ctx,o]),g=qe(f=>{l&&(e.setVisible(!1),f==="AlwaysClose"?c({...l,enable:!1}):f==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(ri,{type:"close"})}),d(Q9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function VP(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(J9,{isVisible:e.visible,onClose:e.onClose,children:d(F0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(F0,{onClose:e.onClose})})}):null}function $P(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var X9=(e,t,n)=>{let a=$P().height,i={position:"fixed"},o=0;return fb()&&(e=YP.top),i.top=e-o,i.top+t>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},YP={position:"right",right:0,top:335};function QP(e,t){for(let n of t){if(pe()&&!rr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function e6(){let e=Le(),t=await ir(),n=await vr(),r={url:globalThis.location.href,config:t},a=await yn(r),i=await Gp(a,n),o=_t(a.url,i?.blockUrls),s=await Wt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return QP(l,[c]),ZP(l,t,s,a)}function ZP(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(Zf,{localConfig:n,ctx:r})}),a)}var t6=!1;async function n6(){t6||(t6=!0,e6().catch(e=>{R.error("init popup error",e)}))}var r6=!1,s6=[()=>{Ut.unbind()}],a6=[...s6],JP=cr(async()=>{await Wo()},50),XP=cr(async()=>{await a0()},50),eL=cr(async()=>{await yT()},50),tL=cr(async()=>{await bT()},50),u6=cr(e=>{Vn({method:e,data:{trigger:"userscript_menu"}})},50);function nL(e,t){let n=e.document;if(r6)return;r6=!0,pe()||cT(),n.addEventListener("securitypolicyviolation",pL),document.addEventListener(be+"DocumentMessageUser",p6),document.addEventListener(be+"DocumentMessageUpdateUser",m6),document.addEventListener(be+"ChangeSuccessService",f6.bind(null,t)),document.addEventListener(be+"ChangeService",h6.bind(null,t)),document.addEventListener(Ai,cL.bind(null,t)),n.addEventListener(be+"EbookLoaded",gL),n.addEventListener(Bb,dL.bind(null,t)),n.addEventListener(Ib,mL.bind(null,t)),n.addEventListener(cc,a=>{st()||th(a,t)}),n.addEventListener(Rb,y6),n.addEventListener("click",a=>{iL(a,t)}),st()&&e.addEventListener("message",aL,!1),pe()&&(st()||n.addEventListener(oa,rL)),st()||Za.rootIframe(Tc).handleAsk("throttleRequest",hv)}function l6(e,t){fL(),nL(t,e),pe()&&(st()||(Wf(e.config),hL(e.config))),Ba()&&T6(e),Ge()&&Wf(e.config)}function rL(e){n6()}function aL(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===lc&&Va(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function iL(e,t){let n=e.target;if(!n||!n.getAttribute){ai(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&ht(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),Jf({method:"retryFailedParagraphs"}),ai(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${ee}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}c6(d6.bind(null,t,o,i,s));return}}}async function oL(){let e=await Pn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function sL(){let e=await Pn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var i6=0;function c6(e){let t=Date.now();if(t-i6<2e3||(i6=t,uL()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),i=`${ee}-modal-title`,o=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${o}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Le();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let f=document.createElement("div");f.className=ee+"-modal-content notranslate",u.appendChild(f);let m=document.createElement("span");m.textContent="\xD7",m.className=ee+"-close",f.appendChild(m);let h=document.createElement("div");h.className=i+" notranslate",f.appendChild(h);let y=document.createElement("div");y.className=o+" notranslate",f.appendChild(y);let T=document.createElement("div");T.className=s,f.appendChild(T),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,T)}setTimeout(()=>{lL()},100)}function d6(e,t,n,r="retry",a,i,o,s){let u=jt.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=at.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",f=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),f.setAttribute(`data-${ee}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',f.appendChild(m),f.onclick=()=>{a.style.display="none",Jf({method:"retryFailedParagraphs"}),ai(f,!0)}}else if(r=="login")g=u("goLogin"),f.onclick=()=>{ai(f,!0),window.open(a1)};else if(r=="upgrade")g=u("upgradeToPro"),f.onclick=()=>{ai(f,!0),window.open(Cc)};else if(r=="setting")g=u("goSettings"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),f.onclick=()=>{ai(f,!0),window.open(De.OPTIONS_URL)},eh(e,e.config.translationService,!1).then(m=>{m?(g=u("toggleToService",{service:u("translationServices."+m)}),f.innerHTML=at.sanitize(g),f.onclick=()=>{b6(m),ai(f,!0)}):(g=u("goSettings"),f.innerHTML=at.sanitize(g))});else if(r=="none")return;f.className="immersive-translate-btn",f.innerHTML+=at.sanitize(g),s.appendChild(f)}function uL(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function lL(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function ai(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function cL(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;c6(d6.bind(null,e,a,i,o))}catch(r){R.warn("parse message error",r)}}async function dL(e,t){let n=t;if(R.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Jf({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")TT(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oL();else if(a.type==="toggleEnableInputTranslation")sL();else if(a.type==="translatePage")bL(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Mi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Xa(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:i,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...e,translationService:a.data.service};try{r=await yL(a.data,i)}catch(o){o6(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await n0(a.data):a.type==="sharePage"?th({detail:a.data},e):a.type==="switchTranslationMode"?Xf(a.data):u6(a.type);r&&a.id&&o6(a.type,r,a.id)}}catch(a){R.warn("parse message error",a)}}}function gL(e){setTimeout(()=>{g6()},10)}function pL(e){De.HAS_CSP_ERROR="1"}function mL(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&ht(n.name,[{name:n.name}],{...e})}function fL(){a6.forEach(e=>{e()}),a6=s6}function hL(e){if(pe()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Ec.commands,a=[...Object.keys(t).filter(i=>i==="toggleTranslatePage").map(i=>{let o=t[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=ja(`browser.${o.slice(6,-2)}`,e.interfaceLanguage)),{id:i,title:s}}),{id:iu,title:ja("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:ou,title:ja("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:au,title:ja("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:yp,title:ja("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===au?JP():i.id===yp?XP():i.id===ou?eL():i.id===iu?tL():u6(i.id)},i.key)}}function Jf(e){Va(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{R.error("send content message request failed",e,n)});let t=new CustomEvent(oa,{detail:e});globalThis.document.dispatchEvent(t)}async function bL(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Je(_e(),t);_n(n)}function o6(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function yL({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),o=null;try{let s=await nt({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}p();var Qi={};async function nh(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ue({text:t,minLength:200,pageLangs:[At(),"en"]});return ar(n),n}async function v6(e){An("Translating");let t=Mt(),n=Qc(),r=[...document.querySelectorAll(".source-text")];if(Bo(e,t))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return vt(i,"id",o+""),s&&(Io(s,o)?.remove(),s.appendChild(vu(e,o))),{text:i.innerText||"",id:o,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await nt({sentences:a},{...e,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=Io(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=at.sanitize(`${i.message}`),Qi[u]={ok:!1,sentence:s}):o&&(c.innerHTML=at.sanitize(o.text),Qi[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{An("Translated")}}async function S6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Qi),n=[],r=[];for(let a of t){let i=Qi[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Qi[a],u.appendChild(vu(e,a)),r.push(i.sentence))}}}try{await nt({sentences:r},e,(a,i,o)=>{let s=o.id,u=Io(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=at.sanitize(`${a.message}`),Qi[s]={ok:!1,sentence:o}):i&&(l.innerHTML=at.sanitize(i.text),Qi[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{An("Translated")}}function rh(){An("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}p();var ah={};async function C6(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(t=t+i.innerText||"",t.length>1e3))break}let n=await Ue({text:t,pageLangs:["en"]});return ar(n),n}async function x6(e){An("Translating"),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(ah),n=[];for(let r of t){let a=ah[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${gc}='${r}']`);o&&o.remove(),n.push(a)}}try{Ku(),await P0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}function E6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}An("Original")}async function w6(e){An("Translating");let t=gu(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;qa(u,e);let l=u.body;if(!l)continue;let c=Tn(e);c.isModifyImage=!1,ha({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let i=Or(e.config.translationServices[e.translationService]),o=1;for(let s of r){let u=Kc(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Of(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:i,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),ah[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await P0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{An("Translated")}}p();var wr=!1,B0,D6=!1,I0=null;function k6(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){R.debug("exclude url for input");return}if(I0===!1){R.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Rn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ut().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=0,s=Date.now();B0&&self.removeEventListener("keydown",B0),B0=u,self.addEventListener("keydown",B0);function u(c){if(wr||I0===!1)return;let g=c,f=g.target||g.srcElement,m=f?.tagName;(f?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(ML(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&SL()&&(o=0,vL(c,e,i))}FL(e)}function P6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let i of a){let o=t.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function R0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var cs;function L6(e){let t=e.parentElement;if(!t)return;cs=document.createElement("div"),cs.className=ee+"-input",cs.innerHTML=`
`,t.appendChild(cs);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function _6(){cs&&cs.remove()}async function TL(e){if(!wr)try{let h=function(){c=e.config.inputTargetLanguage;let T=l.split(" ")[0];T&&T[0]&&(T=T[0].toLowerCase()+T.slice(1)),T.trim()&&i.flatAlias.includes(T)?(c=R0(T,i.codeAlias),u=l.slice(T.length+1)):u=l},y=function(){c="";let T=P6(i),b=l.split(T);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let w=l.lastIndexOf(u),L=l.slice(0,w).lastIndexOf(b[b.length-2]);s=l.slice(0,L+b[b.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=R0(x,i.codeAlias),!c){R.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Rn.forEach(T=>n[T]=[T,...n[T]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ut().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;wr=!0;let s="",u="",l=ii(o)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=M6(u,i),f=await Ue({text:g,pageLangs:["en"]});R.debug("translateContent",g,f);let m={text:g||"",id:0,from:f,to:c,url:"https://google.com",fromByClient:f,force:!0};if(!m.text||m.text.length>5e3)return;L6(o),it(dc,Date.now());try{let T=await Nr(m,{...e,translationService:e.inputTranslationService});B6(e),F6(e,o,s+T.text)}catch(T){if(T instanceof Q){let b=T.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:b}))}}finally{wr=!1}}catch(t){throw wr=!1,t}finally{wr=!1,_6()}}async function vL(e,t,n){if(!wr)try{let g=function(){s=t.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=R0(m,n.codeAlias),i=o.slice(m.length+1)):i=o},f=function(){s="";let m=P6(n),h=o.split(m);if(h.length<2)return;if(i=h[h.length-1],a=h[0],h.length>2){let T=o.lastIndexOf(i),b=o.slice(0,T).lastIndexOf(h[h.length-2]);a=o.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let y=o.slice(a.length+1,o.indexOf(i)).trim();if(s=R0(y,n.codeAlias),!s){R.warn("not found alias",y);return}},r=document.activeElement;wr=!0;let a="",i="",o=ii(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(f(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=M6(i,n),l=await Ue({text:u,pageLangs:["en"]});R.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!D6){D6=!0;let m=await BL(t);if(e.target&&e.target.focus(),m==="open_settings"){Wo(!0,"#input");return}else if(m==="open_learn_more"){Ko("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(I0=!1,m==="disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="disable_once"){let h=await Pn();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(I0=!1,m==="close_disable_forever"){let h=await Pn();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(m==="enable"){let h=await Pn();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(m==="close_enable"){let h=await Pn();h.enableInputTranslation=!0,await kn(h)}}L6(r),it(dc,Date.now());try{let m=await Nr(c,{...t,translationService:t.inputTranslationService});B6(t),F6(t,r,a+m.text)}catch(m){if(m instanceof Q){let h=m.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ai,{detail:h}))}}finally{wr=!1}}catch(r){throw wr=!1,r}finally{wr=!1,_6()}}function SL(){let e=document.activeElement;if(!e)return!1;if(O0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` `).reverse()[0].trim(),i=n<=t;return R.debug("cursorPosition",t,"textLength",n),R.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let t=window.getSelection();if(!t)return R.debug("No active selection found."),!1;if(t.rangeCount>0){let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=CL(r,e);R.debug("Current text node:",r.textContent),R.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=e.innerText?.split(` -`).reverse(),s=Ge()?o[0]||o[1]:o[0];return R.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else R.debug("Cursor is not within a text node.")}}return!1}function CL(e,t){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(t),n==e}function M6(e,t){let{triggerTimes:n,triggerKey:r}=t,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=e.length;for(let s=e.length-1;s>=e.length-a;s--){if([10,8629].includes(e[s].charCodeAt(0))){o--;continue}if(![...t.codePrefixAlias[r]||[],i].includes(e[s]))break;o--}return e.length-o<3&&[".","\u3002"].includes(e[o-1])&&o--,e.slice(0,o)}function xL(e,t){let n=t.innerHTML,r=ii(t);return{html:n.replace(r,e),text:e}}function A6(e,t,n=!1){let r=ii(t);return n?r.trim().endsWith(e.text.trim()):r?.trim()?.indexOf(e?.text?.trim())>=0}function ii(e){return e.value||e.innerText||e.textContent}async function oi(e){await new Promise((t,n)=>{setTimeout(()=>{t("")},e)})}async function EL(e,t,n){await oi(10);let r=new DataTransfer;e.forEach(a=>{a==="plain"&&r.setData("text/plain",t.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await oi(10)}async function wL(e,t){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,e.text),t.dispatchEvent(n),await oi(10))}async function DL(e,t){t.value&&t.select(),document.execCommand("insertText",!1,e.text.replace(/\n/g,"\r")),await oi(20),(t.value||t.value==="")&&(t.value=e.text)}async function AL(e,t){O0(t)&&(t.value=e.text,t.dispatchEvent(new Event("input",{bubbles:!0})),await oi(20))}var kL=[EL.bind(null,["plain"])];function PL(e){let t;O0(e)?t=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):t=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),e.dispatchEvent(t)}function O0(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function LL(e){if(O0(e))return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}async function F6(e,t,n){await LL(t),await oi(50);let r=e.rule.inputConfig,a=xL(n,t);try{r?.clearContentEnable&&PL(t),await oi(50),r?.execCommandDeleteEnable&&!rr()&&ii(t)?.trim()!=""&&(document.execCommand("delete"),await oi(50)),R.debug("clearContent",ii(t))}catch(i){R.error(i)}for(let i of[...kL,DL,AL,wL]){await i(a,t);let o=_L();if(!o)return;if(R.debug("setContent",i.name,A6(a,o),ii(o),a),A6(a,o))break}}function _L(){return document.activeElement}function B6(e){ft("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:e.config.inputTrailingTriggerKey,input_starting_trigger_key:e.config.inputStartingTriggerKey,input_target_language:e.config.inputTargetLanguage}}],e)}function ML(e,t,n){let r="";e&&e.code&&(r=e.code.toLowerCase());let a="";e&&e.key&&(a=e.key.toLowerCase());let i=e.keyCode,o=n[t]||[];return i===229&&t!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===t||a===t)}async function FL(e){if(e.config.interfaceLanguage!=="zh-CN"||e.config.targetLanguage!=="zh-CN")return;let t="inputTutorialsShowedAt";if(await qt(t,"")||Number(await qt(dc,0))>0)return;let a=e.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{IL()},100),new Promise(g=>{let f=g;if(o){let D=o.shadowRoot;if(!D)return;s=D.querySelector(`.${n}`);let S=s.querySelector(`.${r}`),N=s.querySelector(`.${i}`),F=s.querySelector(`.${a}`)}else{let D=document.createElement("div");D.setAttribute("translate","no"),D.className="no-translate immersive-translate-error-modal-input-shadow-root",D.id=t,D.style.all="initial",D.style.zIndex="2147483647",document.body.appendChild(D);let S=D.attachShadow({mode:"open"}),N=document.createElement("style"),F=Le();N.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,S.appendChild(N),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let P=document.createElement("div");P.className=ee+"-modal-content notranslate "+ee+"-modal-content-in-input",s.appendChild(P);let O=document.createElement("span");O.textContent="\xD7",O.className=ee+"-close",P.appendChild(O),u=document.createElement("div"),u.className=r+" notranslate",P.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",P.appendChild(c),l=document.createElement("div"),l.className=i,P.appendChild(l),S.appendChild(s),O.onclick=function(){M(),g("close")},S.addEventListener("click",z=>{z.target==s&&(s.style.display="none",g("close"))})}document.addEventListener("keydown",A);let m=jt.bind(null,e);u.innerHTML=`
${T0} ${m("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let h=document.createElement("p");h.innerHTML=m("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),h.style.cssText="margin-bottom:12px",c.appendChild(h);let y=document.createElement("div");y.style.cssText="margin-bottom: 12px;",y.innerHTML=rt.sanitize(m("disableInputTranslationTips",{option:`${m("option")}`,learnMore:`${m("learnMore")}`})),c.appendChild(y);let T=[{id:"enable-search-enhancement",value:"enable",text:m("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:m("disableOnce")},{id:"disable-global",value:"global",text:m("disableGlobal")}];for(let D=0;Dl===t)||e.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(e.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=e,u={dsn:RL,environment:Le().PROD==="1"?"production":"develop",...e.initOptions};s?.ignoreErrors&&(u.ignoreErrors=oh(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=oh(s.denyUrls)),s?.allowUrls&&(u.allowUrls=oh(s.allowUrls)),u.release=`${n}@${t}`,wi.init(u),N0()}catch{}}async function N0(){try{let e=await it.get(ht,null);if(!$u||!e)return;wi.setUser({id:e.id,username:e.userName,nickname:e.nickName,email:e.email})}catch{}}function R6(e,t){try{if(!$u)return;wi.setContext(e,t)}catch{}}function O6(e){try{if(!$u)return;wi.setTags(e)}catch{}}function oh(e){return e.map(t=>new RegExp(t))}var ye=null,U0={},gs,z6=!1;async function g6(){qi.clearStrictTicks();let e=await Je(_e(),{}),t=await Du();if(R.debug("init page ctx",e),j6(e),e.rule.pageType=="subtitleBuilder"){rh();return}if(e.rule.pageType=="ebookBuilder"){C6();return}if(gs||(gs=e.state.translationTheme),e.rule.urlChangeDelay&&await xn(e.rule.urlChangeDelay),e.rule.waitForSelectors&&e.rule.waitForSelectors.length>0&&await VL(e.rule.waitForSelectors,e.rule.waitForSelectorsTimeout),e.rule.isInjectOptionsUrl){let s=r0(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){R.warn("inject options url failed",l)}}if(e.rule.globalMeta&&Object.keys(e.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=e.rule.globalMeta[u],document.head.appendChild(l)}),e.rule.initialGlobalAttributes&&s9(document.body,e.rule.initialGlobalAttributes),e.rule.pageType=="pdfReader"){_n(e);return}if(e.config.arxivRule&&e.config.arxivRule.matches&&_t(e.url,e.config.arxivRule.matches)){let u=document.querySelector(e.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(e.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let T=l.getAttribute("href");try{let b=new URL(T);b.searchParams.set("_immersive_translate_auto_translate","1"),c=b.toString()}catch{}}let m=new URL(e.url).pathname.split("/").pop(),h=!1,y=!0;if(m)try{let b=m.split(".")[0],x=b.slice(0,2),w=b.slice(2,4),L=new Date(`20${x}-${w}-27`),M=new Date(e.config.arxivRule.validBefore);L${jt(e,"viewWithImmersiveTranslate")}`,u.appendChild(T)}else{let T="";if(c&&(T=c),T){let b=document.createElement("li");b.innerHTML=`${jt(e,"viewWithImmersiveTranslate")}`,u.appendChild(b)}}}}if(e.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!e.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!e.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}z6||(z6=!0,ot()&&e.rule.useIframePostMessage&&await mv());let n=e.sourceLanguage;n==="auto"?n=await N6():ar(n);let r=py(e,n);if(r&&(e=await Je(_e(),{translationMode:r})),e.rule.isInjectMeta)try{let s=await cy(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=tg(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){R.warn("inject meta failed",s)}let a=new URL(e.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||e.state.isAutoTranslate||e.isTranslateUrl||e.rule.pageType=="pdfReader";if(!o&&!e.isTranslateExcludeUrl&&(R.debug(`detect page language: ${e.url} ${n}`),Ia(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto"||y9(n,e.config.translationLanguagePattern)&&(o=!0,R.debug(`match language pattern ${n}, auto translate`))),e.rule.pageType=="ebookBuilder"&&(o=!1),e.rule.pageType!=="pdfReader"&&_i(t)&&ps(e,window),o)ye.state.isAutoTranslate=!0,_n(ye);else if(R.debug("do not auto translate",e),e.rule.initTranslationServiceAsSoonAsPossible&&e.translationService==="deepl"){if(Ia(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto")return;e.config&&e.config.translationServices&&e.config.translationServices.deepl&&e.config.translationServices.deepl.authKey&&typeof e.config.translationServices.deepl.authKey=="string"&&e.config.translationServices.deepl.authKey.startsWith("immersive_")&&(U0[e.translationService]||(U0[e.translationService]=!0,ot()||nf(e).catch(s=>{R.warn("init translation engine error",s)})))}}async function uh(e){if(et()==="Original"){let t={};gs&&(t.translationTheme=gs),ye&&(t={...ye.state,...t});let n=await Je(_e(),t);if(e?.trigger=="right_menu"&&ji(n?.rule)){let r=Ga(n.rule);Go(!0,r||_e());return}await _n(ye,e)}else(et()==="Translated"||et()==="Error")&&Zi()}async function OL(){if(ye=await Je(_e(),{}),ye.rule.pageType=="ebookBuilder")return x6(ye);if(ye.rule.pageType=="subtitleBuilder")return S6(ye);W6()}async function lh(e){if(et()==="Original"){ye=await Je(_e(),{}),gs||(gs=ye.state.translationTheme);let t="mask";ye.state.translationTheme==="opacity"&&(t="opacity"),ye=await Je(_e(),{translationTheme:t}),await _n(ye,e)}else if(et()==="Translated"){let t="mask";ye?.state?.translationTheme==="opacity"&&(t="opacity");let n=sy().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[ye.mainFrame,...n],a=ye?.state.translationTheme;for(let i of r){let o=No(i,ko,!0);a==="mask"||a==="opacity"?o!=="none"?vt(i,ko,"none",!0):vt(i,ko,t,!0):o!=="mask"&&o!=="opacity"?vt(i,ko,t,!0):vt(i,ko,"none",!0)}}}async function N6(){let e=await Je(_e(),{});return e.rule.pageType=="subtitleBuilder"?rh():H6(e)}function zL(e){et()==="Original"?I6(e):Ji()}function NL(e){et()==="Original"?v6(e):ah()}function UL(e){et()==="Original"?ds(e):Ji()}async function Zi(){Vo(""),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let e=await Je(_e(),{});if(e.rule.pageType=="subtitleBuilder"){ah();return}else e.rule.pageType=="ebookBuilder"&&E6();Ji()}async function _n(e,t){e.config?.sentryConfig?.contentInitTime=="translate_page"&&z0(e.config?.sentryConfig);let n=et(),r={pageStatus:n,translateService:e.state.translationService||e.translationService,translationMode:e.state.translationMode};R6("translatePage",r),O6(r),n!=="Original"&&await Zi(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:e.targetLanguage}})})),U0[e.translationService]||(U0[e.translationService]=!0,ot()||nf(e).catch(i=>{R.warn("init translation engine error",i)}));let a={};if(t&&t.trigger&&(a.trigger=t.trigger),ft("translage_page_daily",[{name:"translage_page_daily",params:a}],e),ft("translate_page",[{name:"translate_page",params:a}],{...e,sourceLanguage:Mt()}),e.rule.pageType=="subtitleBuilder"){NL(e),Vo("yes");return}if(e.rule.pageType=="ebookBuilder"){w6(e),Vo("yes");return}if(e.rule.pageType==="pdfReader"){zL(e),Vo("yes");return}UL(e),Vo("yes")}async function qL(e,t){let n=ye?.translationService;if(et()==="Original"||n!=e){ye=await Je(_e(),{translationService:e});let r=jt(ye,"temprarilyChangeTranslationTo_"+e);L0({text:r}),await _n(ye,t)}else{Zi();let r=await ir(),a={url:_e(),config:r,state:{}},i=await yn(a);ye=await Je(_e(),{translationService:i.translationService})}}async function jL(e){et()==="Original"?await sh(e):(et()==="Translated"||et()==="Error")&&(ye=await Je(_e(),{}),ye.state.translationArea!=="main"?await sh(e):Zi())}async function sh(e){ye=await Je(_e(),{translationArea:"main"}),await _n(ye,e)}async function U6(e){ye=await Je(_e(),{translationArea:"body"}),await _n(ye,e)}async function ch(e){let t=await Je(_e(),{}),n=t.state.translationMode=="dual"?"translation":"dual";if(t=await Je(_e(),{translationMode:n}),et()==="Original"){_n(t,e);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function eh(e){if(ye=await Je(_e(),{translationMode:e}),ft("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:e}}],{...ye,sourceLanguage:"unknown"}),et()==="Original"){_n(ye);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(e)}async function HL(e){if(et()==="Original")await U6(e);else if(et()==="Translated"||et()==="Error"){let t={};ye&&ye.state&&(t=ye.state),ye=await Je(_e(),t),ye.state.translationArea!=="body"?(ye.state.translationArea="body",ye=await Je(_e(),ye.state),await _n(ye,e)):Zi()}}async function q6(e){ye=await Je(_e(),{translationStartMode:"immediate"}),await _n(ye,e)}async function WL(e){et()==="Original"?await q6(e):(et()==="Translated"||et()==="Error")&&Zi()}function KL(){return ye}async function Je(e,t){let n=Object.keys(t);if(ye){let r={url:e,config:ye.config,state:{...ye.state,...t}};ye=await yn(r)}else{let r=await ir(),a=t;n.length===0&&(a=void 0),ye=await yn({url:e,config:r,state:a})}return ye.state&&ye.state.translationService&&(ye.translationService=ye.state.translationService),ye.state&&ye.state.targetLanguage&&(ye.targetLanguage=ye.state.targetLanguage),ye}async function GL(){let e=await Pn()||{},t=e.generalRule||{},n=t["subtitleRule.add"]||{},r=!n.preTranslation;await kn({...e,generalRule:{...t,"subtitleRule.add":{...n,preTranslation:r}}}),r?L0({text:jt(ye,"videoSubtitlePreTranslationOn")}):L0({text:jt(ye,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Qf(){let e=await ir(),t=await Du(),n;ye&&ye.state&&(n=ye.state);let r={url:_e(),config:e,state:n},a=await yn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),ye=a,dh(ye);let i=Yu(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{l6(a,s),_i(t)&&ps(a,s),k6(a)}),a}function VL(e,t=3e3){return new Promise((n,r)=>{let a=t?setTimeout(()=>{n(new Error("timeout"))},t):void 0,i=setInterval(()=>{e.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function p6(e){let t=e.detail,n=Pn();await Hv(t.token,n,kn),it.set(ht,t);let r=await it.get(uu,!1);it.set(uu,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),N0()}function m6(e){R.debug("update user info",e);let t=e.detail;it.set(ht,t),N0()}async function f6(e){let t=await Pn();if(t.translationService)return;let n=e.config.translationService,r=await th(e,n);if(e.translationService!==r){if(!r){Bi([{name:"no_avaliable_translation_service"}]);return}t.translationService=r,kn(t),e.translationService=r,Bi([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function h6(e,t){let n=t.detail;if(e.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await Pn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),kn(i)}async function th(e,t,n=!0){let r=e.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===t?n?-1:1:i===t?n?1:-1:0),await Fv(r,e)}async function b6(e){let t=await Pn();t.translationService=e,await kn(t);let n=await Je(_e(),{});n.translationService=e,await _n(n)}sT({detectCurrentPageLanguage:N6,ensureSwitchTranslationMode:ch,restorePage:Zi,retryFailedParagraphs:OL,switchTranslationMode:eh,toggleTranslatePage:uh,toggleTranslateTheMainPage:jL,toggleTranslateTheWholePage:HL,toggleTranslationMask:lh,toggleVideoSubtitlePreTranslation:GL,translatePage:_n,translatePageWithTranslationService:qL,translateTheMainPage:sh,translateTheWholePage:U6,translateToThePageEndImmediately:q6,toggleTranslateToThePageEndImmediately:WL,updateGlobalContext:Qf,getPureGlobalContext:KL});p();p();function q0({parent:e,ctx:t,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||ee+n.name;e.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&Kn(l,a),e.appendChild(u),Ta(d(as,{lang:t.config.interfaceLanguage,fallbackLang:"zh-CN",translations:nn,children:d(n,{...r})}),l)}p();p();p();function ms(e){return si(e).subtitles}function si(e){let t=[],n=e.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Eh.htmlEncode(i.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`${n}`,r},__=e=>/]*>[\s\S]*]*>/.test(e),TS=un({name:yS,build:L_,detect:__,helper:Eh,parse:P_});p();var M_="srt",Xu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},F_=(e,t)=>{let n=[],r=t.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${t.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Eh.htmlEncode(i.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`
${n}`,r},__=e=>/]*>[\s\S]*]*>/.test(e),TS=ln({name:yS,build:L_,detect:__,helper:Eh,parse:P_});p();var M_="srt",Xu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},F_=(e,t)=>{let n=[],r=t.eol||`\r `,a=e.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Xu.toMilliseconds(s[2]),u.end=Xu.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}t.verbose}return n},B_=(e,t)=>{let n="",r=t.eol||`\r -`;for(let a=0;a ${Xu.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}t.verbose}return n},I_=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),vS=un({name:M_,build:B_,detect:I_,helper:Xu,parse:F_});p();var R_="sub",wh=25,O_=(e,t)=>{t.fps||=wh;let n=t.fps>0?t.fps:wh,r=[],a=t.eol||`\r +`;for(let a=0;a ${Xu.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}t.verbose}return n},I_=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),vS=ln({name:M_,build:B_,detect:I_,helper:Xu,parse:F_});p();var R_="sub",wh=25,O_=(e,t)=>{t.fps||=wh;let n=t.fps>0?t.fps:wh,r=[],a=t.eol||`\r `,i=e.split(/\r?\n/g);for(let o=0;o{let n=(t.fps||0)>0?t.fps:wh,r="",a=t.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},N_=e=>/^\{\d+\}\{\d+\}.*/.test(e),SS=un({name:R_,build:z_,detect:N_,parse:O_});p();var U_="vtt",el={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},q_=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=el.toMilliseconds(s[2]),l.end=el.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},j_=(e,t)=>{let n=t.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${el.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}t.verbose}return r},H_=e=>/^\s*WEBVTT\r?\n/.test(e),CS=un({name:U_,build:j_,detect:H_,helper:el,parse:q_});var W_={vtt:CS,lrc:hS,smi:TS,ssa:pS,ass:mS,sub:SS,srt:vS,sbv:bS,json:fS},xS=W_;var K_=e=>JSON.parse(JSON.stringify(e)),Dh=class{format=xS;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(t);if(o===!0||o===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(t,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(t,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ue({text:i.map(c=>c.text).join(` -`),pageLangs:[At(),"en"]});if(yt(ve(o),this.ctx.targetLanguage))return null;Ye(this.ctx,ve(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,g)=>{c.text=u[g]}),tl.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};p();var ud=class extends Qe{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ue({text:i.map(u=>u.textContent).join(` -`),pageLangs:[At(),"en"]});return yt(ve(o),this.ctx.targetLanguage)?null:(Ye(this.ctx,ve(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),ve(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};p();var ld=class extends Qe{hasSubtitle=!1;async mutationVideoChange(){let t=G_(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",t),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(t);r&&(Ye(this.ctx,"ja","av"),this.hasSubtitle=!0,ba(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return tl.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){R.error("fetchSubtitle",n);return}}};function G_(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var V_={youtube:V0,netflix:$0,webvtt:hs,khanacademy:Y0,bilibili:Q0,udemy:Z0,hulu:ad,text_track:li,text_track_dynamic:ys,general:J0,live:bs,ebutt:td,disneyplus:nd,"fmp4.xml":rd,multi_attach_vtt:id,twitter:od,subsrt:sd,xml:ud,av:ld},cd;function j6(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=V_[t.type];if(!n)return;cd=new n(e)}catch(t){R.error(t)}}async function Ah(){cd?.onPageStatusChange()}async function $_(e,t){if(cd?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&ot())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),ft("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function Y_(){cd?.onTranslationModeChanged()}lT({autoEnableSubtitleChanged:$_,reloadSubtitleWithTranslationModeChanged:Y_});var fe=null;function Yu(){return fe||null}function ds(e){Q_(e),rM(e),eM(e),nM(e),qa(document,e),An("Translated"),tM(fe),X_(fe),f9(Ji),Z_(fe),Ah(),dM()}function Q_(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=Tn(e);u9(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}us(e)&&vt(document.documentElement,be+"_rtl",e.targetLanguage)}function Z_(e){h9(e)}function J_(){b9()}function X_(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=r9(e.ctx);if(R.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Gi(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Gi(i,e)})}async function eM(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Wt(),n=Date.now(),a=new URL(e.url).hostname,i=t.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Kt({...t,tempTranslationUrlMatches:[...i]})}}function tM(e){e.ctx.rule.isTranslateTitle&&(Mf(e.ctx),e.titleDynamicObserver=l9(e.ctx))}function nM(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function dh(e){if(!fe)return;let t=Tn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function rM(e){let t=du();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],dh(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||lM(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||cM(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||oM(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||sM(fe),fe.injectCssToDocument=dd,fe.walkContainer=ha,fe.allInlineWindows=[window],window.onerror=iM(fe,e),window.immersiveTranslateSwitchTranslateState=Ph.bind(fe)}function kS(e,t){t.getRootNode()instanceof ShadowRoot?dd(t.getRootNode(),e):dd(t.ownerDocument,e),aM(e)}function aM(e){fe||(fe={},fe.ctx=e,fe.id=du(),kh(fe,e))}function kh(e,t){e.paragraphQueue=[],e.injectCssToDocument=dd;let n=Tn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=Ph.bind(e),e}function Ji(e=!0){fe&&(An("Original"),Ah(),J_(),Wu(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),c9(fe.ctx),iy(),oy(),e&&Ph.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function iM(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),Ji(),n=setTimeout(()=>{ds(t)},e.urlChangeDelay||2e3)),!0}}function oM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(Rf(e,r.target),n.unobserve(r.target))})})}function sM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Of(e,o)}),n.unobserve(a)}})})}var wS;function uM(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(wS),e.translateState=="original"?!1:(Ji(e.urlChangeDelay>20),wS=setTimeout(()=>{let a=e.ctx;ds(a)},e.urlChangeDelay),!0)):!1}function lM(e){let t=e.ctx.rule,n=Tn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&uM(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!Nn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&Nn(a.target,t.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(fc)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&DS(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&jf(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&DS(e,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!za(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Ro(n,i.parentElement);u&&(xt.clearToParentMark(i,u),AS(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||ln(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:i.contains(u)).length&&AS(e,a.target)}catch(i){R.error(i)}}})}function DS(e,t,n){let r=e.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(ln(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{qf(n),ha({id:e.id,container:n,filterRule:t,force:!0,onParagraph:o=>{Vi(e,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function AS(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,i=t;xt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Gi(t,e,n),i.timer=null},a)}function qf(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function jf(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||ln(n,["."+Lt]))).length==0}function cM(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Lf(i)||(n.unobserve(r.target),xt.clearMark(a),Gi(a,e))}})}function Ph(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Hu(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function dd(e,t){if(e instanceof HTMLIFrameElement){qa(e.contentDocument,t);return}qa(e,t)}async function H6(e){let t=ot(),n="auto";if(pe()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Zp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})):(r=zo(e.mainFrame).slice(0,1e3),n=await Ue({text:r,pageLangs:[At(),"en"]}))}else if(t)n=await Ue({text:zo(e.mainFrame).slice(0,1e3),pageLangs:[At(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Zp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})}else n=await gT();return n==="auto"&&(n=await m9()),oT(n),n}async function W6(){if(!fe)return;Wu(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${gc}='${n}']`);i&&i.remove()}}k0.call(fe,fe.ctx)}async function nh(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),ft("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await Wt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?gy():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let f="";globalThis.document.body.getAttributeNames().forEach(m=>{f+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},N_=e=>/^\{\d+\}\{\d+\}.*/.test(e),SS=ln({name:R_,build:z_,detect:N_,parse:O_});p();var U_="vtt",el={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),i=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},q_=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=el.toMilliseconds(s[2]),l.end=el.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},j_=(e,t)=>{let n=t.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${el.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}t.verbose}return r},H_=e=>/^\s*WEBVTT\r?\n/.test(e),CS=ln({name:U_,build:j_,detect:H_,helper:el,parse:q_});var W_={vtt:CS,lrc:hS,smi:TS,ssa:pS,ass:mS,sub:SS,srt:vS,sbv:bS,json:fS},xS=W_;var K_=e=>JSON.parse(JSON.stringify(e)),Dh=class{format=xS;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(t);if(o===!0||o===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(t,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(t,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ue({text:i.map(c=>c.text).join(` +`),pageLangs:[At(),"en"]});if(dt(ye(o),this.ctx.targetLanguage))return null;Ve(this.ctx,ye(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,g)=>{c.text=u[g]}),tl.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};p();var sd=class extends Qe{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ue({text:i.map(u=>u.textContent).join(` +`),pageLangs:[At(),"en"]});return dt(ye(o),this.ctx.targetLanguage)?null:(Ve(this.ctx,ye(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),ye(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return R.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};p();var ud=class extends Qe{hasSubtitle=!1;async mutationVideoChange(){let t=G_(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",t),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(t);r&&(Ve(this.ctx,"ja","av"),this.hasSubtitle=!0,ba(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return tl.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){R.error("fetchSubtitle",n);return}}};function G_(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var V_={youtube:G0,netflix:V0,webvtt:bs,khanacademy:$0,bilibili:Y0,udemy:Q0,hulu:rd,text_track:li,text_track_dynamic:Ts,general:Z0,live:ys,ebutt:ed,disneyplus:td,"fmp4.xml":nd,multi_attach_vtt:ad,twitter:id,subsrt:od,xml:sd,av:ud},ld;function j6(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=V_[t.type];if(!n)return;ld=new n(e)}catch(t){R.error(t)}}async function Ah(){ld?.onPageStatusChange()}async function $_(e,t){if(ld?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&st())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),ht("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function Y_(){ld?.onTranslationModeChanged()}lT({autoEnableSubtitleChanged:$_,reloadSubtitleWithTranslationModeChanged:Y_});var fe=null;function Qu(){return fe||null}function ds(e){Q_(e),rM(e),eM(e),nM(e),qa(document,e),An("Translated"),tM(fe),X_(fe),f9(Ji),Z_(fe),Ah(),dM()}function Q_(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=Tn(e);u9(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}us(e)&&vt(document.documentElement,be+"_rtl",e.targetLanguage)}function Z_(e){h9(e)}function J_(){b9()}function X_(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=r9(e.ctx);if(R.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Gi(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{Gi(i,e)})}async function eM(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Wt(),n=Date.now(),a=new URL(e.url).hostname,i=t.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Kt({...t,tempTranslationUrlMatches:[...i]})}}function tM(e){e.ctx.rule.isTranslateTitle&&(_f(e.ctx),e.titleDynamicObserver=l9(e.ctx))}function nM(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function ch(e){if(!fe)return;let t=Tn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function rM(e){let t=gu();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],ch(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||lM(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||cM(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||oM(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||sM(fe),fe.injectCssToDocument=cd,fe.walkContainer=ha,fe.allInlineWindows=[window],window.onerror=iM(fe,e),window.immersiveTranslateSwitchTranslateState=Ph.bind(fe)}function kS(e,t){t.getRootNode()instanceof ShadowRoot?cd(t.getRootNode(),e):cd(t.ownerDocument,e),aM(e)}function aM(e){fe||(fe={},fe.ctx=e,fe.id=gu(),kh(fe,e))}function kh(e,t){e.paragraphQueue=[],e.injectCssToDocument=cd;let n=Tn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=Ph.bind(e),e}function Ji(e=!0){fe&&(An("Original"),Ah(),J_(),Ku(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),c9(fe.ctx),iy(),oy(),e&&Ph.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function iM(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),Ji(),n=setTimeout(()=>{ds(t)},e.urlChangeDelay||2e3)),!0}}function oM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(If(e,r.target),n.unobserve(r.target))})})}function sM(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Rf(e,o)}),n.unobserve(a)}})})}var wS;function uM(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(wS),e.translateState=="original"?!1:(Ji(e.urlChangeDelay>20),wS=setTimeout(()=>{let a=e.ctx;ds(a)},e.urlChangeDelay),!0)):!1}function lM(e){let t=e.ctx.rule,n=Tn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&uM(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!Nn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&Nn(a.target,t.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(fc)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&DS(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&qf(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&DS(e,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!za(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=Ro(n,i.parentElement);u&&(xt.clearToParentMark(i,u),AS(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||cn(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:i.contains(u)).length&&AS(e,a.target)}catch(i){R.error(i)}}})}function DS(e,t,n){let r=e.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(cn(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Uf(n),ha({id:e.id,container:n,filterRule:t,force:!0,onParagraph:o=>{Vi(e,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function AS(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,i=t;xt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{Gi(t,e,n),i.timer=null},a)}function Uf(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function qf(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||cn(n,["."+Lt]))).length==0}function cM(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Pf(i)||(n.unobserve(r.target),xt.clearMark(a),Gi(a,e))}})}function Ph(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Wu(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function cd(e,t){if(e instanceof HTMLIFrameElement){qa(e.contentDocument,t);return}qa(e,t)}async function H6(e){let t=st(),n="auto";if(pe()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Qp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})):(r=zo(e.mainFrame).slice(0,1e3),n=await Ue({text:r,pageLangs:[At(),"en"]}))}else if(t)n=await Ue({text:zo(e.mainFrame).slice(0,1e3),pageLangs:[At(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Qp(e.mainFrame),n=await Ue({text:r,pageLangs:["en"]})}else n=await gT();return n==="auto"&&(n=await m9()),oT(n),n}async function W6(){if(!fe)return;Ku(),document.dispatchEvent(new CustomEvent(Yt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${gc}='${n}']`);i&&i.remove()}}k0.call(fe,fe.ctx)}async function th(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),ht("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await Wt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?gy():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let f="";globalThis.document.body.getAttributeNames().forEach(m=>{f+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(T,b)=>"imt_"+b.replaceAll("translation","t"))},await Kt(a);let h=Le().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let T=new URL(h);T.pathname=y.shareConfig.sharePath,h=T.toString()}Ko(h)}catch(m){R.error(m)}}async function y6(){let e=await Wt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Ob,{detail:JSON.stringify(e.draft)}))}async function dM(){try{if(await Fc("reportActive"))return;R.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Gp();await de({url:Pi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),bu("reportActive","1")}catch(e){R.error(e)}}var gM=new AbortController,{signal:pM}=gM,gd=0,pd=0,Ts=!1,to,PS=0,ci=[];function ps(e,t){mM();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(R.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,ps(n,t)):(R.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,ps(n,t))}document.addEventListener(nu,s),ci.push(()=>{document.removeEventListener(nu,s)});let u=cr(f=>{if(!(Math.abs(f.clientX-gd)+Math.abs(f.clientY-pd)<=3)&&(gd=f.clientX,pd=f.clientY,o||Ts&&!to)){let m=FS(n.rule,t);if(m){if(Fh(m))return;Mh(n,!1,m)}}},o?700:300),l=f=>{let m=f.target;Fh(m)||Mh(n,!0)},c=f=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",h=Ut.getPressedKeyCodes();if(h.length>1&&Ut[m]&&(PS=Date.now(),Ts=!1),h.length===1&&Ut[m]){let y=Date.now();Ts=!0,to&&clearTimeout(to),to=setTimeout(()=>{let T=PS-y;T>0&&T<=i?Ts=!1:l(f),to=void 0},i)}};if(ci.push(()=>{to&&clearTimeout(to)}),a)return;Lh("mousemove",u,t),ci.push(()=>{t.removeEventListener("mousemove",u)});function g(){o?u.cancel():Ts=!1}if(Lh("blur",g,t),ci.push(()=>{t.removeEventListener("blur",g)}),!o){let f=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=r1;Lh("keyup",LS,t),ci.push(()=>{t.removeEventListener("keyup",LS)}),m.includes(f)?Ut("*","mouseHover",c):Ut(r.generalRule.mouseHoverHoldKey,"mouseHover",l),Ut.setScope("mouseHover"),ci.push(()=>{Ut.deleteScope("mouseHover")})}}function mM(){ci.forEach(e=>e()),ci=[],Ut.setScope("all")}function LS(e){Ts=!1}function Lh(e,t,n=window){return n.addEventListener(e,t,{signal:pM})}function Mh(e,t,n,r=window){if(n=n||FS(e.rule,r),!n){R.debug("can not find selection part!");return}if(hM(n,t))return;if(Fh(n)){R.debug("exclude dom");return}kS(e,n);let i=Yu();i&&(i.setupMouseHoverListener=ps);let o=Tn(e);o.excludeSelectors=[],o.selectors=[];let s=!1,u=kh({...i},e);ha({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Vi(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let g=Date.now();at(Ub,g),ft("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function FS(e,t){return fM(gd,pd,e,t)}function fM(e,t,n,r){let a=Ey(e,t,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=wy(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:MS(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){R.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{yM(r)}),!0}function bM(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function yM(e){let t=Yu();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Hu(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function _h(e){return!!(e.host&&e.mode)}function _S(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||_h(n))return e;for(;n&&n.nodeName!=="BODY"&&!_h(n)&&Yp(n,t);){let r=n.parentNode;if(r&&_h(r))break;n=r}return n}function MS(e,t){return e.nodeType===Node.TEXT_NODE||Yp(e,t)?_S(e,t):e}function BS(e,t){gd=t.clientX,pd=t.clientY,Mh(e,!0)}var nl=[];function Bh(e,t){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",i),nl.push(()=>{document.removeEventListener("click",i)})}function IS(e,t){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),nl.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function md(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),nl.push(()=>{document.removeEventListener("touchstart",r)})}var Gu={touchShortcutsOff:()=>{},"multipleClick.2":Bh,"multipleClick.3":Bh,"multipleClick.4":Bh,"slide.left":IS,"slide.right":IS,"fingers.2":md,"fingers.3":md,"fingers.4":md,"fingers.5":md};async function T6(e){try{xM();let t=await vr(),n=hc.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Ih(e,t,r.command),i=Gu[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{CM(r.command,e,u)})})}catch(t){R.error(t)}}function Ih(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var TM=()=>{uh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},vM=()=>{ch();let e=new CustomEvent(oa,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},SM=()=>{lh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},RS=0,CM=(e,t,n)=>{new Date().getTime()-RS<200||(RS=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?TM():e==="touchShortcutsToggleTranslationMask"?SM():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?vM():e==="touchShortcutsToggleTranslateTouchElement"&&BS(t,n))};function xM(){nl.forEach(e=>{e()}),nl=[]}function rl(e){let{onChange:t,type:n,title:r,command:a,description:i,shortcut:o,disabled:s}=e,[u,l]=K(!1),{t:c}=W();if(n==="finger")return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("select",{class:"select !w-36",onChange:g=>{g.preventDefault();let f=g.target.value;t(f)},children:Object.keys(Gu).map((g,f)=>d("option",{value:g,selected:o===g,children:`${c(g)}`},"finger-"+f))})]});if(n==="mouseHoverHoldKey"){let g=sa.includes(o);return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d(Ur,{className:"select",maxWidth:250,items:sa.filter(f=>!(g&&f==="OtherCustom"||f==="OtherCustom")).map(f=>{let m=c("mouseHoldKey",{key:f}),h=sa.includes(o),y=f===o;return o==="Off"&&f===o&&u&&(y=!1),f==="Auto"?m=c("mouseHoldKeyAuto"):f==="Off"?m=c("mouseHoldKeyOff"):f==="OtherCustom"?m=h?c("mouseHoldKeyOther"):c("mouseHoldKeyCustomKey",{key:o}):f==="Other"&&(m=c("mouseHoldKeyOther")),h||f==="Other"&&(y=!0),{label:m,value:f,selected:y,onSelected:T=>{T.value==="Other"?(l(!0),t("Off",!0)):(l(!1),t(T.value))}}})})]}),(!g||u)&&d("div",{class:"nav",children:[d(Ae,{title:c("mouseHoverCustomKeyTitle"),description:c("mouseHoverCustomKeyDescription")||""}),d("input",{type:"text",class:"!w-36",placeholder:c("mouseHoverShortcutPlaceholder"),name:"mouseHoverHoldKey",value:o==="Off"?"":o,onChange:f=>{t(f.target.value)}})]})]})}return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("div",{children:[d("input",{type:"text",class:"!w-36",disabled:s,id:a,name:a,value:o,onChange:g=>{t(g.target.value)}}),s&&d("div",{class:"ml-2 inline-block",children:d(or,{width:200,multiple:!0,text:c("shortcutDisableTooltip"),children:d("span",{children:d(n9,{width:20,height:16})})})})]})]})}function Rh(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=fa(),{t:u}=W(),l=Jt(t),c=Un(l);return l?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("mouseHoverOptions")})}),d(ss,{image:Er("images/hover_intro.png"),nightImage:Er("images/hover_intro_night.png"),title:u("intro.hoverTitle"),description:u("intro.hoverDescription")}),d(rl,{onChange:(g,f)=>{n(m=>{let y={...m.generalRule||{},mouseHoverHoldKey:g||"Off"};return g!=="Off"&&(y.mouseHoverPreferenceKey=g),{...m,generalRule:y}}),f||ut(u("saved"))},type:"mouseHoverHoldKey",title:u("mouseHoverHoldKey"),command:"mouseHoverHoldKey",description:u("desc.mouseHoverHoldKey"),shortcut:l.generalRule.mouseHoverHoldKey,disabled:!1}),d(EM,{setSettings:n,config:l}),!k1()&&d("div",{class:"nav",children:[d(Ae,{title:u("confirmSupportMouse"),description:u("confirmSupportMouseDescription")}),d("label",{for:"confirmSupportMouse",children:d("input",{type:"checkbox",onChange:g=>{let f=g.target.checked;s({...o,confirmSupportMouse:f})},checked:o?.confirmSupportMouse===!0,id:"confirmSupportMouse",name:"switch",role:"switch"})})]}),d(ni,{config:l,ctx:c,serviceType:"mouseHoverTranslationService"})]})}):null}function EM({setSettings:e,config:t}){let{t:n}=W();return Ba()?d(rl,{onChange:(r,a)=>{e(i=>{let s={...i.generalRule||{},touchShortcutsToggleTranslateTouchElement:r||"touchShortcutsOff"};return r&&r!=="touchShortcutsOff"&&(s.touchShortcutsToggleTranslateTouchElementPreferenceKey=r),{...i,generalRule:s}}),a||ut(n("saved"))},type:"finger",title:n("touchShortcutsToggleTranslateTouchElement"),command:"touchShortcutsToggleTranslateTouchElement",description:n("desc.touchShortcutsToggleTranslateTouchElement"),shortcut:t.generalRule.touchShortcutsToggleTranslateTouchElement,disabled:!1}):null}p();function Oh(){let e=$e(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),u=qe(f=>{s&&n(m=>Bc({...m},f))},[s,n]),l=Su(s,t),{t:c}=W(),g=qe((f,m)=>c("floatBallOptions."+f,m),[]);return!s||!l?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:c("floatBallOptions")})}),d(ss,{image:Er("images/float_ball_intro.png"),nightImage:Er("images/float_ball_intro_night.png"),title:c("intro.floatBallTitle"),description:c("intro.floatBallDescription")}),d(wM,{config:s.config,t:g,rawT:c,rule:l,updateFloatBallRule:u}),d(DM,{t:g,rule:l,updateFloatBallRule:u}),d(AM,{t:g,rule:l,updateFloatBallRule:u}),d(kM,{t:g,rule:l,updateFloatBallRule:u})]})})}function wM({rule:e,config:t,updateFloatBallRule:n,t:r,rawT:a}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:r("enable"),description:e.isPc?r("enableDescPc"):r("enableDesc",{touch:a("fingers."+t.generalRule.fingerCountToToggleTranslagePageWhenTouching)})}),d("label",{for:"enable",children:d("input",{type:"checkbox",id:"enable",name:"switch",role:"switch",onChange:i=>{let o=i.target.checked;e.enable=o,n(e)},checked:e.enable})})]})})}function DM({t:e,rule:t,updateFloatBallRule:n}){let[r,a]=K(!1),[i,o]=K(""),[s,u]=K(-1);le(()=>{Ut("esc",()=>{a(!1)})},[]);let l=()=>{a(!r)},c=(m,h,y,T)=>{l(),s==h&&h!=-1?t.blockUrls[h]=m:t.blockUrls=zn(m,t.blockUrls),n(t),u(-1),o("")},g=(m,h)=>{m.forEach(y=>{t.blockUrls=Ht(y,t.blockUrls)}),n(t),u(-1),o("")},f=(m,h,y)=>{a(!r),o(m),u(y)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e("blockUrls"),description:e("blockUrlDesc")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:m=>{m.preventDefault(),l()},children:e("add")})}),r?d(ma,{toggleModal:m=>{m.preventDefault(),l()},onSubmitAddUrl:c,type:"excludeMatches",urlValue:i,index:s}):null]}),d(ei,{urls:t.blockUrls||[],type:"excludeMatches",onDeleteUrl:g,onEditUrl:f})]})}function AM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("clickType"),description:e("clickTypeDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.clickType=r.target.value,n(t)},children:[d("option",{value:"translate",selected:t.clickType=="translate",children:e("clickTranslate")}),d("option",{value:"popup",selected:t.clickType=="popup",children:e("clickPopup")})]})]})})}function kM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("fixedPosition"),description:e("fixedPositionDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.fixedPosition=r.target.value,n(t)},children:[d("option",{value:"left",selected:t.fixedPosition=="left",children:e("fixedPositionLeft")}),d("option",{value:"right",selected:t.fixedPosition=="right",children:e("fixedPositionRight")})]})]})})}p();function zh(){let e=$e(),[t,n,r,a,i]=e,[o]=fa();Ct(t,n);let[s,u]=K(null),{t:l}=W();if(le(()=>{bt().then(m=>{yn({config:m,url:globalThis.location.href}).then(h=>{u(h)})})},[t]),!s)return d("div",{children:"loading"});let c={...s.config,shortcuts:{...s.config.shortcuts}},g=hc.filter(m=>m.name==="touch"?Ba():m.name==="mouse"?_i(o):!0).map(m=>({name:m.name,shortcuts:m.shortcuts.map(h=>{let y="",T="normal";typeof h=="string"?y=h:(y=h.command,h.type&&(T=h.type));let b="";l(`desc.${y}`)!==`desc.${y}`&&(b=l(`desc.${y}`));let w="";T==="finger"?w=Ih(s,t,y):T==="mouseHoverHoldKey"?t?.generalRule&&t?.generalRule[y]!==void 0?w=t.generalRule[y]:w=c.generalRule[y]:t?.shortcuts&&t?.shortcuts[y]!==void 0?w=t.shortcuts[y]:w=c.shortcuts[y];let L=l(`browser.${y}`);return(T==="finger"||T==="mouseHoverHoldKey")&&(L=l(`${y}`)),{command:y,type:T,shortcut:w,title:L,description:b,disabled:!(pe()||wo())}})})),f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsSucks")," ",d("kbd",{children:"Ctrl+A"}),"\xA0",d("kbd",{children:"Alt+B"}),"\xA0",d("kbd",{children:"Command+C"}),"\xA0 ",d("kbd",{children:"Ctrl+Shift+D"})," "]});return pe()||(rr()?f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForFirefox")," ",d("a",{target:"_blank",href:"https://support.mozilla.org/zh-CN/kb/%E7%AE%A1%E7%90%86Firefox%E7%9A%84%E6%89%A9%E5%B1%95%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F",children:[l("help"),"?"]})]}):wo()||(f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForChrome"),"\xA0",d("a",{href:"#",onClick:m=>{m.preventDefault(),Z.tabs.create({url:"chrome://extensions/shortcuts"})},children:l("goSettings")})]}))),d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:l("shortcutSettingsTitle")})}),d("div",{children:d(f,{})}),g.map((m,h)=>d("article",{class:"mb-8",children:[d("div",{class:"text-gray-500 text-sm",children:l(`shortcutGroup.${m.name}`)}),m.shortcuts.map((y,T)=>Cs(rl,{...y,key:`shortcut-${T}`,onChange:(b,x)=>{n(w=>{if(y.type==="finger"){let M={...w.generalRule||{},[y.command]:b||"touchShortcutsOff"};return y.command==="touchShortcutsToggleTranslateTouchElement"&&b&&b!=="touchShortcutsOff"&&(M.touchShortcutsToggleTranslateTouchElementPreferenceKey=b),{...w,generalRule:M}}else if(y.type==="mouseHoverHoldKey"){let M={...w.generalRule||{},[y.command]:b||"Off"};return b!=="Off"&&(M.mouseHoverPreferenceKey=b),{...w,generalRule:M}}else{let L={...w?.shortcuts},M={...w,shortcuts:{...L,[y.command]:b}};return b||(M.shortcuts[y.command]=""),M}}),x||ut(l("saved"))}}))]},`shortcut-group-${h}`))]})})}p();function PM(){let[e,t]=K(null);return le(()=>{bt().then(n=>{t(n)})},[]),e}function Nh(){let[e,t,n,r,a]=$e(),i=PM(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:d(c,{})})});function c(){return le(()=>{e&&g()},[e]),d(xe,{children:d("div",{style:{width:"100%"},children:d("p",{children:[o("download_started")," ",d("a",{href:"#",class:"secondary",onClick:f=>{f.preventDefault(),g()},children:o("here")})]})})});function g(){let f=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(f,"immersive-translate-config-"+os()+".txt")}}}p();p();function OS(){return d("svg",{id:"svg",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0, 0, 400,400",children:d("g",{id:"svgg",children:[d("path",{id:"path0",d:"M116.705 75.100 L 116.600 89.000 88.900 89.103 L 61.200 89.205 61.200 137.600 L 61.200 185.995 88.900 186.097 L 116.600 186.200 116.704 207.100 L 116.807 228.000 130.604 228.000 L 144.400 228.000 144.400 207.000 L 144.400 186.000 172.200 186.000 L 200.000 186.000 200.000 137.600 L 200.000 89.200 172.200 89.200 L 144.400 89.200 144.400 75.200 L 144.400 61.200 130.605 61.200 L 116.810 61.200 116.705 75.100 M227.600 88.772 L 227.600 102.800 250.576 102.800 C 265.463 102.800,273.640 102.941,273.800 103.200 C 273.936 103.420,274.387 103.600,274.803 103.600 C 281.873 103.600,292.696 112.756,295.278 120.921 C 295.778 122.505,296.371 123.928,296.594 124.085 C 296.854 124.268,297.044 130.468,297.124 141.385 L 297.247 158.400 311.262 158.400 L 325.277 158.400 325.083 140.900 C 324.882 122.835,324.541 118.696,323.013 115.765 C 322.678 115.124,322.404 114.303,322.402 113.940 C 322.398 112.713,319.594 106.004,317.992 103.386 C 317.116 101.956,316.400 100.635,316.400 100.451 C 316.400 100.267,315.995 99.677,315.500 99.139 C 315.005 98.601,314.107 97.412,313.504 96.496 C 311.880 94.027,305.442 87.743,302.856 86.103 C 301.615 85.316,300.456 84.430,300.280 84.136 C 300.104 83.841,299.804 83.600,299.613 83.600 C 299.422 83.600,297.879 82.780,296.184 81.778 C 292.949 79.865,288.492 78.078,284.796 77.210 C 283.588 76.927,282.420 76.558,282.200 76.390 C 280.817 75.333,275.285 75.062,251.900 74.906 L 227.600 74.745 227.600 88.772 M116.600 137.600 L 116.600 158.200 102.700 158.305 L 88.800 158.410 88.800 137.600 L 88.800 116.790 102.700 116.895 L 116.600 117.000 116.600 137.600 M172.000 137.600 L 172.000 158.400 158.200 158.400 L 144.400 158.400 144.400 137.600 L 144.400 116.800 158.200 116.800 L 172.000 116.800 172.000 137.600 M255.091 172.900 C 254.773 174.314,252.711 179.778,252.412 180.000 C 252.263 180.110,251.461 182.090,250.628 184.400 C 249.795 186.710,248.891 188.960,248.619 189.400 C 248.166 190.130,246.935 193.348,245.328 198.000 C 244.986 198.990,244.579 199.890,244.424 200.000 C 244.269 200.110,243.461 202.090,242.628 204.400 C 241.795 206.710,240.891 208.960,240.619 209.400 C 240.166 210.130,238.935 213.348,237.328 218.000 C 236.986 218.990,236.579 219.890,236.424 220.000 C 236.269 220.110,235.461 222.090,234.628 224.400 C 233.795 226.710,232.891 228.960,232.619 229.400 C 232.166 230.130,230.935 233.348,229.328 238.000 C 228.986 238.990,228.579 239.890,228.424 240.000 C 228.269 240.110,227.461 242.090,226.628 244.400 C 225.795 246.710,224.883 248.969,224.600 249.421 C 224.317 249.872,223.808 251.042,223.468 252.021 C 221.781 256.882,220.655 259.819,220.412 260.000 C 220.263 260.110,219.461 262.090,218.628 264.400 C 217.795 266.710,216.883 268.969,216.600 269.421 C 216.317 269.872,215.808 271.042,215.468 272.021 C 213.781 276.882,212.655 279.819,212.412 280.000 C 212.263 280.110,211.461 282.090,210.628 284.400 C 209.795 286.710,208.891 288.960,208.619 289.400 C 208.166 290.130,206.935 293.348,205.328 298.000 C 204.986 298.990,204.579 299.890,204.424 300.000 C 204.269 300.110,203.461 302.090,202.628 304.400 C 201.795 306.710,200.891 308.960,200.619 309.400 C 200.166 310.130,198.935 313.348,197.328 318.000 C 196.986 318.990,196.583 319.890,196.433 320.000 C 196.191 320.178,194.400 324.617,194.400 325.040 C 194.400 325.133,201.186 325.162,209.480 325.105 L 224.560 325.000 225.465 322.471 C 225.963 321.079,226.659 319.369,227.011 318.671 C 227.637 317.428,230.057 311.085,230.587 309.300 C 230.734 308.805,231.001 308.400,231.180 308.400 C 231.360 308.400,231.597 307.995,231.708 307.500 C 231.993 306.224,234.272 300.138,235.022 298.649 C 235.639 297.423,238.062 291.071,238.587 289.300 C 238.734 288.805,239.022 288.400,239.227 288.400 C 239.432 288.400,239.600 288.145,239.600 287.833 C 239.600 287.521,239.954 286.441,240.386 285.433 L 241.172 283.600 269.531 283.600 L 297.891 283.600 298.546 285.313 C 298.906 286.256,299.200 287.175,299.200 287.355 C 299.200 287.536,299.629 288.537,300.152 289.580 C 300.676 290.623,301.788 293.349,302.623 295.638 C 303.458 297.927,304.269 299.890,304.424 300.000 C 304.579 300.110,304.987 301.010,305.331 302.000 C 306.989 306.773,307.765 308.786,308.800 311.000 C 310.009 313.586,311.554 317.639,311.888 319.100 C 312.001 319.595,312.238 320.000,312.416 320.000 C 312.593 320.000,312.945 320.675,313.198 321.500 C 313.452 322.325,313.847 323.495,314.078 324.100 L 314.497 325.200 329.449 325.200 C 346.303 325.200,345.174 325.457,343.448 322.020 C 342.924 320.977,341.812 318.251,340.977 315.962 C 340.142 313.673,339.337 311.710,339.188 311.600 C 338.945 311.419,337.819 308.482,336.132 303.621 C 335.792 302.642,335.283 301.472,335.000 301.021 C 334.717 300.569,333.805 298.310,332.972 296.000 C 332.139 293.690,331.337 291.710,331.188 291.600 C 330.945 291.419,329.819 288.482,328.132 283.621 C 327.792 282.642,327.283 281.472,327.000 281.021 C 326.717 280.569,325.805 278.310,324.972 276.000 C 324.139 273.690,323.337 271.710,323.188 271.600 C 322.945 271.419,321.819 268.482,320.132 263.621 C 319.792 262.642,319.283 261.472,319.000 261.021 C 318.717 260.569,317.805 258.310,316.972 256.000 C 316.139 253.690,315.337 251.710,315.188 251.600 C 314.945 251.419,313.819 248.482,312.132 243.621 C 311.792 242.642,311.283 241.472,311.000 241.021 C 310.717 240.569,309.805 238.310,308.972 236.000 C 308.139 233.690,307.337 231.710,307.188 231.600 C 306.945 231.419,305.819 228.482,304.132 223.621 C 303.792 222.642,303.283 221.472,303.000 221.021 C 302.717 220.569,301.805 218.310,300.972 216.000 C 300.139 213.690,299.331 211.710,299.176 211.600 C 299.021 211.490,298.614 210.590,298.272 209.600 C 296.665 204.948,295.434 201.730,294.981 201.000 C 294.709 200.560,293.805 198.310,292.972 196.000 C 292.139 193.690,291.331 191.710,291.176 191.600 C 291.021 191.490,290.614 190.590,290.272 189.600 C 288.667 184.953,287.434 181.730,286.982 181.000 C 286.710 180.560,285.905 178.580,285.192 176.600 C 284.480 174.620,283.718 172.775,283.500 172.500 C 283.195 172.117,279.842 172.000,269.198 172.000 L 255.293 172.000 255.091 172.900 M270.342 214.500 C 270.978 216.680,272.184 219.788,272.480 220.011 C 272.634 220.128,273.474 222.198,274.346 224.611 C 275.218 227.025,276.219 229.562,276.570 230.249 C 277.192 231.467,279.455 237.406,279.904 239.000 C 280.028 239.440,280.272 239.895,280.445 240.011 C 280.618 240.128,281.479 242.228,282.357 244.679 C 283.235 247.131,284.144 249.465,284.377 249.868 C 285.100 251.118,286.400 254.437,286.400 255.033 C 286.400 255.513,283.802 255.600,269.400 255.600 C 260.050 255.600,252.400 255.506,252.400 255.392 C 252.400 255.278,252.850 254.077,253.400 252.723 C 253.950 251.370,254.400 250.036,254.400 249.760 C 254.400 249.483,254.637 249.019,254.928 248.729 C 255.218 248.438,255.560 247.840,255.688 247.400 C 256.167 245.754,258.416 239.852,259.022 238.649 C 259.639 237.423,262.062 231.071,262.587 229.300 C 262.734 228.805,263.001 228.400,263.180 228.400 C 263.360 228.400,263.597 227.995,263.708 227.500 C 264.027 226.071,266.188 220.398,267.344 217.955 C 267.925 216.727,268.400 215.617,268.400 215.487 C 268.400 213.445,269.823 212.722,270.342 214.500 M74.908 258.900 C 75.078 275.176,75.446 280.965,76.390 282.200 C 76.558 282.420,76.925 283.590,77.205 284.800 C 78.005 288.246,79.979 293.127,81.870 296.333 C 82.821 297.946,83.600 299.422,83.600 299.613 C 83.600 299.804,83.841 300.104,84.136 300.280 C 84.430 300.456,85.316 301.615,86.103 302.856 C 87.894 305.679,94.229 312.056,96.838 313.661 C 97.917 314.325,98.800 315.003,98.800 315.167 C 98.800 315.331,99.295 315.718,99.900 316.027 C 100.505 316.336,102.122 317.262,103.493 318.086 C 106.058 319.626,112.767 322.398,113.940 322.402 C 114.303 322.404,115.124 322.678,115.765 323.013 C 118.974 324.686,122.332 324.902,147.900 325.085 L 172.400 325.259 172.400 311.245 L 172.400 297.230 148.585 297.115 C 133.034 297.040,124.671 296.859,124.485 296.593 C 124.328 296.370,123.304 295.955,122.210 295.671 C 113.434 293.396,105.109 284.270,103.791 275.479 C 103.635 274.440,103.348 273.492,103.154 273.371 C 102.958 273.251,102.800 266.091,102.800 257.376 L 102.800 241.600 88.764 241.600 L 74.728 241.600 74.908 258.900 ",stroke:"none",fill:"#fcfcfc","fill-rule":"evenodd"}),d("path",{id:"path1",d:"M47.411 2.664 C 45.657 2.981,44.127 3.372,44.011 3.533 C 43.895 3.694,42.810 4.067,41.600 4.362 C 38.910 5.017,33.083 7.195,32.777 7.660 C 32.654 7.847,31.304 8.616,29.777 9.371 C 28.249 10.125,26.280 11.385,25.400 12.171 C 24.520 12.956,23.626 13.600,23.412 13.600 C 23.006 13.600,21.491 14.969,18.277 18.242 C 14.870 21.711,14.144 22.565,12.961 24.499 C 12.323 25.544,11.674 26.399,11.519 26.399 C 11.365 26.400,10.466 27.975,9.521 29.900 C 8.576 31.825,7.581 33.634,7.309 33.921 C 6.749 34.512,4.509 41.424,4.141 43.700 C 4.007 44.525,3.763 45.200,3.598 45.200 C 2.468 45.200,2.400 53.950,2.400 200.400 C 2.400 348.123,2.460 355.600,3.649 355.600 C 3.842 355.600,4.000 355.940,4.000 356.355 C 4.000 358.391,6.974 367.200,7.661 367.200 C 7.847 367.200,8.001 367.425,8.002 367.700 C 8.005 368.559,10.815 373.724,11.832 374.741 C 12.364 375.273,12.800 375.918,12.800 376.174 C 12.800 377.128,22.380 387.200,23.288 387.200 C 23.493 387.200,24.161 387.695,24.771 388.300 C 25.381 388.905,26.852 389.918,28.040 390.551 C 29.228 391.184,30.290 391.836,30.400 392.000 C 30.632 392.346,33.327 393.596,36.432 394.797 C 37.625 395.259,39.175 395.902,39.877 396.226 C 40.580 396.550,42.830 397.214,44.877 397.701 L 48.600 398.585 199.200 398.710 C 307.771 398.799,350.693 398.711,353.000 398.391 C 357.180 397.813,362.564 396.484,362.733 395.990 C 362.807 395.775,363.127 395.600,363.445 395.600 C 364.500 395.600,370.951 392.776,371.600 392.030 C 371.710 391.904,372.430 391.462,373.200 391.049 C 376.487 389.286,377.434 388.693,378.000 388.045 C 378.330 387.668,379.320 386.837,380.200 386.198 C 382.889 384.248,388.894 377.717,389.891 375.657 C 390.221 374.976,390.875 373.991,391.345 373.467 C 392.202 372.513,393.857 369.363,394.814 366.866 C 395.095 366.132,395.535 365.322,395.790 365.066 C 396.421 364.434,398.247 357.808,398.993 353.448 C 399.919 348.029,399.914 52.728,398.988 47.352 C 398.229 42.949,396.410 36.400,395.945 36.400 C 395.755 36.400,395.600 36.231,395.600 36.024 C 395.600 35.238,392.306 28.585,391.766 28.280 C 391.455 28.104,391.200 27.786,391.200 27.574 C 391.200 26.249,386.178 20.048,381.967 16.174 C 379.417 13.828,373.665 9.784,371.800 9.025 C 370.920 8.667,370.020 8.154,369.800 7.886 C 369.101 7.034,360.812 4.018,359.133 4.005 C 358.767 4.002,358.407 3.827,358.333 3.616 C 357.735 1.894,56.765 0.972,47.411 2.664 M144.705 74.900 L 144.810 88.800 172.405 88.800 L 200.000 88.800 200.000 137.600 L 200.000 186.400 172.400 186.400 L 144.800 186.400 144.800 207.200 L 144.800 228.000 130.600 228.000 L 116.400 228.000 116.400 207.200 L 116.400 186.400 88.600 186.400 L 60.800 186.400 60.800 137.600 L 60.800 88.800 88.600 88.800 L 116.400 88.800 116.400 74.795 L 116.400 60.790 130.500 60.895 L 144.600 61.000 144.705 74.900 M277.400 75.067 C 277.840 75.324,279.820 75.825,281.800 76.181 C 285.920 76.920,291.600 78.689,291.600 79.233 C 291.600 79.435,291.873 79.600,292.206 79.600 C 292.912 79.600,299.079 82.679,299.271 83.127 C 299.342 83.294,300.210 83.900,301.200 84.475 C 305.072 86.723,313.353 94.921,315.225 98.359 C 315.568 98.990,316.158 99.815,316.536 100.193 C 318.699 102.356,323.995 115.750,323.999 119.067 C 324.000 119.543,324.164 119.993,324.364 120.067 C 325.126 120.346,325.600 129.481,325.600 143.869 L 325.600 158.800 311.200 158.800 L 296.800 158.800 296.800 143.055 C 296.800 124.194,296.908 124.966,293.169 117.022 C 291.290 113.028,285.600 107.884,280.800 105.838 C 279.370 105.229,277.570 104.431,276.800 104.065 C 275.552 103.472,272.799 103.387,251.500 103.282 L 227.600 103.165 227.600 88.753 L 227.600 74.341 252.100 74.470 C 269.857 74.564,276.820 74.729,277.400 75.067 M89.200 137.600 L 89.200 158.000 102.800 158.000 L 116.400 158.000 116.400 137.600 L 116.400 117.200 102.800 117.200 L 89.200 117.200 89.200 137.600 M144.800 137.600 L 144.800 158.000 158.400 158.000 L 172.000 158.000 172.000 137.600 L 172.000 117.200 158.400 117.200 L 144.800 117.200 144.800 137.600 M284.742 174.500 C 285.378 175.875,286.301 178.170,286.792 179.600 C 287.284 181.030,287.917 182.569,288.200 183.021 C 288.483 183.472,288.994 184.642,289.335 185.621 C 291.027 190.467,291.767 192.393,292.787 194.597 C 293.398 195.919,294.301 198.170,294.792 199.600 C 295.284 201.030,295.917 202.569,296.200 203.021 C 296.483 203.472,296.994 204.642,297.335 205.621 C 299.027 210.467,299.767 212.393,300.787 214.597 C 301.398 215.919,302.301 218.170,302.792 219.600 C 303.284 221.030,303.917 222.569,304.200 223.021 C 304.483 223.472,304.994 224.642,305.335 225.621 C 307.027 230.467,307.767 232.393,308.787 234.597 C 309.398 235.919,310.301 238.170,310.792 239.600 C 311.284 241.030,311.917 242.569,312.200 243.021 C 312.483 243.472,312.994 244.642,313.335 245.621 C 315.027 250.467,315.767 252.393,316.787 254.597 C 317.398 255.919,318.301 258.170,318.792 259.600 C 319.284 261.030,319.917 262.569,320.200 263.021 C 320.483 263.472,320.994 264.642,321.335 265.621 C 323.027 270.467,323.767 272.393,324.787 274.597 C 325.398 275.919,326.301 278.170,326.792 279.600 C 327.284 281.030,327.917 282.569,328.200 283.021 C 328.483 283.472,328.994 284.642,329.335 285.621 C 331.027 290.467,331.767 292.393,332.787 294.597 C 333.398 295.919,334.301 298.170,334.792 299.600 C 335.284 301.030,335.917 302.569,336.200 303.021 C 336.483 303.472,336.994 304.642,337.335 305.621 C 339.027 310.467,339.767 312.393,340.787 314.597 C 341.398 315.919,342.304 318.170,342.799 319.600 C 343.295 321.030,343.975 322.675,344.310 323.255 C 345.685 325.635,345.908 325.600,329.282 325.600 L 314.138 325.600 313.016 322.300 C 312.399 320.485,311.676 318.640,311.410 318.200 C 311.144 317.760,310.165 315.423,309.234 313.006 C 308.304 310.590,307.395 308.430,307.215 308.206 C 307.034 307.983,306.609 306.990,306.269 306.000 C 304.673 301.355,303.463 298.161,303.149 297.761 C 302.959 297.520,302.082 295.377,301.200 293.000 C 300.318 290.623,299.435 288.480,299.236 288.239 C 299.038 287.998,298.568 286.855,298.192 285.700 L 297.508 283.600 269.566 283.600 L 241.625 283.600 240.633 285.700 C 240.087 286.855,238.983 289.600,238.178 291.800 C 237.373 294.000,236.583 295.890,236.422 296.000 C 236.261 296.110,236.028 296.560,235.904 297.000 C 235.462 298.571,233.200 304.513,232.425 306.142 C 231.992 307.054,230.979 309.600,230.176 311.800 C 229.372 314.000,228.583 315.890,228.422 316.000 C 228.261 316.110,228.028 316.560,227.904 317.000 C 227.349 318.970,225.160 324.566,224.753 325.057 C 224.144 325.790,194.000 325.870,194.000 325.139 C 194.000 324.885,194.433 323.760,194.963 322.639 C 195.849 320.762,196.618 318.753,198.269 314.000 C 198.613 313.010,199.021 312.110,199.176 312.000 C 199.331 311.890,200.139 309.910,200.972 307.600 C 201.805 305.290,202.717 303.031,203.000 302.579 C 203.283 302.128,203.792 300.958,204.132 299.979 C 205.819 295.118,206.945 292.181,207.188 292.000 C 207.337 291.890,208.139 289.910,208.972 287.600 C 209.805 285.290,210.709 283.040,210.981 282.600 C 211.434 281.870,212.665 278.652,214.272 274.000 C 214.614 273.010,215.021 272.110,215.176 272.000 C 215.331 271.890,216.139 269.910,216.972 267.600 C 217.805 265.290,218.717 263.031,219.000 262.579 C 219.283 262.128,219.792 260.958,220.132 259.979 C 221.819 255.118,222.945 252.181,223.188 252.000 C 223.337 251.890,224.139 249.910,224.972 247.600 C 225.805 245.290,226.717 243.031,227.000 242.579 C 227.283 242.128,227.792 240.958,228.132 239.979 C 229.819 235.118,230.945 232.181,231.188 232.000 C 231.337 231.890,232.139 229.910,232.972 227.600 C 233.805 225.290,234.709 223.040,234.981 222.600 C 235.434 221.870,236.665 218.652,238.272 214.000 C 238.614 213.010,239.021 212.110,239.176 212.000 C 239.331 211.890,240.139 209.910,240.972 207.600 C 241.805 205.290,242.717 203.031,243.000 202.579 C 243.283 202.128,243.792 200.958,244.132 199.979 C 245.819 195.118,246.945 192.181,247.188 192.000 C 247.337 191.890,248.139 189.910,248.972 187.600 C 249.805 185.290,250.709 183.040,250.981 182.600 C 251.463 181.823,253.007 177.762,254.290 173.900 L 254.922 172.000 269.253 172.000 L 283.584 172.000 284.742 174.500 M269.200 214.548 C 269.200 214.875,268.963 215.381,268.672 215.671 C 268.382 215.962,268.040 216.560,267.912 217.000 C 267.427 218.664,265.182 224.551,264.425 226.142 C 263.992 227.054,262.979 229.600,262.176 231.800 C 261.372 234.000,260.583 235.890,260.422 236.000 C 260.261 236.110,260.028 236.560,259.904 237.000 C 259.462 238.569,257.200 244.513,256.426 246.142 C 255.992 247.054,255.012 249.510,254.248 251.600 L 252.860 255.400 269.292 255.504 C 278.330 255.562,285.804 255.529,285.902 255.432 C 285.999 255.334,285.594 253.937,285.001 252.327 C 284.409 250.717,283.822 249.040,283.697 248.600 C 283.572 248.160,283.328 247.705,283.155 247.589 C 282.982 247.472,282.126 245.402,281.254 242.989 C 280.382 240.575,279.381 238.038,279.030 237.351 C 278.408 236.133,276.145 230.194,275.696 228.600 C 275.572 228.160,275.328 227.705,275.155 227.589 C 274.982 227.472,274.125 225.402,273.251 222.989 C 272.376 220.575,271.288 217.844,270.831 216.919 C 270.374 215.995,270.000 215.061,270.000 214.843 C 270.000 214.625,269.820 214.336,269.600 214.200 C 269.380 214.064,269.200 214.221,269.200 214.548 M103.200 256.745 C 103.200 271.263,103.434 275.394,104.370 277.400 C 104.576 277.840,105.239 279.370,105.845 280.800 C 107.787 285.385,113.002 291.278,116.618 292.972 C 117.488 293.380,119.100 294.145,120.200 294.673 C 124.060 296.526,124.345 296.547,149.000 296.778 L 172.600 297.000 172.600 311.200 L 172.600 325.400 151.400 325.522 C 130.794 325.641,120.383 325.260,120.067 324.374 C 119.993 324.168,119.543 324.000,119.067 323.999 C 115.750 323.995,102.356 318.699,100.193 316.536 C 99.815 316.158,98.990 315.568,98.359 315.225 C 94.897 313.340,86.661 305.008,84.496 301.200 C 83.934 300.210,83.261 299.220,83.001 299.000 C 82.404 298.494,79.600 292.826,79.600 292.124 C 79.600 291.836,79.435 291.600,79.233 291.600 C 78.689 291.600,76.920 285.920,76.181 281.800 C 75.825 279.820,75.327 277.840,75.073 277.400 C 74.749 276.839,74.568 271.314,74.467 258.900 L 74.324 241.200 88.762 241.200 L 103.200 241.200 103.200 256.745 ",stroke:"none",fill:"#ec4c8c","fill-rule":"evenodd"}),d("path",{id:"path2",d:"",stroke:"none",fill:"#f4d4100","fill-rule":"evenodd"}),d("path",{id:"path3",d:"M235.600 74.690 C 256.786 74.968,273.107 74.972,272.938 74.700 C 272.836 74.535,262.548 74.441,250.076 74.491 C 237.604 74.542,231.090 74.631,235.600 74.690 M286.800 77.414 C 286.800 77.693,289.706 78.831,290.091 78.703 C 290.282 78.639,289.620 78.284,288.619 77.913 C 287.619 77.542,286.800 77.317,286.800 77.414 M302.400 85.290 C 302.400 85.377,303.435 86.328,304.700 87.403 C 305.965 88.479,306.640 88.944,306.200 88.436 C 305.364 87.471,302.400 85.017,302.400 85.290 M308.783 90.900 C 310.441 92.666,310.800 92.984,310.800 92.683 C 310.800 92.619,309.945 91.764,308.900 90.783 L 307.000 89.000 308.783 90.900 M312.597 95.300 C 313.672 96.565,314.623 97.600,314.710 97.600 C 314.983 97.600,312.529 94.636,311.564 93.800 C 311.056 93.360,311.521 94.035,312.597 95.300 M321.200 109.884 C 321.200 110.451,322.363 113.200,322.602 113.200 C 322.707 113.200,322.496 112.435,322.132 111.500 C 321.395 109.607,321.200 109.269,321.200 109.884 M88.994 137.400 L 89.000 158.200 102.700 158.208 L 116.400 158.216 102.804 158.103 L 89.207 157.990 89.098 137.295 L 88.989 116.600 88.994 137.400 M324.641 122.800 C 324.839 123.130,325.109 131.320,325.243 141.000 L 325.485 158.600 325.443 140.920 C 325.407 126.341,325.302 123.148,324.841 122.720 C 324.377 122.288,324.343 122.301,324.641 122.800 M151.074 158.299 C 154.855 158.365,161.155 158.365,165.074 158.299 C 168.993 158.234,165.900 158.180,158.200 158.180 C 150.500 158.180,147.293 158.234,151.074 158.299 M253.700 175.700 C 253.270 176.875,253.280 176.926,253.812 176.224 C 254.321 175.552,254.621 174.400,254.288 174.400 C 254.226 174.400,253.961 174.985,253.700 175.700 M250.196 184.272 C 249.858 185.081,249.633 185.900,249.697 186.091 C 249.761 186.282,250.116 185.620,250.487 184.619 C 251.293 182.445,251.070 182.179,250.196 184.272 M74.729 186.300 C 82.500 186.361,95.100 186.361,102.729 186.300 C 110.358 186.239,104.000 186.189,88.600 186.189 C 73.200 186.189,66.958 186.239,74.729 186.300 M158.500 186.300 C 166.145 186.361,178.655 186.361,186.300 186.300 C 193.945 186.239,187.690 186.189,172.400 186.189 C 157.110 186.189,150.855 186.239,158.500 186.300 M289.200 186.284 C 289.200 186.851,290.363 189.600,290.602 189.600 C 290.707 189.600,290.496 188.835,290.132 187.900 C 289.395 186.007,289.200 185.669,289.200 186.284 M245.700 195.700 C 245.270 196.875,245.280 196.926,245.812 196.224 C 246.321 195.552,246.621 194.400,246.288 194.400 C 246.226 194.400,245.961 194.985,245.700 195.700 M242.196 204.272 C 241.858 205.081,241.633 205.900,241.697 206.091 C 241.761 206.282,242.116 205.620,242.487 204.619 C 243.293 202.445,243.070 202.179,242.196 204.272 M297.200 206.284 C 297.200 206.851,298.363 209.600,298.602 209.600 C 298.707 209.600,298.496 208.835,298.132 207.900 C 297.395 206.007,297.200 205.669,297.200 206.284 M237.700 215.700 C 237.270 216.875,237.280 216.926,237.812 216.224 C 238.321 215.552,238.621 214.400,238.288 214.400 C 238.226 214.400,237.961 214.985,237.700 215.700 M270.032 214.824 C 270.014 215.166,270.280 215.796,270.622 216.224 C 271.234 216.988,271.238 216.987,270.876 216.200 C 270.674 215.760,270.408 215.130,270.286 214.800 C 270.093 214.282,270.059 214.285,270.032 214.824 M265.267 223.180 C 265.033 223.851,264.927 224.400,265.031 224.400 C 265.301 224.400,266.056 222.322,265.857 222.124 C 265.767 222.033,265.501 222.508,265.267 223.180 M234.196 224.272 C 233.858 225.081,233.633 225.900,233.697 226.091 C 233.761 226.282,234.116 225.620,234.487 224.619 C 235.293 222.445,235.070 222.179,234.196 224.272 M273.913 224.619 C 274.284 225.620,274.639 226.282,274.703 226.091 C 274.831 225.706,273.693 222.800,273.414 222.800 C 273.317 222.800,273.542 223.619,273.913 224.619 M305.200 226.284 C 305.200 226.851,306.363 229.600,306.602 229.600 C 306.707 229.600,306.496 228.835,306.132 227.900 C 305.395 226.007,305.200 225.669,305.200 226.284 M261.756 231.843 C 261.424 232.637,261.226 233.359,261.314 233.448 C 261.403 233.536,261.759 232.887,262.105 232.004 C 262.889 230.009,262.582 229.868,261.756 231.843 M229.700 235.700 C 229.270 236.875,229.280 236.926,229.812 236.224 C 230.321 235.552,230.621 234.400,230.288 234.400 C 230.226 234.400,229.961 234.985,229.700 235.700 M278.032 234.824 C 278.014 235.166,278.280 235.796,278.622 236.224 C 279.234 236.988,279.238 236.987,278.876 236.200 C 278.674 235.760,278.408 235.130,278.286 234.800 C 278.093 234.282,278.059 234.285,278.032 234.824 M309.113 236.219 C 309.484 237.220,309.839 237.882,309.903 237.691 C 310.031 237.306,308.893 234.400,308.614 234.400 C 308.517 234.400,308.742 235.219,309.113 236.219 M74.488 257.076 C 74.440 265.698,74.535 272.836,74.700 272.939 C 74.973 273.108,74.967 261.235,74.687 247.000 C 74.626 243.920,74.537 248.454,74.488 257.076 M257.267 243.180 C 257.033 243.851,256.927 244.400,257.031 244.400 C 257.301 244.400,258.056 242.322,257.857 242.124 C 257.767 242.033,257.501 242.508,257.267 243.180 M226.196 244.272 C 225.858 245.081,225.633 245.900,225.697 246.091 C 225.761 246.282,226.116 245.620,226.487 244.619 C 227.293 242.445,227.070 242.179,226.196 244.272 M281.913 244.619 C 282.284 245.620,282.639 246.282,282.703 246.091 C 282.831 245.706,281.693 242.800,281.414 242.800 C 281.317 242.800,281.542 243.619,281.913 244.619 M313.200 246.284 C 313.200 246.851,314.363 249.600,314.602 249.600 C 314.707 249.600,314.496 248.835,314.132 247.900 C 313.395 246.007,313.200 245.669,313.200 246.284 M253.756 251.843 C 253.424 252.637,253.226 253.359,253.314 253.448 C 253.403 253.536,253.759 252.887,254.105 252.004 C 254.889 250.009,254.582 249.868,253.756 251.843 M221.700 255.700 C 221.270 256.875,221.280 256.926,221.812 256.224 C 222.321 255.552,222.621 254.400,222.288 254.400 C 222.226 254.400,221.961 254.985,221.700 255.700 M317.113 256.219 C 317.484 257.220,317.839 257.882,317.903 257.691 C 318.031 257.306,316.893 254.400,316.614 254.400 C 316.517 254.400,316.742 255.219,317.113 256.219 M218.196 264.272 C 217.858 265.081,217.633 265.900,217.697 266.091 C 217.761 266.282,218.116 265.620,218.487 264.619 C 219.293 262.445,219.070 262.179,218.196 264.272 M321.200 266.284 C 321.200 266.851,322.363 269.600,322.602 269.600 C 322.707 269.600,322.496 268.835,322.132 267.900 C 321.395 266.007,321.200 265.669,321.200 266.284 M213.700 275.700 C 213.270 276.875,213.280 276.926,213.812 276.224 C 214.321 275.552,214.621 274.400,214.288 274.400 C 214.226 274.400,213.961 274.985,213.700 275.700 M325.113 276.219 C 325.484 277.220,325.839 277.882,325.903 277.691 C 326.031 277.306,324.893 274.400,324.614 274.400 C 324.517 274.400,324.742 275.219,325.113 276.219 M105.007 279.879 C 105.607 281.314,106.000 281.962,106.000 281.516 C 106.000 281.084,104.785 278.400,104.589 278.400 C 104.479 278.400,104.667 279.066,105.007 279.879 M210.196 284.272 C 209.858 285.081,209.633 285.900,209.697 286.091 C 209.761 286.282,210.116 285.620,210.487 284.619 C 211.293 282.445,211.070 282.179,210.196 284.272 M329.200 286.284 C 329.200 286.851,330.363 289.600,330.602 289.600 C 330.707 289.600,330.496 288.835,330.132 287.900 C 329.395 286.007,329.200 285.669,329.200 286.284 M77.913 288.619 C 78.284 289.620,78.639 290.282,78.703 290.091 C 78.831 289.706,77.693 286.800,77.414 286.800 C 77.317 286.800,77.542 287.619,77.913 288.619 M237.756 291.843 C 237.424 292.637,237.226 293.359,237.314 293.448 C 237.403 293.536,237.759 292.887,238.105 292.004 C 238.889 290.009,238.582 289.868,237.756 291.843 M301.600 293.884 C 301.600 294.451,302.763 297.200,303.002 297.200 C 303.107 297.200,302.896 296.435,302.532 295.500 C 301.795 293.607,301.600 293.269,301.600 293.884 M205.700 295.700 C 205.270 296.875,205.280 296.926,205.812 296.224 C 206.321 295.552,206.621 294.400,206.288 294.400 C 206.226 294.400,205.961 294.985,205.700 295.700 M333.113 296.219 C 333.484 297.220,333.839 297.882,333.903 297.691 C 334.031 297.306,332.893 294.400,332.614 294.400 C 332.517 294.400,332.742 295.219,333.113 296.219 M233.095 303.596 C 232.748 304.478,232.549 305.200,232.653 305.200 C 232.923 305.200,234.078 302.345,233.886 302.152 C 233.797 302.064,233.441 302.713,233.095 303.596 M86.322 303.900 C 86.977 304.725,87.928 305.760,88.436 306.200 C 88.944 306.640,88.479 305.965,87.403 304.700 C 85.213 302.124,84.490 301.589,86.322 303.900 M202.196 304.272 C 201.858 305.081,201.633 305.900,201.697 306.091 C 201.761 306.282,202.116 305.620,202.487 304.619 C 203.293 302.445,203.070 302.179,202.196 304.272 M305.524 303.800 C 305.726 304.240,305.992 304.870,306.114 305.200 C 306.307 305.718,306.341 305.715,306.368 305.176 C 306.386 304.834,306.120 304.204,305.778 303.776 C 305.166 303.012,305.162 303.013,305.524 303.800 M337.200 306.284 C 337.200 306.851,338.363 309.600,338.602 309.600 C 338.707 309.600,338.496 308.835,338.132 307.900 C 337.395 306.007,337.200 305.669,337.200 306.284 M90.783 308.900 C 91.764 309.945,92.619 310.800,92.683 310.800 C 92.984 310.800,92.666 310.441,90.900 308.783 L 89.000 307.000 90.783 308.900 M229.756 311.843 C 229.424 312.637,229.226 313.359,229.314 313.448 C 229.403 313.536,229.759 312.887,230.105 312.004 C 230.889 310.009,230.582 309.868,229.756 311.843 M93.800 311.564 C 94.636 312.529,97.600 314.983,97.600 314.710 C 97.600 314.623,96.565 313.672,95.300 312.597 C 94.035 311.521,93.360 311.056,93.800 311.564 M197.700 315.700 C 197.270 316.875,197.280 316.926,197.812 316.224 C 198.321 315.552,198.621 314.400,198.288 314.400 C 198.226 314.400,197.961 314.985,197.700 315.700 M310.032 314.824 C 310.014 315.166,310.280 315.796,310.622 316.224 C 311.234 316.988,311.238 316.987,310.876 316.200 C 310.674 315.760,310.408 315.130,310.286 314.800 C 310.093 314.282,310.059 314.285,310.032 314.824 M341.113 316.219 C 341.484 317.220,341.839 317.882,341.903 317.691 C 342.031 317.306,340.893 314.400,340.614 314.400 C 340.517 314.400,340.742 315.219,341.113 316.219 M109.633 321.335 C 110.019 321.647,113.200 322.777,113.200 322.602 C 113.200 322.363,110.451 321.200,109.884 321.200 C 109.655 321.200,109.542 321.261,109.633 321.335 M225.095 323.596 L 224.464 325.200 209.432 325.200 C 201.164 325.200,194.400 325.122,194.400 325.026 C 194.400 324.930,194.591 324.345,194.825 323.726 C 195.109 322.974,195.113 322.736,194.837 323.009 C 194.609 323.233,194.373 323.863,194.311 324.409 L 194.200 325.400 209.400 325.400 L 224.600 325.400 225.344 323.877 C 225.753 323.040,226.006 322.273,225.906 322.173 C 225.806 322.073,225.441 322.713,225.095 323.596 M313.791 324.300 L 314.421 325.600 329.510 325.505 L 344.600 325.410 329.500 325.300 C 321.195 325.240,314.400 325.047,314.400 324.872 C 314.400 324.696,314.121 324.204,313.781 323.776 C 313.234 323.091,313.235 323.152,313.791 324.300 M127.143 325.303 C 127.310 325.470,137.606 325.560,150.023 325.503 L 172.600 325.400 149.720 325.200 C 137.136 325.090,126.976 325.137,127.143 325.303 ",stroke:"none",fill:"#f478c8","fill-rule":"evenodd"}),d("path",{id:"path4",d:"M144.580 75.000 C 144.580 82.700,144.634 85.793,144.699 81.874 C 144.765 77.955,144.765 71.655,144.699 67.874 C 144.634 64.093,144.580 67.300,144.580 75.000 M274.100 75.087 C 274.705 75.178,275.695 75.178,276.300 75.087 C 276.905 74.995,276.410 74.920,275.200 74.920 C 273.990 74.920,273.495 74.995,274.100 75.087 M95.900 117.099 C 99.695 117.165,105.905 117.165,109.700 117.099 C 113.495 117.034,110.390 116.980,102.800 116.980 C 95.210 116.980,92.105 117.034,95.900 117.099 M144.583 117.300 C 144.478 117.575,144.440 126.890,144.500 138.000 L 144.608 158.200 144.704 137.705 L 144.800 117.211 158.500 117.100 L 172.200 116.989 158.487 116.895 C 147.816 116.821,144.732 116.911,144.583 117.300 M324.493 121.200 C 324.493 121.970,324.575 122.285,324.676 121.900 C 324.776 121.515,324.776 120.885,324.676 120.500 C 324.575 120.115,324.493 120.430,324.493 121.200 M288.429 184.310 C 288.676 185.020,289.042 185.703,289.242 185.826 C 289.442 185.950,289.391 185.544,289.127 184.925 C 288.421 183.265,287.906 182.812,288.429 184.310 M144.586 207.200 C 144.586 218.750,144.637 223.475,144.700 217.700 C 144.762 211.925,144.762 202.475,144.700 196.700 C 144.637 190.925,144.586 195.650,144.586 207.200 M296.429 204.310 C 296.676 205.020,297.042 205.703,297.242 205.826 C 297.442 205.950,297.391 205.544,297.127 204.925 C 296.421 203.265,295.906 202.812,296.429 204.310 M268.779 214.655 C 268.558 215.236,268.464 215.797,268.569 215.903 C 268.675 216.008,268.879 215.624,269.023 215.050 C 269.170 214.465,269.470 214.120,269.704 214.265 C 269.949 214.416,270.005 214.331,269.838 214.062 C 269.416 213.379,269.223 213.487,268.779 214.655 M304.429 224.310 C 304.676 225.020,305.042 225.703,305.242 225.826 C 305.442 225.950,305.391 225.544,305.127 224.925 C 304.421 223.265,303.906 222.812,304.429 224.310 M260.779 234.655 C 260.558 235.236,260.452 235.785,260.543 235.876 C 260.633 235.967,260.899 235.492,261.133 234.820 C 261.653 233.328,261.339 233.182,260.779 234.655 M74.920 275.200 C 74.920 276.410,74.995 276.905,75.087 276.300 C 75.178 275.695,75.178 274.705,75.087 274.100 C 74.995 273.495,74.920 273.990,74.920 275.200 M172.580 311.200 C 172.580 319.010,172.634 322.205,172.699 318.300 C 172.765 314.395,172.765 308.005,172.699 304.100 C 172.634 300.195,172.580 303.390,172.580 311.200 M107.200 320.179 C 107.200 320.289,107.740 320.659,108.400 321.000 C 109.060 321.341,109.600 321.531,109.600 321.421 C 109.600 321.311,109.060 320.941,108.400 320.600 C 107.740 320.259,107.200 320.069,107.200 320.179 M120.500 324.676 C 120.885 324.776,121.515 324.776,121.900 324.676 C 122.285 324.575,121.970 324.493,121.200 324.493 C 120.430 324.493,120.115 324.575,120.500 324.676 M123.700 325.087 C 124.305 325.178,125.295 325.178,125.900 325.087 C 126.505 324.995,126.010 324.920,124.800 324.920 C 123.590 324.920,123.095 324.995,123.700 325.087 ",stroke:"none",fill:"#f47c8c","fill-rule":"evenodd"})]})})}function zS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9091 2H7.04546C6.50297 2 5.9827 2.2155 5.5991 2.5991C5.2155 2.9827 5 3.50297 5 4.04546V17.9545C5 18.497 5.2155 19.0173 5.5991 19.4009C5.9827 19.7845 6.50297 20 7.04546 20H15.9091C16.4515 20 16.9718 19.7845 17.3554 19.4009C17.739 19.0173 17.9545 18.497 17.9545 17.9545V4.04546C17.9545 3.50297 17.739 2.9827 17.3554 2.5991C16.9718 2.2155 16.4516 2 15.9091 2ZM7.04546 3.36364H15.9091C16.0899 3.36364 16.2633 3.43548 16.3912 3.56334C16.519 3.69121 16.5909 3.86463 16.5909 4.04546V14.2727H6.36362V4.04546C6.36362 3.86463 6.43546 3.69121 6.56332 3.56334C6.69119 3.43548 6.86461 3.36364 7.04544 3.36364H7.04546ZM15.9091 18.6364H7.04546C6.95592 18.6364 6.86726 18.6187 6.78454 18.5845C6.70182 18.5502 6.62665 18.5 6.56334 18.4367C6.50003 18.3733 6.44981 18.2982 6.41554 18.2155C6.38128 18.1327 6.36364 18.0441 6.36364 17.9545V15.6364H16.5909V17.9545C16.5909 18.1354 16.5191 18.3088 16.3912 18.4367C16.2633 18.5645 16.0899 18.6364 15.9091 18.6364H15.9091ZM9.50007 6.09103H13.591C13.7718 6.09103 13.9452 6.01919 14.0731 5.89133C14.201 5.76346 14.2728 5.59004 14.2728 5.40921C14.2728 5.22838 14.201 5.05496 14.0731 4.9271C13.9452 4.79924 13.7718 4.72741 13.591 4.72741H9.50007C9.31924 4.72741 9.14582 4.79924 9.01796 4.9271C8.89009 5.05496 8.81825 5.22838 8.81825 5.40921C8.81825 5.49875 8.83588 5.58741 8.87015 5.67013C8.90441 5.75285 8.95464 5.82802 9.01795 5.89133C9.08126 5.95464 9.15642 6.00486 9.23915 6.03913C9.32187 6.07339 9.41053 6.09103 9.50007 6.09103ZM11.0634 17.6184C10.9355 17.4905 10.8637 17.3171 10.8637 17.1362C10.8637 16.9554 10.9355 16.782 11.0634 16.6541C11.1913 16.5262 11.3647 16.4544 11.5455 16.4544C11.7264 16.4544 11.8998 16.5262 12.0276 16.6541C12.1555 16.782 12.2273 16.9554 12.2273 17.1362C12.2273 17.3171 12.1555 17.4905 12.0276 17.6184C11.8998 17.7462 11.7264 17.8181 11.5455 17.8181C11.3647 17.8181 11.1913 17.7462 11.0634 17.6184Z"})})}function NS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.7719 2L17.7647 5.98965V8.88235V17.3529V18.4118C17.7647 18.833 17.5974 19.237 17.2995 19.5348C17.0017 19.8327 16.5977 20 16.1765 20H5.58824C5.16701 20 4.76304 19.8327 4.46518 19.5348C4.16733 19.237 4 18.833 4 18.4118V17.3529V8.88235V3.58824C4 3.16701 4.16733 2.76304 4.46518 2.46518C4.76304 2.16733 5.16701 2 5.58824 2H13.7719ZM13.9778 4.45118V6.20988H15.7376L13.9778 4.45118ZM5.58817 18.4118V17.3529V3.58823H12.3895L12.3901 7.79758H16.1764V17.3529V18.4118H5.58817ZM14.9956 9.33215H6.76855V10.5674H14.9956V9.33215ZM6.76855 12.1116H14.9956V13.3469H6.76855V12.1116ZM11.3268 14.78H6.76855V16.0153H11.3268V14.78Z"})})}function Uh(){let e=Ir(),{t,lang:n}=W();return d(xe,{children:[d("header",{className:"header-navbar",children:[d("a",{class:"header-navbar-brand",href:"https://immersivetranslate.com",target:"_blank",children:[d(OS,{}),d("h1",{children:t("browser.shortBrandName")})]}),d("span",{class:"version",children:e}),d("div",{style:{flex:1}}),d("div",{class:"header-right",children:[d(LM,{}),d(_M,{})]})]}),d("div",{className:"header-navbar-height"})]})}function LM(){let{t:e}=W();return d("a",{class:"header-navbar-item mobile-hidden",href:o1,target:"_blank",children:[d(zS,{}),d("span",{children:e("options.navbar.installApp")})]})}function _M(){let{t:e}=W();return d(or,{text:e("translateFileTooltip"),position:"bottom",tipStyle:{whiteSpace:"pre"},multiple:!0,children:d("a",{class:"header-navbar-item ml-8",href:p1,target:"_blank",children:[d(NS,{}),d("span",{children:e("options.navbar.translateFile")})]})})}function US(){let e=document.getElementById("mount");e&&(async()=>{Kd(e9);let t=await bt();z0(t.sentryConfig),t.debug&&R.setLevel("debug"),globalThis.location.hash||(globalThis.location.hash="#general");let n=await yn({url:"http://localhost",config:t});ft("options_page_view",[{name:"options_page_view"}],{...n,sourceLanguage:globalThis.location.hash}),qa(document,n),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(MM,{donateUrl:t.donateUrl,config:t})}),e)})()}function MM(e){let t=Xp(),{t:n,lang:r}=W(),a=Ir(),{config:i}=e,o=[{name:n("general"),props:{href:"#general",className:"secondary"}},{name:n("subtitle"),props:{href:"#subtitle",className:"secondary"}},{name:n("inputOptions"),props:{href:"#input",className:"secondary"}},{name:n("mouseHoverOptions"),props:{href:"#mouse_hover",className:"secondary"}},{name:n("floatBallOptions"),props:{href:"#floating",className:"secondary"}},{name:n("shortcutSettings"),props:{href:"#shortcuts",className:"secondary"}},{name:n("advanced"),props:{href:"#advanced",className:"secondary"}},{name:n("import_export"),props:{href:"#import_export",className:"secondary"}},{name:n("about"),props:{href:"#about",className:"secondary"}}];r.startsWith("zh")||o.splice(o.length-1,0,{name:n("contact"),props:{href:"#contact",className:"secondary"}}),o.forEach(u=>{t===u.props.href&&(u.props.className="primary",u.props["aria-current"]="page")});let s=!0;return Ge()&&(s=i.generalRule.showSponsorOnSafari),d(ct,{children:[d(Uh,{}),d(xe,{children:d("main",{class:"container-fluid",children:[d("aside",{children:d("nav",{class:"menu-nav flex flex-col h-full justify-between ",children:[d("div",{children:d("ul",{class:"flex flex-wrap flex-start min-[992px]:block text-sm min-[992px]:text-base",children:o.map((u,l)=>d("li",{class:"li",children:d("a",{...u.props,children:u.name})},`nav-${l}`))})}),d("div",{class:"m-0 p-0 flex flex-wrap min-[992px]:flex-col max-[992px]:mt-2",children:[s&&d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:e.donateUrl,children:n("donateCafe")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:xc,children:n("document")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:d1,children:n("feedbackAndJoin")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"#developer",children:n("developer")})]})]})}),d("div",{role:"main",children:d(Jp,{value:t,defaultCase:d(S0,{}),cases:{"#general":d(S0,{}),"#mouse_hover":d(Rh,{}),"#input":d(vf,{}),"#shortcuts":d(zh,{}),"#floating":d(Oh,{}),"#import_export":d(df,{}),"#about":d(Cf,{}),"#advanced":d(xf,{}),"#developer":d(Sf,{}),"#subtitle":d(wf,{}),"#contact":d(Ef,{}),"#download_config":d(Nh,{})}})})]})})]})}US();})(); + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(T,b)=>"imt_"+b.replaceAll("translation","t"))},await Kt(a);let h=Le().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let T=new URL(h);T.pathname=y.shareConfig.sharePath,h=T.toString()}Ko(h)}catch(m){R.error(m)}}async function y6(){let e=await Wt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Ob,{detail:JSON.stringify(e.draft)}))}async function dM(){try{if(await Fc("reportActive"))return;R.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Kp();await de({url:Pi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),yu("reportActive","1")}catch(e){R.error(e)}}var gM=new AbortController,{signal:pM}=gM,dd=0,gd=0,vs=!1,to,PS=0,ci=[];function ps(e,t){mM();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(R.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,ps(n,t)):(R.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,ps(n,t))}document.addEventListener(ru,s),ci.push(()=>{document.removeEventListener(ru,s)});let u=cr(f=>{if(!(Math.abs(f.clientX-dd)+Math.abs(f.clientY-gd)<=3)&&(dd=f.clientX,gd=f.clientY,o||vs&&!to)){let m=FS(n.rule,t);if(m){if(Fh(m))return;Mh(n,!1,m)}}},o?700:300),l=f=>{let m=f.target;Fh(m)||Mh(n,!0)},c=f=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",h=Ut.getPressedKeyCodes();if(h.length>1&&Ut[m]&&(PS=Date.now(),vs=!1),h.length===1&&Ut[m]){let y=Date.now();vs=!0,to&&clearTimeout(to),to=setTimeout(()=>{let T=PS-y;T>0&&T<=i?vs=!1:l(f),to=void 0},i)}};if(ci.push(()=>{to&&clearTimeout(to)}),a)return;Lh("mousemove",u,t),ci.push(()=>{t.removeEventListener("mousemove",u)});function g(){o?u.cancel():vs=!1}if(Lh("blur",g,t),ci.push(()=>{t.removeEventListener("blur",g)}),!o){let f=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=r1;Lh("keyup",LS,t),ci.push(()=>{t.removeEventListener("keyup",LS)}),m.includes(f)?Ut("*","mouseHover",c):Ut(r.generalRule.mouseHoverHoldKey,"mouseHover",l),Ut.setScope("mouseHover"),ci.push(()=>{Ut.deleteScope("mouseHover")})}}function mM(){ci.forEach(e=>e()),ci=[],Ut.setScope("all")}function LS(e){vs=!1}function Lh(e,t,n=window){return n.addEventListener(e,t,{signal:pM})}function Mh(e,t,n,r=window){if(n=n||FS(e.rule,r),!n){R.debug("can not find selection part!");return}if(hM(n,t))return;if(Fh(n)){R.debug("exclude dom");return}kS(e,n);let i=Qu();i&&(i.setupMouseHoverListener=ps);let o=Tn(e);o.excludeSelectors=[],o.selectors=[];let s=!1,u=kh({...i},e);ha({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{Vi(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let g=Date.now();it(Ub,g),ht("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function FS(e,t){return fM(dd,gd,e,t)}function fM(e,t,n,r){let a=Ey(e,t,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=wy(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:MS(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){R.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{yM(r)}),!0}function bM(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function yM(e){let t=Qu();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Wu(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function _h(e){return!!(e.host&&e.mode)}function _S(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||_h(n))return e;for(;n&&n.nodeName!=="BODY"&&!_h(n)&&$p(n,t);){let r=n.parentNode;if(r&&_h(r))break;n=r}return n}function MS(e,t){return e.nodeType===Node.TEXT_NODE||$p(e,t)?_S(e,t):e}function BS(e,t){dd=t.clientX,gd=t.clientY,Mh(e,!0)}var nl=[];function Bh(e,t){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",i),nl.push(()=>{document.removeEventListener("click",i)})}function IS(e,t){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),nl.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function pd(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),nl.push(()=>{document.removeEventListener("touchstart",r)})}var Vu={touchShortcutsOff:()=>{},"multipleClick.2":Bh,"multipleClick.3":Bh,"multipleClick.4":Bh,"slide.left":IS,"slide.right":IS,"fingers.2":pd,"fingers.3":pd,"fingers.4":pd,"fingers.5":pd};async function T6(e){try{xM();let t=await vr(),n=hc.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Ih(e,t,r.command),i=Vu[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{CM(r.command,e,u)})})}catch(t){R.error(t)}}function Ih(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var TM=()=>{sh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},vM=()=>{lh();let e=new CustomEvent(oa,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},SM=()=>{uh();let e=new CustomEvent(oa,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},RS=0,CM=(e,t,n)=>{new Date().getTime()-RS<200||(RS=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?TM():e==="touchShortcutsToggleTranslationMask"?SM():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?vM():e==="touchShortcutsToggleTranslateTouchElement"&&BS(t,n))};function xM(){nl.forEach(e=>{e()}),nl=[]}function rl(e){let{onChange:t,type:n,title:r,command:a,description:i,shortcut:o,disabled:s}=e,[u,l]=K(!1),{t:c}=W();if(n==="finger")return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("select",{class:"select !w-36",onChange:g=>{g.preventDefault();let f=g.target.value;t(f)},children:Object.keys(Vu).map((g,f)=>d("option",{value:g,selected:o===g,children:`${c(g)}`},"finger-"+f))})]});if(n==="mouseHoverHoldKey"){let g=sa.includes(o);return d("div",{children:[d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d(Ur,{className:"select",maxWidth:250,items:sa.filter(f=>!(g&&f==="OtherCustom"||f==="OtherCustom")).map(f=>{let m=c("mouseHoldKey",{key:f}),h=sa.includes(o),y=f===o;return o==="Off"&&f===o&&u&&(y=!1),f==="Auto"?m=c("mouseHoldKeyAuto"):f==="Off"?m=c("mouseHoldKeyOff"):f==="OtherCustom"?m=h?c("mouseHoldKeyOther"):c("mouseHoldKeyCustomKey",{key:o}):f==="Other"&&(m=c("mouseHoldKeyOther")),h||f==="Other"&&(y=!0),{label:m,value:f,selected:y,onSelected:T=>{T.value==="Other"?(l(!0),t("Off",!0)):(l(!1),t(T.value))}}})})]}),(!g||u)&&d("div",{class:"nav",children:[d(Ae,{title:c("mouseHoverCustomKeyTitle"),description:c("mouseHoverCustomKeyDescription")||""}),d("input",{type:"text",class:"!w-36",placeholder:c("mouseHoverShortcutPlaceholder"),name:"mouseHoverHoldKey",value:o==="Off"?"":o,onChange:f=>{t(f.target.value)}})]})]})}return d("div",{class:"nav",children:[d(Ae,{title:r,description:i||""}),d("div",{children:[d("input",{type:"text",class:"!w-36",disabled:s,id:a,name:a,value:o,onChange:g=>{t(g.target.value)}}),s&&d("div",{class:"ml-2 inline-block",children:d(or,{width:200,multiple:!0,text:c("shortcutDisableTooltip"),children:d("span",{children:d(n9,{width:20,height:16})})})})]})]})}function Rh(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let[o,s]=fa(),{t:u}=W(),l=Jt(t),c=Un(l);return l?d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("mouseHoverOptions")})}),d(ss,{image:Er("images/hover_intro.png"),nightImage:Er("images/hover_intro_night.png"),title:u("intro.hoverTitle"),description:u("intro.hoverDescription")}),d(rl,{onChange:(g,f)=>{n(m=>{let y={...m.generalRule||{},mouseHoverHoldKey:g||"Off"};return g!=="Off"&&(y.mouseHoverPreferenceKey=g),{...m,generalRule:y}}),f||lt(u("saved"))},type:"mouseHoverHoldKey",title:u("mouseHoverHoldKey"),command:"mouseHoverHoldKey",description:u("desc.mouseHoverHoldKey"),shortcut:l.generalRule.mouseHoverHoldKey,disabled:!1}),d(EM,{setSettings:n,config:l}),!k1()&&d("div",{class:"nav",children:[d(Ae,{title:u("confirmSupportMouse"),description:u("confirmSupportMouseDescription")}),d("label",{for:"confirmSupportMouse",children:d("input",{type:"checkbox",onChange:g=>{let f=g.target.checked;s({...o,confirmSupportMouse:f})},checked:o?.confirmSupportMouse===!0,id:"confirmSupportMouse",name:"switch",role:"switch"})})]}),d(ni,{config:l,ctx:c,serviceType:"mouseHoverTranslationService"})]})}):null}function EM({setSettings:e,config:t}){let{t:n}=W();return Ba()?d(rl,{onChange:(r,a)=>{e(i=>{let s={...i.generalRule||{},touchShortcutsToggleTranslateTouchElement:r||"touchShortcutsOff"};return r&&r!=="touchShortcutsOff"&&(s.touchShortcutsToggleTranslateTouchElementPreferenceKey=r),{...i,generalRule:s}}),a||lt(n("saved"))},type:"finger",title:n("touchShortcutsToggleTranslateTouchElement"),command:"touchShortcutsToggleTranslateTouchElement",description:n("desc.touchShortcutsToggleTranslateTouchElement"),shortcut:t.generalRule.touchShortcutsToggleTranslateTouchElement,disabled:!1}):null}p();function Oh(){let e=Ye(),[t,n,r,a,i]=e;Ct(t,n);let o=Jt(t),s=Un(o),u=qe(f=>{s&&n(m=>Bc({...m},f))},[s,n]),l=Cu(s,t),{t:c}=W(),g=qe((f,m)=>c("floatBallOptions."+f,m),[]);return!s||!l?d("div",{children:"loading"}):d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:c("floatBallOptions")})}),d(ss,{image:Er("images/float_ball_intro.png"),nightImage:Er("images/float_ball_intro_night.png"),title:c("intro.floatBallTitle"),description:c("intro.floatBallDescription")}),d(wM,{config:s.config,t:g,rawT:c,rule:l,updateFloatBallRule:u}),d(DM,{t:g,rule:l,updateFloatBallRule:u}),d(AM,{t:g,rule:l,updateFloatBallRule:u}),d(kM,{t:g,rule:l,updateFloatBallRule:u})]})})}function wM({rule:e,config:t,updateFloatBallRule:n,t:r,rawT:a}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:r("enable"),description:e.isPc?r("enableDescPc"):r("enableDesc",{touch:a("fingers."+t.generalRule.fingerCountToToggleTranslagePageWhenTouching)})}),d("label",{for:"enable",children:d("input",{type:"checkbox",id:"enable",name:"switch",role:"switch",onChange:i=>{let o=i.target.checked;e.enable=o,n(e)},checked:e.enable})})]})})}function DM({t:e,rule:t,updateFloatBallRule:n}){let[r,a]=K(!1),[i,o]=K(""),[s,u]=K(-1);le(()=>{Ut("esc",()=>{a(!1)})},[]);let l=()=>{a(!r)},c=(m,h,y,T)=>{l(),s==h&&h!=-1?t.blockUrls[h]=m:t.blockUrls=zn(m,t.blockUrls),n(t),u(-1),o("")},g=(m,h)=>{m.forEach(y=>{t.blockUrls=Ht(y,t.blockUrls)}),n(t),u(-1),o("")},f=(m,h,y)=>{a(!r),o(m),u(y)};return d(xe,{children:[d("div",{class:"nav",children:[d(Ae,{title:e("blockUrls"),description:e("blockUrlDesc")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:m=>{m.preventDefault(),l()},children:e("add")})}),r?d(ma,{toggleModal:m=>{m.preventDefault(),l()},onSubmitAddUrl:c,type:"excludeMatches",urlValue:i,index:s}):null]}),d(ei,{urls:t.blockUrls||[],type:"excludeMatches",onDeleteUrl:g,onEditUrl:f})]})}function AM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("clickType"),description:e("clickTypeDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.clickType=r.target.value,n(t)},children:[d("option",{value:"translate",selected:t.clickType=="translate",children:e("clickTranslate")}),d("option",{value:"popup",selected:t.clickType=="popup",children:e("clickPopup")})]})]})})}function kM({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(Ae,{title:e("fixedPosition"),description:e("fixedPositionDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.fixedPosition=r.target.value,n(t)},children:[d("option",{value:"left",selected:t.fixedPosition=="left",children:e("fixedPositionLeft")}),d("option",{value:"right",selected:t.fixedPosition=="right",children:e("fixedPositionRight")})]})]})})}p();function zh(){let e=Ye(),[t,n,r,a,i]=e,[o]=fa();Ct(t,n);let[s,u]=K(null),{t:l}=W();if(le(()=>{yt().then(m=>{yn({config:m,url:globalThis.location.href}).then(h=>{u(h)})})},[t]),!s)return d("div",{children:"loading"});let c={...s.config,shortcuts:{...s.config.shortcuts}},g=hc.filter(m=>m.name==="touch"?Ba():m.name==="mouse"?_i(o):!0).map(m=>({name:m.name,shortcuts:m.shortcuts.map(h=>{let y="",T="normal";typeof h=="string"?y=h:(y=h.command,h.type&&(T=h.type));let b="";l(`desc.${y}`)!==`desc.${y}`&&(b=l(`desc.${y}`));let w="";T==="finger"?w=Ih(s,t,y):T==="mouseHoverHoldKey"?t?.generalRule&&t?.generalRule[y]!==void 0?w=t.generalRule[y]:w=c.generalRule[y]:t?.shortcuts&&t?.shortcuts[y]!==void 0?w=t.shortcuts[y]:w=c.shortcuts[y];let L=l(`browser.${y}`);return(T==="finger"||T==="mouseHoverHoldKey")&&(L=l(`${y}`)),{command:y,type:T,shortcut:w,title:L,description:b,disabled:!(pe()||wo())}})})),f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsSucks")," ",d("kbd",{children:"Ctrl+A"}),"\xA0",d("kbd",{children:"Alt+B"}),"\xA0",d("kbd",{children:"Command+C"}),"\xA0 ",d("kbd",{children:"Ctrl+Shift+D"})," "]});return pe()||(rr()?f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForFirefox")," ",d("a",{target:"_blank",href:"https://support.mozilla.org/zh-CN/kb/%E7%AE%A1%E7%90%86Firefox%E7%9A%84%E6%89%A9%E5%B1%95%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F",children:[l("help"),"?"]})]}):wo()||(f=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForChrome"),"\xA0",d("a",{href:"#",onClick:m=>{m.preventDefault(),Z.tabs.create({url:"chrome://extensions/shortcuts"})},children:l("goSettings")})]}))),d(ct,{children:d(we.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:l("shortcutSettingsTitle")})}),d("div",{children:d(f,{})}),g.map((m,h)=>d("article",{class:"mb-8",children:[d("div",{class:"text-gray-500 text-sm",children:l(`shortcutGroup.${m.name}`)}),m.shortcuts.map((y,T)=>xs(rl,{...y,key:`shortcut-${T}`,onChange:(b,x)=>{n(w=>{if(y.type==="finger"){let M={...w.generalRule||{},[y.command]:b||"touchShortcutsOff"};return y.command==="touchShortcutsToggleTranslateTouchElement"&&b&&b!=="touchShortcutsOff"&&(M.touchShortcutsToggleTranslateTouchElementPreferenceKey=b),{...w,generalRule:M}}else if(y.type==="mouseHoverHoldKey"){let M={...w.generalRule||{},[y.command]:b||"Off"};return b!=="Off"&&(M.mouseHoverPreferenceKey=b),{...w,generalRule:M}}else{let L={...w?.shortcuts},M={...w,shortcuts:{...L,[y.command]:b}};return b||(M.shortcuts[y.command]=""),M}}),x||lt(l("saved"))}}))]},`shortcut-group-${h}`))]})})}p();function PM(){let[e,t]=K(null);return le(()=>{yt().then(n=>{t(n)})},[]),e}function Nh(){let[e,t,n,r,a]=Ye(),i=PM(),{t:o,setLang:s}=W(),[u,l]=fa();if(!i)return null;return d(ct,{children:d("div",{class:"pb-4",children:d(c,{})})});function c(){return le(()=>{e&&g()},[e]),d(xe,{children:d("div",{style:{width:"100%"},children:d("p",{children:[o("download_started")," ",d("a",{href:"#",class:"secondary",onClick:f=>{f.preventDefault(),g()},children:o("here")})]})})});function g(){let f=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});fi.saveAs(f,"immersive-translate-config-"+os()+".txt")}}}p();p();function OS(){return d("svg",{id:"svg",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0, 0, 400,400",children:d("g",{id:"svgg",children:[d("path",{id:"path0",d:"M116.705 75.100 L 116.600 89.000 88.900 89.103 L 61.200 89.205 61.200 137.600 L 61.200 185.995 88.900 186.097 L 116.600 186.200 116.704 207.100 L 116.807 228.000 130.604 228.000 L 144.400 228.000 144.400 207.000 L 144.400 186.000 172.200 186.000 L 200.000 186.000 200.000 137.600 L 200.000 89.200 172.200 89.200 L 144.400 89.200 144.400 75.200 L 144.400 61.200 130.605 61.200 L 116.810 61.200 116.705 75.100 M227.600 88.772 L 227.600 102.800 250.576 102.800 C 265.463 102.800,273.640 102.941,273.800 103.200 C 273.936 103.420,274.387 103.600,274.803 103.600 C 281.873 103.600,292.696 112.756,295.278 120.921 C 295.778 122.505,296.371 123.928,296.594 124.085 C 296.854 124.268,297.044 130.468,297.124 141.385 L 297.247 158.400 311.262 158.400 L 325.277 158.400 325.083 140.900 C 324.882 122.835,324.541 118.696,323.013 115.765 C 322.678 115.124,322.404 114.303,322.402 113.940 C 322.398 112.713,319.594 106.004,317.992 103.386 C 317.116 101.956,316.400 100.635,316.400 100.451 C 316.400 100.267,315.995 99.677,315.500 99.139 C 315.005 98.601,314.107 97.412,313.504 96.496 C 311.880 94.027,305.442 87.743,302.856 86.103 C 301.615 85.316,300.456 84.430,300.280 84.136 C 300.104 83.841,299.804 83.600,299.613 83.600 C 299.422 83.600,297.879 82.780,296.184 81.778 C 292.949 79.865,288.492 78.078,284.796 77.210 C 283.588 76.927,282.420 76.558,282.200 76.390 C 280.817 75.333,275.285 75.062,251.900 74.906 L 227.600 74.745 227.600 88.772 M116.600 137.600 L 116.600 158.200 102.700 158.305 L 88.800 158.410 88.800 137.600 L 88.800 116.790 102.700 116.895 L 116.600 117.000 116.600 137.600 M172.000 137.600 L 172.000 158.400 158.200 158.400 L 144.400 158.400 144.400 137.600 L 144.400 116.800 158.200 116.800 L 172.000 116.800 172.000 137.600 M255.091 172.900 C 254.773 174.314,252.711 179.778,252.412 180.000 C 252.263 180.110,251.461 182.090,250.628 184.400 C 249.795 186.710,248.891 188.960,248.619 189.400 C 248.166 190.130,246.935 193.348,245.328 198.000 C 244.986 198.990,244.579 199.890,244.424 200.000 C 244.269 200.110,243.461 202.090,242.628 204.400 C 241.795 206.710,240.891 208.960,240.619 209.400 C 240.166 210.130,238.935 213.348,237.328 218.000 C 236.986 218.990,236.579 219.890,236.424 220.000 C 236.269 220.110,235.461 222.090,234.628 224.400 C 233.795 226.710,232.891 228.960,232.619 229.400 C 232.166 230.130,230.935 233.348,229.328 238.000 C 228.986 238.990,228.579 239.890,228.424 240.000 C 228.269 240.110,227.461 242.090,226.628 244.400 C 225.795 246.710,224.883 248.969,224.600 249.421 C 224.317 249.872,223.808 251.042,223.468 252.021 C 221.781 256.882,220.655 259.819,220.412 260.000 C 220.263 260.110,219.461 262.090,218.628 264.400 C 217.795 266.710,216.883 268.969,216.600 269.421 C 216.317 269.872,215.808 271.042,215.468 272.021 C 213.781 276.882,212.655 279.819,212.412 280.000 C 212.263 280.110,211.461 282.090,210.628 284.400 C 209.795 286.710,208.891 288.960,208.619 289.400 C 208.166 290.130,206.935 293.348,205.328 298.000 C 204.986 298.990,204.579 299.890,204.424 300.000 C 204.269 300.110,203.461 302.090,202.628 304.400 C 201.795 306.710,200.891 308.960,200.619 309.400 C 200.166 310.130,198.935 313.348,197.328 318.000 C 196.986 318.990,196.583 319.890,196.433 320.000 C 196.191 320.178,194.400 324.617,194.400 325.040 C 194.400 325.133,201.186 325.162,209.480 325.105 L 224.560 325.000 225.465 322.471 C 225.963 321.079,226.659 319.369,227.011 318.671 C 227.637 317.428,230.057 311.085,230.587 309.300 C 230.734 308.805,231.001 308.400,231.180 308.400 C 231.360 308.400,231.597 307.995,231.708 307.500 C 231.993 306.224,234.272 300.138,235.022 298.649 C 235.639 297.423,238.062 291.071,238.587 289.300 C 238.734 288.805,239.022 288.400,239.227 288.400 C 239.432 288.400,239.600 288.145,239.600 287.833 C 239.600 287.521,239.954 286.441,240.386 285.433 L 241.172 283.600 269.531 283.600 L 297.891 283.600 298.546 285.313 C 298.906 286.256,299.200 287.175,299.200 287.355 C 299.200 287.536,299.629 288.537,300.152 289.580 C 300.676 290.623,301.788 293.349,302.623 295.638 C 303.458 297.927,304.269 299.890,304.424 300.000 C 304.579 300.110,304.987 301.010,305.331 302.000 C 306.989 306.773,307.765 308.786,308.800 311.000 C 310.009 313.586,311.554 317.639,311.888 319.100 C 312.001 319.595,312.238 320.000,312.416 320.000 C 312.593 320.000,312.945 320.675,313.198 321.500 C 313.452 322.325,313.847 323.495,314.078 324.100 L 314.497 325.200 329.449 325.200 C 346.303 325.200,345.174 325.457,343.448 322.020 C 342.924 320.977,341.812 318.251,340.977 315.962 C 340.142 313.673,339.337 311.710,339.188 311.600 C 338.945 311.419,337.819 308.482,336.132 303.621 C 335.792 302.642,335.283 301.472,335.000 301.021 C 334.717 300.569,333.805 298.310,332.972 296.000 C 332.139 293.690,331.337 291.710,331.188 291.600 C 330.945 291.419,329.819 288.482,328.132 283.621 C 327.792 282.642,327.283 281.472,327.000 281.021 C 326.717 280.569,325.805 278.310,324.972 276.000 C 324.139 273.690,323.337 271.710,323.188 271.600 C 322.945 271.419,321.819 268.482,320.132 263.621 C 319.792 262.642,319.283 261.472,319.000 261.021 C 318.717 260.569,317.805 258.310,316.972 256.000 C 316.139 253.690,315.337 251.710,315.188 251.600 C 314.945 251.419,313.819 248.482,312.132 243.621 C 311.792 242.642,311.283 241.472,311.000 241.021 C 310.717 240.569,309.805 238.310,308.972 236.000 C 308.139 233.690,307.337 231.710,307.188 231.600 C 306.945 231.419,305.819 228.482,304.132 223.621 C 303.792 222.642,303.283 221.472,303.000 221.021 C 302.717 220.569,301.805 218.310,300.972 216.000 C 300.139 213.690,299.331 211.710,299.176 211.600 C 299.021 211.490,298.614 210.590,298.272 209.600 C 296.665 204.948,295.434 201.730,294.981 201.000 C 294.709 200.560,293.805 198.310,292.972 196.000 C 292.139 193.690,291.331 191.710,291.176 191.600 C 291.021 191.490,290.614 190.590,290.272 189.600 C 288.667 184.953,287.434 181.730,286.982 181.000 C 286.710 180.560,285.905 178.580,285.192 176.600 C 284.480 174.620,283.718 172.775,283.500 172.500 C 283.195 172.117,279.842 172.000,269.198 172.000 L 255.293 172.000 255.091 172.900 M270.342 214.500 C 270.978 216.680,272.184 219.788,272.480 220.011 C 272.634 220.128,273.474 222.198,274.346 224.611 C 275.218 227.025,276.219 229.562,276.570 230.249 C 277.192 231.467,279.455 237.406,279.904 239.000 C 280.028 239.440,280.272 239.895,280.445 240.011 C 280.618 240.128,281.479 242.228,282.357 244.679 C 283.235 247.131,284.144 249.465,284.377 249.868 C 285.100 251.118,286.400 254.437,286.400 255.033 C 286.400 255.513,283.802 255.600,269.400 255.600 C 260.050 255.600,252.400 255.506,252.400 255.392 C 252.400 255.278,252.850 254.077,253.400 252.723 C 253.950 251.370,254.400 250.036,254.400 249.760 C 254.400 249.483,254.637 249.019,254.928 248.729 C 255.218 248.438,255.560 247.840,255.688 247.400 C 256.167 245.754,258.416 239.852,259.022 238.649 C 259.639 237.423,262.062 231.071,262.587 229.300 C 262.734 228.805,263.001 228.400,263.180 228.400 C 263.360 228.400,263.597 227.995,263.708 227.500 C 264.027 226.071,266.188 220.398,267.344 217.955 C 267.925 216.727,268.400 215.617,268.400 215.487 C 268.400 213.445,269.823 212.722,270.342 214.500 M74.908 258.900 C 75.078 275.176,75.446 280.965,76.390 282.200 C 76.558 282.420,76.925 283.590,77.205 284.800 C 78.005 288.246,79.979 293.127,81.870 296.333 C 82.821 297.946,83.600 299.422,83.600 299.613 C 83.600 299.804,83.841 300.104,84.136 300.280 C 84.430 300.456,85.316 301.615,86.103 302.856 C 87.894 305.679,94.229 312.056,96.838 313.661 C 97.917 314.325,98.800 315.003,98.800 315.167 C 98.800 315.331,99.295 315.718,99.900 316.027 C 100.505 316.336,102.122 317.262,103.493 318.086 C 106.058 319.626,112.767 322.398,113.940 322.402 C 114.303 322.404,115.124 322.678,115.765 323.013 C 118.974 324.686,122.332 324.902,147.900 325.085 L 172.400 325.259 172.400 311.245 L 172.400 297.230 148.585 297.115 C 133.034 297.040,124.671 296.859,124.485 296.593 C 124.328 296.370,123.304 295.955,122.210 295.671 C 113.434 293.396,105.109 284.270,103.791 275.479 C 103.635 274.440,103.348 273.492,103.154 273.371 C 102.958 273.251,102.800 266.091,102.800 257.376 L 102.800 241.600 88.764 241.600 L 74.728 241.600 74.908 258.900 ",stroke:"none",fill:"#fcfcfc","fill-rule":"evenodd"}),d("path",{id:"path1",d:"M47.411 2.664 C 45.657 2.981,44.127 3.372,44.011 3.533 C 43.895 3.694,42.810 4.067,41.600 4.362 C 38.910 5.017,33.083 7.195,32.777 7.660 C 32.654 7.847,31.304 8.616,29.777 9.371 C 28.249 10.125,26.280 11.385,25.400 12.171 C 24.520 12.956,23.626 13.600,23.412 13.600 C 23.006 13.600,21.491 14.969,18.277 18.242 C 14.870 21.711,14.144 22.565,12.961 24.499 C 12.323 25.544,11.674 26.399,11.519 26.399 C 11.365 26.400,10.466 27.975,9.521 29.900 C 8.576 31.825,7.581 33.634,7.309 33.921 C 6.749 34.512,4.509 41.424,4.141 43.700 C 4.007 44.525,3.763 45.200,3.598 45.200 C 2.468 45.200,2.400 53.950,2.400 200.400 C 2.400 348.123,2.460 355.600,3.649 355.600 C 3.842 355.600,4.000 355.940,4.000 356.355 C 4.000 358.391,6.974 367.200,7.661 367.200 C 7.847 367.200,8.001 367.425,8.002 367.700 C 8.005 368.559,10.815 373.724,11.832 374.741 C 12.364 375.273,12.800 375.918,12.800 376.174 C 12.800 377.128,22.380 387.200,23.288 387.200 C 23.493 387.200,24.161 387.695,24.771 388.300 C 25.381 388.905,26.852 389.918,28.040 390.551 C 29.228 391.184,30.290 391.836,30.400 392.000 C 30.632 392.346,33.327 393.596,36.432 394.797 C 37.625 395.259,39.175 395.902,39.877 396.226 C 40.580 396.550,42.830 397.214,44.877 397.701 L 48.600 398.585 199.200 398.710 C 307.771 398.799,350.693 398.711,353.000 398.391 C 357.180 397.813,362.564 396.484,362.733 395.990 C 362.807 395.775,363.127 395.600,363.445 395.600 C 364.500 395.600,370.951 392.776,371.600 392.030 C 371.710 391.904,372.430 391.462,373.200 391.049 C 376.487 389.286,377.434 388.693,378.000 388.045 C 378.330 387.668,379.320 386.837,380.200 386.198 C 382.889 384.248,388.894 377.717,389.891 375.657 C 390.221 374.976,390.875 373.991,391.345 373.467 C 392.202 372.513,393.857 369.363,394.814 366.866 C 395.095 366.132,395.535 365.322,395.790 365.066 C 396.421 364.434,398.247 357.808,398.993 353.448 C 399.919 348.029,399.914 52.728,398.988 47.352 C 398.229 42.949,396.410 36.400,395.945 36.400 C 395.755 36.400,395.600 36.231,395.600 36.024 C 395.600 35.238,392.306 28.585,391.766 28.280 C 391.455 28.104,391.200 27.786,391.200 27.574 C 391.200 26.249,386.178 20.048,381.967 16.174 C 379.417 13.828,373.665 9.784,371.800 9.025 C 370.920 8.667,370.020 8.154,369.800 7.886 C 369.101 7.034,360.812 4.018,359.133 4.005 C 358.767 4.002,358.407 3.827,358.333 3.616 C 357.735 1.894,56.765 0.972,47.411 2.664 M144.705 74.900 L 144.810 88.800 172.405 88.800 L 200.000 88.800 200.000 137.600 L 200.000 186.400 172.400 186.400 L 144.800 186.400 144.800 207.200 L 144.800 228.000 130.600 228.000 L 116.400 228.000 116.400 207.200 L 116.400 186.400 88.600 186.400 L 60.800 186.400 60.800 137.600 L 60.800 88.800 88.600 88.800 L 116.400 88.800 116.400 74.795 L 116.400 60.790 130.500 60.895 L 144.600 61.000 144.705 74.900 M277.400 75.067 C 277.840 75.324,279.820 75.825,281.800 76.181 C 285.920 76.920,291.600 78.689,291.600 79.233 C 291.600 79.435,291.873 79.600,292.206 79.600 C 292.912 79.600,299.079 82.679,299.271 83.127 C 299.342 83.294,300.210 83.900,301.200 84.475 C 305.072 86.723,313.353 94.921,315.225 98.359 C 315.568 98.990,316.158 99.815,316.536 100.193 C 318.699 102.356,323.995 115.750,323.999 119.067 C 324.000 119.543,324.164 119.993,324.364 120.067 C 325.126 120.346,325.600 129.481,325.600 143.869 L 325.600 158.800 311.200 158.800 L 296.800 158.800 296.800 143.055 C 296.800 124.194,296.908 124.966,293.169 117.022 C 291.290 113.028,285.600 107.884,280.800 105.838 C 279.370 105.229,277.570 104.431,276.800 104.065 C 275.552 103.472,272.799 103.387,251.500 103.282 L 227.600 103.165 227.600 88.753 L 227.600 74.341 252.100 74.470 C 269.857 74.564,276.820 74.729,277.400 75.067 M89.200 137.600 L 89.200 158.000 102.800 158.000 L 116.400 158.000 116.400 137.600 L 116.400 117.200 102.800 117.200 L 89.200 117.200 89.200 137.600 M144.800 137.600 L 144.800 158.000 158.400 158.000 L 172.000 158.000 172.000 137.600 L 172.000 117.200 158.400 117.200 L 144.800 117.200 144.800 137.600 M284.742 174.500 C 285.378 175.875,286.301 178.170,286.792 179.600 C 287.284 181.030,287.917 182.569,288.200 183.021 C 288.483 183.472,288.994 184.642,289.335 185.621 C 291.027 190.467,291.767 192.393,292.787 194.597 C 293.398 195.919,294.301 198.170,294.792 199.600 C 295.284 201.030,295.917 202.569,296.200 203.021 C 296.483 203.472,296.994 204.642,297.335 205.621 C 299.027 210.467,299.767 212.393,300.787 214.597 C 301.398 215.919,302.301 218.170,302.792 219.600 C 303.284 221.030,303.917 222.569,304.200 223.021 C 304.483 223.472,304.994 224.642,305.335 225.621 C 307.027 230.467,307.767 232.393,308.787 234.597 C 309.398 235.919,310.301 238.170,310.792 239.600 C 311.284 241.030,311.917 242.569,312.200 243.021 C 312.483 243.472,312.994 244.642,313.335 245.621 C 315.027 250.467,315.767 252.393,316.787 254.597 C 317.398 255.919,318.301 258.170,318.792 259.600 C 319.284 261.030,319.917 262.569,320.200 263.021 C 320.483 263.472,320.994 264.642,321.335 265.621 C 323.027 270.467,323.767 272.393,324.787 274.597 C 325.398 275.919,326.301 278.170,326.792 279.600 C 327.284 281.030,327.917 282.569,328.200 283.021 C 328.483 283.472,328.994 284.642,329.335 285.621 C 331.027 290.467,331.767 292.393,332.787 294.597 C 333.398 295.919,334.301 298.170,334.792 299.600 C 335.284 301.030,335.917 302.569,336.200 303.021 C 336.483 303.472,336.994 304.642,337.335 305.621 C 339.027 310.467,339.767 312.393,340.787 314.597 C 341.398 315.919,342.304 318.170,342.799 319.600 C 343.295 321.030,343.975 322.675,344.310 323.255 C 345.685 325.635,345.908 325.600,329.282 325.600 L 314.138 325.600 313.016 322.300 C 312.399 320.485,311.676 318.640,311.410 318.200 C 311.144 317.760,310.165 315.423,309.234 313.006 C 308.304 310.590,307.395 308.430,307.215 308.206 C 307.034 307.983,306.609 306.990,306.269 306.000 C 304.673 301.355,303.463 298.161,303.149 297.761 C 302.959 297.520,302.082 295.377,301.200 293.000 C 300.318 290.623,299.435 288.480,299.236 288.239 C 299.038 287.998,298.568 286.855,298.192 285.700 L 297.508 283.600 269.566 283.600 L 241.625 283.600 240.633 285.700 C 240.087 286.855,238.983 289.600,238.178 291.800 C 237.373 294.000,236.583 295.890,236.422 296.000 C 236.261 296.110,236.028 296.560,235.904 297.000 C 235.462 298.571,233.200 304.513,232.425 306.142 C 231.992 307.054,230.979 309.600,230.176 311.800 C 229.372 314.000,228.583 315.890,228.422 316.000 C 228.261 316.110,228.028 316.560,227.904 317.000 C 227.349 318.970,225.160 324.566,224.753 325.057 C 224.144 325.790,194.000 325.870,194.000 325.139 C 194.000 324.885,194.433 323.760,194.963 322.639 C 195.849 320.762,196.618 318.753,198.269 314.000 C 198.613 313.010,199.021 312.110,199.176 312.000 C 199.331 311.890,200.139 309.910,200.972 307.600 C 201.805 305.290,202.717 303.031,203.000 302.579 C 203.283 302.128,203.792 300.958,204.132 299.979 C 205.819 295.118,206.945 292.181,207.188 292.000 C 207.337 291.890,208.139 289.910,208.972 287.600 C 209.805 285.290,210.709 283.040,210.981 282.600 C 211.434 281.870,212.665 278.652,214.272 274.000 C 214.614 273.010,215.021 272.110,215.176 272.000 C 215.331 271.890,216.139 269.910,216.972 267.600 C 217.805 265.290,218.717 263.031,219.000 262.579 C 219.283 262.128,219.792 260.958,220.132 259.979 C 221.819 255.118,222.945 252.181,223.188 252.000 C 223.337 251.890,224.139 249.910,224.972 247.600 C 225.805 245.290,226.717 243.031,227.000 242.579 C 227.283 242.128,227.792 240.958,228.132 239.979 C 229.819 235.118,230.945 232.181,231.188 232.000 C 231.337 231.890,232.139 229.910,232.972 227.600 C 233.805 225.290,234.709 223.040,234.981 222.600 C 235.434 221.870,236.665 218.652,238.272 214.000 C 238.614 213.010,239.021 212.110,239.176 212.000 C 239.331 211.890,240.139 209.910,240.972 207.600 C 241.805 205.290,242.717 203.031,243.000 202.579 C 243.283 202.128,243.792 200.958,244.132 199.979 C 245.819 195.118,246.945 192.181,247.188 192.000 C 247.337 191.890,248.139 189.910,248.972 187.600 C 249.805 185.290,250.709 183.040,250.981 182.600 C 251.463 181.823,253.007 177.762,254.290 173.900 L 254.922 172.000 269.253 172.000 L 283.584 172.000 284.742 174.500 M269.200 214.548 C 269.200 214.875,268.963 215.381,268.672 215.671 C 268.382 215.962,268.040 216.560,267.912 217.000 C 267.427 218.664,265.182 224.551,264.425 226.142 C 263.992 227.054,262.979 229.600,262.176 231.800 C 261.372 234.000,260.583 235.890,260.422 236.000 C 260.261 236.110,260.028 236.560,259.904 237.000 C 259.462 238.569,257.200 244.513,256.426 246.142 C 255.992 247.054,255.012 249.510,254.248 251.600 L 252.860 255.400 269.292 255.504 C 278.330 255.562,285.804 255.529,285.902 255.432 C 285.999 255.334,285.594 253.937,285.001 252.327 C 284.409 250.717,283.822 249.040,283.697 248.600 C 283.572 248.160,283.328 247.705,283.155 247.589 C 282.982 247.472,282.126 245.402,281.254 242.989 C 280.382 240.575,279.381 238.038,279.030 237.351 C 278.408 236.133,276.145 230.194,275.696 228.600 C 275.572 228.160,275.328 227.705,275.155 227.589 C 274.982 227.472,274.125 225.402,273.251 222.989 C 272.376 220.575,271.288 217.844,270.831 216.919 C 270.374 215.995,270.000 215.061,270.000 214.843 C 270.000 214.625,269.820 214.336,269.600 214.200 C 269.380 214.064,269.200 214.221,269.200 214.548 M103.200 256.745 C 103.200 271.263,103.434 275.394,104.370 277.400 C 104.576 277.840,105.239 279.370,105.845 280.800 C 107.787 285.385,113.002 291.278,116.618 292.972 C 117.488 293.380,119.100 294.145,120.200 294.673 C 124.060 296.526,124.345 296.547,149.000 296.778 L 172.600 297.000 172.600 311.200 L 172.600 325.400 151.400 325.522 C 130.794 325.641,120.383 325.260,120.067 324.374 C 119.993 324.168,119.543 324.000,119.067 323.999 C 115.750 323.995,102.356 318.699,100.193 316.536 C 99.815 316.158,98.990 315.568,98.359 315.225 C 94.897 313.340,86.661 305.008,84.496 301.200 C 83.934 300.210,83.261 299.220,83.001 299.000 C 82.404 298.494,79.600 292.826,79.600 292.124 C 79.600 291.836,79.435 291.600,79.233 291.600 C 78.689 291.600,76.920 285.920,76.181 281.800 C 75.825 279.820,75.327 277.840,75.073 277.400 C 74.749 276.839,74.568 271.314,74.467 258.900 L 74.324 241.200 88.762 241.200 L 103.200 241.200 103.200 256.745 ",stroke:"none",fill:"#ec4c8c","fill-rule":"evenodd"}),d("path",{id:"path2",d:"",stroke:"none",fill:"#f4d4100","fill-rule":"evenodd"}),d("path",{id:"path3",d:"M235.600 74.690 C 256.786 74.968,273.107 74.972,272.938 74.700 C 272.836 74.535,262.548 74.441,250.076 74.491 C 237.604 74.542,231.090 74.631,235.600 74.690 M286.800 77.414 C 286.800 77.693,289.706 78.831,290.091 78.703 C 290.282 78.639,289.620 78.284,288.619 77.913 C 287.619 77.542,286.800 77.317,286.800 77.414 M302.400 85.290 C 302.400 85.377,303.435 86.328,304.700 87.403 C 305.965 88.479,306.640 88.944,306.200 88.436 C 305.364 87.471,302.400 85.017,302.400 85.290 M308.783 90.900 C 310.441 92.666,310.800 92.984,310.800 92.683 C 310.800 92.619,309.945 91.764,308.900 90.783 L 307.000 89.000 308.783 90.900 M312.597 95.300 C 313.672 96.565,314.623 97.600,314.710 97.600 C 314.983 97.600,312.529 94.636,311.564 93.800 C 311.056 93.360,311.521 94.035,312.597 95.300 M321.200 109.884 C 321.200 110.451,322.363 113.200,322.602 113.200 C 322.707 113.200,322.496 112.435,322.132 111.500 C 321.395 109.607,321.200 109.269,321.200 109.884 M88.994 137.400 L 89.000 158.200 102.700 158.208 L 116.400 158.216 102.804 158.103 L 89.207 157.990 89.098 137.295 L 88.989 116.600 88.994 137.400 M324.641 122.800 C 324.839 123.130,325.109 131.320,325.243 141.000 L 325.485 158.600 325.443 140.920 C 325.407 126.341,325.302 123.148,324.841 122.720 C 324.377 122.288,324.343 122.301,324.641 122.800 M151.074 158.299 C 154.855 158.365,161.155 158.365,165.074 158.299 C 168.993 158.234,165.900 158.180,158.200 158.180 C 150.500 158.180,147.293 158.234,151.074 158.299 M253.700 175.700 C 253.270 176.875,253.280 176.926,253.812 176.224 C 254.321 175.552,254.621 174.400,254.288 174.400 C 254.226 174.400,253.961 174.985,253.700 175.700 M250.196 184.272 C 249.858 185.081,249.633 185.900,249.697 186.091 C 249.761 186.282,250.116 185.620,250.487 184.619 C 251.293 182.445,251.070 182.179,250.196 184.272 M74.729 186.300 C 82.500 186.361,95.100 186.361,102.729 186.300 C 110.358 186.239,104.000 186.189,88.600 186.189 C 73.200 186.189,66.958 186.239,74.729 186.300 M158.500 186.300 C 166.145 186.361,178.655 186.361,186.300 186.300 C 193.945 186.239,187.690 186.189,172.400 186.189 C 157.110 186.189,150.855 186.239,158.500 186.300 M289.200 186.284 C 289.200 186.851,290.363 189.600,290.602 189.600 C 290.707 189.600,290.496 188.835,290.132 187.900 C 289.395 186.007,289.200 185.669,289.200 186.284 M245.700 195.700 C 245.270 196.875,245.280 196.926,245.812 196.224 C 246.321 195.552,246.621 194.400,246.288 194.400 C 246.226 194.400,245.961 194.985,245.700 195.700 M242.196 204.272 C 241.858 205.081,241.633 205.900,241.697 206.091 C 241.761 206.282,242.116 205.620,242.487 204.619 C 243.293 202.445,243.070 202.179,242.196 204.272 M297.200 206.284 C 297.200 206.851,298.363 209.600,298.602 209.600 C 298.707 209.600,298.496 208.835,298.132 207.900 C 297.395 206.007,297.200 205.669,297.200 206.284 M237.700 215.700 C 237.270 216.875,237.280 216.926,237.812 216.224 C 238.321 215.552,238.621 214.400,238.288 214.400 C 238.226 214.400,237.961 214.985,237.700 215.700 M270.032 214.824 C 270.014 215.166,270.280 215.796,270.622 216.224 C 271.234 216.988,271.238 216.987,270.876 216.200 C 270.674 215.760,270.408 215.130,270.286 214.800 C 270.093 214.282,270.059 214.285,270.032 214.824 M265.267 223.180 C 265.033 223.851,264.927 224.400,265.031 224.400 C 265.301 224.400,266.056 222.322,265.857 222.124 C 265.767 222.033,265.501 222.508,265.267 223.180 M234.196 224.272 C 233.858 225.081,233.633 225.900,233.697 226.091 C 233.761 226.282,234.116 225.620,234.487 224.619 C 235.293 222.445,235.070 222.179,234.196 224.272 M273.913 224.619 C 274.284 225.620,274.639 226.282,274.703 226.091 C 274.831 225.706,273.693 222.800,273.414 222.800 C 273.317 222.800,273.542 223.619,273.913 224.619 M305.200 226.284 C 305.200 226.851,306.363 229.600,306.602 229.600 C 306.707 229.600,306.496 228.835,306.132 227.900 C 305.395 226.007,305.200 225.669,305.200 226.284 M261.756 231.843 C 261.424 232.637,261.226 233.359,261.314 233.448 C 261.403 233.536,261.759 232.887,262.105 232.004 C 262.889 230.009,262.582 229.868,261.756 231.843 M229.700 235.700 C 229.270 236.875,229.280 236.926,229.812 236.224 C 230.321 235.552,230.621 234.400,230.288 234.400 C 230.226 234.400,229.961 234.985,229.700 235.700 M278.032 234.824 C 278.014 235.166,278.280 235.796,278.622 236.224 C 279.234 236.988,279.238 236.987,278.876 236.200 C 278.674 235.760,278.408 235.130,278.286 234.800 C 278.093 234.282,278.059 234.285,278.032 234.824 M309.113 236.219 C 309.484 237.220,309.839 237.882,309.903 237.691 C 310.031 237.306,308.893 234.400,308.614 234.400 C 308.517 234.400,308.742 235.219,309.113 236.219 M74.488 257.076 C 74.440 265.698,74.535 272.836,74.700 272.939 C 74.973 273.108,74.967 261.235,74.687 247.000 C 74.626 243.920,74.537 248.454,74.488 257.076 M257.267 243.180 C 257.033 243.851,256.927 244.400,257.031 244.400 C 257.301 244.400,258.056 242.322,257.857 242.124 C 257.767 242.033,257.501 242.508,257.267 243.180 M226.196 244.272 C 225.858 245.081,225.633 245.900,225.697 246.091 C 225.761 246.282,226.116 245.620,226.487 244.619 C 227.293 242.445,227.070 242.179,226.196 244.272 M281.913 244.619 C 282.284 245.620,282.639 246.282,282.703 246.091 C 282.831 245.706,281.693 242.800,281.414 242.800 C 281.317 242.800,281.542 243.619,281.913 244.619 M313.200 246.284 C 313.200 246.851,314.363 249.600,314.602 249.600 C 314.707 249.600,314.496 248.835,314.132 247.900 C 313.395 246.007,313.200 245.669,313.200 246.284 M253.756 251.843 C 253.424 252.637,253.226 253.359,253.314 253.448 C 253.403 253.536,253.759 252.887,254.105 252.004 C 254.889 250.009,254.582 249.868,253.756 251.843 M221.700 255.700 C 221.270 256.875,221.280 256.926,221.812 256.224 C 222.321 255.552,222.621 254.400,222.288 254.400 C 222.226 254.400,221.961 254.985,221.700 255.700 M317.113 256.219 C 317.484 257.220,317.839 257.882,317.903 257.691 C 318.031 257.306,316.893 254.400,316.614 254.400 C 316.517 254.400,316.742 255.219,317.113 256.219 M218.196 264.272 C 217.858 265.081,217.633 265.900,217.697 266.091 C 217.761 266.282,218.116 265.620,218.487 264.619 C 219.293 262.445,219.070 262.179,218.196 264.272 M321.200 266.284 C 321.200 266.851,322.363 269.600,322.602 269.600 C 322.707 269.600,322.496 268.835,322.132 267.900 C 321.395 266.007,321.200 265.669,321.200 266.284 M213.700 275.700 C 213.270 276.875,213.280 276.926,213.812 276.224 C 214.321 275.552,214.621 274.400,214.288 274.400 C 214.226 274.400,213.961 274.985,213.700 275.700 M325.113 276.219 C 325.484 277.220,325.839 277.882,325.903 277.691 C 326.031 277.306,324.893 274.400,324.614 274.400 C 324.517 274.400,324.742 275.219,325.113 276.219 M105.007 279.879 C 105.607 281.314,106.000 281.962,106.000 281.516 C 106.000 281.084,104.785 278.400,104.589 278.400 C 104.479 278.400,104.667 279.066,105.007 279.879 M210.196 284.272 C 209.858 285.081,209.633 285.900,209.697 286.091 C 209.761 286.282,210.116 285.620,210.487 284.619 C 211.293 282.445,211.070 282.179,210.196 284.272 M329.200 286.284 C 329.200 286.851,330.363 289.600,330.602 289.600 C 330.707 289.600,330.496 288.835,330.132 287.900 C 329.395 286.007,329.200 285.669,329.200 286.284 M77.913 288.619 C 78.284 289.620,78.639 290.282,78.703 290.091 C 78.831 289.706,77.693 286.800,77.414 286.800 C 77.317 286.800,77.542 287.619,77.913 288.619 M237.756 291.843 C 237.424 292.637,237.226 293.359,237.314 293.448 C 237.403 293.536,237.759 292.887,238.105 292.004 C 238.889 290.009,238.582 289.868,237.756 291.843 M301.600 293.884 C 301.600 294.451,302.763 297.200,303.002 297.200 C 303.107 297.200,302.896 296.435,302.532 295.500 C 301.795 293.607,301.600 293.269,301.600 293.884 M205.700 295.700 C 205.270 296.875,205.280 296.926,205.812 296.224 C 206.321 295.552,206.621 294.400,206.288 294.400 C 206.226 294.400,205.961 294.985,205.700 295.700 M333.113 296.219 C 333.484 297.220,333.839 297.882,333.903 297.691 C 334.031 297.306,332.893 294.400,332.614 294.400 C 332.517 294.400,332.742 295.219,333.113 296.219 M233.095 303.596 C 232.748 304.478,232.549 305.200,232.653 305.200 C 232.923 305.200,234.078 302.345,233.886 302.152 C 233.797 302.064,233.441 302.713,233.095 303.596 M86.322 303.900 C 86.977 304.725,87.928 305.760,88.436 306.200 C 88.944 306.640,88.479 305.965,87.403 304.700 C 85.213 302.124,84.490 301.589,86.322 303.900 M202.196 304.272 C 201.858 305.081,201.633 305.900,201.697 306.091 C 201.761 306.282,202.116 305.620,202.487 304.619 C 203.293 302.445,203.070 302.179,202.196 304.272 M305.524 303.800 C 305.726 304.240,305.992 304.870,306.114 305.200 C 306.307 305.718,306.341 305.715,306.368 305.176 C 306.386 304.834,306.120 304.204,305.778 303.776 C 305.166 303.012,305.162 303.013,305.524 303.800 M337.200 306.284 C 337.200 306.851,338.363 309.600,338.602 309.600 C 338.707 309.600,338.496 308.835,338.132 307.900 C 337.395 306.007,337.200 305.669,337.200 306.284 M90.783 308.900 C 91.764 309.945,92.619 310.800,92.683 310.800 C 92.984 310.800,92.666 310.441,90.900 308.783 L 89.000 307.000 90.783 308.900 M229.756 311.843 C 229.424 312.637,229.226 313.359,229.314 313.448 C 229.403 313.536,229.759 312.887,230.105 312.004 C 230.889 310.009,230.582 309.868,229.756 311.843 M93.800 311.564 C 94.636 312.529,97.600 314.983,97.600 314.710 C 97.600 314.623,96.565 313.672,95.300 312.597 C 94.035 311.521,93.360 311.056,93.800 311.564 M197.700 315.700 C 197.270 316.875,197.280 316.926,197.812 316.224 C 198.321 315.552,198.621 314.400,198.288 314.400 C 198.226 314.400,197.961 314.985,197.700 315.700 M310.032 314.824 C 310.014 315.166,310.280 315.796,310.622 316.224 C 311.234 316.988,311.238 316.987,310.876 316.200 C 310.674 315.760,310.408 315.130,310.286 314.800 C 310.093 314.282,310.059 314.285,310.032 314.824 M341.113 316.219 C 341.484 317.220,341.839 317.882,341.903 317.691 C 342.031 317.306,340.893 314.400,340.614 314.400 C 340.517 314.400,340.742 315.219,341.113 316.219 M109.633 321.335 C 110.019 321.647,113.200 322.777,113.200 322.602 C 113.200 322.363,110.451 321.200,109.884 321.200 C 109.655 321.200,109.542 321.261,109.633 321.335 M225.095 323.596 L 224.464 325.200 209.432 325.200 C 201.164 325.200,194.400 325.122,194.400 325.026 C 194.400 324.930,194.591 324.345,194.825 323.726 C 195.109 322.974,195.113 322.736,194.837 323.009 C 194.609 323.233,194.373 323.863,194.311 324.409 L 194.200 325.400 209.400 325.400 L 224.600 325.400 225.344 323.877 C 225.753 323.040,226.006 322.273,225.906 322.173 C 225.806 322.073,225.441 322.713,225.095 323.596 M313.791 324.300 L 314.421 325.600 329.510 325.505 L 344.600 325.410 329.500 325.300 C 321.195 325.240,314.400 325.047,314.400 324.872 C 314.400 324.696,314.121 324.204,313.781 323.776 C 313.234 323.091,313.235 323.152,313.791 324.300 M127.143 325.303 C 127.310 325.470,137.606 325.560,150.023 325.503 L 172.600 325.400 149.720 325.200 C 137.136 325.090,126.976 325.137,127.143 325.303 ",stroke:"none",fill:"#f478c8","fill-rule":"evenodd"}),d("path",{id:"path4",d:"M144.580 75.000 C 144.580 82.700,144.634 85.793,144.699 81.874 C 144.765 77.955,144.765 71.655,144.699 67.874 C 144.634 64.093,144.580 67.300,144.580 75.000 M274.100 75.087 C 274.705 75.178,275.695 75.178,276.300 75.087 C 276.905 74.995,276.410 74.920,275.200 74.920 C 273.990 74.920,273.495 74.995,274.100 75.087 M95.900 117.099 C 99.695 117.165,105.905 117.165,109.700 117.099 C 113.495 117.034,110.390 116.980,102.800 116.980 C 95.210 116.980,92.105 117.034,95.900 117.099 M144.583 117.300 C 144.478 117.575,144.440 126.890,144.500 138.000 L 144.608 158.200 144.704 137.705 L 144.800 117.211 158.500 117.100 L 172.200 116.989 158.487 116.895 C 147.816 116.821,144.732 116.911,144.583 117.300 M324.493 121.200 C 324.493 121.970,324.575 122.285,324.676 121.900 C 324.776 121.515,324.776 120.885,324.676 120.500 C 324.575 120.115,324.493 120.430,324.493 121.200 M288.429 184.310 C 288.676 185.020,289.042 185.703,289.242 185.826 C 289.442 185.950,289.391 185.544,289.127 184.925 C 288.421 183.265,287.906 182.812,288.429 184.310 M144.586 207.200 C 144.586 218.750,144.637 223.475,144.700 217.700 C 144.762 211.925,144.762 202.475,144.700 196.700 C 144.637 190.925,144.586 195.650,144.586 207.200 M296.429 204.310 C 296.676 205.020,297.042 205.703,297.242 205.826 C 297.442 205.950,297.391 205.544,297.127 204.925 C 296.421 203.265,295.906 202.812,296.429 204.310 M268.779 214.655 C 268.558 215.236,268.464 215.797,268.569 215.903 C 268.675 216.008,268.879 215.624,269.023 215.050 C 269.170 214.465,269.470 214.120,269.704 214.265 C 269.949 214.416,270.005 214.331,269.838 214.062 C 269.416 213.379,269.223 213.487,268.779 214.655 M304.429 224.310 C 304.676 225.020,305.042 225.703,305.242 225.826 C 305.442 225.950,305.391 225.544,305.127 224.925 C 304.421 223.265,303.906 222.812,304.429 224.310 M260.779 234.655 C 260.558 235.236,260.452 235.785,260.543 235.876 C 260.633 235.967,260.899 235.492,261.133 234.820 C 261.653 233.328,261.339 233.182,260.779 234.655 M74.920 275.200 C 74.920 276.410,74.995 276.905,75.087 276.300 C 75.178 275.695,75.178 274.705,75.087 274.100 C 74.995 273.495,74.920 273.990,74.920 275.200 M172.580 311.200 C 172.580 319.010,172.634 322.205,172.699 318.300 C 172.765 314.395,172.765 308.005,172.699 304.100 C 172.634 300.195,172.580 303.390,172.580 311.200 M107.200 320.179 C 107.200 320.289,107.740 320.659,108.400 321.000 C 109.060 321.341,109.600 321.531,109.600 321.421 C 109.600 321.311,109.060 320.941,108.400 320.600 C 107.740 320.259,107.200 320.069,107.200 320.179 M120.500 324.676 C 120.885 324.776,121.515 324.776,121.900 324.676 C 122.285 324.575,121.970 324.493,121.200 324.493 C 120.430 324.493,120.115 324.575,120.500 324.676 M123.700 325.087 C 124.305 325.178,125.295 325.178,125.900 325.087 C 126.505 324.995,126.010 324.920,124.800 324.920 C 123.590 324.920,123.095 324.995,123.700 325.087 ",stroke:"none",fill:"#f47c8c","fill-rule":"evenodd"})]})})}function zS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9091 2H7.04546C6.50297 2 5.9827 2.2155 5.5991 2.5991C5.2155 2.9827 5 3.50297 5 4.04546V17.9545C5 18.497 5.2155 19.0173 5.5991 19.4009C5.9827 19.7845 6.50297 20 7.04546 20H15.9091C16.4515 20 16.9718 19.7845 17.3554 19.4009C17.739 19.0173 17.9545 18.497 17.9545 17.9545V4.04546C17.9545 3.50297 17.739 2.9827 17.3554 2.5991C16.9718 2.2155 16.4516 2 15.9091 2ZM7.04546 3.36364H15.9091C16.0899 3.36364 16.2633 3.43548 16.3912 3.56334C16.519 3.69121 16.5909 3.86463 16.5909 4.04546V14.2727H6.36362V4.04546C6.36362 3.86463 6.43546 3.69121 6.56332 3.56334C6.69119 3.43548 6.86461 3.36364 7.04544 3.36364H7.04546ZM15.9091 18.6364H7.04546C6.95592 18.6364 6.86726 18.6187 6.78454 18.5845C6.70182 18.5502 6.62665 18.5 6.56334 18.4367C6.50003 18.3733 6.44981 18.2982 6.41554 18.2155C6.38128 18.1327 6.36364 18.0441 6.36364 17.9545V15.6364H16.5909V17.9545C16.5909 18.1354 16.5191 18.3088 16.3912 18.4367C16.2633 18.5645 16.0899 18.6364 15.9091 18.6364H15.9091ZM9.50007 6.09103H13.591C13.7718 6.09103 13.9452 6.01919 14.0731 5.89133C14.201 5.76346 14.2728 5.59004 14.2728 5.40921C14.2728 5.22838 14.201 5.05496 14.0731 4.9271C13.9452 4.79924 13.7718 4.72741 13.591 4.72741H9.50007C9.31924 4.72741 9.14582 4.79924 9.01796 4.9271C8.89009 5.05496 8.81825 5.22838 8.81825 5.40921C8.81825 5.49875 8.83588 5.58741 8.87015 5.67013C8.90441 5.75285 8.95464 5.82802 9.01795 5.89133C9.08126 5.95464 9.15642 6.00486 9.23915 6.03913C9.32187 6.07339 9.41053 6.09103 9.50007 6.09103ZM11.0634 17.6184C10.9355 17.4905 10.8637 17.3171 10.8637 17.1362C10.8637 16.9554 10.9355 16.782 11.0634 16.6541C11.1913 16.5262 11.3647 16.4544 11.5455 16.4544C11.7264 16.4544 11.8998 16.5262 12.0276 16.6541C12.1555 16.782 12.2273 16.9554 12.2273 17.1362C12.2273 17.3171 12.1555 17.4905 12.0276 17.6184C11.8998 17.7462 11.7264 17.8181 11.5455 17.8181C11.3647 17.8181 11.1913 17.7462 11.0634 17.6184Z"})})}function NS(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.7719 2L17.7647 5.98965V8.88235V17.3529V18.4118C17.7647 18.833 17.5974 19.237 17.2995 19.5348C17.0017 19.8327 16.5977 20 16.1765 20H5.58824C5.16701 20 4.76304 19.8327 4.46518 19.5348C4.16733 19.237 4 18.833 4 18.4118V17.3529V8.88235V3.58824C4 3.16701 4.16733 2.76304 4.46518 2.46518C4.76304 2.16733 5.16701 2 5.58824 2H13.7719ZM13.9778 4.45118V6.20988H15.7376L13.9778 4.45118ZM5.58817 18.4118V17.3529V3.58823H12.3895L12.3901 7.79758H16.1764V17.3529V18.4118H5.58817ZM14.9956 9.33215H6.76855V10.5674H14.9956V9.33215ZM6.76855 12.1116H14.9956V13.3469H6.76855V12.1116ZM11.3268 14.78H6.76855V16.0153H11.3268V14.78Z"})})}function Uh(){let e=Ir(),{t,lang:n}=W();return d(xe,{children:[d("header",{className:"header-navbar",children:[d("a",{class:"header-navbar-brand",href:"https://immersivetranslate.com",target:"_blank",children:[d(OS,{}),d("h1",{children:t("browser.shortBrandName")})]}),d("span",{class:"version",children:e}),d("div",{style:{flex:1}}),d("div",{class:"header-right",children:[d(LM,{}),d(_M,{})]})]}),d("div",{className:"header-navbar-height"})]})}function LM(){let{t:e}=W();return d("a",{class:"header-navbar-item mobile-hidden",href:o1,target:"_blank",children:[d(zS,{}),d("span",{children:e("options.navbar.installApp")})]})}function _M(){let{t:e}=W();return d(or,{text:e("translateFileTooltip"),position:"bottom",tipStyle:{whiteSpace:"pre"},multiple:!0,children:d("a",{class:"header-navbar-item ml-8",href:p1,target:"_blank",children:[d(NS,{}),d("span",{children:e("options.navbar.translateFile")})]})})}function US(){let e=document.getElementById("mount");e&&(async()=>{Wd(e9);let t=await yt();z0(t.sentryConfig),t.debug&&R.setLevel("debug"),globalThis.location.hash||(globalThis.location.hash="#general");let n=await yn({url:"http://localhost",config:t});ht("options_page_view",[{name:"options_page_view"}],{...n,sourceLanguage:globalThis.location.hash}),qa(document,n),Ta(d(as,{lang:t.interfaceLanguage,fallbackLang:"en",translations:Uo,children:d(MM,{donateUrl:t.donateUrl,config:t})}),e)})()}function MM(e){let t=Jp(),{t:n,lang:r}=W(),a=Ir(),{config:i}=e,o=[{name:n("general"),props:{href:"#general",className:"secondary"}},{name:n("subtitle"),props:{href:"#subtitle",className:"secondary"}},{name:n("inputOptions"),props:{href:"#input",className:"secondary"}},{name:n("mouseHoverOptions"),props:{href:"#mouse_hover",className:"secondary"}},{name:n("floatBallOptions"),props:{href:"#floating",className:"secondary"}},{name:n("shortcutSettings"),props:{href:"#shortcuts",className:"secondary"}},{name:n("advanced"),props:{href:"#advanced",className:"secondary"}},{name:n("import_export"),props:{href:"#import_export",className:"secondary"}},{name:n("about"),props:{href:"#about",className:"secondary"}}];r.startsWith("zh")||o.splice(o.length-1,0,{name:n("contact"),props:{href:"#contact",className:"secondary"}}),o.forEach(u=>{t===u.props.href&&(u.props.className="primary",u.props["aria-current"]="page")});let s=!0;return Ge()&&(s=i.generalRule.showSponsorOnSafari),d(ct,{children:[d(Uh,{}),d(xe,{children:d("main",{class:"container-fluid",children:[d("aside",{children:d("nav",{class:"menu-nav flex flex-col h-full justify-between ",children:[d("div",{children:d("ul",{class:"flex flex-wrap flex-start min-[992px]:block text-sm min-[992px]:text-base",children:o.map((u,l)=>d("li",{class:"li",children:d("a",{...u.props,children:u.name})},`nav-${l}`))})}),d("div",{class:"m-0 p-0 flex flex-wrap min-[992px]:flex-col max-[992px]:mt-2",children:[s&&d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:e.donateUrl,children:n("donateCafe")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:xc,children:n("document")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:d1,children:n("feedbackAndJoin")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"#developer",children:n("developer")})]})]})}),d("div",{role:"main",children:d(Zp,{value:t,defaultCase:d(S0,{}),cases:{"#general":d(S0,{}),"#mouse_hover":d(Rh,{}),"#input":d(Tf,{}),"#shortcuts":d(zh,{}),"#floating":d(Oh,{}),"#import_export":d(cf,{}),"#about":d(Sf,{}),"#advanced":d(Cf,{}),"#developer":d(vf,{}),"#subtitle":d(Ef,{}),"#contact":d(xf,{}),"#download_config":d(Nh,{})}})})]})})]})}US();})(); /*! Bundled license information: bowser/src/bowser.js: diff --git a/dist/firefox/popup.js b/dist/firefox/popup.js index 8a7cc6e..5ac25ea 100644 --- a/dist/firefox/popup.js +++ b/dist/firefox/popup.js @@ -1,4 +1,4 @@ -(()=>{var J9=Object.create;var gd=Object.defineProperty;var X9=Object.getOwnPropertyDescriptor;var e6=Object.getOwnPropertyNames;var t6=Object.getPrototypeOf,n6=Object.prototype.hasOwnProperty;var r6=(t,e)=>()=>(t&&(e=t(t=0)),e);var a6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tu=(t,e)=>{for(var n in e)gd(t,n,{get:e[n],enumerable:!0})},i6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of e6(e))!n6.call(t,a)&&a!==n&&gd(t,a,{get:()=>e[a],enumerable:!(r=X9(e,a))||r.enumerable});return t};var o6=(t,e,n)=>(n=t!=null?J9(t6(t)):{},i6(e||!t||!t.__esModule?gd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=r6(()=>{x={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var J9=Object.create;var pd=Object.defineProperty;var X9=Object.getOwnPropertyDescriptor;var e6=Object.getOwnPropertyNames;var t6=Object.getPrototypeOf,n6=Object.prototype.hasOwnProperty;var r6=(t,e)=>()=>(t&&(e=t(t=0)),e);var a6=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),tu=(t,e)=>{for(var n in e)pd(t,n,{get:e[n],enumerable:!0})},i6=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of e6(e))!n6.call(t,a)&&a!==n&&pd(t,a,{get:()=>e[a],enumerable:!(r=X9(e,a))||r.enumerable});return t};var o6=(t,e,n)=>(n=t!=null?J9(t6(t)):{},i6(e||!t||!t.__esModule?pd(n,"default",{value:t,enumerable:!0}):n,t));var x,d=r6(()=>{x={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,7 +4936,7 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var N2=a6((oc,Ps)=>{d();(function(){var t;function e(f){var T,b,h="",C=-1,D;if(f&&f.length)for(D=f.length;(C+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,C,D,M=[],B;if(T=b=h=C=D=0,f&&f.length)for(B=f.length,f+="";T191&&h<224?(C=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|C&63),T+=2):(C=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",C,D=0,M=f.length;D>>4&15)+b.charAt(C&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function g(f,T){var b=T.length,h=Array(),C,D,M,B,S,y,_,k;for(y=Array(Math.ceil(f.length/2)),B=y.length,C=0;C0;){for(S=Array(),M=0,C=0;C0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(_="",C=h.length-1;C>=0;C--)_+=T.charAt(h[C]);for(k=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),C=_.length;Cf.length*8?h+=T:h+=b.charAt(B>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(C){var D,M,B,S="";for(T=T||"=",C=h?e(C):C,len=C.length,D=0;Dlen*8?S+=T:S+=f.charAt(B>>>6*(3-M)&63);return S},this.decode=function(C){var D,M,B,S,y,_,k,v,I,F,L="",U=[];if(!C)return C;D=F=0,C=C.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(C.charAt(D++)),_=f.indexOf(C.charAt(D++)),k=f.indexOf(C.charAt(D++)),v=f.indexOf(C.charAt(D++)),I=y<<18|_<<12|k<<6|v,M=I>>16&255,B=I>>8&255,S=I&255,F+=1,k===64?U[F]=String.fromCharCode(M):v===64?U[F]=String.fromCharCode(M,B):U[F]=String.fromCharCode(M,B,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(C(v,h),T)},this.b64=function(v){return m(C(v),b)},this.any=function(v,I){return g(C(v,h),I)},this.raw=function(v){return C(v,h)},this.hex_hmac=function(v,I){return i(D(v,I),T)},this.b64_hmac=function(v,I){return m(D(v,I),b)},this.any_hmac=function(v,I,F){return g(D(v,I),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function C(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,I){var F,L,U,N,q;for(v=h?e(v):v,I=h?e(I):I,F=c(v),F.length>16&&(F=M(F,v.length*8)),L=Array(16),U=Array(16),q=0;q<16;q+=1)L[q]=F[q]^909522486,U[q]=F[q]^1549556828;return N=M(L.concat(c(I)),512+I.length*8),l(M(U.concat(N),512+128))}function M(v,I){var F,L,U,N,q,A=1732584193,E=-271733879,P=-1732584194,O=271733878;for(v[I>>5]|=128<>>9<<4)+14]=I,F=0;F16&&(k=M(k,y.length*8)),v=Array(16),I=Array(16),F=0;F<16;F+=1)v[F]=k[F]^909522486,I[F]=k[F]^1549556828;return L=M(v.concat(p(_)),512+_.length*8),u(M(I.concat(L),512+160))}function M(y,_){var k,v,I,F,L,U,N,q,A=Array(80),E=1732584193,P=-271733879,O=-1732584194,H=271733878,j=-1009589776;for(y[_>>5]|=128<<24-_%32,y[(_+64>>9<<4)+15]=_,k=0;k16&&(j=A(j,E.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return O=A(W.concat(p(P)),512+P.length*8),u(A(V.concat(O),512+256))}function B(E,P){return E>>>P|E<<32-P}function S(E,P){return E>>>P}function y(E,P,O){return E&P^~E&O}function _(E,P,O){return E&P^E&O^P&O}function k(E){return B(E,2)^B(E,13)^B(E,22)}function v(E){return B(E,6)^B(E,11)^B(E,25)}function I(E){return B(E,7)^B(E,18)^S(E,3)}function F(E){return B(E,17)^B(E,19)^S(E,10)}function L(E){return B(E,28)^B(E,34)^B(E,39)}function U(E){return B(E,14)^B(E,18)^B(E,41)}function N(E){return B(E,1)^B(E,8)^S(E,7)}function q(E){return B(E,19)^B(E,61)^S(E,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function A(E,P){var O=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,se,X,Z,ue,ge,te,Y,be,ae;for(E[P>>5]|=128<<24-P%32,E[(P+64>>9<<4)+15]=P,te=0;te32&&(E=B(E,U.length*8));A<32;A+=1)P[A]=E[A]^909522486,O[A]=E[A]^1549556828;return q=B(P.concat(p(N)),1024+N.length*8),u(B(O.concat(q),1024+512))}function B(U,N){var q,A,E,P=new Array(80),O=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),se=new S(0,0),X=new S(0,0),Z=new S(0,0),ue=new S(0,0),ge=new S(0,0),te=new S(0,0),Y=new S(0,0),be=new S(0,0),ae=new S(0,0),ie=new S(0,0),Ee=new S(0,0),ze=new S(0,0),_e=new S(0,0),ce=new S(0,0);for(C===void 0&&(C=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),A=0;A<80;A+=1)P[A]=new S(0,0);for(U[N>>5]|=128<<24-(N&31),U[(N+128>>10<<5)+31]=N,E=U.length,A=0;A>>q|N.h<<32-q,U.h=N.h>>>q|N.l<<32-q}function k(U,N,q){U.l=N.h>>>q|N.l<<32-q,U.h=N.l>>>q|N.h<<32-q}function v(U,N,q){U.l=N.l>>>q|N.h<<32-q,U.h=N.h>>>q}function I(U,N,q){var A=(N.l&65535)+(q.l&65535),E=(N.l>>>16)+(q.l>>>16)+(A>>>16),P=(N.h&65535)+(q.h&65535)+(E>>>16),O=(N.h>>>16)+(q.h>>>16)+(P>>>16);U.l=A&65535|E<<16,U.h=P&65535|O<<16}function F(U,N,q,A,E){var P=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535),O=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P>>>16),H=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(O>>>16),j=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(H>>>16);U.l=P&65535|O<<16,U.h=H&65535|j<<16}function L(U,N,q,A,E,P){var O=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535)+(P.l&65535),H=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P.l>>>16)+(O>>>16),j=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(P.h&65535)+(H>>>16),W=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(P.h>>>16)+(j>>>16);U.l=O&65535|H<<16,U.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(L){return i(S(L,h))},this.b64=function(L){return m(S(L,h),b)},this.any=function(L,U){return g(S(L,h),U)},this.raw=function(L){return S(L,h)},this.hex_hmac=function(L,U){return i(y(L,U))},this.b64_hmac=function(L,U){return m(y(L,U),b)},this.any_hmac=function(L,U,N){return g(y(L,U),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(L){return typeof L=="boolean"&&(T=L),this},this.setPad=function(L){return typeof L<"u"&&(b=L),this},this.setUTF8=function(L){return typeof L=="boolean"&&(h=L),this};function S(L){return L=h?e(L):L,_(k(c(L),L.length*8))}function y(L,U){L=h?e(L):L,U=h?e(U):U;var N,q,A=c(L),E=Array(16),P=Array(16);for(A.length>16&&(A=k(A,L.length*8)),N=0;N<16;N+=1)E[N]=A[N]^909522486,P[N]=A[N]^1549556828;return q=k(E.concat(c(U)),512+U.length*8),_(k(P.concat(q),512+160))}function _(L){var U,N="",q=L.length*32;for(U=0;U>5]>>>U%32&255);return N}function k(L,U){var N,q,A,E,P=1732584193,O=4023233417,H=2562383102,j=271733878,W=3285377520,V,se,X,Z,ue,ge,te,Y,be,ae;for(L[U>>5]|=128<>>9<<4)+14]=U,E=L.length,A=0;Afunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},g6=(t,e)=>{for(var n in e)fd(t,n,{get:e[n],enumerable:!0})},md=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!d6.call(t,a)&&a!==n&&fd(t,a,{get:()=>e[a],enumerable:!(r=l6(e,a))||r.enumerable});return t},m6=(t,e,n)=>(md(t,e,"default"),n&&md(n,e,"default")),yf=(t,e,n)=>(n=t!=null?u6(c6(t)):{},md(e||!t||!t.__esModule?fd(n,"default",{value:t,enumerable:!0}):n,t)),vf=p6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,_=void 0){super(_),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(..._)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||_.length<=1&&y.singleCallbackArg!==!1?S.resolve(_[0]):S.resolve(_)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(k,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((I,F)=>{if(y.fallbackToNoCallback)try{k[S](...v,l({resolve:I,reject:F},y))}catch{k[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,I()}else y.noCallback?(k[S](...v),I()):k[S](...v,l({resolve:I,reject:F},y))})},g=(S,y,_)=>new Proxy(y,{apply(k,v,I){return _.call(v,S,...I)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},_={})=>{let k=Object.create(null),v={has(F,L){return L in S||L in k},get(F,L,U){if(L in k)return k[L];if(!(L in S))return;let N=S[L];if(typeof N=="function")if(typeof y[L]=="function")N=g(S,S[L],y[L]);else if(m(_,L)){let q=p(L,_[L]);N=g(S,S[L],q)}else N=N.bind(S);else if(typeof N=="object"&&N!==null&&(m(y,L)||m(_,L)))N=f(N,y[L],_[L]);else if(m(_,"*"))N=f(N,y[L],_["*"]);else return Object.defineProperty(k,L,{configurable:!0,enumerable:!0,get(){return S[L]},set(q){S[L]=q}}),N;return k[L]=N,N},set(F,L,U,N){return L in k?k[L]=U:S[L]=U,!0},defineProperty(F,L,U){return Reflect.defineProperty(k,L,U)},deleteProperty(F,L){return Reflect.deleteProperty(k,L)}},I=Object.create(S);return new Proxy(I,v)},T=S=>({addListener(y,_,...k){y.addListener(S.get(_),...k)},hasListener(y,_){return y.hasListener(S.get(_))},removeListener(y,_){y.removeListener(S.get(_))}}),b=new s(S=>typeof S!="function"?S:function(_){let k=f(_,{},{getContent:{minArgs:0,maxArgs:0}});S(k)}),h=new s(S=>typeof S!="function"?S:function(_,k,v){let I=!1,F,L=new Promise(A=>{F=function(E){I=!0,A(E)}}),U;try{U=S(_,k,F)}catch(A){U=Promise.reject(A)}let N=U!==!0&&u(U);if(U!==!0&&!N&&!I)return!1;let q=A=>{A.then(E=>{v(E)},E=>{let P;E&&(E instanceof Error||typeof E.message=="string")?P=E.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(E=>{})};return q(N?U:L),!0}),C=({reject:S,resolve:y},_)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):_&&_.__mozWebExtensionPolyfillReject__?S(new Error(_.message)):y(_)},D=(S,y,_,...k)=>{if(k.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${k.length}`);return new Promise((v,I)=>{let F=C.bind(null,{resolve:v,reject:I});k.push(F),_.sendMessage(...k)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};g6(Sf,{default:()=>nu});var f6=yf(vf());m6(Sf,yf(vf()));var{default:bf,...h6}=f6,nu=bf!==void 0?bf:h6;globalThis.immersiveTranslateBrowserAPI=nu;d();d();d();var su,Fe,Df,b6,Ao,xf,Af,au={},kf=[],T6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vr(t,e){for(var n in e)t[n]=e[n];return t}function Pf(t){var e=t.parentNode;e&&e.removeChild(t)}function bd(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?su.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return ru(t,o,r,a,null)}function ru(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Df};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function Rt(t){return t.children}function Ba(t,e){this.props=t,this.context=e}function fi(t,e){if(e==null)return t.__?fi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?ru(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(g=h[c])===null||g&&m.key==g.key&&m.type===g.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:uu}),n.__[t]}function re(t){return ko=1,x6(Gf,t)}function x6(t,e,n){var r=cu(Po++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Gf(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=xt,!xt.u)){xt.u=!0;var a=xt.shouldComponentUpdate;xt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ce(t,e){var n=cu(Po++,3);!Fe.__s&&Kf(n.__H,e)&&(n.__=t,n.i=e,xt.__H.__h.push(n))}function qe(t){return ko=5,Ne(function(){return{current:t}},[])}function Ne(t,e){var n=cu(Po++,7);return Kf(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return ko=8,Ne(function(){return t},e)}function du(t){var e=xt.context[t.__c],n=cu(Po++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(xt)),e.props.value):t.__}function E6(){for(var t;t=Wf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lu),t.__H.__h.forEach(vd),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===Rt?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),xt=null,zf&&zf(t)},Fe.__r=function(t){Nf&&Nf(t),Po=0;var e=(xt=t.__c).__H;e&&(yd===xt?(e.__h=[],xt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=uu,n.__N=n.i=void 0})):(e.__h.forEach(lu),e.__h.forEach(vd),e.__h=[])),yd=xt},Fe.diffed=function(t){Uf&&Uf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Wf.push(e)!==1&&Of===Fe.requestAnimationFrame||((Of=Fe.requestAnimationFrame)||C6)(E6)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==uu&&(n.__=n.__V),n.i=void 0,n.__V=uu})),yd=xt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lu),n.__h=n.__h.filter(function(r){return!r.__||vd(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),qf&&qf(t,e)},Fe.unmount=function(t){jf&&jf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lu(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var Hf=typeof requestAnimationFrame=="function";function C6(t){var e,n=function(){clearTimeout(r),Hf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Hf&&(e=requestAnimationFrame(n))}function lu(t){var e=xt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),xt=e}function vd(t){var e=xt;t.__c=t.__(),xt=e}function Kf(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Gf(t,e){return typeof e=="function"?e(t):e}d();d();function pu(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let g of p)a[g]||(a[g]=[]),a[g].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Bn(){return we.PROD_API==="1"}function Vf(){return we.HAS_CSP_ERROR=="1"}function it(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function gu(){return typeof Deno<"u"}var wP=Me().PROD==="1",bi=Me().PROD!=="1";function mu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();var Sd=/iPhone/i,$f=/iPod/i,Yf=/iPad/i,Qf=/\biOS-universal(?:.+)Mac\b/i,xd=/\bAndroid(?:.+)Mobile\b/i,Zf=/Android/i,Ti=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,fu=/Silk/i,Cr=/Windows Phone/i,Jf=/\bWindows(?:.+)ARM\b/i,Xf=/BlackBerry/i,eh=/BB10/i,th=/Opera Mini/i,nh=/\b(CriOS|Chrome)(?:.+)Mobile/i,rh=/Mobile(?:.+)Firefox\b/i,ah=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function w6(t){return e=>e.test(t)}function et(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=w6(n),i={apple:{phone:a(Sd)&&!a(Cr),ipod:a($f),tablet:!a(Sd)&&(a(Yf)||ah(e))&&!a(Cr),universal:a(Qf),device:(a(Sd)||a($f)||a(Yf)||a(Qf)||ah(e))&&!a(Cr)},amazon:{phone:a(Ti),tablet:!a(Ti)&&a(fu),device:a(Ti)||a(fu)},android:{phone:!a(Cr)&&a(Ti)||!a(Cr)&&a(xd),tablet:!a(Cr)&&!a(Ti)&&!a(xd)&&(a(fu)||a(Zf)),device:!a(Cr)&&(a(Ti)||a(fu)||a(xd)||a(Zf))||a(/\bokhttp\b/i)},windows:{phone:a(Cr),tablet:a(Jf),device:a(Cr)||a(Jf)},other:{blackberry:a(Xf),blackberry10:a(eh),opera:a(th),firefox:a(rh),chrome:a(nh),device:a(Xf)||a(eh)||a(th)||a(rh)||a(nh)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var Ed="DENO",hu="CHROME",bu="FIREFOX";function ih(t){let e=hu;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=bu:/deno/i.test(n)&&(e=Ed)}catch{}return t===hu&&e===hu||t===bu&&e===bu||t===Ed&&e===Ed}function D6(){return ih(hu)}function oh(){return typeof Deno<"u"}function Wn(){return ih(bu)}function Tu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function Lo(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function sh(){return ye()?"monkey":D6()?"chrome":Wn()?"firefox":it()?"safari":null}d();var uh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},lh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:uh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:uh,query:()=>{},sendMessage:()=>{}}};var oe;oh()?oe=lh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();var ch={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",INSTALL_FROM:"firefox_zip"}});var N2=a6((oc,Ls)=>{d();(function(){var t;function e(f){var T,b,h="",C=-1,D;if(f&&f.length)for(D=f.length;(C+=1)>>6&31,128|T&63):T<=65535?h+=String.fromCharCode(224|T>>>12&15,128|T>>>6&63,128|T&63):T<=2097151&&(h+=String.fromCharCode(240|T>>>18&7,128|T>>>12&63,128|T>>>6&63,128|T&63));return h}function n(f){var T,b,h,C,D,M=[],B;if(T=b=h=C=D=0,f&&f.length)for(B=f.length,f+="";T191&&h<224?(C=f.charCodeAt(T+1),M[b]=String.fromCharCode((h&31)<<6|C&63),T+=2):(C=f.charCodeAt(T+1),D=f.charCodeAt(T+2),M[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|D&63),T+=3);return M.join("")}function r(f,T){var b=(f&65535)+(T&65535),h=(f>>16)+(T>>16)+(b>>16);return h<<16|b&65535}function a(f,T){return f<>>32-T}function i(f,T){for(var b=T?"0123456789ABCDEF":"0123456789abcdef",h="",C,D=0,M=f.length;D>>4&15)+b.charAt(C&15);return h}function o(f){var T,b=f.length,h="";for(T=0;T>>8&255);return h}function s(f){var T,b=f.length,h="";for(T=0;T>>8&255,f.charCodeAt(T)&255);return h}function u(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>24-T%32&255);return h}function l(f){var T,b=f.length*32,h="";for(T=0;T>5]>>>T%32&255);return h}function c(f){var T,b=f.length*8,h=Array(f.length>>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<>2),C=h.length;for(T=0;T>5]|=(f.charCodeAt(T/8)&255)<<24-T%32;return h}function g(f,T){var b=T.length,h=Array(),C,D,M,B,S,y,_,k;for(y=Array(Math.ceil(f.length/2)),B=y.length,C=0;C0;){for(S=Array(),M=0,C=0;C0||D>0)&&(S[S.length]=D);h[h.length]=M,y=S}for(_="",C=h.length-1;C>=0;C--)_+=T.charAt(h[C]);for(k=Math.ceil(f.length*8/(Math.log(T.length)/Math.log(2))),C=_.length;Cf.length*8?h+=T:h+=b.charAt(B>>>6*(3-M)&63);return h}t={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T="=",b=!1,h=!0;this.encode=function(C){var D,M,B,S="";for(T=T||"=",C=h?e(C):C,len=C.length,D=0;Dlen*8?S+=T:S+=f.charAt(B>>>6*(3-M)&63);return S},this.decode=function(C){var D,M,B,S,y,_,k,v,I,F,L="",U=[];if(!C)return C;D=F=0,C=C.replace(new RegExp("\\"+T,"gi"),"");do y=f.indexOf(C.charAt(D++)),_=f.indexOf(C.charAt(D++)),k=f.indexOf(C.charAt(D++)),v=f.indexOf(C.charAt(D++)),I=y<<18|_<<12|k<<6|v,M=I>>16&255,B=I>>8&255,S=I&255,F+=1,k===64?U[F]=String.fromCharCode(M):v===64?U[F]=String.fromCharCode(M,B):U[F]=String.fromCharCode(M,B,S);while(D>>8^b;return(T^-1)>>>0},MD5:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(v){return i(C(v,h),T)},this.b64=function(v){return m(C(v),b)},this.any=function(v,I){return g(C(v,h),I)},this.raw=function(v){return C(v,h)},this.hex_hmac=function(v,I){return i(D(v,I),T)},this.b64_hmac=function(v,I){return m(D(v,I),b)},this.any_hmac=function(v,I,F){return g(D(v,I),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(v){return typeof v=="boolean"&&(T=v),this},this.setPad=function(v){return b=v||b,this},this.setUTF8=function(v){return typeof v=="boolean"&&(h=v),this};function C(v){return v=h?e(v):v,l(M(c(v),v.length*8))}function D(v,I){var F,L,U,N,q;for(v=h?e(v):v,I=h?e(I):I,F=c(v),F.length>16&&(F=M(F,v.length*8)),L=Array(16),U=Array(16),q=0;q<16;q+=1)L[q]=F[q]^909522486,U[q]=F[q]^1549556828;return N=M(L.concat(c(I)),512+I.length*8),l(M(U.concat(N),512+128))}function M(v,I){var F,L,U,N,q,A=1732584193,E=-271733879,P=-1732584194,O=271733878;for(v[I>>5]|=128<>>9<<4)+14]=I,F=0;F16&&(k=M(k,y.length*8)),v=Array(16),I=Array(16),F=0;F<16;F+=1)v[F]=k[F]^909522486,I[F]=k[F]^1549556828;return L=M(v.concat(p(_)),512+_.length*8),u(M(I.concat(L),512+160))}function M(y,_){var k,v,I,F,L,U,N,q,A=Array(80),E=1732584193,P=-271733879,O=-1732584194,H=271733878,j=-1009589776;for(y[_>>5]|=128<<24-_%32,y[(_+64>>9<<4)+15]=_,k=0;k16&&(j=A(j,E.length*8));H<16;H+=1)W[H]=j[H]^909522486,V[H]=j[H]^1549556828;return O=A(W.concat(p(P)),512+P.length*8),u(A(V.concat(O),512+256))}function B(E,P){return E>>>P|E<<32-P}function S(E,P){return E>>>P}function y(E,P,O){return E&P^~E&O}function _(E,P,O){return E&P^E&O^P&O}function k(E){return B(E,2)^B(E,13)^B(E,22)}function v(E){return B(E,6)^B(E,11)^B(E,25)}function I(E){return B(E,7)^B(E,18)^S(E,3)}function F(E){return B(E,17)^B(E,19)^S(E,10)}function L(E){return B(E,28)^B(E,34)^B(E,39)}function U(E){return B(E,14)^B(E,18)^B(E,41)}function N(E){return B(E,1)^B(E,8)^S(E,7)}function q(E){return B(E,19)^B(E,61)^S(E,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function A(E,P){var O=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],H=new Array(64),j,W,V,se,X,Z,ue,ge,te,Y,Te,ae;for(E[P>>5]|=128<<24-P%32,E[(P+64>>9<<4)+15]=P,te=0;te32&&(E=B(E,U.length*8));A<32;A+=1)P[A]=E[A]^909522486,O[A]=E[A]^1549556828;return q=B(P.concat(p(N)),1024+N.length*8),u(B(O.concat(q),1024+512))}function B(U,N){var q,A,E,P=new Array(80),O=new Array(16),H=[new S(1779033703,-205731576),new S(-1150833019,-2067093701),new S(1013904242,-23791573),new S(-1521486534,1595750129),new S(1359893119,-1377402159),new S(-1694144372,725511199),new S(528734635,-79577749),new S(1541459225,327033209)],j=new S(0,0),W=new S(0,0),V=new S(0,0),se=new S(0,0),X=new S(0,0),Z=new S(0,0),ue=new S(0,0),ge=new S(0,0),te=new S(0,0),Y=new S(0,0),Te=new S(0,0),ae=new S(0,0),ie=new S(0,0),Ee=new S(0,0),ze=new S(0,0),_e=new S(0,0),ce=new S(0,0);for(C===void 0&&(C=[new S(1116352408,-685199838),new S(1899447441,602891725),new S(-1245643825,-330482897),new S(-373957723,-2121671748),new S(961987163,-213338824),new S(1508970993,-1241133031),new S(-1841331548,-1357295717),new S(-1424204075,-630357736),new S(-670586216,-1560083902),new S(310598401,1164996542),new S(607225278,1323610764),new S(1426881987,-704662302),new S(1925078388,-226784913),new S(-2132889090,991336113),new S(-1680079193,633803317),new S(-1046744716,-815192428),new S(-459576895,-1628353838),new S(-272742522,944711139),new S(264347078,-1953704523),new S(604807628,2007800933),new S(770255983,1495990901),new S(1249150122,1856431235),new S(1555081692,-1119749164),new S(1996064986,-2096016459),new S(-1740746414,-295247957),new S(-1473132947,766784016),new S(-1341970488,-1728372417),new S(-1084653625,-1091629340),new S(-958395405,1034457026),new S(-710438585,-1828018395),new S(113926993,-536640913),new S(338241895,168717936),new S(666307205,1188179964),new S(773529912,1546045734),new S(1294757372,1522805485),new S(1396182291,-1651133473),new S(1695183700,-1951439906),new S(1986661051,1014477480),new S(-2117940946,1206759142),new S(-1838011259,344077627),new S(-1564481375,1290863460),new S(-1474664885,-1136513023),new S(-1035236496,-789014639),new S(-949202525,106217008),new S(-778901479,-688958952),new S(-694614492,1432725776),new S(-200395387,1467031594),new S(275423344,851169720),new S(430227734,-1194143544),new S(506948616,1363258195),new S(659060556,-544281703),new S(883997877,-509917016),new S(958139571,-976659869),new S(1322822218,-482243893),new S(1537002063,2003034995),new S(1747873779,-692930397),new S(1955562222,1575990012),new S(2024104815,1125592928),new S(-2067236844,-1578062990),new S(-1933114872,442776044),new S(-1866530822,593698344),new S(-1538233109,-561857047),new S(-1090935817,-1295615723),new S(-965641998,-479046869),new S(-903397682,-366583396),new S(-779700025,566280711),new S(-354779690,-840897762),new S(-176337025,-294727304),new S(116418474,1914138554),new S(174292421,-1563912026),new S(289380356,-1090974290),new S(460393269,320620315),new S(685471733,587496836),new S(852142971,1086792851),new S(1017036298,365543100),new S(1126000580,-1676669620),new S(1288033470,-885112138),new S(1501505948,-60457430),new S(1607167915,987167468),new S(1816402316,1246189591)]),A=0;A<80;A+=1)P[A]=new S(0,0);for(U[N>>5]|=128<<24-(N&31),U[(N+128>>10<<5)+31]=N,E=U.length,A=0;A>>q|N.h<<32-q,U.h=N.h>>>q|N.l<<32-q}function k(U,N,q){U.l=N.h>>>q|N.l<<32-q,U.h=N.l>>>q|N.h<<32-q}function v(U,N,q){U.l=N.l>>>q|N.h<<32-q,U.h=N.h>>>q}function I(U,N,q){var A=(N.l&65535)+(q.l&65535),E=(N.l>>>16)+(q.l>>>16)+(A>>>16),P=(N.h&65535)+(q.h&65535)+(E>>>16),O=(N.h>>>16)+(q.h>>>16)+(P>>>16);U.l=A&65535|E<<16,U.h=P&65535|O<<16}function F(U,N,q,A,E){var P=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535),O=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P>>>16),H=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(O>>>16),j=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(H>>>16);U.l=P&65535|O<<16,U.h=H&65535|j<<16}function L(U,N,q,A,E,P){var O=(N.l&65535)+(q.l&65535)+(A.l&65535)+(E.l&65535)+(P.l&65535),H=(N.l>>>16)+(q.l>>>16)+(A.l>>>16)+(E.l>>>16)+(P.l>>>16)+(O>>>16),j=(N.h&65535)+(q.h&65535)+(A.h&65535)+(E.h&65535)+(P.h&65535)+(H>>>16),W=(N.h>>>16)+(q.h>>>16)+(A.h>>>16)+(E.h>>>16)+(P.h>>>16)+(j>>>16);U.l=O&65535|H<<16,U.h=j&65535|W<<16}},RMD160:function(f){var T=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],M=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],B=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(L){return i(S(L,h))},this.b64=function(L){return m(S(L,h),b)},this.any=function(L,U){return g(S(L,h),U)},this.raw=function(L){return S(L,h)},this.hex_hmac=function(L,U){return i(y(L,U))},this.b64_hmac=function(L,U){return m(y(L,U),b)},this.any_hmac=function(L,U,N){return g(y(L,U),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(L){return typeof L=="boolean"&&(T=L),this},this.setPad=function(L){return typeof L<"u"&&(b=L),this},this.setUTF8=function(L){return typeof L=="boolean"&&(h=L),this};function S(L){return L=h?e(L):L,_(k(c(L),L.length*8))}function y(L,U){L=h?e(L):L,U=h?e(U):U;var N,q,A=c(L),E=Array(16),P=Array(16);for(A.length>16&&(A=k(A,L.length*8)),N=0;N<16;N+=1)E[N]=A[N]^909522486,P[N]=A[N]^1549556828;return q=k(E.concat(c(U)),512+U.length*8),_(k(P.concat(q),512+160))}function _(L){var U,N="",q=L.length*32;for(U=0;U>5]>>>U%32&255);return N}function k(L,U){var N,q,A,E,P=1732584193,O=4023233417,H=2562383102,j=271733878,W=3285377520,V,se,X,Z,ue,ge,te,Y,Te,ae;for(L[U>>5]|=128<>>9<<4)+14]=U,E=L.length,A=0;Afunction(){return e||(0,t[Tf(t)[0]])((e={exports:{}}).exports,e),e.exports},g6=(t,e)=>{for(var n in e)md(t,n,{get:e[n],enumerable:!0})},gd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Tf(e))!d6.call(t,a)&&a!==n&&md(t,a,{get:()=>e[a],enumerable:!(r=l6(e,a))||r.enumerable});return t},m6=(t,e,n)=>(gd(t,e,"default"),n&&gd(n,e,"default")),yf=(t,e,n)=>(n=t!=null?u6(c6(t)):{},gd(e||!t||!t.__esModule?md(n,"default",{value:t,enumerable:!0}):n,t)),vf=p6({"../esmd/npm/webextension-polyfill@0.10.0/node_modules/webextension-polyfill/dist/browser-polyfill.js"(t,e){(function(n,r){if(typeof define=="function"&&define.amd)define("webextension-polyfill",["module"],r);else if(typeof t<"u")r(e);else{var a={exports:{}};r(a),n.browser=a.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:t,function(n){"use strict";if(!globalThis.chrome?.runtime?.id)throw new Error("This script should only be loaded in a browser extension.");if(typeof globalThis.browser>"u"||Object.getPrototypeOf(globalThis.browser)!==Object.prototype){let r="The message port closed before a response was received.",a=i=>{let o={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(o).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class s extends WeakMap{constructor(y,_=void 0){super(_),this.createItem=y}get(y){return this.has(y)||this.set(y,this.createItem(y)),super.get(y)}}let u=S=>S&&typeof S=="object"&&typeof S.then=="function",l=(S,y)=>(..._)=>{i.runtime.lastError?S.reject(new Error(i.runtime.lastError.message)):y.singleCallbackArg||_.length<=1&&y.singleCallbackArg!==!1?S.resolve(_[0]):S.resolve(_)},c=S=>S==1?"argument":"arguments",p=(S,y)=>function(k,...v){if(v.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${v.length}`);return new Promise((I,F)=>{if(y.fallbackToNoCallback)try{k[S](...v,l({resolve:I,reject:F},y))}catch{k[S](...v),y.fallbackToNoCallback=!1,y.noCallback=!0,I()}else y.noCallback?(k[S](...v),I()):k[S](...v,l({resolve:I,reject:F},y))})},g=(S,y,_)=>new Proxy(y,{apply(k,v,I){return _.call(v,S,...I)}}),m=Function.call.bind(Object.prototype.hasOwnProperty),f=(S,y={},_={})=>{let k=Object.create(null),v={has(F,L){return L in S||L in k},get(F,L,U){if(L in k)return k[L];if(!(L in S))return;let N=S[L];if(typeof N=="function")if(typeof y[L]=="function")N=g(S,S[L],y[L]);else if(m(_,L)){let q=p(L,_[L]);N=g(S,S[L],q)}else N=N.bind(S);else if(typeof N=="object"&&N!==null&&(m(y,L)||m(_,L)))N=f(N,y[L],_[L]);else if(m(_,"*"))N=f(N,y[L],_["*"]);else return Object.defineProperty(k,L,{configurable:!0,enumerable:!0,get(){return S[L]},set(q){S[L]=q}}),N;return k[L]=N,N},set(F,L,U,N){return L in k?k[L]=U:S[L]=U,!0},defineProperty(F,L,U){return Reflect.defineProperty(k,L,U)},deleteProperty(F,L){return Reflect.deleteProperty(k,L)}},I=Object.create(S);return new Proxy(I,v)},T=S=>({addListener(y,_,...k){y.addListener(S.get(_),...k)},hasListener(y,_){return y.hasListener(S.get(_))},removeListener(y,_){y.removeListener(S.get(_))}}),b=new s(S=>typeof S!="function"?S:function(_){let k=f(_,{},{getContent:{minArgs:0,maxArgs:0}});S(k)}),h=new s(S=>typeof S!="function"?S:function(_,k,v){let I=!1,F,L=new Promise(A=>{F=function(E){I=!0,A(E)}}),U;try{U=S(_,k,F)}catch(A){U=Promise.reject(A)}let N=U!==!0&&u(U);if(U!==!0&&!N&&!I)return!1;let q=A=>{A.then(E=>{v(E)},E=>{let P;E&&(E instanceof Error||typeof E.message=="string")?P=E.message:P="An unexpected error occurred",v({__mozWebExtensionPolyfillReject__:!0,message:P})}).catch(E=>{})};return q(N?U:L),!0}),C=({reject:S,resolve:y},_)=>{i.runtime.lastError?i.runtime.lastError.message===r?y():S(new Error(i.runtime.lastError.message)):_&&_.__mozWebExtensionPolyfillReject__?S(new Error(_.message)):y(_)},D=(S,y,_,...k)=>{if(k.lengthy.maxArgs)throw new Error(`Expected at most ${y.maxArgs} ${c(y.maxArgs)} for ${S}(), got ${k.length}`);return new Promise((v,I)=>{let F=C.bind(null,{resolve:v,reject:I});k.push(F),_.sendMessage(...k)})},M={devtools:{network:{onRequestFinished:T(b)}},runtime:{onMessage:T(h),onMessageExternal:T(h),sendMessage:D.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:D.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},B={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return o.privacy={network:{"*":B},services:{"*":B},websites:{"*":B}},f(i,M,o)};n.exports=a(chrome)}else n.exports=globalThis.browser})}}),Sf={};g6(Sf,{default:()=>nu});var f6=yf(vf());m6(Sf,yf(vf()));var{default:bf,...h6}=f6,nu=bf!==void 0?bf:h6;globalThis.immersiveTranslateBrowserAPI=nu;d();d();d();var su,Fe,Df,b6,ko,xf,Af,au={},kf=[],T6=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vr(t,e){for(var n in e)t[n]=e[n];return t}function Pf(t){var e=t.parentNode;e&&e.removeChild(t)}function hd(t,e,n){var r,a,i,o={};for(i in e)i=="key"?r=e[i]:i=="ref"?a=e[i]:o[i]=e[i];if(arguments.length>2&&(o.children=arguments.length>3?su.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(i in t.defaultProps)o[i]===void 0&&(o[i]=t.defaultProps[i]);return ru(t,o,r,a,null)}function ru(t,e,n,r,a){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++Df};return a==null&&Fe.vnode!=null&&Fe.vnode(i),i}function Ot(t){return t.children}function Ba(t,e){this.props=t,this.context=e}function fi(t,e){if(e==null)return t.__?fi(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e0?ru(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(g=h[c])===null||g&&m.key==g.key&&m.type===g.type)h[c]=void 0;else for(p=0;p=n.__.length&&n.__.push({__V:uu}),n.__[t]}function re(t){return Po=1,x6(Gf,t)}function x6(t,e,n){var r=cu(Lo++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):Gf(void 0,e),function(i){var o=r.__N?r.__N[0]:r.__[0],s=r.t(o,i);o!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=xt,!xt.u)){xt.u=!0;var a=xt.shouldComponentUpdate;xt.shouldComponentUpdate=function(i,o,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,i,o,s);var l=!1;return u.forEach(function(c){if(c.__N){var p=c.__[0];c.__=c.__N,c.__N=void 0,p!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,i,o,s))}}return r.__N||r.__}function Ce(t,e){var n=cu(Lo++,3);!Fe.__s&&Kf(n.__H,e)&&(n.__=t,n.i=e,xt.__H.__h.push(n))}function je(t){return Po=5,Ne(function(){return{current:t}},[])}function Ne(t,e){var n=cu(Lo++,7);return Kf(n.__H,e)?(n.__V=t(),n.i=e,n.__h=t,n.__V):n.__}function Ve(t,e){return Po=8,Ne(function(){return t},e)}function du(t){var e=xt.context[t.__c],n=cu(Lo++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(xt)),e.props.value):t.__}function E6(){for(var t;t=Wf.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(lu),t.__H.__h.forEach(yd),t.__H.__h=[]}catch(e){t.__H.__h=[],Fe.__e(e,t.__v)}}Fe.__b=function(t){typeof t.type!="function"||t.o||t.type===Ot?t.o||(t.o=t.__&&t.__.o?t.__.o:""):t.o=(t.__&&t.__.o?t.__.o:"")+(t.__&&t.__.__k?t.__.__k.indexOf(t):0),xt=null,zf&&zf(t)},Fe.__r=function(t){Nf&&Nf(t),Lo=0;var e=(xt=t.__c).__H;e&&(Td===xt?(e.__h=[],xt.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=uu,n.__N=n.i=void 0})):(e.__h.forEach(lu),e.__h.forEach(yd),e.__h=[])),Td=xt},Fe.diffed=function(t){Uf&&Uf(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Wf.push(e)!==1&&Of===Fe.requestAnimationFrame||((Of=Fe.requestAnimationFrame)||C6)(E6)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==uu&&(n.__=n.__V),n.i=void 0,n.__V=uu})),Td=xt=null},Fe.__c=function(t,e){e.some(function(n){try{n.__h.forEach(lu),n.__h=n.__h.filter(function(r){return!r.__||yd(r)})}catch(r){e.some(function(a){a.__h&&(a.__h=[])}),e=[],Fe.__e(r,n.__v)}}),qf&&qf(t,e)},Fe.unmount=function(t){jf&&jf(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{lu(r)}catch(a){e=a}}),n.__H=void 0,e&&Fe.__e(e,n.__v))};var Hf=typeof requestAnimationFrame=="function";function C6(t){var e,n=function(){clearTimeout(r),Hf&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Hf&&(e=requestAnimationFrame(n))}function lu(t){var e=xt,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),xt=e}function yd(t){var e=xt;t.__c=t.__(),xt=e}function Kf(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function Gf(t,e){return typeof e=="function"?e(t):e}d();d();function pu(t,e,n){let r=[];n||(n={}),e!=="auto"&&!n[e]&&(n[e]={matches:[],excludeMatches:[]}),r=e!=="auto"?n[e].matches:[];let a={},i=Object.keys(n);for(let l of i){let p=n[l].matches;for(let g of p)a[g]||(a[g]=[]),a[g].push(l)}let o=a[t];if(o&&o.length>0)for(let l of o)n[l].matches.indexOf(t)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(p=>p!==t)});let s=new Set(r);if(e==="auto")return{...n};s.add(t);let u=Array.from(s);return{...n,[e]:{...n[e],matches:u}}}d();d();function Me(){return typeof process>"u"&&typeof Deno<"u"?Deno.env.toObject():x}var we=Me();function ye(){return we.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Qt(){return we.PROD==="1"}function Bn(){return we.PROD_API==="1"}function Vf(){return we.HAS_CSP_ERROR=="1"}function ot(){if(we.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&e._isSafari)}else return!1}function gu(){return typeof Deno<"u"}var wP=Me().PROD==="1",bi=Me().PROD!=="1";function mu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();d();d();var vd=/iPhone/i,$f=/iPod/i,Yf=/iPad/i,Qf=/\biOS-universal(?:.+)Mac\b/i,Sd=/\bAndroid(?:.+)Mobile\b/i,Zf=/Android/i,Ti=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,fu=/Silk/i,Cr=/Windows Phone/i,Jf=/\bWindows(?:.+)ARM\b/i,Xf=/BlackBerry/i,eh=/BB10/i,th=/Opera Mini/i,nh=/\b(CriOS|Chrome)(?:.+)Mobile/i,rh=/Mobile(?:.+)Firefox\b/i,ah=t=>typeof t<"u"&&t.platform==="MacIntel"&&typeof t.maxTouchPoints=="number"&&t.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function w6(t){return e=>e.test(t)}function tt(t){let e={userAgent:"",platform:"",maxTouchPoints:0};!t&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof t=="string"?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0});let n=e.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=w6(n),i={apple:{phone:a(vd)&&!a(Cr),ipod:a($f),tablet:!a(vd)&&(a(Yf)||ah(e))&&!a(Cr),universal:a(Qf),device:(a(vd)||a($f)||a(Yf)||a(Qf)||ah(e))&&!a(Cr)},amazon:{phone:a(Ti),tablet:!a(Ti)&&a(fu),device:a(Ti)||a(fu)},android:{phone:!a(Cr)&&a(Ti)||!a(Cr)&&a(Sd),tablet:!a(Cr)&&!a(Ti)&&!a(Sd)&&(a(fu)||a(Zf)),device:!a(Cr)&&(a(Ti)||a(fu)||a(Sd)||a(Zf))||a(/\bokhttp\b/i)},windows:{phone:a(Cr),tablet:a(Jf),device:a(Cr)||a(Jf)},other:{blackberry:a(Xf),blackberry10:a(eh),opera:a(th),firefox:a(rh),chrome:a(nh),device:a(Xf)||a(eh)||a(th)||a(rh)||a(nh)},any:!1,phone:!1,tablet:!1};return i.any=i.apple.device||i.android.device||i.windows.device||i.other.device,i.phone=i.apple.phone||i.android.phone||i.windows.phone,i.tablet=i.apple.tablet||i.android.tablet||i.windows.tablet,i}var xd="DENO",hu="CHROME",bu="FIREFOX";function ih(t){let e=hu;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?e=bu:/deno/i.test(n)&&(e=xd)}catch{}return t===hu&&e===hu||t===bu&&e===bu||t===xd&&e===xd}function D6(){return ih(hu)}function oh(){return typeof Deno<"u"}function Wn(){return ih(bu)}function Tu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function _o(t){return!!(t?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}function sh(){return ye()?"monkey":D6()?"chrome":Wn()?"firefox":ot()?"safari":null}d();var uh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},lh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:uh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:uh,query:()=>{},sendMessage:()=>{}}};var oe;oh()?oe=lh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();var ch={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5145,44 +5145,44 @@ ass, HTML, arquivos TXT`,"description.subtitlePrompt":`Em cen\xE1rios de legenda - id: 1 {env.imt_trans_field}: tradu\xE7\xE3o - id: 2 - {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Ch=[{code:"zh-CN",messages:ch},{code:"zh-TW",messages:dh},{code:"en",messages:ph},{code:"ja",messages:gh},{code:"ar",messages:mh},{code:"de",messages:fh},{code:"es",messages:hh},{code:"fa",messages:bh},{code:"fr",messages:Th},{code:"hi",messages:yh},{code:"it",messages:vh},{code:"ru",messages:Sh},{code:"ko",messages:xh},{code:"pt",messages:Eh}];var Cd="immersiveTranslateBingGlobalState",wd="immersiveTranslateYandexGlobalState",Ot={};for(let t of Ch)Ot[t.code]=t.messages;var Ia="Immersive Translate",Q="immersive-translate",Dh="pdf/index.html";var me="immersiveTranslate";var Ah=me+"GoogleAccessToken",kh=me+"AuthFlow";var q6=me+"AuthState",yu=me+"IframeMessage",yL=me+"WaitForRateLimit",Ph=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",Ra=me+"showError",Lh=me+"DocumentMessageThirdPartyTell",_h=me+"DocumentMessageEventUpload",j6=me+"DocumentMessageHandler",vu=`${me}Share`,_o=`${me}ToggleMouseHoverTranslateDirectly`,Fh=`${me}ReqDraft`,Mh=`${me}ResDraft`,H6=`${me}Container`,Bh=`${me}SpecifiedContainer`,Yr="buildinConfig",Fo="localConfig",Dd="openOptionsPage",Ad="openAboutPage";var kd="openEbookViewer",Pd="openEbookBuilder";var Oa=`${me}PageTranslatedStatus`,vL=`${me}PageUrlChanged`,wr=`${me}ReceiveCommand`,Ih=me+"LastUseMouseHoverTime",Su=me+"LastUseInputTime",Kn=me+"LastUseManualTranslatePageTime",Mo=`${me}PopupReceiveMessage`,W6="immersivetranslate.com",K6="config.immersivetranslate.com",SL=`https://${W6}/`,Bo=`https://${K6}/default_config.json`,xL=`${me}Mark`,Tn=`${me}Root`,Rh=`${me}Walked`,EL=`data-${Q}-walked`,Oh=`${me}Paragraph`,zh=`data-${Q}-paragraph`,ur=`data-${Q}-translation-element-mark`,Nh=`${me}TranslationElementMark`,CL=`${me}TranslatedMark`,Uh=`${me}LoadingId`,Ld=`data-${Q}-loading-id`,qh=`${me}ErrorId`,xu=`data-${Q}-error-id`,G6=`${me}AtomicBlockMark`,jh=`${me}ExcludeMark`,wL=`data-${Q}-exclude-mark`,V6=`${me}StayOriginalMark`,DL=`${me}PreWhitespaceMark`,Eu=`${me}InlineMark`,Hh=`${me}BlockMark`,AL=`${me}Left`,kL=`${me}Right`,PL=`${me}Width`,LL=`${me}Height`,_L=`${me}Top`,FL=`${me}FontSize`,Wh="lastRunTime",ML=`${me}GlobalStyleMark`,Io=["@","#"],Cu=" --- ",Kh=` -`,bt=`${Q}-target-wrapper`,BL=`${Q}-pdf-target-container`,wu=`${Q}-target-inner`,IL=`${Q}-source-wrapper`,_d=`${Q}-target-translation-block-wrapper`,RL=`${Q}-root-translation-theme`,yi=`${me}RootTranslationTheme`,Gh=`${Q}-target-translation-vertical-block-wrapper`,OL=`${Q}-target-translation-pdf-block-wrapper`,Vh=`${Q}-target-translation-pre-whitespace`,Fd=`${Q}-target-translation-inline-wrapper`;var $h={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},wn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Yh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},Qh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},Zh={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Jh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],Xh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],lr="zh-CN";var wh=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Du=["caiyun","cai"],cr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_trans_field}: tradu\xE7\xE3o`,"subtitle.quickButton.green":"verde","subtitle.quickButton.magenta":"Magenta","translationServices.claude":"Claude","subtitle.quickButton.white":"branco","subtitle.quickButton.translationTextColor":"Cor da fonte da tradu\xE7\xE3o","subtitle.quickButton.backgroundOpacity":"opacidade de fundo","subtitle.quickButton.sourceFontSize":"Tamanho original da fonte","subtitle.quickButton.backgroundColor":"cor de fundo","subtitle.quickButton.setting":"configura\xE7\xE3o","subtitle.quickButton.blue":"azul","subtitle.quickButton.translationPositionBottom":"\u539F\u6587\u4E0B\u65B9","subtitle.quickButton.yellow":"Amarelo","subtitle.quickButton.translationPositionTop":"Acima do texto original","subtitle.quickButton.sourceTextColor":"Cor original da fonte","subtitle.quickButton.red":"vermelho","subtitle.quickButton.translationPosition":"Posi\xE7\xE3o de tradu\xE7\xE3o","subtitle.quickButton.cyan":"Azul","subtitle.quickButton.black":"preto","subtitle.quickButton.translationFontSize":"Tamanho da fonte do texto traduzido",attachSubtitleTranslating:"Usando {service} para traduzir...","error.claude.403":"Sem permiss\xE3o para acessar o servi\xE7o, pode estar relacionado com as restri\xE7\xF5es de \xE1rea de Claude, voc\xEA pode tentar alterar o seu endere\xE7o IP, ou usar outros servi\xE7os de tradu\xE7\xE3o.","browser.brandDescriptionForSafari":"\u3010Tradu\xE7\xE3o imersiva\u3011Um plugin de tradu\xE7\xE3o de p\xE1ginas da web bilingue (original/tradu\xE7\xE3o) gratuito, que suporta a tradu\xE7\xE3o de PDF e EPUB e mant\xE9m a formata\xE7\xE3o original do documento, a tradu\xE7\xE3o de legendas bilingues de v\xEDdeos online como Youtube/Netflix, e suporta servi\xE7os de tradu\xE7\xE3o mainstream como Deepl/Google;","browser.PdfProFile":"AI impulsionado pela tradu\xE7\xE3o do PDF Pro","browser.textTranslate":"Tradu\xE7\xE3o de texto"};var Ch=[{code:"zh-CN",messages:ch},{code:"zh-TW",messages:dh},{code:"en",messages:ph},{code:"ja",messages:gh},{code:"ar",messages:mh},{code:"de",messages:fh},{code:"es",messages:hh},{code:"fa",messages:bh},{code:"fr",messages:Th},{code:"hi",messages:yh},{code:"it",messages:vh},{code:"ru",messages:Sh},{code:"ko",messages:xh},{code:"pt",messages:Eh}];var Ed="immersiveTranslateBingGlobalState",Cd="immersiveTranslateYandexGlobalState",zt={};for(let t of Ch)zt[t.code]=t.messages;var Ia="Immersive Translate",Q="immersive-translate",Dh="pdf/index.html";var me="immersiveTranslate";var Ah=me+"GoogleAccessToken",kh=me+"AuthFlow";var q6=me+"AuthState",yu=me+"IframeMessage",yL=me+"WaitForRateLimit",Ph=me+"DocumentMessageAsk",_t=me+"DocumentMessageTellThirdParty",Ra=me+"showError",Lh=me+"DocumentMessageThirdPartyTell",_h=me+"DocumentMessageEventUpload",j6=me+"DocumentMessageHandler",vu=`${me}Share`,Fo=`${me}ToggleMouseHoverTranslateDirectly`,Fh=`${me}ReqDraft`,Mh=`${me}ResDraft`,H6=`${me}Container`,Bh=`${me}SpecifiedContainer`,Yr="buildinConfig",Mo="localConfig",wd="openOptionsPage",Dd="openAboutPage";var Ad="openEbookViewer",kd="openEbookBuilder";var Oa=`${me}PageTranslatedStatus`,vL=`${me}PageUrlChanged`,wr=`${me}ReceiveCommand`,Ih=me+"LastUseMouseHoverTime",Su=me+"LastUseInputTime",Kn=me+"LastUseManualTranslatePageTime",Bo=`${me}PopupReceiveMessage`,W6="immersivetranslate.com",K6="config.immersivetranslate.com",SL=`https://${W6}/`,Io=`https://${K6}/default_config.json`,xL=`${me}Mark`,Tn=`${me}Root`,Rh=`${me}Walked`,EL=`data-${Q}-walked`,Oh=`${me}Paragraph`,zh=`data-${Q}-paragraph`,ur=`data-${Q}-translation-element-mark`,Nh=`${me}TranslationElementMark`,CL=`${me}TranslatedMark`,Uh=`${me}LoadingId`,Pd=`data-${Q}-loading-id`,qh=`${me}ErrorId`,xu=`data-${Q}-error-id`,G6=`${me}AtomicBlockMark`,jh=`${me}ExcludeMark`,wL=`data-${Q}-exclude-mark`,V6=`${me}StayOriginalMark`,DL=`${me}PreWhitespaceMark`,Eu=`${me}InlineMark`,Hh=`${me}BlockMark`,AL=`${me}Left`,kL=`${me}Right`,PL=`${me}Width`,LL=`${me}Height`,_L=`${me}Top`,FL=`${me}FontSize`,Wh="lastRunTime",ML=`${me}GlobalStyleMark`,Ro=["@","#"],Cu=" --- ",Kh=` +`,bt=`${Q}-target-wrapper`,BL=`${Q}-pdf-target-container`,wu=`${Q}-target-inner`,IL=`${Q}-source-wrapper`,Ld=`${Q}-target-translation-block-wrapper`,RL=`${Q}-root-translation-theme`,yi=`${me}RootTranslationTheme`,Gh=`${Q}-target-translation-vertical-block-wrapper`,OL=`${Q}-target-translation-pdf-block-wrapper`,Vh=`${Q}-target-translation-pre-whitespace`,_d=`${Q}-target-translation-inline-wrapper`;var $h={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},wn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],Yh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},Qh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},Zh={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Jh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],Xh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],lr="zh-CN";var wh=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Du=["caiyun","cai"],cr={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Io,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...wh,{type:"password",name:"apikey",required:!0}],props:wh},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Au={type:me+"ChildFrameToRootFrameIdentifier"},Md=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],Ro=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],e4=["ctrl","alt","shift","cmd","command","option","control"];var zL=Qt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",Bd="user_from_plugin",Ft="user_info",Oo=Qt()||Bn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",t4=Qt()||Bn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",n4=t4+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",r4=t4+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",ku=Qt()||Bn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",vi=Qt()||Bn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",$6=Qt()||Bn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",Y6=Qt()||Bn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",Q6=Qt()||Bn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",Z6=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",NL=$6+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",a4=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Pu=vi+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",i4=Y6+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",o4=Q6+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",s4=ku+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",u4="https://immersivetranslate.com/docs/usage/";var l4=Me().TRANSLATE_FILE_URL,UL=l4+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",c4=l4+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";function d4(t){let e=oe.runtime.getURL(Dh),n=new URL(e);return t&&(t.startsWith("http")||!Wn())&&n.searchParams.set("file",t),n.href}d();d();function Zt(t){return!!(t&&t.subscription&&t.subscription.subscriptionStatus==="active")}function p4(t){if(t){let e=new Date(t.createTime),n=J6(e),r="free",a="unknown";return t.subscription&&t.subscription.subscriptionStatus==="active"&&(r=t.subscription.subscriptionType),t.subscription&&t.subscription.subscriptionId&&(t.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function J6(t){try{let n=t.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,i]=n.split("/");return n=`${i}-${r}-${a}`,n}catch{return"unknown"}}d();var za=me+"CacheKey_";function Id(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function X6(){let t=oe.storage.local.refresh;t&&t()}function Rd(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(za)).filter(r=>r!==za+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Id,set:zd,getExpired:Rd,setExpired:Od,remove:Nd,clear:g4,refresh:X6};d();d();d();d();d();d();function Si(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Ud=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Lu(t,e){let n=Si(),r=setTimeout(()=>n.reject(new Ud),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function Dr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var m4=class{#e=0;#t=[];#n=[];#r=Si();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eDS,bgBlue:()=>LS,bgBrightBlack:()=>BS,bgBrightBlue:()=>zS,bgBrightCyan:()=>US,bgBrightGreen:()=>RS,bgBrightMagenta:()=>NS,bgBrightRed:()=>IS,bgBrightWhite:()=>qS,bgBrightYellow:()=>OS,bgCyan:()=>FS,bgGreen:()=>kS,bgMagenta:()=>_S,bgRed:()=>AS,bgRgb24:()=>KS,bgRgb8:()=>HS,bgWhite:()=>MS,bgYellow:()=>PS,black:()=>cS,blue:()=>mS,bold:()=>rS,brightBlack:()=>b4,brightBlue:()=>xS,brightCyan:()=>CS,brightGreen:()=>vS,brightMagenta:()=>ES,brightRed:()=>yS,brightWhite:()=>wS,brightYellow:()=>SS,cyan:()=>hS,dim:()=>aS,getColorEnabled:()=>tS,gray:()=>TS,green:()=>pS,hidden:()=>uS,inverse:()=>sS,italic:()=>iS,magenta:()=>fS,red:()=>dS,reset:()=>nS,rgb24:()=>WS,rgb8:()=>jS,setColorEnabled:()=>eS,strikethrough:()=>lS,stripColor:()=>VS,underline:()=>oS,white:()=>bS,yellow:()=>gS});d();var{Deno:f4}=globalThis,h4=typeof f4?.noColor=="boolean"?f4.noColor:!0,qd=!h4;function eS(t){h4||(qd=t)}function tS(){return qd}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return qd?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function nS(t){return Pe(t,ke([0],0))}function rS(t){return Pe(t,ke([1],22))}function aS(t){return Pe(t,ke([2],22))}function iS(t){return Pe(t,ke([3],23))}function oS(t){return Pe(t,ke([4],24))}function sS(t){return Pe(t,ke([7],27))}function uS(t){return Pe(t,ke([8],28))}function lS(t){return Pe(t,ke([9],29))}function cS(t){return Pe(t,ke([30],39))}function dS(t){return Pe(t,ke([31],39))}function pS(t){return Pe(t,ke([32],39))}function gS(t){return Pe(t,ke([33],39))}function mS(t){return Pe(t,ke([34],39))}function fS(t){return Pe(t,ke([35],39))}function hS(t){return Pe(t,ke([36],39))}function bS(t){return Pe(t,ke([37],39))}function TS(t){return b4(t)}function b4(t){return Pe(t,ke([90],39))}function yS(t){return Pe(t,ke([91],39))}function vS(t){return Pe(t,ke([92],39))}function SS(t){return Pe(t,ke([93],39))}function xS(t){return Pe(t,ke([94],39))}function ES(t){return Pe(t,ke([95],39))}function CS(t){return Pe(t,ke([96],39))}function wS(t){return Pe(t,ke([97],39))}function DS(t){return Pe(t,ke([40],49))}function AS(t){return Pe(t,ke([41],49))}function kS(t){return Pe(t,ke([42],49))}function PS(t){return Pe(t,ke([43],49))}function LS(t){return Pe(t,ke([44],49))}function _S(t){return Pe(t,ke([45],49))}function FS(t){return Pe(t,ke([46],49))}function MS(t){return Pe(t,ke([47],49))}function BS(t){return Pe(t,ke([100],49))}function IS(t){return Pe(t,ke([101],49))}function RS(t){return Pe(t,ke([102],49))}function OS(t){return Pe(t,ke([103],49))}function zS(t){return Pe(t,ke([104],49))}function NS(t){return Pe(t,ke([105],49))}function US(t){return Pe(t,ke([106],49))}function qS(t){return Pe(t,ke([107],49))}function Qr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function jS(t,e){return Pe(t,ke([38,5,Qr(e)],39))}function HS(t,e){return Pe(t,ke([48,5,Qr(e)],49))}function WS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Qr(e.r),Qr(e.g),Qr(e.b)],39))}function KS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Qr(e.r),Qr(e.g),Qr(e.b)],49))}var GS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function VS(t){return t.replace(GS,"")}d();d();var jd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},$S={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Hd(t,e){let n={...$S,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new jd(a,n.maxAttempts)}d();var Ar=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Wd(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2|e[r]>>6],n+=Ar[e[r]&63];return r===a+1&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2],n+="="),n}d();d();var YS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,QS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ZS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Kd={Space_Separator:YS,ID_Start:QS,ID_Continue:ZS},Et={isSpaceSeparator(t){return typeof t=="string"&&Kd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Kd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Kd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Vd,ln,Pr,Fu,Zr,Gn,zt,Qd,No,JS=function(t,e){Vd=String(t),ln="start",Pr=[],Fu=0,Zr=1,Gn=0,zt=void 0,Qd=void 0,No=void 0;do zt=XS(),nx[ln]();while(zt.type!=="eof");return typeof e=="function"?$d({"":No},"",e):No};function $d(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;ar[n]===void 0?e:r[n])}function X6(){let t=oe.storage.local.refresh;t&&t()}function Id(t,e){let n=za+t;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return e;let{value:a,expired:i}=r[n];return i&&ir.startsWith(za)).filter(r=>r!==za+Ft);if(n.length>0)return oe.storage.local.remove(n)}}var Mt={get:Bd,set:Od,getExpired:Id,setExpired:Rd,remove:zd,clear:g4,refresh:X6};d();d();d();d();d();d();function Si(){let t,e="pending",n=new Promise((r,a)=>{t={async resolve(i){await i,e="fulfilled",r(i)},reject(i){e="rejected",a(i)}}});return Object.defineProperty(n,"state",{get:()=>e}),Object.assign(n,t)}d();var Nd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function Lu(t,e){let n=Si(),r=setTimeout(()=>n.reject(new Nd),e);return Promise.race([t,n]).finally(()=>clearTimeout(r))}d();d();function Dr(t,e={}){let{signal:n,persistent:r}=e;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,i)=>{let o=()=>{clearTimeout(u),i(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",o),a()},t);if(n?.addEventListener("abort",o,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var m4=class{#e=0;#t=[];#n=[];#r=Si();add(e){++this.#e,this.#a(e[Symbol.asyncIterator]())}async#a(e){try{let{value:n,done:r}=await e.next();r?--this.#e:this.#t.push({iterator:e,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let e=0;eDS,bgBlue:()=>LS,bgBrightBlack:()=>BS,bgBrightBlue:()=>zS,bgBrightCyan:()=>US,bgBrightGreen:()=>RS,bgBrightMagenta:()=>NS,bgBrightRed:()=>IS,bgBrightWhite:()=>qS,bgBrightYellow:()=>OS,bgCyan:()=>FS,bgGreen:()=>kS,bgMagenta:()=>_S,bgRed:()=>AS,bgRgb24:()=>KS,bgRgb8:()=>HS,bgWhite:()=>MS,bgYellow:()=>PS,black:()=>cS,blue:()=>mS,bold:()=>rS,brightBlack:()=>b4,brightBlue:()=>xS,brightCyan:()=>CS,brightGreen:()=>vS,brightMagenta:()=>ES,brightRed:()=>yS,brightWhite:()=>wS,brightYellow:()=>SS,cyan:()=>hS,dim:()=>aS,getColorEnabled:()=>tS,gray:()=>TS,green:()=>pS,hidden:()=>uS,inverse:()=>sS,italic:()=>iS,magenta:()=>fS,red:()=>dS,reset:()=>nS,rgb24:()=>WS,rgb8:()=>jS,setColorEnabled:()=>eS,strikethrough:()=>lS,stripColor:()=>VS,underline:()=>oS,white:()=>bS,yellow:()=>gS});d();var{Deno:f4}=globalThis,h4=typeof f4?.noColor=="boolean"?f4.noColor:!0,Ud=!h4;function eS(t){h4||(Ud=t)}function tS(){return Ud}function ke(t,e){return{open:`\x1B[${t.join(";")}m`,close:`\x1B[${e}m`,regexp:new RegExp(`\\x1b\\[${e}m`,"g")}}function Pe(t,e){return Ud?`${e.open}${t.replace(e.regexp,e.open)}${e.close}`:t}function nS(t){return Pe(t,ke([0],0))}function rS(t){return Pe(t,ke([1],22))}function aS(t){return Pe(t,ke([2],22))}function iS(t){return Pe(t,ke([3],23))}function oS(t){return Pe(t,ke([4],24))}function sS(t){return Pe(t,ke([7],27))}function uS(t){return Pe(t,ke([8],28))}function lS(t){return Pe(t,ke([9],29))}function cS(t){return Pe(t,ke([30],39))}function dS(t){return Pe(t,ke([31],39))}function pS(t){return Pe(t,ke([32],39))}function gS(t){return Pe(t,ke([33],39))}function mS(t){return Pe(t,ke([34],39))}function fS(t){return Pe(t,ke([35],39))}function hS(t){return Pe(t,ke([36],39))}function bS(t){return Pe(t,ke([37],39))}function TS(t){return b4(t)}function b4(t){return Pe(t,ke([90],39))}function yS(t){return Pe(t,ke([91],39))}function vS(t){return Pe(t,ke([92],39))}function SS(t){return Pe(t,ke([93],39))}function xS(t){return Pe(t,ke([94],39))}function ES(t){return Pe(t,ke([95],39))}function CS(t){return Pe(t,ke([96],39))}function wS(t){return Pe(t,ke([97],39))}function DS(t){return Pe(t,ke([40],49))}function AS(t){return Pe(t,ke([41],49))}function kS(t){return Pe(t,ke([42],49))}function PS(t){return Pe(t,ke([43],49))}function LS(t){return Pe(t,ke([44],49))}function _S(t){return Pe(t,ke([45],49))}function FS(t){return Pe(t,ke([46],49))}function MS(t){return Pe(t,ke([47],49))}function BS(t){return Pe(t,ke([100],49))}function IS(t){return Pe(t,ke([101],49))}function RS(t){return Pe(t,ke([102],49))}function OS(t){return Pe(t,ke([103],49))}function zS(t){return Pe(t,ke([104],49))}function NS(t){return Pe(t,ke([105],49))}function US(t){return Pe(t,ke([106],49))}function qS(t){return Pe(t,ke([107],49))}function Qr(t,e=255,n=0){return Math.trunc(Math.max(Math.min(t,e),n))}function jS(t,e){return Pe(t,ke([38,5,Qr(e)],39))}function HS(t,e){return Pe(t,ke([48,5,Qr(e)],49))}function WS(t,e){return typeof e=="number"?Pe(t,ke([38,2,e>>16&255,e>>8&255,e&255],39)):Pe(t,ke([38,2,Qr(e.r),Qr(e.g),Qr(e.b)],39))}function KS(t,e){return typeof e=="number"?Pe(t,ke([48,2,e>>16&255,e>>8&255,e&255],49)):Pe(t,ke([48,2,Qr(e.r),Qr(e.g),Qr(e.b)],49))}var GS=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function VS(t){return t.replace(GS,"")}d();d();var qd=class extends Error{constructor(e,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=e}},$S={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function jd(t,e){let n={...$S,...e};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let i=0;isetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=o}throw new qd(a,n.maxAttempts)}d();var Ar=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Hd(t){let e=typeof t=="string"?new TextEncoder().encode(t):t instanceof Uint8Array?t:new Uint8Array(t),n="",r,a=e.length;for(r=2;r>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2|e[r]>>6],n+=Ar[e[r]&63];return r===a+1&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4],n+="=="),r===a&&(n+=Ar[e[r-2]>>2],n+=Ar[(e[r-2]&3)<<4|e[r-1]>>4],n+=Ar[(e[r-1]&15)<<2],n+="="),n}d();d();var YS=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,QS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,ZS=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Wd={Space_Separator:YS,ID_Start:QS,ID_Continue:ZS},Et={isSpaceSeparator(t){return typeof t=="string"&&Wd.Space_Separator.test(t)},isIdStartChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t==="$"||t==="_"||Wd.ID_Start.test(t))},isIdContinueChar(t){return typeof t=="string"&&(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||t==="$"||t==="_"||t==="\u200C"||t==="\u200D"||Wd.ID_Continue.test(t))},isDigit(t){return typeof t=="string"&&/[0-9]/.test(t)},isHexDigit(t){return typeof t=="string"&&/[0-9A-Fa-f]/.test(t)}},Gd,ln,Pr,Fu,Zr,Gn,Nt,Yd,Uo,JS=function(t,e){Gd=String(t),ln="start",Pr=[],Fu=0,Zr=1,Gn=0,Nt=void 0,Yd=void 0,Uo=void 0;do Nt=XS(),nx[ln]();while(Nt.type!=="eof");return typeof e=="function"?Vd({"":Uo},"",e):Uo};function Vd(t,e,n){let r=t[e];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=Lr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var nx={start(){if(zt.type==="eof")throw Ua();Gd()},beforePropertyName(){switch(zt.type){case"identifier":case"string":Qd=zt.value,ln="afterPropertyName";return;case"punctuator":_u();return;case"eof":throw Ua()}},afterPropertyName(){if(zt.type==="eof")throw Ua();ln="beforePropertyValue"},beforePropertyValue(){if(zt.type==="eof")throw Ua();Gd()},beforeArrayValue(){if(zt.type==="eof")throw Ua();if(zt.type==="punctuator"&&zt.value==="]"){_u();return}Gd()},afterPropertyValue(){if(zt.type==="eof")throw Ua();switch(zt.value){case",":ln="beforePropertyName";return;case"}":_u()}},afterArrayValue(){if(zt.type==="eof")throw Ua();switch(zt.value){case",":ln="beforeArrayValue";return;case"]":_u()}},end(){}};function Gd(){let t;switch(zt.type){case"punctuator":switch(zt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=zt.value;break}if(No===void 0)No=t;else{let e=Pr[Pr.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Qd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Pr.push(t),Array.isArray(t)?ln="beforeArrayValue":ln="beforePropertyName";else{let e=Pr[Pr.length-1];e==null?ln="end":Array.isArray(e)?ln="afterArrayValue":ln="afterPropertyValue"}}function _u(){Pr.pop();let t=Pr[Pr.length-1];t==null?ln="end":Array.isArray(t)?ln="afterArrayValue":ln="afterPropertyValue"}function ct(t){return Zd(t===void 0?`JSON5: invalid end of input at ${Zr}:${Gn}`:`JSON5: invalid character '${rx(t)}' at ${Zr}:${Gn}`)}function Ua(){return Zd(`JSON5: invalid end of input at ${Zr}:${Gn}`)}function T4(){return Gn-=5,Zd(`JSON5: invalid identifier character at ${Zr}:${Gn}`)}function rx(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Zd(t){let e=new SyntaxError(t);return e.lineNumber=Zr,e.columnNumber=Gn,e}var ax=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?m(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let B=g(D)+":";s!==""&&(B+=" "),B+=M,h.push(B)}}let C;if(h.length===0)C="{}";else{let D;if(s==="")D=h.join(","),C="{"+D+"}";else{let M=`, +`&&K(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ct(K());case void 0:throw ct(K())}return K()}function tx(){let t="",e=Lr();if(!Et.isHexDigit(e)||(t+=K(),e=Lr(),!Et.isHexDigit(e)))throw ct(K());return t+=K(),String.fromCodePoint(parseInt(t,16))}function $d(){let t="",e=4;for(;e-- >0;){let n=Lr();if(!Et.isHexDigit(n))throw ct(K());t+=K()}return String.fromCodePoint(parseInt(t,16))}var nx={start(){if(Nt.type==="eof")throw Ua();Kd()},beforePropertyName(){switch(Nt.type){case"identifier":case"string":Yd=Nt.value,ln="afterPropertyName";return;case"punctuator":_u();return;case"eof":throw Ua()}},afterPropertyName(){if(Nt.type==="eof")throw Ua();ln="beforePropertyValue"},beforePropertyValue(){if(Nt.type==="eof")throw Ua();Kd()},beforeArrayValue(){if(Nt.type==="eof")throw Ua();if(Nt.type==="punctuator"&&Nt.value==="]"){_u();return}Kd()},afterPropertyValue(){if(Nt.type==="eof")throw Ua();switch(Nt.value){case",":ln="beforePropertyName";return;case"}":_u()}},afterArrayValue(){if(Nt.type==="eof")throw Ua();switch(Nt.value){case",":ln="beforeArrayValue";return;case"]":_u()}},end(){}};function Kd(){let t;switch(Nt.type){case"punctuator":switch(Nt.value){case"{":t={};break;case"[":t=[];break}break;case"null":case"boolean":case"numeric":case"string":t=Nt.value;break}if(Uo===void 0)Uo=t;else{let e=Pr[Pr.length-1];Array.isArray(e)?e.push(t):Object.defineProperty(e,Yd,{value:t,writable:!0,enumerable:!0,configurable:!0})}if(t!==null&&typeof t=="object")Pr.push(t),Array.isArray(t)?ln="beforeArrayValue":ln="beforePropertyName";else{let e=Pr[Pr.length-1];e==null?ln="end":Array.isArray(e)?ln="afterArrayValue":ln="afterPropertyValue"}}function _u(){Pr.pop();let t=Pr[Pr.length-1];t==null?ln="end":Array.isArray(t)?ln="afterArrayValue":ln="afterPropertyValue"}function ct(t){return Qd(t===void 0?`JSON5: invalid end of input at ${Zr}:${Gn}`:`JSON5: invalid character '${rx(t)}' at ${Zr}:${Gn}`)}function Ua(){return Qd(`JSON5: invalid end of input at ${Zr}:${Gn}`)}function T4(){return Gn-=5,Qd(`JSON5: invalid identifier character at ${Zr}:${Gn}`)}function rx(t){let e={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(e[t])return e[t];if(t<" "){let n=t.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return t}function Qd(t){let e=new SyntaxError(t);return e.lineNumber=Zr,e.columnNumber=Gn,e}var ax=function(t,e,n){let r=[],a="",i,o,s="",u;if(e!=null&&typeof e=="object"&&!Array.isArray(e)&&(n=e.space,u=e.quote,e=e.replacer),typeof e=="function")o=e;else if(Array.isArray(e)){i=[];for(let f of e){let T;typeof f=="string"?T=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(T=String(f)),T!==void 0&&i.indexOf(T)<0&&i.push(T)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":t});function l(f,T){let b=T[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),o&&(b=o.call(T,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?m(b):p(b)}function c(f){let T={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let D=0;DT[D]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=i||Object.keys(f),h=[];for(let D of b){let M=l(D,f);if(M!==void 0){let B=g(D)+":";s!==""&&(B+=" "),B+=M,h.push(B)}}let C;if(h.length===0)C="{}";else{let D;if(s==="")D=h.join(","),C="{"+D+"}";else{let M=`, `+a;D=h.join(M),C=`{ `+a+D+`, `+T+"}"}}return r.pop(),a=T,C}function g(f){if(f.length===0)return c(f,!0);let T=String.fromCodePoint(f.codePointAt(0));if(!Et.isIdStartChar(T))return c(f,!0);for(let b=T.length;b=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let T=a;a=a+s;let b=[];for(let C=0;C()=>(e||t((e={exports:{}}).exports,e),e.exports),mx=(t,e)=>{for(var n in e)Xd(t,n,{get:e[n],enumerable:!0})},Jd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of cx(e))!px.call(t,a)&&a!==n&&Xd(t,a,{get:()=>e[a],enumerable:!(r=lx(e,a))||r.enumerable});return t},fx=(t,e,n)=>(Jd(t,e,"default"),n&&Jd(n,e,"default")),S4=(t,e,n)=>(n=t!=null?ux(dx(t)):{},Jd(e||!t||!t.__esModule?Xd(n,"default",{value:t,enumerable:!0}):n,t)),x4=gx((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Bu=="object"&&Bu&&Bu.Object===Object&&Bu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(_,k,v){var I,F,L,U,N,q,A=0,E=!1,P=!1,O=!0;if(typeof _!="function")throw new TypeError(n);k=y(k)||0,M(v)&&(E=!!v.leading,P="maxWait"in v,L=P?T(y(v.maxWait)||0,k):L,O="trailing"in v?!!v.trailing:O);function H(te){var Y=I,be=F;return I=F=void 0,A=te,U=_.apply(be,Y),U}function j(te){return A=te,N=setTimeout(se,k),E?H(te):U}function W(te){var Y=te-q,be=te-A,ae=k-Y;return P?b(ae,L-be):ae}function V(te){var Y=te-q,be=te-A;return q===void 0||Y>=k||Y<0||P&&be>=L}function se(){var te=h();if(V(te))return X(te);N=setTimeout(se,W(te))}function X(te){return N=void 0,O&&I?H(te):(I=F=void 0,U)}function Z(){N!==void 0&&clearTimeout(N),A=0,I=q=F=N=void 0}function ue(){return N===void 0?U:X(h())}function ge(){var te=h(),Y=V(te);if(I=arguments,F=this,q=te,Y){if(N===void 0)return j(q);if(P)return N=setTimeout(se,k),H(q)}return N===void 0&&(N=setTimeout(se,k)),U}return ge.cancel=Z,ge.flush=ue,ge}function D(_,k,v){var I=!0,F=!0;if(typeof _!="function")throw new TypeError(n);return M(v)&&(I="leading"in v?!!v.leading:I,F="trailing"in v?!!v.trailing:F),C(_,k,{leading:I,maxWait:k,trailing:F})}function M(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function B(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||B(_)&&f.call(_)==a}function y(_){if(typeof _=="number")return _;if(S(_))return r;if(M(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=M(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(i,"");var v=s.test(_);return v||u.test(_)?l(_.slice(2),v?2:8):o.test(_)?r:+_}e.exports=D}),E4={};mx(E4,{default:()=>Vn});var hx=S4(x4());fx(E4,S4(x4()));var{default:v4,...bx}=hx,Vn=v4!==void 0?v4:bx;d();d();var Iu=globalThis||(typeof window<"u"?window:self),Tx=Object.create,t0=Object.defineProperty,yx=Object.getOwnPropertyDescriptor,vx=Object.getOwnPropertyNames,Sx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Ex=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cx=(t,e)=>{for(var n in e)t0(t,n,{get:e[n],enumerable:!0})},e0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vx(e))!xx.call(t,a)&&a!==n&&t0(t,a,{get:()=>e[a],enumerable:!(r=yx(e,a))||r.enumerable});return t},wx=(t,e,n)=>(e0(t,e,"default"),n&&e0(n,e,"default")),w4=(t,e,n)=>(n=t!=null?Tx(Sx(t)):{},e0(e||!t||!t.__esModule?t0(n,"default",{value:t,enumerable:!0}):n,t)),D4=Ex((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(y,_,k){var v,I,F,L,U,N,q=0,A=!1,E=!1,P=!0;if(typeof y!="function")throw new TypeError(n);_=S(_)||0,D(k)&&(A=!!k.leading,E="maxWait"in k,F=E?T(S(k.maxWait)||0,_):F,P="trailing"in k?!!k.trailing:P);function O(ge){var te=v,Y=I;return v=I=void 0,q=ge,L=y.apply(Y,te),L}function H(ge){return q=ge,U=setTimeout(V,_),A?O(ge):L}function j(ge){var te=ge-N,Y=ge-q,be=_-te;return E?b(be,F-Y):be}function W(ge){var te=ge-N,Y=ge-q;return N===void 0||te>=_||te<0||E&&Y>=F}function V(){var ge=h();if(W(ge))return se(ge);U=setTimeout(V,j(ge))}function se(ge){return U=void 0,P&&v?O(ge):(v=I=void 0,L)}function X(){U!==void 0&&clearTimeout(U),q=0,v=N=I=U=void 0}function Z(){return U===void 0?L:se(h())}function ue(){var ge=h(),te=W(ge);if(v=arguments,I=this,N=ge,te){if(U===void 0)return H(N);if(E)return U=setTimeout(V,_),O(N)}return U===void 0&&(U=setTimeout(V,_)),L}return ue.cancel=X,ue.flush=Z,ue}function D(y){var _=typeof y;return!!y&&(_=="object"||_=="function")}function M(y){return!!y&&typeof y=="object"}function B(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(B(y))return r;if(D(y)){var _=typeof y.valueOf=="function"?y.valueOf():y;y=D(_)?_+"":_}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var k=s.test(y);return k||u.test(y)?l(y.slice(2),k?2:8):o.test(y)?r:+y}e.exports=C}),A4={};Cx(A4,{default:()=>Uo});var Dx=w4(D4());wx(A4,w4(D4()));var{default:C4,...Ax}=Dx,Uo=C4!==void 0?C4:Ax;d();d();var kx=Object.create,r0=Object.defineProperty,Px=Object.getOwnPropertyDescriptor,Lx=Object.getOwnPropertyNames,_x=Object.getPrototypeOf,Fx=Object.prototype.hasOwnProperty,Mx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bx=(t,e)=>{for(var n in e)r0(t,n,{get:e[n],enumerable:!0})},n0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Lx(e))!Fx.call(t,a)&&a!==n&&r0(t,a,{get:()=>e[a],enumerable:!(r=Px(e,a))||r.enumerable});return t},Ix=(t,e,n)=>(n0(t,e,"default"),n&&n0(n,e,"default")),P4=(t,e,n)=>(n=t!=null?kx(_x(t)):{},n0(e||!t||!t.__esModule?r0(n,"default",{value:t,enumerable:!0}):n,t)),L4=Mx((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(m){if(g[m])return g[m].exports;var f=g[m]={i:m,l:!1,exports:{}};return c[m].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var g={};return p.m=c,p.c=g,p.i=function(m){return m},p.d=function(m,f,T){p.o(m,f)||Object.defineProperty(m,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(m){var f=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(f,"a",f),f},p.o=function(m,f){return Object.prototype.hasOwnProperty.call(m,f)},p.p="",p(p.s=0)}([function(c,p,g){function m(j,W){var V={};for(var se in j)W.indexOf(se)>=0||Object.prototype.hasOwnProperty.call(j,se)&&(V[se]=j[se]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+se+"
",be.onclick=function(){return F(ae,Y)},be.listener=function(ie){(k(ie)||v(ie))&&N()},I(be,Y),Z&&Z<1&&(Z=1),!ge&&Z&&M(Z).then(function(){return F(ae,Y)})},A=p.force=function(j,W){var V=j.type,se=V===void 0?5:V,X=j.text,Z=j.buttonText,ue=Z===void 0?"OK":Z,ge=j.callback,te=j.position,Y=te===void 0?h.positions.force||Y.top:te;B(),N();var be=document.createElement("div"),ae=S();be.id=ae;var ie=document.createElement("div");ie.classList.add(h.classes.textbox),ie.classList.add(h.classes.backgroundInfo),ie.innerHTML='
'+X+"
";var Ee=document.createElement("div");Ee.classList.add(h.classes.button),Ee.classList.add(y[se]),Ee.innerHTML=ue,Ee.onclick=function(){F(ae,Y),U(),ge?ge():W&&W()},be.appendChild(ie),be.appendChild(Ee),be.listener=function(ze){k(ze)&&Ee.click()},I(be,Y),L()},E=p.confirm=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Yes":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,be=j.position,ae=be===void 0?h.positions.confirm||ae.top:be;B(),N();var ie=document.createElement("div"),Ee=S();ie.id=Ee;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+se+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=Z,_e.onclick=function(){F(Ee,ae),U(),te?te():W&&W()};var ce=document.createElement("div");ce.classList.add(h.classes.button),ce.classList.add(h.classes.elementHalf),ce.classList.add(h.classes.backgroundError),ce.innerHTML=ge,ce.onclick=function(){F(Ee,ae),U(),Y?Y():V&&V()},ie.appendChild(ze),ie.appendChild(_e),ie.appendChild(ce),ie.listener=function(pt){k(pt)?_e.click():v(pt)&&ce.click()},I(ie,ae),L(ie,ae)},P=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Submit":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,be=j.position,ae=be===void 0?h.positions.input||ae.top:be,ie=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);B(),N();var Ee=document.createElement("div"),ze=S();Ee.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+se+"
";var ce=document.createElement("input");ce.classList.add(h.classes.inputField),ce.setAttribute("autocapitalize",ie.autocapitalize||"none"),ce.setAttribute("autocomplete",ie.autocomplete||"off"),ce.setAttribute("autocorrect",ie.autocorrect||"off"),ce.setAttribute("autofocus",ie.autofocus||"true"),ce.setAttribute("inputmode",ie.inputmode||"verbatim"),ce.setAttribute("max",ie.max||""),ce.setAttribute("maxlength",ie.maxlength||""),ce.setAttribute("min",ie.min||""),ce.setAttribute("minlength",ie.minlength||""),ce.setAttribute("placeholder",ie.placeholder||""),ce.setAttribute("spellcheck",ie.spellcheck||"default"),ce.setAttribute("step",ie.step||"any"),ce.setAttribute("type",ie.type||"text"),ce.value=ie.value||"",ie.allowed&&(ce.oninput=function(){var ht=void 0;if(Array.isArray(ie.allowed)){for(var St="",on=ie.allowed,Mn=0;Mn'+V+"",Y.appendChild(ae),ue.forEach(function(Ee,ze){var _e=Ee.type,ce=_e===void 0?1:_e,pt=Ee.text,Pt=Ee.handler,ht=document.createElement("div");ht.classList.add(y[ce]),ht.classList.add(h.classes.button),ht.classList.add(h.classes.selectChoice);var St=ue[ze+1];St&&!St.type&&(St.type=1),St&&St.type===ce&&ht.classList.add(h.classes.selectChoiceRepeated),ht.innerHTML=pt,ht.onclick=function(){F(be,te),U(),Pt()},Y.appendChild(ht)});var ie=document.createElement("div");ie.classList.add(h.classes.backgroundNeutral),ie.classList.add(h.classes.button),ie.innerHTML=X,ie.onclick=function(){F(be,te),U(),Z?Z():W&&W()},Y.appendChild(ie),Y.listener=function(Ee){v(Ee)&&ie.click()},I(Y,te),L(Y,te)},H=p.date=function(j,W,V){var se=j.value,X=se===void 0?new Date:se,Z=j.submitText,ue=Z===void 0?"OK":Z,ge=j.cancelText,te=ge===void 0?"Cancel":ge,Y=j.submitCallback,be=j.cancelCallback,ae=j.position,ie=ae===void 0?h.positions.date||ie.top:ae;B(),N();var Ee="▾",ze=document.createElement("div"),_e=document.createElement("div"),ce=document.createElement("div"),pt=function(gt){ze.innerHTML=h.dateMonths[gt.getMonth()],_e.innerHTML=gt.getDate(),ce.innerHTML=gt.getFullYear()},Pt=function(gt){var Qe=new Date(X.getFullYear(),X.getMonth()+1,0).getDate(),Cn=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Cn)>Qe&&(Cn=Qe.toString()),gt.target.textContent=Cn,Number(Cn)<1&&(Cn="1"),X.setDate(Number(Cn))},ht=function(gt){var Qe=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);gt.target.textContent=Qe,X.setFullYear(Number(Qe))},St=function(gt){pt(X)},on=function(gt){var Qe=new Date(X.getFullYear(),X.getMonth()+gt+1,0).getDate();X.getDate()>Qe&&X.setDate(Qe),X.setMonth(X.getMonth()+gt),pt(X)},Mn=function(gt){X.setDate(X.getDate()+gt),pt(X)},Do=function(gt){var Qe=X.getFullYear()+gt;Qe<0?X.setFullYear(0):X.setFullYear(X.getFullYear()+gt),pt(X)},sr=document.createElement("div"),Fa=S();sr.id=Fa;var pi=document.createElement("div");pi.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=Ee;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=Ee;var En=document.createElement("div");En.classList.add(h.classes.button),En.classList.add(h.classes.elementThird),En.classList.add(h.classes.dateSelectorUp),En.innerHTML=Ee,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[X.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",St),_e.innerHTML=X.getDate(),ce.classList.add(h.classes.element),ce.classList.add(h.classes.elementThird),ce.setAttribute("contentEditable",!0),ce.addEventListener("input",ht),ce.addEventListener("blur",St),ce.innerHTML=X.getFullYear();var vr=document.createElement("div");vr.classList.add(h.classes.button),vr.classList.add(h.classes.elementThird),vr.innerHTML=Ee;var Sr=document.createElement("div");Sr.classList.add(h.classes.button),Sr.classList.add(h.classes.elementThird),Sr.innerHTML=Ee;var Ma=document.createElement("div");Ma.classList.add(h.classes.button),Ma.classList.add(h.classes.elementThird),Ma.innerHTML=Ee,Hn.onclick=function(){return on(1)},Yt.onclick=function(){return Mn(1)},En.onclick=function(){return Do(1)},vr.onclick=function(){return on(-1)},Sr.onclick=function(){return Mn(-1)},Ma.onclick=function(){return Do(-1)};var sn=document.createElement("div");sn.classList.add(h.classes.button),sn.classList.add(h.classes.elementHalf),sn.classList.add(h.classes.backgroundSuccess),sn.innerHTML=ue,sn.onclick=function(){F(Fa,ie),U(),Y?Y(X):W&&W(X)};var xr=document.createElement("div");xr.classList.add(h.classes.button),xr.classList.add(h.classes.elementHalf),xr.classList.add(h.classes.backgroundError),xr.innerHTML=te,xr.onclick=function(){F(Fa,ie),U(),be?be(X):V&&V(X)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(En),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(ce),$t.appendChild(vr),$t.appendChild(Sr),$t.appendChild(Ma),pi.appendChild($t),sr.appendChild(pi),sr.appendChild(sn),sr.appendChild(xr),sr.listener=function(gt){k(gt)?sn.click():v(gt)&&xr.click()},I(sr,ie),L(sr,ie)};p.default={alert:q,force:A,confirm:E,input:P,select:O,date:H,setOptions:C,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),_4={};Bx(_4,{default:()=>Ru});var Rx=P4(L4());Ix(_4,P4(L4()));var{default:k4,...Ox}=Rx,Ru=k4!==void 0?k4:Ox;d();d();var Ou=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function qo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function a0(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function F4(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;ixi[t.toLowerCase()]||$n[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),zx=t=>Object.keys(xi).find(e=>xi[e]===t),Nx=t=>Object.keys($n).find(e=>$n[e]===t);function z4(t){R4=t||"all"}function jo(){return R4||"all"}function Ux(){return tt.slice(0)}function qx(){return tt.map(t=>zx(t)||Nx(t)||String.fromCharCode(t))}function jx(){let t=[];return Object.keys(mt).forEach(e=>{mt[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Ho(o))})})}),t}function Hx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function Wx(t){return typeof t=="string"&&(t=Ho(t)),tt.indexOf(t)!==-1}function Kx(t,e){let n,r;t||(t=jo());for(let a in mt)if(Object.prototype.hasOwnProperty.call(mt,a))for(n=mt[a],r=0;r=0&&tt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&tt.splice(0,tt.length),(e===93||e===224)&&(e=91),e in Nt){Nt[e]=!1;for(let r in $n)$n[r]===e&&(_r[r]=!1)}}function N4(t,...e){if(typeof t>"u")Object.keys(mt).forEach(n=>delete mt[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&o0(n)});else if(typeof t=="object")t.key&&o0(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),o0({key:t,scope:n,method:r,splitKey:"+"})}}var o0=({key:t,scope:e,method:n,splitKey:r="+"})=>{i0(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Ho(u);if(!mt[l])return;e||(e=jo());let c=s>1?a0($n,o):[];mt[l]=mt[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&F4(p.mods,c)))})};function B4(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Nt)Object.prototype.hasOwnProperty.call(Nt,i)&&(!Nt[i]&&e.mods.indexOf(+i)>-1||Nt[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Nt[16]&&!Nt[18]&&!Nt[17]&&!Nt[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(tt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function I4(t,e){let n=mt["*"],r=t.keyCode||t.which||t.charCode;if(!_r.filter.call(this,t))return;if((r===93||r===224)&&(r=91),tt.indexOf(r)===-1&&r!==229&&tt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=zu[i];t[i]&&tt.indexOf(o)===-1?tt.push(o):!t[i]&&tt.indexOf(o)>-1?tt.splice(tt.indexOf(o),1):i==="metaKey"&&t[i]&&tt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(tt=tt.slice(tt.indexOf(o))))}),r in Nt){Nt[r]=!0;for(let i in $n)$n[i]===r&&(_r[i]=!0);if(!n)return}for(let i in Nt)Object.prototype.hasOwnProperty.call(Nt,i)&&(Nt[i]=t[zu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(tt.indexOf(17)===-1&&tt.push(17),tt.indexOf(18)===-1&&tt.push(18),Nt[17]=!0,Nt[18]=!0);let a=jo();if(n)for(let i=0;i-1}function _r(t,e,n){tt=[];let r=i0(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,g=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(g=!0)),typeof e=="string"&&(i=e),g&&N4(t,i);s1&&(a=a0($n,t)),t=t[t.length-1],t=t==="*"?"*":Ho(t),t in mt||(mt[t]=[]),mt[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!Vx(o)&&window&&(O4.push(o),qo(o,"keydown",m=>{I4(m,o)},p),M4||(M4=!0,qo(window,"focus",()=>{tt=[]},p),qo(window,"click",()=>{tt=[]},!1)),qo(o,"keyup",m=>{I4(m,o),Gx(m)},p))}function $x(t,e="all"){Object.keys(mt).forEach(n=>{mt[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var s0={getPressedKeyString:qx,setScope:z4,getScope:jo,deleteScope:Kx,getPressedKeyCodes:Ux,getAllKeyCodes:jx,isPressed:Wx,filter:Hx,trigger:$x,unbind:N4,keyMap:xi,modifier:$n,modifierMap:zu};for(let t in s0)Object.prototype.hasOwnProperty.call(s0,t)&&(_r[t]=s0[t]);if(typeof window<"u"){let t=window.hotkeys;_r.noConflict=e=>(e&&window.hotkeys===_r&&(window.hotkeys=t),_r),window.hotkeys=_r}var yn=_r;d();d();var Yx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},q4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},cn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Jr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return Yx[t]}static getBrowserTypeByAlias(t){return q4[t]||""}},nt=/version\/(\d+(\.?_?\d+)+)/i,Qx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(nt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(nt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],Zx=Qx,Jx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:cn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:cn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:cn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:cn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:cn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:cn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:cn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:cn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:cn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:cn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:cn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:cn.Linux}}},{test:[/CrOS/],describe(){return{name:cn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:cn.PlayStation4,version:e}}}],Xx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],eE=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Jr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Jr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Jr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Jr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Jr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Jr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],tE=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(Zx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Jx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(Xx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(eE,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},U4=tE,nE=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new U4(t,e)}static parse(t){return new U4(t).getResult()}static get BROWSER_MAP(){return q4}static get ENGINE_MAP(){return Jr}static get OS_MAP(){return cn}static get PLATFORMS_MAP(){return Ct}},Ei=nE;d();d();var{entries:Y4,setPrototypeOf:j4,isFrozen:rE,getPrototypeOf:aE,getOwnPropertyDescriptor:iE}=Object,{freeze:dn,seal:Qn,create:oE}=Object,{apply:g0,construct:m0}=typeof Reflect<"u"&&Reflect;g0||(g0=function(t,e,n){return t.apply(e,n)});dn||(dn=function(t){return t});Qn||(Qn=function(t){return t});m0||(m0=function(t,e){return new t(...e)});var sE=Rn(Array.prototype.forEach),H4=Rn(Array.prototype.pop),Wo=Rn(Array.prototype.push),qu=Rn(String.prototype.toLowerCase),u0=Rn(String.prototype.toString),uE=Rn(String.prototype.match),Yn=Rn(String.prototype.replace),lE=Rn(String.prototype.indexOf),cE=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),Ko=dE(TypeError);function Rn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),hE=Qn(/\${[\w\W]*}/gm),bE=Qn(/^data-[\-\w.\u00B7-\uFFFF]/),TE=Qn(/^aria-[\-\w]+$/),Q4=Qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yE=Qn(/^(?:\w+script|data):/i),vE=Qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z4=Qn(/^html$/i),$4=Object.freeze({__proto__:null,MUSTACHE_EXPR:mE,ERB_EXPR:fE,TMPLIT_EXPR:hE,DATA_ATTR:bE,ARIA_ATTR:TE,IS_ALLOWED_URI:Q4,IS_SCRIPT_OR_DATA:yE,ATTR_WHITESPACE:vE,DOCTYPE_NAME:Z4}),SE=()=>typeof window>"u"?null:window,xE=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function J4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SE(),e=R=>J4(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:m}=t,f=u.prototype,T=Nu(f,"cloneNode"),b=Nu(f,"nextSibling"),h=Nu(f,"childNodes"),C=Nu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:B,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:_}=a,{importNode:k}=n,v={};e.isSupported=typeof Y4=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:I,ERB_EXPR:F,TMPLIT_EXPR:L,DATA_ATTR:U,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:A}=$4,{IS_ALLOWED_URI:E}=$4,P=null,O=Oe({},[...W4,...l0,...c0,...d0,...K4]),H=null,j=Oe({},[...G4,...p0,...V4,...Uu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,se=null,X=!0,Z=!0,ue=!1,ge=!0,te=!1,Y=!1,be=!1,ae=!1,ie=!1,Ee=!1,ze=!1,_e=!0,ce=!1,pt="user-content-",Pt=!0,ht=!1,St={},on=null,Mn=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Do=null,sr=Oe({},["audio","video","img","source","image","track"]),Fa=null,pi=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",En=Yt,vr=!1,Sr=null,Ma=Oe({},[$t,Hn,Yt],u0),sn,xr=["application/xhtml+xml","text/html"],gt="text/html",Qe,Cn=null,V9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},cd=function(R){if(!(Cn&&Cn===R)){if((!R||typeof R!="object")&&(R={}),R=Ci(R),sn=xr.indexOf(R.PARSER_MEDIA_TYPE)===-1?sn=gt:sn=R.PARSER_MEDIA_TYPE,Qe=sn==="application/xhtml+xml"?u0:qu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Qe):O,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Qe):j,Sr="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,u0):Ma,Fa="ADD_URI_SAFE_ATTR"in R?Oe(Ci(pi),R.ADD_URI_SAFE_ATTR,Qe):pi,Do="ADD_DATA_URI_TAGS"in R?Oe(Ci(sr),R.ADD_DATA_URI_TAGS,Qe):sr,on="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Qe):Mn,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Qe):{},se="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Qe):{},St="USE_PROFILES"in R?R.USE_PROFILES:!1,X=R.ALLOW_ARIA_ATTR!==!1,Z=R.ALLOW_DATA_ATTR!==!1,ue=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,ie=R.RETURN_DOM||!1,Ee=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ae=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,ce=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,ht=R.IN_PLACE||!1,E=R.ALLOWED_URI_REGEXP||Q4,En=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Z=!1),Ee&&(ie=!0),St&&(P=Oe({},[...K4]),H=[],St.html===!0&&(Oe(P,W4),Oe(H,G4)),St.svg===!0&&(Oe(P,l0),Oe(H,p0),Oe(H,Uu)),St.svgFilters===!0&&(Oe(P,c0),Oe(H,p0),Oe(H,Uu)),St.mathMl===!0&&(Oe(P,d0),Oe(H,V4),Oe(H,Uu))),R.ADD_TAGS&&(P===O&&(P=Ci(P)),Oe(P,R.ADD_TAGS,Qe)),R.ADD_ATTR&&(H===j&&(H=Ci(H)),Oe(H,R.ADD_ATTR,Qe)),R.ADD_URI_SAFE_ATTR&&Oe(Fa,R.ADD_URI_SAFE_ATTR,Qe),R.FORBID_CONTENTS&&(on===Mn&&(on=Ci(on)),Oe(on,R.FORBID_CONTENTS,Qe)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ko('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=xE(m,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));dn&&dn(R),Cn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),$9=Oe({},["title","style","font","a","script"]),Xs=Oe({},l0);Oe(Xs,c0),Oe(Xs,pE);let dd=Oe({},d0);Oe(dd,gE);let Y9=function(R){let le=C(R);(!le||!le.tagName)&&(le={namespaceURI:En,tagName:"template"});let J=qu(R.tagName),Ge=qu(le.tagName);return Sr[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?J==="svg":le.namespaceURI===$t?J==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Xs[J]:R.namespaceURI===$t?le.namespaceURI===Yt?J==="math":le.namespaceURI===Hn?J==="math"&&lf[Ge]:!!dd[J]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!dd[J]&&($9[J]||!Xs[J]):!!(sn==="application/xhtml+xml"&&Sr[R.namespaceURI]):!1},gi=function(R){Wo(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},pd=function(R,le){try{Wo(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Wo(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(ie||Ee)try{gi(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,J;if(ae)R=""+R;else{let un=uE(R,/^[\r\n\t ]+/);J=un&&un[0]}sn==="application/xhtml+xml"&&En===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(En===Yt)try{le=new g().parseFromString(Ge,sn)}catch{}if(!le||!le.documentElement){le=B.createDocument(En,"template",null);try{le.documentElement.innerHTML=vr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&J&&Lt.insertBefore(a.createTextNode(J),Lt.childNodes[0]||null),En===Yt?_.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Q9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},eu=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},Er=function(R,le,J){v[R]&&sE(v[R],Ge=>{Ge.call(e,le,J,Cn)})},pf=function(R){let le;if(Er("beforeSanitizeElements",R,null),Q9(R))return gi(R),!0;let J=Qe(R.nodeName);if(Er("uponSanitizeElement",R,{tagName:J,allowedTags:P}),R.hasChildNodes()&&!eu(R.firstElementChild)&&(!eu(R.content)||!eu(R.content.firstElementChild))&&Dn(/<[/\w]/g,R.innerHTML)&&Dn(/<[/\w]/g,R.textContent))return gi(R),!0;if(!P[J]||V[J]){if(!V[J]&&mf(J)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J)))return!1;if(Pt&&!on[J]){let Ge=C(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let un=Lt.length;for(let bn=un-1;bn>=0;--bn)Ge.insertBefore(T(Lt[bn],!0),b(R))}}return gi(R),!0}return R instanceof u&&!Y9(R)||(J==="noscript"||J==="noembed")&&Dn(/<\/no(script|embed)/i,R.innerHTML)?(gi(R),!0):(te&&R.nodeType===3&&(le=R.textContent,le=Yn(le,I," "),le=Yn(le,F," "),le=Yn(le,L," "),R.textContent!==le&&(Wo(e.removed,{element:R.cloneNode()}),R.textContent=le)),Er("afterSanitizeElements",R,null),!1)},gf=function(R,le,J){if(_e&&(le==="id"||le==="name")&&(J in a||J in V9))return!1;if(!(Z&&!se[le]&&Dn(U,le))&&!(X&&Dn(N,le))){if(!H[le]||se[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J))))return!1}else if(!Fa[le]&&!Dn(E,Yn(J,A,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&lE(J,"data:")===0&&Do[R])&&!(ue&&!Dn(q,Yn(J,A,"")))&&J)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,J,Ge,Lt;Er("beforeSanitizeAttributes",R,null);let{attributes:un}=R;if(!un)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=un.length;Lt--;){le=un[Lt];let{name:It,namespaceURI:mi}=le;if(J=It==="value"?le.value:cE(le.value),Ge=Qe(It),bn.attrName=Ge,bn.attrValue=J,bn.keepAttr=!0,bn.forceKeepAttr=void 0,Er("uponSanitizeAttribute",R,bn),J=bn.attrValue,bn.forceKeepAttr||(pd(It,R),!bn.keepAttr))continue;if(!ge&&Dn(/\/>/i,J)){pd(It,R);continue}te&&(J=Yn(J,I," "),J=Yn(J,F," "),J=Yn(J,L," "));let hf=Qe(R.nodeName);if(gf(hf,Ge,J)){if(ce&&(Ge==="id"||Ge==="name")&&(pd(It,R),J=pt+J),D&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!mi)switch(m.getAttributeType(hf,Ge)){case"TrustedHTML":{J=D.createHTML(J);break}case"TrustedScriptURL":{J=D.createScriptURL(J);break}}try{mi?R.setAttributeNS(mi,It,J):R.setAttribute(It,J),H4(e.removed)}catch{}}}Er("afterSanitizeAttributes",R,null)},Z9=function R(le){let J,Ge=df(le);for(Er("beforeSanitizeShadowDOM",le,null);J=Ge.nextNode();)Er("uponSanitizeShadowNode",J,null),!pf(J)&&(J.content instanceof i&&R(J.content),ff(J));Er("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J,Ge,Lt,un;if(vr=!R,vr&&(R=""),typeof R!="string"&&!eu(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Ko("dirty is not a string, aborting")}else throw Ko("toString is not a function");if(!e.isSupported)return R;if(be||cd(le),e.removed=[],typeof R=="string"&&(ht=!1),ht){if(R.nodeName){let mi=Qe(R.nodeName);if(!P[mi]||V[mi])throw Ko("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)J=cf(""),Ge=J.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?J=Ge:J.appendChild(Ge);else{if(!ie&&!te&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(J=cf(R),!J)return ie?null:ze?M:""}J&&ae&&gi(J.firstChild);let bn=df(ht?R:J);for(;Lt=bn.nextNode();)pf(Lt)||(Lt.content instanceof i&&Z9(Lt.content),ff(Lt));if(ht)return R;if(ie){if(Ee)for(un=y.call(J.ownerDocument);J.firstChild;)un.appendChild(J.firstChild);else un=J;return(H.shadowroot||H.shadowrootmod)&&(un=k.call(n,un,!0)),un}let It=Y?J.outerHTML:J.innerHTML;return Y&&P["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Dn(Z4,J.ownerDocument.doctype.name)&&(It=" -`+It),te&&(It=Yn(It,I," "),It=Yn(It,F," "),It=Yn(It,L," ")),D&&ze?D.createHTML(It):It},e.setConfig=function(R){cd(R),be=!0},e.clearConfig=function(){Cn=null,be=!1},e.isValidAttribute=function(R,le,J){Cn||cd({});let Ge=Qe(R),Lt=Qe(le);return gf(Ge,Lt,J)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Wo(v[R],le))},e.removeHook=function(R){if(v[R])return H4(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var rt=J4();d();d();var EE=Object.create,h0=Object.defineProperty,CE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,DE=Object.getPrototypeOf,AE=Object.prototype.hasOwnProperty,b0=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kE=(t,e)=>{for(var n in e)h0(t,n,{get:e[n],enumerable:!0})},f0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of wE(e))!AE.call(t,a)&&a!==n&&h0(t,a,{get:()=>e[a],enumerable:!(r=CE(e,a))||r.enumerable});return t},PE=(t,e,n)=>(f0(t,e,"default"),n&&f0(n,e,"default")),eb=(t,e,n)=>(n=t!=null?EE(DE(t)):{},f0(e||!t||!t.__esModule?h0(n,"default",{value:t,enumerable:!0}):n,t)),LE=b0((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),g){var m=g.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!o||g!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ae=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ae&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ae=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,g=l.firstChild;g;){var m=g.nextSibling;if(this._isPhrasingContent(g))p!==null?p.appendChild(g):this._isWhitespace(g)||(p=a.createElement("p"),l.replaceChild(p,g),p.appendChild(g));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}g=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(ie){if(!(!ie.parentNode||typeof ie.parentNode.tagName>"u")){var Ee=this._getInnerText(ie);if(!(Ee.length<25)){var ze=this._getNodeAncestors(ie,5);if(ze.length!==0){var _e=0;_e+=1,_e+=Ee.split(",").length,_e+=Math.min(Math.floor(Ee.length/100),3),this._forEachNode(ze,function(ce,pt){if(!(!ce.tagName||!ce.parentNode||typeof ce.parentNode.tagName>"u")){if(typeof ce.readability>"u"&&(this._initializeNode(ce),T.push(ce)),pt===0)var Pt=1;else pt===1?Pt=2:Pt=pt*3;ce.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,C=T.length;hS.readability.contentScore){b.splice(B,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,_=!1,k;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),_=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],I=1;I=.75&&v.push(this._getNodeAncestors(b[I]));var F=3;if(v.length>=F)for(k=y.parentNode;k.tagName!=="BODY";){for(var L=0,U=0;U=F){y=k;break}k=k.parentNode}y.readability||this._initializeNode(y),k=y.parentNode;for(var N=y.readability.contentScore,q=N/3;k.tagName!=="BODY";){if(!k.readability){k=k.parentNode;continue}var A=k.readability.contentScore;if(AN){y=k;break}N=k.readability.contentScore,k=k.parentNode}for(k=y.parentNode;k.tagName!="BODY"&&k.children.length==1;)y=k,k=y.parentNode;y.readability||this._initializeNode(y)}var E=a.createElement("DIV");i&&(E.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);k=y.parentNode;for(var O=k.children,H=0,j=O.length;H=P)V=!0;else if(W.nodeName==="P"){var X=this._getLinkDensity(W),Z=this._getInnerText(W),ue=Z.length;(ue>80&&X<.25||ue<80&&ue>0&&X===0&&Z.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),E.appendChild(W),O=k.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+E.innerHTML),this._prepArticle(E),this._debug&&this.log("Article content post-prep: "+E.innerHTML),_)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";E.firstChild;)ge.appendChild(E.firstChild);E.appendChild(ge)}this._debug&&this.log("Article content after paging: "+E.innerHTML);var te=!0,Y=this._getInnerText(E,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),g=l.getAttribute("content");if(g){var m=null,f=null;p&&(m=p.match(s),m&&(f=m[0].toLowerCase().replace(/\s/g,""),i[f]=g.trim())),!m&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=g.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],g=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(g)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(k){return k._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,k=>u+=this._getInnerText(k).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var g=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&g/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>g||T>Math.floor(g/3)||!s&&b<.9&&S<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&B>.2||c>=25&&B>.5||h===1&&S<75||h>1;if(s&&y){for(var _=0;_1)return y;let k=i.getElementsByTagName("li").length;if(m==k)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),_E=b0((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(g){if(!o.visibilityChecker(g))return!1;var m=g.className+" "+g.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),tb=b0((t,e)=>{var n=LE(),r=_E();e.exports={Readability:n,isProbablyReaderable:r}}),nb={};kE(nb,{Readability:()=>ju,default:()=>ib,isProbablyReaderable:()=>ab});var rb=eb(tb());PE(nb,eb(tb()));var{Readability:ju,isProbablyReaderable:ab}=rb,{default:X4,...FE}=rb,ib=X4!==void 0?X4:FE;var $a={};tu($a,{Breadcrumbs:()=>ta,BrowserClient:()=>Mi,Dedupe:()=>ia,FunctionToString:()=>Ka,GlobalHandlers:()=>fr,HttpContext:()=>aa,Hub:()=>Or,InboundFilters:()=>Ga,Integrations:()=>pw,LinkedErrors:()=>ra,SDK_VERSION:()=>Fi,Scope:()=>On,TryCatch:()=>na,addBreadcrumb:()=>el,addGlobalEventProcessor:()=>mr,captureEvent:()=>Ju,captureException:()=>Li,captureMessage:()=>Zu,chromeStackLineParser:()=>Y0,close:()=>b3,configureScope:()=>Xu,createTransport:()=>as,defaultIntegrations:()=>np,defaultStackLineParsers:()=>J0,defaultStackParser:()=>pl,flush:()=>h3,forceLoad:()=>m3,geckoStackLineParser:()=>Q0,getCurrentHub:()=>Le,getHubFromCarrier:()=>zn,init:()=>d3,lastEventId:()=>g3,makeFetchTransport:()=>is,makeMain:()=>Pi,onLoad:()=>f3,opera10StackLineParser:()=>Zb,opera11StackLineParser:()=>Jb,setContext:()=>tl,setExtra:()=>rl,setExtras:()=>nl,setTag:()=>il,setTags:()=>al,setUser:()=>ol,showReportDialog:()=>p3,startTransaction:()=>sl,winjsStackLineParser:()=>Z0,withScope:()=>_i,wrap:()=>T3});d();d();d();d();d();d();d();d();d();var ob=Object.prototype.toString;function Hu(t){switch(ob.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return dr(t,Error)}}function Go(t,e){return ob.call(t)===`[object ${e}]`}function Wu(t){return Go(t,"ErrorEvent")}function sb(t){return Go(t,"DOMException")}function Fr(t){return Go(t,"String")}function Vo(t){return t===null||typeof t!="object"&&typeof t!="function"}function Zn(t){return Go(t,"Object")}function $o(t){return typeof Event<"u"&&dr(t,Event)}function ub(t){return!1}function lb(t){return Go(t,"RegExp")}function wi(t){return!!(t&&t.then&&typeof t.then=="function")}function cb(t){return Zn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function db(t){return typeof t=="number"&&t!==t}function dr(t,e){try{return t instanceof e}catch{return!1}}function Yo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function ME(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Fr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return gb({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function gb(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function OE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!IE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function Ku(t){let e=typeof t=="string"?RE(t):gb(t);return OE(e),e}d();var zE={};function at(){return typeof window<"u"?window:typeof self<"u"?self:zE}function Di(t,e,n){let r=n||at(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var Qo=["debug","info","warn","error","log","assert","trace"];function T0(t){if(!("console"in at()))return t();let n=console,r={};Qo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function mb(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?Qo.forEach(n=>{e[n]=(...r)=>{t&&T0(()=>{})}}):Qo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=Di("logger",mb):Se=mb();d();d();function ja(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function y0(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function x0(t){if(Hu(t))return{message:t.message,name:t.name,stack:t.stack,...hb(t)};if($o(t)){let e={type:t.type,target:fb(t.target),currentTarget:fb(t.currentTarget),...hb(t)};return typeof CustomEvent<"u"&&dr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function fb(t){try{return ub(t)?Yo(t):Object.prototype.toString.call(t)}catch{return""}}function hb(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Tb(t,e=40){let n=Object.keys(x0(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return ja(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:ja(a,e)}return""}function Ha(t){return v0(t,new Map)}function v0(t,e){if(Zn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=v0(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(v0(a,e))}),r}return t}d();var NE=50;function C0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` -`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return UE(a)}}function yb(t){return Array.isArray(t)?C0(...t):t}function UE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,NE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var E0="";function Xn(t){try{return!t||typeof t!="function"?E0:t.name||E0}catch{return E0}}d();function vb(){if(!("fetch"in at()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sb(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xb(){return!0}var Mr=at(),Jo={},Eb={};function qE(t){if(!Eb[t])switch(Eb[t]=!0,t){case"console":jE();break;case"fetch":HE();break;case"error":GE();break;case"unhandledrejection":VE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function er(t,e){Jo[t]=Jo[t]||[],Jo[t].push(e),qE(t)}function ki(t,e){if(!(!t||!Jo[t]))for(let n of Jo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. +`+T+"]"}return r.pop(),a=T,h}},ix={parse:JS,stringify:ax},ox=ix,Mu=ox;d();d();var V_=Number.isNaN||function(t){return typeof t=="number"&&t!==t};d();d();var Bu=globalThis||(typeof window<"u"?window:self),ux=Object.create,Jd=Object.defineProperty,lx=Object.getOwnPropertyDescriptor,cx=Object.getOwnPropertyNames,dx=Object.getPrototypeOf,px=Object.prototype.hasOwnProperty,gx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mx=(t,e)=>{for(var n in e)Jd(t,n,{get:e[n],enumerable:!0})},Zd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of cx(e))!px.call(t,a)&&a!==n&&Jd(t,a,{get:()=>e[a],enumerable:!(r=lx(e,a))||r.enumerable});return t},fx=(t,e,n)=>(Zd(t,e,"default"),n&&Zd(n,e,"default")),S4=(t,e,n)=>(n=t!=null?ux(dx(t)):{},Zd(e||!t||!t.__esModule?Jd(n,"default",{value:t,enumerable:!0}):n,t)),x4=gx((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Bu=="object"&&Bu&&Bu.Object===Object&&Bu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(_,k,v){var I,F,L,U,N,q,A=0,E=!1,P=!1,O=!0;if(typeof _!="function")throw new TypeError(n);k=y(k)||0,M(v)&&(E=!!v.leading,P="maxWait"in v,L=P?T(y(v.maxWait)||0,k):L,O="trailing"in v?!!v.trailing:O);function H(te){var Y=I,Te=F;return I=F=void 0,A=te,U=_.apply(Te,Y),U}function j(te){return A=te,N=setTimeout(se,k),E?H(te):U}function W(te){var Y=te-q,Te=te-A,ae=k-Y;return P?b(ae,L-Te):ae}function V(te){var Y=te-q,Te=te-A;return q===void 0||Y>=k||Y<0||P&&Te>=L}function se(){var te=h();if(V(te))return X(te);N=setTimeout(se,W(te))}function X(te){return N=void 0,O&&I?H(te):(I=F=void 0,U)}function Z(){N!==void 0&&clearTimeout(N),A=0,I=q=F=N=void 0}function ue(){return N===void 0?U:X(h())}function ge(){var te=h(),Y=V(te);if(I=arguments,F=this,q=te,Y){if(N===void 0)return j(q);if(P)return N=setTimeout(se,k),H(q)}return N===void 0&&(N=setTimeout(se,k)),U}return ge.cancel=Z,ge.flush=ue,ge}function D(_,k,v){var I=!0,F=!0;if(typeof _!="function")throw new TypeError(n);return M(v)&&(I="leading"in v?!!v.leading:I,F="trailing"in v?!!v.trailing:F),C(_,k,{leading:I,maxWait:k,trailing:F})}function M(_){var k=typeof _;return!!_&&(k=="object"||k=="function")}function B(_){return!!_&&typeof _=="object"}function S(_){return typeof _=="symbol"||B(_)&&f.call(_)==a}function y(_){if(typeof _=="number")return _;if(S(_))return r;if(M(_)){var k=typeof _.valueOf=="function"?_.valueOf():_;_=M(k)?k+"":k}if(typeof _!="string")return _===0?_:+_;_=_.replace(i,"");var v=s.test(_);return v||u.test(_)?l(_.slice(2),v?2:8):o.test(_)?r:+_}e.exports=D}),E4={};mx(E4,{default:()=>Vn});var hx=S4(x4());fx(E4,S4(x4()));var{default:v4,...bx}=hx,Vn=v4!==void 0?v4:bx;d();d();var Iu=globalThis||(typeof window<"u"?window:self),Tx=Object.create,e0=Object.defineProperty,yx=Object.getOwnPropertyDescriptor,vx=Object.getOwnPropertyNames,Sx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Ex=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cx=(t,e)=>{for(var n in e)e0(t,n,{get:e[n],enumerable:!0})},Xd=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of vx(e))!xx.call(t,a)&&a!==n&&e0(t,a,{get:()=>e[a],enumerable:!(r=yx(e,a))||r.enumerable});return t},wx=(t,e,n)=>(Xd(t,e,"default"),n&&Xd(n,e,"default")),w4=(t,e,n)=>(n=t!=null?Tx(Sx(t)):{},Xd(e||!t||!t.__esModule?e0(n,"default",{value:t,enumerable:!0}):n,t)),D4=Ex((t,e)=>{var n="Expected a function",r=NaN,a="[object Symbol]",i=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Iu=="object"&&Iu&&Iu.Object===Object&&Iu,p=typeof self=="object"&&self&&self.Object===Object&&self,g=c||p||Function("return this")(),m=Object.prototype,f=m.toString,T=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(y,_,k){var v,I,F,L,U,N,q=0,A=!1,E=!1,P=!0;if(typeof y!="function")throw new TypeError(n);_=S(_)||0,D(k)&&(A=!!k.leading,E="maxWait"in k,F=E?T(S(k.maxWait)||0,_):F,P="trailing"in k?!!k.trailing:P);function O(ge){var te=v,Y=I;return v=I=void 0,q=ge,L=y.apply(Y,te),L}function H(ge){return q=ge,U=setTimeout(V,_),A?O(ge):L}function j(ge){var te=ge-N,Y=ge-q,Te=_-te;return E?b(Te,F-Y):Te}function W(ge){var te=ge-N,Y=ge-q;return N===void 0||te>=_||te<0||E&&Y>=F}function V(){var ge=h();if(W(ge))return se(ge);U=setTimeout(V,j(ge))}function se(ge){return U=void 0,P&&v?O(ge):(v=I=void 0,L)}function X(){U!==void 0&&clearTimeout(U),q=0,v=N=I=U=void 0}function Z(){return U===void 0?L:se(h())}function ue(){var ge=h(),te=W(ge);if(v=arguments,I=this,N=ge,te){if(U===void 0)return H(N);if(E)return U=setTimeout(V,_),O(N)}return U===void 0&&(U=setTimeout(V,_)),L}return ue.cancel=X,ue.flush=Z,ue}function D(y){var _=typeof y;return!!y&&(_=="object"||_=="function")}function M(y){return!!y&&typeof y=="object"}function B(y){return typeof y=="symbol"||M(y)&&f.call(y)==a}function S(y){if(typeof y=="number")return y;if(B(y))return r;if(D(y)){var _=typeof y.valueOf=="function"?y.valueOf():y;y=D(_)?_+"":_}if(typeof y!="string")return y===0?y:+y;y=y.replace(i,"");var k=s.test(y);return k||u.test(y)?l(y.slice(2),k?2:8):o.test(y)?r:+y}e.exports=C}),A4={};Cx(A4,{default:()=>qo});var Dx=w4(D4());wx(A4,w4(D4()));var{default:C4,...Ax}=Dx,qo=C4!==void 0?C4:Ax;d();d();var kx=Object.create,n0=Object.defineProperty,Px=Object.getOwnPropertyDescriptor,Lx=Object.getOwnPropertyNames,_x=Object.getPrototypeOf,Fx=Object.prototype.hasOwnProperty,Mx=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Bx=(t,e)=>{for(var n in e)n0(t,n,{get:e[n],enumerable:!0})},t0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Lx(e))!Fx.call(t,a)&&a!==n&&n0(t,a,{get:()=>e[a],enumerable:!(r=Px(e,a))||r.enumerable});return t},Ix=(t,e,n)=>(t0(t,e,"default"),n&&t0(n,e,"default")),P4=(t,e,n)=>(n=t!=null?kx(_x(t)):{},t0(e||!t||!t.__esModule?n0(n,"default",{value:t,enumerable:!0}):n,t)),L4=Mx((t,e)=>{(function(n,r){typeof t=="object"&&typeof e=="object"?e.exports=r():typeof define=="function"&&define.amd?define([],r):typeof t=="object"?t.notie=r():n.notie=r()})(t,function(){return function(n){function r(i){if(a[i])return a[i].exports;var o=a[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var a={};return r.m=n,r.c=a,r.i=function(i){return i},r.d=function(i,o,s){r.o(i,o)||Object.defineProperty(i,o,{configurable:!1,enumerable:!0,get:s})},r.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return r.d(o,"a",o),o},r.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(i){var o,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,p){l(r)==="object"&&l(i)==="object"?i.exports=p():(s=[],o=p,u=typeof o=="function"?o.apply(r,s):o,u!==void 0&&(i.exports=u))})(void 0,function(){return function(c){function p(m){if(g[m])return g[m].exports;var f=g[m]={i:m,l:!1,exports:{}};return c[m].call(f.exports,f,f.exports,p),f.l=!0,f.exports}var g={};return p.m=c,p.c=g,p.i=function(m){return m},p.d=function(m,f,T){p.o(m,f)||Object.defineProperty(m,f,{configurable:!1,enumerable:!0,get:T})},p.n=function(m){var f=m&&m.__esModule?function(){return m.default}:function(){return m};return p.d(f,"a",f),f},p.o=function(m,f){return Object.prototype.hasOwnProperty.call(m,f)},p.p="",p(p.s=0)}([function(c,p,g){function m(j,W){var V={};for(var se in j)W.indexOf(se)>=0||Object.prototype.hasOwnProperty.call(j,se)&&(V[se]=j[se]);return V}Object.defineProperty(p,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(j){return typeof j>"u"?"undefined":l(j)}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j>"u"?"undefined":l(j)},T=Object.assign||function(j){for(var W=1;W'+se+"",Te.onclick=function(){return F(ae,Y)},Te.listener=function(ie){(k(ie)||v(ie))&&N()},I(Te,Y),Z&&Z<1&&(Z=1),!ge&&Z&&M(Z).then(function(){return F(ae,Y)})},A=p.force=function(j,W){var V=j.type,se=V===void 0?5:V,X=j.text,Z=j.buttonText,ue=Z===void 0?"OK":Z,ge=j.callback,te=j.position,Y=te===void 0?h.positions.force||Y.top:te;B(),N();var Te=document.createElement("div"),ae=S();Te.id=ae;var ie=document.createElement("div");ie.classList.add(h.classes.textbox),ie.classList.add(h.classes.backgroundInfo),ie.innerHTML='
'+X+"
";var Ee=document.createElement("div");Ee.classList.add(h.classes.button),Ee.classList.add(y[se]),Ee.innerHTML=ue,Ee.onclick=function(){F(ae,Y),U(),ge?ge():W&&W()},Te.appendChild(ie),Te.appendChild(Ee),Te.listener=function(ze){k(ze)&&Ee.click()},I(Te,Y),L()},E=p.confirm=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Yes":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,Te=j.position,ae=Te===void 0?h.positions.confirm||ae.top:Te;B(),N();var ie=document.createElement("div"),Ee=S();ie.id=Ee;var ze=document.createElement("div");ze.classList.add(h.classes.textbox),ze.classList.add(h.classes.backgroundInfo),ze.innerHTML='
'+se+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=Z,_e.onclick=function(){F(Ee,ae),U(),te?te():W&&W()};var ce=document.createElement("div");ce.classList.add(h.classes.button),ce.classList.add(h.classes.elementHalf),ce.classList.add(h.classes.backgroundError),ce.innerHTML=ge,ce.onclick=function(){F(Ee,ae),U(),Y?Y():V&&V()},ie.appendChild(ze),ie.appendChild(_e),ie.appendChild(ce),ie.listener=function(pt){k(pt)?_e.click():v(pt)&&ce.click()},I(ie,ae),L(ie,ae)},P=function(j,W,V){var se=j.text,X=j.submitText,Z=X===void 0?"Submit":X,ue=j.cancelText,ge=ue===void 0?"Cancel":ue,te=j.submitCallback,Y=j.cancelCallback,Te=j.position,ae=Te===void 0?h.positions.input||ae.top:Te,ie=m(j,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);B(),N();var Ee=document.createElement("div"),ze=S();Ee.id=ze;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+se+"
";var ce=document.createElement("input");ce.classList.add(h.classes.inputField),ce.setAttribute("autocapitalize",ie.autocapitalize||"none"),ce.setAttribute("autocomplete",ie.autocomplete||"off"),ce.setAttribute("autocorrect",ie.autocorrect||"off"),ce.setAttribute("autofocus",ie.autofocus||"true"),ce.setAttribute("inputmode",ie.inputmode||"verbatim"),ce.setAttribute("max",ie.max||""),ce.setAttribute("maxlength",ie.maxlength||""),ce.setAttribute("min",ie.min||""),ce.setAttribute("minlength",ie.minlength||""),ce.setAttribute("placeholder",ie.placeholder||""),ce.setAttribute("spellcheck",ie.spellcheck||"default"),ce.setAttribute("step",ie.step||"any"),ce.setAttribute("type",ie.type||"text"),ce.value=ie.value||"",ie.allowed&&(ce.oninput=function(){var ht=void 0;if(Array.isArray(ie.allowed)){for(var St="",on=ie.allowed,Mn=0;Mn'+V+"",Y.appendChild(ae),ue.forEach(function(Ee,ze){var _e=Ee.type,ce=_e===void 0?1:_e,pt=Ee.text,Pt=Ee.handler,ht=document.createElement("div");ht.classList.add(y[ce]),ht.classList.add(h.classes.button),ht.classList.add(h.classes.selectChoice);var St=ue[ze+1];St&&!St.type&&(St.type=1),St&&St.type===ce&&ht.classList.add(h.classes.selectChoiceRepeated),ht.innerHTML=pt,ht.onclick=function(){F(Te,te),U(),Pt()},Y.appendChild(ht)});var ie=document.createElement("div");ie.classList.add(h.classes.backgroundNeutral),ie.classList.add(h.classes.button),ie.innerHTML=X,ie.onclick=function(){F(Te,te),U(),Z?Z():W&&W()},Y.appendChild(ie),Y.listener=function(Ee){v(Ee)&&ie.click()},I(Y,te),L(Y,te)},H=p.date=function(j,W,V){var se=j.value,X=se===void 0?new Date:se,Z=j.submitText,ue=Z===void 0?"OK":Z,ge=j.cancelText,te=ge===void 0?"Cancel":ge,Y=j.submitCallback,Te=j.cancelCallback,ae=j.position,ie=ae===void 0?h.positions.date||ie.top:ae;B(),N();var Ee="▾",ze=document.createElement("div"),_e=document.createElement("div"),ce=document.createElement("div"),pt=function(gt){ze.innerHTML=h.dateMonths[gt.getMonth()],_e.innerHTML=gt.getDate(),ce.innerHTML=gt.getFullYear()},Pt=function(gt){var Ze=new Date(X.getFullYear(),X.getMonth()+1,0).getDate(),Cn=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Cn)>Ze&&(Cn=Ze.toString()),gt.target.textContent=Cn,Number(Cn)<1&&(Cn="1"),X.setDate(Number(Cn))},ht=function(gt){var Ze=gt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);gt.target.textContent=Ze,X.setFullYear(Number(Ze))},St=function(gt){pt(X)},on=function(gt){var Ze=new Date(X.getFullYear(),X.getMonth()+gt+1,0).getDate();X.getDate()>Ze&&X.setDate(Ze),X.setMonth(X.getMonth()+gt),pt(X)},Mn=function(gt){X.setDate(X.getDate()+gt),pt(X)},Ao=function(gt){var Ze=X.getFullYear()+gt;Ze<0?X.setFullYear(0):X.setFullYear(X.getFullYear()+gt),pt(X)},sr=document.createElement("div"),Fa=S();sr.id=Fa;var pi=document.createElement("div");pi.classList.add(h.classes.backgroundInfo);var $t=document.createElement("div");$t.classList.add(h.classes.dateSelectorInner);var Hn=document.createElement("div");Hn.classList.add(h.classes.button),Hn.classList.add(h.classes.elementThird),Hn.classList.add(h.classes.dateSelectorUp),Hn.innerHTML=Ee;var Yt=document.createElement("div");Yt.classList.add(h.classes.button),Yt.classList.add(h.classes.elementThird),Yt.classList.add(h.classes.dateSelectorUp),Yt.innerHTML=Ee;var En=document.createElement("div");En.classList.add(h.classes.button),En.classList.add(h.classes.elementThird),En.classList.add(h.classes.dateSelectorUp),En.innerHTML=Ee,ze.classList.add(h.classes.element),ze.classList.add(h.classes.elementThird),ze.innerHTML=h.dateMonths[X.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",Pt),_e.addEventListener("blur",St),_e.innerHTML=X.getDate(),ce.classList.add(h.classes.element),ce.classList.add(h.classes.elementThird),ce.setAttribute("contentEditable",!0),ce.addEventListener("input",ht),ce.addEventListener("blur",St),ce.innerHTML=X.getFullYear();var vr=document.createElement("div");vr.classList.add(h.classes.button),vr.classList.add(h.classes.elementThird),vr.innerHTML=Ee;var Sr=document.createElement("div");Sr.classList.add(h.classes.button),Sr.classList.add(h.classes.elementThird),Sr.innerHTML=Ee;var Ma=document.createElement("div");Ma.classList.add(h.classes.button),Ma.classList.add(h.classes.elementThird),Ma.innerHTML=Ee,Hn.onclick=function(){return on(1)},Yt.onclick=function(){return Mn(1)},En.onclick=function(){return Ao(1)},vr.onclick=function(){return on(-1)},Sr.onclick=function(){return Mn(-1)},Ma.onclick=function(){return Ao(-1)};var sn=document.createElement("div");sn.classList.add(h.classes.button),sn.classList.add(h.classes.elementHalf),sn.classList.add(h.classes.backgroundSuccess),sn.innerHTML=ue,sn.onclick=function(){F(Fa,ie),U(),Y?Y(X):W&&W(X)};var xr=document.createElement("div");xr.classList.add(h.classes.button),xr.classList.add(h.classes.elementHalf),xr.classList.add(h.classes.backgroundError),xr.innerHTML=te,xr.onclick=function(){F(Fa,ie),U(),Te?Te(X):V&&V(X)},$t.appendChild(Hn),$t.appendChild(Yt),$t.appendChild(En),$t.appendChild(ze),$t.appendChild(_e),$t.appendChild(ce),$t.appendChild(vr),$t.appendChild(Sr),$t.appendChild(Ma),pi.appendChild($t),sr.appendChild(pi),sr.appendChild(sn),sr.appendChild(xr),sr.listener=function(gt){k(gt)?sn.click():v(gt)&&xr.click()},I(sr,ie),L(sr,ie)};p.default={alert:q,force:A,confirm:E,input:P,select:O,date:H,setOptions:C,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),_4={};Bx(_4,{default:()=>Ru});var Rx=P4(L4());Ix(_4,P4(L4()));var{default:k4,...Ox}=Rx,Ru=k4!==void 0?k4:Ox;d();d();var Ou=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function jo(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent(`on${e}`,()=>{n(window.event)})}function r0(t,e){let n=e.slice(0,e.length-1);for(let r=0;r=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function F4(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,a=!0;for(let i=0;ixi[t.toLowerCase()]||$n[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),zx=t=>Object.keys(xi).find(e=>xi[e]===t),Nx=t=>Object.keys($n).find(e=>$n[e]===t);function z4(t){R4=t||"all"}function Ho(){return R4||"all"}function Ux(){return nt.slice(0)}function qx(){return nt.map(t=>zx(t)||Nx(t)||String.fromCharCode(t))}function jx(){let t=[];return Object.keys(mt).forEach(e=>{mt[e].forEach(({key:n,scope:r,mods:a,shortcut:i})=>{t.push({scope:r,shortcut:i,mods:a,keys:n.split("+").map(o=>Wo(o))})})}),t}function Hx(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0;return(e.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function Wx(t){return typeof t=="string"&&(t=Wo(t)),nt.indexOf(t)!==-1}function Kx(t,e){let n,r;t||(t=Ho());for(let a in mt)if(Object.prototype.hasOwnProperty.call(mt,a))for(n=mt[a],r=0;r=0&&nt.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&nt.splice(0,nt.length),(e===93||e===224)&&(e=91),e in Ut){Ut[e]=!1;for(let r in $n)$n[r]===e&&(_r[r]=!1)}}function N4(t,...e){if(typeof t>"u")Object.keys(mt).forEach(n=>delete mt[n]);else if(Array.isArray(t))t.forEach(n=>{n.key&&i0(n)});else if(typeof t=="object")t.key&&i0(t);else if(typeof t=="string"){let[n,r]=e;typeof n=="function"&&(r=n,n=""),i0({key:t,scope:n,method:r,splitKey:"+"})}}var i0=({key:t,scope:e,method:n,splitKey:r="+"})=>{a0(t).forEach(i=>{let o=i.split(r),s=o.length,u=o[s-1],l=u==="*"?"*":Wo(u);if(!mt[l])return;e||(e=Ho());let c=s>1?r0($n,o):[];mt[l]=mt[l].filter(p=>!((n?p.method===n:!0)&&p.scope===e&&F4(p.mods,c)))})};function B4(t,e,n,r){if(e.element!==r)return;let a;if(e.scope===n||e.scope==="all"){a=e.mods.length>0;for(let i in Ut)Object.prototype.hasOwnProperty.call(Ut,i)&&(!Ut[i]&&e.mods.indexOf(+i)>-1||Ut[i]&&e.mods.indexOf(+i)===-1)&&(a=!1);(e.mods.length===0&&!Ut[16]&&!Ut[18]&&!Ut[17]&&!Ut[91]||a||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(nt),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function I4(t,e){let n=mt["*"],r=t.keyCode||t.which||t.charCode;if(!_r.filter.call(this,t))return;if((r===93||r===224)&&(r=91),nt.indexOf(r)===-1&&r!==229&&nt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(i=>{let o=zu[i];t[i]&&nt.indexOf(o)===-1?nt.push(o):!t[i]&&nt.indexOf(o)>-1?nt.splice(nt.indexOf(o),1):i==="metaKey"&&t[i]&&nt.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(nt=nt.slice(nt.indexOf(o))))}),r in Ut){Ut[r]=!0;for(let i in $n)$n[i]===r&&(_r[i]=!0);if(!n)return}for(let i in Ut)Object.prototype.hasOwnProperty.call(Ut,i)&&(Ut[i]=t[zu[i]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(nt.indexOf(17)===-1&&nt.push(17),nt.indexOf(18)===-1&&nt.push(18),Ut[17]=!0,Ut[18]=!0);let a=Ho();if(n)for(let i=0;i-1}function _r(t,e,n){nt=[];let r=a0(t),a=[],i="all",o=document,s=0,u=!1,l=!0,c="+",p=!1,g=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(i=e.scope),e.element&&(o=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(l=e.keydown),e.capture!==void 0&&(p=e.capture),typeof e.splitKey=="string"&&(c=e.splitKey),e.single===!0&&(g=!0)),typeof e=="string"&&(i=e),g&&N4(t,i);s1&&(a=r0($n,t)),t=t[t.length-1],t=t==="*"?"*":Wo(t),t in mt||(mt[t]=[]),mt[t].push({keyup:u,keydown:l,scope:i,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:o});typeof o<"u"&&!Vx(o)&&window&&(O4.push(o),jo(o,"keydown",m=>{I4(m,o)},p),M4||(M4=!0,jo(window,"focus",()=>{nt=[]},p),jo(window,"click",()=>{nt=[]},!1)),jo(o,"keyup",m=>{I4(m,o),Gx(m)},p))}function $x(t,e="all"){Object.keys(mt).forEach(n=>{mt[n].filter(a=>a.scope===e&&a.shortcut===t).forEach(a=>{a&&a.method&&a.method()})})}var o0={getPressedKeyString:qx,setScope:z4,getScope:Ho,deleteScope:Kx,getPressedKeyCodes:Ux,getAllKeyCodes:jx,isPressed:Wx,filter:Hx,trigger:$x,unbind:N4,keyMap:xi,modifier:$n,modifierMap:zu};for(let t in o0)Object.prototype.hasOwnProperty.call(o0,t)&&(_r[t]=o0[t]);if(typeof window<"u"){let t=window.hotkeys;_r.noConflict=e=>(e&&window.hotkeys===_r&&(window.hotkeys=t),_r),window.hotkeys=_r}var yn=_r;d();d();var Yx={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},q4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},cn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Jr={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(t,e){let n=e.match(t);return n&&n.length>0&&n[1]||""}static getSecondMatch(t,e){let n=e.match(t);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(t,e,n){if(t.test(e))return n}static getWindowsVersionName(t){switch(t){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),e[0]===10)switch(e[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(t){let e=t.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(e.push(0),!(e[0]===1&&e[1]<5)){if(e[0]===1&&e[1]<6)return"Cupcake";if(e[0]===1&&e[1]>=6)return"Donut";if(e[0]===2&&e[1]<2)return"Eclair";if(e[0]===2&&e[1]===2)return"Froyo";if(e[0]===2&&e[1]>2)return"Gingerbread";if(e[0]===3)return"Honeycomb";if(e[0]===4&&e[1]<1)return"Ice Cream Sandwich";if(e[0]===4&&e[1]<4)return"Jelly Bean";if(e[0]===4&&e[1]>=4)return"KitKat";if(e[0]===5)return"Lollipop";if(e[0]===6)return"Marshmallow";if(e[0]===7)return"Nougat";if(e[0]===8)return"Oreo";if(e[0]===9)return"Pie"}}static getVersionPrecision(t){return t.split(".").length}static compareVersions(t,e,n=!1){let r=G.getVersionPrecision(t),a=G.getVersionPrecision(e),i=Math.max(r,a),o=0,s=G.map([t,e],u=>{let l=i-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),p=>new Array(20-p.length).join("0")+p).reverse()});for(n&&(o=i-Math.min(r,a)),i-=1;i>=o;){if(s[0][i]>s[1][i])return 1;if(s[0][i]===s[1][i]){if(i===o)return 0;i-=1}else if(s[0][i]{n[o]=i[o]})}return t}static getBrowserAlias(t){return Yx[t]}static getBrowserTypeByAlias(t){return q4[t]||""}},rt=/version\/(\d+(\.?_?\d+)+)/i,Qx=[{test:[/googlebot/i],describe(t){let e={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/opera/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opr\/|opios/i],describe(t){let e={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/SamsungBrowser/i],describe(t){let e={name:"Samsung Internet for Android"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Whale/i],describe(t){let e={name:"NAVER Whale Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MZBrowser/i],describe(t){let e={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/focus/i],describe(t){let e={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/swing/i],describe(t){let e={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/coast/i],describe(t){let e={name:"Opera Coast"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(t){let e={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/yabrowser/i],describe(t){let e={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/ucbrowser/i],describe(t){let e={name:"UC Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/Maxthon|mxios/i],describe(t){let e={name:"Maxthon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/epiphany/i],describe(t){let e={name:"Epiphany"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/puffin/i],describe(t){let e={name:"Puffin"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sleipnir/i],describe(t){let e={name:"Sleipnir"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/k-meleon/i],describe(t){let e={name:"K-Meleon"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/micromessenger/i],describe(t){let e={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qqbrowser/i],describe(t){let e={name:/qqbrowserlite/i.test(t)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/msie|trident/i],describe(t){let e={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/\sedg\//i],describe(t){let e={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/edg([ea]|ios)/i],describe(t){let e={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/vivaldi/i],describe(t){let e={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/seamonkey/i],describe(t){let e={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/sailfish/i],describe(t){let e={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,t);return n&&(e.version=n),e}},{test:[/silk/i],describe(t){let e={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/phantom/i],describe(t){let e={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/slimerjs/i],describe(t){let e={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e={name:"BlackBerry"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(web|hpw)[o0]s/i],describe(t){let e={name:"WebOS Browser"},n=G.getFirstMatch(rt,t)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/bada/i],describe(t){let e={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/tizen/i],describe(t){let e={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/qupzilla/i],describe(t){let e={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/firefox|iceweasel|fxios/i],describe(t){let e={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/electron/i],describe(t){let e={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/MiuiBrowser/i],describe(t){let e={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/chromium/i],describe(t){let e={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,t)||G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/chrome|crios|crmo/i],describe(t){let e={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/GSA/i],describe(t){let e={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e={name:"Android Browser"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/playstation 4/i],describe(t){let e={name:"PlayStation 4"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/safari|applewebkit/i],describe(t){let e={name:"Safari"},n=G.getFirstMatch(rt,t);return n&&(e.version=n),e}},{test:[/.*/i],describe(t){let e=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=t.search("\\(")!==-1?n:e;return{name:G.getFirstMatch(r,t),version:G.getSecondMatch(r,t)}}}],Zx=Qx,Jx=[{test:[/Roku\/DVP/],describe(t){let e=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,t);return{name:cn.Roku,version:e}}},{test:[/windows phone/i],describe(t){let e=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,t);return{name:cn.WindowsPhone,version:e}}},{test:[/windows /i],describe(t){let e=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,t),n=G.getWindowsVersionName(e);return{name:cn.Windows,version:e,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(t){let e={name:cn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,t);return n&&(e.version=n),e}},{test:[/macintosh/i],describe(t){let e=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,t).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(e),r={name:cn.MacOS,version:e};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(t){let e=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,t).replace(/[_\s]/g,".");return{name:cn.iOS,version:e}}},{test(t){let e=!t.test(/like android/i),n=t.test(/android/i);return e&&n},describe(t){let e=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,t),n=G.getAndroidVersionName(e),r={name:cn.Android,version:e};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(t){let e=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,t),n={name:cn.WebOS};return e&&e.length&&(n.version=e),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(t){let e=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,t)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,t)||G.getFirstMatch(/\bbb(\d+)/i,t);return{name:cn.BlackBerry,version:e}}},{test:[/bada/i],describe(t){let e=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,t);return{name:cn.Bada,version:e}}},{test:[/tizen/i],describe(t){let e=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,t);return{name:cn.Tizen,version:e}}},{test:[/linux/i],describe(){return{name:cn.Linux}}},{test:[/CrOS/],describe(){return{name:cn.ChromeOS}}},{test:[/PlayStation 4/],describe(t){let e=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,t);return{name:cn.PlayStation4,version:e}}}],Xx=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(t){let e=G.getFirstMatch(/(can-l01)/i,t)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return e&&(n.model=e),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(t){let e=t.test(/ipod|iphone/i),n=t.test(/like (ipod|iphone)/i);return e&&!n},describe(t){let e=G.getFirstMatch(/(ipod|iphone)/i,t);return{type:Ct.mobile,vendor:"Apple",model:e}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(t){return t.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(t){return t.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(t){let e=Number(String(t.getOSVersion()).split(".")[0]);return t.getOSName(!0)==="android"&&e>=3},describe(){return{type:Ct.tablet}}},{test(t){return t.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(t){return t.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(t){return t.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(t){return t.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(t){return t.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],eE=[{test(t){return t.getBrowserName(!0)==="microsoft edge"},describe(t){if(/\sedg\//i.test(t))return{name:Jr.Blink};let e=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,t);return{name:Jr.EdgeHTML,version:e}}},{test:[/trident/i],describe(t){let e={name:Jr.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){return t.test(/presto/i)},describe(t){let e={name:Jr.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test(t){let e=t.test(/gecko/i),n=t.test(/like gecko/i);return e&&!n},describe(t){let e={name:Jr.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Jr.Blink}}},{test:[/(apple)?webkit/i],describe(t){let e={name:Jr.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,t);return n&&(e.version=n),e}}],tE=class{constructor(t,e=!1){if(t==null||t==="")throw new Error("UserAgent parameter can't be empty");this._ua=t,this.parsedResult={},e!==!0&&this.parse()}getUA(){return this._ua}test(t){return t.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let t=G.find(Zx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.browser=t.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(t){return t?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let t=G.find(Jx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.os=t.describe(this.getUA())),this.parsedResult.os}getOSName(t){let{name:e}=this.getOS();return t?String(e).toLowerCase()||"":e||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(t=!1){let{type:e}=this.getPlatform();return t?String(e).toLowerCase()||"":e||""}parsePlatform(){this.parsedResult.platform={};let t=G.find(Xx,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.platform=t.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(t){return t?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let t=G.find(eE,e=>{if(typeof e.test=="function")return e.test(this);if(e.test instanceof Array)return e.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return t&&(this.parsedResult.engine=t.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(t){let e={},n=0,r={},a=0;if(Object.keys(t).forEach(i=>{let o=t[i];typeof o=="string"?(r[i]=o,a+=1):typeof o=="object"&&(e[i]=o,n+=1)}),n>0){let i=Object.keys(e),o=G.find(i,u=>this.isOS(u));if(o){let u=this.satisfies(e[o]);if(u!==void 0)return u}let s=G.find(i,u=>this.isPlatform(u));if(s){let u=this.satisfies(e[s]);if(u!==void 0)return u}}if(a>0){let i=Object.keys(r),o=G.find(i,s=>this.isBrowser(s,!0));if(o!==void 0)return this.compareVersion(r[o])}}isBrowser(t,e=!1){let n=this.getBrowserName().toLowerCase(),r=t.toLowerCase(),a=G.getBrowserTypeByAlias(r);return e&&a&&(r=a.toLowerCase()),r===n}compareVersion(t){let e=[0],n=t,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return t[0]===">"||t[0]==="<"?(n=t.substr(1),t[1]==="="?(r=!0,n=t.substr(2)):e=[],t[0]===">"?e.push(1):e.push(-1)):t[0]==="="?n=t.substr(1):t[0]==="~"&&(r=!0,n=t.substr(1)),e.indexOf(G.compareVersions(a,n,r))>-1}isOS(t){return this.getOSName(!0)===String(t).toLowerCase()}isPlatform(t){return this.getPlatformType(!0)===String(t).toLowerCase()}isEngine(t){return this.getEngineName(!0)===String(t).toLowerCase()}is(t,e=!1){return this.isBrowser(t,e)||this.isOS(t)||this.isPlatform(t)}some(t=[]){return t.some(e=>this.is(e))}},U4=tE,nE=class{static getParser(t,e=!1){if(typeof t!="string")throw new Error("UserAgent should be a string");return new U4(t,e)}static parse(t){return new U4(t).getResult()}static get BROWSER_MAP(){return q4}static get ENGINE_MAP(){return Jr}static get OS_MAP(){return cn}static get PLATFORMS_MAP(){return Ct}},Ei=nE;d();d();var{entries:Y4,setPrototypeOf:j4,isFrozen:rE,getPrototypeOf:aE,getOwnPropertyDescriptor:iE}=Object,{freeze:dn,seal:Qn,create:oE}=Object,{apply:p0,construct:g0}=typeof Reflect<"u"&&Reflect;p0||(p0=function(t,e,n){return t.apply(e,n)});dn||(dn=function(t){return t});Qn||(Qn=function(t){return t});g0||(g0=function(t,e){return new t(...e)});var sE=Rn(Array.prototype.forEach),H4=Rn(Array.prototype.pop),Ko=Rn(Array.prototype.push),qu=Rn(String.prototype.toLowerCase),s0=Rn(String.prototype.toString),uE=Rn(String.prototype.match),Yn=Rn(String.prototype.replace),lE=Rn(String.prototype.indexOf),cE=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),Go=dE(TypeError);function Rn(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),hE=Qn(/\${[\w\W]*}/gm),bE=Qn(/^data-[\-\w.\u00B7-\uFFFF]/),TE=Qn(/^aria-[\-\w]+$/),Q4=Qn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yE=Qn(/^(?:\w+script|data):/i),vE=Qn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z4=Qn(/^html$/i),$4=Object.freeze({__proto__:null,MUSTACHE_EXPR:mE,ERB_EXPR:fE,TMPLIT_EXPR:hE,DATA_ATTR:bE,ARIA_ATTR:TE,IS_ALLOWED_URI:Q4,IS_SCRIPT_OR_DATA:yE,ATTR_WHITESPACE:vE,DOCTYPE_NAME:Z4}),SE=()=>typeof window>"u"?null:window,xE=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(n=e.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return null}};function J4(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:SE(),e=R=>J4(R);if(e.version="3.0.3",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;let n=t.document,r=n.currentScript,{document:a}=t,{DocumentFragment:i,HTMLTemplateElement:o,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:g,trustedTypes:m}=t,f=u.prototype,T=Nu(f,"cloneNode"),b=Nu(f,"nextSibling"),h=Nu(f,"childNodes"),C=Nu(f,"parentNode");if(typeof o=="function"){let R=a.createElement("template");R.content&&R.content.ownerDocument&&(a=R.content.ownerDocument)}let D,M="",{implementation:B,createNodeIterator:S,createDocumentFragment:y,getElementsByTagName:_}=a,{importNode:k}=n,v={};e.isSupported=typeof Y4=="function"&&typeof C=="function"&&B&&B.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:I,ERB_EXPR:F,TMPLIT_EXPR:L,DATA_ATTR:U,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:q,ATTR_WHITESPACE:A}=$4,{IS_ALLOWED_URI:E}=$4,P=null,O=Oe({},[...W4,...u0,...l0,...c0,...K4]),H=null,j=Oe({},[...G4,...d0,...V4,...Uu]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,se=null,X=!0,Z=!0,ue=!1,ge=!0,te=!1,Y=!1,Te=!1,ae=!1,ie=!1,Ee=!1,ze=!1,_e=!0,ce=!1,pt="user-content-",Pt=!0,ht=!1,St={},on=null,Mn=Oe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ao=null,sr=Oe({},["audio","video","img","source","image","track"]),Fa=null,pi=Oe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Hn="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml",En=Yt,vr=!1,Sr=null,Ma=Oe({},[$t,Hn,Yt],s0),sn,xr=["application/xhtml+xml","text/html"],gt="text/html",Ze,Cn=null,V9=a.createElement("form"),sf=function(R){return R instanceof RegExp||R instanceof Function},ld=function(R){if(!(Cn&&Cn===R)){if((!R||typeof R!="object")&&(R={}),R=Ci(R),sn=xr.indexOf(R.PARSER_MEDIA_TYPE)===-1?sn=gt:sn=R.PARSER_MEDIA_TYPE,Ze=sn==="application/xhtml+xml"?s0:qu,P="ALLOWED_TAGS"in R?Oe({},R.ALLOWED_TAGS,Ze):O,H="ALLOWED_ATTR"in R?Oe({},R.ALLOWED_ATTR,Ze):j,Sr="ALLOWED_NAMESPACES"in R?Oe({},R.ALLOWED_NAMESPACES,s0):Ma,Fa="ADD_URI_SAFE_ATTR"in R?Oe(Ci(pi),R.ADD_URI_SAFE_ATTR,Ze):pi,Ao="ADD_DATA_URI_TAGS"in R?Oe(Ci(sr),R.ADD_DATA_URI_TAGS,Ze):sr,on="FORBID_CONTENTS"in R?Oe({},R.FORBID_CONTENTS,Ze):Mn,V="FORBID_TAGS"in R?Oe({},R.FORBID_TAGS,Ze):{},se="FORBID_ATTR"in R?Oe({},R.FORBID_ATTR,Ze):{},St="USE_PROFILES"in R?R.USE_PROFILES:!1,X=R.ALLOW_ARIA_ATTR!==!1,Z=R.ALLOW_DATA_ATTR!==!1,ue=R.ALLOW_UNKNOWN_PROTOCOLS||!1,ge=R.ALLOW_SELF_CLOSE_IN_ATTR!==!1,te=R.SAFE_FOR_TEMPLATES||!1,Y=R.WHOLE_DOCUMENT||!1,ie=R.RETURN_DOM||!1,Ee=R.RETURN_DOM_FRAGMENT||!1,ze=R.RETURN_TRUSTED_TYPE||!1,ae=R.FORCE_BODY||!1,_e=R.SANITIZE_DOM!==!1,ce=R.SANITIZE_NAMED_PROPS||!1,Pt=R.KEEP_CONTENT!==!1,ht=R.IN_PLACE||!1,E=R.ALLOWED_URI_REGEXP||Q4,En=R.NAMESPACE||Yt,W=R.CUSTOM_ELEMENT_HANDLING||{},R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=R.CUSTOM_ELEMENT_HANDLING.tagNameCheck),R.CUSTOM_ELEMENT_HANDLING&&sf(R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=R.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),R.CUSTOM_ELEMENT_HANDLING&&typeof R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=R.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),te&&(Z=!1),Ee&&(ie=!0),St&&(P=Oe({},[...K4]),H=[],St.html===!0&&(Oe(P,W4),Oe(H,G4)),St.svg===!0&&(Oe(P,u0),Oe(H,d0),Oe(H,Uu)),St.svgFilters===!0&&(Oe(P,l0),Oe(H,d0),Oe(H,Uu)),St.mathMl===!0&&(Oe(P,c0),Oe(H,V4),Oe(H,Uu))),R.ADD_TAGS&&(P===O&&(P=Ci(P)),Oe(P,R.ADD_TAGS,Ze)),R.ADD_ATTR&&(H===j&&(H=Ci(H)),Oe(H,R.ADD_ATTR,Ze)),R.ADD_URI_SAFE_ATTR&&Oe(Fa,R.ADD_URI_SAFE_ATTR,Ze),R.FORBID_CONTENTS&&(on===Mn&&(on=Ci(on)),Oe(on,R.FORBID_CONTENTS,Ze)),Pt&&(P["#text"]=!0),Y&&Oe(P,["html","head","body"]),P.table&&(Oe(P,["tbody"]),delete V.tbody),R.TRUSTED_TYPES_POLICY){if(typeof R.TRUSTED_TYPES_POLICY.createHTML!="function")throw Go('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof R.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Go('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');D=R.TRUSTED_TYPES_POLICY,M=D.createHTML("")}else D===void 0&&(D=xE(m,r)),D!==null&&typeof M=="string"&&(M=D.createHTML(""));dn&&dn(R),Cn=R}},uf=Oe({},["mi","mo","mn","ms","mtext"]),lf=Oe({},["foreignobject","desc","title","annotation-xml"]),$9=Oe({},["title","style","font","a","script"]),Xs=Oe({},u0);Oe(Xs,l0),Oe(Xs,pE);let cd=Oe({},c0);Oe(cd,gE);let Y9=function(R){let le=C(R);(!le||!le.tagName)&&(le={namespaceURI:En,tagName:"template"});let J=qu(R.tagName),Ge=qu(le.tagName);return Sr[R.namespaceURI]?R.namespaceURI===Hn?le.namespaceURI===Yt?J==="svg":le.namespaceURI===$t?J==="svg"&&(Ge==="annotation-xml"||uf[Ge]):!!Xs[J]:R.namespaceURI===$t?le.namespaceURI===Yt?J==="math":le.namespaceURI===Hn?J==="math"&&lf[Ge]:!!cd[J]:R.namespaceURI===Yt?le.namespaceURI===Hn&&!lf[Ge]||le.namespaceURI===$t&&!uf[Ge]?!1:!cd[J]&&($9[J]||!Xs[J]):!!(sn==="application/xhtml+xml"&&Sr[R.namespaceURI]):!1},gi=function(R){Ko(e.removed,{element:R});try{R.parentNode.removeChild(R)}catch{R.remove()}},dd=function(R,le){try{Ko(e.removed,{attribute:le.getAttributeNode(R),from:le})}catch{Ko(e.removed,{attribute:null,from:le})}if(le.removeAttribute(R),R==="is"&&!H[R])if(ie||Ee)try{gi(le)}catch{}else try{le.setAttribute(R,"")}catch{}},cf=function(R){let le,J;if(ae)R=""+R;else{let un=uE(R,/^[\r\n\t ]+/);J=un&&un[0]}sn==="application/xhtml+xml"&&En===Yt&&(R=''+R+"");let Ge=D?D.createHTML(R):R;if(En===Yt)try{le=new g().parseFromString(Ge,sn)}catch{}if(!le||!le.documentElement){le=B.createDocument(En,"template",null);try{le.documentElement.innerHTML=vr?M:Ge}catch{}}let Lt=le.body||le.documentElement;return R&&J&&Lt.insertBefore(a.createTextNode(J),Lt.childNodes[0]||null),En===Yt?_.call(le,Y?"html":"body")[0]:Y?le.documentElement:Lt},df=function(R){return S.call(R.ownerDocument||R,R,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},Q9=function(R){return R instanceof p&&(typeof R.nodeName!="string"||typeof R.textContent!="string"||typeof R.removeChild!="function"||!(R.attributes instanceof c)||typeof R.removeAttribute!="function"||typeof R.setAttribute!="function"||typeof R.namespaceURI!="string"||typeof R.insertBefore!="function"||typeof R.hasChildNodes!="function")},eu=function(R){return typeof s=="object"?R instanceof s:R&&typeof R=="object"&&typeof R.nodeType=="number"&&typeof R.nodeName=="string"},Er=function(R,le,J){v[R]&&sE(v[R],Ge=>{Ge.call(e,le,J,Cn)})},pf=function(R){let le;if(Er("beforeSanitizeElements",R,null),Q9(R))return gi(R),!0;let J=Ze(R.nodeName);if(Er("uponSanitizeElement",R,{tagName:J,allowedTags:P}),R.hasChildNodes()&&!eu(R.firstElementChild)&&(!eu(R.content)||!eu(R.content.firstElementChild))&&Dn(/<[/\w]/g,R.innerHTML)&&Dn(/<[/\w]/g,R.textContent))return gi(R),!0;if(!P[J]||V[J]){if(!V[J]&&mf(J)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J)))return!1;if(Pt&&!on[J]){let Ge=C(R)||R.parentNode,Lt=h(R)||R.childNodes;if(Lt&&Ge){let un=Lt.length;for(let bn=un-1;bn>=0;--bn)Ge.insertBefore(T(Lt[bn],!0),b(R))}}return gi(R),!0}return R instanceof u&&!Y9(R)||(J==="noscript"||J==="noembed")&&Dn(/<\/no(script|embed)/i,R.innerHTML)?(gi(R),!0):(te&&R.nodeType===3&&(le=R.textContent,le=Yn(le,I," "),le=Yn(le,F," "),le=Yn(le,L," "),R.textContent!==le&&(Ko(e.removed,{element:R.cloneNode()}),R.textContent=le)),Er("afterSanitizeElements",R,null),!1)},gf=function(R,le,J){if(_e&&(le==="id"||le==="name")&&(J in a||J in V9))return!1;if(!(Z&&!se[le]&&Dn(U,le))&&!(X&&Dn(N,le))){if(!H[le]||se[le]){if(!(mf(R)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,R)||W.tagNameCheck instanceof Function&&W.tagNameCheck(R))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,J)||W.tagNameCheck instanceof Function&&W.tagNameCheck(J))))return!1}else if(!Fa[le]&&!Dn(E,Yn(J,A,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&R!=="script"&&lE(J,"data:")===0&&Ao[R])&&!(ue&&!Dn(q,Yn(J,A,"")))&&J)return!1}return!0},mf=function(R){return R.indexOf("-")>0},ff=function(R){let le,J,Ge,Lt;Er("beforeSanitizeAttributes",R,null);let{attributes:un}=R;if(!un)return;let bn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H};for(Lt=un.length;Lt--;){le=un[Lt];let{name:Rt,namespaceURI:mi}=le;if(J=Rt==="value"?le.value:cE(le.value),Ge=Ze(Rt),bn.attrName=Ge,bn.attrValue=J,bn.keepAttr=!0,bn.forceKeepAttr=void 0,Er("uponSanitizeAttribute",R,bn),J=bn.attrValue,bn.forceKeepAttr||(dd(Rt,R),!bn.keepAttr))continue;if(!ge&&Dn(/\/>/i,J)){dd(Rt,R);continue}te&&(J=Yn(J,I," "),J=Yn(J,F," "),J=Yn(J,L," "));let hf=Ze(R.nodeName);if(gf(hf,Ge,J)){if(ce&&(Ge==="id"||Ge==="name")&&(dd(Rt,R),J=pt+J),D&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!mi)switch(m.getAttributeType(hf,Ge)){case"TrustedHTML":{J=D.createHTML(J);break}case"TrustedScriptURL":{J=D.createScriptURL(J);break}}try{mi?R.setAttributeNS(mi,Rt,J):R.setAttribute(Rt,J),H4(e.removed)}catch{}}}Er("afterSanitizeAttributes",R,null)},Z9=function R(le){let J,Ge=df(le);for(Er("beforeSanitizeShadowDOM",le,null);J=Ge.nextNode();)Er("uponSanitizeShadowNode",J,null),!pf(J)&&(J.content instanceof i&&R(J.content),ff(J));Er("afterSanitizeShadowDOM",le,null)};return e.sanitize=function(R){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J,Ge,Lt,un;if(vr=!R,vr&&(R=""),typeof R!="string"&&!eu(R))if(typeof R.toString=="function"){if(R=R.toString(),typeof R!="string")throw Go("dirty is not a string, aborting")}else throw Go("toString is not a function");if(!e.isSupported)return R;if(Te||ld(le),e.removed=[],typeof R=="string"&&(ht=!1),ht){if(R.nodeName){let mi=Ze(R.nodeName);if(!P[mi]||V[mi])throw Go("root node is forbidden and cannot be sanitized in-place")}}else if(R instanceof s)J=cf(""),Ge=J.ownerDocument.importNode(R,!0),Ge.nodeType===1&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?J=Ge:J.appendChild(Ge);else{if(!ie&&!te&&!Y&&R.indexOf("<")===-1)return D&&ze?D.createHTML(R):R;if(J=cf(R),!J)return ie?null:ze?M:""}J&&ae&&gi(J.firstChild);let bn=df(ht?R:J);for(;Lt=bn.nextNode();)pf(Lt)||(Lt.content instanceof i&&Z9(Lt.content),ff(Lt));if(ht)return R;if(ie){if(Ee)for(un=y.call(J.ownerDocument);J.firstChild;)un.appendChild(J.firstChild);else un=J;return(H.shadowroot||H.shadowrootmod)&&(un=k.call(n,un,!0)),un}let Rt=Y?J.outerHTML:J.innerHTML;return Y&&P["!doctype"]&&J.ownerDocument&&J.ownerDocument.doctype&&J.ownerDocument.doctype.name&&Dn(Z4,J.ownerDocument.doctype.name)&&(Rt=" +`+Rt),te&&(Rt=Yn(Rt,I," "),Rt=Yn(Rt,F," "),Rt=Yn(Rt,L," ")),D&&ze?D.createHTML(Rt):Rt},e.setConfig=function(R){ld(R),Te=!0},e.clearConfig=function(){Cn=null,Te=!1},e.isValidAttribute=function(R,le,J){Cn||ld({});let Ge=Ze(R),Lt=Ze(le);return gf(Ge,Lt,J)},e.addHook=function(R,le){typeof le=="function"&&(v[R]=v[R]||[],Ko(v[R],le))},e.removeHook=function(R){if(v[R])return H4(v[R])},e.removeHooks=function(R){v[R]&&(v[R]=[])},e.removeAllHooks=function(){v={}},e}var at=J4();d();d();var EE=Object.create,f0=Object.defineProperty,CE=Object.getOwnPropertyDescriptor,wE=Object.getOwnPropertyNames,DE=Object.getPrototypeOf,AE=Object.prototype.hasOwnProperty,h0=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),kE=(t,e)=>{for(var n in e)f0(t,n,{get:e[n],enumerable:!0})},m0=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of wE(e))!AE.call(t,a)&&a!==n&&f0(t,a,{get:()=>e[a],enumerable:!(r=CE(e,a))||r.enumerable});return t},PE=(t,e,n)=>(m0(t,e,"default"),n&&m0(n,e,"default")),eb=(t,e,n)=>(n=t!=null?EE(DE(t)):{},m0(e||!t||!t.__esModule?f0(n,"default",{value:t,enumerable:!0}):n,t)),LE=h0((t,e)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(o){if(o.nodeType==o.TEXT_NODE)return`${o.nodeName} ("${o.textContent}")`;let s=Array.from(o.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${o.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?i(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var o=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?i(s):s}).join(" ");dump("Reader: (Readability) "+o+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=r.length-1;i>=0;i--){var o=r[i],s=o.parentNode;s&&(!a||a.call(this,o,i,r))&&s.removeChild(o)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of r)this._setNodeTag(i,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),i=a.map(function(o){return r.call(o)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(i){var o=r.getElementsByTagName(i);return Array.isArray(o)?o:Array.from(o)}))},_cleanClasses:function(r){var a=this._classesToPreserve,i=(r.getAttribute("class")||"").split(/\s+/).filter(function(o){return a.indexOf(o)!=-1}).join(" ");for(i?r.setAttribute("class",i):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,i=this._doc.documentURI;function o(l){if(a==i&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var p=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(p,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",o(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),p=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",o(c)),p&&l.setAttribute("poster",o(p)),g){var m=g.replace(this.REGEXPS.srcsetUrl,function(f,T,b,h){return o(T)+(b||"")+h});l.setAttribute("srcset",m)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var i=a.children[0],o=0;o»] /.test(a))o=/ [\\\/>»] /.test(a),a=i.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=i.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(m){return m.textContent.trim()===l});c||(a=i.substring(i.lastIndexOf(":")+1),s(a)<3?a=i.substring(i.indexOf(":")+1):s(i.substr(0,i.indexOf(":")))>5&&(a=i))}else if(a.length>150||a.length<15){var p=r.getElementsByTagName("h1");p.length===1&&(a=this._getInnerText(p[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!o||g!=s(i.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=i),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var i=a.nextSibling,o=!1;(i=this._nextNode(i))&&i.tagName=="BR";){o=!0;var s=i.nextSibling;i.parentNode.removeChild(i),i=s}if(o){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),i=u.nextSibling;i;){if(i.tagName=="BR"){var l=this._nextNode(i.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(i))break;var c=i.nextSibling;u.appendChild(i),i=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var i=r.ownerDocument.createElement(a);r.firstChild;)i.appendChild(r.firstChild);r.parentNode.replaceChild(i,r),r.readability&&(i.readability=r.readability);for(var o=0;o!i.includes(l)),u=s.join(" ").length/o.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var i=r.getAttribute("rel"),o=r.getAttribute("itemprop");return(i==="author"||o&&o.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var i=0,o=[];r.parentNode&&(o.push(r.parentNode),!(a&&++i===a));)r=r.parentNode;return o},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,i=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var o=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ae=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ae&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ae=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var p=null,g=l.firstChild;g;){var m=g.nextSibling;if(this._isPhrasingContent(g))p!==null?p.appendChild(g):this._isWhitespace(g)||(p=a.createElement("p"),l.replaceChild(p,g),p.appendChild(g));else if(p!==null){for(;p.lastChild&&this._isWhitespace(p.lastChild);)p.removeChild(p.lastChild);p=null}g=m}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var T=[];this._forEachNode(u,function(ie){if(!(!ie.parentNode||typeof ie.parentNode.tagName>"u")){var Ee=this._getInnerText(ie);if(!(Ee.length<25)){var ze=this._getNodeAncestors(ie,5);if(ze.length!==0){var _e=0;_e+=1,_e+=Ee.split(",").length,_e+=Math.min(Math.floor(Ee.length/100),3),this._forEachNode(ze,function(ce,pt){if(!(!ce.tagName||!ce.parentNode||typeof ce.parentNode.tagName>"u")){if(typeof ce.readability>"u"&&(this._initializeNode(ce),T.push(ce)),pt===0)var Pt=1;else pt===1?Pt=2:Pt=pt*3;ce.readability.contentScore+=_e/Pt}})}}}});for(var b=[],h=0,C=T.length;hS.readability.contentScore){b.splice(B,0,D),b.length>this._nbTopCandidates&&b.pop();break}}}var y=b[0]||null,_=!1,k;if(y===null||y.tagName==="BODY"){for(y=a.createElement("DIV"),_=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),y.appendChild(r.firstChild);r.appendChild(y),this._initializeNode(y)}else if(y){for(var v=[],I=1;I=.75&&v.push(this._getNodeAncestors(b[I]));var F=3;if(v.length>=F)for(k=y.parentNode;k.tagName!=="BODY";){for(var L=0,U=0;U=F){y=k;break}k=k.parentNode}y.readability||this._initializeNode(y),k=y.parentNode;for(var N=y.readability.contentScore,q=N/3;k.tagName!=="BODY";){if(!k.readability){k=k.parentNode;continue}var A=k.readability.contentScore;if(AN){y=k;break}N=k.readability.contentScore,k=k.parentNode}for(k=y.parentNode;k.tagName!="BODY"&&k.children.length==1;)y=k,k=y.parentNode;y.readability||this._initializeNode(y)}var E=a.createElement("DIV");i&&(E.id="readability-content");var P=Math.max(10,y.readability.contentScore*.2);k=y.parentNode;for(var O=k.children,H=0,j=O.length;H=P)V=!0;else if(W.nodeName==="P"){var X=this._getLinkDensity(W),Z=this._getInnerText(W),ue=Z.length;(ue>80&&X<.25||ue<80&&ue>0&&X===0&&Z.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),E.appendChild(W),O=k.children,H-=1,j-=1)}if(this._debug&&this.log("Article content pre-prep: "+E.innerHTML),this._prepArticle(E),this._debug&&this.log("Article content post-prep: "+E.innerHTML),_)y.id="readability-page-1",y.className="page";else{var ge=a.createElement("DIV");for(ge.id="readability-page-1",ge.className="page";E.firstChild;)ge.appendChild(E.firstChild);E.appendChild(ge)}this._debug&&this.log("Article content after paging: "+E.innerHTML);var te=!0,Y=this._getInnerText(E,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(i,o){return a[o]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(i,o,s){var u=parseInt(o||s,o?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),i;return this._forEachNode(a,function(o){if(!i&&o.getAttribute("type")==="application/ld+json")try{var s=o.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(i={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,p=this._textSimilarity(u.headline,l)>.75;p&&!c?i.title=u.headline:i.title=u.name}else typeof u.name=="string"?i.title=u.name.trim():typeof u.headline=="string"&&(i.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?i.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(i.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(i.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(i.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),i||{}},_getArticleMetadata:function(r){var a={},i={},o=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(o,function(l){var c=l.getAttribute("name"),p=l.getAttribute("property"),g=l.getAttribute("content");if(g){var m=null,f=null;p&&(m=p.match(s),m&&(f=m[0].toLowerCase().replace(/\s/g,""),i[f]=g.trim())),!m&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),i[f]=g.trim()))}}),a.title=r.title||i["dc:title"]||i["dcterm:title"]||i["og:title"]||i["weibo:article:title"]||i["weibo:webpage:title"]||i.title||i["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||i["dc:creator"]||i["dcterm:creator"]||i.author,a.excerpt=r.excerpt||i["dc:description"]||i["dcterm:description"]||i["og:description"]||i["weibo:article:description"]||i["weibo:webpage:description"]||i.description||i["twitter:description"],a.siteName=r.siteName||i["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(o){for(var s=0;s"u"?!0:a;var i=r.textContent.trim();return a?i.replace(this.REGEXPS.normalize," "):i},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>i)return!1;if(r.parentNode.tagName===a&&(!o||o(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,i=0,o=r.getElementsByTagName("tr"),s=0;s0){o._readabilityDataTable=!0;continue}var p=["col","colgroup","tfoot","thead","th"],g=function(f){return!!o.getElementsByTagName(f)[0]};if(p.some(g)){this.log("Data table because found data-y descendant"),o._readabilityDataTable=!0;continue}if(o.getElementsByTagName("table")[0]){o._readabilityDataTable=!1;continue}var m=this._getRowAndColumnCount(o);if(m.rows>=10||m.columns>4){o._readabilityDataTable=!0;continue}o._readabilityDataTable=m.rows*m.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var i=this.REGEXPS.b64DataUrl.exec(a.src);if(i[1]==="image/svg+xml")return;for(var o=!1,s=0;so+=this._getInnerText(u,!0).length),o/i},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(i){var o=function(k){return k._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(i,["ul","ol"]);this._forEachNode(l,k=>u+=this._getInnerText(k).length),s=u/this._getInnerText(i).length>.9}if(a==="table"&&o(i)||this._hasAncestorTag(i,"table",-1,o)||this._hasAncestorTag(i,"code"))return!1;var c=this._getClassWeight(i);this.log("Cleaning Conditionally",i);var p=0;if(c+p<0)return!0;if(this._getCharCount(i,",")<10){for(var g=i.getElementsByTagName("p").length,m=i.getElementsByTagName("img").length,f=i.getElementsByTagName("li").length-100,T=i.getElementsByTagName("input").length,b=this._getTextDensity(i,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(i,["object","embed","iframe"]),D=0;D1&&g/m<.5&&!this._hasAncestorTag(i,"figure")||!s&&f>g||T>Math.floor(g/3)||!s&&b<.9&&S<25&&(m===0||m>2)&&!this._hasAncestorTag(i,"figure")||!s&&c<25&&B>.2||c>=25&&B>.5||h===1&&S<75||h>1;if(s&&y){for(var _=0;_1)return y;let k=i.getElementsByTagName("li").length;if(m==k)return!1}return y}return!1})},_cleanMatchedNodes:function(r,a){for(var i=this._getNextNode(r,!0),o=this._getNextNode(r);o&&o!=i;)a.call(this,o,o.className+" "+o.id)?o=this._removeAndGetNext(o):o=this._getNextNode(o)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(i){let o=this._getClassWeight(i)<0;return o&&this.log("Removing header with low class weight:",i),o})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var i=this._getArticleMetadata(a);this._articleTitle=i.title;var o=this._grabArticle();if(!o)return null;if(this.log("Grabbed: "+o.innerHTML),this._postProcessContent(o),!i.excerpt){var s=o.getElementsByTagName("p");s.length>0&&(i.excerpt=s[0].textContent.trim())}var u=o.textContent;return{title:this._articleTitle,byline:i.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(o),textContent:u,length:u.length,excerpt:i.excerpt,siteName:i.siteName||this._articleSiteName}}},typeof e=="object"&&(e.exports=n)}),_E=h0((t,e)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(i){return(!i.style||i.style.display!="none")&&!i.hasAttribute("hidden")&&(!i.hasAttribute("aria-hidden")||i.getAttribute("aria-hidden")!="true"||i.className&&i.className.indexOf&&i.className.indexOf("fallback-image")!==-1)}function a(i,o={}){typeof o=="function"&&(o={visibilityChecker:o});var s={minScore:20,minContentLength:140,visibilityChecker:r};o=Object.assign(s,o);var u=i.querySelectorAll("p, pre, article"),l=i.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var p=0;return[].some.call(u,function(g){if(!o.visibilityChecker(g))return!1;var m=g.className+" "+g.id;if(n.unlikelyCandidates.test(m)&&!n.okMaybeItsACandidate.test(m)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fo.minScore)})}typeof e=="object"&&(e.exports=a)}),tb=h0((t,e)=>{var n=LE(),r=_E();e.exports={Readability:n,isProbablyReaderable:r}}),nb={};kE(nb,{Readability:()=>ju,default:()=>ib,isProbablyReaderable:()=>ab});var rb=eb(tb());PE(nb,eb(tb()));var{Readability:ju,isProbablyReaderable:ab}=rb,{default:X4,...FE}=rb,ib=X4!==void 0?X4:FE;var $a={};tu($a,{Breadcrumbs:()=>ta,BrowserClient:()=>Mi,Dedupe:()=>ia,FunctionToString:()=>Ka,GlobalHandlers:()=>fr,HttpContext:()=>aa,Hub:()=>Or,InboundFilters:()=>Ga,Integrations:()=>pw,LinkedErrors:()=>ra,SDK_VERSION:()=>Fi,Scope:()=>On,TryCatch:()=>na,addBreadcrumb:()=>el,addGlobalEventProcessor:()=>mr,captureEvent:()=>Ju,captureException:()=>Li,captureMessage:()=>Zu,chromeStackLineParser:()=>$0,close:()=>b3,configureScope:()=>Xu,createTransport:()=>is,defaultIntegrations:()=>tp,defaultStackLineParsers:()=>Z0,defaultStackParser:()=>pl,flush:()=>h3,forceLoad:()=>m3,geckoStackLineParser:()=>Y0,getCurrentHub:()=>Le,getHubFromCarrier:()=>zn,init:()=>d3,lastEventId:()=>g3,makeFetchTransport:()=>os,makeMain:()=>Pi,onLoad:()=>f3,opera10StackLineParser:()=>Zb,opera11StackLineParser:()=>Jb,setContext:()=>tl,setExtra:()=>rl,setExtras:()=>nl,setTag:()=>il,setTags:()=>al,setUser:()=>ol,showReportDialog:()=>p3,startTransaction:()=>sl,winjsStackLineParser:()=>Q0,withScope:()=>_i,wrap:()=>T3});d();d();d();d();d();d();d();d();d();var ob=Object.prototype.toString;function Hu(t){switch(ob.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return dr(t,Error)}}function Vo(t,e){return ob.call(t)===`[object ${e}]`}function Wu(t){return Vo(t,"ErrorEvent")}function sb(t){return Vo(t,"DOMException")}function Fr(t){return Vo(t,"String")}function $o(t){return t===null||typeof t!="object"&&typeof t!="function"}function Zn(t){return Vo(t,"Object")}function Yo(t){return typeof Event<"u"&&dr(t,Event)}function ub(t){return!1}function lb(t){return Vo(t,"RegExp")}function wi(t){return!!(t&&t.then&&typeof t.then=="function")}function cb(t){return Zn(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function db(t){return typeof t=="number"&&t!==t}function dr(t,e){try{return t instanceof e}catch{return!1}}function Qo(t,e){try{let n=t,r=5,a=80,i=[],o=0,s=0,u=" > ",l=u.length,c;for(;n&&o++1&&s+i.length*l+c.length>=a));)i.push(c),s+=c.length,n=n.parentNode;return i.reverse().join(u)}catch{return""}}function ME(t,e){let n=t,r=[],a,i,o,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=e&&e.length?e.filter(p=>n.getAttribute(p)).map(p=>[p,n.getAttribute(p)]):null;if(l&&l.length)l.forEach(p=>{r.push(`[${p[0]}="${p[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Fr(a))for(i=a.split(/\s+/),u=0;u1&&(u=c.slice(0,-1).join("/"),l=c.pop()),l){let p=l.match(/^\d+/);p&&(l=p[0])}return gb({host:i,pass:a,path:u,projectId:l,port:o,protocol:n,publicKey:r})}function gb(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function OE(t){if(!!1)return;let{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(i=>{if(!t[i])throw new Tt(`Invalid Sentry Dsn: ${String(i)} missing`)}),!n.match(/^\d+$/))throw new Tt(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!IE(r))throw new Tt(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new Tt(`Invalid Sentry Dsn: Invalid port ${e}`);return!0}function Ku(t){let e=typeof t=="string"?RE(t):gb(t);return OE(e),e}d();var zE={};function it(){return typeof window<"u"?window:typeof self<"u"?self:zE}function Di(t,e,n){let r=n||it(),a=r.__SENTRY__=r.__SENTRY__||{};return a[t]||(a[t]=e())}d();d();var Zo=["debug","info","warn","error","log","assert","trace"];function b0(t){if(!("console"in it()))return t();let n=console,r={};Zo.forEach(a=>{let i=n[a]&&n[a].__sentry_original__;a in console&&i&&(r[a]=n[a],n[a]=i)});try{return t()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function mb(){let t=!1,e={enable:()=>{t=!0},disable:()=>{t=!1}};return!1?Zo.forEach(n=>{e[n]=(...r)=>{t&&b0(()=>{})}}):Zo.forEach(n=>{e[n]=()=>{}}),e}var Se;!1?Se=Di("logger",mb):Se=mb();d();d();function ja(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.substr(0,e)}...`}function T0(t,e){if(!Array.isArray(t))return"";let n=[];for(let r=0;r`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function S0(t){if(Hu(t))return{message:t.message,name:t.name,stack:t.stack,...hb(t)};if(Yo(t)){let e={type:t.type,target:fb(t.target),currentTarget:fb(t.currentTarget),...hb(t)};return typeof CustomEvent<"u"&&dr(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function fb(t){try{return ub(t)?Qo(t):Object.prototype.toString.call(t)}catch{return""}}function hb(t){if(typeof t=="object"&&t!==null){let e={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Tb(t,e=40){let n=Object.keys(S0(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return ja(n[0],e);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>e))return r===n.length?a:ja(a,e)}return""}function Ha(t){return y0(t,new Map)}function y0(t,e){if(Zn(t)){let n=e.get(t);if(n!==void 0)return n;let r={};e.set(t,r);for(let a of Object.keys(t))typeof t[a]<"u"&&(r[a]=y0(t[a],e));return r}if(Array.isArray(t)){let n=e.get(t);if(n!==void 0)return n;let r=[];return e.set(t,r),t.forEach(a=>{r.push(y0(a,e))}),r}return t}d();var NE=50;function E0(...t){let e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let i of n.split(` +`).slice(r))for(let o of e){let s=o(i);if(s){a.push(s);break}}return UE(a)}}function yb(t){return Array.isArray(t)?E0(...t):t}function UE(t){if(!t.length)return[];let e=t,n=e[0].function||"",r=e[e.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(e=e.slice(1)),r.indexOf("sentryWrapped")!==-1&&(e=e.slice(0,-1)),e.slice(0,NE).map(a=>({...a,filename:a.filename||e[0].filename,function:a.function||"?"})).reverse()}var x0="";function Xn(t){try{return!t||typeof t!="function"?x0:t.name||x0}catch{return x0}}d();function vb(){if(!("fetch"in it()))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sb(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function xb(){return!0}var Mr=it(),Xo={},Eb={};function qE(t){if(!Eb[t])switch(Eb[t]=!0,t){case"console":jE();break;case"fetch":HE();break;case"error":GE();break;case"unhandledrejection":VE();break;default:!1&&Se.warn("unknown instrumentation type:",t);return}}function er(t,e){Xo[t]=Xo[t]||[],Xo[t].push(e),qE(t)}function ki(t,e){if(!(!t||!Xo[t]))for(let n of Xo[t]||[])try{n(e)}catch(r){!1&&Se.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${Xn(n)} -Error:`,r)}}function jE(){"console"in Mr&&Qo.forEach(function(t){t in console&&Jn(console,t,function(e){return function(...n){ki("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function HE(){xb()&&Jn(Mr,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:WE(e),url:KE(e)},startTimestamp:Date.now()};return ki("fetch",{...n}),t.apply(Mr,e).then(r=>(ki("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw ki("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function WE(t=[]){return"Request"in Mr&&dr(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function KE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Mr&&dr(t[0],Request)?t[0].url:String(t[0])}var w0=null;function GE(){w0=Mr.onerror,Mr.onerror=function(t,e,n,r,a){return ki("error",{column:r,error:a,line:n,msg:t,url:e}),w0?w0.apply(this,arguments):!1}}var D0=null;function VE(){D0=Mr.onunhandledrejection,Mr.onunhandledrejection=function(t){return ki("unhandledrejection",t),D0?D0.apply(this,arguments):!0}}d();function Cb(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function Vu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function wb(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ir(t){let{message:e,event_id:n}=t;if(e)return e;let r=wb(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Xo(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Xr(t,e){let n=wb(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function A0(t){if(t&&t.__sentry_captured__)return!0;try{Zo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Db(){return!1}d();function Rr(t,e=1/0,n=1/0){try{return k0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function P0(t,e=3,n=100*1024){let r=Rr(t,e);return QE(r)>n?P0(t,e-1,n):r}function k0(t,e,n=1/0,r=1/0,a=Cb()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!db(e))return e;let s=$E(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return k0("",g,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=x0(e);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let m=p[g];l[g]=k0(g,m,n-1,r,a),c+=1}return o(e),l}function $E(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":cb(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Xn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function YE(t){return~-encodeURI(t).split(/%..|./).length}function QE(t){return YE(JSON.stringify(t))}d();d();d();function vn(t){return new pr(e=>{e(t)})}function es(t){return new pr((e,n)=>{n(t)})}var pr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(wi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Ab(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new pr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{vn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var ZE=["fatal","error","warning","log","info","debug"];function kb(t){return t==="warn"?"warning":ZE.includes(t)?t:"log"}d();var _0={nowSeconds:()=>Date.now()/1e3};function JE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var L0=JE(),Pb=L0===void 0?_0:{nowSeconds:()=>(L0.timeOrigin+L0.now())/1e3},ea=_0.nowSeconds.bind(_0),F0=Pb.nowSeconds.bind(Pb);var $u,fB=(()=>{if(!performance||!performance.now){$u="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function M0(t,e){return(e||new TextEncoder).encode(t)}function Yu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[M0(a,e),o]:a.push(typeof o=="string"?M0(o,e):o)}for(let o of r){let[s,u]=o;i(` +Error:`,r)}}function jE(){"console"in Mr&&Zo.forEach(function(t){t in console&&Jn(console,t,function(e){return function(...n){ki("console",{args:n,level:t}),e&&e.apply(console,n)}})})}function HE(){xb()&&Jn(Mr,"fetch",function(t){return function(...e){let n={args:e,fetchData:{method:WE(e),url:KE(e)},startTimestamp:Date.now()};return ki("fetch",{...n}),t.apply(Mr,e).then(r=>(ki("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw ki("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function WE(t=[]){return"Request"in Mr&&dr(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function KE(t=[]){return typeof t[0]=="string"?t[0]:"Request"in Mr&&dr(t[0],Request)?t[0].url:String(t[0])}var C0=null;function GE(){C0=Mr.onerror,Mr.onerror=function(t,e,n,r,a){return ki("error",{column:r,error:a,line:n,msg:t,url:e}),C0?C0.apply(this,arguments):!1}}var w0=null;function VE(){w0=Mr.onunhandledrejection,Mr.onunhandledrejection=function(t){return ki("unhandledrejection",t),w0?w0.apply(this,arguments):!0}}d();function Cb(){let t=typeof WeakSet=="function",e=t?new WeakSet:[];function n(a){if(t)return e.has(a)?!0:(e.add(a),!1);for(let i=0;icrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(t()&15)>>e/4).toString(16))}function Vu(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function wb(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function Ir(t){let{message:e,event_id:n}=t;if(e)return e;let r=wb(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function es(t,e,n){let r=t.exception=t.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=e||""),i.type||(i.type=n||"Error")}function Xr(t,e){let n=wb(t);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...e},e&&"data"in e){let i={...a&&a.data,...e.data};n.mechanism.data=i}}function D0(t){if(t&&t.__sentry_captured__)return!0;try{Jo(t,"__sentry_captured__",!0)}catch{}return!1}d();function Db(){return!1}d();function Rr(t,e=1/0,n=1/0){try{return A0("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function k0(t,e=3,n=100*1024){let r=Rr(t,e);return QE(r)>n?k0(t,e-1,n):r}function A0(t,e,n=1/0,r=1/0,a=Cb()){let[i,o]=a;if(e===null||["number","boolean","string"].includes(typeof e)&&!db(e))return e;let s=$E(t,e);if(!s.startsWith("[object "))return s;if(e.__sentry_skip_normalization__)return e;if(n===0)return s.replace("object ","");if(i(e))return"[Circular ~]";let u=e;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return A0("",g,n-1,r,a)}catch{}let l=Array.isArray(e)?[]:{},c=0,p=S0(e);for(let g in p){if(!Object.prototype.hasOwnProperty.call(p,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let m=p[g];l[g]=A0(g,m,n-1,r,a),c+=1}return o(e),l}function $E(t,e){try{return t==="domain"&&e&&typeof e=="object"&&e._events?"[Domain]":t==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&e===window?"[Window]":cb(e)?"[SyntheticEvent]":typeof e=="number"&&e!==e?"[NaN]":e===void 0?"[undefined]":typeof e=="function"?`[Function: ${Xn(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function YE(t){return~-encodeURI(t).split(/%..|./).length}function QE(t){return YE(JSON.stringify(t))}d();d();d();function vn(t){return new pr(e=>{e(t)})}function ts(t){return new pr((e,n)=>{n(t)})}var pr=class t{_state=0;_handlers=[];_value;constructor(e){try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}then(e,n){return new t((r,a)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new t((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,e&&e()},o=>{i=!0,a=o,e&&e()}).then(()=>{if(i){r(a);return}n(a)})})}_resolve=e=>{this._setResult(1,e)};_reject=e=>{this._setResult(2,e)};_setResult=(e,n)=>{if(this._state===0){if(wi(n)){n.then(this._resolve,this._reject);return}this._state=e,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};function Ab(t){let e=[];function n(){return t===void 0||e.lengthr(s)).then(null,()=>r(s).then(null,()=>{})),s}function i(o){return new pr((s,u)=>{let l=e.length;if(!l)return s(!0);let c=setTimeout(()=>{o&&o>0&&s(!1)},o);e.forEach(p=>{vn(p).then(()=>{--l||(clearTimeout(c),s(!0))},u)})})}return{$:e,add:a,drain:i}}d();d();var ZE=["fatal","error","warning","log","info","debug"];function kb(t){return t==="warn"?"warning":ZE.includes(t)?t:"log"}d();var L0={nowSeconds:()=>Date.now()/1e3};function JE(){if(!performance||!performance.now)return;let t=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:t}}var P0=JE(),Pb=P0===void 0?L0:{nowSeconds:()=>(P0.timeOrigin+P0.now())/1e3},ea=L0.nowSeconds.bind(L0),_0=Pb.nowSeconds.bind(Pb);var $u,fB=(()=>{if(!performance||!performance.now){$u="none";return}let t=3600*1e3,e=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+e-n):t,a=r{let a=r[0].type;e(r,a)})}function F0(t,e){return(e||new TextEncoder).encode(t)}function Yu(t,e){let[n,r]=t,a=JSON.stringify(n);function i(o){typeof a=="string"?a=typeof o=="string"?a+o:[F0(a,e),o]:a.push(typeof o=="string"?F0(o,e):o)}for(let o of r){let[s,u]=o;i(` ${JSON.stringify(s)} -`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:XE(a)}function XE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function _b(t,e){let n=typeof t.data=="string"?M0(t.data,e):t.data;return[Ha({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var eC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function I0(t){return eC[t]}d();function Fb(t,e,n){let r=[{type:"client_report"},{timestamp:n||ea(),discarded_events:t}];return Wa(e?{dsn:e}:{},[r])}d();var tC=60*1e3;function nC(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?tC:r-e}function rC(t,e){return t[e]||t.all||0}function Mb(t,e,n=Date.now()){return rC(t,e)>n}function Bb(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let g of l.split(";"))a[g]=r+p}else o?a.all=r+nC(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Ib(t){return t[0]}d();function R0(t){let e=F0(),n={sid:Br(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>aC(n)};return t&&gr(n,t),n}function gr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||F0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Br()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function O0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),gr(t,n)}function aC(t){return Ha({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Rb=100,On=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&gr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Zn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Rb):Rb;if(r<=0)return this;let a={timestamp:ea(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ob(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new pr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),wi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Ob(){return Di("globalEventProcessors",()=>[])}function mr(t){Ob().push(t)}d();d();var z0=4,iC=100,Or=class{constructor(e,n=new On,r=z0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Br(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:Br();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=iC}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:ea(),...e},l=i?T0(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=Pi(this);try{e(this)}finally{Pi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&O0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=at(),{userAgent:s}=o.navigator||{},u=R0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&gr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=ts().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ts(){let t=at();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Pi(t){let e=ts(),n=zn(e);return Qu(e,t),n}function Le(){let t=ts();return(!zb(t)||zn(t).isOlderThan(z0))&&Qu(t,new Or),Db()?oC(t):zn(t)}function oC(t){try{let e=ts().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return zn(t);if(!zb(n)||zn(n).isOlderThan(z0)){let r=zn(t).getStackTop();Qu(n,new Or(r.client,On.clone(r.scope)))}return zn(n)}catch{return zn(t)}}function zb(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function zn(t){return Di("hub",()=>new Or,t)}function Qu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Li(t,e){return Le().captureException(t,{captureContext:e})}function Zu(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Ju(t,e){return Le().captureEvent(t,e)}function Xu(t){Le().configureScope(t)}function el(t){Le().addBreadcrumb(t)}function tl(t,e){Le().setContext(t,e)}function nl(t){Le().setExtras(t)}function rl(t,e){Le().setExtra(t,e)}function al(t){Le().setTags(t)}function il(t,e){Le().setTag(t,e)}function ol(t){Le().setUser(t)}function _i(t){Le().withScope(t)}function sl(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var sC="7";function Nb(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function uC(t){return`${Nb(t)}${t.projectId}/envelope/`}function lC(t,e){return bb({sentry_key:t.publicKey,sentry_version:sC,...e&&{sentry_client:`${e.name}/${e.version}`}})}function ns(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${uC(t)}?${lC(t,r)}`}function N0(t,e){let n=Ku(t),r=`${Nb(n)}embed/error-page/`,a=`dsn=${qa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Ub(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function cC(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function qb(t,e,n,r){let a=Ub(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:qa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Wa(i,[o])}function jb(t,e,n,r){let a=Ub(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};cC(t,n&&n.sdk);let l=dC(t,a,r,e);return delete t.sdkProcessingMetadata,Wa(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function dC(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Ib(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:qa(r)},...t.type==="transaction"&&i&&{trace:Ha({...i})}}}d();var Hb=[];function Wb(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function U0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Wb(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Wb(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function Kb(t){let e={};return t.forEach(n=>{e[n.name]=n,Hb.indexOf(n.name)===-1&&(n.setupOnce(mr,Le),Hb.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var Gb="Not capturing exception because it's already been captured.",rs=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=Ku(e.dsn);let n=ns(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(A0(e)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=Vo(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&A0(n.originalException)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),gr(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):vn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Kb(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=jb(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Lb(r,_b(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=qb(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(gr(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||Br(),timestamp:e.timestamp||ea()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=On.clone(s).update(n.captureContext));let u=vn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Rr(i.data,n,r)}}))},...e.user&&{user:Rr(e.user,n,r)},...e.contexts&&{contexts:Rr(e.contexts,n,r)},...e.extra&&{extra:Rr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Rr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Rr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ja(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=ja(s.value,o));let u=e.request;u&&u.url&&(u.url=ja(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return es(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),es(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return pC(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. -Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function pC(t){let e="`beforeSend` method has to return `null` or a valid event.";if(wi(t))return t.then(n=>{if(!(Zn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Zn(t)||t===null))throw new Tt(e);return t}d();function q0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var gC=30;function as(t,e,n=Ab(t.bufferSize||gC)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(B0(o,(p,g)=>{let m=I0(g);Mb(r,m)?t.recordDroppedEvent("ratelimit_backoff",m):s.push(p)}),s.length===0)return vn();let u=Wa(o[0],s),l=p=>{B0(u,(g,m)=>{t.recordDroppedEvent(p,I0(m))})},c=()=>e({body:Yu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Bb(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),vn();throw p})}return{send:i,flush:a}}d();var Fi="7.7.0";var Va={};tu(Va,{FunctionToString:()=>Ka,InboundFilters:()=>Ga});d();d();var Vb,Ka=class t{static id="FunctionToString";name=t.id;setupOnce(){Vb=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ai(this)||this;return Vb.apply(n,e)}}};d();var mC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ga=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=fC(o._options,u);return hC(a,l)?null:a}}return a};r.id=this.name,e(r)}};function fC(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...mC],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function hC(t,e){return e.ignoreInternal&&SC(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. +`),i(typeof u=="string"||u instanceof Uint8Array?u:JSON.stringify(u))}return typeof a=="string"?a:XE(a)}function XE(t){let e=t.reduce((a,i)=>a+i.length,0),n=new Uint8Array(e),r=0;for(let a of t)n.set(a,r),r+=a.length;return n}function _b(t,e){let n=typeof t.data=="string"?F0(t.data,e):t.data;return[Ha({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var eC={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function B0(t){return eC[t]}d();function Fb(t,e,n){let r=[{type:"client_report"},{timestamp:n||ea(),discarded_events:t}];return Wa(e?{dsn:e}:{},[r])}d();var tC=60*1e3;function nC(t,e=Date.now()){let n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${t}`);return isNaN(r)?tC:r-e}function rC(t,e){return t[e]||t.all||0}function Mb(t,e,n=Date.now()){return rC(t,e)>n}function Bb(t,{statusCode:e,headers:n},r=Date.now()){let a={...t},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(let s of i.trim().split(",")){let[u,l]=s.split(":",2),c=parseInt(u,10),p=(isNaN(c)?60:c)*1e3;if(!l)a.all=r+p;else for(let g of l.split(";"))a[g]=r+p}else o?a.all=r+nC(o,r):e===429&&(a.all=r+60*1e3);return a}d();function Ib(t){return t[0]}d();function I0(t){let e=_0(),n={sid:Br(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>aC(n)};return t&&gr(n,t),n}function gr(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||_0(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:Br()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{let n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function R0(t,e){let n={};e?n={status:e}:t.status==="ok"&&(n={status:"exited"}),gr(t,n)}function aC(t){return Ha({sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}var Rb=100,On=class t{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){let n=new t;return e&&(n._breadcrumbs=[...e._breadcrumbs],n._tags={...e._tags},n._extra={...e._extra},n._contexts={...e._contexts},n._user=e._user,n._level=e._level,n._span=e._span,n._session=e._session,n._transactionName=e._transactionName,n._fingerprint=e._fingerprint,n._eventProcessors=[...e._eventProcessors],n._requestSession=e._requestSession,n._attachments=[...e._attachments]),n}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&gr(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts={...this._contexts,[e]:n},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if(typeof e=="function"){let n=e(this);return n instanceof t?n:this}return e instanceof t?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Zn(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,n){let r=typeof n=="number"?Math.min(n,Rb):Rb;if(r<=0)return this;let a={timestamp:ea(),...e};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,n={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(e.tags={transaction:r,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...Ob(),...this._eventProcessors],e,n)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,n,r,a=0){return new pr((i,o)=>{let s=e[a];if(n===null||typeof s!="function")i(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Se.log(`Event processor "${s.id}" dropped event`),wi(u)?u.then(l=>this._notifyEventProcessors(e,l,r,a+1).then(i)).then(null,o):this._notifyEventProcessors(e,u,r,a+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}};function Ob(){return Di("globalEventProcessors",()=>[])}function mr(t){Ob().push(t)}d();d();var O0=4,iC=100,Or=class{constructor(e,n=new On,r=O0){this._version=r;this.getStackTop().scope=n,e&&this.bindClient(e)}_stack=[{}];_lastEventId;isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:a,...n,event_id:r},o)}),r}captureMessage(e,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Br(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:a},s)}),a}captureEvent(e,n){let r=n&&n.event_id?n.event_id:Br();return e.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,i)=>{a.captureEvent(e,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(e,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:o=iC}=a.getOptions&&a.getOptions()||{};if(o<=0)return;let u={timestamp:ea(),...e},l=i?b0(()=>i(u,n)):u;l!==null&&r.addBreadcrumb(l,o)}setUser(e){let n=this.getScope();n&&n.setUser(e)}setTags(e){let n=this.getScope();n&&n.setTags(e)}setExtras(e){let n=this.getScope();n&&n.setExtras(e)}setTag(e,n){let r=this.getScope();r&&r.setTag(e,n)}setExtra(e,n){let r=this.getScope();r&&r.setExtra(e,n)}setContext(e,n){let r=this.getScope();r&&r.setContext(e,n)}configureScope(e){let{scope:n,client:r}=this.getStackTop();n&&r&&e(n)}run(e){let n=Pi(this);try{e(this)}finally{Pi(n)}}getIntegration(e){let n=this.getClient();if(!n)return null;try{return n.getIntegration(e)}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,n){return this._callExtensionMethod("startTransaction",e,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){let e=this.getStackTop(),n=e&&e.scope,r=n&&n.getSession();r&&R0(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(e){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:i}=r&&r.getOptions()||{},o=it(),{userAgent:s}=o.navigator||{},u=I0({release:a,environment:i,...n&&{user:n.getUser()},...s&&{userAgent:s},...e});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&gr(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let e=this.getClient(),n=e&&e.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:e,client:n}=this.getStackTop();if(!e)return;let r=e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(e){let{scope:n,client:r}=this.getStackTop();r&&e(r,n)}_callExtensionMethod(e,...n){let a=ns().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[e]=="function")return a.extensions[e].apply(this,n);!1&&Se.warn(`Extension method ${e} couldn't be found, doing nothing.`)}};function ns(){let t=it();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Pi(t){let e=ns(),n=zn(e);return Qu(e,t),n}function Le(){let t=ns();return(!zb(t)||zn(t).isOlderThan(O0))&&Qu(t,new Or),Db()?oC(t):zn(t)}function oC(t){try{let e=ns().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return zn(t);if(!zb(n)||zn(n).isOlderThan(O0)){let r=zn(t).getStackTop();Qu(n,new Or(r.client,On.clone(r.scope)))}return zn(n)}catch{return zn(t)}}function zb(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function zn(t){return Di("hub",()=>new Or,t)}function Qu(t,e){if(!t)return!1;let n=t.__SENTRY__=t.__SENTRY__||{};return n.hub=e,!0}d();function Li(t,e){return Le().captureException(t,{captureContext:e})}function Zu(t,e){let n=typeof e=="string"?e:void 0,r=typeof e!="string"?{captureContext:e}:void 0;return Le().captureMessage(t,n,r)}function Ju(t,e){return Le().captureEvent(t,e)}function Xu(t){Le().configureScope(t)}function el(t){Le().addBreadcrumb(t)}function tl(t,e){Le().setContext(t,e)}function nl(t){Le().setExtras(t)}function rl(t,e){Le().setExtra(t,e)}function al(t){Le().setTags(t)}function il(t,e){Le().setTag(t,e)}function ol(t){Le().setUser(t)}function _i(t){Le().withScope(t)}function sl(t,e){return Le().startTransaction({metadata:{source:"custom"},...t},e)}d();var sC="7";function Nb(t){let e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function uC(t){return`${Nb(t)}${t.projectId}/envelope/`}function lC(t,e){return bb({sentry_key:t.publicKey,sentry_version:sC,...e&&{sentry_client:`${e.name}/${e.version}`}})}function rs(t,e={}){let n=typeof e=="string"?e:e.tunnel,r=typeof e=="string"||!e._metadata?void 0:e._metadata.sdk;return n||`${uC(t)}?${lC(t,r)}`}function z0(t,e){let n=Ku(t),r=`${Nb(n)}embed/error-page/`,a=`dsn=${qa(n)}`;for(let i in e)if(i!=="dsn")if(i==="user"){let o=e.user;if(!o)continue;o.name&&(a+=`&name=${encodeURIComponent(o.name)}`),o.email&&(a+=`&email=${encodeURIComponent(o.email)}`)}else a+=`&${encodeURIComponent(i)}=${encodeURIComponent(e[i])}`;return`${r}?${a}`}d();d();function Ub(t){if(!t||!t.sdk)return;let{name:e,version:n}=t.sdk;return{name:e,version:n}}function cC(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function qb(t,e,n,r){let a=Ub(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&{dsn:qa(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return Wa(i,[o])}function jb(t,e,n,r){let a=Ub(n),i=t.type||"event",{transactionSampling:o}=t.sdkProcessingMetadata||{},{method:s,rate:u}=o||{};cC(t,n&&n.sdk);let l=dC(t,a,r,e);return delete t.sdkProcessingMetadata,Wa(l,[[{type:i,sample_rates:[{id:s,rate:u}]},t]])}function dC(t,e,n,r){let a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,i=a&&Ib(a);return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&{dsn:qa(r)},...t.type==="transaction"&&i&&{trace:Ha({...i})}}}d();var Hb=[];function Wb(t){return t.reduce((e,n)=>(e.every(r=>n.name!==r.name)&&e.push(n),e),[])}function N0(t){let e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations,r=[...Wb(e)];Array.isArray(n)?r=[...r.filter(o=>n.every(s=>s.name!==o.name)),...Wb(n)]:typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);let a=r.map(o=>o.name),i="Debug";return a.indexOf(i)!==-1&&r.push(...r.splice(a.indexOf(i),1)),r}function Kb(t){let e={};return t.forEach(n=>{e[n.name]=n,Hb.indexOf(n.name)===-1&&(n.setupOnce(mr,Le),Hb.push(n.name),!1&&Se.log(`Integration installed: ${n.name}`))}),e}var Gb="Not capturing exception because it's already been captured.",as=class{_options;_dsn;_transport;_integrations={};_integrationsInitialized=!1;_numProcessing=0;_outcomes={};constructor(e){if(this._options=e,e.dsn){this._dsn=Ku(e.dsn);let n=rs(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}else!1&&Se.warn("No DSN provided, client will not do anything.")}captureException(e,n,r){if(D0(e)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this.eventFromException(e,n).then(i=>this._captureEvent(i,n,r)).then(i=>{a=i})),a}captureMessage(e,n,r,a){let i=r&&r.event_id,o=$o(e)?this.eventFromMessage(String(e),n,r):this.eventFromException(e,r);return this._process(o.then(s=>this._captureEvent(s,r,a)).then(s=>{i=s})),i}captureEvent(e,n,r){if(n&&n.originalException&&D0(n.originalException)){!1&&Se.log(Gb);return}let a=n&&n.event_id;return this._process(this._captureEvent(e,n,r).then(i=>{a=i})),a}captureSession(e){if(!this._isEnabled()){!1&&Se.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?!1&&Se.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),gr(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){let n=this._transport;return n?this._isClientDoneProcessing(e).then(r=>n.flush(e).then(a=>r&&a)):vn(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Kb(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch{return!1&&Se.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,n={}){if(this._dsn){let r=jb(e,this._dsn,this._options._metadata,this._options.tunnel);for(let a of n.attachments||[])r=Lb(r,_b(a,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(e){if(this._dsn){let n=qb(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(e,n){if(this._options.sendClientReports){let r=`${e}:${n}`;!1&&Se.log(`Adding outcome: "${r}"`),this._outcomes[r]=this._outcomes[r]+1||1}}_updateSessionFromEvent(e,n){let r=!1,a=!1,i=n.exception&&n.exception.values;if(i){a=!0;for(let u of i){let l=u.mechanism;if(l&&l.handled===!1){r=!0;break}}}let o=e.status==="ok";(o&&e.errors===0||o&&r)&&(gr(e,{...r&&{status:"crashed"},errors:e.errors||Number(a||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new pr(n=>{let r=0,a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,e&&r>=e&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(e,n,r){let{normalizeDepth:a=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||n.event_id||Br(),timestamp:e.timestamp||ea()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=r;n.captureContext&&(s=On.clone(s).update(n.captureContext));let u=vn(o);if(s){let l=[...n.attachments||[],...s.getAttachments()];l.length&&(n.attachments=l),u=s.applyToEvent(o,n)}return u.then(l=>typeof a=="number"&&a>0?this._normalizeEvent(l,a,i):l)}_normalizeEvent(e,n,r){if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:Rr(i.data,n,r)}}))},...e.user&&{user:Rr(e.user,n,r)},...e.contexts&&{contexts:Rr(e.contexts,n,r)},...e.extra&&{extra:Rr(e.extra,n,r)}};return e.contexts&&e.contexts.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=Rr(e.contexts.trace.data,n,r))),e.spans&&(a.spans=e.spans.map(i=>(i.data&&(i.data=Rr(i.data,n,r)),i))),a}_applyClientOptions(e){let n=this.getOptions(),{environment:r,release:a,dist:i,maxValueLength:o=250}=n;"environment"in e||(e.environment="environment"in n?r:"production"),e.release===void 0&&a!==void 0&&(e.release=a),e.dist===void 0&&i!==void 0&&(e.dist=i),e.message&&(e.message=ja(e.message,o));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=ja(s.value,o));let u=e.request;u&&u.url&&(u.url=ja(u.url,o))}_applyIntegrationsMetadata(e){let n=Object.keys(this._integrations);n.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...n])}_captureEvent(e,n={},r){return this._processEvent(e,n,r).then(a=>a.event_id,a=>{!1&&Se.warn(a)})}_processEvent(e,n,r){let{beforeSend:a,sampleRate:i}=this.getOptions();if(!this._isEnabled())return ts(new Tt("SDK not enabled, will not capture event."));let o=e.type==="transaction";return!o&&typeof i=="number"&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),ts(new Tt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(e,n,r).then(s=>{if(s===null)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Tt("An event processor returned null, will not send event.");if(n.data&&n.data.__sentry__===!0||o||!a)return s;let l=a(s,n);return pC(l)}).then(s=>{if(s===null)throw this.recordDroppedEvent("before_send",e.type||"error"),new Tt("`beforeSend` returned `null`, will not send event.");let u=r&&r.getSession();return!o&&u&&this._updateSessionFromEvent(u,s),this.sendEvent(s,n),s}).then(null,s=>{throw s instanceof Tt?s:(this.captureException(s,{data:{__sentry__:!0},originalException:s}),new Tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. +Reason: ${s}`))})}_process(e){this._numProcessing+=1,e.then(n=>(this._numProcessing-=1,n),n=>(this._numProcessing-=1,n))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,n=>{!1&&Se.error("Error while sending event:",n)}):!1&&Se.error("Transport disabled")}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.keys(e).map(n=>{let[r,a]=n.split(":");return{reason:r,category:a,quantity:e[n]}})}};function pC(t){let e="`beforeSend` method has to return `null` or a valid event.";if(wi(t))return t.then(n=>{if(!(Zn(n)||n===null))throw new Tt(e);return n},n=>{throw new Tt(`beforeSend rejected with ${n}`)});if(!(Zn(t)||t===null))throw new Tt(e);return t}d();function U0(t,e){e.debug===!0&&!1&&Se.enable();let n=Le(),r=n.getScope();r&&r.update(e.initialScope);let a=new t(e);n.bindClient(a)}d();var gC=30;function is(t,e,n=Ab(t.bufferSize||gC)){let r={},a=o=>n.drain(o);function i(o){let s=[];if(M0(o,(p,g)=>{let m=B0(g);Mb(r,m)?t.recordDroppedEvent("ratelimit_backoff",m):s.push(p)}),s.length===0)return vn();let u=Wa(o[0],s),l=p=>{M0(u,(g,m)=>{t.recordDroppedEvent(p,B0(m))})},c=()=>e({body:Yu(u,t.textEncoder)}).then(p=>{p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&!1&&Se.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),r=Bb(r,p)},p=>{!1&&Se.error("Failed while sending event:",p),l("network_error")});return n.add(c).then(p=>p,p=>{if(p instanceof Tt)return!1&&Se.error("Skipped sending event due to full buffer"),l("queue_overflow"),vn();throw p})}return{send:i,flush:a}}d();var Fi="7.7.0";var Va={};tu(Va,{FunctionToString:()=>Ka,InboundFilters:()=>Ga});d();d();var Vb,Ka=class t{static id="FunctionToString";name=t.id;setupOnce(){Vb=Function.prototype.toString,Function.prototype.toString=function(...e){let n=Ai(this)||this;return Vb.apply(n,e)}}};d();var mC=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Ga=class t{constructor(e={}){this._options=e}static id="InboundFilters";name=t.id;setupOnce(e,n){let r=a=>{let i=n();if(i){let o=i.getIntegration(t);if(o){let s=i.getClient(),u=s?s.getOptions():{},l=fC(o._options,u);return hC(a,l)?null:a}}return a};r.id=this.name,e(r)}};function fC(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...mC],ignoreInternal:t.ignoreInternal!==void 0?t.ignoreInternal:!0}}function hC(t,e){return e.ignoreInternal&&SC(t)?(!1&&Se.warn(`Event dropped due to being internal Sentry Error. Event: ${Ir(t)}`),!0):bC(t,e.ignoreErrors)?(!1&&Se.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${Ir(t)}`),!0):TC(t,e.denyUrls)?(!1&&Se.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Ir(t)}. Url: ${ul(t)}`),!0):yC(t,e.allowUrls)?!1:(!1&&Se.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Ir(t)}. -Url: ${ul(t)}`),!0)}function bC(t,e){return!e||!e.length?!1:vC(t).some(n=>e.some(r=>Gu(n,r)))}function TC(t,e){if(!e||!e.length)return!1;let n=ul(t);return n?e.some(r=>Gu(n,r)):!1}function yC(t,e){if(!e||!e.length)return!0;let n=ul(t);return n?e.some(r=>Gu(n,r)):!0}function vC(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Ir(t)}`),[]}return[]}function SC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function xC(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ul(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?xC(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Ir(t)}`),null}}d();d();function W0(t,e){let n=K0(t,e),r={type:e&&e.name,value:DC(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function EC(t,e,n,r){let a={exception:{values:[{type:$o(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Tb(e)}`}]},extra:{__serialized__:P0(e)}};if(n){let i=K0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function j0(t,e){return{exception:{values:[W0(t,e)]}}}function K0(t,e){let n=e.stacktrace||e.stack||"",r=wC(e);try{return t(n,r)}catch{}return[]}var CC=/Minified React error #\d+;/i;function wC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(CC.test(t.message))return 1}return 0}function DC(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function $b(t,e,n,r){let a=n&&n.syntheticException||void 0,i=ll(t,e,a,r);return Xr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),vn(i)}function Yb(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=H0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),vn(o)}function ll(t,e,n,r,a){let i;if(Wu(e)&&e.error)return j0(t,e.error);if(sb(e)){let o=e;if("stack"in e)i=j0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=H0(t,u,n,r),Xo(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Hu(e)?j0(t,e):Zn(e)||$o(e)?(i=EC(t,e,n,a),Xr(i,{synthetic:!0}),i):(i=H0(t,e,n,r),Xo(i,`${e}`,void 0),Xr(i,{synthetic:!0}),i)}function H0(t,e,n,r){let a={message:e};if(r&&n){let i=K0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var G0="Breadcrumbs",ta=class t{static id=G0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&er("console",kC),this.options.dom&&er("dom",AC(this.options.dom)),this.options.xhr&&er("xhr",PC),this.options.fetch&&er("fetch",LC),this.options.history&&er("history",_C)}};function AC(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Yo(n.event.target,a):Yo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function kC(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:kb(t.level),message:y0(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${y0(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function PC(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function LC(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function _C(t){let e=at(),n=t.from,r=t.to,a=Vu(e.location.href),i=Vu(n),o=Vu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var dl=at(),cl;function V0(){if(cl)return cl;if(Sb(fetch))return cl=fetch.bind(dl);let t=dl.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return cl=e.bind(dl)}function Qb(t,e){Object.prototype.toString.call(dl&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):vb()&&V0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var $0=at(),Mi=class extends rs{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Fi}],version:Fi},super(e),e.sendClientReports&&$0.document&&$0.document.addEventListener("visibilitychange",()=>{$0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $b(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Yb(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(G0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Ir(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=ns(this._dsn,this._options),r=Fb(e,this._options.tunnel&&qa(this._dsn));try{Qb(n,Yu(r))}catch(a){!1&&Se.error(a)}}};d();d();function is(t,e=V0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return as(t,n)}d();var Bi="?",FC=10,MC=20,BC=30,IC=40,RC=50;function os(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var OC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zC=/\((\S*)(?::(\d+))(?::(\d+))\)/,NC=t=>{let e=OC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=zC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=Xb(e[1]||Bi,e[2]);return os(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},Y0=[BC,NC],UC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,qC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,jC=t=>{let e=UC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=qC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||Bi;return[a,r]=Xb(a,r),os(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Q0=[RC,jC],HC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,WC=t=>{let e=HC.exec(t);return e?os(e[2],e[1]||Bi,+e[3],e[4]?+e[4]:void 0):void 0},Z0=[IC,WC],KC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,GC=t=>{let e=KC.exec(t);return e?os(e[2],e[3]||Bi,+e[1]):void 0},Zb=[FC,GC],VC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,$C=t=>{let e=VC.exec(t);return e?os(e[5],e[3]||e[4]||Bi,+e[1],+e[2]):void 0},Jb=[MC,$C],J0=[Y0,Q0,Z0],pl=C0(...J0),Xb=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Bi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var X0=0;function ep(){return X0>0}function YC(){X0+=1,setTimeout(()=>{X0-=1})}function zr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ai(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>zr(o,e));return t.apply(this,i)}catch(i){throw YC(),_i(o=>{o.addEventProcessor(s=>(e.mechanism&&(Xo(s,void 0,void 0),Xr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Li(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}S0(r,t),Zo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var tp={};tu(tp,{Breadcrumbs:()=>ta,Dedupe:()=>ia,GlobalHandlers:()=>fr,HttpContext:()=>aa,LinkedErrors:()=>ra,TryCatch:()=>na});d();d();var fr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:QC,onunhandledrejection:ZC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ew(n),r(),this._installFunc[n]=void 0)}}};function QC(){er("error",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(ep()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Fr(a)?XC(a,i,o,s):e3(ll(n,u||a,void 0,r,!1),i,o,s);l.level="error",t3(e,u,l,"onerror")})}function ZC(){er("unhandledrejection",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(ep()||a&&a.__sentry_own_request__)return!0;let i=Vo(a)?JC(a):ll(n,a,void 0,r,!0);i.level="error",t3(e,a,i,"onunhandledrejection")})}function JC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function XC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Wu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),e3({exception:{values:[{type:o,value:i}]}},e,n,r)}function e3(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Fr(e)&&e.length>0?e:pb();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function ew(t){!1&&Se.log(`Global Handler attached: ${t}`)}function t3(t,e,n,r){Xr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function n3(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var tw=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],na=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=at();this._options.setTimeout&&Jn(e,"setTimeout",r3),this._options.setInterval&&Jn(e,"setInterval",r3),this._options.requestAnimationFrame&&Jn(e,"requestAnimationFrame",nw),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Jn(XMLHttpRequest.prototype,"send",rw);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:tw).forEach(aw)}};function r3(t){return function(...e){let n=e[0];return e[0]=zr(n,{mechanism:{data:{function:Xn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function nw(t){return function(e){return t.apply(this,[zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Xn(t)},handled:!0,type:"instrument"}})])}}function rw(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Jn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Xn(i)},handled:!0,type:"instrument"}},s=Ai(i);return s&&(o.mechanism.data.handler=Xn(s)),zr(i,o)})}),t.apply(this,e)}}function aw(t){let e=at(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Jn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=zr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Xn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=zr(i,{mechanism:{data:{function:"addEventListener",handler:Xn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Jn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var iw="cause",ow=5,ra=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||iw,this._limit=e.limit||ow}setupOnce(){let e=Le().getClient();e&&mr((n,r)=>{let a=Le().getIntegration(t);return a?sw(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function sw(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!dr(a.originalException,Error))return r;let i=a3(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function a3(t,e,n,r,a=[]){if(!dr(n[r],Error)||a.length+1>=e)return a;let i=W0(t,n[r]);return a3(t,e,n[r],r,[i,...a])}d();var i3=at(),aa=class t{static id="HttpContext";name=t.id;setupOnce(){mr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!i3.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=i3.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var ia=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(uw(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function uw(t,e){return e?!!(lw(t,e)||cw(t,e)):!1}function lw(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!l3(t,e)||!u3(t,e))}function cw(t,e){let n=o3(e),r=o3(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!l3(t,e)||!u3(t,e))}function u3(t,e){let n=s3(t),r=s3(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(c3(n),er("history",({from:r,to:a})=>{r===void 0||r===a||c3(Le())}))}var y3={},rp=at();rp.Sentry&&rp.Sentry.Integrations&&(y3=rp.Sentry.Integrations);var pw={...y3,...Va,...tp};var gw=Ru.alert;d();var Ii=console,ap=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=In.green;r>1e4?a=In.red:r>1e3&&(a=In.yellow),Ii.debug(In.dim(Ia+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},ss=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&Ii.log(In.dim(Ia+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&Ii.log(In.green(Ia+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&Ii.warn(In.yellow(Ia+" WARN:"),...e)}error(...e){this.#e<=3&&Ii.error(In.red(Ia+" ERROR:"),...e)}fatal(...e){this.#e<=4&&Ii.error(In.red(Ia+" FATAL:"),...e)}timing(){return this.level===0?new ap:{reset:()=>{},stop:()=>{}}}},z=new ss;var v3=["*://*/*","*","*://*"],x3="immersive-translate-wildcard-placeholder.com";function ip(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>v3.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(v3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return fw(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,x3),g;try{g=new URL(p)}catch{return z.debug("invalid match pattern",p,"raw match value:",c),!1}let m=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=mw(l+":",S3(m),S3(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function S3(t){return t.replaceAll(x3,"*")}function mw(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function wt(t,e){return ip(t,e)!==null}function fw(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}d();d();var gl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.4",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var bw="";function Sn(){return bw||gl.version}function op(){return oe.runtime.getManifest().version}d();d();var Tw="";function Ri(){return Tw||globalThis.navigator.userAgent}function sp(){return Ri().includes("ImtFxiOS")}function E3(){let e=Ri().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function yw(){return Ri().includes("ImtFxAndroid")}function C3(){let t=Ri();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function w3(){let e=Ri().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function us(){let t=Ri();if(sp()||yw()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}function ml(t){if(t.beta)return!1;if(it()&&t.spVersion)return ls(op(),t.spVersion);if(C3()&&t.gspVersion){let e=w3();if(e)return ls(e,t.gspVersion)}if(sp()&&t.ispVersion){let e=E3();if(e)return ls(e,t.ispVersion)}return!1}function ls(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function up(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function fl(t){return Array.isArray(t)?t:t?[t]:[]}function hl(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function bl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function Tl(t,e){let n={...t};return P3(n,e),vw(n,e),n}function k3(t,e,n){let r={...e};return Ya({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ya({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function vw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;P3(t,a)}function Ya({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Sw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=fl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!D3(s))return;c=lp(l,u)}else if(o=="remove_v"){if(!D3(s))return;c=A3(l,u)}else o==="add"?c=lp(l,u):o=="remove"&&(c=A3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=lp(l,u):c=u,r(i,c)})}function P3(t,e){return Ya({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function lp(t,e){let n;if(Array.isArray(t)){let r=fl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Sw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function D3(t){let e=Sn();return t&&ls(e,t)}function A3(t,e){if(Array.isArray(t)){let n=fl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}d();d();var Oi="input is invalid type",cp=typeof window=="object",oa=cp?window:{};oa.JS_SHA256_NO_WINDOW&&(cp=!1);var xw=!cp&&typeof self=="object",Ew=!oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;Ew?oa=global:xw&&(oa=self);var SN=!oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,xN=typeof define=="function"&&define.amd,cs=!oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),Cw=[-2147483648,8388608,32768,128],tr=[24,16,8,0],yl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],vl=["hex","array","digest","arrayBuffer"],Ut=[];(oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});cs&&(oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var L3=function(t,e){return function(n){return new qt(e,!0).update(n)[t]()}},F3=function(t){var e=L3("hex",t);e.create=function(){return new qt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};qt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=Cw[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};qt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,g,m,f,T,b,h,C,D;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],p=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(b=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,g=b^t&n^D,T=a&i^~a&o,m=s+p+T+yl[l]+u[l],f=c+g,s=r+m<<0,r=m+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,g=h^r&e^b,T=s&a^~s&i,m=o+p+T+yl[l+1]+u[l+1],f=c+g,o=n+m<<0,n=m+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),C=n&r,g=C^n&t^h,T=o&s^~o&a,m=i+p+T+yl[l+2]+u[l+2],f=c+g,i=e+m<<0,e=m+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,g=D^e&r^C,T=i&o^~i&s,m=a+p+T+yl[l+3]+u[l+3],f=c+g,a=t+m<<0,t=m+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};qt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};qt.prototype.toString=qt.prototype.hex;qt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};qt.prototype.array=qt.prototype.digest;qt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Sl(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Oi);if(cs&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!cs||!ArrayBuffer.isView(t)))throw new Error(Oi)}else throw new Error(Oi);t.length>64&&(t=new qt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}qt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Sl.prototype=new qt;Sl.prototype.finalize=function(){if(qt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();qt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),qt.prototype.finalize.call(this)}};var zi=F3();zi.sha256=zi;zi.sha224=F3(!0);zi.sha256.hmac=M3();zi.sha224.hmac=M3(!0);var B3=zi;var I3=B3.sha256;function nr(t){return Promise.resolve(I3(t))}function xl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function sa(t,e){let n=I3.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function R3(t,e){let n=await sa(t,e);return xl(n)}async function El(t,e){let n=ww(e),r=await sa(t,n);return xl(r)}function ww(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}d();d();function Je(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();d();function O3(t){return t.replace(//g,">")}d();d();function Te(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=wn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":wn[a]}else return"auto";else return wn[r]}function ft(){return Te(document?.documentElement?.lang||"en")}function z3(t,e,n){let r=Dw(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function Dw(t,e){let n=[],r=[];for(let a=0;a0?Te.some(r=>Gu(n,r)))}function TC(t,e){if(!e||!e.length)return!1;let n=ul(t);return n?e.some(r=>Gu(n,r)):!1}function yC(t,e){if(!e||!e.length)return!0;let n=ul(t);return n?e.some(r=>Gu(n,r)):!0}function vC(t){if(t.message)return[t.message];if(t.exception)try{let{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch{return!1&&Se.error(`Cannot extract message for event ${Ir(t)}`),[]}return[]}function SC(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function xC(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ul(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?xC(e):null}catch{return!1&&Se.error(`Cannot extract url for event ${Ir(t)}`),null}}d();d();function H0(t,e){let n=W0(t,e),r={type:e&&e.name,value:DC(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function EC(t,e,n,r){let a={exception:{values:[{type:Yo(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Tb(e)}`}]},extra:{__serialized__:k0(e)}};if(n){let i=W0(t,n);i.length&&(a.exception.values[0].stacktrace={frames:i})}return a}function q0(t,e){return{exception:{values:[H0(t,e)]}}}function W0(t,e){let n=e.stacktrace||e.stack||"",r=wC(e);try{return t(n,r)}catch{}return[]}var CC=/Minified React error #\d+;/i;function wC(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(CC.test(t.message))return 1}return 0}function DC(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function $b(t,e,n,r){let a=n&&n.syntheticException||void 0,i=ll(t,e,a,r);return Xr(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),vn(i)}function Yb(t,e,n="info",r,a){let i=r&&r.syntheticException||void 0,o=j0(t,e,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),vn(o)}function ll(t,e,n,r,a){let i;if(Wu(e)&&e.error)return q0(t,e.error);if(sb(e)){let o=e;if("stack"in e)i=q0(t,e);else{let s=o.name||"DOMException",u=o.message?`${s}: ${o.message}`:s;i=j0(t,u,n,r),es(i,u)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Hu(e)?q0(t,e):Zn(e)||Yo(e)?(i=EC(t,e,n,a),Xr(i,{synthetic:!0}),i):(i=j0(t,e,n,r),es(i,`${e}`,void 0),Xr(i,{synthetic:!0}),i)}function j0(t,e,n,r){let a={message:e};if(r&&n){let i=W0(t,n);i.length&&(a.exception={values:[{value:e,stacktrace:{frames:i}}]})}return a}d();var K0="Breadcrumbs",ta=class t{static id=K0;name=t.id;options;constructor(e){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&er("console",kC),this.options.dom&&er("dom",AC(this.options.dom)),this.options.xhr&&er("xhr",PC),this.options.fetch&&er("fetch",LC),this.options.history&&er("history",_C)}};function AC(t){function e(n){let r,a=typeof t=="object"?t.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Qo(n.event.target,a):Qo(n.event,a)}catch{r=""}r.length!==0&&Le().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function kC(t){let e={category:"console",data:{arguments:t.args,logger:"console"},level:kb(t.level),message:T0(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${T0(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;Le().addBreadcrumb(e,{input:t.args,level:t.level})}function PC(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;let{method:e,url:n,status_code:r,body:a}=t.xhr.__sentry_xhr__||{};Le().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:a});return}}function LC(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"||(t.error?Le().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):Le().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function _C(t){let e=it(),n=t.from,r=t.to,a=Vu(e.location.href),i=Vu(n),o=Vu(r);i.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(r=o.relative),a.protocol===i.protocol&&a.host===i.host&&(n=i.relative),Le().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var dl=it(),cl;function G0(){if(cl)return cl;if(Sb(fetch))return cl=fetch.bind(dl);let t=dl.document,e=fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){!1&&Se.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return cl=e.bind(dl)}function Qb(t,e){Object.prototype.toString.call(dl&&navigator)==="[object Navigator]"&&typeof navigator.sendBeacon=="function"?navigator.sendBeacon.bind(navigator)(t,e):vb()&&G0()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,i=>{!1&&Se.error(i)})}var V0=it(),Mi=class extends as{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Fi}],version:Fi},super(e),e.sendClientReports&&V0.document&&V0.document.addEventListener("visibilitychange",()=>{V0.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return $b(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Yb(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(K0);r&&r.options&&r.options.sentry&&Le().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:Ir(e)},{event:e}),super.sendEvent(e,n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){!1&&Se.log("No outcomes to send");return}if(!this._dsn){!1&&Se.log("No dsn provided, will not send outcomes");return}!1&&Se.log("Sending outcomes:",e);let n=rs(this._dsn,this._options),r=Fb(e,this._options.tunnel&&qa(this._dsn));try{Qb(n,Yu(r))}catch(a){!1&&Se.error(a)}}};d();d();function os(t,e=G0()){function n(r){let a={body:r.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,a).then(i=>({statusCode:i.status,headers:{"x-sentry-rate-limits":i.headers.get("X-Sentry-Rate-Limits"),"retry-after":i.headers.get("Retry-After")}}))}return is(t,n)}d();var Bi="?",FC=10,MC=20,BC=30,IC=40,RC=50;function ss(t,e,n,r){let a={filename:t,function:e,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var OC=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zC=/\((\S*)(?::(\d+))(?::(\d+))\)/,NC=t=>{let e=OC.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=zC.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,a]=Xb(e[1]||Bi,e[2]);return ss(a,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},$0=[BC,NC],UC=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,qC=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,jC=t=>{let e=UC.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=qC.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],a=e[1]||Bi;return[a,r]=Xb(a,r),ss(r,a,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},Y0=[RC,jC],HC=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,WC=t=>{let e=HC.exec(t);return e?ss(e[2],e[1]||Bi,+e[3],e[4]?+e[4]:void 0):void 0},Q0=[IC,WC],KC=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,GC=t=>{let e=KC.exec(t);return e?ss(e[2],e[3]||Bi,+e[1]):void 0},Zb=[FC,GC],VC=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,$C=t=>{let e=VC.exec(t);return e?ss(e[5],e[3]||e[4]||Bi,+e[1],+e[2]):void 0},Jb=[MC,$C],Z0=[$0,Y0,Q0],pl=E0(...Z0),Xb=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:Bi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};d();d();var J0=0;function X0(){return J0>0}function YC(){J0+=1,setTimeout(()=>{J0-=1})}function zr(t,e={},n){if(typeof t!="function")return t;try{let a=t.__sentry_wrapped__;if(a)return a;if(Ai(t))return t}catch{return t}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=a.map(o=>zr(o,e));return t.apply(this,i)}catch(i){throw YC(),_i(o=>{o.addEventProcessor(s=>(e.mechanism&&(es(s,void 0,void 0),Xr(s,e.mechanism)),s.extra={...s.extra,arguments:a},s)),Li(i)}),i}};try{for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}catch{}v0(r,t),Jo(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}var ep={};tu(ep,{Breadcrumbs:()=>ta,Dedupe:()=>ia,GlobalHandlers:()=>fr,HttpContext:()=>aa,LinkedErrors:()=>ra,TryCatch:()=>na});d();d();var fr=class t{static id="GlobalHandlers";name=t.id;_options;_installFunc={onerror:QC,onunhandledrejection:ZC};constructor(e){this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ew(n),r(),this._installFunc[n]=void 0)}}};function QC(){er("error",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let{msg:a,url:i,line:o,column:s,error:u}=t;if(X0()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Fr(a)?XC(a,i,o,s):e3(ll(n,u||a,void 0,r,!1),i,o,s);l.level="error",t3(e,u,l,"onerror")})}function ZC(){er("unhandledrejection",t=>{let[e,n,r]=n3();if(!e.getIntegration(fr))return;let a=t;try{"reason"in t?a=t.reason:"detail"in t&&"reason"in t.detail&&(a=t.detail.reason)}catch{}if(X0()||a&&a.__sentry_own_request__)return!0;let i=$o(a)?JC(a):ll(n,a,void 0,r,!0);i.level="error",t3(e,a,i,"onunhandledrejection")})}function JC(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function XC(t,e,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=Wu(t)?t.message:t,o="Error",s=i.match(a);return s&&(o=s[1],i=s[2]),e3({exception:{values:[{type:o,value:i}]}},e,n,r)}function e3(t,e,n,r){let a=t.exception=t.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},s=o.stacktrace=o.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,p=Fr(e)&&e.length>0?e:pb();return u.length===0&&u.push({colno:l,filename:p,function:"?",in_app:!0,lineno:c}),t}function ew(t){!1&&Se.log(`Global Handler attached: ${t}`)}function t3(t,e,n,r){Xr(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function n3(){let t=Le(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}d();var tw=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],na=class t{static id="TryCatch";name=t.id;_options;constructor(e){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){let e=it();this._options.setTimeout&&Jn(e,"setTimeout",r3),this._options.setInterval&&Jn(e,"setInterval",r3),this._options.requestAnimationFrame&&Jn(e,"requestAnimationFrame",nw),this._options.XMLHttpRequest&&"XMLHttpRequest"in e&&Jn(XMLHttpRequest.prototype,"send",rw);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:tw).forEach(aw)}};function r3(t){return function(...e){let n=e[0];return e[0]=zr(n,{mechanism:{data:{function:Xn(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function nw(t){return function(e){return t.apply(this,[zr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:Xn(t)},handled:!0,type:"instrument"}})])}}function rw(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Jn(n,a,function(i){let o={mechanism:{data:{function:a,handler:Xn(i)},handled:!0,type:"instrument"}},s=Ai(i);return s&&(o.mechanism.data.handler=Xn(s)),zr(i,o)})}),t.apply(this,e)}}function aw(t){let e=it(),n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Jn(n,"addEventListener",function(r){return function(a,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=zr(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Xn(i),target:t},handled:!0,type:"instrument"}}))}catch{}let s=zr(i,{mechanism:{data:{function:"addEventListener",handler:Xn(i),target:t},handled:!0,type:"instrument"}}),u=[a,s,o];return r.apply(this,u)}}),Jn(n,"removeEventListener",function(r){return function(a,i,o){let s=i;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,o)}catch{}return r.call(this,a,s,o)}}))}d();var iw="cause",ow=5,ra=class t{static id="LinkedErrors";name=t.id;_key;_limit;constructor(e={}){this._key=e.key||iw,this._limit=e.limit||ow}setupOnce(){let e=Le().getClient();e&&mr((n,r)=>{let a=Le().getIntegration(t);return a?sw(e.getOptions().stackParser,a._key,a._limit,n,r):n})}};function sw(t,e,n,r,a){if(!r.exception||!r.exception.values||!a||!dr(a.originalException,Error))return r;let i=a3(t,n,a.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function a3(t,e,n,r,a=[]){if(!dr(n[r],Error)||a.length+1>=e)return a;let i=H0(t,n[r]);return a3(t,e,n[r],r,[i,...a])}d();var i3=it(),aa=class t{static id="HttpContext";name=t.id;setupOnce(){mr(e=>{if(Le().getIntegration(t)){if(!navigator&&!location&&!i3.document)return e;let n=e.request&&e.request.url||location&&location.href,{referrer:r}=i3.document||{},{userAgent:a}=navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},o={...n&&{url:n},headers:i};return{...e,request:o}}return e})}};d();var ia=class t{static id="Dedupe";name=t.id;_previousEvent;setupOnce(e,n){let r=a=>{let i=n().getIntegration(t);if(i){try{if(uw(a,i._previousEvent))return!1&&Se.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=a}return i._previousEvent=a}return a};r.id=this.name,e(r)}};function uw(t,e){return e?!!(lw(t,e)||cw(t,e)):!1}function lw(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!l3(t,e)||!u3(t,e))}function cw(t,e){let n=o3(e),r=o3(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!l3(t,e)||!u3(t,e))}function u3(t,e){let n=s3(t),r=s3(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"){!1&&Se.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let n=Le();n.captureSession&&(c3(n),er("history",({from:r,to:a})=>{r===void 0||r===a||c3(Le())}))}var y3={},np=it();np.Sentry&&np.Sentry.Integrations&&(y3=np.Sentry.Integrations);var pw={...y3,...Va,...ep};var gw=Ru.alert;d();var Ii=console,rp=class{#e=performance.now();reset(){this.#e=performance.now()}stop(e){let n=performance.now(),r=Math.round(n-this.#e),a=In.green;r>1e4?a=In.red:r>1e3&&(a=In.yellow),Ii.debug(In.dim(Ia+" TIMING:"),e,"in",a(r+"ms")),this.#e=n}},us=class{#e=1;get level(){return this.#e}setLevel(e){switch(e){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...e){this.#e<=0&&Ii.log(In.dim(Ia+" DEBUG:"),...e)}v(...e){this.#e<=0}info(...e){this.#e<=1&&Ii.log(In.green(Ia+" INFO:"),...e)}l(...e){this.#e<=1}warn(...e){this.#e<=2&&Ii.warn(In.yellow(Ia+" WARN:"),...e)}error(...e){this.#e<=3&&Ii.error(In.red(Ia+" ERROR:"),...e)}fatal(...e){this.#e<=4&&Ii.error(In.red(Ia+" FATAL:"),...e)}timing(){return this.level===0?new rp:{reset:()=>{},stop:()=>{}}}},z=new us;var v3=["*://*/*","*","*://*"],x3="immersive-translate-wildcard-placeholder.com";function ap(t,e){try{let n=[];if(!e||(e&&!Array.isArray(e)?n=[e]:n=e,n.length===0))return null;if(n.some(s=>v3.includes(s)))return t;let r=new URL(t);r.hash="",r.search="";let a=r.href,i=r.hostname,o=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===i)return!0;if(v3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===i,p=l.port===o;return l.port?c&&p:c}else return fw(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let p=u.replace(/\*/g,x3),g;try{g=new URL(p)}catch{return z.debug("invalid match pattern",p,"raw match value:",c),!1}let m=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let T=mw(l+":",S3(m),S3(f));if(T){let b=new URL(a);return T.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function S3(t){return t.replaceAll(x3,"*")}function mw(t,e,n){let r="^";return t==="*:"?r+="(http:|https:|file:)":r+=t,r+="//",e&&(t==="file:"||(e==="*"?r+="[^/]+?":(e.match(/^\*\./)&&(r+="[^/]*?",e=e.substring(1)),r+=e.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function wt(t,e){return ap(t,e)!==null}function fw(t,e){let n=new URL(t),r=new URL(e);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}d();d();var gl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.5",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var bw="";function Sn(){return bw||gl.version}function ip(){return oe.runtime.getManifest().version}d();d();var Tw="";function Ri(){return Tw||globalThis.navigator.userAgent}function op(){return Ri().includes("ImtFxiOS")}function E3(){let e=Ri().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function yw(){return Ri().includes("ImtFxAndroid")}function C3(){let t=Ri();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(t)}function w3(){let e=Ri().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return e?e[1]:null}function ls(){let t=Ri();if(op()||yw()){let e=t.match(/Imt[\w/.]+/);if(e){let n=e[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}function ml(t){if(t.beta)return!1;if(ot()&&t.spVersion)return cs(ip(),t.spVersion);if(C3()&&t.gspVersion){let e=w3();if(e)return cs(e,t.gspVersion)}if(op()&&t.ispVersion){let e=E3();if(e)return cs(e,t.ispVersion)}return!1}function cs(t,e){let n=t.split(".").reverse(),r=e.split(".").reverse(),a=0,i=0,o=1;for(let s=0;s<3;s++)a+=o*Number(r[s]||"0"),i+=o*Number(n[s]||"0"),o*=100;return i>=a}function sp(t){t.message?.indexOf("token invalid")>=0&&Mt.remove(Ft)}d();function fl(t){return Array.isArray(t)?t:t?[t]:[]}function hl(t,e){return e?(Array.isArray(e)||(e=[e]),Array.from(new Set([...e,t]))):[t]}function bl(t,e){return e?(Array.isArray(t)||(t=[t]),Array.isArray(e)||(e=[e]),e.filter(n=>!t.includes(n))):[]}function Tl(t,e){let n={...t};return P3(n,e),vw(n,e),n}function k3(t,e,n){let r={...e};return Ya({rule:r,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>t[a],onMergedResult:(a,i)=>r[a]=i}),Ya({rule:n,valueIsArray:a=>Array.isArray(t[a]),getMergedValue:a=>r[a],onMergedResult:(a,i)=>r[a]=i}),r}function vw(t,e){if(!e.condition)return;let n=e.condition.enableSubtitle?.true||{},r=e.condition.enableSubtitle?.false||{},a=t.enableSubtitle?n:r;P3(t,a)}function Ya({rule:t,getMergedValue:e,valueIsArray:n,onMergedResult:r}){Object.keys(t).sort().forEach(a=>{let[i,o,s]=Sw(a);if(!i||t[a]===void 0)return;let u=t[a];n(i)&&(u=fl(t[a]));let l=e(i);if(l==null){r(i,u);return}let c;if(o=="add_v"){if(!D3(s))return;c=up(l,u)}else if(o=="remove_v"){if(!D3(s))return;c=A3(l,u)}else o==="add"?c=up(l,u):o=="remove"&&(c=A3(l,u));if(c){r(i,c);return}Array.isArray(t[i])&&i.startsWith("additional")?c=up(l,u):c=u,r(i,c)})}function P3(t,e){return Ya({rule:e,valueIsArray:n=>Array.isArray(t[n]),getMergedValue:n=>t[n],onMergedResult:(n,r)=>{t[n]=r}}),t}function up(t,e){let n;if(Array.isArray(t)){let r=fl(e);n=[...t,...r],n=Array.from(new Set(n))}else typeof t=="object"&&typeof e=="object"?n={...t,...e}:n=e;return n}function Sw(t){let e=t.lastIndexOf("["),n="",r=t;return e>0&&(n=t.slice(e+1,t.length-1),r=t.slice(0,e-1)),[...r.split("."),n]}function D3(t){let e=Sn();return t&&cs(e,t)}function A3(t,e){if(Array.isArray(t)){let n=fl(e);return t=t.filter(r=>!n.includes(r)),Array.from(new Set(t))}else if(typeof t=="object"&&typeof e=="object")Object.keys(e).forEach(n=>{delete t[n]});else return e;return t}d();d();var Oi="input is invalid type",lp=typeof window=="object",oa=lp?window:{};oa.JS_SHA256_NO_WINDOW&&(lp=!1);var xw=!lp&&typeof self=="object",Ew=!oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;Ew?oa=global:xw&&(oa=self);var SN=!oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,xN=typeof define=="function"&&define.amd,ds=!oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),Cw=[-2147483648,8388608,32768,128],tr=[24,16,8,0],yl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],vl=["hex","array","digest","arrayBuffer"],qt=[];(oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});ds&&(oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(t){return typeof t=="object"&&t.buffer&&t.buffer.constructor===ArrayBuffer});var L3=function(t,e){return function(n){return new jt(e,!0).update(n)[t]()}},F3=function(t){var e=L3("hex",t);e.create=function(){return new jt(t)},e.update=function(a){return e.create().update(a)};for(var n=0;n>2]|=t[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[i>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};jt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=Cw[e&3],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}};jt.prototype.hash=function(){var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=this.blocks,l,c,p,g,m,f,T,b,h,C,D;for(l=16;l<64;++l)m=u[l-15],c=(m>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,m=u[l-2],p=(m>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,u[l]=u[l-16]+c+u[l-7]+p<<0;for(D=e&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,m=u[0]-1413257819,s=m-150054599<<0,r=m+24177077<<0):(b=704751109,m=u[0]-210244248,s=m-1521486534<<0,r=m+143694565<<0),this.first=!1):(c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),p=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=t&e,g=b^t&n^D,T=a&i^~a&o,m=s+p+T+yl[l]+u[l],f=c+g,s=r+m<<0,r=m+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),p=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&t,g=h^r&e^b,T=s&a^~s&i,m=o+p+T+yl[l+1]+u[l+1],f=c+g,o=n+m<<0,n=m+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),p=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),C=n&r,g=C^n&t^h,T=o&s^~o&a,m=i+p+T+yl[l+2]+u[l+2],f=c+g,i=e+m<<0,e=m+f<<0,c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),p=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),D=e&n,g=D^e&r^C,T=i&o^~i&s,m=a+p+T+yl[l+3]+u[l+3],f=c+g,a=t+m<<0,t=m+f<<0;this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+i<<0,this.h6=this.h6+o<<0,this.h7=this.h7+s<<0};jt.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};jt.prototype.toString=jt.prototype.hex;jt.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,a=this.h4,i=this.h5,o=this.h6,s=this.h7,u=[t>>24&255,t>>16&255,t>>8&255,t&255,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,i>>24&255,i>>16&255,i>>8&255,i&255,o>>24&255,o>>16&255,o>>8&255,o&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};jt.prototype.array=jt.prototype.digest;jt.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(this.is224?28:32),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),e.setUint32(20,this.h5),e.setUint32(24,this.h6),this.is224||e.setUint32(28,this.h7),t};function Sl(t,e,n){var r,a=typeof t;if(a==="string"){var i=[],o=t.length,s=0,u;for(r=0;r>6,i[s++]=128|u&63):u<55296||u>=57344?(i[s++]=224|u>>12,i[s++]=128|u>>6&63,i[s++]=128|u&63):(u=65536+((u&1023)<<10|t.charCodeAt(++r)&1023),i[s++]=240|u>>18,i[s++]=128|u>>12&63,i[s++]=128|u>>6&63,i[s++]=128|u&63);t=i}else if(a==="object"){if(t===null)throw new Error(Oi);if(ds&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ds||!ArrayBuffer.isView(t)))throw new Error(Oi)}else throw new Error(Oi);t.length>64&&(t=new jt(e,!0).update(t).array());var l=[],c=[];for(r=0;r<64;++r){var p=t[r]||0;l[r]=92^p,c[r]=54^p}jt.call(this,e,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}Sl.prototype=new jt;Sl.prototype.finalize=function(){if(jt.prototype.finalize.call(this),this.inner){this.inner=!1;var t=this.array();jt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(t),jt.prototype.finalize.call(this)}};var zi=F3();zi.sha256=zi;zi.sha224=F3(!0);zi.sha256.hmac=M3();zi.sha224.hmac=M3(!0);var B3=zi;var I3=B3.sha256;function nr(t){return Promise.resolve(I3(t))}function xl(t){return Array.from(new Uint8Array(t)).map(r=>r.toString(16).padStart(2,"0")).join("")}function sa(t,e){let n=I3.hmac.create(e);return n.update(t),Promise.resolve(n.array())}async function R3(t,e){let n=await sa(t,e);return xl(n)}async function El(t,e){let n=ww(e),r=await sa(t,n);return xl(r)}function ww(t){let e=[];return t.replace(/../g,function(n){return e.push(parseInt(n,16)),""}),new Uint8Array(e).buffer}d();d();function Xe(){try{let t=[Me().EBOOK_BUILDER_URL,Me().EBOOK_VIEWER_URL,Me().SUBTITLE_BUILDER_URL,Me().HTML_VIEWER_URL,Me().PDF_VIEWER_URL].filter(a=>!!a),e=["app.immersivetranslate.com"];Qt()||e.push("localhost:38001");let n=globalThis.location.pathname;return t.find(a=>{let i=new URL(a);return n.startsWith(i.pathname)&&e.includes(i.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();d();function O3(t){return t.replace(//g,">")}d();d();function be(t){if(typeof t!="string")return"auto";let e=t.toLowerCase();if(e==="und")return"auto";if(e==="zh"||e.startsWith("zh-hans"))return"zh-CN";if(e.startsWith("zh-hant")||e.startsWith("zh-hk")||e.startsWith("zh-tw"))return"zh-TW";if(e.startsWith("zh-"))return"zh-CN";if(e==="iw")return"he";if(e==="jv")return"jw";let n=wn.map(a=>a.toLowerCase()),r=n.indexOf(e);if(r===-1)if(e.indexOf("-")>=0){e=e.split("-")[0];let a=n.indexOf(e);return a===-1?"auto":wn[a]}else return"auto";else return wn[r]}function ft(){return be(document?.documentElement?.lang||"en")}function z3(t,e,n){let r=Dw(t,e),a=[],i={from:t[0].from,fromByClient:t[0].fromByClient,to:t[0].to,tempSentences:[],url:t[0].url};for(let o of r)(i.tempSentences.reduce((u,l)=>u+l.text.length,0)+o.text.length>e||i.tempSentences.length>=n)&&(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}),(i.from!==o.from||i.to!==o.to)&&(i.tempSentences.length>0?(a.push(i),i={fromByClient:i.fromByClient,from:o.from,to:o.to,tempSentences:[],url:o.url}):(i.from=o.from,i.to=o.to)),i.tempSentences.push(o);return i.tempSentences.length>0&&a.push(i),a}function Dw(t,e){let n=[],r=[];for(let a=0;a0?Te){let C=[];dp(b,e,C);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&dp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?m.push(T):g.push(T))});let f=m.concat(g).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:m,explicitProps:g}}var ds=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Zt(s),l=Object.keys(cr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=cr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&it())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let g=!!p.canary,m=!!p.alpha,f=!!p.beta;return c===t[e]||g&&i||m&&(r||i)||f&&(a||r||i)?!0:!m&&!f&&!g}).map(c=>Cl(e,c,t))};function ps(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function N3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();var U3=me+"SyncStoreKey_";function At(t,e){let n=U3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Ze(t,e){let n=U3+t;return oe.storage.sync.set({[n]:e})}d();d();var q3=me+"StoreKey_";function Nr(t,e){let n=q3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function j3(t,e){let n=q3+t;return oe.storage.local.set({[n]:e})}d();d();d();d();function H3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function pp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Aw(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${g}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function gs(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function hr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=gs(t,n,e);return i===e&&n!==r&&(i=gs(t,r,e)),pp(i,a)}function Aw(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return hr(Ot,e,t.config.interfaceLanguage,"en",n)}d();function W3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

+`;continue}else if(b.length>e){let C=[];cp(b,e,C);for(let D=0;D0&&T{let s=t.lastIndexOf(o,e);return s>i?s:i},-1);if(a===-1){let i=t.slice(0,e);if(i&&!i.trim())return;n.push({text:i,prefix:"",suffix:""}),t.length>e&&cp(t.slice(e),e,n)}else{let i=t.slice(0,a+1);if(i&&i.trim()==="")return;i.startsWith(" ")?n.push({text:i.slice(1),prefix:" ",suffix:""}):n.push({text:i,prefix:"",suffix:""}),a+10){p.forEach(T=>{c.length>0&&T.providers&&T.providers.length>0&&!T.providers.includes(l)||(T.optional?m.push(T):g.push(T))});let f=m.concat(g).filter(T=>T.required);if(f.length>0){for(let T of f)if(!i[T.name]){u=!1;break}}}return{...a,id:e,selected:n[t]===e,ok:u,currentProvider:l,config:i,providers:a.providers||[],props:a.props||[],allProps:p,optionalProps:m,explicitProps:g}}var ps=(t,e)=>{let{config:n}=t,r=n.alpha,a=n.beta,i=n.canary,o=n.debug,s=t.user,u=Zt(s),l=Object.keys(cr);return e!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let p=cr[c];if(c.startsWith("mock"))return o?!0:c===t.config[e];if(c===t.config[e])return!0;if(c==="openai"&&ot())return t.config.showOpenaiOnSafari||u?!0:!!(a||r||i||u);let g=!!p.canary,m=!!p.alpha,f=!!p.beta;return c===t[e]||g&&i||m&&(r||i)||f&&(a||r||i)?!0:!m&&!f&&!g}).map(c=>Cl(e,c,t))};function gs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t=>(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16))}function N3(t){return t.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();var U3=me+"SyncStoreKey_";function At(t,e){let n=U3+t;return oe.storage.sync.get(n).then(r=>r[n]===void 0?e:r[n])}function Je(t,e){let n=U3+t;return oe.storage.sync.set({[n]:e})}d();d();var q3=me+"StoreKey_";function Nr(t,e){let n=q3+t;return oe.storage.local.get(n).then(r=>r[n]===void 0?e:r[n])}function j3(t,e){let n=q3+t;return oe.storage.local.set({[n]:e})}d();d();d();d();function H3(t,e){return[t,!t||t.endsWith("/")?"":"/",e,".json"].join("")}function dp(t,e){let n=t;return e&&Object.keys(e).forEach(r=>{let a=e[r];if(a===void 0)return;let i=Aw(r);if(typeof a=="object"||i){let o=a;i&&typeof o=="string"&&(o={tag:"a",href:o,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=o.tag||"a",c=n.indexOf(``);if(c!==-1){let p=n.substring(u+s.length,c),g=Object.keys(o).filter(m=>m!=="tag").map(m=>`${m}="${o[m]}"`).join(" ");n=n.replace(`${s}${p}`,`<${l} ${g}>${p}`)}}}else if(a){let o=new RegExp("{"+r+"}","gm");n=n.replace(o,a.toString())}}),n}function ms(t,e,n){let r=t[e];if(!r)return n;if(!n)return"";let a=n.split("."),i="";do{i+=a.shift();let o=r[i];o!==void 0&&(typeof o=="object"||!a.length)?(r=o,i=""):a.length?i+=".":r=n}while(a.length);return r}function hr(t,e,n,r,a){if(!t.hasOwnProperty(n))return e;let i=ms(t,n,e);return i===e&&n!==r&&(i=ms(t,r,e)),dp(i,a)}function Aw(t){if(typeof t=="number")return!0;if(t){let e=parseInt(t);return!isNaN(e)}else return!1}function kt(t,e,n){return hr(zt,e,t.config.interfaceLanguage,"en",n)}d();function W3(t,e){let n=new Date(t),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),i=n.getDate().toString().padStart(2,"0"),o=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return e.replace("YYYY",r).replace("MM",a).replace("DD",i).replace("HH",o).replace("mm",s).replace("ss",u)}function K3(t){return new Date(t).getTime()}var $=class extends Error{status;constructor(e,n){if(e&&n){super(n),this.name=e;return}super(e)}initNetWork(e){return e&&(this.status=e),this}initStack(e){return e&&(this.stack=e),this}initData(e){return this.data=e,this}data;uiConfig(e){if(!this.message)return{};let n=null;if(n=this.handleProQuota(e)||this.handleUnavailableError(e)||this.handleProUser(e)||this.handleServiceMissingConfig(e)||this.handleNetwork(e)||this.handleFetchError(e),!n){let r=kt.bind(null,e),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(e){let n=kt.bind(null,e),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(e){let n=kt.bind(null,e);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(e){let n=kt.bind(null,e),r="retry",a="network",i=n("networkError");if(!this.status||this.status<0)return;let o=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?o=`${n("error.googleLimitIp")}

${o}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?o=`${n("error.openAIFreeLimit")}

${o}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?o=`${n("error.openAIExceededQuota")}

- ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:Pu});else{let f="";g=="OpenAI"?f=i4:f=o4,o?m+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:s4}):m+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||K3(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W3(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Ur(t){let e;if(t&&t.retry&&t.retry>0)try{e=await Hd(G3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await G3(t);return e}async function G3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){z.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of kw(s.body)){let p=new TextDecoder().decode(c);u+=p;let g;for(;(g=u.indexOf(` -`))>=0;){let m=u.slice(0,g).trim();if(u=u.slice(g+1),m.startsWith("event:")||m==="")continue;let f="";if(m.startsWith("data:")&&(f=m.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){z.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(m){z.error("parse response failed",m)}u&&z.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*kw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Pw=new Map;function wl(t){let e=Lw(64),n=new CustomEvent(Ph,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Pw.set(e,(i,o)=>{i?a(i):r(o)})})}function Lw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=mp(s),{type:g,name:m}=p;if(g!==e)return!1;let f=mp(o),b=ms.get(g).get(m);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(C){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=ms.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new gp(`${i}:${e}`,this.logger);return ms.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},gp=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=mp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return V3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return V3(o,s,this.logger)}}};function V3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function mp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}var Dl;function _w(){return Dl||(Dl=new br("content_script",!1).getConnection("pure_main",()=>{}),Dl)}var $3="G-MKMD9LWFTR";async function fs(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(us()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=Je(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Nr("fakeUserId",""),u&&await Ze("fakeUserId",u));let l=Sn(),c=new Date,p=await At("installedAt","");p||(p=await Nr("installedAt",""),p&&await Ze("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Ze("installedAt",p)):(u=Fw(32),await Ze("fakeUserId",u)),p||(p=c.toISOString(),await Ze("installedAt",p));let g=new Date(p),m=Y3(g),f=Y3(c),T=m===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${$3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${$3}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let D=Ei.parse(C),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let _=us();_&&(y.browser_name=_.name,y.browser_version=_.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),m&&(y.install_day=Mw(g)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),B=await Al({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Fw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${o}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?o=`${n("error.gemini.429")}

${o}`:o=`${n("error.429")}

${o}`:this.status===403?this.data?.translationService=="claude"?o=`${n("error.claude.403")}

${o}`:o=`${n("error.403")}

${o}`:this.status===400?o=`${n("error.400")}

${o}`:this.status===502?o=`${n("error.502")}

${o}`:this.status===404&&o.includes("User subscription not found")&&(o=`${n("error.subscriptionExpired")}

${o}`,r="setting",a="configError",i=n("error.subscriptionExpiredTitle")),{type:a,title:i,errMsg:o,action:r}}handleFetchError(e){let n=kt.bind(null,e);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+e.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(e){let n=kt.bind(null,e);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return e.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(e){if(!this.message.startsWith("ProQuota:")||!e.user?.subscription)return;let n=kt.bind(null,e);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=e.user.subscription,{subscriptionType:i,isTrial:o,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let p=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",m=n("errorReason",{message:r});if(i=="onetime_7day")m+=n("proQuotaExceededError.onetime7day",{anotherService:p,brandId:Q,href:Pu});else{let f="";g=="OpenAI"?f=i4:f=o4,o?m+=n("proQuotaExceededError.trial",{anotherService:p,brandId:Q,href:s4}):m+=n("proQuotaExceededError.nonTrial",{anotherService:p,brandId:Q,href:f,translationService:g}),!o&&(a.cancelAtPeriodEnd==="false"||K3(u)>s)&&(m+=n("proQuotaExceededError.resetTime",{resetTime:W3(s,"YYYY-MM-DD HH:mm:ss")}))}return m}}};async function Ur(t){let e;if(t&&t.retry&&t.retry>0)try{e=await jd(G3.bind(null,t),{multiplier:2,maxAttempts:t.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else e=await G3(t);return e}async function G3(t){t.body;let{url:e,responseType:n,...r}=t;n||(n="json"),r={mode:"cors",...r};let a=!0;t.fetchPolyfill&&(a=!1);let i=t.fetchPolyfill||fetch,o=3e4;if(t.timeout&&(o=t.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},o),r.signal=l}let s;try{s=await i(e,r)}catch(u){z.debug("fetch error",e,u);let l=u.message||"Unknown Error";throw new $("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=e),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of kw(s.body)){let p=new TextDecoder().decode(c);u+=p;let g;for(;(g=u.indexOf(` +`))>=0;){let m=u.slice(0,g).trim();if(u=u.slice(g+1),m.startsWith("event:")||m==="")continue;let f="";if(m.startsWith("data:")&&(f=m.slice(5).trim()),f==="[DONE]")break;let T;try{T=JSON.parse(f??"")}catch(b){z.debug("json error",b);continue}l=T}}return l}}else{let u;try{u=await s.text()}catch(m){z.error("parse response failed",m)}u&&z.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(e).hostname.endsWith(".immersivetranslate.com");throw e.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new $("fetchError",c).initNetWork(s.status)}}async function*kw(t){let e=t.getReader();try{for(;;){let{done:n,value:r}=await e.read();if(n)return;yield r}}finally{e.releaseLock()}}d();var Pw=new Map;function wl(t){let e=Lw(64),n=new CustomEvent(Ph,{detail:JSON.stringify({...t,type:"ask",id:e})});return document.dispatchEvent(n),new Promise((r,a)=>{Pw.set(e,(i,o)=>{i?a(i):r(o)})})}function Lw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let o=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,o=`${o}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let p=gp(s),{type:g,name:m}=p;if(g!==e)return!1;let f=gp(o),b=fs.get(g).get(m);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,D={type:e,name:f.name,id:u,url:l,active:c};if(C){try{let M=h(r.payload,D);i({ok:!0,data:M})}catch(M){i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.details,errorStatus:M.status})}return!1}else return h(r.payload,D).then(M=>{i({ok:!0,data:M})}).catch(M=>{i({ok:!1,errorName:M.name,errorMessage:M.message,errorDetails:M.message,errorStatus:M.status})}),!0}))}getConnection(e,n,r){let a=!1;r&&r.sync&&(a=!0);let i=this.fromType,o=fs.get(i);if(o.has(e))return o.get(e).connectionInstance;{let s=new pp(`${i}:${e}`,this.logger);return fs.get(i).set(e,{messageHandler:n,sync:a,connectionInstance:s}),s}}},pp=class{from;logger;constructor(e,n){this.from=e,this.logger=n}async sendMessage(e,n){let r=gp(e),{type:a,id:i}=r;if(a!=="content_script"){let o={to:e,from:this.from,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");try{let s=await oe.runtime.sendMessage(o);return V3(o,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${e} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,e,s),Promise.resolve({message:u})}else throw s}}else{let o={from:this.from,to:e,payload:n};this.logger.debug(`${o.from} send message [${o.payload.method}] to ${o.to}`,o.payload.data?o.payload.data:" ");let s=await oe.tabs.sendMessage(i,o);return V3(o,s,this.logger)}}};function V3(t,e,n){if(e){if(e.ok)return n.debug(`${t.from} received response from ${t.to}:`,e.data?e.data:" "),e.data;throw new $(e.errorName||"UnknownError",e.errorMessage||"Unknown error").initNetWork(e.errorStatus)}else throw new $("noResponse","Unknown error")}function gp(t){let e=t.split(":");if(e.length<2)throw new Error("not a valid to string");let n={type:e[0],name:e[1]};if(e[0]==="content_script"){let r=parseInt(e[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}var Dl;function _w(){return Dl||(Dl=new br("content_script",!1).getConnection("pure_main",()=>{}),Dl)}var $3="G-MKMD9LWFTR";async function hs(t){try{let e=Me(),n=e.INSTALL_FROM==="firefox_store";if(ls()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=ye(),i=Xe(),o=e.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await At("fakeUserId","");u||(u=await Nr("fakeUserId",""),u&&await Je("fakeUserId",u));let l=Sn(),c=new Date,p=await At("installedAt","");p||(p=await Nr("installedAt",""),p&&await Je("installedAt",p)),u?p||(p=new Date(0).toISOString(),await Je("installedAt",p)):(u=Fw(32),await Je("fakeUserId",u)),p||(p=c.toISOString(),await Je("installedAt",p));let g=new Date(p),m=Y3(g),f=Y3(c),T=m===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${$3}&api_secret=${s}`;o||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${$3}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let D=Ei.parse(C),M=t.map(S=>{let y=S.params||{};if(D.os&&(y.os_name=D.os.name||"unknown",y.os_version=D.os.version||"unknown",y.os_version_name=D.os.versionName||"unknown"),D.browser){y.browser_name=D.browser.name||"unknown",y.browser_version=D.browser.version||"unknown";let _=ls();_&&(y.browser_name=_.name,y.browser_version=_.version)}return D.platform&&(y.platform_type=D.platform.type||"unknown"),D.engine&&(y.engine_name=D.engine.name||"unknown",y.engine_version=D.engine.version||"unknown"),l&&(y.version=l),e.INSTALL_FROM&&(y.install_from=e.INSTALL_FROM),m&&(y.install_day=Mw(g)),y.userscript=a.toString(),T?y.is_new_user_today="1":y.is_new_user_today="0",b?y.is_new_user_this_week="1":y.is_new_user_this_week="0",i?y.main_frame=0:y.main_frame=1,{...S,params:y}}),B=await Al({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:M})})}catch{}}function Fw(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5338,43 +5338,43 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};function Q3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Jt(){let t=await oe.storage.local.get(Fo);if(t[Fo]){let e=t[Fo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Ht(i),i}else return{}}async function Ht(t){await oe.storage.local.set({[Fo]:t})}async function kl(t){await oe.storage.local.set({[Yr]:t})}async function Z3(){let t=await oe.storage.local.get(Yr),n={...await fp(),...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let r=t[Yr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Xt(){let t=await oe.storage.local.get(Yr),e={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let E=t[Yr];if(E&&E.buildinConfigUpdatedAt){let P=new Date(E.buildinConfigUpdatedAt),O=new Date(e.buildinConfigUpdatedAt);P>O&&(e=E)}}let n=await zw(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let E=await oe.commands.getAll();for(let P of E)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await fp(),o=Q3(),s=await qr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Jt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let E=await Rw();p.interfaceLanguage=E}let g=p.interfaceLanguage==="en",m=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!g&&!m&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,C=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(C=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(C.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,B=await At("installedAt",""),S=Number(await Nr("translage_page_daily",0)),y=Number(await At(Kn,0)),_;y>0&&(Date.now()-y0&&(Date.now()-S0){let E=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(E.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],O=Array.isArray(P)?P:[P],H=Array.from(new Set(O.concat(E.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let F=Object.assign(i,e);Ya({rule:e,valueIsArray:E=>Array.isArray(i[E]),getMergedValue:E=>i[E],onMergedResult:(E,P)=>{E!="generalRule"&&(F[E]=P)}});let L=Zt(r),U={};p.translationServices&&p.translationServices.deepl&&(U=p.translationServices.deepl);let N={};p.translationServices&&p.translationServices.openai&&(N=p.translationServices.openai),!L&&U.authKey&&!U.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):U&&U.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!L&&N.APIKEY&&!N.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):N&&N.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),A=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let E of q){let P=E;if(P==="generalRule")typeof p[P]=="object"&&(F[P]=Tl(i[P],p[P]));else if(P==="translationServices")Nw(p,F);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&A.includes(P))p[P]&&(F[P]=Object.assign(F[P],p[P])),P==="shortcuts"&&(ye()||it()?F[P]={...F[P],...a}:F[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let O=F.rules||[],H={};for(let W of O)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?k3(e.generalRule,H[W.id],W):W);F[P]=[...j,...F[P]]}if(we.PROD==="0"&&we.DEV_RULES){let O=JSON.parse(we.DEV_RULES);F[P]=[...O,...F[P]]}}else p[P]!==void 0&&(F[P]=p[P])}return F.donateUrl=e.donateUrl,F.minVersion=e.minVersion,F.feedbackUrl=e.feedbackUrl,F.rawUserConfig=s,F}async function qr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function hs(t){await oe.storage.sync.set({userConfig:t})}async function bs(t,e){await oe.storage.local.set({[t]:e})}async function Pl(t){return(await oe.storage.local.get(t))[t]||""}var Rw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){z.warn("get browser language error:",r)}let n=t.map(r=>Te(r)).find(r=>Ot[r]);return n||"en"},fp=async()=>{let t={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:lr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Ow(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function zw(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return lr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ya({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ya({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var Uw=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function xn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(xn(t,i))return!1;if(xn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!xn(t,o)),c;function p(){return n&&n.display?!!Uw.includes(n.display):xn(t,r)}}var Kt=xn;function Qa(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function Ts(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function Tr(t,e=!1){let n=Io;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Za(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return Tr(n,e)}function Ui(t,e){return ua(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function hp(t){let{rule:e}=t,n=qw(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function qw(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function ys(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",bt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),ut(r,Uh,e.toString());let a=hp(t);return r.append(rt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function qi(t,e){return t.querySelector(`[${Ld}='${e}']`)}function J3(){document.querySelectorAll(`[${Ld}]`).forEach(e=>{e.remove()})}function X3(){document.querySelectorAll(`.${bt}-error`).forEach(e=>{e.remove()})}function e1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{Hi(n)&&e.push(n)}),e}function bp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),m=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(m,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let g=new RegExp(p,"gi");l=l.replace(g,(m,f)=>{let T=c++;return e[`${T}`]=O3(f),o.length>2?m.replace(f,`<${o[2]}${T}>`):m.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){z.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function vs(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||d1(s)||s1(s)||c1(s)||u1(s)||l1(s)||Hw(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ll(i,n,r)}function jr(t){return t.nodeType===Node.ELEMENT_NODE}function t1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function Tp(){return await At("fakeUserId","")}async function jw(){return await At("installedAt","")}async function n1(t){let n=Me().INSTALL_FROM,r=Sn(),a=await jw(),i=await Tp(),o=await Xt(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Zt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function r1(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await vp(t,e);r(a)})()},[t,e,r]),n}async function vp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!it()&&ye()||et().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>wt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>wt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var _l=!1,Ww=ye();function p1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function Kw(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&g1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(da(i,Eu)){if(a===!0)return!0;continue}if(Ss(i.nodeName,e.inlineTags))return!0;if(!Sp(i,e))return!1}}return!0}function xp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(Ss(t.nodeName,n)||Sp(t,e)){if(da(t,Hh)||Ss(t.nodeName,["BR"]))return!1;if(da(t,Eu))return!0;if(Sp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return Kw(t,e)}else return da(t,Eu);return!1}function g1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&da(t,jh,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&da(t,Bh))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||Ss(t.nodeName,i))}function Ll(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!f1(r)&&r.length>=n}function m1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(f1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function f1(t){for(let e=0;e127)return!1;return!0}function s1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function u1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function l1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function c1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function d1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function da(t,e,n=!1){return Ep(t,e,"1",n)}function Ep(t,e,n,r=!1){return _l&&!r?t[Tn]?!!(t[Tn]&&t[Tn][e]===n):!1:t.dataset[e]===n}function Wi(t){return(t.innerText||t.textContent||"").trim()}function Cp(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Fl(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function ut(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(_l&&!r?(t[Tn]||(t[Tn]={}),t[Tn][e]||(t[Tn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Ml(t,e,n=!1){if(_l&&!n){if(!t[Tn]||!t[Tn][e])return;delete t[Tn][e]}else delete t.dataset[e]}function Ki(t,e,n=!1){return _l&&!n?!t[Tn]||!t[Tn][e]?void 0:t[Tn][e]:t.dataset[e]}function Sp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!Ss(t.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Je())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function An(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){z.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else z.warn("injectCSS failed, rootDocument does not have head node",t)}function Hi(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(Ww){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function Ss(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function h1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function b1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||g1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return z.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function T1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();var v1="auto",Bl="auto",y1="auto";function S1(t){v1=t}function Nn(t){Bl=t}function yt(){return Bl!=="auto"?Bl:y1!=="auto"?y1:v1}function Il(){return Bl}function E1(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Un(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:g,sourceLanguageUrlPattern:m,immediateTranslationPattern:f}=n,T=g||"zh-CN",b=Gi(e,o),h=Gi(e,f),C=s,D=Object.keys(u);for(let ae of D){let ie=u[ae];if(Gi(e,ie)){C=ae;break}}let M=l,B=Object.keys(c);for(let ae of B){let ie=c[ae];if(ie&&Gi(e,ie)){M=ae;break}}let S=Gi(e,p),y=x1(e,p);y||(y=wt(e,Xh)),y||(y=wt(e,n.blockUrls));let _=x1(e,n.inputTranslationUrlPattern);_||(_=wt(e,n.inputTranslationBlockUrls));let k=wt(e,n.mutationBlockUrls),v=Object.keys(m),I={};for(let ae of v){let ie=m[ae];if(ie&&ie.matches)for(let Ee of ie.matches)I[Ee]=ae}let F=Object.keys(I),L=ip(e,F);L&&(i=I[L]??"auto",I[L]&&I[L]!=="auto"&&Nn(I[L]));let U=a.hostname,N=await nr(U),q=a.pathname+a.search+a.hash,A=await nr(q),E=`https://${N}.com/${A}`,P=await Jt(),O=await Z3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let se=await Mt.get(Ft,null),X=!1;se&&(X=Zt(se));let Z={targetLanguage:T,config:n,translationService:C,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:k,isInputTranslationExcludeUrl:_,rule:n.generalRule,url:e,encryptedUrl:E,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};se&&(Z.user=se,X?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(ae=>!Z.config.generalRule.bodyTranslateTags.includes(ae)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(ae=>ae!==".btn"));let ue=n.translationServices[Z.translationService]||{};ue.immediateTranslationTextCount!==void 0&&Gw(ue.immediateTranslationTextCount)&&ue.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCount),Z.translationService==="deepl"&&(ue&&ue.authKey&&ue.authKey.startsWith("immersive_")||ue&&ue.provider==="pro"&&Z.user?.token)&&ue.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ue.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCountForImmersiveDeepl),ue&&ue.translationDebounce&&typeof ue.translationDebounce=="number"&&(Z.state.translationDebounce=ue.translationDebounce);let ge=O.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let te=n.rules,Y;globalThis.PDFViewerApplication?Y=te.find(ae=>ae.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=te.find(ae=>ae.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=te.find(ae=>ae.pageType=="ebookBuilder"):Y=te.find(ae=>Gi(e,ae)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let be=n.generalRule;if(Y&&(Z.rule=Tl(be,Y)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(ae=>!Z.rule.bodyTranslateTags.includes(ae)&&!Z.rule.forceTranslateTags.includes(ae))),Z.rule.mainFrameSelector){let ae=document.querySelector(Z.rule.mainFrameSelector);ae&&(Z.mainFrame=ae)}return Z}function Gi(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&wt(t,r)?!1:n&&n.length>0&&wt(t,n)?!0:i&&i.length>0&&Fl(i)?!1:!!(a&&a.length>0&&Fl(a))}function x1(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&wt(t,n)||r&&r.length>0&&Fl(r))}function Gw(t){return typeof t=="number"}d();d();d();d();d();d();d();var Nq=w1(2),C1=w1(3);function w1(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var Vw=/\s+/g,$w=/[\t\n\v\f\r ]+/g;function D1(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?Yw:Qw;return String(t).replace(e.style==="html"?$w:Vw,e.trim?Zw(n):n)}function Yw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function Qw(){return" "}function Zw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var A1={}.hasOwnProperty;function Jw(t){return t==null?"":D1(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function Xw(t){return C1(" "+Jw(t)+" ")}function eD(t){let e=Xw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function sD(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function uD(t,e,n,r){e=cD(e,n,r);let a=[],i;if(e)for(i in e)Rl.call(e,i)&&a.push([i,lD(t,e[i])]);return a.length===0?Dp():a.sort(dD)}function lD(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of SD){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?I1(t)?"zh-TW":"zh-CN":e:"auto"}var O1=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Ap=new Map(O1),xD=new Map(O1.map(([t,e])=>[e,t]));function z1(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>xD.get(s));!e&&e!==0&&(e=25);let a=zl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Ap.keys()]},o=L1(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&g<.95)break;return Ap.get(p)}}let[s,u]=o[0],l=Ap.get(s);if(l&&u>.9)return l}}catch(r){z.error(r)}return"auto"}d();d();function pa(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function ED(t,e){return t<>>32-e}function Ul(t,e,n,r,a,i){return pa(ED(pa(pa(e,t),pa(r,i)),a),n)}function en(t,e,n,r,a,i,o){return Ul(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return Ul(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return Ul(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return Ul(n^(e|~r),t,e,a,i,o)}function Nl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function kp(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Nl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Nl(a.concat(kp(e)),512+e.length*8),N1(Nl(i.concat(o),512+128))}function U1(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function Pp(t){return unescape(encodeURIComponent(t))}function q1(t){return CD(Pp(t))}function DD(t){return U1(q1(t))}function j1(t,e){return wD(Pp(t),Pp(e))}function AD(t,e){return U1(j1(t,e))}function kn(t,e,n){return e?n?j1(e,t):AD(e,t):n?q1(t):DD(t)}var Vi=[];async function ql(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function H1(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await LD(e,t)}async function W1(t){let e=kn(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await PD(n,e)}async function PD(t,e){let n=await ql(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function LD(t,e){let n=await ql(t);return(await FD()).includes(t)||await _D(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function _D(t){let e="cache_list",n=await ql(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Vi.push(t)},a.onerror=i=>{n.close()}}async function FD(){if(Vi&&Vi.length>0)return Vi;let t=await ql(Q+"-cacheList","cache_list");return Vi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Vi}d();d();var Lp="Original";function $e(){return Lp}function pn(t){Lp=t,K1(Lp)}d();function Hr(t){return t?.id?.endsWith("pdfWebPage")||!1}function ga(t){try{if(!t||!Hr(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Ye={},ma=async function(t,e){let{method:n,data:r}=t,a=await Ye.updateGlobalContext(),i=Date.now();if(z.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Ze(Kn,i);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Ze(Kn,i);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Ze(Kn,i);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Ze(Kn,i);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Ze(Kn,i);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Ze(Kn,i);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Ze(Kn,i);else if(n==="translatePage")await Ye.translatePage(a,r),Ze(Kn,i);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(vu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(_o,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Je()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Je())return JSON.stringify(a)}};function G1(t){Object.assign(Ye,t)}function V1(t){Object.assign(Ye,t)}function $1(t){Object.assign(Ye,t)}var MD=function(t,e){let{method:n,data:r}=t;if(z.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return $e();if(n==="getCurrentPageLanguage"){let a=yt();return Ye.detectCurrentPageLanguage().catch(i=>{z.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return Nn(r),yt();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return ga(a?.rule)}}},jl,Hl;function Y1(){let t=Wl();Je()||BD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Wl(){return jl||(jl=new br("content_script",!1).getConnection("main",ma),jl)}function BD(){return Hl||(Hl=new br("content_script",!1).getConnection("main_sync",MD,{sync:!0}),Hl)}d();var _p=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Kl="https://transmart.qq.com/api/imt",Wr=class t{static langMapReverse=new Map(_p.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await de({url:Kl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function ID(t,e){return Math.floor(Math.random()*(e-t+1))+t}var RD=30,Fp="RATE_LIMITER_TICKS",$i=class t{static strictTicks={};static clearStrictTicks(){bs(Fp,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await Pl(Fp);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){z.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await bs(Fp,JSON.stringify(this.strictTicks))}catch(a){z.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=ID(4,RD);await Dr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function vt(t){return await Wl().sendMessage("background:main",t)}function de(t){return mu()?wl({method:"request",data:t}):ye()||gu()?(t.fetchPolyfill=globalThis.GM_fetch,Ur(t)):vt({method:"fetch",data:t})}function qn(){return ye()?Xt():vt({method:"getConfig"})}function gn(t){return ye()?hs(t):vt({method:"setUserConfig",data:t})}function mn(){return ye()?qr():vt({method:"getUserConfig"})}function Es(){return ye()?Jt():vt({method:"getLocalConfig"})}function Gl(t){return ye()?Ht(t):vt({method:"setLocalConfig",data:t})}function Q1(t){return ye()?kl(t):vt({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=zl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||it()){if(t.translateService&&!Du.includes(t.translateService))return Promise.resolve("auto");let r=z1(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await vt({method:"detectLanguage",data:t});return Promise.resolve(e)}function Z1(){return vt({method:"detectTabLanguage"})}async function Vl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||it()){let n=t.substring(0,200);e=await Wr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function K1(t){let e=new CustomEvent(Oa,{detail:t});if(document.dispatchEvent(e),ye())return;Wl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function J1(t){return ye()?W1(t):vt({method:"queryParagraphCache",data:t})}async function X1(t){if(ye()){await H1(t);return}return vt({method:"setParagraphCache",data:t})}async function e2(){if(ye())return Promise.resolve();await vt({method:"mockRequest"})}function Yi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):vt({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function $l(t=""){return ye()||it()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function Mp(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Yl(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):vt({method:"openAboutPage"})}function Qi(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):vt({method:"openInTab",data:t})}function t2(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):vt({method:"openEbookViewerPage"})}function n2(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):vt({method:"openEbookBuilderPage"})}function r2(t){it()}function Zi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):vt({method:"openPdfViewerPage",data:{url:e}})}function a2(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):vt({method:"openSubtitleBuilderPage"})}function Ji(t){return ye()?Promise.resolve():vt({method:"setBadge",data:{text:t}})}function i2(){return ye()?(z.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):vt({method:"autoSyncLatestConfig"})}function Ql(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function o2(t,e){return ye()?$i.getDelay(t,e):vt({method:"getDelay",data:{key:t,options:e}})}function s2(t){let e;try{e=new URL(t)}catch{return!1}let n=Mp(),r="";try{r=new URL(n).hostname}catch{}return!!(r&&e.hostname===r)}function Zl(t){let e;try{e=new URL(t)}catch{return!1}let n=Mp(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(Bp(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function Bp(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();d();d();d();var Ip={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Jl(t,e,n){let[r]=re(()=>typeof e=="function"?e():e),[a]=re(n),[i,o]=re(r),[s,u]=re(!1),[l,c]=re("");Ce(()=>{Ip.get(t,r,a).then(g=>{g[t]&&o(g[t]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[t,r,a]);let p=Ve(g=>{let m=typeof g=="function"?g(i):g;z.debug("new settings",m),Ip.set(t,m,a).then(()=>{o(m),u(!0),c("")}).catch(f=>{o(m),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Rp(t,e,n){let r=[];return function(){let[i,o,s,u]=Jl(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ce(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function u2(t,e){return Rp(t,e,"sync")}var OD="userConfig",zD=null,ND=u2(OD,zD);function rr(t){let[e,n,r,a]=ND(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();d();var Xi={},UD={root:"",lang:"en",fallbackLang:"en"};function Op(t,e){let n=Object.assign({},UD,t);Xi=e||Xi;let[r,a]=re(n.lang),[i,o]=re(Xi),[s,u]=re(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let g=H3(n.root||"",p);n.getUrl&&(g=n.getUrl(n.root||"",p),fetch(g).then(m=>m.json()).then(m=>{Xi[p]=m,o({...Xi}),u(!0)}).catch(m=>{o({...Xi}),u(!0)}))};return Ce(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,g)=>{if(!i.hasOwnProperty(r))return p;let m=gs(i,r,p);return m===p&&r!==n.fallbackLang&&(m=gs(i,n.fallbackLang,p)),pp(m,g)},isReady:s}}d();d();var qD=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--qD,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var Np=hi(null),zp={root:"assets",lang:"en",fallbackLang:"en"},eo=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Op({root:t.root||zp.root,lang:t.lang||zp.lang,fallbackLang:t.fallbackLang||zp.fallbackLang,getUrl:t.getUrl},t.translations);return w(Np.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function xe(){return du(Np)}d();var jD=function(t,e){let{method:n,data:r}=t;z.debug(`popup received message: ${n}`,r||" ");let a;e.active&&(a=e.id,globalThis.document.dispatchEvent(new CustomEvent(Mo,{detail:{tabId:a,payload:t}})))},Xl;function l2(){Cs()}function Cs(){return Xl||(Xl=new br("popup",!1).getConnection("main_sync",jD),Xl)}d();d();function c2(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var ec="DROP_DOWN_DEFAULT_VALUE";function Up(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=qe(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:ec,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==ec){s.current.value=ec,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:ec,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function to(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var HD=({date:t})=>{let{t:e}=xe(),[n,r]=re(!1);return Ce(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},WD=({minVersion:t})=>{let{t:e}=xe();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},KD=()=>{let{t}=xe();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},GD=({message:t,handleSyncing:e,date:n})=>{let{t:r}=xe();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function qp(t){let{isShowError:e,request:n}=t,[r,a]=re(null),{t:i}=xe(),[o,s]=re(null),[u,l]=re(null),[c,p]=re(""),[g,m]=re(!1),[f,T]=re(!1),[b,h]=re(!1),[C,D]=re(null),[M,B]=re(null),S=Sn(),y=async()=>{p("");let _=o;if(o===null)try{let k=await n({url:Bo});k?(s(k),_=k,m(!0)):(p(i("unknownError")),l(null))}catch(k){l(null),p(k.message);return}_!==null?(t.setStorageBuildinConfig(_),l(!1),a(_.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ce(()=>{Xt().then(_=>{let k=_.buildinConfigUpdatedAt;D(_);let v=new Date(k);if(a(k),S==="0.0.0"){h(!0);return}n({url:Bo}).then(I=>{let F=I,L=F.minVersion,U=S;s(F);let N=F.latestVersion;if(N&&(to(U,N)?B(!0):B(!1)),to(U,L)){let q=F.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(I=>{l(null),p(I.message)})})},[]),Ce(()=>{Xt().then(_=>{D(_)})},[r]),C?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(KD,{}):c?e===!1?null:w(GD,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(WD,{minVersion:o.minVersion}):u===null||u===!0?null:g?w(HD,{date:r}):null}):null}d();function VD(){return navigator.userAgent.indexOf("Mac")!==-1}var d2={Alt:"\u2325"};function tc(t=""){return VD()?Object.keys(d2).reduce((e,n)=>e.replace(n,d2[n]),t):t}d();d();var nc='',p2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",g2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==";var m2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",f2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",h2="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";function b2({config:t,isLogin:e,isProUser:n}){let{t:r}=xe();return ml(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?ku:r4,children:[w("img",{src:e?f2:m2}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?ku:a4,children:w("img",{src:n?p2:g2})})]})}d();d();var T2={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},y2={...Ot,"zh-CN":{...T2["zh-CN"],...Ot["zh-CN"]},"zh-TW":{...T2["zh-TW"],...Ot["zh-TW"]}},rc=y2;function no(t,e,n){return hr(y2,t,e,lr,n)}var fa=(t,e,n,r)=>{let a=Yh[t]||t,i=Qh[t],o=Zh[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();d();d();d();d();function jp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(Vh),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${Fd}-theme-${t}`):a.push(`${_d}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(Fd):a.push(_d),a}function Hp(t){let e=["notranslate",wu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function v2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Za(n,!0),g="afterend",m=p[0],f=p[1],T=`${m}(\\d+)${f}`,b=new RegExp(T,"g"),h=rt.sanitize(u);o.length>0&&(h=h.replace(b,B=>{let S=h.indexOf(B),y=h[S-1]===" ",_=h[S+B.length]===" ",v=B.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),I=Number(v);if(isNaN(I))return B;let F=o[I];if(F&&F.type==="element"){let L=F.value.outerHTML;return y||(L=" "+L),_||(L=L+" "),L}else z.error("variable type not supported",F,B);return B}));let C=jp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&C.push(Gh);let D=Hp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${C.join(" ")}" ${ur}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${ur}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ur}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function ac(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";g&&(T=ca(Wp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Kt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let C=Kp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",B=Ts(C+D+M),S=B[0]+h+B[1];if(C===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=Ts(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Kp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);g&&(b=ca(Wp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",C=Ts(T+b+h),D=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(T===" ")D=D.trimStart();else{let M=Ts(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Kp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Wp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}t.targetText=rt.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` -`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Za(e);if(l.length>2){let c=l[2];return $D({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=v2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Wp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function $D(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=rt.sanitize(p);let g=p,m=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(g=g.replace(m,C=>{let D=g.indexOf(C),M=g[D-1]===" ",B=g[D+C.length]===" ",S=C.match(f);if(!S)return C;let y=S[1],_=Number(y);if(isNaN(_))return C;let k=o[Number(_)];if(k&&k.type==="element"){let v=k.value.outerHTML;return M||(v=" "+v),B||(v=v+" "),v}else if(k&&k.type==="text"){let v=k.value;return M||(v=" "+v),B||(v=v+" "),v}else z.error("variable type not supported",k,C);return C}));let T=jp(l,n,r||[],s),b=Hp(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${T.join(" ")}" ${ur}="1"><${a} class="${b.join(" ")}" ${ur}="1">${g}`,n||(i==="smart"?g=`
${g}`:g=`${i}${g}`),n&&(i!=="smart"?g=`${i}${g}`:g=`<${a} class="notranslate" ${ur}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function Kp(t){let e=t[t.length-1];return e?e.text:""}function Gp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let g=p[1],m=Number(g);if(isNaN(m))return c;let f=r[g];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=z3(a,c,p)}catch(b){if(r)for(let h=0;hb));let g=[],m=[],f=(b,h,C)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),m[b]||(m[b]=h,m[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),m[b].hasError)return;if(C){let S=C instanceof $?new $(C.name,C.message).initNetWork(C.status).initData(C.data):C;m[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}m[b].translatedTexts[h.partIndex]=D;let M=m[b],B=0;for(let S=0;S{let B=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(B=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:B,to:h.to,url:C,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=Kh;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let _=[],k=Tr(this.serviceConfig);if(h.tempSentences.forEach((q,A)=>{let E=bp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:k,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(E&&E.text&&E.text.trim().lengthA.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:B,to:h.to})}let v="";y&&y.length>=2?v=_.map((q,A)=>{let{item:E}=q;return A===_.length-1?E.text:E.text+y[0]+(A+1)+y[1]}).join(""):v=_.map(({item:q})=>q.text).join(S);let I=await this.translate({text:v,from:B,to:h.to,url:C,options:{...n,rawTextArrayLength:_.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=I,L=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let A=new RegExp(q,"g");L=F.split(A)}else L=F.split(S);let U=[];if(L.length>_.length){for(let q=0;q<_.length-1;q++)U[q]=L[q];U[_.length-1]=L.slice(_.length-1).join(S)}else if(L.length<_.length)for(let q=L.length;q<_.length;q++)L[q]="";else U=[...L];let N=h.tempSentences.map(q=>q.text);return k=Tr(this.serviceConfig,!0),U.forEach((q,A)=>{let E=_[A],P=E.index,O=E.variables||{};Object.keys(O).length>0&&(q=Gp({text:q,delimiters:k,variables:O})),N[P]=q}),{sourceTempSentences:h.tempSentences,text:N,from:I.from,to:I.to}}};g.push(M().then(B=>{let{text:S,sourceTempSentences:y}=B;for(let _=0;_{if(B instanceof $&&B.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=Tr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,g)=>{let m=bp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[g]!==!0&&(m&&m.text&&m.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){z.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=Tr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let g=p.index,m=p.variables,f=Object.keys(m);u[g]=l,f.length>0&&(u[g]=Gp({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[yt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};var x2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],ws=class t extends De{static langMap=new Map(x2);maxTextGroupLength=50;static langMapReverse=new Map(x2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await nr(a)].join(` +`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};function Q3(){if(we.PROD==="1")return{};let t={};if(we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:we.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};t.translationServices={},t.translationServices.tencent=n}if(we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:we.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};t.translationServices||(t.translationServices={}),t.translationServices.baidu=n}if(we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:we.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};t.translationServices||(t.translationServices={}),t.translationServices.caiyun=n}if(we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:we.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};t.translationServices||(t.translationServices={}),t.translationServices.openl=n}if(we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:we.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};t.translationServices||(t.translationServices={}),t.translationServices.youdao=n}if(we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:we.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};t.translationServices||(t.translationServices={}),t.translationServices.volc=n}if(we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:we.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};t.translationServices||(t.translationServices={}),t.translationServices.deepl=n}if(we.DEEPL_PROXY_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateApiUrl=we.DEEPL_PROXY_ENDPOINT),we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(t.translationServices||(t.translationServices={}),t.translationServices.deepl||(t.translationServices.deepl={}),t.translationServices.deepl.immersiveTranslateDeeplTokenUrl=we.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:we.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};t.translationServices||(t.translationServices={}),t.translationServices.openai=n}we.IMMERSIVE_TRANSLATE_SERVICE&&(t.translationService=we.IMMERSIVE_TRANSLATE_SERVICE);let e={};return we.DEBUG==="1"&&(e.debug=!0,e.cache=!1),we.MOCK==="1"&&(e.translationService="mock"),e}async function Jt(){let t=await oe.storage.local.get(Mo);if(t[Mo]){let e=t[Mo],n=e.tempTranslationUrlMatches||[],r=n.filter(o=>o.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let i={...e,tempTranslationUrlMatches:[...n]};return a&&await Wt(i),i}else return{}}async function Wt(t){await oe.storage.local.set({[Mo]:t})}async function kl(t){await oe.storage.local.set({[Yr]:t})}async function Z3(){let t=await oe.storage.local.get(Yr),n={...await mp(),...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let r=t[Yr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),i=new Date(n.buildinConfigUpdatedAt);a>i&&(n=r)}}return n}async function Xt(){let t=await oe.storage.local.get(Yr),e={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};if(t[Yr]){let E=t[Yr];if(E&&E.buildinConfigUpdatedAt){let P=new Date(E.buildinConfigUpdatedAt),O=new Date(e.buildinConfigUpdatedAt);P>O&&(e=E)}}let n=await zw(e);e.targetLanguage=n;let r=await Mt.get(Ft,null),a={};if(!ye()&&oe.commands&&oe.commands.getAll){let E=await oe.commands.getAll();for(let P of E)P.name&&P.shortcut&&(a[P.name]=P.shortcut)}let i=await mp(),o=Q3(),s=await qr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Jt(),c=new Date,p=Object.assign({},u,o,s);if(!p.interfaceLanguage){let E=await Rw();p.interfaceLanguage=E}let g=p.interfaceLanguage==="en",m=p.targetLanguage==="en",f=e&&e.translationLanguagePattern&&e.translationLanguagePattern.matches&&e.translationLanguagePattern.matches.length===0,T=["bing","google","transmart","mock"].includes(p.translationService)||!p.translationService;!g&&!m&&!f&&T?e.translationLanguagePattern||(e.translationLanguagePattern={matches:["en"],excludeMatches:[]}):e.translationLanguagePattern={matches:[],excludeMatches:[]};let b=e&&e.enableDefaultAlwaysTranslatedUrls;p.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=p&&p.isChangedAlwaysTranslatedUrls,C=[];p.translationUrlPattern&&p.translationUrlPattern.matches&&(C=p.translationUrlPattern.matches||[]);let D=!1;h===void 0&&(C.length>0?h=!0:h=!1,p.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,D=!0);let M=(p?.translationLanguagePattern?.matches?.length||0)>0,B=await At("installedAt",""),S=Number(await Nr("translage_page_daily",0)),y=Number(await At(Kn,0)),_;y>0&&(Date.now()-y0&&(Date.now()-S0){let E=l.tempTranslationUrlMatches.filter(P=>new Date(P.expiredAt)>c);if(E.length>0){let P=p.translationUrlPattern?p.translationUrlPattern?.matches||[]:[],O=Array.isArray(P)?P:[P],H=Array.from(new Set(O.concat(E.map(j=>j.match))));p.translationUrlPattern={...p.translationUrlPattern,matches:H}}}let F=Object.assign(i,e);Ya({rule:e,valueIsArray:E=>Array.isArray(i[E]),getMergedValue:E=>i[E],onMergedResult:(E,P)=>{E!="generalRule"&&(F[E]=P)}});let L=Zt(r),U={};p.translationServices&&p.translationServices.deepl&&(U=p.translationServices.deepl);let N={};p.translationServices&&p.translationServices.openai&&(N=p.translationServices.openai),!L&&U.authKey&&!U.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):U&&U.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!L&&N.APIKEY&&!N.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):N&&N.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let q=Object.keys(F),A=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let E of q){let P=E;if(P==="generalRule")typeof p[P]=="object"&&(F[P]=Tl(i[P],p[P]));else if(P==="translationServices")Nw(p,F);else if(typeof p[P]!="string"&&typeof p[P]!="boolean"&&typeof p[P]!="number"&&A.includes(P))p[P]&&(F[P]=Object.assign(F[P],p[P])),P==="shortcuts"&&(ye()||ot()?F[P]={...F[P],...a}:F[P]={...a});else if(P==="rules"){if(Array.isArray(p[P])){let O=F.rules||[],H={};for(let W of O)W.id&&(H[W.id]=W);let j=p[P].map(W=>W.id&&H[W.id]?k3(e.generalRule,H[W.id],W):W);F[P]=[...j,...F[P]]}if(we.PROD==="0"&&we.DEV_RULES){let O=JSON.parse(we.DEV_RULES);F[P]=[...O,...F[P]]}}else p[P]!==void 0&&(F[P]=p[P])}return F.donateUrl=e.donateUrl,F.minVersion=e.minVersion,F.feedbackUrl=e.feedbackUrl,F.rawUserConfig=s,F}async function qr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function bs(t){await oe.storage.sync.set({userConfig:t})}async function Ts(t,e){await oe.storage.local.set({[t]:e})}async function Pl(t){return(await oe.storage.local.get(t))[t]||""}var Rw=async()=>{let t=["zh-CN"];try{t=await oe.i18n.getAcceptLanguages()}catch(r){z.warn("get browser language error:",r)}let n=t.map(r=>be(r)).find(r=>zt[r]);return n||"en"},mp=async()=>{let t={...Ni,buildinConfigUpdatedAt:we.BUILD_TIME};return{...t,targetLanguage:lr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...t.monkeyH5FloatBall},pcFloatBall:{...t.pcFloatBall},generalRule:{...t.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function Ow(t,e){return t=t||[],e=e||[],t.length!==e.length?!0:e.filter(r=>!t.includes(r)).length>0}async function zw(t){try{let e=t?.autoSelectTargetLanguageAfterInstalledAt;if(!e)return lr;let n=await At("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ya({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ya({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(t.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let o=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,p)=>o.includes(p)?c:u?.env[p]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var Uw=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function xn(t,e){if(e.length===0)return!1;let n=e.join(",");return t.matches&&t.matches(n)||!1}function la(t,e,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:i,atomicBlockSelectors:o}=e;if(xn(t,i))return!1;if(xn(t,a)||["br","input"].includes(t.nodeName.toLowerCase()))return!0;let l=null;if(t.parentNode&&t.parentNode.immersiveTranslateComputedStyle&&(l=t.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=p();return c&&(c=!xn(t,o)),c;function p(){return n&&n.display?!!Uw.includes(n.display):xn(t,r)}}var Gt=xn;function Qa(t){return!!t.shadowRoot}function ca(t){if(!t||typeof t!="string"&&(t=t.textContent,!t))return"";let e="";return t!==t.trimStart()&&(e+=" "),e+=t.trim(),e===" "||t!==t.trimEnd()&&(e+=" "),e}function ys(t){if(!t)return["",""];if(typeof t!="string"&&(t=t.textContent,!t))return["",""];let e=[];return t!==t.trimStart()?e.push(" "):e.push(""),!t.trim()&&e.length===1?[" ",""]:(t!==t.trimEnd()?e.push(" "):e.push(""),e)}function Tr(t,e=!1){let n=Ro;return e&&t?.translatedPlaceholderDelimiters?n=t.translatedPlaceholderDelimiters:t?.placeholderDelimiters&&(n=t.placeholderDelimiters),n}function Za(t,e=!1){let n=t.config?.translationServices?.[t.translationService];return Tr(n,e)}function Ui(t,e){return ua(e,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})}function fp(t){let{rule:e}=t,n=qw(t);return` <${e.targetWrapperTag} class="${n} notranslate">`}function qw(t){let e=t.config.loadingTheme;return`${Q}-loading-${e}`}function vs(t,e){let n=t.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",bt),r.setAttribute("translate","no"),r.setAttribute("lang",t.targetLanguage),ut(r,Uh,e.toString());let a=fp(t);return r.append(at.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function qi(t,e){return t.querySelector(`[${Pd}='${e}']`)}function J3(){document.querySelectorAll(`[${Pd}]`).forEach(e=>{e.remove()})}function X3(){document.querySelectorAll(`.${bt}-error`).forEach(e=>{e.remove()})}function e1(){let t=document.querySelectorAll("iframe"),e=[];return t.forEach(n=>{Hi(n)&&e.push(n)}),e}function hp(t){let e={},{glossaries:r,_systemExcludeWordRegex:a,text:i,delimiters:o,excludeRegexps:s,targetLanguage:u}=t,l=i,c=1001;try{if(r&&r.length>0){let p={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(p[f.k]=f.v||"",!0):!1).sort((f,T)=>f.tl&&!T.tl?1:!f.tl&&T.tl?-1:0),m=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(m,(f,T)=>{let b=c++;return e[`${b}`]=p[T]||T,o.length>2?f.replace(T,`<${o[2]}${b}>`):f.replace(T,`${o[0]}${b}${o[1]}`)})}s&&s.length>0&&s.forEach(p=>{let g=new RegExp(p,"gi");l=l.replace(g,(m,f)=>{let T=c++;return e[`${T}`]=O3(f),o.length>2?m.replace(f,`<${o[2]}${T}>`):m.replace(f,`${o[0]}${T}${o[1]}`)})})}catch(p){z.debug(`format source text error: ${p.message}`)}return{text:l,variables:e}}function Ss(t){let{noTranslateRegexp:e,minTextCount:n,minWordCount:r,delimiters:a,text:i}=t,o=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];o=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=i.trim();return s=s.replace(o,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(i)||s.includes("")||s.includes("< styles>")||d1(s)||s1(s)||c1(s)||u1(s)||l1(s)||Hw(s)||o.test(s)||e&&e.length>0&&new RegExp(e.join("|"),"gi").test(s)?!1:Ll(i,n,r)}function jr(t){return t.nodeType===Node.ELEMENT_NODE}function t1(t,e){return t.paragraphs?t.paragraphs[0]?.ctxId!==e?(t.paragraphs=[],!1):!0:!1}async function bp(){return await At("fakeUserId","")}async function jw(){return await At("installedAt","")}async function n1(t){let n=Me().INSTALL_FROM,r=Sn(),a=await jw(),i=await bp(),o=await Xt(),s=!1,u=await Mt.get(Ft,null),l=!1;return u&&Zt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:t,optionInterfaceLang:o.interfaceLanguage,deviceId:i,isProUser:s,isTrial:l}}function r1(t,e,n,r){if(!e||!r||!t)return"";let a=t.xpathRule,i=0,o=n;for(;o&&o!==r;)i++,o=o.parentNode;let s=i+"";for(let u=0;u{!t||!e||(async()=>{let a=await yp(t,e);r(a)})()},[t,e,r]),n}async function yp(t,e){if(!t||!e)return;let n=!1,r,a=!0;!ot()&&ye()||tt().any?(a=!1,r=e.monkeyH5FloatBall,!r&&t.rule.isShowUserscriptPagePopup==!1&&(r=t.config.monkeyH5FloatBall,r.enable=!1),r||(r=t.config.monkeyH5FloatBall),n=!e.monkeyH5FloatBall):(r=t.config.pcFloatBall,n=!e.pcFloatBall);try{if(r?.afterInstalledAt&&n){let i=await At("installedAt","");new Date(i).getTime()s==n),a=t.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),i=t.config.translationModeUrlPattern.dualMatches.find(s=>wt(t.url,s));return t.config.translationModeUrlPattern.translationMatches.find(s=>wt(t.url,s))?"translation":i?"dual":a?"translation":r?"dual":null}var _l=!1,Ww=ye();function p1(t,e){let n=[];for(let r of e){let a=t.querySelectorAll(r);for(let i of a)n.push(i)}return n}function Kw(t,e){let n=function(i){return i.nodeType===Node.ELEMENT_NODE||i.nodeType===Node.TEXT_NODE?i.nodeType===Node.ELEMENT_NODE&&g1(i,e,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let i=r.currentNode;if(i.nodeType===Node.ELEMENT_NODE){if(da(i,Eu)){if(a===!0)return!0;continue}if(xs(i.nodeName,e.inlineTags))return!0;if(!vp(i,e))return!1}}return!0}function Sp(t,e){let n=e.inlineTags;if(t.nodeType===Node.ELEMENT_NODE)if(xs(t.nodeName,n)||vp(t,e)){if(da(t,Hh)||xs(t.nodeName,["BR"]))return!1;if(da(t,Eu))return!0;if(vp(t,e)){let r=globalThis.getComputedStyle(t);if(r.display==="block"||r.display==="flex")return!1}return Kw(t,e)}else return da(t,Eu);return!1}function g1(t,e,n){if(!(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.TEXT_NODE)||t.nodeType===Node.ELEMENT_NODE&&da(t,jh,!0))return!0;if(t.nodeType===Node.ELEMENT_NODE&&da(t,Bh))return!1;let{stayOriginalTags:r,excludeTags:a}=e,i=[];return n&&a&&a.length>0?i=a||[]:i=a.filter(o=>!r.includes(o)),!!(t.nodeType===Node.ELEMENT_NODE&&(t.getAttribute("translate")==="no"||t.classList.contains("notranslate"))||xs(t.nodeName,i))}function Ll(t,e,n){let r=t.trim();return r.length>=e||r.split(" ").filter(o=>o.trim()!=="").length>=n||!f1(r)&&r.length>=n}function m1(t,e,n){let r=t.trim();if(r.length<=e)return!0;if(f1(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function f1(t){for(let e=0;e127)return!1;return!0}function s1(t){if(t&&t.includes("://")&&!t.includes(" ")&&t.length<512)try{return new URL(t),!0}catch{return!1}else return!1}function u1(t){return t?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(t):!1}function l1(t){return t?/^[_\d:\-+\.。,,% ]+$/.test(t):!1}function c1(t){if(t&&t.startsWith("#")){if(t.split("#").length>2)return!1;if(t.indexOf(" ")===-1)return!0}return!1}function d1(t){return!!(t&&t.startsWith("@")&&t.indexOf(" ")===-1)}function da(t,e,n=!1){return xp(t,e,"1",n)}function xp(t,e,n,r=!1){return _l&&!r?t[Tn]?!!(t[Tn]&&t[Tn][e]===n):!1:t.dataset[e]===n}function Wi(t){return(t.innerText||t.textContent||"").trim()}function Ep(t){let e=t.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Fl(t){return t?typeof t=="string"?document.querySelector(t)!==null:t.some(e=>document.querySelector(e)):!1}function ut(t,e,n,r=!1,a=!1){t.isContentEditable&&!a||(_l&&!r?(t[Tn]||(t[Tn]={}),t[Tn][e]||(t[Tn][e]=n)):t.dataset[e]!==n&&(t.dataset[e]=n))}function Ml(t,e,n=!1){if(_l&&!n){if(!t[Tn]||!t[Tn][e])return;delete t[Tn][e]}else delete t.dataset[e]}function Ki(t,e,n=!1){return _l&&!n?!t[Tn]||!t[Tn][e]?void 0:t[Tn][e]:t.dataset[e]}function vp(t,e){let n=e.allBlockTags.concat(e.inlineTags).concat(e.excludeTags);return!xs(t.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Xe())return globalThis.location.href;try{let e=globalThis.location.href,n=new URL(e);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return e}catch{}return globalThis.location.href}function An(t,e,n){if(t instanceof ShadowRoot){try{t.appendChild(document.createElement("style")).textContent=e}catch(r){z.warn("injectCSS failed, rootDocument"+r?.message,t)}return}if(t&&t.head&&t.head.appendChild){let r=t.createElement("style");if(n){let a=t.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=e,t.head.appendChild(r)}else if(t){let r=document.createElement("head"),a=document.createElement("style");a.textContent=e,r.appendChild(a),t.appendChild(r)}else z.warn("injectCSS failed, rootDocument does not have head node",t)}function Hi(t){let e=t.getAttribute("src");if(e){if(e==="about:blank")return!0;if(Ww){if(e.startsWith("blob:"))return!0}else if(e.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!e.startsWith("blob:http");return!1}try{if(t.contentDocument&&t.contentDocument.body)return!0}catch{}return!1}function xs(t,e){if(!t||!e)return!1;Array.isArray(e)||(e=[e]),t=t.toUpperCase();for(let n of e)if(t===n)return!0;return!1}function h1(t){let e=t.replace("#",""),n=parseInt(e.substring(0,2),16),r=parseInt(e.substring(2,4),16),a=parseInt(e.substring(4,6),16);return{r:n,g:r,b:a}}function b1(t,e,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(t,e);if(a){let i=r.document.createRange(),o=a.offsetNode;if(!o||o.nodeType!==Node.TEXT_NODE||g1(o,n,!0))return null;try{i.setStart(o,a.offset),i.setEnd(o,a.offset)}catch(s){return z.warn("getRangeFromPoint error",s),null}return i}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(t,e):null}function T1(t,e,n){let r=0,a=(i,o,s,u)=>{if(++r>100||u===i)return i;let l=i.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return i;let c=l.elementFromPoint(o,s);return c?a(c,o,s,i):i};return a(t,e,n)}d();var v1="auto",Bl="auto",y1="auto";function S1(t){v1=t}function Nn(t){Bl=t}function yt(){return Bl!=="auto"?Bl:y1!=="auto"?y1:v1}function Il(){return Bl}function E1(t,e){let n=Object.assign({},t),r=new Map;(n.langOverrides||[]).forEach(i=>{r.set(i.id,i)});for(let i of r.keys()){let[o,s]=i.split("2");if(["auto",e.sourceLanguage].includes(o)&&["auto",e.targetLanguage].includes(s)){let u=r.get(i);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Un(t){let{url:e,config:n,state:r}=t,a=new URL(e),i="auto",{translationParagraphLanguagePattern:o,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:p,targetLanguage:g,sourceLanguageUrlPattern:m,immediateTranslationPattern:f}=n,T=g||"zh-CN",b=Gi(e,o),h=Gi(e,f),C=s,D=Object.keys(u);for(let ae of D){let ie=u[ae];if(Gi(e,ie)){C=ae;break}}let M=l,B=Object.keys(c);for(let ae of B){let ie=c[ae];if(ie&&Gi(e,ie)){M=ae;break}}let S=Gi(e,p),y=x1(e,p);y||(y=wt(e,Xh)),y||(y=wt(e,n.blockUrls));let _=x1(e,n.inputTranslationUrlPattern);_||(_=wt(e,n.inputTranslationBlockUrls));let k=wt(e,n.mutationBlockUrls),v=Object.keys(m),I={};for(let ae of v){let ie=m[ae];if(ie&&ie.matches)for(let Ee of ie.matches)I[Ee]=ae}let F=Object.keys(I),L=ap(e,F);L&&(i=I[L]??"auto",I[L]&&I[L]!=="auto"&&Nn(I[L]));let U=a.hostname,N=await nr(U),q=a.pathname+a.search+a.hash,A=await nr(q),E=`https://${N}.com/${A}`,P=await Jt(),O=await Z3(),H=n.translationStartMode;H==="dynamic"&&h&&(H="immediate");let j=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(j=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let se=await Mt.get(Ft,null),X=!1;se&&(X=Zt(se));let Z={targetLanguage:T,config:n,translationService:C,inputTranslationService:j,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:S,sourceLanguage:i,mainFrame:document.body,isTranslateExcludeUrl:y,isMutationTranslationExcludeUrl:k,isInputTranslationExcludeUrl:_,rule:n.generalRule,url:e,encryptedUrl:E,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:H,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:M,isTranslateDirectlyOnHover:!1},localConfig:P};se&&(Z.user=se,X?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(ae=>!Z.config.generalRule.bodyTranslateTags.includes(ae)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(ae=>ae!==".btn"));let ue=n.translationServices[Z.translationService]||{};ue.immediateTranslationTextCount!==void 0&&Gw(ue.immediateTranslationTextCount)&&ue.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCount),Z.translationService==="deepl"&&(ue&&ue.authKey&&ue.authKey.startsWith("immersive_")||ue&&ue.provider==="pro"&&Z.user?.token)&&ue.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ue.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ue.immediateTranslationTextCountForImmersiveDeepl),ue&&ue.translationDebounce&&typeof ue.translationDebounce=="number"&&(Z.state.translationDebounce=ue.translationDebounce);let ge=O.immediateTranslationTextCount;n.immediateTranslationTextCount!==ge&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let te=n.rules,Y;globalThis.PDFViewerApplication?Y=te.find(ae=>ae.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=te.find(ae=>ae.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=te.find(ae=>ae.pageType=="ebookBuilder"):Y=te.find(ae=>Gi(e,ae)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let Te=n.generalRule;if(Y&&(Z.rule=Tl(Te,Y)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(ae=>!Z.rule.bodyTranslateTags.includes(ae)&&!Z.rule.forceTranslateTags.includes(ae))),Z.rule.mainFrameSelector){let ae=document.querySelector(Z.rule.mainFrameSelector);ae&&(Z.mainFrame=ae)}return Z}function Gi(t,e){if(!e)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:i}=e;return r&&r.length>0&&wt(t,r)?!1:n&&n.length>0&&wt(t,n)?!0:i&&i.length>0&&Fl(i)?!1:!!(a&&a.length>0&&Fl(a))}function x1(t,e){if(!e)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=e;return!!(n&&n.length>0&&wt(t,n)||r&&r.length>0&&Fl(r))}function Gw(t){return typeof t=="number"}d();d();d();d();d();d();d();var Nq=w1(2),C1=w1(3);function w1(t){if(typeof t!="number"||Number.isNaN(t)||t<1||t===Number.POSITIVE_INFINITY)throw new Error("`"+t+"` is not a valid argument for `n-gram`");return e;function e(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),i=a.length-t+1;if(i<1)return r;for(;i--;)r[i]=a.slice(i,i+t);return r}}d();var Vw=/\s+/g,$w=/[\t\n\v\f\r ]+/g;function D1(t,e){e?typeof e=="string"&&(e={style:e}):e={};let n=e.preserveLineEndings?Yw:Qw;return String(t).replace(e.style==="html"?$w:Vw,e.trim?Zw(n):n)}function Yw(t){let e=/\r?\n|\r/.exec(t);return e?e[0]:" "}function Qw(){return" "}function Zw(t){return e;function e(n,r,a){return r===0||r+n.length===a.length?"":t(n)}}var A1={}.hasOwnProperty;function Jw(t){return t==null?"":D1(String(t).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function Xw(t){return C1(" "+Jw(t)+" ")}function eD(t){let e=Xw(t),n={},r=-1;for(;++rn&&(n=i,r=a)}return[r,n]}function sD(t,e){let n=t.match(e);return(n?n.length:0)/t.length||0}function uD(t,e,n,r){e=cD(e,n,r);let a=[],i;if(e)for(i in e)Rl.call(e,i)&&a.push([i,lD(t,e[i])]);return a.length===0?wp():a.sort(dD)}function lD(t,e){let n=0,r=-1;for(;++re.traditionalCharacters?(e.detectedCharacters="simplified",e.detectionRate=e.simplifiedCharacters/e.traditionalCharacters|1):e.simplifiedCharacterso+s.length,0));let i=t.length-r;for(let o of SD){let s=o[1],u=o[0],l=t.match(s),c=l?l.length:0;c>n&&(n=c,e=u)}return n*2.5/i>.5?e==="zh-CN"?I1(t)?"zh-TW":"zh-CN":e:"auto"}var O1=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Dp=new Map(O1),xD=new Map(O1.map(([t,e])=>[e,t]));function z1(t,e,n=["en"]){if(!t)return"auto";try{let r=n.map(s=>xD.get(s));!e&&e!==0&&(e=25);let a=zl(t);if(a!=="auto")return a;let i={minLength:e,whitelist:[...Dp.keys()]},o=L1(t,i);if(o&&o.length>0){if(o.length>1&&o[0][1]-o[1][1]<=.3)for(let c=0;c.5&&c/o.length<=.25){if(p=="eng"&&g<.95)break;return Dp.get(p)}}let[s,u]=o[0],l=Dp.get(s);if(l&&u>.9)return l}}catch(r){z.error(r)}return"auto"}d();d();function pa(t,e){var n=(t&65535)+(e&65535),r=(t>>16)+(e>>16)+(n>>16);return r<<16|n&65535}function ED(t,e){return t<>>32-e}function Ul(t,e,n,r,a,i){return pa(ED(pa(pa(e,t),pa(r,i)),a),n)}function en(t,e,n,r,a,i,o){return Ul(e&n|~e&r,t,e,a,i,o)}function tn(t,e,n,r,a,i,o){return Ul(e&r|n&~r,t,e,a,i,o)}function nn(t,e,n,r,a,i,o){return Ul(e^n^r,t,e,a,i,o)}function rn(t,e,n,r,a,i,o){return Ul(n^(e|~r),t,e,a,i,o)}function Nl(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var n,r,a,i,o,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>e%32&255);return n}function Ap(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(t.charCodeAt(e/8)&255)<16&&(r=Nl(r,t.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,i[n]=r[n]^1549556828;return o=Nl(a.concat(Ap(e)),512+e.length*8),N1(Nl(i.concat(o),512+128))}function U1(t){var e="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+e.charAt(r&15);return n}function kp(t){return unescape(encodeURIComponent(t))}function q1(t){return CD(kp(t))}function DD(t){return U1(q1(t))}function j1(t,e){return wD(kp(t),kp(e))}function AD(t,e){return U1(j1(t,e))}function kn(t,e,n){return e?n?j1(e,t):AD(e,t):n?q1(t):DD(t)}var Vi=[];async function ql(t,e){return await new Promise((n,r)=>{let a=t,i=1,o=indexedDB.open(a,i);o.onsuccess=s=>{n(o.result)},o.onerror=s=>{r()},o.onupgradeneeded=s=>{let u=o.result,l=e||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function H1(t){let e=`${Q}-${t.service}@${t.from}->${t.to}`;return await LD(e,t)}async function W1(t){let e=kn(t.originalText),n=`${Q}-${t.service}@${t.from}->${t.to}`;return await PD(n,e)}async function PD(t,e){let n=await ql(t);return await new Promise((r,a)=>{if(!n)return a();let i="cache",s=n.transaction([i],"readonly").objectStore(i).get(e);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function LD(t,e){let n=await ql(t);return(await FD()).includes(t)||await _D(t),await new Promise(a=>{if(!n)return a(!1);let i="cache",s=n.transaction([i],"readwrite").objectStore(i).put(e);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function _D(t){let e="cache_list",n=await ql(Q+"-cacheList",e),a=n.transaction([e],"readwrite").objectStore(e).put({key:t});a.onsuccess=i=>{n.close(),Vi.push(t)},a.onerror=i=>{n.close()}}async function FD(){if(Vi&&Vi.length>0)return Vi;let t=await ql(Q+"-cacheList","cache_list");return Vi=await new Promise(e=>{let n="cache_list",a=t.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=i=>{t.close(),e(a.result)},a.onerror=i=>{t.close(),e([])}}),Vi}d();d();var Pp="Original";function $e(){return Pp}function pn(t){Pp=t,K1(Pp)}d();function Hr(t){return t?.id?.endsWith("pdfWebPage")||!1}function ga(t){try{if(!t||!Hr(t))return"";let e="";if(t.pdfUrlExtractRule.attribute&&t.pdfUrlExtractRule.selector){let r=t.pdfUrlExtractRule,{selector:a,attribute:i}=r;if(a&&i){let o=document.querySelector(a);if(!o)return"";e=o.getAttribute(i)||""}}else e=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(e.startsWith("about"))return"";if(!e.startsWith("/"))return e;let n=new URL(location.href);return e.startsWith("//")?n.protocol+e:n.protocol+"//"+n.host+e}catch{return""}}var Ye={},ma=async function(t,e){let{method:n,data:r}=t,a=await Ye.updateGlobalContext(),i=Date.now();if(z.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Je(Kn,i);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Je(Kn,i);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Je(Kn,i);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Je(Kn,i);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Je(Kn,i);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Je(Kn,i);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Je(Kn,i);else if(n==="translatePage")await Ye.translatePage(a,r),Je(Kn,i);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(vu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Fo,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Xe()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Xe())return JSON.stringify(a)}};function G1(t){Object.assign(Ye,t)}function V1(t){Object.assign(Ye,t)}function $1(t){Object.assign(Ye,t)}var MD=function(t,e){let{method:n,data:r}=t;if(z.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return $e();if(n==="getCurrentPageLanguage"){let a=yt();return Ye.detectCurrentPageLanguage().catch(i=>{z.warn("detectCurrentPageLanguage failed",i)}),a}else{if(n==="setCurrentPageLanguageByClient")return Nn(r),yt();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:i,bodyNode:o,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return ga(a?.rule)}}},jl,Hl;function Y1(){let t=Wl();Xe()||BD(),t.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function Wl(){return jl||(jl=new br("content_script",!1).getConnection("main",ma),jl)}function BD(){return Hl||(Hl=new br("content_script",!1).getConnection("main_sync",MD,{sync:!0}),Hl)}d();var Lp=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Kl="https://transmart.qq.com/api/imt",Wr=class t{static langMapReverse=new Map(Lp.map(([e,n])=>[n,e]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(e){let n={header:{fn:"text_analysis",client_key:t.getClientKey()},text:e.slice(0,280)},r=await de({url:Kl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,i=t.langMapReverse.get(a);return i||a}};d();function ID(t,e){return Math.floor(Math.random()*(e-t+1))+t}var RD=30,_p="RATE_LIMITER_TICKS",$i=class t{static strictTicks={};static clearStrictTicks(){Ts(_p,"{}")}static async getStrictTicks(e,n){if(n)return this.strictTicks[e]||[];try{let r=await Pl(_p);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){z.debug("Error setting rate limiter ticks",r),this.strictTicks[e]=[]}finally{return this.strictTicks[e]||[]}}static wait(e,n){return new Promise((r,a)=>{t.getDelay(e,n).then(i=>{setTimeout(()=>{r(i)},i)})})}static async setStrictTicks(e,n,r){try{if(this.strictTicks[e]=n,r)return;await Ts(_p,JSON.stringify(this.strictTicks))}catch(a){z.debug("Error setting rate limiter ticks",a)}}static async getDelay(e,n,r=!1){if(!r){let l=ID(4,RD);await Dr(l)}let a=await this.getStrictTicks(e,r)||[],{limit:i,interval:o}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(e,a,r),0):(a.push(u),await this.setStrictTicks(e,a,r),u-s)}};async function vt(t){return await Wl().sendMessage("background:main",t)}function de(t){return mu()?wl({method:"request",data:t}):ye()||gu()?(t.fetchPolyfill=globalThis.GM_fetch,Ur(t)):vt({method:"fetch",data:t})}function qn(){return ye()?Xt():vt({method:"getConfig"})}function gn(t){return ye()?bs(t):vt({method:"setUserConfig",data:t})}function mn(){return ye()?qr():vt({method:"getUserConfig"})}function Cs(){return ye()?Jt():vt({method:"getLocalConfig"})}function Gl(t){return ye()?Wt(t):vt({method:"setLocalConfig",data:t})}function Q1(t){return ye()?kl(t):vt({method:"setBuildinConfig",data:t})}async function Ie(t){if(t.text){let n=zl(t.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(ye()||ot()){if(t.translateService&&!Du.includes(t.translateService))return Promise.resolve("auto");let r=z1(t.text,t.minLength,t.pageLangs);return Promise.resolve(r)}let e=await vt({method:"detectLanguage",data:t});return Promise.resolve(e)}function Z1(){return vt({method:"detectTabLanguage"})}async function Vl(t){let e=await Ie({text:t,pageLangs:["en"]});try{if(ye()||ot()){let n=t.substring(0,200);e=await Wr.detectLanguageRemotelyByTransmart(n)}}catch{}return e}function K1(t){let e=new CustomEvent(Oa,{detail:t});if(document.dispatchEvent(e),ye())return;Wl().sendMessage("popup:main_sync",{method:"setPageStatus",data:t}).catch(r=>{})}function J1(t){return ye()?W1(t):vt({method:"queryParagraphCache",data:t})}async function X1(t){if(ye()){await H1(t);return}return vt({method:"setParagraphCache",data:t})}async function e2(){if(ye())return Promise.resolve();await vt({method:"mockRequest"})}function Yi(t=!1,e=""){return ye()?(oe.runtime.openOptionsPage(t,e),Promise.resolve()):vt({method:"openOptionsPage",data:{newTab:t,pageRoute:e}})}function $l(t=""){return ye()||ot()?Me().OPTIONS_URL:oe.runtime.getURL("options.html")}function Fp(t=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function Yl(t=!1){return ye()?(oe.extra.openAboutPage(t),Promise.resolve()):vt({method:"openAboutPage"})}function Qi(t){return ye()?(oe.extra.openInTab(t),Promise.resolve()):vt({method:"openInTab",data:t})}function t2(t=!1){return ye()?(oe.extra.openEbookViewerPage(t),Promise.resolve()):vt({method:"openEbookViewerPage"})}function n2(t=!1){return ye()?(oe.extra.openEbookBuilderPage(t),Promise.resolve()):vt({method:"openEbookBuilderPage"})}function r2(t){ot()}function Zi(t=!1,e){return ye()?(oe.extra.openPdfViewerPage(t),Promise.resolve()):vt({method:"openPdfViewerPage",data:{url:e}})}function a2(t=!1){return ye()?(oe.extra.openSubtitleBuilderPage(t),Promise.resolve()):vt({method:"openSubtitleBuilderPage"})}function Ji(t){return ye()?Promise.resolve():vt({method:"setBadge",data:{text:t}})}function i2(){return ye()?(z.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):vt({method:"autoSyncLatestConfig"})}function Ql(t,e=!1){return ye()?oe.extra.openInTab(t,e):globalThis.open(t,e?"_blank":"_self"),Promise.resolve()}function o2(t,e){return ye()?$i.getDelay(t,e):vt({method:"getDelay",data:{key:t,options:e}})}function s2(t){let e;try{e=new URL(t)}catch{return!1}let n=Fp(),r="";try{r=new URL(n).hostname}catch{}return!!(r&&e.hostname===r)}function Zl(t){let e;try{e=new URL(t)}catch{return!1}let n=Fp(),r="";try{r=new URL(n).hostname}catch{}return r&&e.hostname===r?!0:!(Mp(t)||e.protocol!=="http:"&&e.protocol!=="https:"&&e.protocol!=="file:"&&e.protocol!=="data:")}function Mp(t){try{return new URL(t)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();d();d();d();var Bp={get:(t,e,n)=>{let r=e===void 0?t:{[t]:e};return oe.storage[n].get(r)},set:(t,e,n)=>oe.storage[n].set({[t]:e})};function Jl(t,e,n){let[r]=re(()=>typeof e=="function"?e():e),[a]=re(n),[i,o]=re(r),[s,u]=re(!1),[l,c]=re("");Ce(()=>{Bp.get(t,r,a).then(g=>{g[t]&&o(g[t]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[t,r,a]);let p=Ve(g=>{let m=typeof g=="function"?g(i):g;z.debug("new settings",m),Bp.set(t,m,a).then(()=>{o(m),u(!0),c("")}).catch(f=>{o(m),u(!1),c(f)})},[a,t,i]);return[i,p,s,l]}d();function Ip(t,e,n){let r=[];return function(){let[i,o,s,u]=Jl(t,e,n),l=Ve(c=>{for(let p of r)p(c)},[]);return Ce(()=>(r.push(o),()=>{r.splice(r.indexOf(o),1)}),[o]),[i,l,s,u]}}function u2(t,e){return Ip(t,e,"sync")}var OD="userConfig",zD=null,ND=u2(OD,zD);function rr(t){let[e,n,r,a]=ND(),i=Ve(o=>{let s=typeof o=="function"?o(e):o;s&&(s.updatedAt=new Date().toISOString()),n(s),t&&t(s)},[e]);return[e,i,r,a,n]}d();d();d();var Xi={},UD={root:"",lang:"en",fallbackLang:"en"};function Rp(t,e){let n=Object.assign({},UD,t);Xi=e||Xi;let[r,a]=re(n.lang),[i,o]=re(Xi),[s,u]=re(!1),l=p=>{if(i.hasOwnProperty(p))return;u(!1);let g=H3(n.root||"",p);n.getUrl&&(g=n.getUrl(n.root||"",p),fetch(g).then(m=>m.json()).then(m=>{Xi[p]=m,o({...Xi}),u(!0)}).catch(m=>{o({...Xi}),u(!0)}))};return Ce(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(p,g)=>{if(!i.hasOwnProperty(r))return p;let m=ms(i,r,p);return m===p&&r!==n.fallbackLang&&(m=ms(i,n.fallbackLang,p)),dp(m,g)},isReady:s}}d();d();var qD=0;function w(t,e,n,r,a){var i,o,s={};for(o in e)o=="ref"?i=e[o]:s[o]=e[o];var u={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--qD,__source:a,__self:r};if(typeof t=="function"&&(i=t.defaultProps))for(o in i)s[o]===void 0&&(s[o]=i[o]);return Fe.vnode&&Fe.vnode(u),u}var zp=hi(null),Op={root:"assets",lang:"en",fallbackLang:"en"},eo=t=>{let{t:e,setLang:n,lang:r,isReady:a}=Rp({root:t.root||Op.root,lang:t.lang||Op.lang,fallbackLang:t.fallbackLang||Op.fallbackLang,getUrl:t.getUrl},t.translations);return w(zp.Provider,{value:{t:e,setLang:n,lang:r,isReady:a},children:t.children})};function xe(){return du(zp)}d();var jD=function(t,e){let{method:n,data:r}=t;z.debug(`popup received message: ${n}`,r||" ");let a;e.active&&(a=e.id,globalThis.document.dispatchEvent(new CustomEvent(Bo,{detail:{tabId:a,payload:t}})))},Xl;function l2(){ws()}function ws(){return Xl||(Xl=new br("popup",!1).getConnection("main_sync",jD),Xl)}d();d();function c2(t,e=2e3){return n=>{let r,a=0;return i=>{++a==t&&(n(i),a=0),clearTimeout(r),r=setTimeout(()=>a=0,e)}}}d();var ec="DROP_DOWN_DEFAULT_VALUE";function Np(t){let{showArrow:e,onSelected:n,className:r,menus:a,maxWidth:i,style:o}=t;r=r||"",e=e??!0,i=i||80;let s=je(null);return w("select",{ref:s,autoComplete:"off",class:`min-select ${e?"":"min-select-no-arrow"} ${r||""}`,value:ec,style:{maxWidth:`${i}px`,...o},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==ec){s.current.value=ec,s.current?.dispatchEvent(new Event("change"));let c=a.find(p=>p.value===l);c&&n(c)}},children:[{value:ec,label:t.label}].concat(a).map((u,l)=>w("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function to(t,e){return t.localeCompare(e,void 0,{numeric:!0,sensitivity:"base"})>=0}var HD=({date:t})=>{let{t:e}=xe(),[n,r]=re(!1);return Ce(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:w("p",{class:"text-sm",children:[e("Successfully synchronized with the latest official rules:")," ",new Date(t).toLocaleString()]})},WD=({minVersion:t})=>{let{t:e}=xe();return w("p",{class:"text-sm",children:e("localVersionIsTooOld",{minVersion:t})})},KD=()=>{let{t}=xe();return w("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:t("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},GD=({message:t,handleSyncing:e,date:n})=>{let{t:r}=xe();return w("p",{class:"text-sm",children:[r("failToSyncRules")," ",w("a",{onClick:e,children:r("retry")}),w("br",{}),r("failedReason"),"\uFF1A",t,w("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Up(t){let{isShowError:e,request:n}=t,[r,a]=re(null),{t:i}=xe(),[o,s]=re(null),[u,l]=re(null),[c,p]=re(""),[g,m]=re(!1),[f,T]=re(!1),[b,h]=re(!1),[C,D]=re(null),[M,B]=re(null),S=Sn(),y=async()=>{p("");let _=o;if(o===null)try{let k=await n({url:Io});k?(s(k),_=k,m(!0)):(p(i("unknownError")),l(null))}catch(k){l(null),p(k.message);return}_!==null?(t.setStorageBuildinConfig(_),l(!1),a(_.buildinConfigUpdatedAt)):(p(i("canNotFetchRemoteRule")),l(null))};return Ce(()=>{Xt().then(_=>{let k=_.buildinConfigUpdatedAt;D(_);let v=new Date(k);if(a(k),S==="0.0.0"){h(!0);return}n({url:Io}).then(I=>{let F=I,L=F.minVersion,U=S;s(F);let N=F.latestVersion;if(N&&(to(U,N)?B(!0):B(!1)),to(U,L)){let q=F.buildinConfigUpdatedAt;new Date(q)>v?(l(!0),y()):l(!1)}else T(!0),l(null)}).catch(I=>{l(null),p(I.message)})})},[]),Ce(()=>{Xt().then(_=>{D(_)})},[r]),C?w("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?w(KD,{}):c?e===!1?null:w(GD,{handleSyncing:y,message:c,date:r||""}):f?e===!1?null:w(WD,{minVersion:o.minVersion}):u===null||u===!0?null:g?w(HD,{date:r}):null}):null}d();function VD(){return navigator.userAgent.indexOf("Mac")!==-1}var d2={Alt:"\u2325"};function tc(t=""){return VD()?Object.keys(d2).reduce((e,n)=>e.replace(n,d2[n]),t):t}d();d();var nc='',p2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",g2="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==";var m2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",f2="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",h2="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";function b2({config:t,isLogin:e,isProUser:n}){let{t:r}=xe();return ml(t)?w("div",{}):w("div",{class:"flex items-center",children:[w("a",{class:"flex items-center text-decoration-none",target:"_blank",href:e?ku:r4,children:[w("img",{src:e?f2:m2}),w("span",{class:"text-xs ml-2 text-label",children:r(e?"loggedIn":"notLogin")})]}),w("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?ku:a4,children:w("img",{src:n?p2:g2})})]})}d();d();var T2={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},y2={...zt,"zh-CN":{...T2["zh-CN"],...zt["zh-CN"]},"zh-TW":{...T2["zh-TW"],...zt["zh-TW"]}},rc=y2;function no(t,e,n){return hr(y2,t,e,lr,n)}var fa=(t,e,n,r)=>{let a=Yh[t]||t,i=Qh[t],o=Zh[t],s={"zh-CN":i,"zh-TW":o,en:a};if(n)return s[t]?s[t]:a;if(s[e]){let u=s[e];return r||t==="auto"||t==="placeholder"?u:`${u} (${a})`}else return a};d();d();d();d();d();function qp(t,e,n=[],r){let a=["notranslate"];return r&&a.push(Vh),t&&(a.push(`${Q}-target-translation-theme-${t}`),e?a.push(`${_d}-theme-${t}`):a.push(`${Ld}-theme-${t}`)),n.length>0&&a.push(...n),e?a.push(_d):a.push(Ld),a}function jp(t){let e=["notranslate",wu];return t&&e.push(`${Q}-target-translation-theme-${t}-inner`),e}function v2(t,e,n){let{rule:r,state:a}=n,{translationTheme:i}=a,{variables:o,isVertical:s}=t;o=o||[];let{text:u}=e,{wrapperPrefix:l,wrapperSuffix:c}=r,p=Za(n,!0),g="afterend",m=p[0],f=p[1],T=`${m}(\\d+)${f}`,b=new RegExp(T,"g"),h=at.sanitize(u);o.length>0&&(h=h.replace(b,B=>{let S=h.indexOf(B),y=h[S-1]===" ",_=h[S+B.length]===" ",v=B.replace(new RegExp(p[0],"g"),"").replace(new RegExp(p[1],"g"),""),I=Number(v);if(isNaN(I))return B;let F=o[I];if(F&&F.type==="element"){let L=F.value.outerHTML;return y||(L=" "+L),_||(L=L+" "),L}else z.error("variable type not supported",F,B);return B}));let C=qp(i,t.inline,r.translationClasses||[],t.preWhitespace);s&&C.push(Gh);let D=jp(i),M="";return r.translationBlockStyle&&(M=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${M} class="${C.join(" ")}" ${ur}="1"><${r.targetWrapperTag} class="${D.join(" ")}" ${ur}="1">${h}`,t.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),t.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ur}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function ac(t,e){let n=t.original||t,r=null,{stayOriginalSelectors:a,delimiters:i,isPreWhitespace:o}=e,s=[],u={};for(let l=0;l2&&(h=`<${i[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let T=c.textContent||"";g&&(T=ca(Hp(c))),s.push({text:T,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Gt(c,a)){let b=Object.keys(u).length,h=`${i[0]}${b}${i[1]}`;i.length>2&&(h=`<${i[2]}${b}>`),u[b]=c;let C=Wp(s).endsWith(" ")?" ":"",D=ca(c.innerText||c.textContent),M=ca(c.nextSibling).startsWith(" ")?" ":"",B=ys(C+D+M),S=B[0]+h+B[1];if(C===" ")S=S.trimStart();else if(!S.startsWith(" ")){let y=ys(c.previousSibling)[1];y===""&&(y=" "),S=y+S}s.push({text:S,type:"variable"})}else{let T=Wp(s).endsWith(" ")?" ":"",b=ca(c.innerText||c.textContent);g&&(b=ca(Hp(c)));let h=ca(c.nextSibling).startsWith(" ")?" ":"",C=ys(T+b+h),D=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(T===" ")D=D.trimStart();else{let M=ys(c.previousSibling)[1];M===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(M=" "),D=M+D}s.push({text:D,type:"text"})}else{let T=Wp(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=ca(Hp(c))),T===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}t.targetText=at.sanitize(t.targetText);let a=!1,i=t.text,o=i.split(" ").length,s=i.split(` +`).length;o<=n.blockMinWordCount&&i.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(t.id),elements:[],isVertical:!1,rootFrame:t.commonAncestorContainer,text:t.text,variables:r,inline:a,preWhitespace:t.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Za(e);if(l.length>2){let c=l[2];return $D({delimiterTag:c,targetText:t.targetText,inline:a,preWhitespace:t.isPreWhitespace||!1,wrapperPrefix:e.rule.wrapperPrefix,wrapperSuffix:e.rule.wrapperSuffix,targetWrapperTag:e.rule.targetWrapperTag,translationTheme:e.state.translationTheme,translationBlockStyle:e.rule.translationBlockStyle,translationClasses:e.rule.translationClasses,variables:r}).html}else{let c=v2(u,{id:Number(t.id),url:"https://google.com",text:t.targetText,from:"auto",to:"auto",fromByClient:"auto"},e);return c.html}}function Hp(t){return(t?.innerText||t.textContent||"").replace(/\s+/g," ")||""}function $D(t){let{delimiterTag:e,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:i,variables:o,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=t;o=o||[];let p=t.targetText;p=at.sanitize(p);let g=p,m=new RegExp(`<${e}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${e}(\\d+)>`);o.length>0&&(g=g.replace(m,C=>{let D=g.indexOf(C),M=g[D-1]===" ",B=g[D+C.length]===" ",S=C.match(f);if(!S)return C;let y=S[1],_=Number(y);if(isNaN(_))return C;let k=o[Number(_)];if(k&&k.type==="element"){let v=k.value.outerHTML;return M||(v=" "+v),B||(v=v+" "),v}else if(k&&k.type==="text"){let v=k.value;return M||(v=" "+v),B||(v=v+" "),v}else z.error("variable type not supported",k,C);return C}));let T=qp(l,n,r||[],s),b=jp(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${T.join(" ")}" ${ur}="1"><${a} class="${b.join(" ")}" ${ur}="1">${g}`,n||(i==="smart"?g=`
${g}`:g=`${i}${g}`),n&&(i!=="smart"?g=`${i}${g}`:g=`<${a} class="notranslate" ${ur}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function Wp(t){let e=t[t.length-1];return e?e.text:""}function Kp(t){let{text:e,delimiters:n,variables:r}=t,a=e;if(n.length>2){let i=n[2],o=new RegExp(`<${i}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${i}(\\d+)>`),u=e;return Object.keys(r).length>0&&(u=u.replace(o,c=>{let p=c.match(s);if(!p)return c;let g=p[1],m=Number(g);if(isNaN(m))return c;let f=r[g];return f||c})),u}else{let i=`${n[0]}(\\d+)${n[1]}`,o=new RegExp(i,"g");a=a.replace(o,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var De=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(e,n,r){this.serviceConfig=e,this.generalConfig=n,this.translationOptions=r,e?.retry&&(this.retry=e.retry),e?.requestTimeout&&(this.requestTimeout=Number(e.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let e=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(e.limit=Number(n.limit)),n?.interval&&(e.interval=Number(n.interval)),e}formatRateLimit(e){return e.limit<1&&(e.interval=Math.round(1e3/e.limit),e.limit=1),e}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(e){throw new Error("Not implemented")}translateList(e){throw new Error("Not implemented")}async multipleTranslate(e,n,r){if(e.sentences.length===0)return{sentences:[]};let{sentences:a}=e,i=!1,o=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(i=!0),b.debug&&(o=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let p=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(p=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(p=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=z3(a,c,p)}catch(b){if(r)for(let h=0;hb));let g=[],m=[],f=(b,h,C)=>{let D="";if(h.translatedTexts&&h.translatedTexts[0]&&(D=h.translatedTexts[0]),m[b]||(m[b]=h,m[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),m[b].hasError)return;if(C){let S=C instanceof $?new $(C.name,C.message).initNetWork(C.status).initData(C.data):C;m[b].hasError=!0,h.callback&&h.callback(S,null,h.sentence);return}m[b].translatedTexts[h.partIndex]=D;let M=m[b],B=0;for(let S=0;S{let B=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(B=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(y=>y.text),forces:h.tempSentences.map(y=>y.force),xpaths:h.tempSentences.map(y=>y.xpath||""),from:B,to:h.to,url:C,options:n,refresh:i,debug:o}),sourceTempSentences:h.tempSentences};{let S=Kh;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(S=this.serviceConfig.translationTextSeparator);let y=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(y=this.serviceConfig.newlinePlaceholderDelimiters);let _=[],k=Tr(this.serviceConfig);if(h.tempSentences.forEach((q,A)=>{let E=hp({text:q.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:k,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});q.force!==!0&&(E&&E.text&&E.text.trim().lengthA.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:q,from:B,to:h.to})}let v="";y&&y.length>=2?v=_.map((q,A)=>{let{item:E}=q;return A===_.length-1?E.text:E.text+y[0]+(A+1)+y[1]}).join(""):v=_.map(({item:q})=>q.text).join(S);let I=await this.translate({text:v,from:B,to:h.to,url:C,options:{...n,rawTextArrayLength:_.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:i,debug:o}),{text:F}=I,L=[];if(y&&y.length>=2){let q=`${y[0]}\\d+${y[1]}`;y&&y.length>=3&&(q=y[2]);let A=new RegExp(q,"g");L=F.split(A)}else L=F.split(S);let U=[];if(L.length>_.length){for(let q=0;q<_.length-1;q++)U[q]=L[q];U[_.length-1]=L.slice(_.length-1).join(S)}else if(L.length<_.length)for(let q=L.length;q<_.length;q++)L[q]="";else U=[...L];let N=h.tempSentences.map(q=>q.text);return k=Tr(this.serviceConfig,!0),U.forEach((q,A)=>{let E=_[A],P=E.index,O=E.variables||{};Object.keys(O).length>0&&(q=Kp({text:q,delimiters:k,variables:O})),N[P]=q}),{sourceTempSentences:h.tempSentences,text:N,from:I.from,to:I.to}}};g.push(M().then(B=>{let{text:S,sourceTempSentences:y}=B;for(let _=0;_{if(B instanceof $&&B.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let S=0;S{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(e){let n={...e},{forces:r}=e,a=[],i=Tr(this.serviceConfig);if(this.serviceConfig&&i.length>0)try{let{text:l,xpaths:c}=e;if(l.forEach((p,g)=>{let m=hp({text:p,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:i,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:e.to});r&&r[g]!==!0&&(m&&m.text&&m.text.trim().lengthp.text),n.xpaths=a.map(p=>p.xpath)}catch(l){z.debug("formatAndTranslateList error",e,l)}let o=await this.translateList(n),{text:s}=o,u=e.text.map(l=>l);return i=Tr(this.serviceConfig,!0),s.forEach((l,c)=>{let p=a[c];if(p){let g=p.index,m=p.variables,f=Object.keys(m);u[g]=l,f.length>0&&(u[g]=Kp({text:l,delimiters:i,variables:m}))}}),{...o,text:u}}detectLanguageLocally(e){return Ie({text:e,minLength:18,pageLangs:[yt(),"en"]})}detectLanguageRemotely(e){return Promise.resolve("auto")}detectLanguage(e){return e.length>=50?this.detectLanguageLocally(e):this.detectLanguageRemotely(e)}};var x2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],Ds=class t extends De{static langMap=new Map(x2);maxTextGroupLength=50;static langMapReverse=new Map(x2.map(([e,n])=>[n,e]));static getUTCDate(e){let n=e.getUTCFullYear(),r=`${e.getUTCMonth()+1}`.padStart(2,"0"),a=`${e.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(e,n,r){if(super(e,n,r),!e||!e.secretId||!e.secretKey)throw new $("secretId and secretKey are required");this.secretId=e.secretId?.trim(),this.secretKey=e.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceText:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetText,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=JSON.stringify({ProjectId:0,Source:t.langMap.get(r)||"auto",SourceTextList:n,Target:t.langMap.get(a)||a}),o=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:i,service:"tmt",version:"2018-03-21"});return{text:o.Response.TargetTextList,from:t.langMapReverse.get(o.Response.Source)||r,to:t.langMapReverse.get(o.Response.Target)||a}}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=`${i}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await nr(a)].join(` `),p=t.getUTCDate(u),g=["TC3-HMAC-SHA256",l,`${p}/${i}/tc3_request`,await nr(c)].join(` -`),m=await R3(p,`TC3${n}`),f=await El(i,m),T=await El("tc3_request",f),b=await El(g,T),h=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var E2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],YD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},Ds=class t extends De{static langMap=new Map(E2);static langMapReverse=new Map(E2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:YD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var C2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ja=class t extends De{static langMap=new Map(C2);static langMapReverse=new Map(C2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function QD(t,e){return e?t+(e-t%e):t}function ZD(t,e){return t.split(e).length-1}function Vp(t){let e=Date.now(),n=1;for(let r of t)n+=ZD(r,"i");return QD(e,n)}function JD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function $p(){return JD(1e6,1e8)}d();d();d();var Yp="https://www2.deepl.com/jsonrpc",Qp="auto",w2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function XD(t=w2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Zp(t){return XD()[t.toLowerCase()]}var eA={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function tA(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function nA(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function rA(t,e,n,r,a,i,o){let s=$p(),u=nA(r,n),l=[];e.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Vp(e);let c=await de({retry:2,method:"POST",url:t,body:tA(u),headers:eA}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{p.text.push(g.text)}),p}async function D2(t,e,n,r=Qp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:rA(t,e,Zp(n),Zp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var A2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ro=class t extends De{static langMap=new Map(A2);static langMapReverse=new Map(A2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Yp;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=jt(Yp,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await D2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var As=class t extends De{static langMap=new Map(_p);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=Wr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=k2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await de({url:Kl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=k2()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),g=await de({url:Kl,body:p,method:"POST"});if(g.header.ret_code!=="succ")throw new $(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function k2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Jp(){return Math.random()>=.1}var ao=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Jp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await e2(),!Jp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var L2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Xp=new Map(L2),P2=new Map(L2.map(([t,e])=>[e,t])),eg=class t extends De{static langMap=Xp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Xp.get(r)||"auto",target_lang:Xp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:P2.get(o.source_lang),to:P2.get(o.target_lang)}}else throw new $(i.msg)}},ic=eg;d();var _2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ks=new Map(_2),aA=new Map(_2.map(([t,e])=>[e,t])),tg=class extends De{static langMap=ks;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=jt(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=jt(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=jt(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=jt(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=jt(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:ks.get(n)||"",target_lang:ks.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:ks.get(n)||"auto",target_lang:ks.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let g,m={};e.refresh&&(m={"X-Refresh":"True"}),e.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await de({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Ja(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` +`),m=await R3(p,`TC3${n}`),f=await El(i,m),T=await El("tc3_request",f),b=await El(g,T),h=await de({retry:this.retry,url:`https://${i}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":o,Authorization:`TC3-HMAC-SHA256 Credential=${e}/${p}/${i}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new $(h.Response.Error.Message);return h}};d();var E2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],YD={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},As=class t extends De{static langMap=new Map(E2);static langMapReverse=new Map(E2.map(([e,n])=>[n,e]));isSupportList=!1;constructor(e,n,r){super(e,n,r)}async translate(e){let{text:n,from:r,to:a}=e,i=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),o=await de({url:`https://wxapp.translator.qq.com/api/translate?${i}`,retry:this.retry,method:"GET",headers:YD,timeout:this.requestTimeout});return{text:o.targetText,from:t.langMapReverse.get(o.source)||r,to:t.langMapReverse.get(o.target)||a}}};d();var C2=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Ja=class t extends De{static langMap=new Map(C2);static langMapReverse=new Map(C2.map(([e,n])=>[n,e]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(e,n,r){super(e,n,r),e?.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=t.langMap.get(r)||"auto",o=t.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,i,o);if(!s)throw new $("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new $("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:t.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(e,n,r){let i="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}).toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}async fetchWithoutToken(e,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:e}),i=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:i,timeout:this.requestTimeout})}}};d();d();d();function QD(t,e){return e?t+(e-t%e):t}function ZD(t,e){return t.split(e).length-1}function Gp(t){let e=Date.now(),n=1;for(let r of t)n+=ZD(r,"i");return QD(e,n)}function JD(t,e){return Math.floor(Math.random()*(e-t+1))+t}function Vp(){return JD(1e6,1e8)}d();d();d();var $p="https://www2.deepl.com/jsonrpc",Yp="auto",w2=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function XD(t=w2){return t.reduce((e,n)=>(e[n.code.toLowerCase()]=n.code,e[n.language.toLowerCase()]=n.code,e),{})}function Qp(t){return XD()[t.toLowerCase()]}var eA={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function tA(t){return JSON.stringify(t).replace('"method":"',()=>{let e=t;return(e.id+3)%13===0||(e.id+5)%29===0?'"method" : "':'"method": "'})}function nA(t,e){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:t,target_lang:e}}}}async function rA(t,e,n,r,a,i,o){let s=Vp(),u=nA(r,n),l=[];e.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Gp(e);let c=await de({retry:2,method:"POST",url:t,body:tA(u),headers:eA}),p={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{p.text.push(g.text)}),p}async function D2(t,e,n,r=Yp,a,i,o){return e?e&&e.length===1&&e[0]===""?{text:[""],from:r,to:n}:rA(t,e,Qp(n),Qp(r)??"auto",a,i,o):{text:[],from:r,to:n}}var A2=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ro=class t extends De{static langMap=new Map(A2);static langMapReverse=new Map(A2.map(([e,n])=>[n,e]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=$p;constructor(e,n,r){super(e,n,r),e&&e.apiUrl&&(this.API_URL=Ht($p,e.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(e){let{text:n,to:r,from:a}=e,i=await D2(this.API_URL,n,t.langMap.get(r)||r,t.langMap.get(a)||"auto");return{text:i.text,from:t.langMapReverse.get(i.from),to:t.langMapReverse.get(i.to)}}};d();var ks=class t extends De{static langMap=new Map(Lp);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(e,n,r){super(e,n,r),this.clientKey=Wr.getClientKey()}async translate(e){let{text:n,to:r}=e,a=await this.detectLanguage(n),i=t.langMap.get(a)||a,o=t.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Me(),u=e.url;s.INSTALL_FROM==="firefox_store"&&(u=k2());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:i,orig_url:u},target:{lang:o}}),p=await de({url:Kl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(p.header.ret_code!=="succ")throw new $(p.message||p.header.ret_code);return{text:p.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(e){let{from:n,text:r,to:a}=e,i=Me(),o=e.url;if(i.INSTALL_FROM==="firefox_store"&&(o=k2()),r.length===1){let m=await this.translate({from:n,text:r[0],to:a,url:o,options:e.options});return{text:[m.text],from:m.from,to:m.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=t.langMap.get(u)||u,c=t.langMap.get(a)||a,p=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:o},target:{lang:c},type:"plain"}),g=await de({url:Kl,body:p,method:"POST"});if(g.header.ret_code!=="succ")throw new $(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(e){return this.detectLanguageRemotely(e)}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function k2(){let t=new Date;return t.setMinutes(t.getMinutes()-t.getMinutes()%5),t.setSeconds(0),t.setMilliseconds(0),`https://google.com/search?q=google&_t=${t.getTime()/1e3}`}d();d();function Zp(){return Math.random()>=.1}var ao=class extends De{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(e){let{text:n}=e;if(!Zp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:e.from,to:e.to}}async translateList(e){let{text:n,from:r,to:a}=e;if(await e2(),!Zp())throw new $("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(i=>{let o=i.match(/^\s*/)[0].length;return i.slice(0,o)+"\u6A21\u62DF\uFF1A"+i.slice(o,-6)})}}};d();var L2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Jp=new Map(L2),P2=new Map(L2.map(([t,e])=>[e,t])),Xp=class t extends De{static langMap=Jp;static DEFAULT_CODENAME="deepl";apikey="";codename=t.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(e,n,r){if(super(e,n,r),!e||!e.apikey)throw new $("apikey are required");this.apikey=e.apikey?.trim(),e.codename&&(this.codename=e.codename)}async translate(e){let{text:n,from:r,to:a}=e,i=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Jp.get(r)||"auto",target_lang:Jp.get(a)||a}),timeout:this.requestTimeout});if(i.status){let o=i;return o.result&&a=="zh-TW",{text:o.result,from:P2.get(o.source_lang),to:P2.get(o.target_lang)}}else throw new $(i.msg)}},ic=Xp;d();var _2=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ps=new Map(_2),aA=new Map(_2.map(([t,e])=>[e,t])),eg=class extends De{static langMap=Ps;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}constructor(e,n,r){if(super(e,n,r),e=e||{},this.splitor=e.qualityDelimiterBetaV3||"",this.qualityNoSymabol=e.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=e.qualityMinTextLengthV3||0,e.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=e.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new $("authKey are required");if(!this.authKey)throw new $("authKey are required");e&&e.freeApiUrl&&(this.freeApiUrl=Ht(this.freeApiUrl,e.freeApiUrl)),e&&e.proApiUrl&&(this.proApiUrl=Ht(this.proApiUrl,e.proApiUrl)),e&&e.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=Ht(this.immersiveTranslateApiUrl,e.immersiveTranslateApiUrl)),e&&e.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=Ht(this.immersiveTranslateDeeplTokenUrl,e.immersiveTranslateDeeplTokenUrl)),e&&e.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=Ht(this.immersiveTranslateDeeplProApiUrl,e.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let e=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:e?.interval||1050}}return{limit:15,interval:e?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(e){let{from:n,to:r}=e,a=this.getRandomKey(),{text:i,merged:o}=this.optimizationText(e),s={source_lang:Ps.get(n)||"",target_lang:Ps.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);i.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:i,source_lang:Ps.get(n)||"auto",target_lang:Ps.get(r)||r},p=this.freeApiUrl;a.endsWith(":im")?p=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(p=this.proApiUrl);let g,m={};e.refresh&&(m={"X-Refresh":"True"}),e.debug&&(m={...m,"X-Debug":"True"}),this.provider==="pro"?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...m,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await de({retry:2,url:p,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,o,!!e.debug),T=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Ja(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(D=>D.text).join(` `),url:"",options:{}});C&&C.text&&(T=C.text.split(` -`))}return{text:T,from:f[0]&&aA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},F2=tg;d();var iA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],ng=new Map(iA),rg=class extends De{static langMap=ng;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:ng.get(r)||r,to:ng.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},M2=rg;d();var oA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],ag=new Map(oA),ig=class extends De{static langMap=ag;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:ag.get(a)||a};r!=="auto"&&(i.from=ag.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,m)=>{o.append(m,g)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await de(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(g=>g.translations.map(f=>f.text).join(" "))}}},B2=ig;d();var sA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],io=new Map(sA),og=class extends De{static langMap=io;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=` +`))}return{text:T,from:f[0]&&aA.get(f[0].detected_source_language)||n,to:r}}optimizationText(e){let{text:n,xpaths:r}=e;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,i=[];for(let o=0;o=0){i.push(n[o]);continue}if(this.qualityMinTextLength>0&&n[o].length({text:!Qt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));i.push(...u)}else i.push(s)}return{...e,translations:i}}},F2=eg;d();var iA=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],tg=new Map(iA),ng=class extends De{static langMap=tg;APIKEY="";isSupportList=!1;constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim()}async translate(e){let{text:n,from:r,to:a}=e,i=n,o={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:i,from:tg.get(r)||r,to:tg.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(o);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new $(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},M2=ng;d();var oA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],rg=new Map(oA),ag=class extends De{static langMap=rg;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(e,n,r){if(super(e,n,r),!e||!e.APIKEY)throw new $("APIKEY are required");this.APIKEY=e.APIKEY?.trim(),e.region&&(this.region=e.region),e.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl))}async translateList(e){let{text:n,from:r,to:a}=e;if(n.length===0)return{from:r,to:a,text:[]};let i={"api-version":"3.0",to:rg.get(a)||a};r!=="auto"&&(i.from=rg.get(r)||r);let o=new URLSearchParams(i),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,m)=>{o.append(m,g)}),u.search=o.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},p=await de(c);if(p.length===0)throw new $("server response invalid");return{from:r,to:a,text:p.map(g=>g.translations.map(f=>f.text).join(" "))}}},B2=ag;d();var sA=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],io=new Map(sA),ig=class extends De{static langMap=io;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(e){let{text:n,from:r,to:a}=e,i;if(n.length===0)return{from:r,to:a,text:[]};let o=`
-`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!io.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||io.get(r)||r,target:io.get(a)||a})):u.body=JSON.stringify({text:s,source:io.get(r),target:io.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},I2=og;d();d();d();function R2(t){let e=t.split(` +`,s=n.join(o),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!io.get(r)?(i=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:i||io.get(r)||r,target:io.get(a)||a})):u.body=JSON.stringify({text:s,source:io.get(r),target:io.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new $("server response invalid");let c=l.translatedText.split("
").map(p=>p.trim());return{from:r,to:a,text:c}}},I2=ig;d();d();d();function R2(t){let e=t.split(` `),n=[],r,a="",i="";for(let o of e){o.startsWith("- ")&&(o=o.slice(1),r&&n.push(r),r={},a="",i="");let s=o.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=o.slice(o.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?i="":i=l):i+=` `+o}else i+=` -`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var sg=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+o;if(!a)continue;r||(r={});let u=Number(i);r[a]=Number.isNaN(u)?i:Number(i)}return r&&n.push(r),Object.values(n).forEach(o=>{Object.entries(o).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?o[s]=l.slice(1,-1):o[s]=l}})}),n}var og=class extends De{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(e,n,r){if(super(e,n,r),e||(e={}),e.APIKEY){let a=e.APIKEY?.trim();this.apiKeys=a.split(",").map(i=>i.trim())}Array.isArray(e.ignoreResRegexs)&&(this.ignoreResReges=e.ignoreResRegexs),e.translationTextSeparator&&(this.translationTextSeparator=e.translationTextSeparator),e.model&&(this.model=e.model),e.systemPrompt&&(this.systemPrompt=e.systemPrompt),e.prompt&&(this.prompt=e.prompt),e.multiplePrompt&&(this.multiplePrompt=e.multiplePrompt),e.subtitlePrompt&&(this.subtitlePrompt=e.subtitlePrompt),e.bodyConfigs&&(this.bodyConfigs=e.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a,options:i}=e;if(n.length===0)return{from:r,to:a,text:""};let o=this.getLangMap(),s=this.prompt||"",u=o.get(r)||r,l=o.get(a)||a,c=this.serviceConfig.env||{},p=i?.sourceProgram,g=["subtitle","videoSubtitle"].includes(p),m=[n];i?.rawTextArrayLength&&(m=n.split(this.translationTextSeparator)),m.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),g&&this.subtitlePrompt&&m.length>1&&(s=this.subtitlePrompt);let f="",T="",b=s.includes("{{json}}"),h=s.includes("{{yaml}}");if(b){let B=[],S=c.imt_json_item||"";g&&(S=c.imt_subtitle_json_item||S);for(let y=0;yS==="from"?u:S==="to"?l+" Language":S==="text"?n:S=="json"?f:S=="yaml"?T:c[S]||B).replace(/{{(.+?)}}/g,(B,S)=>c[S]||B);let C=await this.handleOptions(s,e);z.debug("request options",C);let D=await de(C),M=this.parseResponse(D);if(M=this.filterContent(n,M,s,m),z.debug("filterContent after",M),!b&&!h||!M)return{from:r,to:a,text:M||n};M=uA(n,M),M=N3(M);try{let B={};if(b){z.debug("extractValidJson before",M);let _=this.extractValidJson(M);z.debug("parse before",M),B=Mu.parse(_)}else if(h){z.debug("parseYAML before",M);let _=this.extractValidYaml(M);B=R2(_)}let S=c.imt_trans_field;g&&(S=c.imt_sub_trans_field||S);let y=c.imt_source_field;return g&&(y=c.imt_sub_source_field||y),M=this.restoreText(m,B,S,this.translationTextSeparator,y),{from:r,to:a,text:M}}catch(B){return z.error("parse response failed",M,B),{from:r,to:a,text:M}}}extractValidJson(e){let n=e.indexOf("["),r=e.lastIndexOf("]");return n!==-1&&r!==-1?e.slice(n,r+1):""}extractValidYaml(e){let n=e.split(` `),r=[];for(let a=0;anew RegExp(s).test(i))&&(i=e)}catch(o){z.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},oo=sg;function uA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var lA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],O2=new Map(lA),ug=class extends oo{static langMap=O2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=jt(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=jt(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=jt(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return O2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},z2=ug;d();var q2=o6(N2());var U2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],Ls=class t extends De{static langMap=new Map(U2);static langMapReverse=new Map(U2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new q2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(C=>`${this.encode(C)}=${this.encode(T[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,p),m=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var cA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},lg=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},cg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=lg(e);if(r)return Array.isArray(n)?`${r}=${n.map(lg).sort().join(`&${r}=`)}`:`${r}=${lg(n)}`}).filter(e=>e).join("&"),so=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,cg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await nr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return xl(await sa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=cg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} +`)}restoreText(e,n,r,a,i){let o=[];for(let s=0;snew RegExp(s).test(i))&&(i=e)}catch(o){z.debug("e",o)}return i}getCacheKeyPrefix(){let e=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},oo=og;function uA(t,e){return!t.includes(".")&&!t.includes("\u3002")&&(e.endsWith("\u3002")||e.endsWith("."))?e.slice(0,-1):e}var lA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],O2=new Map(lA),sg=class extends oo{static langMap=O2;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Qt()||Bn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(e,n,r){if(super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.temperature!==void 0&&(this.temperature=parseFloat(e.temperature)),this.provider==="pro"){if(!r.isPro)throw new $("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(i=>i.trim()),!a)throw new $("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");e.proModel&&(e.model=e.proModel),e.proLimit&&(e.limit=e.proLimit)}e&&e.immersiveApiUrl&&(this.immersiveApiUrl=Ht(this.immersiveApiUrl,e.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",e.apiUrl&&(this.apiUrl=Ht(this.apiUrl,e.apiUrl)),e&&e.immersiveProApiUrl&&(this.immersiveProApiUrl=Ht(this.immersiveProApiUrl,e.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return O2}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(e){return e?.choices?.[0]?.message?.content?.trim()}async handleOptions(e,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:e}],i={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},o=this.getRandomKey();return this.provider==="pro"?(i.url=this.immersiveProApiUrl,i.headers.token=o,i.headers={...i.headers,...r}):o&&(i.headers.Authorization="Bearer "+o,i.headers["api-key"]=o,o.startsWith("immersiveopenai_")&&(i.url=this.immersiveProApiUrl,i.headers.token=o,o.endsWith("x")||(i.headers["Immersive-Corpus-Campagin"]="yes"),delete i.headers.Authorization,delete i.headers["api-key"],i.headers={...i.headers,...r})),i}getCacheKeyPrefix(){let e=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(e.join("_"))}},z2=sg;d();var q2=o6(N2());var U2=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],_s=class t extends De{static langMap=new Map(U2);static langMapReverse=new Map(U2.map(([e,n])=>[n,e]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(e,n,r){if(super(e,n,r),!e||!e.AccessKeyID||!e.AccessKeySecret)throw new $("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=e.AccessKeyID?.trim(),this.AccessKeySecret=e.AccessKeySecret?.trim(),this.SHA1=new q2.default.SHA1,e.scene&&(this.scene=e.scene)}async translate(e){let{text:n,from:r,to:a}=e,i={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:n,TargetLanguage:t.langMap.get(a)||a},o=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:o,payload:i,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&t.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:t.langMapReverse.get(a)||a}}async translateList(e){let{text:n,from:r,to:a}=e,i=this.scene=="general"?"translate_standard":"translate_ecommerce",o={FormatType:"text",Scene:this.scene,SourceLanguage:t.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,p)=>(l[p]=c,l),{})),TargetLanguage:t.langMap.get(a)||a,ApiType:i},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:o,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&t.langMapReverse.get(u)||r||"auto",to:t.langMapReverse.get(a)||a}}encode(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:e,secretKey:n,action:r,payload:a,service:i,version:o}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:o,Format:"JSON",AccessKeyId:e,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},p=(T=>{let h=Object.keys(T).sort().map(C=>`${this.encode(C)}=${this.encode(T[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,p),m=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await de({retry:this.retry,url:`https://${i}.aliyuncs.com?${m}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new $(f.Message);return f}};d();d();var cA=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Dt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},ug=t=>{try{return encodeURIComponent(t).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},lg=t=>Object.keys(t).map(e=>{let n=t[e];if(typeof n>"u"||n===null)return;let r=ug(e);if(r)return Array.isArray(n)?`${r}=${n.map(ug).sort().join(`&${r}=`)}`:`${r}=${ug(n)}`}).filter(e=>e).join("&"),so=class{request;serviceName;bodySha256;constructor(e,n,r){this.request=e,this.request.headers=e.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(e){let n={};return e&&Object.keys(e).filter(r=>{let a=e[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=e[r]}),n}async addAuthorization(e,n){let r=this.getDateTime(n);await this.addHeaders(e,r),this.request.headers.Authorization=await this.authorization(e,r)}async authorization(e,n){let r=[],a=this.credentialString(n);return r.push(`${Dt.algorithm} Credential=${e.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(e,n)}`),r.join(", ")}async getSignUrl(e,n){let r=this.getDateTime(n),a={...this.request.params},i=this.request.params,o=this.request.headers;e.sessionToken&&(a[Dt.tokenHeader]=e.sessionToken),a[Dt.dateHeader]=r,a[Dt.notSignBody]="",a[Dt.credential]=`${e.accessKeyId}/${this.credentialString(r)}`,a[Dt.algorithmKey]=Dt.algorithm,a[Dt.signHeadersKey]="",a[Dt.signQueriesKey]=void 0,a[Dt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(e,r);return this.request.params=i,this.request.headers=o,a[Dt.signQueriesKey]=Object.keys(a).sort().join(";"),a[Dt.signatureKey]=s,lg(a)}getDateTime(e){return this.iso8601(e).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(e,n){if(this.request.headers[Dt.dateHeader]=n,e.sessionToken&&(this.request.headers[Dt.tokenHeader]=e.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Dt.contentSha256Header]=await nr(r)}}async signature(e,n){let r=await this.getSigningKey(e,n.substr(0,8),this.request.region,this.serviceName);return xl(await sa(await this.stringToSign(n),r))}async stringToSign(e){let n=[];n.push(Dt.algorithm),n.push(e),n.push(this.credentialString(e));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let e=[],n=this.request.pathname||"/";e.push(this.request.method.toUpperCase()),e.push(n);let r=lg(this.request.params)||"";return e.push(r),e.push(`${this.canonicalHeaders()} `),e.push(this.signedHeaders()),e.push(await this.hexEncodedBodyHash()),e.join(` `)}canonicalHeaders(){let e=[];Object.keys(this.request.headers).forEach(r=>{e.push([r,this.request.headers[r]])}),e.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let i=r[1];if(typeof i>"u"||i===null||typeof i.toString!="function")throw new $(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(i.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await nr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(cg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return cA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await sa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await sa(r,i),s=await sa(a,o);return sa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var j2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],dg=new Map(j2),dA=new Map(j2.map(([t,e])=>[e,t])),pg=class extends De{static langMap=dg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new so(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=dg.get(r),o={TargetLanguage:dg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new so(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(m=>m.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=dA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},H2=pg;d();var W2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],gg=new Map(W2),pA=new Map(W2.map(([t,e])=>[e,t])),_s=class extends De{static langMap=gg;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=gg.get(r)||"detect",o=gg.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=pA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var gA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],mg=new Map(gA),Fs=class extends De{static langMap=mg;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:mg.get(r)||r,target_lang:mg.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var fg="https://{s}bing.com",Y2=fg+"/translator",mA=fg+"/ttranslatev3",fA=fg+"/tspellcheckv3",sc="bingGlobalConfig",Q2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],K2=new Map(Q2),G2=new Map(Q2.map(([t,e])=>[e,t])),V2=1e3,ar,uo;function hg(t,e){return t.replace("{s}",e?e+".":"")}async function hA(){if(!ar){let n=await oe.storage.local.get(sc);return n&&(ar=n[sc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=ar;return Date.now()-t>e}async function $2(){let t,e,n,r,a,i,o,s,u,l;try{let c=hg(Y2,t),p=await de({retry:2,url:c,responseType:"raw"}),{body:g,headers:m,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],e=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return ar={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[sc]:ar}),ar}function bA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=ar;return hg(t?fA:mA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+ar.count++:"")}function TA(t,e,n,r){let{token:a,key:i}=ar,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function Z2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>V2)throw new Error(`The supported maximum length of text is ${V2}. Please shorten the text.`);uo||(uo=$2()),await uo,await hA()&&(uo=$2(),await uo),e=e||"auto",n=n||"zh-CN",e=K2.get(e)||e,n=K2.get(n)||n;let a=bA(!1),i=TA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:hg(Y2,ar.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(ar=null,uo=null,await oe.storage.local.remove(sc),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let e=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&e.push(n)}),e.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(e){return this.createScope(e.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(e){return await nr(e)}async hexEncodedBodyHash(){return this.request.headers[Dt.contentSha256Header]?this.request.headers[Dt.contentSha256Header]:this.request.body?await this.hexEncodedHash(lg(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(e){return cA.indexOf(e)<0}iso8601(e){return e===void 0&&(e=new Date),e.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(e,n,r,a){let i=await sa(n,`${Dt.kDatePrefix}${e.secretKey}`),o=await sa(r,i),s=await sa(a,o);return sa(Dt.v4Identifier,s)}createScope(e,n,r){return[e.substr(0,8),n,r,Dt.v4Identifier].join("/")}};var j2=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],cg=new Map(j2),dA=new Map(j2.map(([t,e])=>[e,t])),dg=class extends De{static langMap=cg;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(e,n,r){if(super(e,n,r),!e||!e.accessKeyId||!e.secretAccessKey)throw new $("accessKeyId and secretAccessKey are required");this.accessKeyId=e.accessKeyId?.trim(),this.secretAccessKey=e.secretAccessKey?.trim()}async remoteDetectLanguage(e){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[e]})},a=new so(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let i=new URLSearchParams(r.params),o=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+i.toString(),headers:a.request.headers,method:r.method,body:r.body});if(o.DetectedLanguageList&&o.DetectedLanguageList.length>0)return o.DetectedLanguageList[0].Language;if(o.ResponseMetadata&&o.ResponseMetadata.Error){let s=o.ResponseMetadata.Error;throw new $(s.Code,s.Message)}else if(o.ResponseMetaData&&o.ResponseMetaData.Error){let s=o.ResponseMetaData.Error;throw new $(s.Code,s.Message)}else throw new $("response: "+JSON.stringify(o))}async translateList(e){let{text:n,from:r,to:a}=e,i=cg.get(r),o={TargetLanguage:cg.get(a)||a,TextList:n};i?o.SourceLanguage=i:o.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(o)},u=new so(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let p=c.TranslationList.map(m=>m.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=dA.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:p,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let p=c.ResponseMetadata.Error;throw new $(p.Code,p.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let p=c.ResponseMetaData.Error;throw new $(p.Code,p.Message)}else throw new $("response: "+JSON.stringify(c))}},H2=dg;d();var W2=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],pg=new Map(W2),pA=new Map(W2.map(([t,e])=>[e,t])),Fs=class extends De{static langMap=pg;maxTextGroupLength=50;isSupportList=!1;async translate(e){let{text:n,from:r,to:a}=e,i=pg.get(r)||"detect",o=pg.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:i,target_language:o,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=pA.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new $(l.status_code.toString(),l.status_message)}}};d();var gA=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],gg=new Map(gA),Ms=class extends De{static langMap=gg;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(e,n,r){if(super(e,n,r),!e||!e.url)throw new $("deeplx custom url are required, please check your settings.");this.url=e.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let e=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[e]}async translate(e){let{text:n,from:r,to:a}=e,i=this.getRandomKey(),s=await de({retry:this.retry,url:i,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:gg.get(r)||r,target_lang:gg.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new $(s.message||s.message||"API Error")}};d();d();var mg="https://{s}bing.com",Y2=mg+"/translator",mA=mg+"/ttranslatev3",fA=mg+"/tspellcheckv3",sc="bingGlobalConfig",Q2=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],K2=new Map(Q2),G2=new Map(Q2.map(([t,e])=>[e,t])),V2=1e3,ar,uo;function fg(t,e){return t.replace("{s}",e?e+".":"")}async function hA(){if(!ar){let n=await oe.storage.local.get(sc);return n&&(ar=n[sc]),!0}let{tokenTs:t,tokenExpiryInterval:e}=ar;return Date.now()-t>e}async function $2(){let t,e,n,r,a,i,o,s,u,l;try{let c=fg(Y2,t),p=await de({retry:2,url:c,responseType:"raw"}),{body:g,headers:m,url:f}=p;t=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=m["set-cookie"],e=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,i,o,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return ar={subdomain:t,IG:e,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:i,isVertical:o,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[sc]:ar}),ar}function bA(t){let{IG:e,IID:n,subdomain:r,isVertical:a}=ar;return fg(t?fA:mA,r)+"?isVertical=1"+(e&&e.length?"&IG="+e:"")+(n&&n.length?"&IID="+n+"."+ar.count++:"")}function TA(t,e,n,r){let{token:a,key:i}=ar,o={fromLang:n,text:e,token:a,key:i};return!t&&r&&(o.to=r),o}async function Z2(t,e,n){if(!t||!(t=t.trim()))return;if(t.length>V2)throw new Error(`The supported maximum length of text is ${V2}. Please shorten the text.`);uo||(uo=$2()),await uo,await hA()&&(uo=$2(),await uo),e=e||"auto",n=n||"zh-CN",e=K2.get(e)||e,n=K2.get(n)||n;let a=bA(!1),i=TA(!1,t,e,n==="auto-detect"?"zh-Hans":n),o={referer:fg(Y2,ar.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(i),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:o,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(ar=null,uo=null,await oe.storage.local.remove(sc),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],g=c[0].detectedLanguage;return{text:p.text,from:G2.get(g.language),to:G2.get(p.to)}}d();d();d();d();d();function ha(t){return t!=null}function eT(t,e,n){return`${t.type}#${e}#${n}`}function tT(t,e,n,r,a){return{body:a,id:r,type:eT(t,e,n)}}function yA(t,e,n,r){return{id:n,response:r,type:eT(t,"ask",e)}}function nT(t,e,n,r){if(ha(r)){let a=r.type;if(ha(a)&&ha(r.body)){let[i,o,s]=a.split("#");return i===t.type&&o===e&&s===n}else return!1}else return!1}function vA(t,e,n){if(ha(n)){let r=n.type;if(ha(r)&&ha(n.response)){let[a,i,o]=r.split("#");return a===t.type&&i==="ask"&&o===e}else return!1}else return!1}function SA(t){t.forEach(([e,n])=>e.removeEventListener("message",n)),t.length=0}function xA(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vA(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function EA(t,e,n,r){let a=i=>{let o=i.data;nT(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function J2(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(nT(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yA(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CA(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(tT(e,"tell",n,i,r),a)}async function X2(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),g=await xA(t,n,r,s);clearTimeout(p),l(g)});return e.postMessage(tT(n,"ask",r,s,a),i),u}var ba=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;J2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ha(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await X2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(EA(this.thisWindow,this.protocol,e,n))}tell(e,n){CA(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(J2(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return X2(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SA(this.listeners)}};var rT;async function aT(){if(Je()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=ba.iframe(Au,"*",{targetWindow:e});rT=n,await ba.connect(n).catch(r=>{z.error("connect with parent frame error",r)})}}function iT(){return rT}var uc=new Map;async function bg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=kn(t.body)),uc.has(e))return uc.get(e);let n=de(t);uc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{uc.delete(e)},3e3)}}async function oT(t){return bg(t)}async function lc(t){if(Je()){let n=iT();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw z.error("can not comunicate with root frame, use strict limiter",r),r}else return bg(t)}else return bg(t)}d();function sT(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function cc(t){await Nd(t)}async function dc(t,e){let n=await Rd(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return uT(t,e)}return uT(t,e)}async function uT(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Od(t,n,i-1e3),n}var wA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Tg=new Map(wA),Ms=class extends De{static langMap=Tg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await cc(Cd)}async translate(e){let{text:n,from:r,to:a}=e;return n?await Z2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await dc(Cd,async()=>{let e=await lc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return sT(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=Tg.get(n)||"auto",o=Tg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var lT=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],yg=new Map(lT),DA=new Map(lT.map(([t,e])=>[e,t])),vg=class extends De{static langMap=yg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=kn(a+o+n+i);this.domain&&(l=kn(a+o+n+this.domain+i));let c=new URLSearchParams({from:yg.get(s)||"auto",to:yg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let g=await de({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new $("API_SERVER_ERROR",g.error_msg);let{trans_result:m,from:f}=g,T=m.map(({dst:h})=>h);return{from:DA.get(f)||f,to:u,text:T.join(` -`)}}},cT=vg;d();d();var Xa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,g)=>{let[m,f]=g.split(":"),T=o[m];return f==="random"?AA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function AA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var dT=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Sg=class extends Xa{static langMap=new Map(dT);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:dT,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},pT=Sg;d();var kA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],pc=new Map(kA),xg=class extends De{static langMap=pc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!pc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${pc.get(r)||"auto"}2${pc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},gT=xg;d();var mT=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Eg=new Map(mT),PA=new Map(mT.map(([t,e])=>[e,t]));function LA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var Cg=class extends De{static langMap=Eg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=_A(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+LA(n)+i+o+this.appSecret,u=await nr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:Eg.get(r)||"auto",to:Eg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new $(JSON.stringify(g));let m=g.l,[f,T]=m.split("2");return{text:g.translation.join(` -`),from:PA.get(f),to:a}}};function _A(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var Dg=class extends De{static langMap=wg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:wg.get(r)||"auto",to:wg.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},bT=Dg;d();var Bs=class extends Xa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Io,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var TT="immersive-translate-gemini-fake-user-key",FA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],yT=new Map(FA),Ag=class extends oo{static langMap=yT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return yT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Id(TT,""),this.fakeId||(this.fakeId=MA(10),await zd(TT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function MA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await lc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":Pg.get(r)+"-"}${Pg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var RA={mock:ao,mock2:ao,custom:Bs,google:Ja,transmart:As,deepl:F2,volc:H2,volcAlpha:_s,bing:Ms,tencent:ws,tenAlpha:Ds,baidu:cT,caiyun:pT,cai:gT,openl:ic,youdao:fT,you:bT,d:ro,dpro:ro,deeplx:Fs,niu:M2,azure:B2,openai:z2,gemini:vT,claude:xT,papago:I2,aliyun:Ls,yandex:Is},Ta={};Object.keys(cr).forEach(t=>{Ta[t]={...cr[t],class:RA[t]}});function gc(t,e){let n=wn;if(Ta[t]&&Ta[t].class&&Ta[t].class.langMap&&Ta[t].class.langMap.size>0){let r=Ta[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return wn}async function ya(t,e,n){if(!t.text)return t;let r=null,a=await Xe({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function ET(t,e){for(let n of t)try{return await ya({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Lg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Zt(t.user);await new Ta[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function OA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Xe(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=E1(p,{sourceLanguage:OA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let g=a.beta,m=o.cache===!1&&g,f=a.debug===!0&&g;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(m&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,C=-1,D=Zt(e.user),M;try{M=new Ta[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let _={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let k of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||_):y;n(v,null,k)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){C++;let _=l;l==="openl"&&(_=l+"-"+p.codename||ic.DEFAULT_CODENAME);let k=M.getCacheKeyPrefix();k&&(_=k+"-"+_);let v=null;try{v=await Lu(J1({originalText:y.text,from:y.from,to:y.to,service:_}),200)}catch(I){z.warn("query cache DB error, but it's ok",I)}if(v){let I={...y,text:v.translatedText};b.sentences[C]=I,n&&n(null,I,y)}else T.push(y)}else T.push(...t.sentences);let B=T.length;if(h-B>0&&z.debug(`use ${h-B} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,_,k)=>{if(n&&n(y,_,k),!y&&_&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||ic.DEFAULT_CODENAME);let I=M.getCacheKeyPrefix();I&&(v=I+"-"+v),o.cache&&Lu(X1({translatedText:_.text,from:k.from,to:k.to,detectedFrom:_.from,key:kn(k.text),service:v}),3e3).catch(F=>{z.warn("set cache DB error",F)})}});for(let y of S?.sentences||[]){let _=b.sentences.findIndex(k=>!k);if(_===-1)throw new $("translateFailed","can not match the result");b.sentences[_]=y}return b}function CT({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=xe();if(!e)return null;let i=gc(e.config.translationService,e.config.targetLanguage),o=wn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(zA,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:h2,style:{maxWidth:"unset"},class:"mx-2"}),w(NA,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function zA(t){let{t:e}=xe(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=fa(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=fa(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function NA(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=fa(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=xe();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function wT(t){let{t:e}=xe(),{translationServiceItems:n,translationServiceOptions:r}=HA(t);return n.length?w(Rt,{children:[w(DT,{class:"mt-3",label:e("popupService"),items:r}),w(UA,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function DT(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function UA({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=xe(),a=jA(t),i=qA(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},g=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...g,[u]:l}}}})},[]),s=Ne(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(Rt,{children:s.map(({label:u,items:l},c)=>w(DT,{class:"mt-2",label:u,items:l},"field-"+c))})}function qA(t){return Ne(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function jA(t){return Ne(()=>{let{translationService:n}=t.config;if(cr[n])return Cl("translationService",n,t)},[cr,Cl,t])}function HA({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=xe(),u=Ne(()=>e?ds(e,"translationService"):[],[ds,e]),l=Ve(p=>{let g=u.find(m=>m.id===p.value);if(g.ok){if(n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ne(()=>{let p=it();return u.filter(m=>e.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!t&&!p&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function AT(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function kT(t){let{t:e}=xe(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=WA(t),[o,s]=re(()=>a?"excludeMatches":"matches"),u=Ne(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function WA({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,g=null,m=null,{translationUrlPattern:f}=e.config;if(l=Ne(()=>new URL(t||""),[t]),e.config&&t&&Zl(t)){c=AT(t);let{matches:h,excludeMatches:C}=f;p=!!h.find(D=>wt(t,D)),g=!!C.find(D=>wt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:C}=h;C.includes(n)?m=!0:m=!1}let T=Ve(()=>{let h=l.hostname,C=e.localConfig.tempTranslationUrlMatches||[],D=C.filter(B=>B.match!==h),M=!1;D.length!==C.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,C)=>{if(h==="default"){s(B=>{let S={...B.translationUrlPattern};return{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,matches:_g(t,S.matches),excludeMatches:_g(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(B=>{let S={...B.translationUrlPattern};return S[M]=_g(t,S[M]),S[D]=hl(C,S[D]),{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:g,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:b}}function _g(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!wt(t,n)):e):[]}d();d();d();d();var PT="G-MKMD9LWFTR";async function lt(t,e,n){try{let r=us(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=Je(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let k=await Nr(l,0),v=mc(new Date(k)),I=Date.now(),F=mc(new Date(I));if(v===F)return;await j3(l,I)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",g=await At("fakeUserId","");g||(g=await Nr("fakeUserId",""),g&&await Ze("fakeUserId",g));let m=Sn(),f=new Date,T=await At("installedAt","");T||(T=await Nr("installedAt",""),T&&await Ze("installedAt",T)),g?T||(T=new Date(0).toISOString(),await Ze("installedAt",T)):(g=KA(32),await Ze("fakeUserId",g)),T||(T=f.toISOString(),await Ze("installedAt",T));let b=new Date(T),h=mc(b),C=mc(f),D=h===C,M=f.getTime()-b.getTime()<7*24*60*60*1e3,B=`https://www.google-analytics.com/mp/collect?measurement_id=${PT}&api_secret=${p}`;u||(B=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${PT}&api_secret=${p}`);let S=Ei.parse(window.navigator.userAgent),y=e.map(k=>{let v=k.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",m&&(v.version=m),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=GA(b)),n.user){let F=p4(n.user);F&&Object.keys(F).forEach(L=>{v[L]=F[L]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let I="html";if(n.rule.pageType&&(I=n.rule.pageType),v.page_type=I,s?v.main_frame=0:v.main_frame=1,!c){let F=n.url;try{let L=new URL(F);v.site_host=L.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...k,params:v}});if(i)return;let _=await de({responseType:"text",url:B,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:y})})}catch{}}function KA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a=window.innerHeight*r.maxBodyScreenLength)return z.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new ju(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=VA(s.content,s.textContent),e&&(n=FT(r,e))}catch(i){z.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function _T(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&z.debug("update article node",n),t.articleNode=n)}function Fg(t,e){return e&&t?.contains(e)||!1}function VA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=$A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function $A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function FT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let E=q(A);return E==NodeFilter.FILTER_ACCEPT?dt.mark(A,L,T):E==NodeFilter.FILTER_REJECT,E}),N=v;if(q(N)===NodeFilter.FILTER_REJECT)return;for(dt.mark(N,L,T);N;){if(s=Fg(i,N),c&&c.length>0){let{currentNode:A,isMatchedSelection:E}=M(U,N,c);if(A)N=A;else break;if(!E)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let A=N;if(A.nodeName==="IFRAME"){I&&I(A),B(),Mg(b,!0),N=U.nextNode();continue}A.nodeType===Node.ELEMENT_NODE&&(l&&Ig(A,l),m&&Og(A,m));let E=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},A.immersiveTranslateComputedStyle||null);if(E&&n.paragraphFirstLetterFontSize>0&&A.childNodes.length==1&&A.childNodes[0].nodeType===Node.TEXT_NODE&&A.innerText?.length==1&&A?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(E=!1),Kt(A,u)&&!E){S(A);let H=null;for(;!(H=U.nextSibling())&&U.parentNode(););N=H;continue}let P=Qa(A);if(!MT(b,A)||E){B(A);let H=E?A:A.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&A.shadowRoot?.mode==="open"&&(E?I?.(A.shadowRoot):D({...k,container:A.shadowRoot})),A.nodeType===Node.ELEMENT_NODE&&A.nodeName==="PRE"&&p&&e5(A)}else if(N.nodeType===Node.TEXT_NODE)S(N);else throw new Error("should not be here");N=U.nextNode(),b.commonAncestorContainer&&N&&N.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(N)}function q(A){if(A.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(jr(A)){if(m){let H=Object.keys(m);if(H.length>0&&Kt(A,H))for(let W of H){let V=m[W];if(A.matches(W)){let se=m[W],X=Object.keys(se);for(let Z of X){let ue=se[Z];A.getAttribute(Z)!==ue&&(ue===null?A.removeAttribute(Z):A.setAttribute(Z,ue))}break}}}if(!k.force&&dt.isMarked(A,L)||t1(A,L)||hc(A,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||A.nodeName==="IFRAME"&&!Hi(A))return NodeFilter.FILTER_REJECT;if(A.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(A);if(A.immersiveTranslateComputedStyle=H,Rg(H))return F&&F(A),NodeFilter.FILTER_REJECT;let j=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Kt(A,u)&&j)return NodeFilter.FILTER_REJECT}let E=A.getBoundingClientRect(),{width:P,height:O}=E;return A.nodeName==="IMG"&&(P>48&&O>48?A.immersiveTranslateComputedStyle={display:"block"}:P>0&&O>0&&f!==!1&&(A.setAttribute("width",P),A.setAttribute("height",O))),!A.childNodes||A.childNodes&&A.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||O>0&&O<4)&&(A.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(A.nodeType===Node.TEXT_NODE){let E=A.textContent?.trim();if(!E)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=A.parentNode;if(P.getBoundingClientRect){let{width:O,height:H}=P.getBoundingClientRect();if(O>0&&O<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return g>0&&E.length>=g&&Bg(A,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&B();function M(k,v,I){let F=v.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function B(k){if(k&&k.nodeName==="BR"){b.commonAncestorContainer=k.parentNode;let I=[...b.flatNodes],F=b.flatNodes.filter(L=>k.parentNode?.contains(L));F.length>0&&I.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=I)}let v=XA(b,a,n);v&&(v.xpath=r1(r,s,v.commonAncestorContainer,i),e&&e(v)),Mg(b)}function S(k){if(!MT(b,k)){B(),Mg(b);let v=k.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(k)}function y(k,v,I){k.commonAncestorContainer=v;let F=_(I);k.isPreWhitespace=F}function _(k){return k&&k.whiteSpace&&k.whiteSpace.startsWith("pre")||k&&k.whiteSpace==="break-spaces"||!1}}function MT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Qa(e));let r=JA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function QA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function ZA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Ig(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function JA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Qa(e)):!1}function XA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=t5(r,a,n);o||(o=a);let s=[];for(let m of r){let f=ZA(t,o,m);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,g=0;for(;p&&(c.push(p),p!==l);){if(g++,g>YA){z.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Mg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Rg(t){return t.display==="none"}var dt={_marked_key:Rh,isMarked(t,e){return Ep(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return Ml(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)dt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return ut(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=Ki(t,"markWalk")||"";return ut(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Qa(t)):!1}};function e5(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function t5(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(xn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Bg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Bg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=p1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function IT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let g of c){let m=l[g];if(g==="translate"&&m==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||n5(p,a,i,o)||!m1(T,n,r))continue}p.getAttribute(g)!==m&&(m===null?p.removeAttribute(g):p.setAttribute(g,m))}}}function Og(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Kt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function hc(t,e){return Kt(t,e.excludeSelectors||[])?Kt(t,e.selectors||[])?!1:!Kt(t,e.stayOriginalSelectors||[]):!1}function fc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Kt(t,e.concat(n))}function n5(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&hc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ll(o,e,n))return!0}}return!1}d();function RT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Cu)||zg(t).catch(i=>{z.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var bc="";async function zg(t){let e=document.title;if(!e||e.includes(Cu))return;bc!==e&&(bc=e);let n=await Ie({text:e,pageLangs:[yt(),"en"]});if(!Ui(t,n))try{let r=await ya({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Cu+bc)}catch(r){throw r}}function OT(t){t.rule.isTranslateTitle&&(document.title=bc)}function lo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function an(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var r5={sanitize:t=>t};function jg(t,e){if(t.interruptEffectDOM)return;let n=an(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:ti.bind(null,t),onFrame:r=>{Ug(t,r,!0)},onIgnoreElement:r=>{dt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),bi&&ut(e,"consumeContainer",t.id)}function Ug(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!Hi(e))return;z.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(ei(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else z.debug("onFrame shadowRoot",e.host),ei(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function ei(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=an(e.ctx),i=0;if(u(e,t,n))return;if(jr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(jr(c)&&(r&&Ig(c,r),a&&Og(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){dt.clearMark(l),i++,e.immediateTranslateCapacity>=0?jg(e,l):(bi&&ut(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ug(e,l.shadowRoot,n),!1;if(c==="iframe")return Ug(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return fc(l,p.selectors);if(p.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,p){if(_T(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=an(l.ctx);return!!hc(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Rs(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(Tc(t.rootNodes),NT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=Ng(t.rootNodes);if(Tc(t.rootNodes),zT(o))return;co(o,r,t.targetNodes||[]),NT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];co(o,r,t.rootNodes||[]),UT(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=Ng(t.rootNodes);if(zT(o))return;co(o,r,t.targetNodes||[]),UT(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=Ng(t.targetNodes);Tc(t.targetNodes),co(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&Tc(t.targetNodes),Kg(t)}catch(o){z.error(o)}}}function zT(t){return!t||!jr(t)?!1:t.classList.contains(bt)}function NT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function UT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Ki(r,"immersiveTranslateClassBak");Ml(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Ng(t){return t?t[t.length-1].nextSibling:null}function Tc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function co(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var a5=Uo(yc,300);async function ti(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||i5(e.rootNodes)||e.stepState>=2)return;e.stepState=2,bi&&ut(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Za(i),u=ac(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:d5(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Wg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Tr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(z.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),o5(t,e.text),Hg(t,e,r)):(bi&&ut(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function i5(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?jr(e)&&e.classList.contains(bt):!1}function o5(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function Hg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),bi&&ut(e.commonAncestorContainer,"consumeParagraph",t.id),ut(e.commonAncestorContainer,Oh,"1",!0),n=="hover"){yc.call(t,t.ctx);return}a5.call(t,t.ctx)}async function yc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Xe(r,e,(a,i,o)=>{let s=o.id,u=s5(t,s.toString());u&&u5.call(null,a,i,o,u,e,n)})}catch(a){z.error("translateCurrentQueue error",a);return}}function s5(t,e){return t.find(n=>n.id===e)}function u5(t,e,n,r,a,i){let o=!1,s=r;if(qi(s.commonAncestorContainer,n.id)?.remove(),Kg(r),s&&(t||!e)){t||(z.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,qh,l.toString()),c.classList.add("notranslate",bt,bt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(co(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let g=l5(a,t).replaceAll(` + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let p=c[0].translations[0],g=c[0].detectedLanguage;return{text:p.text,from:G2.get(g.language),to:G2.get(p.to)}}d();d();d();d();d();function ha(t){return t!=null}function eT(t,e,n){return`${t.type}#${e}#${n}`}function tT(t,e,n,r,a){return{body:a,id:r,type:eT(t,e,n)}}function yA(t,e,n,r){return{id:n,response:r,type:eT(t,"ask",e)}}function nT(t,e,n,r){if(ha(r)){let a=r.type;if(ha(a)&&ha(r.body)){let[i,o,s]=a.split("#");return i===t.type&&o===e&&s===n}else return!1}else return!1}function vA(t,e,n){if(ha(n)){let r=n.type;if(ha(r)&&ha(n.response)){let[a,i,o]=r.split("#");return a===t.type&&i==="ask"&&o===e}else return!1}else return!1}function SA(t){t.forEach(([e,n])=>e.removeEventListener("message",n)),t.length=0}function xA(t,e,n,r){return new Promise(a=>{let i=o=>{let s=o.data;vA(e,n,s)&&s.id===r&&(t.removeEventListener("message",i),a(s.response))};t.addEventListener("message",i)})}function EA(t,e,n,r){let a=i=>{let o=i.data;nT(e,"tell",n,o)&&r(o.body)};return t.addEventListener("message",a),[t,a]}function J2(t,e,n,r,a,i){let o=async s=>{let u=s.data;if(nT(n,"ask",r,u)){let l=await i(u.body);e=s.source,e.postMessage(yA(n,r,u.id,l),s.origin)}};return t.addEventListener("message",o),[t,o]}function CA(t,e,n,r,a){let i=Math.random().toString();return t.postMessage(tT(e,"tell",n,i,r),a)}async function X2(t,e,n,r,a,i,o){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let p=setTimeout(()=>c(new Error(`Failed to get response within ${o}ms`)),o),g=await xA(t,n,r,s);clearTimeout(p),l(g)});return e.postMessage(tT(n,"ask",r,s,a),i),u}var ba=class t{constructor(e,n,r=window,a="*"){this.protocol=e;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;J2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(e,n=10,r=500){for(let a=0;a<=n;a++)try{return await e.ping({timeout:r}),e}catch{continue}throw new Error(`Could not connect on protocol ${e.protocol.type} after ${n*r}ms`)}static parent(e,n,r="*",a=window){let i=n.contentWindow;if(ha(i))return new t(e,i,a,r);throw new Error("iframe.contentWindow was null")}static iframe(e,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new t(e,a,r,n)}static rootIframe(e,n="*",{thisWindow:r=window}={}){return new t(e,null,r,n)}getSystemProtocol(e){return{type:`system|${e}`}}listeners=[];async ping({timeout:e=1e4}){await X2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,e)}handleTell(e,n){this.listeners.push(EA(this.thisWindow,this.protocol,e,n))}tell(e,n){CA(this.targetWindow,this.protocol,e,n,this.targetOrigin)}handleAsk(e,n){this.listeners.push(J2(this.thisWindow,this.targetWindow,this.protocol,e,this.targetOrigin,n))}ask(e,n,r=1e4){if(this.targetWindow)return X2(this.thisWindow,this.targetWindow,this.protocol,e,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){SA(this.listeners)}};var rT;async function aT(){if(Xe()){let e=globalThis;for(;e.top!=e.self;)e=e.top;let n=ba.iframe(Au,"*",{targetWindow:e});rT=n,await ba.connect(n).catch(r=>{z.error("connect with parent frame error",r)})}}function iT(){return rT}var uc=new Map;async function hg(t){let e=t.url;if(t.method&&(e+=t.method),t.body&&(e+=kn(t.body)),uc.has(e))return uc.get(e);let n=de(t);uc.set(e,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{uc.delete(e)},3e3)}}async function oT(t){return hg(t)}async function lc(t){if(Xe()){let n=iT();if(n)try{return await n.ask("throttleRequest",t)}catch(r){throw z.error("can not comunicate with root frame, use strict limiter",r),r}else return hg(t)}else return hg(t)}d();function sT(t){let e=t.split(".");if(e.length<=1)throw new Error("invlaid token");let n=e[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),i=JSON.parse(a),o=new Date(i.exp*1e3);return{accessToken:t,accessTokenExpiresAt:o.toISOString()}}d();async function cc(t){await zd(t)}async function dc(t,e){let n=await Id(t);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),i=new Date(n.accessTokenExpiresAt).getTime();if(i-r>30*1e3)return n;if(i-r>3e3)return uT(t,e)}return uT(t,e)}async function uT(t,e){let n=await e(),r=n.accessTokenExpiresAt,i=new Date(r).getTime()-Date.now();return await Rd(t,n,i-1e3),n}var wA=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],bg=new Map(wA),Bs=class extends De{static langMap=bg;isSupportList=!0;maxTextLength=1800;constructor(e,n,r){super(e,n,r)}static async clearState(){await cc(Ed)}async translate(e){let{text:n,from:r,to:a}=e;return n?await Z2(n,r,a):{...e}}async init(){await this.getAccessToken()}async getAccessToken(){return await dc(Ed,async()=>{let e=await lc({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return sT(e)})}async translateList(e){let{from:n,to:r,text:a}=e,i=bg.get(n)||"auto",o=bg.get(r)||r;i==="auto"&&(i="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${i}&to=${o}&api-version=3.0&includeSentenceLength=true`,p=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(p&&p.length>0&&p[0].translations&&p[0].translations.length>0)return{text:p.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new $("Microsoft translate error "+JSON.stringify(p))}};d();var lT=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Tg=new Map(lT),DA=new Map(lT.map(([t,e])=>[e,t])),yg=class extends De{static langMap=Tg;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(e,n,r){if(super(e,n,r),!e||!e.appid||!e.key)throw new $("appid and key are required");this.appid=e.appid?.trim(),this.key=e.key?.trim(),e.action&&(this.action=!0),e.endpoint&&(this.endpoint=e.endpoint),e.fieldEndpoint&&(this.fieldEndpoint=e.fieldEndpoint),e.domain&&(this.domain=e.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(e){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:i}=this,{text:o,from:s,to:u}=e,l=kn(a+o+n+i);this.domain&&(l=kn(a+o+n+this.domain+i));let c=new URLSearchParams({from:Tg.get(s)||"auto",to:Tg.get(u)||u,q:o,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let p=new URL(r);p.search=c.toString();let g=await de({url:p.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new $("API_SERVER_ERROR",g.error_msg);let{trans_result:m,from:f}=g,T=m.map(({dst:h})=>h);return{from:DA.get(f)||f,to:u,text:T.join(` +`)}}},cT=yg;d();d();var Xa=class extends De{langMap;requestBaseConfig;apiServiceConfig;constructor(e,n,r){super(e,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(e){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n);if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(e){if(!Object.keys(this.apiServiceConfig).length)throw new $("serivce id not found config");let{text:n,from:r,to:a}=e;if(!this.langMap.has(a))throw new $(`Unsupported language: ${a}`);a=this.langMap.get(a);let i=await this.checkLang(r,n.join(" "));if(!i)return{text:n,from:r,to:a};r=i;let o=this.handleRequest(n,r,a),s=await Al(o);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(e){let n=e.request.url,r=e.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:e.request.retry||this.retry,method:e.request.method||"POST",headers:r,body:JSON.stringify(e.request.body),timeout:this.requestTimeout}}async checkLang(e,n){if(e=="auto"){if(this.langMap.has("auto"))return"auto";e=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(e)?this.langMap.get(e):null}handleRequest(e,n,r){let a={...this.requestBaseConfig},i=a?.body||"",o=this.apiServiceConfig.keywords||{};a.body=u(i);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(e)?JSON.stringify(e):`"${e}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(p,g)=>{let[m,f]=g.split(":"),T=o[m];return f==="random"?AA(T.split(",")):T})}}handleResponseText(e){let n=this.apiServiceConfig.response,r=e,a=n.text.split(".");for(let i of a){if(Array.isArray(r))return r=r.map(o=>o[i]),r;r=r[i]}return r}detectLanguageRemotely(e){return Wr.detectLanguageRemotelyByTransmart(e)}};function AA(t){let e=Math.floor(Math.random()*t.length);return t[e]}var dT=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],vg=class extends Xa{static langMap=new Map(dT);constructor(e,n,r){if(!e?.token)throw new $("token are required");super({...e,isSupportList:!0,langs:dT,keywords:{token:e.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},pT=vg;d();var kA=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],pc=new Map(kA),Sg=class extends De{static langMap=pc;token="ssdj273ksdiwi923bsd9";constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(e){let{text:n,from:r,to:a}=e;if(!pc.get(a))throw new $(`Unsupported language: ${a}`);if(r==="auto")throw new $("Unsupported language: auto");let o=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:o,trans_type:`${pc.get(r)||"auto"}2${pc.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},gT=Sg;d();var mT=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],xg=new Map(mT),PA=new Map(mT.map(([t,e])=>[e,t]));function LA(t){let e=t.length;return e<=20?t:t.substring(0,10)+e+t.substring(e-10,e)}var Eg=class extends De{static langMap=xg;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(e,n,r){if(super(e,n,r),!e||!e.appId||!e.appSecret)throw new $("appId and appSecret are required");this.appId=e.appId?.trim(),this.appSecret=e.appSecret?.trim(),e.domain&&(this.domain=e.domain),e&&e.vocabId&&(this.vocabId=e.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i=_A(32),o=Math.round(new Date().getTime()/1e3),s=this.appId+LA(n)+i+o+this.appSecret,u=await nr(s),l={q:n,appKey:this.appId,salt:i.toString(),from:xg.get(r)||"auto",to:xg.get(a)||a,sign:u,signType:"v3",curtime:o.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new $(JSON.stringify(g));let m=g.l,[f,T]=m.split("2");return{text:g.translation.join(` +`),from:PA.get(f),to:a}}};function _A(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[e,t]));var wg=class extends De{static langMap=Cg;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(e,n,r){super(e,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(e){let{text:n,from:r,to:a}=e,i={q:n,from:Cg.get(r)||"auto",to:Cg.get(a)||a},o=new URLSearchParams(i),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:o.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new $("Youdao translation failed: "+JSON.stringify(s))}},bT=wg;d();var Is=class extends Xa{constructor(e,n,r){super({...e,isSupportList:!0,langs:(e.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:e.limitPerSecond||5,maxTextLengthPerRequest:e.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:e.maxTextGroupLengthPerRequest||1,placeholderDelimiters:e.placeholderDelimiters||Ro,request:{url:e.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var TT="immersive-translate-gemini-fake-user-key",FA=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],yT=new Map(FA),Dg=class extends oo{static langMap=yT;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(e,n,r){super(e,n,r),e||(e={}),e.provider&&(this.provider=e.provider),e.randomPrefix&&(this.randomPrefix=e.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",e?.apiUrl&&(this.apiUrl=e.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=e?.bodyConfigs||{}}getLangMap(){return yT}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(e,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Bd(TT,""),this.fakeId||(this.fakeId=MA(10),await Od(TT,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let i=this.systemPrompt+e;this.randomPrefix&&(i=this.randomPrefix.replace("{{id}}",this.fakeId)+i);let o={contents:[{role:"user",parts:[{text:i}]}],...this.bodyConfigs};return a.body=JSON.stringify(o,null,2),a}parseResponse(e){return e?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(e,n,r,a){let i=super.filterContent(e,n,r);return i.includes(this.fakeId)&&a.length<=1?e:i}};function MA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await lc({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(e){let{text:n,from:r,to:a}=e;if(!n)return{...e};let i=await this.getAccessToken(),o=new URLSearchParams;o.append("srv","tr-url-widget"),o.append("id",`${i.accessToken}-0-0`),o.append("format","html"),o.append("lang",`${r==="auto"?"":kg.get(r)+"-"}${kg.get(a)}`),n.forEach(l=>{o.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${o.toString()}`});if(s?.code!==200)return{...e};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var RA={mock:ao,mock2:ao,custom:Is,google:Ja,transmart:ks,deepl:F2,volc:H2,volcAlpha:Fs,bing:Bs,tencent:Ds,tenAlpha:As,baidu:cT,caiyun:pT,cai:gT,openl:ic,youdao:fT,you:bT,d:ro,dpro:ro,deeplx:Ms,niu:M2,azure:B2,openai:z2,gemini:vT,claude:xT,papago:I2,aliyun:_s,yandex:Rs},Ta={};Object.keys(cr).forEach(t=>{Ta[t]={...cr[t],class:RA[t]}});function gc(t,e){let n=wn;if(Ta[t]&&Ta[t].class&&Ta[t].class.langMap&&Ta[t].class.langMap.size>0){let r=Ta[t].class.langMap,a=n.filter(i=>r.get(i));return a.includes(e)||a.unshift("placeholder"),a}else return wn}async function ya(t,e,n){if(!t.text)return t;let r=null,a=await Qe({sentences:[t]},e,(i,o,s)=>{i&&(r=i)},n);if(r)throw r;if(a.sentences.length>0)return{...t,...a.sentences[0]};throw new $("translateFailed","translate failed")}async function ET(t,e){for(let n of t)try{return await ya({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...e,translationService:n},{retry:1,requestTimeout:e.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Pg(t){let{config:e,translationService:n}=t,r=e.translationGeneralConfig,a=e.translationServices,i=n,o=a[i]||{},s=Zt(t.user);await new Ta[i].class(o,r,{translationService:i,userToken:t.user?.token,isPro:s,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps}).init()}function OA(t){if(!t?.length)return"auto";let e=t[0].from;return t[0].fromByClient&&t[0].fromByClient!=="auto"&&(e=t[0].fromByClient),e}async function Qe(t,e,n,r){if(!t.sentences.length)return{...t};let{config:a,translationService:i,state:o}=e,s=a.translationGeneralConfig,u=a.translationServices,l=i,c=e.targetLanguage;t&&t.sentences&&t.sentences[0]&&t.sentences[0].to&&(c=t.sentences[0].to);let p=u[l]||{};p=E1(p,{sourceLanguage:OA(t.sentences),targetLanguage:c,model:p.model||"",url:e.url,isPro:e.isPro?"true":"false",sourceProgram:e.sourceProgram||""}),r&&(p={...p,...r});let g=a.beta,m=o.cache===!1&&g,f=a.debug===!0&&g;t.sentences&&t.sentences.length>0&&(t.sentences=t.sentences.map(y=>(m&&(y.refresh=!0),f&&(y.debug=!0),y))),l==="openai"&&(t.sentences=t.sentences.map(y=>({...y,from:"auto"})));let T=[],b={sentences:Array(t.sentences.length)},h=t.sentences.length,C=-1,D=Zt(e.user),M;try{M=new Ta[l].class(p,s,{translationService:l,userToken:e.user?.token,isPro:D,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps,minTextCount:e.rule.paragraphMinTextCount}),await M.init()}catch(y){if(n){T.push(...t.sentences);let _={translationService:l,isPro:!!e.isPro,isLogin:!!e.user?.token};for(let k of T){let v=y instanceof $?new $(y.name,y.message).initNetWork(y.status).initData(y.data||_):y;n(v,null,k)}}return{sentences:[]}}if(o.cache)for(let y of t.sentences){C++;let _=l;l==="openl"&&(_=l+"-"+p.codename||ic.DEFAULT_CODENAME);let k=M.getCacheKeyPrefix();k&&(_=k+"-"+_);let v=null;try{v=await Lu(J1({originalText:y.text,from:y.from,to:y.to,service:_}),200)}catch(I){z.warn("query cache DB error, but it's ok",I)}if(v){let I={...y,text:v.translatedText};b.sentences[C]=I,n&&n(null,I,y)}else T.push(y)}else T.push(...t.sentences);let B=T.length;if(h-B>0&&z.debug(`use ${h-B} sentences from cache`),!T.length)return b;let S=await M.multipleTranslate({sentences:T},p,(y,_,k)=>{if(n&&n(y,_,k),!y&&_&&!l.startsWith("mock")&&o.cache){let v=l;l==="openl"&&(v=l+"-"+p.codename||ic.DEFAULT_CODENAME);let I=M.getCacheKeyPrefix();I&&(v=I+"-"+v),o.cache&&Lu(X1({translatedText:_.text,from:k.from,to:k.to,detectedFrom:_.from,key:kn(k.text),service:v}),3e3).catch(F=>{z.warn("set cache DB error",F)})}});for(let y of S?.sentences||[]){let _=b.sentences.findIndex(k=>!k);if(_===-1)throw new $("translateFailed","can not match the result");b.sentences[_]=y}return b}function CT({currentLang:t,ctx:e,onSetPageLanguage:n,setSettings:r}){let{t:a}=xe();if(!e)return null;let i=gc(e.config.translationService,e.config.targetLanguage),o=wn;i.length<=30&&(o=i.indexOf("auto")>=0?i:["auto",...i]);let s=i.filter(u=>u!=="auto");return w("div",{class:"flex mt-4 items-center",children:[w(zA,{supportedLanguages:o,interfaceLanguage:e.config.interfaceLanguage,currentLang:t,value:e.sourceLanguage,onSelected:n}),w("img",{src:h2,style:{maxWidth:"unset"},class:"mx-2"}),w(NA,{supportedLanguages:s,interfaceLanguage:e.config.interfaceLanguage,value:e.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function zA(t){let{t:e}=xe(),{value:n,currentLang:r}=t,a=e("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=e("languages.auto")),w("div",{class:"language-select-container",children:[w("label",{children:a}),w("select",{autoComplete:"off",class:"language-select",onChange:i=>{let o=i.target.value;o&&t.onSelected(o)},children:t.supportedLanguages.map((i,o)=>{let s=fa(i,t.interfaceLanguage),u="";return i==="auto"&&n==="auto"&&(r&&r==="auto"?u=e("languages.auto"):u=fa(r,t.interfaceLanguage)+` (${e("languages.auto")})`),w("option",{value:i,selected:i===t.value,children:u||s},"selectlink"+o)})})]})}function NA(t){return w("div",{class:"language-select-container",children:[w("label",{children:t.label}),w("select",{autoComplete:"off",class:"language-select",onChange:e=>{let n=e.target.value;n&&t.onSelected(n)},children:t.supportedLanguages.map((e,n)=>{let r=fa(e,t.interfaceLanguage);return w("option",{value:e,selected:e===t.value,children:r},"selectlink"+n)})})]})}d();d();function va(t){let{items:e,maxWidth:n,className:r,style:a}=t,{lang:i}=xe();return n=n||(i==="en"?144:160),w("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:e.find(o=>o.selected)?.value,onChange:o=>{let s=o.target.value,u=e.find(l=>l.value===s);u&&u.onSelected(u)},children:e.map((o,s)=>w("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+s))})}function wT(t){let{t:e}=xe(),{translationServiceItems:n,translationServiceOptions:r}=HA(t);return n.length?w(Ot,{children:[w(DT,{class:"mt-3",label:e("popupService"),items:r}),w(UA,{ctx:t.ctx,onRestorePage:t.onRestorePage,setSettings:t.setSettings})]}):null}function DT(t){return w("div",{class:`min-select-container ${t.class||""}`,children:[w("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[t.label,"\uFF1A"]}),w(va,{className:"translate-service transform-padding-left",maxWidth:300,items:t.items})]})}function UA({ctx:t,setSettings:e,onRestorePage:n}){let{t:r}=xe(),a=jA(t),i=qA(t),o=Ve((u,l)=>{e(c=>{let p=c.translationServices||{},g=p[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...p,[a.id]:{...g,[u]:l}}}})},[]),s=Ne(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(p=>({label:`${p.label?r(p.label):p.value}`,value:p.value,selected:p.value==i[u.name],onSelected:()=>{o(u.name,p.value)}}));return{label:l,items:c}}),[i]);return!i||!a?.props?.length||!s||!s?.length?null:w(Ot,{children:s.map(({label:u,items:l},c)=>w(DT,{class:"mt-2",label:u,items:l},"field-"+c))})}function qA(t){return Ne(()=>{let{translationServices:n,translationService:r}=t.config;return n&&n[r]?n[r]||{}:{}},[t])}function jA(t){return Ne(()=>{let{translationService:n}=t.config;if(cr[n])return Cl("translationService",n,t)},[cr,Cl,t])}function HA({isProUser:t,ctx:e,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:i,openOptionsPage:o}){let{t:s}=xe(),u=Ne(()=>e?ps(e,"translationService"):[],[ps,e]),l=Ve(p=>{let g=u.find(m=>m.id===p.value);if(g.ok){if(n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?e.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{i()},1)}else n(m=>({...m,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{o()},100)},[o,i,a,n]),c=Ne(()=>{let p=ot();return u.filter(m=>e.config.showUnconfiguredTranslationServiceInPopup===!1?m.ok:!0).map(m=>({label:`${s("translationServices."+m.id)}${m.ok?"":" "+(" "+(!t&&!p&&m.providers&&m.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:m.id,selected:m.selected,onSelected:l}))},[u,e,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function AT(t){let e=t.indexOf("#");return e===-1?t:t.slice(0,e)}function kT(t){let{t:e}=xe(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:i}=WA(t),[o,s]=re(()=>a?"excludeMatches":"matches"),u=Ne(()=>r||a||!1,[r,a]),l=Ve(c=>{s(c),u&&i(c,n.hostname)},[s,i,u]);return w("div",{class:"flex justify-between mt-5",children:[w(va,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:e("alwaysTranslateThisSite"),value:"matches",selected:o==="matches",onSelected:()=>{l("matches")}},{label:e("neverTranslateThisSite"),value:"excludeMatches",selected:o==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),w("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let p=c.target.checked;i(p?o:"default",n.hostname)}})]})}function WA({currentUrl:t,ctx:e,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:i,onTranslatePage:o,setSettings:s,onClose:u}){let l=null,c=null,p=null,g=null,m=null,{translationUrlPattern:f}=e.config;if(l=Ne(()=>new URL(t||""),[t]),e.config&&t&&Zl(t)){c=AT(t);let{matches:h,excludeMatches:C}=f;p=!!h.find(D=>wt(t,D)),g=!!C.find(D=>wt(t,D))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=e.config,{matches:C}=h;C.includes(n)?m=!0:m=!1}let T=Ve(()=>{let h=l.hostname,C=e.localConfig.tempTranslationUrlMatches||[],D=C.filter(B=>B.match!==h),M=!1;D.length!==C.length&&(M=!0),M&&r({...e.localConfig,tempTranslationUrlMatches:[...D]})},[r]),b=Ve((h,C)=>{if(h==="default"){s(B=>{let S={...B.translationUrlPattern};return{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,matches:Lg(t,S.matches),excludeMatches:Lg(t,S.excludeMatches)}}}),T();return}let D=h,M=D==="matches"?"excludeMatches":"matches";l&&s(B=>{let S={...B.translationUrlPattern};return S[M]=Lg(t,S[M]),S[D]=hl(C,S[D]),{...B,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...B.translationUrlPattern,...S}}}),D==="matches"&&a==="Original"?setTimeout(()=>{o(),u()},100):D==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{i(),u()},100)},[o,u,a,T]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:p,isNeverTranslateDomain:g,isAlwaysTranslateLang:m,handleTranslationUrlPatternSelected:b}}function Lg(t,e){return e?(Array.isArray(e)||(e=[e]),t?e.filter(n=>!wt(t,n)):e):[]}d();d();d();d();var PT="G-MKMD9LWFTR";async function lt(t,e,n){try{let r=ls(),a=Me(),i=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(i=!1);let o=ye(),s=Xe(),u=a.PROD==="1",l=`report_${t}`,c=t.endsWith("_daily");if(c){if(s)return;let k=await Nr(l,0),v=mc(new Date(k)),I=Date.now(),F=mc(new Date(I));if(v===F)return;await j3(l,I)}else if(!n.config.telemetry)return;let p="sitc4WmvShWYwfU0dANM3Q",g=await At("fakeUserId","");g||(g=await Nr("fakeUserId",""),g&&await Je("fakeUserId",g));let m=Sn(),f=new Date,T=await At("installedAt","");T||(T=await Nr("installedAt",""),T&&await Je("installedAt",T)),g?T||(T=new Date(0).toISOString(),await Je("installedAt",T)):(g=KA(32),await Je("fakeUserId",g)),T||(T=f.toISOString(),await Je("installedAt",T));let b=new Date(T),h=mc(b),C=mc(f),D=h===C,M=f.getTime()-b.getTime()<7*24*60*60*1e3,B=`https://www.google-analytics.com/mp/collect?measurement_id=${PT}&api_secret=${p}`;u||(B=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${PT}&api_secret=${p}`);let S=Ei.parse(window.navigator.userAgent),y=e.map(k=>{let v=k.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser&&(v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown",r&&(v.browser_name=r.name,v.browser_version=r.version)),S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),n.translationService&&(v.translation_service||(v.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(v.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?v.openai_is_official="1":v.openai_is_official="0":v.openai_is_official="1"))),n.targetLanguage&&(v.target_language=n.targetLanguage),n.config.interfaceLanguage&&(v.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?v.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":v.enable_default_always_translated_urls="0",m&&(v.version=m),n.config.enableInputTranslation?v.enable_input_translation=n.config.enableInputTranslation?"1":"0":v.enable_input_translation="0",n.config.translationTheme&&(v.translation_theme=n.config.translationTheme),n.config.alpha&&(v.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?v.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):v.always_translate_languages="none",a.INSTALL_FROM&&(v.install_from=a.INSTALL_FROM),n.config.beta&&(v.beta=n.config.alpha.toString()),n.config.translationArea&&(v.translation_area=n.config.translationArea),h&&(v.install_day=GA(b)),n.user){let F=p4(n.user);F&&Object.keys(F).forEach(L=>{v[L]=F[L]})}else v.user_type="anonymous";n.config.translationMode&&(v.translation_mode=n.config.translationMode),v.userscript=o.toString(),D?v.is_new_user_today="1":v.is_new_user_today="0",M?v.is_new_user_this_week="1":v.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?v.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():v.temp_translate_domain_minutes="0";let I="html";if(n.rule.pageType&&(I=n.rule.pageType),v.page_type=I,s?v.main_frame=0:v.main_frame=1,!c){let F=n.url;try{let L=new URL(F);v.site_host=L.hostname}catch{v.site_host="unknown"}n.sourceLanguage&&(v.source_language=n.sourceLanguage)}return{...k,params:v}});if(i)return;let _=await de({responseType:"text",url:B,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:y})})}catch{}}function KA(t){let e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a=window.innerHeight*r.maxBodyScreenLength)return z.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:e,articleNode:n};try{let i=window.document.cloneNode(!0),s=new ju(i,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");e=VA(s.content,s.textContent),e&&(n=FT(r,e))}catch(i){z.debug(i)}return{bodyIsRoot:a(),bodyNode:e,articleNode:n};function a(){return t.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function _T(t,e){if(!t.rule.bodyRule.articleSelector||e.nodeType!==Node.ELEMENT_NODE)return;let n=e.querySelector(t.rule.bodyRule.articleSelector);n&&(t.articleNode!=n&&z.debug("update article node",n),t.articleNode=n)}function _g(t,e){return e&&t?.contains(e)||!1}function VA(t,e){let a=new DOMParser().parseFromString(t,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let i=$A(a[0]),o=document.querySelector(i);return!o||(a.length>1&&(o=o.parentElement),o==document.documentElement)?null:(o?.textContent?.length||0)>=e.length&&e.length>=500?o:null}function $A(t){let e=t.tagName.toLowerCase();t.id&&(e+="#"+t.id),t.className&&(e+="."+t.className.trim().split(/\s+/).join("."));let n=Array.from(t.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return e+n}function FT(t,e){if(e.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(e.childNodes);if(r.filter(i=>t.articleChildTags.includes(i.nodeName)).length>=t.articleChildTagsNum)return e;for(let i=0;i{let E=q(A);return E==NodeFilter.FILTER_ACCEPT?dt.mark(A,L,T):E==NodeFilter.FILTER_REJECT,E}),N=v;if(q(N)===NodeFilter.FILTER_REJECT)return;for(dt.mark(N,L,T);N;){if(s=_g(i,N),c&&c.length>0){let{currentNode:A,isMatchedSelection:E}=M(U,N,c);if(A)N=A;else break;if(!E)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let A=N;if(A.nodeName==="IFRAME"){I&&I(A),B(),Fg(b,!0),N=U.nextNode();continue}A.nodeType===Node.ELEMENT_NODE&&(l&&Bg(A,l),m&&Rg(A,m));let E=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},A.immersiveTranslateComputedStyle||null);if(E&&n.paragraphFirstLetterFontSize>0&&A.childNodes.length==1&&A.childNodes[0].nodeType===Node.TEXT_NODE&&A.innerText?.length==1&&A?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(E=!1),Gt(A,u)&&!E){S(A);let H=null;for(;!(H=U.nextSibling())&&U.parentNode(););N=H;continue}let P=Qa(A);if(!MT(b,A)||E){B(A);let H=E?A:A.parentElement;H&&H.childNodes.length>0&&y(b,H,H.immersiveTranslateComputedStyle||null)}P&&A.shadowRoot?.mode==="open"&&(E?I?.(A.shadowRoot):D({...k,container:A.shadowRoot})),A.nodeType===Node.ELEMENT_NODE&&A.nodeName==="PRE"&&p&&e5(A)}else if(N.nodeType===Node.TEXT_NODE)S(N);else throw new Error("should not be here");N=U.nextNode(),b.commonAncestorContainer&&N&&N.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(N)}function q(A){if(A.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(jr(A)){if(m){let H=Object.keys(m);if(H.length>0&&Gt(A,H))for(let W of H){let V=m[W];if(A.matches(W)){let se=m[W],X=Object.keys(se);for(let Z of X){let ue=se[Z];A.getAttribute(Z)!==ue&&(ue===null?A.removeAttribute(Z):A.setAttribute(Z,ue))}break}}}if(!k.force&&dt.isMarked(A,L)||t1(A,L)||hc(A,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||A.nodeName==="IFRAME"&&!Hi(A))return NodeFilter.FILTER_REJECT;if(A.nodeType===Node.ELEMENT_NODE){let H=window.getComputedStyle(A);if(A.immersiveTranslateComputedStyle=H,Ig(H))return F&&F(A),NodeFilter.FILTER_REJECT;let j=la(A,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},H||null);if(Gt(A,u)&&j)return NodeFilter.FILTER_REJECT}let E=A.getBoundingClientRect(),{width:P,height:O}=E;return A.nodeName==="IMG"&&(P>48&&O>48?A.immersiveTranslateComputedStyle={display:"block"}:P>0&&O>0&&f!==!1&&(A.setAttribute("width",P),A.setAttribute("height",O))),!A.childNodes||A.childNodes&&A.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(P>0&&P<4||O>0&&O<4)&&(A.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(A.nodeType===Node.TEXT_NODE){let E=A.textContent?.trim();if(!E)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let P=A.parentNode;if(P.getBoundingClientRect){let{width:O,height:H}=P.getBoundingClientRect();if(O>0&&O<4||H>0&&H<4)return NodeFilter.FILTER_REJECT}return g>0&&E.length>=g&&Mg(A,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}D(t),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&B();function M(k,v,I){let F=v.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(v))if(h=!1,v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h}}else if(v&&v.nodeType===Node.ELEMENT_NODE)if(fc(v,I))h=!0,C=v,B(),y(b,C,F);else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};else return h=!1,v=k.nextNode(),{currentNode:v,isMatchedSelection:h};return{currentNode:v,isMatchedSelection:!0}}function B(k){if(k&&k.nodeName==="BR"){b.commonAncestorContainer=k.parentNode;let I=[...b.flatNodes],F=b.flatNodes.filter(L=>k.parentNode?.contains(L));F.length>0&&I.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=I)}let v=XA(b,a,n);v&&(v.xpath=r1(r,s,v.commonAncestorContainer,i),e&&e(v)),Fg(b)}function S(k){if(!MT(b,k)){B(),Fg(b);let v=k.parentNode;v&&y(b,v,v.computedStyle)}b.flatNodes.push(k)}function y(k,v,I){k.commonAncestorContainer=v;let F=_(I);k.isPreWhitespace=F}function _(k){return k&&k.whiteSpace&&k.whiteSpace.startsWith("pre")||k&&k.whiteSpace==="break-spaces"||!1}}function MT(t,e){let n=!1;(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Qa(e));let r=JA(t),a=!0;return!n&&!r&&(t.commonAncestorContainer&&t.commonAncestorContainer.contains(e)?a=!0:t.commonAncestorContainer&&(a=!1,t._currentStacks=[])),a}function QA(t){let{isTransformPreTagNewLine:e}=t;return t.excludeSelectors=t.excludeSelectors.filter(n=>{let r=n!=="iframe";return e?r&&n!=="pre":r}),t}function ZA(t,e,n){if(e){for(let r of e.childNodes)if(r.contains(n))return r}return t._currentStacks.length>0?(t.commonAncestorContainer||(t.commonAncestorContainer=t._currentStacks[0]),t._currentStacks[0]):null}function Bg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=t.style.cssText||"";o&&(o=o.trim()),o&&!o.endsWith(";")&&(o+=";"),t.style.cssText=o+i;break}}}}function JA(t){return t&&t._currentStacks?t._currentStacks.some(e=>Qa(e)):!1}function XA(t,e,n){let{flatNodes:r,commonAncestorContainer:a}=t;if(a&&r.length>0){if(!r.map(m=>m.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:e,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:t.isPreWhitespace,variables:{},xpath:""};let o=t5(r,a,n);o||(o=a);let s=[];for(let m of r){let f=ZA(t,o,m);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],p=u,g=0;for(;p&&(c.push(p),p!==l);){if(g++,g>YA){z.warn("loop too many times for convert root nodes, break");break}p=p.nextSibling}return{ctxId:e,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:o,variables:{},isPreWhitespace:t.isPreWhitespace,xpath:""}}else return null}function Fg(t,e=!1){t.rootNodes=[],t.flatNodes=[],t._currentStacks=[],e&&(t.commonAncestorContainer=null)}function Ig(t){return t.display==="none"}var dt={_marked_key:Rh,isMarked(t,e){return xp(t,this._marked_key,e)},clearMark(t){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return Ml(t,this._marked_key)},clearToParentMark(t,e){let n=t;for(;n&&e&&n!=e;)dt.clearMark(n),n=n.parentElement},mark(t,e,n){if(!(!t||t.nodeType!==Node.ELEMENT_NODE)&&!(t instanceof HTMLIFrameElement||Qa(t)))return ut(t,this._marked_key,e,!1,n)},markWalk(t,e,n){if(!t||t.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(t))return;let r=Ki(t,"markWalk")||"";return ut(t,"markWalk",r+","+e,!1,n)},isSkipMarkEle(t){return t?!!(t instanceof HTMLIFrameElement||Qa(t)):!1}};function e5(t){let n=t.innerHTML.replace(/\n\n/g,"
");t.innerHTML=n}function t5(t,e,n){if(!t.length)return null;let r=t.map(a=>{let i=new Set;for(;(a=a.parentNode)&&(i.add(a),a!==e););return i});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(xn(a,n.atomicBlockSelectors))continue;if(r.every(i=>i.has(a)))return a}return null}function Mg(t,e){let n=t.textContent||"";if(n.trim().length<=e)return;let i=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((o,s)=>{let u=n.lastIndexOf(s,e);return u>o?u:o},-1);if(i>1){let o=n[i-1]||"",s=n[i-2]||"",u=n[i+1]||"";o==="."||u==="."||u===")"||s==="."&&o==="S"||s.toUpperCase()==="M"&&(o.toUpperCase()==="R"||o.toUpperCase()==="S")?i=-1:isNaN(Number(o))||(i=-1)}if(i===-1)n.length>e+20&&Mg(t,e+20);else{let o=n.slice(i+1);if(!o.trim())return;i++,o.startsWith(" ")&&i++,t.immersive=!0;let s=t.splitText(i);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),i+10)for(let r of n){let a=e[r],i=Object.keys(a),o=p1(t,[r]);for(let s of o)for(let u of i){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function IT(t,e,n,r,a,i,o){let s=Object.keys(e);if(s.length>0)for(let u of s){let l=e[u],c=Object.keys(l),p=t.querySelector(u);if(p)for(let g of c){let m=l[g];if(g==="translate"&&m==="no"){let T=p.innerText||p.textContent||"";if(!T.trim()||n5(p,a,i,o)||!m1(T,n,r))continue}p.getAttribute(g)!==m&&(m===null?p.removeAttribute(g):p.setAttribute(g,m))}}}function Rg(t,e){if(e){let n=Object.keys(e);if(n.length>0&&Gt(t,n))for(let a of n){let i=e[a];if(t.matches(a)){let o=e[a],s=Object.keys(o);for(let u of s){let l=o[u];t.getAttribute(u)!==l&&(l===null?t.removeAttribute(u):t.setAttribute(u,l))}break}}}}function hc(t,e){return Gt(t,e.excludeSelectors||[])?Gt(t,e.selectors||[])?!1:!Gt(t,e.stayOriginalSelectors||[]):!1}function fc(t,e){if(e.length===0)return!1;let n=e.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Gt(t,e.concat(n))}function n5(t,e,n,r){let a=document.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,i=>i.nodeType===Node.ELEMENT_NODE&&hc(i,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let i=a.currentNode;if(i.nodeType===Node.TEXT_NODE&&parent){let o=i.textContent||"";if(o.includes("Copyright"))continue;if(Ll(o,e,n))return!0}}return!1}d();function RT(t){let e=document.querySelector("title"),n;return e&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Cu)||Og(t).catch(i=>{z.error("translateTitle error:",i.name,i.message,i.details||"")}))}),n.observe(e,{subtree:!0,characterData:!0,childList:!0})),n}var bc="";async function Og(t){let e=document.title;if(!e||e.includes(Cu))return;bc!==e&&(bc=e);let n=await Ie({text:e,pageLangs:[yt(),"en"]});if(!Ui(t,n))try{let r=await ya({id:0,url:t.url,text:e,from:n,to:t.targetLanguage,fromByClient:n,force:!0},t);r&&r.text&&(document.title=r.text+Cu+bc)}catch(r){throw r}}function OT(t){t.rule.isTranslateTitle&&(document.title=bc)}function lo(t){return(t.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(t.targetLanguage)}function an(t){let e=t.rule.selectors,n=t.rule.excludeTags,r=t.rule.additionalExcludeTags,a=t.rule.excludeSelectors,i=t.rule.additionalExcludeSelectors;return t.state.translationArea==="body"&&(e=[],a=[]),{paragraphFirstLetterFontSize:t.rule.paragraphFirstLetterFontSize,globalStyles:t.rule.globalStyles,globalAttributes:t.rule.globalAttributes,selectors:e,atomicBlockSelectors:t.rule.atomicBlockSelectors,skipEditableCheck:t.rule.skipEditableCheck,lineBreakMaxTextCount:t.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:t.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(i),blockSelectors:t.rule.allBlockTags.map(s=>s.toLowerCase()).concat(t.rule.extraBlockSelectors),extraBlockSelectors:t.rule.extraBlockSelectors,extraInlineSelectors:t.rule.extraInlineSelectors.concat(t.rule.additionalInlineSelectors),stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}}var r5={sanitize:t=>t};function qg(t,e){if(t.interruptEffectDOM)return;let n=an(t.ctx);t.walkContainer({id:t.id,container:e,articleNode:t.ctx.articleNode,filterRule:n,bodyRule:t.ctx.rule.bodyRule,onParagraph:ti.bind(null,t),onFrame:r=>{Ng(t,r,!0)},onIgnoreElement:r=>{dt.mark(r,t.id,n.skipEditableCheck),t.ignoreResizeObserver?.observe(r)}}),bi&&ut(e,"consumeContainer",t.id)}function Ng(t,e,n){try{if(t.injectCssToDocument(e,t.ctx),e instanceof HTMLIFrameElement){if(!Hi(e))return;z.debug("onFrame fragment",e);let r=e.contentWindow?.document.body;r&&(ei(r,t,n),t.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else z.debug("onFrame shadowRoot",e.host),ei(e,t,n),t.dynamicContainerObserver?.observe(e,{childList:!0,subtree:!0,characterData:!0})}catch{}}function ei(t,e,n=!0){let{globalStyles:r,globalAttributes:a}=an(e.ctx),i=0;if(u(e,t,n))return;if(jr(t)&&s(t)){o(t);return}try{let l=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c=>(jr(c)&&(r&&Bg(c,r),a&&Rg(c,a)),u(e,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(o(c);;){if(l.nextSibling()){let p=l.currentNode;if(dt.mark(l.currentNode,e.id,e.ctx.rule.skipEditableCheck),s(p)){o(p);continue}else break}if(!l.parentNode())return}}}catch{}if(i==0&&t instanceof HTMLElement){o(t);return}return e.observeContainers;function o(l){dt.clearMark(l),i++,e.immediateTranslateCapacity>=0?qg(e,l):(bi&&ut(l,"observeContainer",e.id),e.containerVisibleObserver?.unobserve(l),e.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Ng(e,l.shadowRoot,n),!1;if(c==="iframe")return Ng(e,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let p=e.containerRule;if(p.selectors&&p.selectors?.length>0)return fc(l,p.selectors);if(p.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,p){if(_T(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||p&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let m=an(l.ctx);return!!hc(c,{excludeSelectors:m.excludeSelectors,selectors:m.selectors,stayOriginalSelectors:m.stayOriginalSelectors})}}function Os(t,e){if(!t.targetNodes)return;let n=t.state||"original",r=t.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,t.ctxId))return;let a=r.contains(t.rootNodes[0]),i=r.contains(t.targetNodes[0]);if(a&&i)n="dual";else if(a)n="original";else if(i)n="translation";else return;if(e!=n){t.state=e;try{if(n=="dual"&&e=="translation"&&(Tc(t.rootNodes),NT(t.commonAncestorContainer)),n=="original"&&e=="translation"){let o=zg(t.rootNodes);if(Tc(t.rootNodes),zT(o))return;co(o,r,t.targetNodes||[]),NT(t.commonAncestorContainer)}if(n=="translation"&&e=="dual"){let o=t.targetNodes[0];co(o,r,t.rootNodes||[]),UT(t.commonAncestorContainer)}if(n=="original"&&e=="dual"){let o=zg(t.rootNodes);if(zT(o))return;co(o,r,t.targetNodes||[]),UT(t.commonAncestorContainer)}if(n=="translation"&&e=="original"){let o=zg(t.targetNodes);Tc(t.targetNodes),co(o,r,t.rootNodes||[])}n=="dual"&&e=="original"&&Tc(t.targetNodes),Wg(t)}catch(o){z.error(o)}}}function zT(t){return!t||!jr(t)?!1:t.classList.contains(bt)}function NT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function UT(t){if(!jr(t))return;t.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Ki(r,"immersiveTranslateClassBak");Ml(r,"immersiveTranslateClassBak"),r.className=a});let n=t.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function zg(t){return t?t[t.length-1].nextSibling:null}function Tc(t){(t||[]).forEach(e=>e.parentNode?.removeChild(e))}function co(t,e,n){let r=t;e&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{e.appendChild(a)}))}var a5=qo(yc,300);async function ti(t,e,n=!1,r="web"){if(t.interruptEffectDOM)return;let a=e.commonAncestorContainer;if(a instanceof ShadowRoot||i5(e.rootNodes)||e.stepState>=2)return;e.stepState=2,bi&&ut(a,"onParseParagraph",t.id);let{ctx:i}=t,{rule:o}=i,s=Za(i),u=ac(e.flatNodes,{isPreWhitespace:e.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:d5(i)});if(!u)return;e.variables=u?.variables||{},e.text=u?.text;let l=i?.config?.translationLanguagePattern?.excludeMatches||[],c=await Hg(i,e,{excludeLanguages:n?[]:l,targetLanguage:i.targetLanguage,noTranslateRegexp:i.rule.noTranslateRegexp,delimiters:Tr(i.config.translationServices[i.translationService]),minTextCount:n||i.state.translationArea==="body"?3:o.paragraphMinTextCount,minWordCount:o.paragraphMinWordCount,isDetectParagraphLanguage:o.detectParagraphLanguage||i.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:i.rule.ignoreZhCNandZhTW});if(c){if(z.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),t.immediateTranslateCapacity>0||n?(n&&(e.force=!0),o5(t,e.text),jg(t,e,r)):(bi&&ut(a,"observeParagraph",t.id),t.observeParagraphs.push(c),t.paragraphVisibleObserver?.unobserve(a),t.paragraphVisibleObserver?.observe(a))}return c}function i5(t){if(!t)return!1;let e=t[t.length-1].nextSibling;return e?jr(e)&&e.classList.contains(bt):!1}function o5(t,e){t.ctx.state.translationStartMode!=="immediate"&&(t.immediateTranslateCapacity-=e?.length||0)}function jg(t,e,n="web"){if(t.interruptEffectDOM||e.stepState>=3)return;e.stepState=3;let r=t.autoIncreaseParagraphId++;if(e.id=r.toString(),t.paragraphEntities[r]=e,t.paragraphQueue.push(r.toString()),bi&&ut(e.commonAncestorContainer,"consumeParagraph",t.id),ut(e.commonAncestorContainer,Oh,"1",!0),n=="hover"){yc.call(t,t.ctx);return}a5.call(t,t.ctx)}async function yc(t){if(this.interruptEffectDOM)return;let e=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Qe(r,e,(a,i,o)=>{let s=o.id,u=s5(t,s.toString());u&&u5.call(null,a,i,o,u,e,n)})}catch(a){z.error("translateCurrentQueue error",a);return}}function s5(t,e){return t.find(n=>n.id===e)}function u5(t,e,n,r,a,i){let o=!1,s=r;if(qi(s.commonAncestorContainer,n.id)?.remove(),Wg(r),s&&(t||!e)){t||(z.error("translate error",n,t,e),t=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,qh,l.toString()),c.classList.add("notranslate",bt,bt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let p=r.rootNodes[r.rootNodes.length-1].nextSibling;if(co(p,r.commonAncestorContainer,[c]),s&&(s.error=t),c){let g=l5(a,t).replaceAll(` `,"").replaceAll('"',"""),m=t.message.replaceAll(` -`,"").replaceAll('"',"""),f=hr(Ot,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=hr(Ot,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,b=hr(Ot,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=hr(Ot,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${Q}-error notranslate"> +`,"").replaceAll('"',"""),f=hr(zt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),T=hr(zt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+m,b=hr(zt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=hr(zt,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${Q}-error notranslate"> <${u.targetWrapperTag} class="${Q}-error-wrapper"> @@ -5389,7 +5389,7 @@ Translate the content to {{to}} Language: ${h} - `;c.innerHTML=rt.sanitize(C)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",bt),lo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(ur,"1");let p=r5.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Rs(r,i)}o=!0}else z.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Wg(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[yt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!vs({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Il();n.isDetectParagraphLanguage&&(u="auto");let l=yt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Du.includes(t.translationService)&&(ye()||it())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return ua(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>ua(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function Os(){qg=0}var qg=0;function l5(t,e){qg+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),qg!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ra,{detail:r}))}return n}function Kg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,c5(e,`[${zh}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function c5(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function d5(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();d();d();function qT(t,e,n,r,a){let i=e,o=$h[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let g=n[p];if(["borderRadius"].includes(p)&&(g+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${g}; + `;c.innerHTML=at.sanitize(C)}}else if(r){if(s.error=void 0,r.targetText=e?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",bt),lo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(ur,"1");let p=r5.sanitize(l);c.innerHTML=p,r.targetNodes=[c],Os(r,i)}o=!0}else z.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:o}})}))}async function Hg(t,e,n){let{text:r}=e,a=await Ie({text:r||"",minLength:15,pageLangs:[yt(),"en"],translateService:t.translationService}),{targetLanguage:i}=n;if(!Ss({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=Il();n.isDetectParagraphLanguage&&(u="auto");let l=yt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Du.includes(t.translationService)&&(ye()||ot())&&(c="auto")),e.languageByLocal=c,e.languageByClient=u;let p=u!=="auto"?u:c;return ua(p,i,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>ua(p,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:e}function zs(){Ug=0}var Ug=0;function l5(t,e){Ug+=1;let n=e.message;if(e instanceof $){let r=e.uiConfig(t);if(n=JSON.stringify(r),Ug!=t.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(Ra,{detail:r}))}return n}function Wg(t){let e=t.commonAncestorContainer;if(!e.paragraphs?.length)return;e.recordLength=e.innerHTML.length,c5(e,`[${zh}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function c5(t,e){let n=t,r=[];for(;n.parentElement;){let a=n.parentElement.closest(e);if(a)r.push(a),n=a;else break}return r}function d5(t){return t.config?.translationServices?.[t.translationService]?.disableStaySelectors?[]:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)}d();d();d();function qT(t,e,n,r,a){let i=e,o=$h[i]||[],s="";t&&o&&o.length>0&&o.forEach(c=>{let{name:p}=c;if(t&&n&&n[p]){let g=n[p];if(["borderRadius"].includes(p)&&(g+="px"),s+=`--immersive-translate-theme-${i}-${p}: ${g}; `,e==="marker"&&p==="backgroundColor"&&typeof g=="string"){let{r:m,g:f,b:T}=h1(g);s+=`--immersive-translate-theme-${i}-${p}-rgb: ${m}, ${f}, ${T}; `}}}),r||(r="inherit"),t&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5403,7 +5403,7 @@ ${s}} `):e.rule.injectedCss&&(s+=e.rule.injectedCss),e.rule.additionalInjectedCss&&Array.isArray(e.rule.additionalInjectedCss)&&e.rule.additionalInjectedCss.length>0?s+=` `+e.rule.additionalInjectedCss.join(` `):e.rule.additionalInjectedCss&&(s+=` -`+e.rule.additionalInjectedCss)),s&&An(t,s,"immersive-translate-dynamic-injected-css")}d();async function jT(){let t="auto",e=[ft(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Wi(document.body),pageLangs:e})),t}d();var p5=[];function HT(t){p5.push(t)}d();var Gg;function WT(t){let e=t.ctx.rule.aiRule;if(z.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=an(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{zs(t,i,e,r)}),Gg=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&xn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||$g(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&zs(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=ji(r,u.parentElement);c&&(dt.clearToParentMark(u,c),zs(t,c,e,r));continue}zs(t,u,e,r)}catch(u){z.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{dt.isMarked(o,t.id)||zs(t,o,e,r)})}),Gg.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function zs(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&Vg(e),Kr({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{ti(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function KT(){Gg?.disconnect()}d();d();d();d();var g5=` +`+e.rule.additionalInjectedCss)),s&&An(t,s,"immersive-translate-dynamic-injected-css")}d();async function jT(){let t="auto",e=[ft(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(t=await Ie({text:Wi(document.body),pageLangs:e})),t}d();var p5=[];function HT(t){p5.push(t)}d();var Kg;function WT(t){let e=t.ctx.rule.aiRule;if(z.debug("aiRule",e),!e||!e.messageWrapperSelector)return;let n=t.ctx.rule,r=an(t.ctx),a=r.excludeSelectors.indexOf(`${e.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${e.messageWrapperSelector} > *`).forEach(i=>{Ns(t,i,e,r)}),Kg=new MutationObserver(i=>{i.forEach(function(o){for(let s of i)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&xn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(e.messageWrapperSelector)||Vg(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Ns(t,u,e,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!la(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=ji(r,u.parentElement);c&&(dt.clearToParentMark(u,c),Ns(t,c,e,r));continue}Ns(t,u,e,r)}catch(u){z.error(u)}}),document.querySelectorAll(`${e.messageWrapperSelector}`).forEach(o=>{dt.isMarked(o,t.id)||Ns(t,o,e,r)})}),Kg.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Ns(t,e,n,r,a=!1){let i=e.closest(n.messageWrapperSelector);if(!i)return;let o=e;for(;o!=i;)clearTimeout(o.timer),o=o.parentElement;clearTimeout(i.timer);let s=e;s.timer=setTimeout(()=>{a&&Gg(e),Kr({id:t.id,container:e,filterRule:r,force:!0,onParagraph:u=>{ti(t,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function KT(){Kg?.disconnect()}d();d();d();d();var g5=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5486,21 +5486,21 @@ ${s}} max-width: fit-content; } } -`,Yg="immersive-translate-toastify-shadow-root",Qg=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Yg)){let e=document.getElementById(Yg);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=Yg,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=g5,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function Sc(t){t=t||{},new Qg({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function GT(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();function Pn(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{z.error("send content message request failed",t,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:yu,payload:t},"*")});let n=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(n)}function Zg(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&yn(o,s=>{s.preventDefault();let u=r[i];Pn({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var VT=`${Q}-float-ball`;function Sa(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${VT}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${VT}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();d();async function $T(t){try{let e=new Date;z.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Wh]:e.toISOString()}),await m5(),ye()||await i2()}catch(e){z.error("run cron task failed",e)}}async function m5(){try{let t=await qn(),e=await de({url:Bo}),n=t.buildinConfigUpdatedAt,r=new Date(n),a=e.buildinConfigUpdatedAt,i=new Date(a),o=e.minVersion,s=oe.runtime.getManifest().version;to(s,o)?i>r?(await oe.storage.local.set({buildinConfig:e}),z.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),ma({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{z.error("send content message request failed from cron task",u)})):z.debug(`no need to sync rules, latest: ${r}`):z.info(`local version is too old, please update to ${o} or later`)}catch(t){z.error("sync rules error: ",t)}}d();d();d();d();d();d();var Jg;function um(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function ry(t,e=","){return t.map(um).join(e)}var ay=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ec(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Cc(t,e="@media "){return e+Ln(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Ln(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function f5(){}var Gt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function iy(t){return t.match(/[-=:;]/g)?.length||0}function am(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(iy(t),15)<<18}var h5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function lm({n:t,i:e,v:n=[]},r,a,i){t&&(t=um({n:t,i:e,v:n})),i=[...Ln(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Ln(u&&Cc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|am(l):s=="dark"?1073741824:l[0]=="@"?am(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~h5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var cm=new Map;function YT(t){if(t.d){let e=[],n=Xg(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Xg(r,i=>Xg(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):em(i,o)}return em(o,i)})):r,"&"),r=>em(r,t.n?"."+ay(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Xg(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function em(t,e){return t.replace(/&/g,e)}var QT=new Intl.Collator("en",{numeric:!0});function b5(t,e){for(var n=0,r=t.length;n>1;0>=oy(t[a],e)?n=a+1:r=a}return r}function oy(t,e){let n=t.p&Gt.o;return n==(e.p&Gt.o)&&(n==Gt.b||n==Gt.o)?0:t.p-e.p||t.o-e.o||QT.compare(ZT(t.n),ZT(e.n))||QT.compare(JT(t.n),JT(e.n))}function ZT(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function JT(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function tm(t,e){return Math.round(parseInt(t,16)*e)}function xa(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[tm(t.substr(1,i),o),tm(t.substr(1+i,i),o),tm(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function sy(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let g=[],m="",f=0,T=0;for(let C in o||{}){var b,h;let D=o[C];if(C[0]=="@"){if(!D)continue;if(C[1]=="a"){g.push(...ly(s,u,pm(""+D),p,u,l,c,!0));continue}if(C[1]=="l"){for(let M of Ln(D))g.push(...i(M,{n:s,p:(b=Gt[C[7]],u&~Gt.o|b),r:C[7]=="d"?[]:l,i:c},p));continue}if(C[1]=="i"){g.push(...Ln(D).map(M=>({p:-1,o:0,r:[],d:C+" "+M})));continue}if(C[1]=="k"){g.push({p:Gt.d,o:0,r:[C],d:i(D,{p:Gt.d},p).map(YT).join("")});continue}if(C[1]=="f"){g.push(...Ln(D).map(M=>({p:Gt.d,o:0,r:[C],d:i(M,{p:Gt.d},p).map(YT).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))C=="label"&&D?s=D+Ec(JSON.stringify([u,c,o])):(D||D===0)&&(C=C.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=C)[0]=="-"?0:iy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+Ln(D).map(M=>p.s(C,uy(""+M,p.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let M=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(B,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Cc(y,"")):B}),M|=am(C)),g.push(...i(D,{n:s,p:M,r:[...l,C],i:c},p))}else g.push(...i(D,{p:u,r:[...l,C]},p))}return g.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:m}),g.sort(oy)}(t,lm(e,n,r,a),n)}function uy(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?xa(s):""+Ln(s).filter(u=>Object(u)!==u)})}function dm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function im(t,e,n=Gt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,g){u={...u,i:u.i||g};let m=function(f,T){let b=cm.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:p,p:c}=lm(u,l,c,p),dm(im(pm(m),l,c,p,u.i),u.n)):Array.isArray(m)?m.map(f=>{var T,b;return{o:0,...f,r:[...Ln(p),...Ln(f.r)],p:(T=c,b=f.p??c,T&~Gt.o|b)}}):sy(m,u,l,c,p):[{c:um(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(b5(i,s),0,s);return i}function ly(t,e,n,r,a,i,o,s){return dm((s?n.flatMap(u=>im([u],r,a,i,o)):im(n,r,a,i,o)).map(u=>u.p&Gt.o&&(u.n||e==Gt.b)?{...u,p:u.p&~Gt.o|e,o:0}:u),t)}function T5(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=lm(i,o,e);return n&&ly(s,e,n,o,u,l,c,r)},cm.set(t,a),t}function nm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(y5),i:a}))}}function y5(t,e,n){return n.indexOf(t)==e}var XT=new Map;function pm(t){let e=XT.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&nm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Ec(JSON.stringify([p,g])):p+"("+ry(g)+")",Gt.a,g,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),XT.set(t,e=r[0])}return e}function cy(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function dy(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?cy(t,e,n=>rm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+rm(r),t?rm(t):"")}function rm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=dy(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var AX=py("@"),kX=py("~");function py(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return ry(pm(n+t+"("+dy(r,a)+")"))}}function om(t,e){return Array.isArray(t)?ey(cy(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?ey(t):[t]}var v5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function ey(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=v5.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function gy(t,...e){var n;let r=om(t,e),a=(r.find(i=>i.label)?.label||"css")+Ec(JSON.stringify(r));return n=(i,o)=>dm(r.flatMap(s=>sy(s,i,o,Gt.o)),a),cm.set(a,n),a}var PX=new Proxy(function(t,e){return ty("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ty(e,n,r)}}});function ty(t,e,n){return{toString(){return gy({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function ee(t,e,n){return[t,S5(e,n)]}function S5(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):sm(n,1)}):n=>t||{[n[1]]:sm(n,2)}}function sm(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function ne(t,e,n,r){return[t,x5(e,n,r)]}function x5(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=my(t||a[1]),s=i.theme(o,a.$$)??go(a.$$,o,i);if(s!=null)return a._=sm(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,E5(e,n)]}function E5(t={},e){return(n,r)=>{let{section:a=my(n[0]).replace("-","")+"Color"}=t,[i,o]=C5(n.$$);if(!i)return;let s=r.theme(a,i)||go(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,g=r.theme(l,o||"DEFAULT")||o&&go(o,l,r),m=e||(({_:T})=>{let b=Ns(c,T);return p?{[p]:b}:b});n._={value:xa(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:T=>xa(s,T),opacityVariable:u||void 0,opacityValue:g||void 0};let f=m(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:xa(T,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>xa(T,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:m(n,r)})}return f}}function C5(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Ns(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function go(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=xc(uy(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function my(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function xc(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>xc(n)+r+xc(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var LX=Symbol();var fy=new Proxy(f5,{apply(t,e,n){return Jg(n[0])},get(t,e){let n=Jg[e];return typeof n=="function"?function(){return n.apply(Jg,arguments)}:n}});var _X=function t(e){return new Proxy(function(n,...r){return ny(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return ny(e,r,a,i)}}})}();function ny(t,e,n,r){return{toString(){let a=om(n,r),i=ay(e+Ec(JSON.stringify([e,a])));return(typeof t=="function"?t:fy)(gy({[`@keyframes ${i}`]:om(n,r)})),i}}}d();d();d();d();d();var hy={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",..._n(4,"rem",4,.5,.5),..._n(12,"rem",4,5),14:"3.5rem",..._n(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:We("blur"),backdropBrightness:We("brightness"),backdropContrast:We("contrast"),backdropGrayscale:We("grayscale"),backdropHueRotate:We("hueRotate"),backdropInvert:We("invert"),backdropOpacity:We("opacity"),backdropSaturate:We("saturate"),backdropSepia:We("sepia"),backgroundColor:We("colors"),backgroundImage:{none:"none"},backgroundOpacity:We("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{..._n(200,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:We("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:We("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:We("colors"),caretColor:We("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{..._n(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:We("borderColor"),divideOpacity:We("borderOpacity"),divideWidth:We("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...Us(2,6),...Us(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:We("spacing"),gradientColorStops:We("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...Us(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...Us(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{..._n(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{..._n(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:We("spacing"),placeholderColor:We("colors"),placeholderOpacity:We("opacity"),outlineColor:We("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:We("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:_n(200,"",100,0,50),scale:{..._n(150,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:We("spacing"),scrollPadding:We("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:We("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:_n(2),textColor:We("colors"),textDecorationColor:We("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:We("spacing"),textOpacity:We("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:We("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...Us(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{..._n(50,"",1,0,10),auto:"auto"}};function Us(t,e){let n={};do for(var r=1;re(t)}var YX={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${hy.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${hy.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},ZX=[ee("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:go(`[${e}]`,"",n)}}})),ee("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),ne("aspect-","aspectRatio"),ee("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Cc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ne("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),ee("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ee("box-(border|content)","boxSizing",({1:t})=>t+"-box"),ee("hidden",{display:"none"}),ee("table-(auto|fixed)","tableLayout"),ee(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ee("isolate","isolation"),ee("object-(contain|cover|fill|none|scale-down)","objectFit"),ne("object-","objectPosition"),ee("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",wc),ee("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),ee("(static|fixed|absolute|relative|sticky)","position"),ne("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),ne("-?(top|bottom|left|right)(?:$|-)","inset"),ee("(visible|collapse)","visibility"),ee("invisible",{visibility:"hidden"}),ne("-?z-","zIndex"),ee("flex-((row|col)(-reverse)?)","flexDirection",by),ee("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ne("(flex-(?:grow|shrink))(?:$|-)"),ne("(flex)-"),ne("grow(?:$|-)","flexGrow"),ne("shrink(?:$|-)","flexShrink"),ne("basis-","flexBasis"),ne("-?(order)-"),"-?(order)-(\\d+)",ne("grid-cols-","gridTemplateColumns"),ee("grid-cols-(\\d+)","gridTemplateColumns",Sy),ne("col-","gridColumn"),ee("col-(span)-(\\d+)","gridColumn",vy),ne("col-start-","gridColumnStart"),ee("col-start-(auto|\\d+)","gridColumnStart"),ne("col-end-","gridColumnEnd"),ee("col-end-(auto|\\d+)","gridColumnEnd"),ne("grid-rows-","gridTemplateRows"),ee("grid-rows-(\\d+)","gridTemplateRows",Sy),ne("row-","gridRow"),ee("row-(span)-(\\d+)","gridRow",vy),ne("row-start-","gridRowStart"),ee("row-start-(auto|\\d+)","gridRowStart"),ne("row-end-","gridRowEnd"),ee("row-end-(auto|\\d+)","gridRowEnd"),ee("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>wc(by(t))),ee("grid-flow-(dense)","gridAutoFlow"),ne("auto-cols-","gridAutoColumns"),ne("auto-rows-","gridAutoRows"),ne("gap-x(?:$|-)","gap","columnGap"),ne("gap-y(?:$|-)","gap","rowGap"),ne("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ee("justify-","justifyContent",Ty),ee("(content|items|self)-",t=>({["align-"+t[1]]:Ty(t)})),ee("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),ne("p([xytrbl])?(?:$|-)","padding",mo("padding")),ne("-?m([xytrbl])?(?:$|-)","margin",mo("margin")),ne("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),ee("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),ne("w-","width"),ne("min-w-","minWidth"),ne("max-w-","maxWidth"),ne("h-","height"),ne("min-h-","minHeight"),ne("max-h-","maxHeight"),ne("font-","fontWeight"),ne("font-","fontFamily",({_:t})=>typeof(t=Ln(t))[1]=="string"?{fontFamily:ir(t)}:{fontFamily:ir(t[0]),...t[1]}),ee("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ee("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ee("italic","fontStyle"),ee("not-italic",{fontStyle:"normal"}),ee("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ea({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ne("tracking-","letterSpacing"),ne("leading-","lineHeight"),ee("list-(inside|outside)","listStylePosition"),ne("list-","listStyleType"),ee("list-","listStyleType"),ne("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),ee("text-(left|center|right|justify|start|end)","textAlign"),ee("text-(ellipsis|clip)","textOverflow"),ne("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),ne("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),ne("indent-","textIndent"),ee("(overline|underline|line-through)","textDecorationLine"),ee("no-underline",{textDecorationLine:"none"}),ne("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ne("decoration-","textDecorationThickness"),ee("decoration-","textDecorationStyle"),ee("(uppercase|lowercase|capitalize)","textTransform"),ee("normal-case",{textTransform:"none"}),ee("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ee("align-","verticalAlign"),ee("whitespace-","whiteSpace"),ee("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ee("break-words",{overflowWrap:"break-word"}),ee("break-all",{wordBreak:"break-all"}),ee("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ee("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ni(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ee("bg-(fixed|local|scroll)","backgroundAttachment"),ee("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),ee(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ee("bg-blend-","backgroundBlendMode"),ee("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),ne("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),ne("bg-","backgroundImage"),ne("bg-","backgroundPosition"),ee("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",wc),ne("bg-","backgroundSize"),ne("rounded(?:$|-)","borderRadius"),ne("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ni(n[0])}-radius`]:e,[`border-${ni(n[1])}-radius`]:e}}),ee("border-(collapse|separate)","borderCollapse"),ne("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ee("border-(solid|dashed|dotted|double|none)","borderStyle"),ne("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ea({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},mo("border","Color")),Bt("border-"),ne("border-([xytrbl])(?:$|-)","borderWidth",mo("border","Width")),ne("border(?:$|-)","borderWidth"),ne("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),ee("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),ee("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),ne("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ni(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ni(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ne("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ne("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ee("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),ne("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":xa(e("ringOffsetColor","","#fff")),"--tw-ring-color":xa(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ne("shadow(?:$|-)","boxShadow",({_:t})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ir(t),"--tw-shadow-colored":ir(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ne("(opacity)-"),ee("mix-blend-","mixBlendMode"),...yy(),...yy("backdrop-"),ne("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:ir(t),transitionTimingFunction:t._=="none"?void 0:ir(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:ir(e("transitionDuration",""))})),ne("duration(?:$|-)","transitionDuration","transitionDuration",ir),ne("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ir),ne("delay(?:$|-)","transitionDelay","transitionDelay",ir),ne("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=ir(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",ee("transform",mm),ee("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":xy(t=="gpu")})),ne("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...mm()})),ne("-?(rotate)-","rotate",gm),ne("-?(translate-[xy])-","translate",gm),ne("-?(skew-[xy])-","skew",gm),ee("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",wc),"(appearance)-",ne("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ne("(cursor)-"),"(cursor)-",ee("snap-(none)","scroll-snap-type"),ee("snap-(x|y|both)",({1:t})=>({...Ea({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),ee("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ee("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ee("snap-(normal|always)","scroll-snap-stop"),ee("scroll-(auto|smooth)","scroll-behavior"),ne("scroll-p([xytrbl])?(?:$|-)","padding",mo("scroll-padding")),ne("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",mo("scroll-margin")),ee("touch-(auto|none|manipulation)","touch-action"),ee("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ea({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),ee("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ee("outline",{outlineStyle:"solid"}),ee("outline-(dashed|dotted|double)","outlineStyle"),ne("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ne("outline-","outlineWidth"),"(pointer-events)-",ne("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],ee("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ne("stroke-","strokeWidth"),ee("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ee("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function wc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function by(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ni(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function ir(t){return t&&""+(t._||t)}function Ty({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function mo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Ns(t+"-"+ni(a[0])+e,r),...Ns(t+"-"+ni(a[1])+e,r)}:Ns(t+e,r)}}function yy(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ea(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,ee(`${t}filter`,n),...e.map(r=>ne(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Ln(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function gm({1:t,_:e}){return{["--tw-"+t]:e,...mm()}}function mm(){return{...Ea({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":xy()}),transform:"var(--tw-transform)"}}function xy(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function vy({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Sy({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ea(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Dc=globalThis||(typeof window<"u"?window:self),A5=Object.create,hm=Object.defineProperty,k5=Object.getOwnPropertyDescriptor,P5=Object.getOwnPropertyNames,L5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty,F5=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),M5=(t,e)=>{for(var n in e)hm(t,n,{get:e[n],enumerable:!0})},fm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P5(e))!_5.call(t,a)&&a!==n&&hm(t,a,{get:()=>e[a],enumerable:!(r=k5(e,a))||r.enumerable});return t},B5=(t,e,n)=>(fm(t,e,"default"),n&&fm(n,e,"default")),Cy=(t,e,n)=>(n=t!=null?A5(L5(t)):{},fm(e||!t||!t.__esModule?hm(n,"default",{value:t,enumerable:!0}):n,t)),wy=F5((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,p)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dc=="object"&&Dc.global===Dc?Dc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var g=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,p):i(m,m.target="_blank")):(m.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){i(g)})}}:function(l,c,p,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var m=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||m&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=D:location=D,g=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),Dy={};M5(Dy,{default:()=>Ac});var I5=Cy(wy());B5(Dy,Cy(wy()));var{default:Ey,...R5}=I5,Ac=Ey!==void 0?Ey:R5;d();d();d();d();d();d();var Oee=Me().REDIRECT_URL;d();var fte=hi([]);function Py(t){let[e,n]=re(null);return Ce(()=>{Xt().then(r=>{n(r),z.debug("current config",r)})},[]),Ce(()=>{Xt().then(r=>{n(r)})},[t]),e}function Ly(t){let[e,n]=re(null);return Ce(()=>{t&&Un({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function _y(){let[t,e]=re(null);return Ce(()=>{Jt().then(r=>{e(r)})},[]),[t,r=>{e(r),Ht(r)}]}d();var qs=class extends Ba{constructor(e){super(e),this.state={hasError:!1}}error;info;static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,n){this.error=e,this.info=n}render(){return this.state.hasError?(z.error("ErrorBoundary",this.error,this.info),w(W5,{error:this.error,info:this.info})):this.props.children}};function W5({error:t,info:e}){let{t:n}=xe(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return w("div",{class:"error-boundary",children:[t?.message," ",JSON.stringify(e?.componentStack),w("div",{style:{marginTop:10},children:[n("error.configError"),w("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}async function K5(t,e,n){try{if(e===null)return"noupdate";let r=await Jt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await bm(t,e),await Ht(r),"upload"}let a=await My(t);r.accountLastSyncedAt=Date.now(),z.debug("settings",e),z.debug("local settings.updatedAt",e.updatedAt),z.debug("remote settings.updatedAt",a.updatedAt),z.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),z.debug("isUpload",i),i)return await bm(t,e),await Ht(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||G5(n)&&K5(n.token,t,e).then(i=>{z.debug("syncUserSetting result",i)})},[t,n])}function G5(t){return Zt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function My(t){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:Oo+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function bm(t,e){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:Oo+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function kc(t){let{onClose:e}=t,[n,r]=re("Original"),[a,i,o,s]=rr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(globalThis.location.href),[g,m]=re("auto"),[f,T]=re(null),b=I=>{r(I.detail)};if(Ce(()=>(document.addEventListener(Oa,b,!1),qn().then(I=>{l(I);let F=yt();m(F);let L=$e();r(L),$T(I.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),Ce(()=>{qn().then(I=>{l(I)})},[a]),Ce(()=>{c&&u&&Tm().then(I=>{T(I)})},[c,u]),!u||!f)return null;return w(js,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:I=>{D("switchTranslationMode",!0,{mode:I})()},request:de,onClose:M,onToggleEnabled:B,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:_,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ga(f.rule)||c)},openAboutPage:k,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:Gl,onSetBuildinConfig:Q1,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(I){m(I);let F=pu(c,I,u.sourceLanguageUrlPattern);i(L=>({...L,sourceLanguageUrlPattern:F})),Nn(I)}function C(){p(globalThis.location.href)}function D(I,F,L={}){let U={trigger:"page_popup",...L};return()=>{Pn({method:I,data:U}),F&&e()}}function M(){e()}function B(){i(I=>({...I,enabled:!I.enabled})),setTimeout(()=>{M()},50)}function S(I,F){let L=I;F&&(L=`${I}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Ql(L,!0),setTimeout(()=>{M()},50)}function y(I){I&&(Zi(!1,I),setTimeout(()=>{M()},50))}function _(I=""){Yi(!0,I),setTimeout(()=>{e()},50)}function k(){Yl(),setTimeout(()=>{e()},50)}function v(){a2(),setTimeout(()=>{e()},50)}}d();function Oy(){let[t,e]=re("Original");return Ce(()=>{let n=$e();e(n);let r=a=>{e(a.detail)};return document.addEventListener(Oa,r),()=>{document.removeEventListener(Oa,r)}},[]),{pageStatus:t}}var By=6,$5={position:"right",top:335};function zy({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=qe(null),o=qe(null),[s,u]=re(!1),l=qe(null),c=qe(!1),p=qe(n.floatBallConfig||$5),g=qe(0),m=qe(0),f=qe(0),T=qe(!1),b=qe(0),h=qe(0),C=qe(0),D=qe(0),M=qe(!1),B=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},et().any?3e3:0))},[u,l,T,a]);return Ce(()=>{a||u(!1)},[a]),Ce(()=>{if(i.current&&p.current){let S=ym(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ce(()=>{if(!o.current||!i.current)return;let S=L=>{L.preventDefault&&L.preventDefault(),g.current=L.clientX,m.current=L.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),B(!0),C.current=L.clientX,D.current=L.clientY,M.current=!1,et().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Iy({startX:g.current,startY:m.current,endX:C.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",_),document.addEventListener("touchend",I),document.addEventListener("touchcancel",I)},y=L=>{if(L.preventDefault&&L.preventDefault(),!c.current||!i.current||(C.current=L.clientX,D.current=L.clientY,M.current))return;let U=L.clientY-m.current+f.current,N=ym(U);i.current.style.top=`${N}px`},_=L=>{if(L.preventDefault&&L.preventDefault(),F(),c.current=!1,clearTimeout(l.current),T.current||B(!1),M.current)return;Iy({startX:g.current,startY:m.current,endX:L.clientX,endY:L.clientY})||(clearTimeout(h.current),t());let N=ym(L.clientY-30);p.current.top=N;let q=Es();Gl({...q,floatBallConfig:p.current})},k=L=>{L.preventDefault&&L.preventDefault(),S(L.changedTouches[0])},v=L=>{L.preventDefault&&L.preventDefault(),y(L.changedTouches[0])},I=L=>{L.preventDefault&&L.preventDefault(),_(L.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",I),document.removeEventListener("touchcancel",I)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",k),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",k))}},[e,o,i,l,c,n,B,t]),Ce(()=>{if(et().any)return;let S=_=>{_.target===i.current&&!T.current||(T.current=!0,B(!0),clearTimeout(l.current))},y=_=>{if(c.current){T.current=!1;return}_.target===i.current&&!T.current||B(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,B,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:B}}function Iy({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>By||i>By}function Ny(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ne(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ne(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ne(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Uy(){let[t,e]=re(!1);return Ce(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var Ry="hasShownFloatingBallGuide",Y5="2024-01-06";function qy(t){let[e,n]=re(!1);Ce(()=>{!t.config.enableShowFloatingBallGuide||yt()==t.targetLanguage||(async()=>{let a=await At(Ry,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function jy(t,e){let n=qe(0),[r,a]=re(!0),[i,o]=re(!1),s=rr(),[u,l]=s,{t:c}=xe(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(et().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ce(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,et().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let g=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return et().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),m=Ne(()=>et().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ne(()=>et().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:fa(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:f,handleShowTooltip:g}}function ym(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ri=`${Q}-float-ball`;function Hy(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(Q5,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function Q5(t){let{t:e}=xe(),[n,r]=re("UntilNext"),a=$l()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ri}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ri}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(Sa,{type:"modal-close"})})]}),w("div",{class:`${ri}-close-radio-content mt-3`,children:o.map(s=>w(Z5,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Qi(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ri}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ri}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function Z5(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=J5(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ri}-radio-sel`:`${ri}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function J5(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();var X5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:g})=>{let[m,f]=re(!1),T=qe(null),b=qe(null),h=()=>{u||!l&&et().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{et().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ne(()=>{let B={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(B.maxWidth="200px",o&&(B.width=o+"px"),B.whiteSpace="normal"),n){case"top":return{...B,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...B,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...B,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...B,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:e}),m&&w("div",{style:M,role:"tooltip",children:t})]})},Ca=X5;d();d();function Wy(t){return we.ASSETS_BASE_URL+t}var ai=`${Q}-float-ball`;function Ky(t){let{t:e}=xe(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ne(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ai}-guide-container`,style:r,children:[w("img",{class:`${ai}-guide-bg ${t.fixedPosition}`,src:ek}),w("div",{class:`${ai}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ai}-guide-img`,src:Wy("images/float_ball_intro.png")}),w("div",{class:`${ai}-guide-message`,children:[e("floatBall.guideClickToTranslate"),et().any?` -${e("floatBall.longPress")}`:""]}),w("div",{class:`${ai}-primary-btn ${ai}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var ek="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function tk({isVisible:t,onClose:e,children:n}){return w(Rt,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Gy=tk;var Hs=`${Q}-float-ball`;function vm(t){let{t:e}=xe(),n=rr(),[r,a,i,o]=n;fo(r,a);let s=Py(r),u=Ly(s),{isFullScreen:l}=Uy(),[c,p]=re(!1),[g,m]=re(!0),{pageStatus:f}=Oy(),T=yp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ae();if(Hr(u?.rule)){let O=ga(u.rule);Zi(!0,O||P);return}Pn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,Pn,p]),h=Ve(()=>{p(!0)},[p]),C=g&&!!s,{containerRef:D,active:M,ballRef:B,floatBallConfigRef:S,setActive:y}=zy({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:t.localConfig,popupVisible:c}),_=T?.fixedPosition||"right",k=_==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:I}=qy(t.ctx),{closeTransform:F,logoContainerTransform:L,settingTransform:U}=Ny(T,M||v),{tooltipDelay:N,disableTooltipDelay:q,tooltipText:A,handleShowTooltip:E}=jy(u,f);return C?w("div",{class:`${Hs}-container ${_} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(nk,{ctx:u,setVisible:m,closeTransform:F,setActive:y,getModalStyle:()=>Vy(S.current.top,300,_)}),w(Ca,{enableMobile:!0,text:A,position:k,delay:N,onShow:E,disable:q,children:w("div",{class:`${Hs}-btn ${_} btn-animate `,ref:B,style:{transform:L,opacity:M||v?1:.5},children:w("div",{children:[w(Sa,{type:"logo"}),f!=="Original"?w(Sa,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:U},class:`${Hs}-more-buttons btn-animate`,children:[w(Ca,{text:e("translateFileTooltip"),multiple:!0,width:200,position:k,containerClass:"btn-animate",children:w("div",{class:`${Hs}-more-button`,onClick:()=>{Ql(c4,!0)},children:w(Sa,{type:"file"})})}),w(Ca,{text:e("floatBall.setting"),position:k,containerClass:"btn-animate",children:w("div",{class:`${Hs}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(Sa,{type:"setting"})})})]}),w(rk,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Vy(S.current.top,500,_)}),w(Ky,{visible:v,top:S.current.top,fixedPosition:_,onClose:()=>{I(),y(!1)}})]}):null}function nk(t){let{t:e}=xe(),[n,r]=re(!1),a=rr(),[i,o,s,u]=a,l=yp(t.ctx,i),c=Ve(g=>{t.ctx&&o(m=>a1({...m},g))},[t.ctx,o]),p=Ve(g=>{l&&(t.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(Rt,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(Sa,{type:"close"})}),w(Hy,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function rk(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Gy,{isVisible:t.visible,onClose:t.onClose,children:w(kc,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(kc,{onClose:t.onClose})})}):null}function ak(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Vy=(t,e,n)=>{let a=ak().height,i={position:"fixed"},o=0;return Vf()&&(t=ik.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},ik={position:"right",right:0,top:335};function ok(t,e){for(let n of e){if(ye()&&!Wn()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $y(){let t=Me(),e=await qn(),n=await qr(),r={url:globalThis.location.href,config:e},a=await Un(r),i=await vp(a,n),o=wt(a.url,i?.blockUrls),s=await Jt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return ok(l,[c]),sk(l,e,s,a)}function sk(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),$r(w(eo,{lang:e.interfaceLanguage,fallbackLang:"en",translations:rc,children:w(vm,{localConfig:n,ctx:r})}),a)}var Yy=!1;async function Qy(){Yy||(Yy=!0,$y().catch(t=>{z.error("init popup error",t)}))}var Zy=!1,tv=[()=>{yn.unbind()}],Jy=[...tv],uk=Vn(async()=>{await Yi()},50),lk=Vn(async()=>{await Yl()},50),ck=Vn(async()=>{await n2()},50),dk=Vn(async()=>{await t2()},50),nv=Vn(t=>{Pn({method:t,data:{trigger:"userscript_menu"}})},50);function pk(t,e){let n=t.document;if(Zy)return;Zy=!0,ye()||Y1(),n.addEventListener("securitypolicyviolation",Ek),document.addEventListener(me+"DocumentMessageUser",sv),document.addEventListener(me+"DocumentMessageUpdateUser",uv),document.addEventListener(me+"ChangeSuccessService",lv.bind(null,e)),document.addEventListener(me+"ChangeService",cv.bind(null,e)),document.addEventListener(Ra,vk.bind(null,e)),n.addEventListener(me+"EbookLoaded",xk),n.addEventListener(Lh,Sk.bind(null,e)),n.addEventListener(_h,Ck.bind(null,e)),n.addEventListener(vu,a=>{Je()||Cm(a,e)}),n.addEventListener(Fh,pv),n.addEventListener("click",a=>{fk(a,e)}),Je()&&t.addEventListener("message",mk,!1),ye()&&(Je()||n.addEventListener(wr,gk)),Je()||ba.rootIframe(Au).handleAsk("throttleRequest",oT)}function rv(t,e){wk(),pk(e,t),ye()&&(Je()||(Zg(t.config),Dk(t.config))),Tu()&&gv(t),it()&&Zg(t.config)}function gk(t){Qy()}function mk(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===yu&&ma(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function fk(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&<(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),Sm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}av(iv.bind(null,e,o,i,s));return}}}async function hk(){let t=await mn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await gn(t)}async function bk(){let t=await mn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await gn(t)}var Xy=0;function av(t){let e=Date.now();if(e-Xy<2e3||(Xy=e,Tk()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=Q+"-modal-content notranslate",u.appendChild(g);let m=document.createElement("span");m.textContent="\xD7",m.className=Q+"-close",g.appendChild(m);let f=document.createElement("div");f.className=i+" notranslate",g.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",g.appendChild(T);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{yk()},100)}function iv(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=rt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",g=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),g.setAttribute(`data-${Q}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',g.appendChild(m),g.onclick=()=>{a.style.display="none",Sm({method:"retryFailedParagraphs"}),wa(g,!0)}}else if(r=="login")p=u("goLogin"),g.onclick=()=>{wa(g,!0),window.open(n4)};else if(r=="upgrade")p=u("upgradeToPro"),g.onclick=()=>{wa(g,!0),window.open(Pu)};else if(r=="setting")p=u("goSettings"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)},Em(t,t.config.translationService,!1).then(m=>{m?(p=u("toggleToService",{service:u("translationServices."+m)}),g.innerHTML=rt.sanitize(p),g.onclick=()=>{dv(m),wa(g,!0)}):(p=u("goSettings"),g.innerHTML=rt.sanitize(p))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=rt.sanitize(p),s.appendChild(g)}function Tk(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function yk(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function vk(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;av(iv.bind(null,t,a,i,o))}catch(r){z.warn("parse message error",r)}}async function Sk(t,e){let n=e;if(z.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")Sm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")r2(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")hk();else if(a.type==="toggleEnableInputTranslation")bk();else if(a.type==="translatePage")Ak(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ds(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=gc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await kk(a.data,i)}catch(o){ev(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Vl(a.data):a.type==="sharePage"?Cm({detail:a.data},t):a.type==="switchTranslationMode"?xm(a.data):nv(a.type);r&&a.id&&ev(a.type,r,a.id)}}catch(a){z.warn("parse message error",a)}}}function xk(t){setTimeout(()=>{ov()},10)}function Ek(t){we.HAS_CSP_ERROR="1"}function Ck(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&<(n.name,[{name:n.name}],{...t})}function wk(){Jy.forEach(t=>{t()}),Jy=tv}function Dk(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=gl.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=no(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:kd,title:no("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:Pd,title:no("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:Dd,title:no("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:Ad,title:no("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===Dd?uk():i.id===Ad?lk():i.id===Pd?ck():i.id===kd?dk():nv(i.id)},i.key)}}function Sm(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{z.error("send content message request failed",t,n)});let e=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(e)}async function Ak(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await Ke(Ae(),e);fn(n)}function ev(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function kk({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Xe({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var ii={};async function wm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ft(),"en"]});return Nn(n),n}async function mv(t){pn("Translating");let e=yt(),n=Il(),r=[...document.querySelectorAll(".source-text")];if(Ui(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return ut(i,"id",o+""),s&&(qi(s,o)?.remove(),s.appendChild(ys(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Xe({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=qi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=rt.sanitize(`${i.message}`),ii[u]={ok:!1,sentence:s}):o&&(c.innerHTML=rt.sanitize(o.text),ii[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{pn("Translated")}}async function fv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(ii),n=[],r=[];for(let a of e){let i=ii[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete ii[a],u.appendChild(ys(t,a)),r.push(i.sentence))}}}try{await Xe({sentences:r},t,(a,i,o)=>{let s=o.id,u=qi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=rt.sanitize(`${a.message}`),ii[s]={ok:!1,sentence:o}):i&&(l.innerHTML=rt.sanitize(i.text),ii[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{pn("Translated")}}function Dm(){pn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var Am={};async function hv(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return Nn(n),n}async function bv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(Am),n=[];for(let r of e){let a=Am[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);o&&o.remove(),n.push(a)}}try{Os(),await vc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}function Tv(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+bt);for(let a of r)a.remove()}pn("Original")}async function yv(t){pn("Translating");let e=ps(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;po(u,t);let l=u.body;if(!l)continue;let c=an(t);c.isModifyImage=!1,Kr({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=Tr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=ac(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Wg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),Am[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await vc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}d();var or=!1,Pc,vv=!1,Lc=null;function xv(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){z.debug("exclude url for input");return}if(Lc===!1){z.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};wn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;et().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();Pc&&self.removeEventListener("keydown",Pc),Pc=u,self.addEventListener("keydown",Pc);function u(c){if(or||Lc===!1)return;let p=c,g=p.target||p.srcElement,m=g?.tagName;(g?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(jk(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&_k()&&(o=0,Lk(c,t,i))}Hk(t)}function Ev({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function _c(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var ho;function Cv(t){let e=t.parentElement;if(!e)return;ho=document.createElement("div"),ho.className=Q+"-input",ho.innerHTML=`
`,e.appendChild(ho);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function wv(){ho&&ho.remove()}async function Pk(t){if(!or)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=_c(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=Ev(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=_c(C,i.codeAlias),!c){z.warn("not found alias",C);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};wn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;et().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;or=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=Dv(u,i),g=await Ie({text:p,pageLangs:["en"]});z.debug("translateContent",p,g);let m={text:p||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!m.text||m.text.length>5e3)return;Cv(o),Ze(Su,Date.now());try{let b=await ya(m,{...t,translationService:t.inputTranslationService});kv(t),Av(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:h}))}}finally{or=!1}}catch(e){throw or=!1,e}finally{or=!1,wv()}}async function Lk(t,e,n){if(!or)try{let p=function(){s=e.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=_c(m,n.codeAlias),i=o.slice(m.length+1)):i=o},g=function(){s="";let m=Ev(n),f=o.split(m);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=_c(T,n.codeAlias),!s){z.warn("not found alias",T);return}},r=document.activeElement;or=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(g(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=Dv(i,n),l=await Ie({text:u,pageLangs:["en"]});z.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!vv){vv=!0;let m=await Wk(e);if(t.target&&t.target.focus(),m==="open_settings"){Yi(!0,"#input");return}else if(m==="open_learn_more"){Qi("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(Lc=!1,m==="disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="disable_once"){let f=await mn();f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(Lc=!1,m==="close_disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="enable"){let f=await mn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="close_enable"){let f=await mn();f.enableInputTranslation=!0,await gn(f)}}Cv(r),Ze(Su,Date.now());try{let m=await ya(c,{...e,translationService:e.inputTranslationService});kv(e),Av(e,r,a+m.text)}catch(m){if(m instanceof $){let f=m.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:f}))}}finally{or=!1}}catch(r){throw or=!1,r}finally{or=!1,wv()}}function _k(){let t=document.activeElement;if(!t)return!1;if(Fc(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` +`,$g="immersive-translate-toastify-shadow-root",Yg=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(e){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(e)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById($g)){let e=document.getElementById($g);this._rootElement=e.shadowRoot}else{let e=document.createElement("div");e.setAttribute("translate","no"),e.className="no-translate immersive-translate-toastify-shadow-root",e.id=$g,e.style.all="initial",e.style.zIndex="2147483647",document.body.appendChild(e);let n=e.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=g5,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(e){this.options=Object.assign(this.defaults,e),this.options.backgroundColor,this.toastElement=null,this.options.gravity=e.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=e.stopOnFocus===void 0?!0:e.stopOnFocus,e.backgroundColor&&(this.options.style.background=e.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let e=document.createElement("div");e.className=`toastify on ${this.options.className}`,e.className+=` toastify-${this.options.position}`,e.className+=` ${this.options.gravity}`;for(let n in this.options.style)e.style[n]=this.options.style[n];if(this.options.ariaLive&&e.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(this.options.escapeMarkup?e.innerText=this.options.text:e.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?e.appendChild(n):e.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?e.insertAdjacentElement("afterbegin",n):e.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(e.addEventListener("mouseover",n=>{window.clearTimeout(e.timeOutValue)}),e.addEventListener("mouseleave",()=>{e.timeOutValue=window.setTimeout(()=>{this._removeElement(e)},this.options.duration)})),typeof this.options.destination<"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&e.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,i=this.options.gravity=="toastify-top"?r:`-${r}`;e.style.transform=`translate(${a},${i})`}return e}_removeElement(e){e.className=e.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),this._reposition()},400)}_reposition(){let e={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),i;for(let o=0;o0?window.innerWidth:screen.width)<=360?(a[o].style[i]=`${r[i]}px`,r[i]+=s+u):a[o].classList.contains("toastify-left")===!0?(a[o].style[i]=`${e[i]}px`,e[i]+=s+u):(a[o].style[i]=`${n[i]}px`,n[i]+=s+u)}}_getAxisOffsetAValue(e,n){return n.offset[e]?isNaN(n.offset[e])?n.offset[e]:`${n.offset[e]}px`:"0px"}};function Sc(t){t=t||{},new Yg({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...t}).showToast()}d();function GT(t,e){let n=e.matches||[],r=e.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(t)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(t))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(t)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(t))return!0}return!1}d();d();d();function Pn(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{z.error("send content message request failed",t,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:yu,payload:t},"*")});let n=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(n)}function Qg(t){let e=t.shortcuts||{},r=Object.keys(e).reduce((i,o)=>(i[e[o]]=o,i),{}),a=Object.keys(r);for(let i of a){let o=i.replace(/MacCtrl/ig,"Ctrl");o&&yn(o,s=>{s.preventDefault();let u=r[i];Pn({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var VT=`${Q}-float-ball`;function Sa(t){return t.type=="logo"?w("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${VT}-logo-img`,children:[w("path",{fill:"none",d:"M0 0h24v24H0z"}),w("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):t.type=="close"?w("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w("g",{"clip-path":"url(#clip0_2589_9951)",children:w("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),w("defs",{children:w("clipPath",{id:"clip0_2589_9951",children:w("rect",{width:"14",height:"14",fill:"white"})})})]}):t.type=="setting"?w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):t.type==="file"?w("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):t.type==="translated"?w("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${VT}-translated-img`,children:[w("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),w("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):t.type==="modal-close"?w("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();d();async function $T(t){try{let e=new Date;z.debug("cron task start, next will run at",new Date(e.getTime()+t).toLocaleString()),await oe.storage.local.set({[Wh]:e.toISOString()}),await m5(),ye()||await i2()}catch(e){z.error("run cron task failed",e)}}async function m5(){try{let t=await qn(),e=await de({url:Io}),n=t.buildinConfigUpdatedAt,r=new Date(n),a=e.buildinConfigUpdatedAt,i=new Date(a),o=e.minVersion,s=oe.runtime.getManifest().version;to(s,o)?i>r?(await oe.storage.local.set({buildinConfig:e}),z.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),ma({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{z.error("send content message request failed from cron task",u)})):z.debug(`no need to sync rules, latest: ${r}`):z.info(`local version is too old, please update to ${o} or later`)}catch(t){z.error("sync rules error: ",t)}}d();d();d();d();d();d();var Zg;function sm(t){return[...t.v,(t.i?"!":"")+t.n].join(":")}function ry(t,e=","){return t.map(sm).join(e)}var ay=typeof CSS<"u"&&CSS.escape||(t=>t.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Ec(t){for(var e=9,n=t.length;n--;)e=Math.imul(e^t.charCodeAt(n),1597334677);return"#"+((e^e>>>9)>>>0).toString(36)}function Cc(t,e="@media "){return e+Ln(t).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Ln(t=[]){return Array.isArray(t)?t:t==null?[]:[t]}function f5(){}var Vt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function iy(t){return t.match(/[-=:;]/g)?.length||0}function rm(t){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(t)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(iy(t),15)<<18}var h5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function um({n:t,i:e,v:n=[]},r,a,i){t&&(t=sm({n:t,i:e,v:n})),i=[...Ln(i)];for(let s of n){let u=r.theme("screens",s);for(let l of Ln(u&&Cc(u)||r.v(s))){var o;i.push(l),a|=u?67108864|rm(l):s=="dark"?1073741824:l[0]=="@"?rm(l):(o=l,1<<~(/:([a-z-]+)/.test(o)&&~h5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:t,p:a,r:i,i:e}}var lm=new Map;function YT(t){if(t.d){let e=[],n=Jg(t.r.reduce((r,a)=>a[0]=="@"?(e.push(a),r):a?Jg(r,i=>Jg(a,o=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(o);if(s){let u=i.indexOf(s[1]);return~u?i.slice(0,u)+s[0]+i.slice(u+s[1].length):Xg(i,o)}return Xg(o,i)})):r,"&"),r=>Xg(r,t.n?"."+ay(t.n):""));return n&&e.push(n.replace(/:merge\((.+?)\)/g,"$1")),e.reduceRight((r,a)=>a+"{"+r+"}",t.d)}}function Jg(t,e){return t.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>e(r)+a)}function Xg(t,e){return t.replace(/&/g,e)}var QT=new Intl.Collator("en",{numeric:!0});function b5(t,e){for(var n=0,r=t.length;n>1;0>=oy(t[a],e)?n=a+1:r=a}return r}function oy(t,e){let n=t.p&Vt.o;return n==(e.p&Vt.o)&&(n==Vt.b||n==Vt.o)?0:t.p-e.p||t.o-e.o||QT.compare(ZT(t.n),ZT(e.n))||QT.compare(JT(t.n),JT(e.n))}function ZT(t){return(t||"").split(/:/).pop().split("/").pop()||"\0"}function JT(t){return(t||"").replace(/\W/g,e=>String.fromCharCode(127+e.charCodeAt(0)))+"\0"}function em(t,e){return Math.round(parseInt(t,16)*e)}function xa(t,e={}){if(typeof t=="function")return t(e);let{opacityValue:n="1",opacityVariable:r}=e,a=r?`var(${r})`:n;if(t.includes(""))return t.replace("",a);if(t[0]=="#"&&(t.length==4||t.length==7)){let i=(t.length-1)/3,o=[17,1,.062272][i-1];return`rgba(${[em(t.substr(1,i),o),em(t.substr(1+i,i),o),em(t.substr(1+2*i,i),o),a]})`}return a=="1"?t:a=="0"?"#0000":t.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function sy(t,e,n,r,a=[]){return function i(o,{n:s,p:u,r:l=[],i:c},p){let g=[],m="",f=0,T=0;for(let C in o||{}){var b,h;let D=o[C];if(C[0]=="@"){if(!D)continue;if(C[1]=="a"){g.push(...ly(s,u,dm(""+D),p,u,l,c,!0));continue}if(C[1]=="l"){for(let M of Ln(D))g.push(...i(M,{n:s,p:(b=Vt[C[7]],u&~Vt.o|b),r:C[7]=="d"?[]:l,i:c},p));continue}if(C[1]=="i"){g.push(...Ln(D).map(M=>({p:-1,o:0,r:[],d:C+" "+M})));continue}if(C[1]=="k"){g.push({p:Vt.d,o:0,r:[C],d:i(D,{p:Vt.d},p).map(YT).join("")});continue}if(C[1]=="f"){g.push(...Ln(D).map(M=>({p:Vt.d,o:0,r:[C],d:i(M,{p:Vt.d},p).map(YT).join("")})));continue}}if(typeof D!="object"||Array.isArray(D))C=="label"&&D?s=D+Ec(JSON.stringify([u,c,o])):(D||D===0)&&(C=C.replace(/[A-Z]/g,M=>"-"+M.toLowerCase()),T+=1,f=Math.max(f,(h=C)[0]=="-"?0:iy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),m+=(m?";":"")+Ln(D).map(M=>p.s(C,uy(""+M,p.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let M=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(B,S)=>{let y=p.theme("screens",S);return y?(M|=67108864,Cc(y,"")):B}),M|=rm(C)),g.push(...i(D,{n:s,p:M,r:[...l,C],i:c},p))}else g.push(...i(D,{p:u,r:[...l,C]},p))}return g.unshift({n:s,p:u,o:Math.max(0,15-T)+1.5*Math.min(f||15,15),r:l,d:m}),g.sort(oy)}(t,um(e,n,r,a),n)}function uy(t,e){return t.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,i,o="")=>{let s=e(a,o);return typeof s=="function"&&/color|fill|stroke/i.test(a)?xa(s):""+Ln(s).filter(u=>Object(u)!==u)})}function cm(t,e){let n,r=[];for(let a of t)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&e}):r.push({...a,n:a.n&&e});return r}function am(t,e,n=Vt.u,r,a){let i=[];for(let o of t)for(let s of function(u,l,c,p,g){u={...u,i:u.i||g};let m=function(f,T){let b=lm.get(f.n);return b?b(f,T):T.r(f.n,f.v[0]=="dark")}(u,l);return m?typeof m=="string"?({r:p,p:c}=um(u,l,c,p),cm(am(dm(m),l,c,p,u.i),u.n)):Array.isArray(m)?m.map(f=>{var T,b;return{o:0,...f,r:[...Ln(p),...Ln(f.r)],p:(T=c,b=f.p??c,T&~Vt.o|b)}}):sy(m,u,l,c,p):[{c:sm(u),p:0,o:0,r:[]}]}(o,e,n,r,a))i.splice(b5(i,s),0,s);return i}function ly(t,e,n,r,a,i,o,s){return cm((s?n.flatMap(u=>am([u],r,a,i,o)):am(n,r,a,i,o)).map(u=>u.p&Vt.o&&(u.n||e==Vt.b)?{...u,p:u.p&~Vt.o|e,o:0}:u),t)}function T5(t,e,n,r){var a;return a=(i,o)=>{let{n:s,p:u,r:l,i:c}=um(i,o,e);return n&&ly(s,e,n,o,u,l,c,r)},lm.set(t,a),t}function tm(t,e,n){if(t[t.length-1]!="("){let r=[],a=!1,i=!1,o="";for(let s of t)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),i=!i),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(o+=(o&&"-")+s)}o&&(i&&(o="-"+o),e[0].push({n:o,v:r.filter(y5),i:a}))}}function y5(t,e,n){return n.indexOf(t)==e}var XT=new Map;function dm(t){let e=XT.get(t);if(!e){let n=[],r=[[]],a=0,i=0,o=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(t.slice(a,s+c)),l&&tm(n,r)),a=s+1};for(;s1?p.slice(0,-1)+Ec(JSON.stringify([p,g])):p+"("+ry(g)+")",Vt.a,g,/@$/.test(p))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&t[s+1]=="("&&r.unshift([])}u(!0),XT.set(t,e=r[0])}return e}function cy(t,e,n){return e.reduce((r,a,i)=>r+n(a)+t[i+1],t[0])}function dy(t,e){return Array.isArray(t)&&Array.isArray(t.raw)?cy(t,e,n=>nm(n).trim()):e.filter(Boolean).reduce((n,r)=>n+nm(r),t?nm(t):"")}function nm(t){let e,n="";if(t&&typeof t=="object")if(Array.isArray(t))(e=dy(t[0],t.slice(1)))&&(n+=" "+e);else for(let r in t)t[r]&&(n+=" "+r);else t!=null&&typeof t!="boolean"&&(n+=" "+t);return n}var AX=py("@"),kX=py("~");function py(t){return new Proxy(function(n,...r){return e("",n,r)},{get(n,r){return r in n?n[r]:function(a,...i){return e(r,a,i)}}});function e(n,r,a){return ry(dm(n+t+"("+dy(r,a)+")"))}}function im(t,e){return Array.isArray(t)?ey(cy(t,e,n=>n!=null&&typeof n!="boolean"?n:"")):typeof t=="string"?ey(t):[t]}var v5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function ey(t){let e;t=t.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;e=v5.exec(t);)e[4]&&(n.shift(),a.shift()),e[3]?(a.unshift(e[3]),n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))):e[4]||(n[0][e[1]]&&(n.unshift({}),r.push(a.reduce((i,o)=>({[o]:i}),n[0]))),n[0][e[1]]=e[2]);return r}function gy(t,...e){var n;let r=im(t,e),a=(r.find(i=>i.label)?.label||"css")+Ec(JSON.stringify(r));return n=(i,o)=>cm(r.flatMap(s=>sy(s,i,o,Vt.o)),a),lm.set(a,n),a}var PX=new Proxy(function(t,e){return ty("animation",t,e)},{get(t,e){return e in t?t[e]:function(n,r){return ty(e,n,r)}}});function ty(t,e,n){return{toString(){return gy({label:t,"@layer components":{...typeof e=="object"?e:{animation:e},animationName:""+n}})}}}function ee(t,e,n){return[t,S5(e,n)]}function S5(t,e){return typeof t=="function"?t:typeof t=="string"&&/^[\w-]+$/.test(t)?(n,r)=>({[t]:e?e(n,r):om(n,1)}):n=>t||{[n[1]]:om(n,2)}}function om(t,e,n=t.slice(e).find(Boolean)||t.$$||t.input){return t.input[0]=="-"?`calc(${n} * -1)`:n}function ne(t,e,n,r){return[t,x5(e,n,r)]}function x5(t,e,n){let r=typeof e=="string"?(a,i)=>({[e]:n?n(a,i):a._}):e||(({1:a,_:i},o,s)=>({[a||s]:i}));return(a,i)=>{let o=my(t||a[1]),s=i.theme(o,a.$$)??go(a.$$,o,i);if(s!=null)return a._=om(a,0,s),r(a,i,o)}}function Bt(t,e={},n){return[t,E5(e,n)]}function E5(t={},e){return(n,r)=>{let{section:a=my(n[0]).replace("-","")+"Color"}=t,[i,o]=C5(n.$$);if(!i)return;let s=r.theme(a,i)||go(i,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:p}=t,g=r.theme(l,o||"DEFAULT")||o&&go(o,l,r),m=e||(({_:T})=>{let b=Us(c,T);return p?{[p]:b}:b});n._={value:xa(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:T=>xa(s,T),opacityVariable:u||void 0,opacityValue:g||void 0};let f=m(n,r);if(!n.dark){let T=r.d(a,i,s);T&&T!==s&&(n._={value:xa(T,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>xa(T,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:m(n,r)})}return f}}function C5(t){return(t.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Us(t,e){let n={};return typeof e=="string"?n[t]=e:(e.opacityVariable&&e.value.includes(e.opacityVariable)&&(n[e.opacityVariable]=e.opacityValue||"1"),n[t]=e.value),n}function go(t,e,n){if(t[0]=="["&&t.slice(-1)=="]"){if(t=xc(uy(t.slice(1,-1),n.theme)),!e)return t;if(!(/color|fill|stroke/i.test(e)&&!(/^color:/.test(t)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(t))||/image/i.test(e)&&!(/^image:/.test(t)||/^[a-z-]+\(/.test(t))||/weight/i.test(e)&&!(/^(number|any):/.test(t)||/^\d+$/.test(t))||/position/i.test(e)&&/^(length|size):/.test(t)))return t.replace(/^[a-z-]+:/,"")}}function my(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function xc(t){return t.includes("url(")?t.replace(/(.*?)(url\(.*?\))(.*?)/g,(e,n="",r,a="")=>xc(n)+r+xc(a)):t.replace(/(^|[^\\])_+/g,(e,n)=>n+" ".repeat(e.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,e=>e.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var LX=Symbol();var fy=new Proxy(f5,{apply(t,e,n){return Zg(n[0])},get(t,e){let n=Zg[e];return typeof n=="function"?function(){return n.apply(Zg,arguments)}:n}});var _X=function t(e){return new Proxy(function(n,...r){return ny(e,"",n,r)},{get(n,r){return r==="bind"?t:r in n?n[r]:function(a,...i){return ny(e,r,a,i)}}})}();function ny(t,e,n,r){return{toString(){let a=im(n,r),i=ay(e+Ec(JSON.stringify([e,a])));return(typeof t=="function"?t:fy)(gy({[`@keyframes ${i}`]:im(n,r)})),i}}}d();d();d();d();d();var hy={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",..._n(4,"rem",4,.5,.5),..._n(12,"rem",4,5),14:"3.5rem",..._n(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:We("blur"),backdropBrightness:We("brightness"),backdropContrast:We("contrast"),backdropGrayscale:We("grayscale"),backdropHueRotate:We("hueRotate"),backdropInvert:We("invert"),backdropOpacity:We("opacity"),backdropSaturate:We("saturate"),backdropSepia:We("sepia"),backgroundColor:We("colors"),backgroundImage:{none:"none"},backgroundOpacity:We("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{..._n(200,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:t})=>({DEFAULT:t("colors.gray.200","currentColor"),...t("colors")}),borderOpacity:We("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:We("spacing"),borderWidth:{DEFAULT:"1px",...jn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:We("colors"),caretColor:We("colors"),accentColor:({theme:t})=>({auto:"auto",...t("colors")}),contrast:{..._n(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:We("borderColor"),divideOpacity:We("borderOpacity"),divideWidth:We("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:t})=>({...t("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:t})=>({...t("spacing"),...qs(2,6),...qs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:We("spacing"),gradientColorStops:We("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:t})=>({...t("spacing"),...qs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:t})=>({...t("spacing"),...qs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{..._n(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:t})=>({auto:"auto",...t("spacing")}),maxHeight:({theme:t})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...t("spacing")}),maxWidth:({theme:t,breakpoints:e})=>({...e(t("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{..._n(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:We("spacing"),placeholderColor:We("colors"),placeholderOpacity:We("opacity"),outlineColor:We("colors"),outlineOffset:jn(8,"px"),outlineWidth:jn(8,"px"),ringColor:({theme:t})=>({...t("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:We("colors"),ringOffsetWidth:jn(8,"px"),ringOpacity:({theme:t})=>({...t("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...jn(8,"px")},rotate:{...jn(2,"deg"),...jn(12,"deg",3),...jn(180,"deg",45)},saturate:_n(200,"",100,0,50),scale:{..._n(150,"",100,0,50),..._n(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:We("spacing"),scrollPadding:We("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...jn(2,"deg"),...jn(12,"deg",3)},space:We("spacing"),stroke:({theme:t})=>({...t("colors"),none:"none"}),strokeWidth:_n(2),textColor:We("colors"),textDecorationColor:We("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...jn(8,"px")},textUnderlineOffset:{auto:"auto",...jn(8,"px")},textIndent:We("spacing"),textOpacity:We("opacity"),transitionDuration:({theme:t})=>({...t("durations"),DEFAULT:"150ms"}),transitionDelay:We("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:t})=>({...t("spacing"),...qs(2,4),full:"100%"}),width:({theme:t})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...t("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{..._n(50,"",1,0,10),auto:"auto"}};function qs(t,e){let n={};do for(var r=1;re(t)}var YX={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${hy.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${hy.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},ZX=[ee("\\[([-\\w]+):(.+)]",({1:t,2:e},n)=>({"@layer overrides":{"&":{[t]:go(`[${e}]`,"",n)}}})),ee("(group|peer)([~/][^-[]+)?",({input:t},{h:e})=>[{c:e(t)}]),ne("aspect-","aspectRatio"),ee("container",(t,{theme:e})=>{let{screens:n=e("screens"),center:r,padding:a}=e("container"),i={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...o("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(i[Cc(u)]={"&":{maxWidth:u,...o(s)}})}return i;function o(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ne("content-","content",({_:t})=>({"--tw-content":t,content:"var(--tw-content)"})),ee("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),ee("box-(border|content)","boxSizing",({1:t})=>t+"-box"),ee("hidden",{display:"none"}),ee("table-(auto|fixed)","tableLayout"),ee(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",ee("isolate","isolation"),ee("object-(contain|cover|fill|none|scale-down)","objectFit"),ne("object-","objectPosition"),ee("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",wc),ee("overscroll(-[xy])?-(auto|contain|none)",({1:t="",2:e})=>({["overscroll-behavior"+t]:e})),ee("(static|fixed|absolute|relative|sticky)","position"),ne("-?inset(-[xy])?(?:$|-)","inset",({1:t,_:e})=>({top:t!="-x"&&e,right:t!="-y"&&e,bottom:t!="-x"&&e,left:t!="-y"&&e})),ne("-?(top|bottom|left|right)(?:$|-)","inset"),ee("(visible|collapse)","visibility"),ee("invisible",{visibility:"hidden"}),ne("-?z-","zIndex"),ee("flex-((row|col)(-reverse)?)","flexDirection",by),ee("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ne("(flex-(?:grow|shrink))(?:$|-)"),ne("(flex)-"),ne("grow(?:$|-)","flexGrow"),ne("shrink(?:$|-)","flexShrink"),ne("basis-","flexBasis"),ne("-?(order)-"),"-?(order)-(\\d+)",ne("grid-cols-","gridTemplateColumns"),ee("grid-cols-(\\d+)","gridTemplateColumns",Sy),ne("col-","gridColumn"),ee("col-(span)-(\\d+)","gridColumn",vy),ne("col-start-","gridColumnStart"),ee("col-start-(auto|\\d+)","gridColumnStart"),ne("col-end-","gridColumnEnd"),ee("col-end-(auto|\\d+)","gridColumnEnd"),ne("grid-rows-","gridTemplateRows"),ee("grid-rows-(\\d+)","gridTemplateRows",Sy),ne("row-","gridRow"),ee("row-(span)-(\\d+)","gridRow",vy),ne("row-start-","gridRowStart"),ee("row-start-(auto|\\d+)","gridRowStart"),ne("row-end-","gridRowEnd"),ee("row-end-(auto|\\d+)","gridRowEnd"),ee("grid-flow-((row|col)(-dense)?)","gridAutoFlow",t=>wc(by(t))),ee("grid-flow-(dense)","gridAutoFlow"),ne("auto-cols-","gridAutoColumns"),ne("auto-rows-","gridAutoRows"),ne("gap-x(?:$|-)","gap","columnGap"),ne("gap-y(?:$|-)","gap","rowGap"),ne("gap(?:$|-)","gap"),"(justify-(?:items|self))-",ee("justify-","justifyContent",Ty),ee("(content|items|self)-",t=>({["align-"+t[1]]:Ty(t)})),ee("(place-(content|items|self))-",({1:t,$$:e})=>({[t]:("wun".includes(e[3])?"space-":"")+e})),ne("p([xytrbl])?(?:$|-)","padding",mo("padding")),ne("-?m([xytrbl])?(?:$|-)","margin",mo("margin")),ne("-?space-(x|y)(?:$|-)","space",({1:t,_:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[t]]:`calc(${e} * calc(1 - var(--tw-space-${t}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[t]]:`calc(${e} * var(--tw-space-${t}-reverse))`}})),ee("space-(x|y)-reverse",({1:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${t}-reverse`]:"1"}})),ne("w-","width"),ne("min-w-","minWidth"),ne("max-w-","maxWidth"),ne("h-","height"),ne("min-h-","minHeight"),ne("max-h-","maxHeight"),ne("font-","fontWeight"),ne("font-","fontFamily",({_:t})=>typeof(t=Ln(t))[1]=="string"?{fontFamily:ir(t)}:{fontFamily:ir(t[0]),...t[1]}),ee("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),ee("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),ee("italic","fontStyle"),ee("not-italic",{fontStyle:"normal"}),ee("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:t,2:e="",3:n})=>e=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(e[0])?"numeric-spacing":e?"numeric-figure":t)]:t,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...Ea({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ne("tracking-","letterSpacing"),ne("leading-","lineHeight"),ee("list-(inside|outside)","listStylePosition"),ne("list-","listStyleType"),ee("list-","listStyleType"),ne("placeholder-opacity-","placeholderOpacity",({_:t})=>({"&::placeholder":{"--tw-placeholder-opacity":t}})),Bt("placeholder-",{property:"color",selector:"&::placeholder"}),ee("text-(left|center|right|justify|start|end)","textAlign"),ee("text-(ellipsis|clip)","textOverflow"),ne("text-opacity-","textOpacity","--tw-text-opacity"),Bt("text-",{property:"color"}),ne("text-","fontSize",({_:t})=>typeof t=="string"?{fontSize:t}:{fontSize:t[0],...typeof t[1]=="string"?{lineHeight:t[1]}:t[1]}),ne("indent-","textIndent"),ee("(overline|underline|line-through)","textDecorationLine"),ee("no-underline",{textDecorationLine:"none"}),ne("underline-offset-","textUnderlineOffset"),Bt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ne("decoration-","textDecorationThickness"),ee("decoration-","textDecorationStyle"),ee("(uppercase|lowercase|capitalize)","textTransform"),ee("normal-case",{textTransform:"none"}),ee("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),ee("align-","verticalAlign"),ee("whitespace-","whiteSpace"),ee("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),ee("break-words",{overflowWrap:"break-word"}),ee("break-all",{wordBreak:"break-all"}),ee("break-keep",{wordBreak:"keep-all"}),Bt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Bt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),ee("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:t})=>`linear-gradient(to ${ni(t," ")},var(--tw-gradient-stops))`),Bt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-from":t.value,"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Bt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-gradient-to":t.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${t.value},var(--tw-gradient-to)`})),Bt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),ee("bg-(fixed|local|scroll)","backgroundAttachment"),ee("bg-origin-(border|padding|content)","backgroundOrigin",({1:t})=>t+"-box"),ee(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),ee("bg-blend-","backgroundBlendMode"),ee("bg-clip-(border|padding|content|text)","backgroundClip",({1:t})=>t+(t=="text"?"":"-box")),ne("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Bt("bg-",{section:"backgroundColor"}),ne("bg-","backgroundImage"),ne("bg-","backgroundPosition"),ee("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",wc),ne("bg-","backgroundSize"),ne("rounded(?:$|-)","borderRadius"),ne("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:t,_:e})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[t]||[t,t];return{[`border-${ni(n[0])}-radius`]:e,[`border-${ni(n[1])}-radius`]:e}}),ee("border-(collapse|separate)","borderCollapse"),ne("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),ee("border-(solid|dashed|dotted|double|none)","borderStyle"),ne("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:t,_:e})=>({...Ea({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(t||"-x")]:e,["--tw-border-spacing"+(t||"-y")]:e,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Bt("border-([xytrbl])-",{section:"borderColor"},mo("border","Color")),Bt("border-"),ne("border-([xytrbl])(?:$|-)","borderWidth",mo("border","Width")),ne("border(?:$|-)","borderWidth"),ne("divide-opacity(?:$|-)","divideOpacity",({_:t})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":t}})),ee("divide-(solid|dashed|dotted|double|none)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:t}})),ee("divide-([xy]-reverse)",({1:t})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+t]:"1"}})),ne("divide-([xy])(?:$|-)","divideWidth",({1:t,_:e})=>{let n={x:"lr",y:"tb"}[t];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${t}-reverse`]:"0",[`border-${ni(n[0])}Width`]:`calc(${e} * calc(1 - var(--tw-divide-${t}-reverse)))`,[`border-${ni(n[1])}Width`]:`calc(${e} * var(--tw-divide-${t}-reverse))`}}}),Bt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ne("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Bt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ne("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),ee("ring-inset",{"--tw-ring-inset":"inset"}),Bt("ring-",{property:"--tw-ring-color"}),ne("ring(?:$|-)","ringWidth",({_:t},{theme:e})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":e("ringOffsetWidth","","0px"),"--tw-ring-offset-color":xa(e("ringOffsetColor","","#fff")),"--tw-ring-color":xa(e("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":e("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${t} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Bt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:t})=>({"--tw-shadow-color":t.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ne("shadow(?:$|-)","boxShadow",({_:t})=>({...Ea({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":ir(t),"--tw-shadow-colored":ir(t).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ne("(opacity)-"),ee("mix-blend-","mixBlendMode"),...yy(),...yy("backdrop-"),ne("transition(?:$|-)","transitionProperty",(t,{theme:e})=>({transitionProperty:ir(t),transitionTimingFunction:t._=="none"?void 0:ir(e("transitionTimingFunction","")),transitionDuration:t._=="none"?void 0:ir(e("transitionDuration",""))})),ne("duration(?:$|-)","transitionDuration","transitionDuration",ir),ne("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",ir),ne("delay(?:$|-)","transitionDelay","transitionDelay",ir),ne("animate(?:$|-)","animation",(t,{theme:e,h:n,e:r})=>{let a=ir(t),i=a.split(" "),o=e("keyframes",i[0]);return o?{["@keyframes "+(i[0]=r(n(i[0])))]:o,animation:i.join(" ")}:{animation:a}}),"(transform)-(none)",ee("transform",gm),ee("transform-(cpu|gpu)",({1:t})=>({"--tw-transform":xy(t=="gpu")})),ne("scale(-[xy])?-","scale",({1:t,_:e})=>({["--tw-scale"+(t||"-x")]:e,["--tw-scale"+(t||"-y")]:e,...gm()})),ne("-?(rotate)-","rotate",pm),ne("-?(translate-[xy])-","translate",pm),ne("-?(skew-[xy])-","skew",pm),ee("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",wc),"(appearance)-",ne("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ne("(cursor)-"),"(cursor)-",ee("snap-(none)","scroll-snap-type"),ee("snap-(x|y|both)",({1:t})=>({...Ea({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":t+" var(--tw-scroll-snap-strictness)"})),ee("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),ee("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),ee("snap-(normal|always)","scroll-snap-stop"),ee("scroll-(auto|smooth)","scroll-behavior"),ne("scroll-p([xytrbl])?(?:$|-)","padding",mo("scroll-padding")),ne("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",mo("scroll-margin")),ee("touch-(auto|none|manipulation)","touch-action"),ee("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:t,2:e,3:n})=>({...Ea({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${e?"pan-x":n?"pan-y":t}`]:t,"touch-action":"var(--tw-touch-action)"})),ee("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),ee("outline",{outlineStyle:"solid"}),ee("outline-(dashed|dotted|double)","outlineStyle"),ne("-?(outline-offset)-"),Bt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ne("outline-","outlineWidth"),"(pointer-events)-",ne("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:t})=>({x:"horizontal",y:"vertical"})[t]||t||"both"],ee("select-(none|text|all|auto)","userSelect"),Bt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Bt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ne("stroke-","strokeWidth"),ee("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),ee("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function wc(t){return(typeof t=="string"?t:t[1]).replace(/-/g," ").trim()}function by(t){return(typeof t=="string"?t:t[1]).replace("col","column")}function ni(t,e="-"){let n=[];for(let r of t)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(e)}function ir(t){return t&&""+(t._||t)}function Ty({$$:t}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[t[3]||""]||"")+t}function mo(t,e=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Us(t+"-"+ni(a[0])+e,r),...Us(t+"-"+ni(a[1])+e,r)}:Us(t+e,r)}}function yy(t=""){let e=["blur","brightness","contrast","grayscale","hue-rotate","invert",t&&"opacity","saturate","sepia",!t&&"drop-shadow"].filter(Boolean),n={};for(let r of e)n[`--tw-${t}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...Ea(n),[`${t}filter`]:e.map(r=>`var(--tw-${t}${r})`).join(" ")},[`(${t}filter)-(none)`,ee(`${t}filter`,n),...e.map(r=>ne(`${r[0]=="h"?"-?":""}(${t}${r})(?:$|-)`,r,({1:a,_:i})=>({[`--tw-${a}`]:Ln(i).map(o=>`${r}(${o})`).join(" "),...n})))]}function pm({1:t,_:e}){return{["--tw-"+t]:e,...gm()}}function gm(){return{...Ea({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":xy()}),transform:"var(--tw-transform)"}}function xy(t){return[t?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function vy({1:t,2:e}){return`${t} ${e} / ${t} ${e}`}function Sy({1:t}){return`repeat(${t},minmax(0,1fr))`}function Ea(t){return{"@layer defaults":{"*,::before,::after":t,"::backdrop":t}}}d();d();var Dc=globalThis||(typeof window<"u"?window:self),A5=Object.create,fm=Object.defineProperty,k5=Object.getOwnPropertyDescriptor,P5=Object.getOwnPropertyNames,L5=Object.getPrototypeOf,_5=Object.prototype.hasOwnProperty,F5=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),M5=(t,e)=>{for(var n in e)fm(t,n,{get:e[n],enumerable:!0})},mm=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of P5(e))!_5.call(t,a)&&a!==n&&fm(t,a,{get:()=>e[a],enumerable:!(r=k5(e,a))||r.enumerable});return t},B5=(t,e,n)=>(mm(t,e,"default"),n&&mm(n,e,"default")),Cy=(t,e,n)=>(n=t!=null?A5(L5(t)):{},mm(e||!t||!t.__esModule?fm(n,"default",{value:t,enumerable:!0}):n,t)),wy=F5((t,e)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof t<"u"?r():(r(),n.FileSaver={})})(t,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,p){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,p)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function i(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dc=="object"&&Dc.global===Dc?Dc:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,p){var g=o.URL||o.webkitURL,m=document.createElement("a");c=c||l.name||"download",m.download=c,m.rel="noopener",typeof l=="string"?(m.href=l,m.origin===location.origin?i(m):a(m.href)?r(l,c,p):i(m,m.target="_blank")):(m.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(m.href)},4e4),setTimeout(function(){i(m)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,p){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,p),c);else if(a(l))r(l,c,p);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){i(g)})}}:function(l,c,p,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,p);var m=l.type==="application/octet-stream",f=/constructor/i.test(o.HTMLElement)||o.safari,T=/CriOS\/[\d]+/.test(navigator.userAgent);if((T||m&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var D=b.result;D=T?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=D:location=D,g=null},b.readAsDataURL(l)}else{var h=o.URL||o.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});o.saveAs=u.saveAs=u,typeof e<"u"&&(e.exports=u)})}),Dy={};M5(Dy,{default:()=>Ac});var I5=Cy(wy());B5(Dy,Cy(wy()));var{default:Ey,...R5}=I5,Ac=Ey!==void 0?Ey:R5;d();d();d();d();d();d();var Oee=Me().REDIRECT_URL;d();var fte=hi([]);function Py(t){let[e,n]=re(null);return Ce(()=>{Xt().then(r=>{n(r),z.debug("current config",r)})},[]),Ce(()=>{Xt().then(r=>{n(r)})},[t]),e}function Ly(t){let[e,n]=re(null);return Ce(()=>{t&&Un({url:"http://localhost",config:t,state:{cache:!1}}).then(r=>n(r))},[t]),e}function _y(){let[t,e]=re(null);return Ce(()=>{Jt().then(r=>{e(r)})},[]),[t,r=>{e(r),Wt(r)}]}d();var js=class extends Ba{constructor(e){super(e),this.state={hasError:!1}}error;info;static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,n){this.error=e,this.info=n}render(){return this.state.hasError?(z.error("ErrorBoundary",this.error,this.info),w(W5,{error:this.error,info:this.info})):this.props.children}};function W5({error:t,info:e}){let{t:n}=xe(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return w("div",{class:"error-boundary",children:[t?.message," ",JSON.stringify(e?.componentStack),w("div",{style:{marginTop:10},children:[n("error.configError"),w("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}async function K5(t,e,n){try{if(e===null)return"noupdate";let r=await Jt();if(e.updatedAt){let s=new Date().getTime(),u=new Date(e.updatedAt).getTime();if(s-u<1e3)return await hm(t,e),await Wt(r),"upload"}let a=await My(t);r.accountLastSyncedAt=Date.now(),z.debug("settings",e),z.debug("local settings.updatedAt",e.updatedAt),z.debug("remote settings.updatedAt",a.updatedAt),z.debug("last synced at",r.accountLastSyncedAt);let i=!1;if(e.updatedAt&&(!a||!a.updatedAt)&&(i=!0),!i&&e.updatedAt>a.updatedAt&&(i=!0),z.debug("isUpload",i),i)return await hm(t,e),await Wt(r),"upload";let o=!1;return a.updatedAt&&(!e||!e.updatedAt)&&(o=!0),!o&&e.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||G5(n)&&K5(n.token,t,e).then(i=>{z.debug("syncUserSetting result",i)})},[t,n])}function G5(t){return Zt(t)?!0:new Date(t.createTime){Mt.get(Ft,null).then(n=>{e(n)})},[e]),t}function My(t){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:zo+"/v1/user/settings",method:"get",headers:{token:t}}).then(n=>n.data)}function hm(t,e){return(location.href?.indexOf("popup.html")>0?Ur:de)({responseType:"json",url:zo+"/v1/user/settings",method:"post",headers:{token:t,"content-type":"application/json"},body:JSON.stringify(e)}).then(r=>r.data)}function kc(t){let{onClose:e}=t,[n,r]=re("Original"),[a,i,o,s]=rr(()=>{setTimeout(()=>{D("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(globalThis.location.href),[g,m]=re("auto"),[f,T]=re(null),b=I=>{r(I.detail)};if(Ce(()=>(document.addEventListener(Oa,b,!1),qn().then(I=>{l(I);let F=yt();m(F);let L=$e();r(L),$T(I.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),Ce(()=>{qn().then(I=>{l(I)})},[a]),Ce(()=>{c&&u&&bm().then(I=>{T(I)})},[c,u]),!u||!f)return null;return w(Hs,{type:"float_ball_popup",className:t.className,onSwitchTranslationMode:I=>{D("switchTranslationMode",!0,{mode:I})()},request:de,onClose:M,onToggleEnabled:B,onTranslateTheWholePage:D("translateTheWholePage",!0),openOptionsPage:_,onToggleTranslate:D("toggleTranslatePage",!0),onTranslateTheMainPage:D("translateTheMainPage",!0),onTranslateToThePageEndImmediately:D("translateToThePageEndImmediately",!0),onTranslatePage:D("translatePage",!0),onRestorePage:D("restorePage",!1),onTranslatePdf:()=>{y(ga(f.rule)||c)},openAboutPage:k,openSharePage:D("shareToDraft",!0),onSetPageLanguage:h,setSettings:i,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:Gl,onSetBuildinConfig:Q1,onAutoEnableSubtitleChanged:D("autoEnableSubtitleChanged",!0),onOpenUrl:S});function h(I){m(I);let F=pu(c,I,u.sourceLanguageUrlPattern);i(L=>({...L,sourceLanguageUrlPattern:F})),Nn(I)}function C(){p(globalThis.location.href)}function D(I,F,L={}){let U={trigger:"page_popup",...L};return()=>{Pn({method:I,data:U}),F&&e()}}function M(){e()}function B(){i(I=>({...I,enabled:!I.enabled})),setTimeout(()=>{M()},50)}function S(I,F){let L=I;F&&(L=`${I}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Ql(L,!0),setTimeout(()=>{M()},50)}function y(I){I&&(Zi(!1,I),setTimeout(()=>{M()},50))}function _(I=""){Yi(!0,I),setTimeout(()=>{e()},50)}function k(){Yl(),setTimeout(()=>{e()},50)}function v(){a2(),setTimeout(()=>{e()},50)}}d();function Oy(){let[t,e]=re("Original");return Ce(()=>{let n=$e();e(n);let r=a=>{e(a.detail)};return document.addEventListener(Oa,r),()=>{document.removeEventListener(Oa,r)}},[]),{pageStatus:t}}var By=6,$5={position:"right",top:335};function zy({handleBallClick:t,isShow:e,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let i=je(null),o=je(null),[s,u]=re(!1),l=je(null),c=je(!1),p=je(n.floatBallConfig||$5),g=je(0),m=je(0),f=je(0),T=je(!1),b=je(0),h=je(0),C=je(0),D=je(0),M=je(!1),B=Ve(S=>{a||(clearTimeout(l.current),S?u(S):l.current=setTimeout(()=>{u(S),T.current=!1},tt().any?3e3:0))},[u,l,T,a]);return Ce(()=>{a||u(!1)},[a]),Ce(()=>{if(i.current&&p.current){let S=Tm(p.current.top);p.current.top=S,i.current.style.top=`${S}px`,i.current.style.display="flex"}},[e,i]),Ce(()=>{if(!o.current||!i.current)return;let S=L=>{L.preventDefault&&L.preventDefault(),g.current=L.clientX,m.current=L.clientY,b.current=Date.now(),f.current=i.current.offsetTop,c.current=!0,clearTimeout(l.current),B(!0),C.current=L.clientX,D.current=L.clientY,M.current=!1,tt().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{Iy({startX:g.current,startY:m.current,endX:C.current,endY:D.current})||(M.current=!0,r())},500)),document.addEventListener("mousemove",y),document.addEventListener("touchmove",v),document.addEventListener("mouseup",_),document.addEventListener("touchend",I),document.addEventListener("touchcancel",I)},y=L=>{if(L.preventDefault&&L.preventDefault(),!c.current||!i.current||(C.current=L.clientX,D.current=L.clientY,M.current))return;let U=L.clientY-m.current+f.current,N=Tm(U);i.current.style.top=`${N}px`},_=L=>{if(L.preventDefault&&L.preventDefault(),F(),c.current=!1,clearTimeout(l.current),T.current||B(!1),M.current)return;Iy({startX:g.current,startY:m.current,endX:L.clientX,endY:L.clientY})||(clearTimeout(h.current),t());let N=Tm(L.clientY-30);p.current.top=N;let q=Cs();Gl({...q,floatBallConfig:p.current})},k=L=>{L.preventDefault&&L.preventDefault(),S(L.changedTouches[0])},v=L=>{L.preventDefault&&L.preventDefault(),y(L.changedTouches[0])},I=L=>{L.preventDefault&&L.preventDefault(),_(L.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("touchmove",v),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",I),document.removeEventListener("touchcancel",I)};return o.current.addEventListener("mousedown",S),o.current.addEventListener("touchstart",k),()=>{o.current&&(o.current.removeEventListener("mousedown",S),o.current.removeEventListener("touchstart",k))}},[e,o,i,l,c,n,B,t]),Ce(()=>{if(tt().any)return;let S=_=>{_.target===i.current&&!T.current||(T.current=!0,B(!0),clearTimeout(l.current))},y=_=>{if(c.current){T.current=!1;return}_.target===i.current&&!T.current||B(!1)};return i.current?.addEventListener("mouseover",S),i.current?.addEventListener("mouseout",y),()=>{i.current?.removeEventListener("mouseover",S),i.current?.removeEventListener("mouseout",y)}},[i,c,B,e,T]),{ballRef:o,floatBallConfigRef:p,containerRef:i,active:s,setActive:B}}function Iy({startX:t,startY:e,endX:n,endY:r}){let a=Math.abs(n-t),i=Math.abs(r-e);return a>By||i>By}function Ny(t,e){let n=t?.fixedPosition||"right",r=t?.clickType==="translate",a=Ne(()=>e?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,e]),i=Ne(()=>e&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,e,r]),o=Ne(()=>e&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,e,r]);return{closeTransform:a,logoContainerTransform:i,settingTransform:o}}function Uy(){let[t,e]=re(!1);return Ce(()=>{let n=()=>{document.querySelector("video")&&e(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:t}}var Ry="hasShownFloatingBallGuide",Y5="2024-01-06";function qy(t){let[e,n]=re(!1);Ce(()=>{!t.config.enableShowFloatingBallGuide||yt()==t.targetLanguage||(async()=>{let a=await At(Ry,""),i=await At("installedAt","");i&&new Date(i){n(!1)},[]);return{isShowGuide:e,handleCloseGuide:r}}function jy(t,e){let n=je(0),[r,a]=re(!0),[i,o]=re(!1),s=rr(),[u,l]=s,{t:c}=xe(),p=Ve(()=>{t?.config.floatBallTooltipRule&&(tt().any?o(n.current>=(t.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(t.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,t,o]);Ce(()=>{t&&(n.current=t.config.pcFloatBallMainBtnTooltipShownCount||0,tt().any&&(n.current=t.config.h5FloatBallMainBtnTooltipShownCount||0),p())},[t]);let g=Ve(()=>{t&&(n.current=n.current+1,p(),l(T=>{let b={...T};return tt().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,p,n,t]),m=Ne(()=>tt().any||!r?0:t?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,t]),f=Ne(()=>tt().any?c("floatBall.longPress"):e!=="Original"?c("floatBall.showOriginal"):t?.targetLanguage?c("floatBall.translateToLanguage",{language:fa(t.targetLanguage,t.targetLanguage,!0)}):c("floatBall.translate"),[e,t]);return{disableTooltipDelay:i,tooltipDelay:m,tooltipText:f,handleShowTooltip:g}}function Tm(t){return Math.max(Math.min(t,globalThis.innerHeight-200),10)}d();var ri=`${Q}-float-ball`;function Hy(t){let e=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(Q5,{onConfirm:t.onCloseConfirm,onClose:t.onClose})})}):null}function Q5(t){let{t:e}=xe(),[n,r]=re("UntilNext"),a=$l()+"#floating",i=e("closeQuickTranslation.settingOpen",{1:a}),o=[{title:e("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:e("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:i},{title:e("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:i}];return w("div",{class:`${ri}-close-content`,children:[w("div",{class:"flex justify-between",children:[w("div",{class:`${ri}-close-title`,children:e("closeQuickTranslation")}),w("div",{class:"clickable",onClick:t.onClose,children:w(Sa,{type:"modal-close"})})]}),w("div",{class:`${ri}-close-radio-content mt-3`,children:o.map(s=>w(Z5,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Qi(u)}},s.type))}),w("div",{class:"flex mt-3 flex-end",children:[w("div",{class:`${ri}-default-btn`,onClick:t.onClose,children:e("closeQuickTranslation.cancel")}),w("div",{class:`${ri}-primary-btn ml-2`,onClick:()=>{t.onConfirm&&t.onConfirm(n)},children:e("closeQuickTranslation.confirm")})]})]})}function Z5(t){let{selected:e,title:n,description:r,onLinkClick:a}=t,i=J5(r||"");return w("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:t.onClick,children:[w("div",{class:e?`${ri}-radio-sel`:`${ri}-radio-nor`,children:w("div",{})}),w("div",{class:"ml-2 text-sm",children:[w("span",{children:n}),r?w("small",{class:"muted text-sm",children:i.map(o=>o.type==="text"?o.value:w("a",{onClick:()=>o.href&&a&&a(o.href),children:o.value}))}):null]})]})}function J5(t){let e=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(t.matchAll(n));for(let a of r){let i=a[2],o=a[3],s=a[4];i&&o?e.push({type:"link",href:i,value:o}):s&&e.push({type:"text",value:s})}return e}d();var X5=({text:t,children:e,position:n="top",containerStyle:r,containerClass:a,multiple:i=!1,width:o,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:p,onShow:g})=>{let[m,f]=re(!1),T=je(null),b=je(null),h=()=>{u||!l&&tt().any||(T.current&&clearTimeout(T.current),T.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{tt().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{D()},2e3))},D=()=>{T.current&&(clearTimeout(T.current),p?.()),f(!1)},M=Ne(()=>{let B={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(i&&(B.maxWidth="200px",o&&(B.width=o+"px"),B.whiteSpace="normal"),n){case"top":return{...B,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...B,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...B,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...B,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,i,o,c]);return w("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[w("div",{onMouseEnter:h,onMouseLeave:D,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:e}),m&&w("div",{style:M,role:"tooltip",children:t})]})},Ca=X5;d();d();function Wy(t){return we.ASSETS_BASE_URL+t}var ai=`${Q}-float-ball`;function Ky(t){let{t:e}=xe(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&t.onClose()},r=Ne(()=>{let a={position:"fixed",top:t.top+60};return t.fixedPosition=="left"&&(a.left=48),t.fixedPosition=="right"&&(a.right=48),a},[t.top,t.fixedPosition]);return t.visible?w("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:`${ai}-guide-container`,style:r,children:[w("img",{class:`${ai}-guide-bg ${t.fixedPosition}`,src:ek}),w("div",{class:`${ai}-guide-content ${t.fixedPosition}`,children:[w("img",{class:`${ai}-guide-img`,src:Wy("images/float_ball_intro.png")}),w("div",{class:`${ai}-guide-message`,children:[e("floatBall.guideClickToTranslate"),tt().any?` +${e("floatBall.longPress")}`:""]}),w("div",{class:`${ai}-primary-btn ${ai}-guide-button`,onClick:t.onClose,children:e("floatBall.iKnow")})]})]})}):null}var ek="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function tk({isVisible:t,onClose:e,children:n}){return w(Ot,{children:[t&&w("div",{className:`immersive-translate-sheet-backdrop ${t?"visible":""}`,onClick:e}),w("div",{className:`immersive-translate-sheet ${t?"visible":""}`,children:w("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Gy=tk;var Ws=`${Q}-float-ball`;function ym(t){let{t:e}=xe(),n=rr(),[r,a,i,o]=n;fo(r,a);let s=Py(r),u=Ly(s),{isFullScreen:l}=Uy(),[c,p]=re(!1),[g,m]=re(!0),{pageStatus:f}=Oy(),T=Tp(u,r),b=Ve(()=>{if(T?.clickType==="popup")return p(!0);if(T?.clickType==="translate"){let P=Ae();if(Hr(u?.rule)){let O=ga(u.rule);Zi(!0,O||P);return}Pn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[T,Pn,p]),h=Ve(()=>{p(!0)},[p]),C=g&&!!s,{containerRef:D,active:M,ballRef:B,floatBallConfigRef:S,setActive:y}=zy({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:t.localConfig,popupVisible:c}),_=T?.fixedPosition||"right",k=_==="right"?"left":"right",{isShowGuide:v,handleCloseGuide:I}=qy(t.ctx),{closeTransform:F,logoContainerTransform:L,settingTransform:U}=Ny(T,M||v),{tooltipDelay:N,disableTooltipDelay:q,tooltipText:A,handleShowTooltip:E}=jy(u,f);return C?w("div",{class:`${Ws}-container ${_} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:M||v||c?"all":"none"},ref:D,children:[w(nk,{ctx:u,setVisible:m,closeTransform:F,setActive:y,getModalStyle:()=>Vy(S.current.top,300,_)}),w(Ca,{enableMobile:!0,text:A,position:k,delay:N,onShow:E,disable:q,children:w("div",{class:`${Ws}-btn ${_} btn-animate `,ref:B,style:{transform:L,opacity:M||v?1:.5},children:w("div",{children:[w(Sa,{type:"logo"}),f!=="Original"?w(Sa,{type:"translated"}):null]})})}),w("div",{style:{marginTop:"12px",transform:U},class:`${Ws}-more-buttons btn-animate`,children:[w(Ca,{text:e("translateFileTooltip"),multiple:!0,width:200,position:k,containerClass:"btn-animate",children:w("div",{class:`${Ws}-more-button`,onClick:()=>{Ql(c4,!0)},children:w(Sa,{type:"file"})})}),w(Ca,{text:e("floatBall.setting"),position:k,containerClass:"btn-animate",children:w("div",{class:`${Ws}-more-button`,onClick:()=>{y(!0),p(!0)},children:w(Sa,{type:"setting"})})})]}),w(rk,{onClose:()=>{y(!1),p(!1)},visible:c,getModalStyle:()=>Vy(S.current.top,500,_)}),w(Ky,{visible:v,top:S.current.top,fixedPosition:_,onClose:()=>{I(),y(!1)}})]}):null}function nk(t){let{t:e}=xe(),[n,r]=re(!1),a=rr(),[i,o,s,u]=a,l=Tp(t.ctx,i),c=Ve(g=>{t.ctx&&o(m=>a1({...m},g))},[t.ctx,o]),p=Ve(g=>{l&&(t.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,t.setVisible]);return w(Ot,{children:[w("div",{title:e("floatBall.close"),class:"btn-animate",style:{transform:t.closeTransform,padding:4},onClick:()=>{t.setActive(!0),r(!0)},children:w(Sa,{type:"close"})}),w(Hy,{visible:n,onClose:()=>{t.setActive(!1),r(!1)},getModalStyle:t.getModalStyle,onCloseConfirm:p})]})}function rk(t){let e=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&t.onClose()};return window.innerWidth<=385?w(Gy,{isVisible:t.visible,onClose:t.onClose,children:w(kc,{onClose:t.onClose,className:"popup-container-sheet"})}):t.visible?w("div",{onClick:e,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:w("div",{class:"immersive-translate-popup-wrapper",style:t.getModalStyle(),children:w(kc,{onClose:t.onClose})})}):null}function ak(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Vy=(t,e,n)=>{let a=ak().height,i={position:"fixed"},o=0;return Vf()&&(t=ik.top),i.top=t-o,i.top+e>=a?(i.bottom=30,delete i.top):i.top<=10&&(i.top=10),n==="left"?i.left=65:i.right=65,i},ik={position:"right",right:0,top:335};function ok(t,e){for(let n of e){if(ye()&&!Wn()&&typeof GM!==void 0&&GM.addElement){GM.addElement(t,"style",{textContent:n});continue}t.appendChild(document.createElement("style")).textContent=n}}async function $y(){let t=Me(),e=await qn(),n=await qr(),r={url:globalThis.location.href,config:e},a=await Un(r),i=await yp(a,n),o=wt(a.url,i?.blockUrls),s=await Jt();if(!i?.enable||o)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[t.IMMERSIVE_TRANSLATE_PICO_CSS,t.IMMERSIVE_TRANSLATE_COMMON_CSS,t.IMMERSIVE_TRANSLATE_POPUP_CSS,t.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return ok(l,[c]),sk(l,e,s,a)}function sk(t,e,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",t.appendChild(a),$r(w(eo,{lang:e.interfaceLanguage,fallbackLang:"en",translations:rc,children:w(ym,{localConfig:n,ctx:r})}),a)}var Yy=!1;async function Qy(){Yy||(Yy=!0,$y().catch(t=>{z.error("init popup error",t)}))}var Zy=!1,tv=[()=>{yn.unbind()}],Jy=[...tv],uk=Vn(async()=>{await Yi()},50),lk=Vn(async()=>{await Yl()},50),ck=Vn(async()=>{await n2()},50),dk=Vn(async()=>{await t2()},50),nv=Vn(t=>{Pn({method:t,data:{trigger:"userscript_menu"}})},50);function pk(t,e){let n=t.document;if(Zy)return;Zy=!0,ye()||Y1(),n.addEventListener("securitypolicyviolation",Ek),document.addEventListener(me+"DocumentMessageUser",sv),document.addEventListener(me+"DocumentMessageUpdateUser",uv),document.addEventListener(me+"ChangeSuccessService",lv.bind(null,e)),document.addEventListener(me+"ChangeService",cv.bind(null,e)),document.addEventListener(Ra,vk.bind(null,e)),n.addEventListener(me+"EbookLoaded",xk),n.addEventListener(Lh,Sk.bind(null,e)),n.addEventListener(_h,Ck.bind(null,e)),n.addEventListener(vu,a=>{Xe()||Em(a,e)}),n.addEventListener(Fh,pv),n.addEventListener("click",a=>{fk(a,e)}),Xe()&&t.addEventListener("message",mk,!1),ye()&&(Xe()||n.addEventListener(wr,gk)),Xe()||ba.rootIframe(Au).handleAsk("throttleRequest",oT)}function rv(t,e){wk(),pk(e,t),ye()&&(Xe()||(Qg(t.config),Dk(t.config))),Tu()&&gv(t),ot()&&Qg(t.config)}function gk(t){Qy()}function mk(t){let e=t;e&&e.data&&e.data.payload&&e.data.author===yu&&ma(e.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function fk(t,e){let n=t.target;if(!n||!n.getAttribute){wa(n);return}let r=n.getAttribute("data-immersive-translate-event");r&<(r,[{name:r}],{...e,sourceLanguage:"none"});let a=n.getAttribute(`data-${Q}-action`);if(a){if(t.preventDefault(),a==="retry"){typeof t.stopPropagation=="function"&&t.stopPropagation(),vm({method:"retryFailedParagraphs"}),wa(n,!0);return}else if(a=="toast-error"){let i=n.getAttribute(`data-${Q}-tooltip-text`)||"",o="",s="retry";try{let u=JSON.parse(i);o=u.title,i=u.errMsg,s=u.action}catch{}av(iv.bind(null,e,o,i,s));return}}}async function hk(){let t=await mn(),e=t.enableDefaultAlwaysTranslatedUrls===void 0?!0:t.enableDefaultAlwaysTranslatedUrls;if(t.enableDefaultAlwaysTranslatedUrls=!e,!t.enableDefaultAlwaysTranslatedUrls){let n=t&&t.isChangedAlwaysTranslatedUrls,r=[];t.translationUrlPattern&&t.translationUrlPattern.matches&&(r=t.translationUrlPattern.matches||[]),!n&&r.length>0&&(t.translationUrlPattern={matches:[],excludeMatches:[]})}await gn(t)}async function bk(){let t=await mn(),e=t.enableInputTranslation;t.enableInputTranslation=!e,await gn(t)}var Xy=0;function av(t){let e=Date.now();if(e-Xy<2e3||(Xy=e,Tk()))return;let n=`${Q}-modal-root`,r=`${Q}-modal`,a=document.getElementById(n),i=`${Q}-modal-title`,o=`${Q}-modal-body`,s=`${Q}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${i}`),c=u.querySelector(`.${s}`),p=u.querySelector(`.${o}`);t(u,l,p,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),p=Me();c.textContent=p.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=Q+"-modal-content notranslate",u.appendChild(g);let m=document.createElement("span");m.textContent="\xD7",m.className=Q+"-close",g.appendChild(m);let f=document.createElement("div");f.className=i+" notranslate",g.appendChild(f);let T=document.createElement("div");T.className=o+" notranslate",g.appendChild(T);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),m.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),t(u,f,T,b)}setTimeout(()=>{yk()},100)}function iv(t,e,n,r="retry",a,i,o,s){let u=kt.bind(null,t),l=e||u("errorModalTitle"),c=u("unknownError");i.innerText=l,o.innerHTML=at.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let p="",g=document.createElement("button");if(r=="retry"){p=u("retryAllButton"),g.setAttribute(`data-${Q}-action`,"retry");let m=document.createElementNS("http://www.w3.org/2000/svg","svg");m.setAttribute("viewBox","0 0 16 16"),m.setAttribute("width","20"),m.setAttribute("height","20"),m.innerHTML='',g.appendChild(m),g.onclick=()=>{a.style.display="none",vm({method:"retryFailedParagraphs"}),wa(g,!0)}}else if(r=="login")p=u("goLogin"),g.onclick=()=>{wa(g,!0),window.open(n4)};else if(r=="upgrade")p=u("upgradeToPro"),g.onclick=()=>{wa(g,!0),window.open(Pu)};else if(r=="setting")p=u("goSettings"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)};else if(r=="changeService")p=u("detectServiceLoading"),g.onclick=()=>{wa(g,!0),window.open(we.OPTIONS_URL)},xm(t,t.config.translationService,!1).then(m=>{m?(p=u("toggleToService",{service:u("translationServices."+m)}),g.innerHTML=at.sanitize(p),g.onclick=()=>{dv(m),wa(g,!0)}):(p=u("goSettings"),g.innerHTML=at.sanitize(p))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=at.sanitize(p),s.appendChild(g)}function Tk(){let t=document.querySelector("#immersive-translate-modal-root");return t&&t.shadowRoot?t.shadowRoot.querySelector(`#${Q}-modal`)?.style.display=="block":!1}function yk(){let t=document.querySelector("#immersive-translate-modal-root");if(t&&(t.style.display="block",t.shadowRoot)){let e=t.shadowRoot.querySelector(`#${Q}-modal`);e&&(e.style.display="block")}}function wa(t,e=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${Q}-modal`);r&&r!==t&&(!e&&r.contains(t)||(r.style.display="none"))}function vk(t,e){let n=e;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:i,action:o}=r;av(iv.bind(null,t,a,i,o))}catch(r){z.warn("parse message error",r)}}async function Sk(t,e){let n=e;if(z.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")vm({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")r2(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")hk();else if(a.type==="toggleEnableInputTranslation")bk();else if(a.type==="translatePage")Ak(a.data);else if(a.type==="getAsyncTranslationServiceList")r=ps(t,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=gc(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let i=t.state.translationService||t.config.translationService;r={targetLanguage:t.state.targetLanguage||t.targetLanguage,translationService:i,translationMode:t.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let i={...t,translationService:a.data.service};try{r=await kk(a.data,i)}catch(o){ev(a.type,o.uiConfig(i),a.id)}}else a.type==="getAsyncLanguageByText"?r=await Vl(a.data):a.type==="sharePage"?Em({detail:a.data},t):a.type==="switchTranslationMode"?Sm(a.data):nv(a.type);r&&a.id&&ev(a.type,r,a.id)}}catch(a){z.warn("parse message error",a)}}}function xk(t){setTimeout(()=>{ov()},10)}function Ek(t){we.HAS_CSP_ERROR="1"}function Ck(t,e){let n=e.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&<(n.name,[{name:n.name}],{...t})}function wk(){Jy.forEach(t=>{t()}),Jy=tv}function Dk(t){if(ye()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let e=gl.commands,a=[...Object.keys(e).filter(i=>i==="toggleTranslatePage").map(i=>{let o=e[i].description,s=o;return o.startsWith("__MSG_")&&o.endsWith("__")&&(s=no(`browser.${o.slice(6,-2)}`,t.interfaceLanguage)),{id:i,title:s}}),{id:Ad,title:no("browser.openEbookViewer",t.interfaceLanguage),key:"e"},{id:kd,title:no("browser.openEbookBuilder",t.interfaceLanguage),key:"m"},{id:wd,title:no("browser.openOptionsPage",t.interfaceLanguage),key:"o"},{id:Dd,title:no("browser.openAboutPage",t.interfaceLanguage),key:"a"}];for(let i of a)GM.registerMenuCommand(i.title,()=>{i.id===wd?uk():i.id===Dd?lk():i.id===kd?ck():i.id===Ad?dk():nv(i.id)},i.key)}}function vm(t){ma(t,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{z.error("send content message request failed",t,n)});let e=new CustomEvent(wr,{detail:t});globalThis.document.dispatchEvent(e)}async function Ak(t){let e={};t?.translationMode&&(e.translationMode=t.translationMode),t?.translationService&&(e.translationService=t.translationService),t?.targetLanguage&&(e.targetLanguage=t.targetLanguage),t?.translationStartMode&&(e.translationStartMode=t.translationStartMode);let n=await Ke(Ae(),e);fn(n)}function ev(t,e,n){globalThis.document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({id:n,type:t,payload:e})}))}async function kk({textList:t,from:e,to:n,service:r},a){if(a.rule.id!=="immersive")return;let i=t.map(s=>({text:s||"",id:0,from:e,to:n,url:a.url,fromByClient:e,force:!0})),o=null;try{let s=await Qe({sentences:i},{...a,translationService:r},u=>o=u);if(o)throw o;return s}catch(s){throw s}}d();var ii={};async function Cm(){let e=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Ie({text:e,minLength:200,pageLangs:[ft(),"en"]});return Nn(n),n}async function mv(t){pn("Translating");let e=yt(),n=Il(),r=[...document.querySelectorAll(".source-text")];if(Ui(t,e))return;let a=r.filter(i=>i.innerText?.trim()).map((i,o)=>{let s=i.parentElement?.parentElement?.querySelector(".target-text");return ut(i,"id",o+""),s&&(qi(s,o)?.remove(),s.appendChild(vs(t,o))),{text:i.innerText||"",id:o,from:e,to:t.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Qe({sentences:a},{...t,sourceProgram:"subtitle"},(i,o,s)=>{let u=s.id,l=qi(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),i?(c.innerHTML=at.sanitize(`${i.message}`),ii[u]={ok:!1,sentence:s}):o&&(c.innerHTML=at.sanitize(o.text),ii[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!i}})})))})}catch(i){throw i}finally{pn("Translated")}}async function fv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(ii),n=[],r=[];for(let a of e){let i=ii[a];if(!i.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete ii[a],u.appendChild(vs(t,a)),r.push(i.sentence))}}}try{await Qe({sentences:r},t,(a,i,o)=>{let s=o.id,u=qi(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=at.sanitize(`${a.message}`),ii[s]={ok:!1,sentence:o}):i&&(l.innerHTML=at.sanitize(i.text),ii[s]={ok:!0,sentence:o}),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{pn("Translated")}}function wm(){pn("Original"),document.querySelectorAll(".target-text").forEach(t=>{t.innerHTML=""})}d();var Dm={};async function hv(){let t=[...document.querySelectorAll("iframe")],e="";for(let r of t){let a=r.contentDocument;if(!a)continue;let i=a.body;if(i&&(e=e+i.innerText||"",e.length>1e3))break}let n=await Ie({text:e,pageLangs:["en"]});return Nn(n),n}async function bv(t){pn("Translating"),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=Object.keys(Dm),n=[];for(let r of e){let a=Dm[r];if(a.error){let o=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);o&&o.remove(),n.push(a)}}try{zs(),await vc(n,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}function Tv(){let t=[...document.querySelectorAll("iframe")];for(let e of t){let n=e.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+bt);for(let a of r)a.remove()}pn("Original")}async function yv(t){pn("Translating");let e=gs(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;po(u,t);let l=u.body;if(!l)continue;let c=an(t);c.isModifyImage=!1,Kr({id:e,container:l,filterRule:c,onParagraph:p=>{r.push(p)}})}let i=Tr(t.config.translationServices[t.translationService]),o=1;for(let s of r){let u=ac(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:i,stayOriginalSelectors:t.rule.stayOriginalTags.concat(t.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(t.rule.stayOriginalSelectors).concat(t.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(o++).toString();let l=await Hg(t,s,{excludeLanguages:t?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:t.state.isDetectParagraphLanguage,targetLanguage:t.targetLanguage,delimiters:i,noTranslateRegexp:t.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW});l&&(a.push(l),Dm[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await vc(a,t,t.state.translationMode||t.config.translationMode)}catch{}finally{pn("Translated")}}d();var or=!1,Pc,vv=!1,Lc=null;function xv(t){let{config:e}=t;if(t.isInputTranslationExcludeUrl){z.debug("exclude url for input");return}if(Lc===!1){z.debug("disable for this time");return}let n={...e.inputLanguageCodeAlias};wn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;tt().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=0,s=Date.now();Pc&&self.removeEventListener("keydown",Pc),Pc=u,self.addEventListener("keydown",Pc);function u(c){if(or||Lc===!1)return;let p=c,g=p.target||p.srcElement,m=g?.tagName;(g?.isContentEditable||m=="INPUT"||m=="SELECT"||m=="TEXTAREA")&&(jk(c,i.triggerKey,i.codePrefixAlias)?l(c):o=0)}async function l(c){Date.now()-s=i.triggerTimes&&_k()&&(o=0,Lk(c,t,i))}Hk(t)}function Ev({codePrefix:t,flatAlias:e,codePrefixAlias:n}){let r=[],a=n[t]||[];a.includes(t)||a.unshift(t);for(let i of a){let o=e.map(s=>{let u=i+s;return a.includes(s)||(u+=" "),u});r.push(...o)}return new RegExp(r.join("|"))}function _c(t,e){for(let[n,r]of Object.entries(e))if(r.includes(t))return n;return""}var ho;function Cv(t){let e=t.parentElement;if(!e)return;ho=document.createElement("div"),ho.className=Q+"-input",ho.innerHTML=`
`,e.appendChild(ho);let n=e,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=e,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function wv(){ho&&ho.remove()}async function Pk(t){if(!or)try{let f=function(){c=t.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&i.flatAlias.includes(b)?(c=_c(b,i.codeAlias),u=l.slice(b.length+1)):u=l},T=function(){c="";let b=Ev(i),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let D=l.lastIndexOf(u),M=l.slice(0,D).lastIndexOf(h[h.length-2]);s=l.slice(0,M+h[h.length-2].length)}if(s.endsWith(i.codePrefix))return;if(s.endsWith(":")&&i.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=_c(C,i.codeAlias),!c){z.warn("not found alias",C);return}},{config:e}=t,n={...e.inputLanguageCodeAlias};wn.forEach(b=>n[b]=[b,...n[b]||[]]);let r=e.inputStartingTriggerKeyAlias[e.inputStartingTriggerKey]||[];r.includes(e.inputStartingTriggerKey)||r.unshift(e.inputStartingTriggerKey),n[e.inputTargetLanguage]=[...r,...n[e.inputTargetLanguage]];let a=e.inputTrailingTriggerKeyTimeout;tt().any&&(a=e.inputTrailingMobileTriggerKeyTimeout);let i={triggerTimes:e.inputTrailingTriggerKeyRepeatTimes,triggerKey:e.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:e.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:e.inputStartingTriggerKeyAlias},o=document.activeElement;if(!o||o.tagName==="BODY")return;or=!0;let s="",u="",l=Da(o)||"",c=t.config.inputTargetLanguage;t.config.inputStartingTriggerKey==="none"?f():(T(),!c&&t.config.enableInputTranslationWithoutTriggerKey&&f());let p=Dv(u,i),g=await Ie({text:p,pageLangs:["en"]});z.debug("translateContent",p,g);let m={text:p||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!m.text||m.text.length>5e3)return;Cv(o),Je(Su,Date.now());try{let b=await ya(m,{...t,translationService:t.inputTranslationService});kv(t),Av(t,o,s+b.text)}catch(b){if(b instanceof $){let h=b.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:h}))}}finally{or=!1}}catch(e){throw or=!1,e}finally{or=!1,wv()}}async function Lk(t,e,n){if(!or)try{let p=function(){s=e.config.inputTargetLanguage;let m=o.split(" ")[0];m&&m[0]&&(m=m[0].toLowerCase()+m.slice(1)),m.trim()&&n.flatAlias.includes(m)?(s=_c(m,n.codeAlias),i=o.slice(m.length+1)):i=o},g=function(){s="";let m=Ev(n),f=o.split(m);if(f.length<2)return;if(i=f[f.length-1],a=f[0],f.length>2){let b=o.lastIndexOf(i),h=o.slice(0,b).lastIndexOf(f[f.length-2]);a=o.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",i="";return}let T=o.slice(a.length+1,o.indexOf(i)).trim();if(s=_c(T,n.codeAlias),!s){z.warn("not found alias",T);return}},r=document.activeElement;or=!0;let a="",i="",o=Da(r)||"",s=e.config.inputTargetLanguage;n.codePrefix==="none"?p():(g(),!s&&e.config.enableInputTranslationWithoutTriggerKey&&p());let u=Dv(i,n),l=await Ie({text:u,pageLangs:["en"]});z.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(e.config.isShowInputTranslationConsent&&!vv){vv=!0;let m=await Wk(e);if(t.target&&t.target.focus(),m==="open_settings"){Yi(!0,"#input");return}else if(m==="open_learn_more"){Qi("https://immersivetranslate.com/docs/input/");return}else if(m==="disable_once"||m==="disable_forever"){if(Lc=!1,m==="disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="disable_once"){let f=await mn();f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="close_disable_once"||m==="close_disable_forever"){if(Lc=!1,m==="close_disable_forever"){let f=await mn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await gn(f)}return}else if(m==="enable"){let f=await mn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await gn(f)}else if(m==="close_enable"){let f=await mn();f.enableInputTranslation=!0,await gn(f)}}Cv(r),Je(Su,Date.now());try{let m=await ya(c,{...e,translationService:e.inputTranslationService});kv(e),Av(e,r,a+m.text)}catch(m){if(m instanceof $){let f=m.uiConfig(e);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(Ra,{detail:f}))}}finally{or=!1}}catch(r){throw or=!1,r}finally{or=!1,wv()}}function _k(){let t=document.activeElement;if(!t)return!1;if(Fc(t)){let e=t.selectionStart||0,n=t.value.length,a=t.value.split(` `).reverse()[0].trim(),i=n<=e;return z.debug("cursorPosition",e,"textLength",n),z.debug("input isTail",i,"tailHasText",a),i&&!!a}else{let e=window.getSelection();if(!e)return z.debug("No active selection found."),!1;if(e.rangeCount>0){let n=e.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=Fk(r,t);z.debug("Current text node:",r.textContent),z.debug("Cursor position within text node:",n.startOffset);let i=r.textContent?.length===n.startOffset&&a,o=t.innerText?.split(` -`).reverse(),s=it()?o[0]||o[1]:o[0];return z.debug("editdiv isTail",i,"tailHasText",s),i&&!!s}else z.debug("Cursor is not within a text node.")}}return!1}function Fk(t,e){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let i of a.childNodes)r(i)}return r(e),n==t}function Dv(t,e){let{triggerTimes:n,triggerKey:r}=e,a=0,i=" ";r.length==1?(a=n,i=r):r.toLowerCase()=="space"&&(a=n);let o=t.length;for(let s=t.length-1;s>=t.length-a;s--){if([10,8629].includes(t[s].charCodeAt(0))){o--;continue}if(![...e.codePrefixAlias[r]||[],i].includes(t[s]))break;o--}return t.length-o<3&&[".","\u3002"].includes(t[o-1])&&o--,t.slice(0,o)}function Mk(t,e){let n=e.innerHTML,r=Da(e);return{html:n.replace(r,t),text:t}}function Sv(t,e,n=!1){let r=Da(e);return n?r.trim().endsWith(t.text.trim()):r?.trim()?.indexOf(t?.text?.trim())>=0}function Da(t){return t.value||t.innerText||t.textContent}async function Aa(t){await new Promise((e,n)=>{setTimeout(()=>{e("")},t)})}async function Bk(t,e,n){await Aa(10);let r=new DataTransfer;t.forEach(a=>{a==="plain"&&r.setData("text/plain",e.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Aa(10)}async function Ik(t,e){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,t.text),e.dispatchEvent(n),await Aa(10))}async function Rk(t,e){e.value&&e.select(),document.execCommand("insertText",!1,t.text.replace(/\n/g,"\r")),await Aa(20),(e.value||e.value==="")&&(e.value=t.text)}async function Ok(t,e){Fc(e)&&(e.value=t.text,e.dispatchEvent(new Event("input",{bubbles:!0})),await Aa(20))}var zk=[Bk.bind(null,["plain"])];function Nk(t){let e;Fc(t)?e=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):e=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),t.dispatchEvent(e)}function Fc(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}function Uk(t){if(Fc(t))return;t.focus();let e=window.getSelection();if(!e)return;let n=document.createRange();n.selectNodeContents(t),e.removeAllRanges(),e.addRange(n)}async function Av(t,e,n){await Uk(e),await Aa(50);let r=t.rule.inputConfig,a=Mk(n,e);try{r?.clearContentEnable&&Nk(e),await Aa(50),r?.execCommandDeleteEnable&&!Wn()&&Da(e)?.trim()!=""&&(document.execCommand("delete"),await Aa(50)),z.debug("clearContent",Da(e))}catch(i){z.error(i)}for(let i of[...zk,Rk,Ok,Ik]){await i(a,e);let o=qk();if(!o)return;if(z.debug("setContent",i.name,Sv(a,o),Da(o),a),Sv(a,o))break}}function qk(){return document.activeElement}function kv(t){lt("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:t.config.inputTrailingTriggerKey,input_starting_trigger_key:t.config.inputStartingTriggerKey,input_target_language:t.config.inputTargetLanguage}}],t)}function jk(t,e,n){let r="";t&&t.code&&(r=t.code.toLowerCase());let a="";t&&t.key&&(a=t.key.toLowerCase());let i=t.keyCode,o=n[e]||[];return i===229&&e!=="space"?!1:!!(o.includes(r)||o.includes(a)||r===e||a===e)}async function Hk(t){if(t.config.interfaceLanguage!=="zh-CN"||t.config.targetLanguage!=="zh-CN")return;let e="inputTutorialsShowedAt";if(await At(e,"")||Number(await At(Su,0))>0)return;let a=t.rule.inputConfig,i=a.tutorialsSelectors,o=a.tutorialsText;if((i?.length||0)>0&&o)for(let s=0;s{Kk()},100),new Promise(p=>{let g=p;if(o){let k=o.shadowRoot;if(!k)return;s=k.querySelector(`.${n}`);let v=s.querySelector(`.${r}`),I=s.querySelector(`.${i}`),F=s.querySelector(`.${a}`)}else{let k=document.createElement("div");k.setAttribute("translate","no"),k.className="no-translate immersive-translate-error-modal-input-shadow-root",k.id=e,k.style.all="initial",k.style.zIndex="2147483647",document.body.appendChild(k);let v=k.attachShadow({mode:"open"}),I=document.createElement("style"),F=Me();I.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,v.appendChild(I),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let L=document.createElement("div");L.className=Q+"-modal-content notranslate "+Q+"-modal-content-in-input",s.appendChild(L);let U=document.createElement("span");U.textContent="\xD7",U.className=Q+"-close",L.appendChild(U),u=document.createElement("div"),u.className=r+" notranslate",L.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",L.appendChild(c),l=document.createElement("div"),l.className=i,L.appendChild(l),v.appendChild(s),U.onclick=function(){B(),p("close")},v.addEventListener("click",N=>{N.target==s&&(s.style.display="none",p("close"))})}document.addEventListener("keydown",_);let m=kt.bind(null,t);u.innerHTML=`
${nc} ${m("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=m("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let T=document.createElement("div");T.style.cssText="margin-bottom: 12px;",T.innerHTML=rt.sanitize(m("disableInputTranslationTips",{option:`${m("option")}`,learnMore:`${m("learnMore")}`})),c.appendChild(T);let b=[{id:"enable-search-enhancement",value:"enable",text:m("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:m("disableOnce")},{id:"disable-global",value:"global",text:m("disableGlobal")}];for(let k=0;kl===e)||t.ignoreBuildPlatforms?.find(l=>l===n))return;let i=globalThis.navigator.userAgent;if(t.ignoreUserAgents?.find(l=>i.match(new RegExp(l))))return;let{initOptions:s}=t,u={dsn:Gk,environment:Me().PROD==="1"?"production":"develop",...t.initOptions};s?.ignoreErrors&&(u.ignoreErrors=km(s.ignoreErrors)),s?.denyUrls&&(u.denyUrls=km(s.denyUrls)),s?.allowUrls&&(u.allowUrls=km(s.allowUrls)),u.release=`${n}@${e}`,$a.init(u),Bc()}catch{}}async function Bc(){try{let t=await Mt.get(Ft,null);if(!Ws||!t)return;$a.setUser({id:t.id,username:t.userName,nickname:t.nickName,email:t.email})}catch{}}function Lv(t,e){try{if(!Ws)return;$a.setContext(t,e)}catch{}}function _v(t){try{if(!Ws)return;$a.setTags(t)}catch{}}function km(t){return t.map(e=>new RegExp(e))}var fe=null,Ic={},To,Fv=!1;async function ov(){$i.clearStrictTicks();let t=await Ke(Ae(),{}),e=await Es();if(z.debug("init page ctx",t),Rv(t),t.rule.pageType=="subtitleBuilder"){wm();return}if(t.rule.pageType=="ebookBuilder"){hv();return}if(To||(To=t.state.translationTheme),t.rule.urlChangeDelay&&await Dr(t.rule.urlChangeDelay),t.rule.waitForSelectors&&t.rule.waitForSelectors.length>0&&await r8(t.rule.waitForSelectors,t.rule.waitForSelectorsTimeout),t.rule.isInjectOptionsUrl){let s=$l(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){z.warn("inject options url failed",l)}}if(t.rule.globalMeta&&Object.keys(t.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=t.rule.globalMeta[u],document.head.appendChild(l)}),t.rule.initialGlobalAttributes&&BT(document.body,t.rule.initialGlobalAttributes),t.rule.pageType=="pdfReader"){fn(t);return}if(t.config.arxivRule&&t.config.arxivRule.matches&&wt(t.url,t.config.arxivRule.matches)){let u=document.querySelector(t.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(t.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let m=new URL(t.url).pathname.split("/").pop(),f=!1,T=!0;if(m)try{let h=m.split(".")[0],C=h.slice(0,2),D=h.slice(2,4),M=new Date(`20${C}-${D}-27`),B=new Date(t.config.arxivRule.validBefore);M${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${kt(t,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(t.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!t.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!t.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}Fv||(Fv=!0,Je()&&t.rule.useIframePostMessage&&await aT());let n=t.sourceLanguage;n==="auto"?n=await Mv():Nn(n);let r=o1(t,n);if(r&&(t=await Ke(Ae(),{translationMode:r})),t.rule.isInjectMeta)try{let s=await n1(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=Wd(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){z.warn("inject meta failed",s)}let a=new URL(t.url),o=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||t.state.isAutoTranslate||t.isTranslateUrl||t.rule.pageType=="pdfReader";if(!o&&!t.isTranslateExcludeUrl&&(z.debug(`detect page language: ${t.url} ${n}`),ua(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto"||GT(n,t.config.translationLanguagePattern)&&(o=!0,z.debug(`match language pattern ${n}, auto translate`))),t.rule.pageType=="ebookBuilder"&&(o=!1),t.rule.pageType!=="pdfReader"&&Lo(e)&&yo(t,window),o)fe.state.isAutoTranslate=!0,fn(fe);else if(z.debug("do not auto translate",t),t.rule.initTranslationServiceAsSoonAsPossible&&t.translationService==="deepl"){if(ua(n,t.targetLanguage,{ignoreZhCNandZhTW:t.rule.ignoreZhCNandZhTW})||n==="auto")return;t.config&&t.config.translationServices&&t.config.translationServices.deepl&&t.config.translationServices.deepl.authKey&&typeof t.config.translationServices.deepl.authKey=="string"&&t.config.translationServices.deepl.authKey.startsWith("immersive_")&&(Ic[t.translationService]||(Ic[t.translationService]=!0,Je()||Lg(t).catch(s=>{z.warn("init translation engine error",s)})))}}async function Lm(t){if($e()==="Original"){let e={};To&&(e.translationTheme=To),fe&&(e={...fe.state,...e});let n=await Ke(Ae(),e);if(t?.trigger=="right_menu"&&Hr(n?.rule)){let r=ga(n.rule);Zi(!0,r||Ae());return}await fn(fe,t)}else($e()==="Translated"||$e()==="Error")&&oi()}async function Vk(){if(fe=await Ke(Ae(),{}),fe.rule.pageType=="ebookBuilder")return bv(fe);if(fe.rule.pageType=="subtitleBuilder")return fv(fe);zv()}async function _m(t){if($e()==="Original"){fe=await Ke(Ae(),{}),To||(To=fe.state.translationTheme);let e="mask";fe.state.translationTheme==="opacity"&&(e="opacity"),fe=await Ke(Ae(),{translationTheme:e}),await fn(fe,t)}else if($e()==="Translated"){let e="mask";fe?.state?.translationTheme==="opacity"&&(e="opacity");let n=e1().filter(i=>i.contentDocument?.body).map(i=>i.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let i of r){let o=Ki(i,yi,!0);a==="mask"||a==="opacity"?o!=="none"?ut(i,yi,"none",!0):ut(i,yi,e,!0):o!=="mask"&&o!=="opacity"?ut(i,yi,e,!0):ut(i,yi,"none",!0)}}}async function Mv(){let t=await Ke(Ae(),{});return t.rule.pageType=="subtitleBuilder"?wm():Ov(t)}function $k(t){$e()==="Original"?Pv(t):si()}function Yk(t){$e()==="Original"?mv(t):Dm()}function Qk(t){$e()==="Original"?bo(t):si()}async function oi(){Ji(""),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let t=await Ke(Ae(),{});if(t.rule.pageType=="subtitleBuilder"){Dm();return}else t.rule.pageType=="ebookBuilder"&&Tv();si()}async function fn(t,e){t.config?.sentryConfig?.contentInitTime=="translate_page"&&Mc(t.config?.sentryConfig);let n=$e(),r={pageStatus:n,translateService:t.state.translationService||t.translationService,translationMode:t.state.translationMode};Lv("translatePage",r),_v(r),n!=="Original"&&await oi(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:t.targetLanguage}})})),Ic[t.translationService]||(Ic[t.translationService]=!0,Je()||Lg(t).catch(i=>{z.warn("init translation engine error",i)}));let a={};if(e&&e.trigger&&(a.trigger=e.trigger),lt("translage_page_daily",[{name:"translage_page_daily",params:a}],t),lt("translate_page",[{name:"translate_page",params:a}],{...t,sourceLanguage:yt()}),t.rule.pageType=="subtitleBuilder"){Yk(t),Ji("yes");return}if(t.rule.pageType=="ebookBuilder"){yv(t),Ji("yes");return}if(t.rule.pageType==="pdfReader"){$k(t),Ji("yes");return}Qk(t),Ji("yes")}async function Zk(t,e){let n=fe?.translationService;if($e()==="Original"||n!=t){fe=await Ke(Ae(),{translationService:t});let r=kt(fe,"temprarilyChangeTranslationTo_"+t);Sc({text:r}),await fn(fe,e)}else{oi();let r=await qn(),a={url:Ae(),config:r,state:{}},i=await Un(a);fe=await Ke(Ae(),{translationService:i.translationService})}}async function Jk(t){$e()==="Original"?await Pm(t):($e()==="Translated"||$e()==="Error")&&(fe=await Ke(Ae(),{}),fe.state.translationArea!=="main"?await Pm(t):oi())}async function Pm(t){fe=await Ke(Ae(),{translationArea:"main"}),await fn(fe,t)}async function Bv(t){fe=await Ke(Ae(),{translationArea:"body"}),await fn(fe,t)}async function Fm(t){let e=await Ke(Ae(),{}),n=e.state.translationMode=="dual"?"translation":"dual";if(e=await Ke(Ae(),{translationMode:n}),$e()==="Original"){fn(e,t);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function xm(t){if(fe=await Ke(Ae(),{translationMode:t}),lt("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:t}}],{...fe,sourceLanguage:"unknown"}),$e()==="Original"){fn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(t)}async function Xk(t){if($e()==="Original")await Bv(t);else if($e()==="Translated"||$e()==="Error"){let e={};fe&&fe.state&&(e=fe.state),fe=await Ke(Ae(),e),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await Ke(Ae(),fe.state),await fn(fe,t)):oi()}}async function Iv(t){fe=await Ke(Ae(),{translationStartMode:"immediate"}),await fn(fe,t)}async function e8(t){$e()==="Original"?await Iv(t):($e()==="Translated"||$e()==="Error")&&oi()}function t8(){return fe}async function Ke(t,e){let n=Object.keys(e);if(fe){let r={url:t,config:fe.config,state:{...fe.state,...e}};fe=await Un(r)}else{let r=await qn(),a=e;n.length===0&&(a=void 0),fe=await Un({url:t,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function n8(){let t=await mn()||{},e=t.generalRule||{},n=e["subtitleRule.add"]||{},r=!n.preTranslation;await gn({...t,generalRule:{...e,"subtitleRule.add":{...n,preTranslation:r}}}),r?Sc({text:kt(fe,"videoSubtitlePreTranslationOn")}):Sc({text:kt(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function Tm(){let t=await qn(),e=await Es(),n;fe&&fe.state&&(n=fe.state);let r={url:Ae(),config:t,state:n},a=await Un(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,Mm(fe);let i=Ks(),o=[];return i?o=i.allInlineWindows||[window]:o=[window],o.forEach(s=>{rv(a,s),Lo(e)&&yo(a,s),xv(a)}),a}function r8(t,e=3e3){return new Promise((n,r)=>{let a=e?setTimeout(()=>{n(new Error("timeout"))},e):void 0,i=setInterval(()=>{t.every(s=>document.querySelector(s)!==null)&&(clearInterval(i),a&&clearTimeout(a),n(null))},50)})}async function sv(t){let e=t.detail,n=mn();await Fy(e.token,n,gn),Mt.set(Ft,e);let r=await Mt.get(Bd,!1);Mt.set(Bd,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),Bc()}function uv(t){z.debug("update user info",t);let e=t.detail;Mt.set(Ft,e),Bc()}async function lv(t){let e=await mn();if(e.translationService)return;let n=t.config.translationService,r=await Em(t,n);if(t.translationService!==r){if(!r){fs([{name:"no_avaliable_translation_service"}]);return}e.translationService=r,gn(e),t.translationService=r,fs([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function cv(t,e){let n=e.detail;if(t.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,i=await mn();i.translationService=r,a&&i?.translationServices?.[r]?.provider&&(i.translationServices[r].provider=a),i.translationServiceChangedbyUserAt=new Date().toISOString(),gn(i)}async function Em(t,e,n=!0){let r=t.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,i)=>a===e?n?-1:1:i===e?n?1:-1:0),await ET(r,t)}async function dv(t){let e=await mn();e.translationService=t,await gn(e);let n=await Ke(Ae(),{});n.translationService=t,await fn(n)}G1({detectCurrentPageLanguage:Mv,ensureSwitchTranslationMode:Fm,restorePage:oi,retryFailedParagraphs:Vk,switchTranslationMode:xm,toggleTranslatePage:Lm,toggleTranslateTheMainPage:Jk,toggleTranslateTheWholePage:Xk,toggleTranslationMask:_m,toggleVideoSubtitlePreTranslation:n8,translatePage:fn,translatePageWithTranslationService:Zk,translateTheMainPage:Pm,translateTheWholePage:Bv,translateToThePageEndImmediately:Iv,toggleTranslateToThePageEndImmediately:e8,updateGlobalContext:Tm,getPureGlobalContext:t8});d();d();function Rc({parent:t,ctx:e,Component:n,props:r={},style:a="",id:i,initialCSS:o=!0}){let s=i||Q+n.name;t.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,o&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&An(l,a),t.appendChild(u),$r(w(eo,{lang:e.config.interfaceLanguage,fallbackLang:"zh-CN",translations:Ot,children:w(n,{...r})}),l)}d();d();d();function vo(t){return ka(t).subtitles}function ka(t){let e=[],n=t.split(/\r?\n/),r={},a=-1;return n.forEach((i,o)=>{let s=i.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Gm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`${n}`,r},q8=t=>/]*>[\s\S]*]*>/.test(t),g9=Wt({name:p9,build:U8,detect:q8,helper:Gm,parse:N8});d();var j8="srt",Ys={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},H8=(t,e)=>{let n=[],r=e.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${e.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${Gm.htmlEncode(i.text||"")}${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${e.closeTags?"

":""}${n}`,e.closeTags&&(r+=`
${n}`);continue}e.verbose}}return r+=`${n}`,r+=`
${n}`,r},q8=t=>/]*>[\s\S]*]*>/.test(t),g9=Kt({name:p9,build:U8,detect:q8,helper:Gm,parse:N8});d();var j8="srt",Ys={toMilliseconds:t=>{let e=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=parseInt(e[1]),r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},H8=(t,e)=>{let n=[],r=e.eol||`\r `,a=t.split(/\r?\n\s*\n/g);for(let i=0;i\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[i]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Ys.toMilliseconds(s[2]),u.end=Ys.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}e.verbose}return n},W8=(t,e)=>{let n="",r=e.eol||`\r -`;for(let a=0;a ${Ys.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},K8=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),m9=Wt({name:j8,build:W8,detect:K8,helper:Ys,parse:H8});d();var G8="sub",Vm=25,V8=(t,e)=>{e.fps||=Vm;let n=e.fps>0?e.fps:Vm,r=[],a=e.eol||`\r +`;for(let a=0;a ${Ys.toTimeString(i.end)}${r}`,n+=i.text+r,n+=r;continue}e.verbose}return n},K8=t=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(t),m9=Kt({name:j8,build:W8,detect:K8,helper:Ys,parse:H8});d();var G8="sub",Vm=25,V8=(t,e)=>{e.fps||=Vm;let n=e.fps>0?e.fps:Vm,r=[],a=e.eol||`\r `,i=t.split(/\r?\n/g);for(let o=0;o{let n=(e.fps||0)>0?e.fps:Vm,r="",a=e.eol||`\r -`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Y8=t=>/^\{\d+\}\{\d+\}.*/.test(t),f9=Wt({name:G8,build:$8,detect:Y8,parse:V8});d();var Q8="vtt",Qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Z8=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Qs.toMilliseconds(s[2]),l.end=Qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},J8=(t,e)=>{let n=e.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},X8=t=>/^\s*WEBVTT\r?\n/.test(t),h9=Wt({name:Q8,build:J8,detect:X8,helper:Qs,parse:Z8});var e7={vtt:h9,lrc:c9,smi:g9,ssa:s9,ass:u9,sub:f9,srt:m9,sbv:d9,json:l9},b9=e7;var t7=t=>JSON.parse(JSON.stringify(t)),$m=class{format=b9;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` -`),pageLangs:[ft(),"en"]});if(ot(Te(o),this.ctx.targetLanguage))return null;je(this.ctx,Te(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),Zs.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};d();var rd=class extends He{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` -`),pageLangs:[ft(),"en"]});return ot(Te(o),this.ctx.targetLanguage)?null:(je(this.ctx,Te(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),Te(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var ad=class extends He{hasSubtitle=!1;async mutationVideoChange(){let e=n7(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(je(this.ctx,"ja","av"),this.hasSubtitle=!0,Gr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await de({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Zs.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){z.error("fetchSubtitle",n);return}}};function n7(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var r7={youtube:jc,netflix:Hc,webvtt:xo,khanacademy:Wc,bilibili:Kc,udemy:Gc,hulu:Xc,text_track:La,text_track_dynamic:Co,general:Vc,live:Eo,ebutt:Qc,disneyplus:Zc,"fmp4.xml":Jc,multi_attach_vtt:ed,twitter:td,subsrt:nd,xml:rd,av:ad},id;function Rv(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=r7[e.type];if(!n)return;id=new n(t)}catch(e){z.error(e)}}async function Ym(){id?.onPageStatusChange()}async function a7(t,e){if(id?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&Je())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),lt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function i7(){id?.onTranslationModeChanged()}$1({autoEnableSubtitleChanged:a7,reloadSubtitleWithTranslationModeChanged:i7});var pe=null;function Ks(){return pe||null}function bo(t){o7(t),g7(t),c7(t),p7(t),po(document,t),pn("Translated"),d7(pe),l7(pe),HT(si),s7(pe),Ym(),S7()}function o7(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=an(t);IT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}lo(t)&&ut(document.documentElement,me+"_rtl",t.targetLanguage)}function s7(t){WT(t)}function u7(){KT()}function l7(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=LT(t.ctx);if(z.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&ei(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{ei(i,t)})}async function c7(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Jt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Ht({...e,tempTranslationUrlMatches:[...i]})}}function d7(t){t.ctx.rule.isTranslateTitle&&(zg(t.ctx),t.titleDynamicObserver=RT(t.ctx))}function p7(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function Mm(t){if(!pe)return;let e=an(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function g7(t){let e=ps();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],Mm(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||y7(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||v7(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||h7(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||b7(pe),pe.injectCssToDocument=od,pe.walkContainer=Kr,pe.allInlineWindows=[window],window.onerror=f7(pe,t),window.immersiveTranslateSwitchTranslateState=Zm.bind(pe)}function x9(t,e){e.getRootNode()instanceof ShadowRoot?od(e.getRootNode(),t):od(e.ownerDocument,t),m7(t)}function m7(t){pe||(pe={},pe.ctx=t,pe.id=ps(),Qm(pe,t))}function Qm(t,e){t.paragraphQueue=[],t.injectCssToDocument=od;let n=an(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=Zm.bind(t),t}function si(t=!0){pe&&(pn("Original"),Ym(),u7(),Os(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),OT(pe.ctx),J3(),X3(),t&&Zm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function f7(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),si(),n=setTimeout(()=>{bo(e)},t.urlChangeDelay||2e3)),!0}}function h7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(jg(t,r.target),n.unobserve(r.target))})})}function b7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{Hg(t,o)}),n.unobserve(a)}})})}var y9;function T7(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(y9),t.translateState=="original"?!1:(si(t.urlChangeDelay>20),y9=setTimeout(()=>{let a=t.ctx;bo(a)},t.urlChangeDelay),!0)):!1}function y7(t){let e=t.ctx.rule,n=an(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&T7(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!xn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&xn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(wu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&v9(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&$g(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&v9(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=ji(n,i.parentElement);u&&(dt.clearToParentMark(i,u),S9(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Kt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+bt])?!1:i.contains(u)).length&&S9(t,a.target)}catch(i){z.error(i)}}})}function v9(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Kt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Vg(n),Kr({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{ti(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function S9(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;dt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{ei(e,t,n),i.timer=null},a)}function Vg(t){t.paragraphs=[],dt.clearMark(t),t.querySelectorAll("."+bt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,dt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function $g(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Kt(n,["."+bt]))).length==0}function v7(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Rg(i)||(n.unobserve(r.target),dt.clearMark(a),ei(a,t))}})}function Zm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Rs(e,t)}),t=="original"&&document.querySelectorAll(`.${bt}`).forEach(e=>e.remove())}function od(t,e){if(t instanceof HTMLIFrameElement){po(t.contentDocument,e);return}po(t,e)}async function Ov(t){let e=Je(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Cp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Wi(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ft(),"en"]}))}else if(e)n=await Ie({text:Wi(t.mainFrame).slice(0,1e3),pageLangs:[ft(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Cp(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await Z1();return n==="auto"&&(n=await jT()),S1(n),n}async function zv(){if(!pe)return;Os(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);i&&i.remove()}}yc.call(pe,pe.ctx)}async function Cm(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),lt("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:yt()});let r=pe?.ctx||e,a=await Jt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?i1():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{p+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let i=0;i=0?o.frame.start:o.start*n,u=typeof o.frame=="object"&&o.frame.end>=0?o.frame.end:o.end*n,l=o.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}e.verbose}return r},Y8=t=>/^\{\d+\}\{\d+\}.*/.test(t),f9=Kt({name:G8,build:$8,detect:Y8,parse:V8});d();var Q8="vtt",Qs={toMilliseconds:t=>{let e=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(t);if(!e)throw new Error(`Invalid time format: ${t}`);let n=e[1]?parseInt(e[1].replace(":","")):0,r=parseInt(e[2]),a=parseInt(e[3]),i=e[4]?parseInt(e[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+i},toTimeString:t=>{let e=Math.floor(t/1e3/3600),n=Math.floor(t/1e3/60%60),r=Math.floor(t/1e3%60),a=Math.floor(t%1e3);return`${(e<10?"0":"")+e}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},Z8=(t,e)=>{let n=1,r=[],a=t.split(/\r?\n\s*\n/);for(let i=0;i\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[i]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Qs.toMilliseconds(s[2]),l.end=Qs.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[i])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[i]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}e.verbose}return r},J8=(t,e)=>{let n=e.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Qs.toTimeString(i.end)}${n}`,r+=i.text+n,r+=n;continue}e.verbose}return r},X8=t=>/^\s*WEBVTT\r?\n/.test(t),h9=Kt({name:Q8,build:J8,detect:X8,helper:Qs,parse:Z8});var e7={vtt:h9,lrc:c9,smi:g9,ssa:s9,ass:u9,sub:f9,srt:m9,sbv:d9,json:l9},b9=e7;var t7=t=>JSON.parse(JSON.stringify(t)),$m=class{format=b9;list=()=>Object.keys(this.format);detect=e=>{let n=this.list();for(let r=0;r"u"||typeof i.detect!="function")continue;let o=i.detect(e);if(o===!0||o===a)return a}return""};parse=(e,n={})=>{let r=n.format||this.detect(e);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.parse;if(typeof i!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return i(e,n)};build=(e,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let i=a.build;if(typeof i!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return i(e,n)};convert=(e,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},i=this.parse(e,a);r.resync&&(i=this.resync(i,r.resync));let o={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(i,o)};resync=(e,n={})=>{let r,a,i=!1,o;if(typeof n=="function")r=n;else if(typeof n=="number")o=n,r=u=>[u[0]+o,u[1]+o];else if(typeof n=="object")o=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,i=n.frame||!1,r=u=>[Math.round(u[0]*a+o),Math.round(u[1]*a+o)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),o=await Ie({text:i.map(c=>c.text).join(` +`),pageLangs:[ft(),"en"]});if(et(be(o),this.ctx.targetLanguage))return null;qe(this.ctx,be(o));let s=i.map(c=>c.text),u=await this._translateSubtitle(s,o);return i.forEach((c,p)=>{c.text=u[p]}),Zs.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};d();var nd=class extends He{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(e,n){return this.loadSubtitle(e,n)}async loadSubtitle(e,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(e,n);if(!r)return null;let{doc:a,subtitles:i}=this.parseFromXml(r),o=await Ie({text:i.map(u=>u.textContent).join(` +`),pageLangs:[ft(),"en"]});return et(be(o),this.ctx.targetLanguage)?null:(qe(this.ctx,be(o)),(await this._translateSubtitle(i.map(u=>u.textContent||""),be(o))).forEach((u,l)=>{i[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return z.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(e,n){let r=await fetch(e,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(e){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(e,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var rd=class extends He{hasSubtitle=!1;async mutationVideoChange(){let e=n7(location.href,document,this.config.avSerial);if(!e)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let i=new URL(a.getAttribute("src")||"");i.searchParams.set("code",e),a.setAttribute("src",i.toString());return}let r=await this.fetchSubtitle(e);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,Gr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(e){try{let n=await de({url:`https://subhub.weixin.so/missav/${e}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Zs.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){z.error("fetchSubtitle",n);return}}};function n7(t,e,n){if(!n)return;let r;if(n.type==="url"&&(r=t),n.type=="selector"&&n.selector&&(r=e?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var r7={youtube:qc,netflix:jc,webvtt:Eo,khanacademy:Hc,bilibili:Wc,udemy:Kc,hulu:Jc,text_track:La,text_track_dynamic:wo,general:Gc,live:Co,ebutt:Yc,disneyplus:Qc,"fmp4.xml":Zc,multi_attach_vtt:Xc,twitter:ed,subsrt:td,xml:nd,av:rd},ad;function Rv(t){try{let e=t.rule.subtitleRule;if(e.disabled||!e.type)return;let n=r7[e.type];if(!n)return;ad=new n(t)}catch(e){z.error(e)}}async function Ym(){ad?.onPageStatusChange()}async function a7(t,e){if(ad?.autoEnableSubtitleChanged(),e&&e.trigger==="popup"&&Xe())return;let n={auto_enable_subtitles:t.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:t.rule.id||""};e&&e.trigger&&(n.trigger=e.trigger),lt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],t)}async function i7(){ad?.onTranslationModeChanged()}$1({autoEnableSubtitleChanged:a7,reloadSubtitleWithTranslationModeChanged:i7});var pe=null;function Gs(){return pe||null}function bo(t){o7(t),g7(t),c7(t),p7(t),po(document,t),pn("Translated"),d7(pe),l7(pe),HT(si),s7(pe),Ym(),S7()}function o7(t){if(t.state.translationArea==="main"&&t.rule.initialSelectorGlobalAttributes){let e=an(t);IT(document.body,t.rule.initialSelectorGlobalAttributes,t.rule.asideMaxTextCount,t.rule.asideMaxWordCount,t.rule.asideMaxTextCountPerParagraph,t.rule.asideMaxWordCountPerParagraph,e)}lo(t)&&ut(document.documentElement,me+"_rtl",t.targetLanguage)}function s7(t){WT(t)}function u7(){KT()}function l7(t){t.ctx.isMutationTranslationExcludeUrl||t.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:e,articleNode:n,bodyIsRoot:r}=LT(t.ctx);if(z.debug("bodyIsRoot",r,"bodyNode",e,"articleNode",n),t.ctx.bodyNode=e,t.ctx.articleNode=n,e&&ei(e,t),r)return;let a=[];t.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(t.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(i=>{ei(i,t)})}async function c7(t){if(!t.state.isAutoTranslate&&t.config.tempTranslateDomainMinutes>0){let e=await Jt(),n=Date.now(),a=new URL(t.url).hostname,i=e.tempTranslationUrlMatches||[],o=i.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;o>-1||(i.push({match:a,expiredAt:n+t.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Wt({...e,tempTranslationUrlMatches:[...i]})}}function d7(t){t.ctx.rule.isTranslateTitle&&(Og(t.ctx),t.titleDynamicObserver=RT(t.ctx))}function p7(t){if(t.rule.normalizeBody&&document.querySelector(t.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function Fm(t){if(!pe)return;let e=an(t);pe.rule={excludeSelectors:e.excludeSelectors||[],selectors:e.selectors||[]},pe.containerRule={pageHeight:screen.availHeight,selectors:e.selectors},pe.translationService=t.translationService,pe.urlChangeDelay=t.rule.urlChangeDelay,pe.immediateTranslateCapacity=t.state.immediateTranslationTextCount,pe.translateState=t.state.translationMode||t.config.translationMode||"dual"}function g7(t){let e=gs();pe&&(e=pe.id),pe=pe||{},pe.ctx=t,pe.id=e,pe.paragraphQueue=pe.paragraphQueue||[],Fm(t),pe.currentUrl=window.location.href,pe.paragraphEntities=pe.paragraphEntities||{},pe.autoIncreaseParagraphId=pe.autoIncreaseParagraphId||1,pe.interruptEffectDOM=!1,pe.observeContainers=pe.observeContainers||[],pe.observeParagraphs=pe.observeParagraphs||[],pe.dynamicContainerObserver=pe.dynamicContainerObserver||y7(pe),pe.ignoreResizeObserver=pe.ignoreResizeObserver||v7(pe),pe.containerVisibleObserver=pe.containerVisibleObserver||h7(pe),pe.paragraphVisibleObserver=pe.paragraphVisibleObserver||b7(pe),pe.injectCssToDocument=id,pe.walkContainer=Kr,pe.allInlineWindows=[window],window.onerror=f7(pe,t),window.immersiveTranslateSwitchTranslateState=Zm.bind(pe)}function x9(t,e){e.getRootNode()instanceof ShadowRoot?id(e.getRootNode(),t):id(e.ownerDocument,t),m7(t)}function m7(t){pe||(pe={},pe.ctx=t,pe.id=gs(),Qm(pe,t))}function Qm(t,e){t.paragraphQueue=[],t.injectCssToDocument=id;let n=an(e);return t.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},t.translationService=e.mouseHoverTranslationService,t.currentUrl=window.location.href,t.paragraphEntities={},t.autoIncreaseParagraphId=1,t.interruptEffectDOM=!1,t.urlChangeDelay=e.rule.urlChangeDelay,t.translateState=e.state.translationMode||e.config.translationMode||"dual",t.observeContainers=[],t.observeParagraphs=[],t.allInlineWindows=[window],window.switchTranslateState=Zm.bind(t),t}function si(t=!0){pe&&(pn("Original"),Ym(),u7(),zs(),pe.interruptEffectDOM=!0,pe.ignoreResizeObserver?.disconnect(),pe.dynamicContainerObserver?.disconnect(),pe.containerVisibleObserver?.disconnect(),pe.paragraphVisibleObserver?.disconnect(),pe.titleDynamicObserver?.disconnect(),OT(pe.ctx),J3(),X3(),t&&Zm.call(pe,"original"),Object.values(pe.paragraphEntities).forEach(e=>{e.commonAncestorContainer.paragraphs=null}),pe=null)}function f7(t,e){t.interruptEffectDOM=!1;let n;return function(r){let a=r.message,i=!1;return a?.indexOf("Minified React error")>=0&&(i=!0),i&&(clearTimeout(n),si(),n=setTimeout(()=>{bo(e)},t.urlChangeDelay||2e3)),!0}}function h7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{r.intersectionRatio>0&&(qg(t,r.target),n.unobserve(r.target))})})}function b7(t){return new IntersectionObserver((e,n)=>{t.interruptEffectDOM||e.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(o=>{jg(t,o)}),n.unobserve(a)}})})}var y9;function T7(t){if(t.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return t.currentUrl.split("#")[0]!=n?(clearTimeout(y9),t.translateState=="original"?!1:(si(t.urlChangeDelay>20),y9=setTimeout(()=>{let a=t.ctx;bo(a)},t.urlChangeDelay),!0)):!1}function y7(t){let e=t.ctx.rule,n=an(t.ctx);return new MutationObserver(r=>{if(!(e.mutationConfig.enableUrlChange&&T7(t))&&!t.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(e.mutationObserverLimitTargetSelectors.length>0&&!xn(a.target,e.mutationObserverLimitTargetSelectors)||e.mutationExcludeSelectors.length>0&&xn(a.target,e.mutationExcludeSelectors))continue;let i=a.target;if(a.type=="characterData"){let u=i.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(wu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&v9(t,n,u);continue}if(e.mutationConfig.checkSelfUpdate&&Vg(a))continue;if(i.recordLength){i.recordLength!==i.innerHTML.length&&v9(t,n,i);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,t.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!la(i,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(i))){let u=ji(n,i.parentElement);u&&(dt.clearToParentMark(i,u),S9(t,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Gt(u,[...t.ctx.rule.mutationExcludeSelectors,"."+bt])?!1:i.contains(u)).length&&S9(t,a.target)}catch(i){z.error(i)}}})}function v9(t,e,n){let r=t.ctx.rule;for(let o of r.mutationExcludeContainsSelectors)if(n.querySelector(o))return;if(Gt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,i=n;clearTimeout(i.timer),i.timer=setTimeout(()=>{Gg(n),Kr({id:t.id,container:n,filterRule:e,force:!0,onParagraph:o=>{ti(t,o,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),i.timer=null},a)}function S9(t,e,n=!0){let a=t.ctx.rule.mutationConfig.buildTimeout||100,i=e;dt.clearMark(i),clearTimeout(i.timer),i.timer=setTimeout(()=>{ei(e,t,n),i.timer=null},a)}function Gg(t){t.paragraphs=[],dt.clearMark(t),t.querySelectorAll("."+bt).forEach(e=>{e.remove()}),t.querySelectorAll("[data-immersive_translate_walked]").forEach(e=>{e.paragraphs=void 0,dt.clearMark(e)}),t.recordLength?t.recordLength=t.innerHTML.length:t.recordLength=void 0}function Vg(t){return[...t.addedNodes,...t.removedNodes].filter(n=>!(n.immersive||Gt(n,["."+bt]))).length==0}function v7(t){return new ResizeObserver((e,n)=>{if(!t.interruptEffectDOM)for(let r of e){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,i=globalThis.getComputedStyle(a);Ig(i)||(n.unobserve(r.target),dt.clearMark(a),ei(a,t))}})}function Zm(t){this.translateState=t,Object.values(this.paragraphEntities).forEach(e=>{Os(e,t)}),t=="original"&&document.querySelectorAll(`.${bt}`).forEach(e=>e.remove())}function id(t,e){if(t instanceof HTMLIFrameElement){po(t.contentDocument,e);return}po(t,e)}async function Ov(t){let e=Xe(),n="auto";if(ye()){let r="";t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"?(r=Ep(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})):(r=Wi(t.mainFrame).slice(0,1e3),n=await Ie({text:r,pageLangs:[ft(),"en"]}))}else if(e)n=await Ie({text:Wi(t.mainFrame).slice(0,1e3),pageLangs:[ft(),"en"]});else if(t.rule.pageType=="ebookReader"||t.rule.pageType=="ebookBuilder"){let r="";r=Ep(t.mainFrame),n=await Ie({text:r,pageLangs:["en"]})}else n=await Z1();return n==="auto"&&(n=await jT()),S1(n),n}async function zv(){if(!pe)return;zs(),document.dispatchEvent(new CustomEvent(_t,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=pe.paragraphEntities,e=Object.keys(t);for(let n of e){let r=t[n];if(r.error){pe.paragraphQueue.push(n);let i=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);i&&i.remove()}}yc.call(pe,pe.ctx)}async function Em(t,e){let n={};t&&t.detail?.trigger&&(n.trigger=t.detail.trigger),lt("share_to_draft",[{name:"share_to_draft",params:n}],{...e,sourceLanguage:yt()});let r=pe?.ctx||e,a=await Jt(),i=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(m=>{[...i?.querySelectorAll(m),...s?.querySelectorAll(m)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?i1():"",p="";globalThis.document.documentElement.getAttributeNames().forEach(m=>{p+=`${m}="${globalThis.document.documentElement.getAttribute(m)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(m=>{g+=`${m}="${globalThis.document.body.getAttribute(m)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${i.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Ht(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Qi(f)}catch(m){z.error(m)}}async function pv(){let t=await Jt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Mh,{detail:JSON.stringify(t.draft)}))}async function S7(){try{if(await Pl("reportActive"))return;z.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await Tp();await de({url:Oo+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),bs("reportActive","1")}catch(t){z.error(t)}}var x7=new AbortController,{signal:E7}=x7,sd=0,ud=0,wo=!1,ci,E9=0,_a=[];function yo(t,e){C7();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(z.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(z.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(_o,s),_a.push(()=>{document.removeEventListener(_o,s)});let u=Vn(g=>{if(!(Math.abs(g.clientX-sd)+Math.abs(g.clientY-ud)<=3)&&(sd=g.clientX,ud=g.clientY,o||wo&&!ci)){let m=A9(n.rule,e);if(m){if(tf(m))return;ef(n,!1,m)}}},o?700:300),l=g=>{let m=g.target;tf(m)||ef(n,!0)},c=g=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=yn.getPressedKeyCodes();if(f.length>1&&yn[m]&&(E9=Date.now(),wo=!1),f.length===1&&yn[m]){let T=Date.now();wo=!0,ci&&clearTimeout(ci),ci=setTimeout(()=>{let b=E9-T;b>0&&b<=i?wo=!1:l(g),ci=void 0},i)}};if(_a.push(()=>{ci&&clearTimeout(ci)}),a)return;Jm("mousemove",u,e),_a.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():wo=!1}if(Jm("blur",p,e),_a.push(()=>{e.removeEventListener("blur",p)}),!o){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=e4;Jm("keyup",C9,e),_a.push(()=>{e.removeEventListener("keyup",C9)}),m.includes(g)?yn("*","mouseHover",c):yn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),yn.setScope("mouseHover"),_a.push(()=>{yn.deleteScope("mouseHover")})}}function C7(){_a.forEach(t=>t()),_a=[],yn.setScope("all")}function C9(t){wo=!1}function Jm(t,e,n=window){return n.addEventListener(t,e,{signal:E7})}function ef(t,e,n,r=window){if(n=n||A9(t.rule,r),!n){z.debug("can not find selection part!");return}if(D7(n,e))return;if(tf(n)){z.debug("exclude dom");return}x9(t,n);let i=Ks();i&&(i.setupMouseHoverListener=yo);let o=an(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=Qm({...i},t);Kr({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{ti(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Ze(Ih,p),lt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function A9(t,e){return w7(sd,ud,t,e)}function w7(t,e,n,r){let a=b1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=T1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:D9(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){z.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{k7(r)}),!0}function A7(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function k7(t){let e=Ks();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Rs(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function Xm(t){return!!(t.host&&t.mode)}function w9(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||Xm(n))return t;for(;n&&n.nodeName!=="BODY"&&!Xm(n)&&xp(n,e);){let r=n.parentNode;if(r&&Xm(r))break;n=r}return n}function D9(t,e){return t.nodeType===Node.TEXT_NODE||xp(t,e)?w9(t,e):t}function k9(t,e){sd=e.clientX,ud=e.clientY,ef(t,!0)}var Js=[];function nf(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Js.push(()=>{document.removeEventListener("click",i)})}function P9(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Js.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function ld(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Js.push(()=>{document.removeEventListener("touchstart",r)})}var rf={touchShortcutsOff:()=>{},"multipleClick.2":nf,"multipleClick.3":nf,"multipleClick.4":nf,"slide.left":P9,"slide.right":P9,"fingers.2":ld,"fingers.3":ld,"fingers.4":ld,"fingers.5":ld};async function gv(t){try{B7();let e=await qr(),n=Jh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=P7(t,e,r.command),i=rf[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{M7(r.command,t,u)})})}catch(e){z.error(e)}}function P7(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var L7=()=>{Lm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},_7=()=>{Fm();let t=new CustomEvent(wr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},F7=()=>{_m();let t=new CustomEvent(wr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},L9=0,M7=(t,e,n)=>{new Date().getTime()-L9<200||(L9=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?L7():t==="touchShortcutsToggleTranslationMask"?F7():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?_7():t==="touchShortcutsToggleTranslateTouchElement"&&k9(e,n))};function B7(){Js.forEach(t=>{t()}),Js=[]}function _9(t){let{t:e}=xe(),{ctx:n,setSettings:r}=t,a=I7(t);return Lo(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Ro[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(R7,{...t})}function I7({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=xe(),a=Ne(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ne(()=>Ro.filter(s=>!(s==="Off"||Ro.includes(a)&&s==="OtherCustom")),[t,a]);return Ne(()=>i.map(s=>{let u=r("mouseHoldKey",{key:tc(s)}),l=Ro.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(g=>{let m={...g.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=p.value),{...g,generalRule:m}})}}}),[i,a])}function R7(t){let{ctx:e,setSettings:n}=t,{t:r}=xe(),a=e.config.generalRule,i=Object.keys(rf).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(g=>{let m={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=p.value),{...g,generalRule:m}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let g=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function F9(t){let{isAlwaysTranslateLang:e}=O7({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=xe();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:fa(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:bl(t.currentLang,u.matches),excludeMatches:bl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=hl(t.currentLang,u[i]),u[o]=bl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function O7({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var M9=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),B9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),I9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),R9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),O9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),z9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),N9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function q9({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=xe(),a=Me(),i=Math.round((Ni.supportedVideoSubtitleSites||[]).length/10),o=Ne(()=>[{title:r("widget.translateFile"),icon:M9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:B9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:I9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(u4)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(Ca,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(U9,{...s})}):w(U9,{...s}))})}function U9(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function js(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=re(""),[l,c]=re(i),[p,g]=re(null),[m,f]=re(null);Ce(()=>{Mt.get(Ft,null).then(C=>{C?(g(C),f(Zt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let T=!0,b=it();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=ml(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(b2,{isLogin:!!p,isProUser:!!m,config:n}),w(H7,{openSharePage:r})]}),w(CT,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(wT,{isProUser:!!m,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(N7,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(q7,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(qp,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(kT,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(_9,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(F9,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(z7,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(q9,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(U7,{...t,isProUser:!!m,isShowPricing:T,setMessage:u})]})}function z7(t){let{t:e}=xe(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ne(()=>!n.rule.subtitleRule.disabled&&Md.includes(n.rule.subtitleRule.type||""),[n,Md])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function N7(t){let{t:e}=xe(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(Ca,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?O9:z9})})}function U7(t){let{t:e,lang:n}=xe(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[R9,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(j7,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(Up,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(vi),t.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?t.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?t.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):m.value==="options"?(t.openOptionsPage(),t.onClose()):m.value==="changeToTranslateTheWholePage"?p():m.value==="changeToTranslateTheMainPage"?g():m.value==="about"?t.openAboutPage():m.value==="toggleEnabled"?t.onToggleEnabled():m.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&t.onOpenUrl(vi,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),t.openOptionsPage()}function c(m){t.setSettings(f=>({...f,translationMode:m})),t.onSwitchTranslationMode(m)}function p(){t.setSettings(m=>({...m,translationArea:"body"})),t.onTranslateTheWholePage()}function g(){t.setSettings(m=>({...m,translationArea:"main"})),t.onTranslateTheMainPage()}}function q7({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=xe(),l=r.config,c=Ne(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Hr(r?.rule)&&!p&&(p=!0);let g=s("translate");e==="Translated"||e==="Error"?g=s("show-original"):e==="Original"?p?Wn()&&c.protocol==="file:"||o?g=s("translate-firefox-local-pdf"):ye()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(e);let m=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Tu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${tc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:g})}function j7({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=xe(),o=Sn();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:c2(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function H7(t){let{t:e}=xe();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),N9]})}function of(){let[t,e]=re("Original"),n=qe(""),{t:r}=xe(),[a,i,o,s]=rr(()=>{setTimeout(()=>{yr("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(null),[g,m]=re(null),[f,T]=re("auto"),[b,h]=re(null),C=qe(!1),D=qe(),[M,B]=re({}),[{errorMsg:S,disableButton:y,noPermissionPDF:_},k]=re({errorMsg:"",disableButton:!1,noPermissionPDF:!1});if(Ce(()=>{et().any&&B({width:"100%"}),Mc()},[]),Ce(()=>{Xt().then(A=>l(A))},[a]),Ce(()=>{if(!(!c||!u)){if(C.current&&D.current){D.current.getAsyncContextString().then(A=>{if(A){let E=JSON.parse(A);h(E)}});return}Un({url:c,config:u}).then(A=>{C.current||h(A)})}},[c,u,C,D]),Ce(()=>(v(),()=>{globalThis.document.removeEventListener(Mo,L)}),[]),!u||!b)return null;return w(qs,{children:w(js,{type:"popup",style:M,onClose:H9,onToggleTranslate:yr("toggleTranslatePage"),onToggleEnabled:N,openOptionsPage:Q7,openAboutPage:Y7,openSharePage:V7,onTranslatePdf:()=>{U(n.current||c||"")},onTranslateTheMainPage:yr("translateTheMainPage"),onTranslateTheWholePage:yr("translateTheWholePage"),onTranslateToThePageEndImmediately:yr("translateToThePageEndImmediately"),onSwitchTranslationMode:A=>{yr("switchTranslationMode",!0,{mode:A})()},onTranslatePage:yr("translatePage"),onRestorePage:yr("restorePage",!1),onSetPageLanguage:q,setSettings:i,config:u,pageStatus:t,ctx:b,currentUrl:c,currentLang:f,onSetLocalConfig:Ht,onSetBuildinConfig:kl,request:Ur,errorMsg:S,disabledButton:y,noPermissionPDF:_,onAutoEnableSubtitleChanged:yr("autoEnableSubtitleChanged"),onOpenUrl:$7})});async function v(){let A=Cs(),E=await oe.tabs.query({currentWindow:!0,active:!0}),P=E[0].id;m(P);let O=j9(P,A);D.current=O;let H=E[0].url;if(I(P),globalThis.document.addEventListener(Mo,L),!H){p("about:newtab");return}p(H),Zl(H)?(F(O,P,H),W9(P,async()=>{let j=await O.getContextString(),W=await O.getPageStatus(),V=await Xt(),se=await O.getCurrentPageLanguage();if(e(W),l(V),T(se),j){let X=JSON.parse(j);if(X){if(h(X),C.current=!0,Hr(X.rule)){let Z=await O.getPdfWebUrl();n.current=Z}}else z.error("contextStr is empty",j)}se==="auto"&&setTimeout(async()=>{let X=await O.getCurrentPageLanguage();T(X)},500)})):Bp(H||"")?K7(H||"")&&W7(H||"").then(j=>{j||k({disableButton:!1,noPermissionPDF:!0,errorMsg:r("noLocalFilePermissionForPDF")})}):k({disableButton:!0,errorMsg:r("noPermissionForThisPage"),noPermissionPDF:!1})}function I(A){oe.tabs.onUpdated.addListener((E,P,O)=>{A===E&&O.url&&p(O.url)})}function F(A,E,P){A.ping().then(O=>{k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E)}).catch(O=>{s2(P)||k({disableButton:!0,errorMsg:r("reloadCurrentPage"),noPermissionPDF:!1}),z.debug("ping failed, but it is ok. cause maybe content is not injected",O)})}function L(A){let{tabId:E,payload:P}=A.detail,{method:O,data:H}=P;z.debug("popup received message",O,H||" "),O==="setPageStatus"?E&&e(H):O==="ready"&&E&&(k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E))}function U(A){A&&(oe.tabs.create({url:d4(A)}),globalThis.close())}function N(){i(A=>({...A,enabled:!A.enabled})),setTimeout(()=>{H9()},50)}function q(A){let E=Cs();if(T(A),g&&c){let P=pu(c,A,u.sourceLanguageUrlPattern);i(O=>({...O,sourceLanguageUrlPattern:P})),W9(g,()=>{j9(g,E).setCurrentPageLanguageByClient(A)})}}}function yr(t,e=!0,n={}){return async()=>{let r=Cs(),i=(await oe.tabs.query({currentWindow:!0,active:!0}))[0].id,o={trigger:"popup",...n};r.sendMessage(`content_script:main:${i}`,{method:t,data:o}),e&&setTimeout(()=>{globalThis.close()},10)}}async function W7(t){try{let e=new URL(t),n=await fetch(e.href);return!0}catch{return!1}}function K7(t){try{return new URL(t).protocol==="file:"}catch{return!1}}var G7={setCurrentPageLanguageByClient:t=>Promise.resolve(),ping:t=>Promise.resolve(),getPageStatus:t=>Promise.resolve(),getCurrentPageLanguage:t=>Promise.resolve(),getContextString:t=>Promise.resolve(),getAsyncContextString:t=>Promise.resolve(),getPdfWebUrl:()=>Promise.resolve("")};function j9(t,e){function n(a,i){let o=`content_script:main_sync:${t}`;return a.includes("Async")&&(o=`content_script:main:${t}`),e.sendMessage(o,{method:a,data:i})}let r={...G7};return Object.keys(r).forEach(a=>{r[a]=n.bind(null,a)}),r}var V7=()=>{yr("shareToDraft")()};function $7(t,e){let n=t;e&&(n=`${t}?utm_source=extension&utm_medium=extension&utm_campaign=${e}`),oe.tabs.create({url:n}),setTimeout(()=>{globalThis.close()},50)}function Y7(){oe.tabs.create({url:oe.runtime.getURL("options.html#about")}),setTimeout(()=>{globalThis.close()},50)}function H9(){globalThis.close()}function Q7(t=""){let e=oe.runtime.getURL("options.html");oe.tabs.create({url:e+t}),setTimeout(()=>{globalThis.close()},50)}var di={},af={};function W9(t,e){if(af[t])try{e()}catch(n){z.error("run callback failed",n)}else di[t]||(di[t]=[]),di[t].push(e)}function K9(t){if(di[t]&&di[t].length){let e=[...di[t]];di[t]=[],e.forEach(n=>n())}}var G9=document.getElementById("mount");l2();G9&&(async()=>{let t=await Xt();t.debug&&z.setLevel("debug"),$r(w(eo,{lang:t.interfaceLanguage,translations:rc,fallbackLang:"en",children:w(of,{})}),G9)})();})(); + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Wt(a);let f=Me().SHARE_DRAFT_URL,T=r.rule;if(T.shareConfig?.sharePath){let b=new URL(f);b.pathname=T.shareConfig.sharePath,f=b.toString()}Qi(f)}catch(m){z.error(m)}}async function pv(){let t=await Jt();t.draft&&globalThis.document.dispatchEvent(new CustomEvent(Mh,{detail:JSON.stringify(t.draft)}))}async function S7(){try{if(await Pl("reportActive"))return;z.debug("\u672A\u6FC0\u6D3B\u8FC7");let e=await bp();await de({url:zo+"/v1/user/campaign-info-translated/"+e,method:"POST",headers:{"content-type":"application/json"}}),Ts("reportActive","1")}catch(t){z.error(t)}}var x7=new AbortController,{signal:E7}=x7,od=0,sd=0,Do=!1,ci,E9=0,_a=[];function yo(t,e){C7();let n=t,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",i=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let o=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){o=!o,o?(z.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,yo(n,e)):(z.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,yo(n,e))}document.addEventListener(Fo,s),_a.push(()=>{document.removeEventListener(Fo,s)});let u=Vn(g=>{if(!(Math.abs(g.clientX-od)+Math.abs(g.clientY-sd)<=3)&&(od=g.clientX,sd=g.clientY,o||Do&&!ci)){let m=A9(n.rule,e);if(m){if(tf(m))return;ef(n,!1,m)}}},o?700:300),l=g=>{let m=g.target;tf(m)||ef(n,!0)},c=g=>{let m=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=yn.getPressedKeyCodes();if(f.length>1&&yn[m]&&(E9=Date.now(),Do=!1),f.length===1&&yn[m]){let T=Date.now();Do=!0,ci&&clearTimeout(ci),ci=setTimeout(()=>{let b=E9-T;b>0&&b<=i?Do=!1:l(g),ci=void 0},i)}};if(_a.push(()=>{ci&&clearTimeout(ci)}),a)return;Jm("mousemove",u,e),_a.push(()=>{e.removeEventListener("mousemove",u)});function p(){o?u.cancel():Do=!1}if(Jm("blur",p,e),_a.push(()=>{e.removeEventListener("blur",p)}),!o){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",m=e4;Jm("keyup",C9,e),_a.push(()=>{e.removeEventListener("keyup",C9)}),m.includes(g)?yn("*","mouseHover",c):yn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),yn.setScope("mouseHover"),_a.push(()=>{yn.deleteScope("mouseHover")})}}function C7(){_a.forEach(t=>t()),_a=[],yn.setScope("all")}function C9(t){Do=!1}function Jm(t,e,n=window){return n.addEventListener(t,e,{signal:E7})}function ef(t,e,n,r=window){if(n=n||A9(t.rule,r),!n){z.debug("can not find selection part!");return}if(D7(n,e))return;if(tf(n)){z.debug("exclude dom");return}x9(t,n);let i=Gs();i&&(i.setupMouseHoverListener=yo);let o=an(t);o.excludeSelectors=[],o.selectors=[];let s=!1,u=Qm({...i},t);Kr({id:i.id,container:n,filterRule:o,force:!0,onParagraph:l=>{ti(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let p=Date.now();Je(Ih,p),lt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...t,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function A9(t,e){return w7(od,sd,t,e)}function w7(t,e,n,r){let a=b1(t,e,n,r);if(a==null)return;let i=()=>{let u=r.document.elementFromPoint(t,e);if(!u)return;let l=T1(u,t,e);return l===u?u.nodeName==="BUTTON"?u:void 0:D9(l,n)},o=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){z.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>t||u.righte||u.bottom{k7(r)}),!0}function A7(t){let e=[t];if(t.nodeName=="FONT"&&t.classList.contains("immersive-translate-target-wrapper"))e=[t.parentElement];else{let r=[...t.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(e=r)}return e.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function k7(t){let e=Gs();e&&(!t.paragraphs||!t.paragraphs.length||(t.paragraphs.forEach(n=>{Os(n,n.state==="original"?e.translateState:"original")}),t.paragraphs=[]))}function Xm(t){return!!(t.host&&t.mode)}function w9(t,e){let n=t.parentNode;if(n.nodeName==="BODY"||Xm(n))return t;for(;n&&n.nodeName!=="BODY"&&!Xm(n)&&Sp(n,e);){let r=n.parentNode;if(r&&Xm(r))break;n=r}return n}function D9(t,e){return t.nodeType===Node.TEXT_NODE||Sp(t,e)?w9(t,e):t}function k9(t,e){od=e.clientX,sd=e.clientY,ef(t,!0)}var Js=[];function nf(t,e){let n=0,r=0,a,i=s=>{let u=new Date().getTime();r++,u-n<300?o(s):r=1,n=u},o=s=>{clearTimeout(a),r===parseInt(t+"")&&(a=setTimeout(()=>{r=0,e(s)},400))};document.addEventListener("click",i),Js.push(()=>{document.removeEventListener("click",i)})}function P9(t,e){let n=0,r=0,a=0,i=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},o=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(t==="left"&&u.clientX-r>50&&e(s.changedTouches[0]),t==="right"&&u.clientX-r<-50&&e(s.changedTouches[0]))};document.addEventListener("touchstart",i),document.addEventListener("touchend",o),Js.push(()=>{document.removeEventListener("touchstart",i),document.removeEventListener("touchend",o)})}function ud(t,e){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(t+"")&&(n=setTimeout(()=>{e(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Js.push(()=>{document.removeEventListener("touchstart",r)})}var rf={touchShortcutsOff:()=>{},"multipleClick.2":nf,"multipleClick.3":nf,"multipleClick.4":nf,"slide.left":P9,"slide.right":P9,"fingers.2":ud,"fingers.3":ud,"fingers.4":ud,"fingers.5":ud};async function gv(t){try{B7();let e=await qr(),n=Jh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=P7(t,e,r.command),i=rf[a];if(a==="touchShortcutsOff"||!i)return;let o=a.split(".");if(o.length!==2)return;let s=o[1];s&&i(s,u=>{M7(r.command,t,u)})})}catch(e){z.error(e)}}function P7(t,e,n){if(!e.generalRule)return t.config.generalRule[n];if(e.generalRule[n])return e.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&e.generalRule[r[n]]?`fingers.${e.generalRule[r[n]]}`:t.config.generalRule[n]||""}var L7=()=>{Pm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(t)},_7=()=>{_m();let t=new CustomEvent(wr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(t)},F7=()=>{Lm();let t=new CustomEvent(wr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(t)},L9=0,M7=(t,e,n)=>{new Date().getTime()-L9<200||(L9=new Date().getTime(),t==="touchShortcutsToggleTranslatePage"?L7():t==="touchShortcutsToggleTranslationMask"?F7():t==="touchShortcutsToggleTranslatePageOnlyTranslation"?_7():t==="touchShortcutsToggleTranslateTouchElement"&&k9(e,n))};function B7(){Js.forEach(t=>{t()}),Js=[]}function _9(t){let{t:e}=xe(),{ctx:n,setSettings:r}=t,a=I7(t);return _o(n.localConfig)?a.length?w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[e("mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:i=>{let o=i.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Oo[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:o?u:"Off"}}})}})]}):null:w(R7,{...t})}function I7({ctx:t,openOptionsPage:e,setSettings:n}){let{t:r}=xe(),a=Ne(()=>{let s=t.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[t]),i=Ne(()=>Oo.filter(s=>!(s==="Off"||Oo.includes(a)&&s==="OtherCustom")),[t,a]);return Ne(()=>i.map(s=>{let u=r("mouseHoldKey",{key:tc(s)}),l=Oo.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:p=>{p.value==="Other"?e("#shortcuts"):n(g=>{let m={...g.generalRule,mouseHoverPreferenceKey:p.value};return t.config.generalRule.mouseHoverHoldKey!=="Off"&&(m.mouseHoverHoldKey=p.value),{...g,generalRule:m}})}}}),[i,a])}function R7(t){let{ctx:e,setSettings:n}=t,{t:r}=xe(),a=e.config.generalRule,i=Object.keys(rf).filter(l=>l!="touchShortcutsOff"),o=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return o!=="touchShortcutsOff"&&o!==s&&(u=o),w("div",{class:"flex mt-3 items-center justify-between",children:[w("div",{class:"flex items-center",children:[w("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),w(va,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:i.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(p){n(g=>{let m={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:p.value};return e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(m.touchShortcutsToggleTranslateTouchElement=p.value),{...g,generalRule:m}})}}))})]}),w("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:e.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(p=>{let g=p.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||e.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...p,generalRule:{...p.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function F9(t){let{isAlwaysTranslateLang:e}=O7({ctx:t.ctx,currentLang:t.currentLang}),{t:n}=xe();if(t.currentLang!=="auto")return w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:fa(t.currentLang,t.ctx.config.interfaceLanguage,!1,!0)})}),w("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!e,onChange:a=>{let i=a.target.checked;r(i?"matches":void 0)}})]});return w("span",{});function r(a){if(!a){t.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:bl(t.currentLang,u.matches),excludeMatches:bl(t.currentLang,u.excludeMatches)}}});return}let i=a,o=i==="matches"?"excludeMatches":"matches";t.currentLang&&t.setSettings(s=>{let u={...s.translationLanguagePattern};return u[i]=hl(t.currentLang,u[i]),u[o]=bl(t.currentLang,u[o]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),i==="matches"&&t.pageStatus==="Original"&&setTimeout(()=>{t.onTranslatePage(),t.onClose()},100)}}function O7({ctx:t,currentLang:e}){let n=null;if(e&&e!=="auto"){let{translationLanguagePattern:r}=t.config,{matches:a}=r;a.includes(e)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var M9=w("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),w("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),w("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),B9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),I9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),R9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),O9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),w("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),w("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),z9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),w("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),N9=w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:w("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function q9({onOpenUrl:t,openOptionsPage:e,type:n}){let{t:r}=xe(),a=Me(),i=Math.round((Ni.supportedVideoSubtitleSites||[]).length/10),o=Ne(()=>[{title:r("widget.translateFile"),icon:M9,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{t(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:B9,tooltipText:r("widget.videoSubtitleTooltip",{count:i*10}),tooltipStyle:{fontSize:13},onClick:()=>{e("#subtitle")}},{title:r("widget.instruction"),icon:I9,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{t(u4)}}],[a,t,e,r]);return w("div",{class:"widgets-container mt-5",children:o.map(s=>s.tooltipText?w(Ca,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:w(U9,{...s})}):w(U9,{...s}))})}function U9(t){return w("div",{class:"widget-item",onClick:t.onClick,children:[t.icon,w("span",{class:"ml-1 text-gray-6",children:t.title})]})}function Hs(t){let{setSettings:e,config:n,openSharePage:r,ctx:a,errorMsg:i,onAutoEnableSubtitleChanged:o}=t,[s,u]=re(""),[l,c]=re(i),[p,g]=re(null),[m,f]=re(null);Ce(()=>{Mt.get(Ft,null).then(C=>{C?(g(C),f(Zt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let T=!0,b=ot();n&&b&&(T=n.generalRule.showSponsorOnSafari);let h=ml(n);return w("div",{class:`popup-container ${t.className||""}`,style:t.style,children:[w("div",{class:"popup-content text-sm",children:[h?w("div",{style:{marginTop:-12}}):w("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[w(b2,{isLogin:!!p,isProUser:!!m,config:n}),w(H7,{openSharePage:r})]}),w(CT,{ctx:t.ctx,setSettings:t.setSettings,onSetPageLanguage:t.onSetPageLanguage,currentLang:t.currentLang}),w(wT,{isProUser:!!m,ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,openOptionsPage:t.openOptionsPage}),w("div",{class:"flex flex-row mt-3 items-center",children:[w(N7,{ctx:a,onSwitchTranslationMode:t.onSwitchTranslationMode}),w(q7,{ctx:t.ctx,pageStatus:t.pageStatus,currentUrl:t.currentUrl,onTranslatePdf:t.onTranslatePdf,onToggleTranslate:t.onToggleTranslate,disabledButton:t.disabledButton,noPermissionPDF:t.noPermissionPDF})]}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),w("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),w(Up,{isShowError:!1,request:t.request,setStorageBuildinConfig:t.onSetBuildinConfig}),w("div",{class:"text-sm px-1 text-gray-2",children:[w(kT,{ctx:t.ctx,setSettings:t.setSettings,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onRestorePage:t.onRestorePage,currentUrl:t.currentUrl,currentLang:t.currentLang,onClose:t.onClose,onSetLocalConfig:t.onSetLocalConfig}),w(_9,{ctx:t.ctx,openOptionsPage:t.openOptionsPage,setSettings:t.setSettings}),w(F9,{ctx:a,currentLang:t.currentLang,pageStatus:t.pageStatus,onTranslatePage:t.onTranslatePage,onClose:t.onClose,setSettings:t.setSettings}),w(z7,{onAutoEnableSubtitleChanged:o,ctx:a,setSettings:e})]}),w(q9,{type:t.type,onOpenUrl:t.onOpenUrl,openOptionsPage:t.openOptionsPage})]}),w(U7,{...t,isProUser:!!m,isShowPricing:T,setMessage:u})]})}function z7(t){let{t:e}=xe(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=t;return Ne(()=>!n.rule.subtitleRule.disabled&&Fd.includes(n.rule.subtitleRule.type||""),[n,Fd])?w("div",{class:"flex justify-between mt-3 items-center",children:[w("label",{class:"mb-0",children:e("autoEnableSubtitle")}),w("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:o=>{let s=o.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function N7(t){let{t:e}=xe(),n=t.ctx.state.translationMode,r=()=>{let i=n==="dual"?"translation":"dual";t.onSwitchTranslationMode(i)},a=e(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return w(Ca,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:w("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?O9:z9})})}function U7(t){let{t:e,lang:n}=xe(),{isProUser:r,isShowPricing:a}=t,{config:i}=t.ctx,o=60;n.startsWith("zh")||(o=70);let s=Me(),u=`${t.type}_more`;return w("footer",{children:w("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[w("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[R9,w("span",{class:"ml-1 text-gray-6",children:e("options")})]}),w(j7,{ctx:t.ctx,onToggleEnabled:t.onToggleEnabled,setSettings:t.setSettings,setMessage:t.setMessage}),w(Np,{label:e("more"),showArrow:!0,maxWidth:o,className:"text-gray-6 transform-padding-left more",onSelected:m=>{m.value==="openPremium"?(globalThis.open(vi),t.onClose()):m.value==="changeToOnlyTranslationMode"?c("translation"):m.value==="changeToDualTranslationMode"?c("dual"):m.value==="translateTheWholePage"?t.onTranslateTheWholePage():m.value==="translateToThePageEndImmediately"?t.onTranslateToThePageEndImmediately():m.value==="translateTheMainPage"?t.onTranslateTheMainPage():m.value==="translateLocalPdfFile"?t.onOpenUrl(s.PDF_VIEWER_URL,u):m.value==="pdfProFile"?t.onOpenUrl(s.PDF_PRO_URL,u):m.value==="translateText"?t.onOpenUrl(s.TEXT_TRANSLATE_URL,u):m.value==="translateLocalHtmlFile"?t.onOpenUrl(s.HTML_VIEWER_URL,u):m.value==="translateLocalSubtitleFile"?t.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):m.value==="donate"?(globalThis.open(i.donateUrl),t.onClose()):m.value==="feedback"?(globalThis.open(i.feedbackUrl),t.onClose()):m.value==="options"?(t.openOptionsPage(),t.onClose()):m.value==="changeToTranslateTheWholePage"?p():m.value==="changeToTranslateTheMainPage"?g():m.value==="about"?t.openAboutPage():m.value==="toggleEnabled"?t.onToggleEnabled():m.value==="openEbookViewer"?t.onOpenUrl(s.EBOOK_VIEWER_URL,u):m.value==="openEbookBuilder"?t.onOpenUrl(s.EBOOK_BUILDER_URL,u):m.value==="goPro"&&t.onOpenUrl(vi,u)},menus:[i.translationMode==="dual"&&{label:"\u{1F524} "+e("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},i.translationMode==="translation"&&{label:"\u{1F521} "+e("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},i.translationArea==="main"&&{label:"\u{1F480} "+e("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},i.translationArea==="body"&&{label:"\u{1F4D6} "+e("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+e("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+e("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+e("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+e("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+e("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+e("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+e("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+e("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+e("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+e(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(m){m.preventDefault(),t.openOptionsPage()}function c(m){t.setSettings(f=>({...f,translationMode:m})),t.onSwitchTranslationMode(m)}function p(){t.setSettings(m=>({...m,translationArea:"body"})),t.onTranslateTheWholePage()}function g(){t.setSettings(m=>({...m,translationArea:"main"})),t.onTranslateTheMainPage()}}function q7({currentUrl:t,pageStatus:e,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:i,noPermissionPDF:o}){let{t:s,lang:u}=xe(),l=r.config,c=Ne(()=>new URL(t||""),[t]),p=c?.pathname.toLowerCase().endsWith(".pdf");Hr(r?.rule)&&!p&&(p=!0);let g=s("translate");e==="Translated"||e==="Error"?g=s("show-original"):e==="Original"?p?Wn()&&c.protocol==="file:"||o?g=s("translate-firefox-local-pdf"):ye()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(e);let m=s("translateToThePageEndImmediately");return(e==="Original"||e==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Tu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${tc(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(m+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),w("button",{class:"mb-0 main-button",onClick:()=>{p?n&&n():a()},"aria-busy":e==="Translating",disabled:i||e==="Translating",children:g})}function j7({ctx:t,onToggleEnabled:e,setSettings:n,setMessage:r}){let{t:a,lang:i}=xe(),o=Sn();return w("div",{class:"flex",children:w("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:c2(7)(s),children:["V",o,t.config.enabled?null:w("a",{href:"#",onClick:e,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function H7(t){let{t:e}=xe();return w("div",{class:"share-button-container",onClick:t.openSharePage,children:[w("span",{class:"text-gray-9",children:e("buildSnapshots")}),N9]})}function of(){let[t,e]=re("Original"),n=je(""),{t:r}=xe(),[a,i,o,s]=rr(()=>{setTimeout(()=>{yr("updateGlobalContext",!1)()},250)});fo(a,i);let[u,l]=re(null),[c,p]=re(null),[g,m]=re(null),[f,T]=re("auto"),[b,h]=re(null),C=je(!1),D=je(),[M,B]=re({}),[{errorMsg:S,disableButton:y,noPermissionPDF:_},k]=re({errorMsg:"",disableButton:!1,noPermissionPDF:!1});if(Ce(()=>{tt().any&&B({width:"100%"}),Mc()},[]),Ce(()=>{Xt().then(A=>l(A))},[a]),Ce(()=>{if(!(!c||!u)){if(C.current&&D.current){D.current.getAsyncContextString().then(A=>{if(A){let E=JSON.parse(A);h(E)}});return}Un({url:c,config:u}).then(A=>{C.current||h(A)})}},[c,u,C,D]),Ce(()=>(v(),()=>{globalThis.document.removeEventListener(Bo,L)}),[]),!u||!b)return null;return w(js,{children:w(Hs,{type:"popup",style:M,onClose:H9,onToggleTranslate:yr("toggleTranslatePage"),onToggleEnabled:N,openOptionsPage:Q7,openAboutPage:Y7,openSharePage:V7,onTranslatePdf:()=>{U(n.current||c||"")},onTranslateTheMainPage:yr("translateTheMainPage"),onTranslateTheWholePage:yr("translateTheWholePage"),onTranslateToThePageEndImmediately:yr("translateToThePageEndImmediately"),onSwitchTranslationMode:A=>{yr("switchTranslationMode",!0,{mode:A})()},onTranslatePage:yr("translatePage"),onRestorePage:yr("restorePage",!1),onSetPageLanguage:q,setSettings:i,config:u,pageStatus:t,ctx:b,currentUrl:c,currentLang:f,onSetLocalConfig:Wt,onSetBuildinConfig:kl,request:Ur,errorMsg:S,disabledButton:y,noPermissionPDF:_,onAutoEnableSubtitleChanged:yr("autoEnableSubtitleChanged"),onOpenUrl:$7})});async function v(){let A=ws(),E=await oe.tabs.query({currentWindow:!0,active:!0}),P=E[0].id;m(P);let O=j9(P,A);D.current=O;let H=E[0].url;if(I(P),globalThis.document.addEventListener(Bo,L),!H){p("about:newtab");return}p(H),Zl(H)?(F(O,P,H),W9(P,async()=>{let j=await O.getContextString(),W=await O.getPageStatus(),V=await Xt(),se=await O.getCurrentPageLanguage();if(e(W),l(V),T(se),j){let X=JSON.parse(j);if(X){if(h(X),C.current=!0,Hr(X.rule)){let Z=await O.getPdfWebUrl();n.current=Z}}else z.error("contextStr is empty",j)}se==="auto"&&setTimeout(async()=>{let X=await O.getCurrentPageLanguage();T(X)},500)})):Mp(H||"")?K7(H||"")&&W7(H||"").then(j=>{j||k({disableButton:!1,noPermissionPDF:!0,errorMsg:r("noLocalFilePermissionForPDF")})}):k({disableButton:!0,errorMsg:r("noPermissionForThisPage"),noPermissionPDF:!1})}function I(A){oe.tabs.onUpdated.addListener((E,P,O)=>{A===E&&O.url&&p(O.url)})}function F(A,E,P){A.ping().then(O=>{k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E)}).catch(O=>{s2(P)||k({disableButton:!0,errorMsg:r("reloadCurrentPage"),noPermissionPDF:!1}),z.debug("ping failed, but it is ok. cause maybe content is not injected",O)})}function L(A){let{tabId:E,payload:P}=A.detail,{method:O,data:H}=P;z.debug("popup received message",O,H||" "),O==="setPageStatus"?E&&e(H):O==="ready"&&E&&(k({disableButton:!1,errorMsg:"",noPermissionPDF:!1}),af[E]=!0,K9(E))}function U(A){A&&(oe.tabs.create({url:d4(A)}),globalThis.close())}function N(){i(A=>({...A,enabled:!A.enabled})),setTimeout(()=>{H9()},50)}function q(A){let E=ws();if(T(A),g&&c){let P=pu(c,A,u.sourceLanguageUrlPattern);i(O=>({...O,sourceLanguageUrlPattern:P})),W9(g,()=>{j9(g,E).setCurrentPageLanguageByClient(A)})}}}function yr(t,e=!0,n={}){return async()=>{let r=ws(),i=(await oe.tabs.query({currentWindow:!0,active:!0}))[0].id,o={trigger:"popup",...n};r.sendMessage(`content_script:main:${i}`,{method:t,data:o}),e&&setTimeout(()=>{globalThis.close()},10)}}async function W7(t){try{let e=new URL(t),n=await fetch(e.href);return!0}catch{return!1}}function K7(t){try{return new URL(t).protocol==="file:"}catch{return!1}}var G7={setCurrentPageLanguageByClient:t=>Promise.resolve(),ping:t=>Promise.resolve(),getPageStatus:t=>Promise.resolve(),getCurrentPageLanguage:t=>Promise.resolve(),getContextString:t=>Promise.resolve(),getAsyncContextString:t=>Promise.resolve(),getPdfWebUrl:()=>Promise.resolve("")};function j9(t,e){function n(a,i){let o=`content_script:main_sync:${t}`;return a.includes("Async")&&(o=`content_script:main:${t}`),e.sendMessage(o,{method:a,data:i})}let r={...G7};return Object.keys(r).forEach(a=>{r[a]=n.bind(null,a)}),r}var V7=()=>{yr("shareToDraft")()};function $7(t,e){let n=t;e&&(n=`${t}?utm_source=extension&utm_medium=extension&utm_campaign=${e}`),oe.tabs.create({url:n}),setTimeout(()=>{globalThis.close()},50)}function Y7(){oe.tabs.create({url:oe.runtime.getURL("options.html#about")}),setTimeout(()=>{globalThis.close()},50)}function H9(){globalThis.close()}function Q7(t=""){let e=oe.runtime.getURL("options.html");oe.tabs.create({url:e+t}),setTimeout(()=>{globalThis.close()},50)}var di={},af={};function W9(t,e){if(af[t])try{e()}catch(n){z.error("run callback failed",n)}else di[t]||(di[t]=[]),di[t].push(e)}function K9(t){if(di[t]&&di[t].length){let e=[...di[t]];di[t]=[],e.forEach(n=>n())}}var G9=document.getElementById("mount");l2();G9&&(async()=>{let t=await Xt();t.debug&&z.setLevel("debug"),$r(w(eo,{lang:t.interfaceLanguage,translations:rc,fallbackLang:"en",children:w(of,{})}),G9)})();})(); /*! Bundled license information: bowser/src/bowser.js: diff --git a/dist/userscript/immersive-translate.user.js b/dist/userscript/immersive-translate.user.js index e2bc83c..03c8398 100644 --- a/dist/userscript/immersive-translate.user.js +++ b/dist/userscript/immersive-translate.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Immersive Translate - Translate Website & PDF // @description Free Translate Website, Translate PDF & Epub eBook, Translate Video Subtitles in Bilingual -// @version 1.4.4 +// @version 1.4.5 // @namespace https://immersive-translate.owenyoung.com/ // @author Owen Young // @homepageURL https://immersivetranslate.com/ @@ -102,7 +102,7 @@ // @name:es Immersion Translation: Traducción bilingüe de páginas web y documentos PDF // @description:es Bilingual web page translation, also supports PDF translation, bilingual Epub eBook translation, free to use. // ==/UserScript== -(()=>{var B6=Object.create;var B0=Object.defineProperty;var R6=Object.getOwnPropertyDescriptor;var I6=Object.getOwnPropertyNames;var O6=Object.getPrototypeOf,N6=Object.prototype.hasOwnProperty;var j6=(e,t)=>()=>(e&&(t=e(e=0)),t);var U6=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),R0=(e,t)=>{for(var n in t)B0(e,n,{get:t[n],enumerable:!0})},H6=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of I6(t))!N6.call(e,a)&&a!==n&&B0(e,a,{get:()=>t[a],enumerable:!(r=R6(t,a))||r.enumerable});return e};var z6=(e,t,n)=>(n=e!=null?B6(O6(e)):{},H6(t||!e||!e.__esModule?B0(n,"default",{value:e,enumerable:!0}):n,e));var T,d=j6(()=>{T={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var B6=Object.create;var M0=Object.defineProperty;var R6=Object.getOwnPropertyDescriptor;var I6=Object.getOwnPropertyNames;var O6=Object.getPrototypeOf,N6=Object.prototype.hasOwnProperty;var j6=(e,t)=>()=>(e&&(t=e(e=0)),t);var U6=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),B0=(e,t)=>{for(var n in t)M0(e,n,{get:t[n],enumerable:!0})},H6=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of I6(t))!N6.call(e,a)&&a!==n&&M0(e,a,{get:()=>t[a],enumerable:!(r=R6(t,a))||r.enumerable});return e};var z6=(e,t,n)=>(n=e!=null?B6(O6(e)):{},H6(t||!e||!e.__esModule?M0(n,"default",{value:e,enumerable:!0}):n,e));var T,d=j6(()=>{T={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -5040,32 +5040,32 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",IMMERSIVE_TRANSLATE_USERSCRIPT:"1",INSTALL_FROM:"official_userscript"}});var h1=U6((wl,ps)=>{d();(function(){var e;function t(f){var y,b,h="",C=-1,w;if(f&&f.length)for(w=f.length;(C+=1)>>6&31,128|y&63):y<=65535?h+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(h+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return h}function n(f){var y,b,h,C,w,k=[],R;if(y=b=h=C=w=0,f&&f.length)for(R=f.length,f+="";y191&&h<224?(C=f.charCodeAt(y+1),k[b]=String.fromCharCode((h&31)<<6|C&63),y+=2):(C=f.charCodeAt(y+1),w=f.charCodeAt(y+2),k[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|w&63),y+=3);return k.join("")}function r(f,y){var b=(f&65535)+(y&65535),h=(f>>16)+(y>>16)+(b>>16);return h<<16|b&65535}function a(f,y){return f<>>32-y}function o(f,y){for(var b=y?"0123456789ABCDEF":"0123456789abcdef",h="",C,w=0,k=f.length;w>>4&15)+b.charAt(C&15);return h}function i(f){var y,b=f.length,h="";for(y=0;y>>8&255);return h}function s(f){var y,b=f.length,h="";for(y=0;y>>8&255,f.charCodeAt(y)&255);return h}function u(f){var y,b=f.length*32,h="";for(y=0;y>5]>>>24-y%32&255);return h}function l(f){var y,b=f.length*32,h="";for(y=0;y>5]>>>y%32&255);return h}function c(f){var y,b=f.length*8,h=Array(f.length>>2),C=h.length;for(y=0;y>5]|=(f.charCodeAt(y/8)&255)<>2),C=h.length;for(y=0;y>5]|=(f.charCodeAt(y/8)&255)<<24-y%32;return h}function g(f,y){var b=y.length,h=Array(),C,w,k,R,v,x,B,_;for(x=Array(Math.ceil(f.length/2)),R=x.length,C=0;C0;){for(v=Array(),k=0,C=0;C0||w>0)&&(v[v.length]=w);h[h.length]=k,x=v}for(B="",C=h.length-1;C>=0;C--)B+=y.charAt(h[C]);for(_=Math.ceil(f.length*8/(Math.log(y.length)/Math.log(2))),C=B.length;C<_;C+=1)B=y[0]+B;return B}function p(f,y){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="",C=f.length,w,k,R;for(y=y||"=",w=0;wf.length*8?h+=y:h+=b.charAt(R>>>6*(3-k)&63);return h}e={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",b=!1,h=!0;this.encode=function(C){var w,k,R,v="";for(y=y||"=",C=h?t(C):C,len=C.length,w=0;wlen*8?v+=y:v+=f.charAt(R>>>6*(3-k)&63);return v},this.decode=function(C){var w,k,R,v,x,B,_,E,O,F,M="",N=[];if(!C)return C;w=F=0,C=C.replace(new RegExp("\\"+y,"gi"),"");do x=f.indexOf(C.charAt(w++)),B=f.indexOf(C.charAt(w++)),_=f.indexOf(C.charAt(w++)),E=f.indexOf(C.charAt(w++)),O=x<<18|B<<12|_<<6|E,k=O>>16&255,R=O>>8&255,v=O&255,F+=1,_===64?N[F]=String.fromCharCode(k):E===64?N[F]=String.fromCharCode(k,R):N[F]=String.fromCharCode(k,R,v);while(w>>8^b;return(y^-1)>>>0},MD5:function(f){var y=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(E){return o(C(E,h),y)},this.b64=function(E){return p(C(E),b)},this.any=function(E,O){return g(C(E,h),O)},this.raw=function(E){return C(E,h)},this.hex_hmac=function(E,O){return o(w(E,O),y)},this.b64_hmac=function(E,O){return p(w(E,O),b)},this.any_hmac=function(E,O,F){return g(w(E,O),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(E){return typeof E=="boolean"&&(y=E),this},this.setPad=function(E){return b=E||b,this},this.setUTF8=function(E){return typeof E=="boolean"&&(h=E),this};function C(E){return E=h?t(E):E,l(k(c(E),E.length*8))}function w(E,O){var F,M,N,U,H;for(E=h?t(E):E,O=h?t(O):O,F=c(E),F.length>16&&(F=k(F,E.length*8)),M=Array(16),N=Array(16),H=0;H<16;H+=1)M[H]=F[H]^909522486,N[H]=F[H]^1549556828;return U=k(M.concat(c(O)),512+O.length*8),l(k(N.concat(U),512+128))}function k(E,O){var F,M,N,U,H,L=1732584193,S=-271733879,A=-1732584194,j=271733878;for(E[O>>5]|=128<>>9<<4)+14]=O,F=0;F16&&(_=k(_,x.length*8)),E=Array(16),O=Array(16),F=0;F<16;F+=1)E[F]=_[F]^909522486,O[F]=_[F]^1549556828;return M=k(E.concat(m(B)),512+B.length*8),u(k(O.concat(M),512+160))}function k(x,B){var _,E,O,F,M,N,U,H,L=Array(80),S=1732584193,A=-271733879,j=-1732584194,q=271733878,z=-1009589776;for(x[B>>5]|=128<<24-B%32,x[(B+64>>9<<4)+15]=B,_=0;_16&&(z=L(z,S.length*8));q<16;q+=1)W[q]=z[q]^909522486,V[q]=z[q]^1549556828;return j=L(W.concat(m(A)),512+A.length*8),u(L(V.concat(j),512+256))}function R(S,A){return S>>>A|S<<32-A}function v(S,A){return S>>>A}function x(S,A,j){return S&A^~S&j}function B(S,A,j){return S&A^S&j^A&j}function _(S){return R(S,2)^R(S,13)^R(S,22)}function E(S){return R(S,6)^R(S,11)^R(S,25)}function O(S){return R(S,7)^R(S,18)^v(S,3)}function F(S){return R(S,17)^R(S,19)^v(S,10)}function M(S){return R(S,28)^R(S,34)^R(S,39)}function N(S){return R(S,14)^R(S,18)^R(S,41)}function U(S){return R(S,1)^R(S,8)^v(S,7)}function H(S){return R(S,19)^R(S,61)^v(S,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function L(S,A){var j=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],q=new Array(64),z,W,V,ue,ae,X,ie,pe,ee,Y,be,ne;for(S[A>>5]|=128<<24-A%32,S[(A+64>>9<<4)+15]=A,ee=0;ee32&&(S=R(S,N.length*8));L<32;L+=1)A[L]=S[L]^909522486,j[L]=S[L]^1549556828;return H=R(A.concat(m(U)),1024+U.length*8),u(R(j.concat(H),1024+512))}function R(N,U){var H,L,S,A=new Array(80),j=new Array(16),q=[new v(1779033703,-205731576),new v(-1150833019,-2067093701),new v(1013904242,-23791573),new v(-1521486534,1595750129),new v(1359893119,-1377402159),new v(-1694144372,725511199),new v(528734635,-79577749),new v(1541459225,327033209)],z=new v(0,0),W=new v(0,0),V=new v(0,0),ue=new v(0,0),ae=new v(0,0),X=new v(0,0),ie=new v(0,0),pe=new v(0,0),ee=new v(0,0),Y=new v(0,0),be=new v(0,0),ne=new v(0,0),re=new v(0,0),Te=new v(0,0),Re=new v(0,0),_e=new v(0,0),de=new v(0,0);for(C===void 0&&(C=[new v(1116352408,-685199838),new v(1899447441,602891725),new v(-1245643825,-330482897),new v(-373957723,-2121671748),new v(961987163,-213338824),new v(1508970993,-1241133031),new v(-1841331548,-1357295717),new v(-1424204075,-630357736),new v(-670586216,-1560083902),new v(310598401,1164996542),new v(607225278,1323610764),new v(1426881987,-704662302),new v(1925078388,-226784913),new v(-2132889090,991336113),new v(-1680079193,633803317),new v(-1046744716,-815192428),new v(-459576895,-1628353838),new v(-272742522,944711139),new v(264347078,-1953704523),new v(604807628,2007800933),new v(770255983,1495990901),new v(1249150122,1856431235),new v(1555081692,-1119749164),new v(1996064986,-2096016459),new v(-1740746414,-295247957),new v(-1473132947,766784016),new v(-1341970488,-1728372417),new v(-1084653625,-1091629340),new v(-958395405,1034457026),new v(-710438585,-1828018395),new v(113926993,-536640913),new v(338241895,168717936),new v(666307205,1188179964),new v(773529912,1546045734),new v(1294757372,1522805485),new v(1396182291,-1651133473),new v(1695183700,-1951439906),new v(1986661051,1014477480),new v(-2117940946,1206759142),new v(-1838011259,344077627),new v(-1564481375,1290863460),new v(-1474664885,-1136513023),new v(-1035236496,-789014639),new v(-949202525,106217008),new v(-778901479,-688958952),new v(-694614492,1432725776),new v(-200395387,1467031594),new v(275423344,851169720),new v(430227734,-1194143544),new v(506948616,1363258195),new v(659060556,-544281703),new v(883997877,-509917016),new v(958139571,-976659869),new v(1322822218,-482243893),new v(1537002063,2003034995),new v(1747873779,-692930397),new v(1955562222,1575990012),new v(2024104815,1125592928),new v(-2067236844,-1578062990),new v(-1933114872,442776044),new v(-1866530822,593698344),new v(-1538233109,-561857047),new v(-1090935817,-1295615723),new v(-965641998,-479046869),new v(-903397682,-366583396),new v(-779700025,566280711),new v(-354779690,-840897762),new v(-176337025,-294727304),new v(116418474,1914138554),new v(174292421,-1563912026),new v(289380356,-1090974290),new v(460393269,320620315),new v(685471733,587496836),new v(852142971,1086792851),new v(1017036298,365543100),new v(1126000580,-1676669620),new v(1288033470,-885112138),new v(1501505948,-60457430),new v(1607167915,987167468),new v(1816402316,1246189591)]),L=0;L<80;L+=1)A[L]=new v(0,0);for(N[U>>5]|=128<<24-(U&31),N[(U+128>>10<<5)+31]=U,S=N.length,L=0;L>>H|U.h<<32-H,N.h=U.h>>>H|U.l<<32-H}function _(N,U,H){N.l=U.h>>>H|U.l<<32-H,N.h=U.l>>>H|U.h<<32-H}function E(N,U,H){N.l=U.l>>>H|U.h<<32-H,N.h=U.h>>>H}function O(N,U,H){var L=(U.l&65535)+(H.l&65535),S=(U.l>>>16)+(H.l>>>16)+(L>>>16),A=(U.h&65535)+(H.h&65535)+(S>>>16),j=(U.h>>>16)+(H.h>>>16)+(A>>>16);N.l=L&65535|S<<16,N.h=A&65535|j<<16}function F(N,U,H,L,S){var A=(U.l&65535)+(H.l&65535)+(L.l&65535)+(S.l&65535),j=(U.l>>>16)+(H.l>>>16)+(L.l>>>16)+(S.l>>>16)+(A>>>16),q=(U.h&65535)+(H.h&65535)+(L.h&65535)+(S.h&65535)+(j>>>16),z=(U.h>>>16)+(H.h>>>16)+(L.h>>>16)+(S.h>>>16)+(q>>>16);N.l=A&65535|j<<16,N.h=q&65535|z<<16}function M(N,U,H,L,S,A){var j=(U.l&65535)+(H.l&65535)+(L.l&65535)+(S.l&65535)+(A.l&65535),q=(U.l>>>16)+(H.l>>>16)+(L.l>>>16)+(S.l>>>16)+(A.l>>>16)+(j>>>16),z=(U.h&65535)+(H.h&65535)+(L.h&65535)+(S.h&65535)+(A.h&65535)+(q>>>16),W=(U.h>>>16)+(H.h>>>16)+(L.h>>>16)+(S.h>>>16)+(A.h>>>16)+(z>>>16);N.l=j&65535|q<<16,N.h=z&65535|W<<16}},RMD160:function(f){var y=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],k=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],R=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(M){return o(v(M,h))},this.b64=function(M){return p(v(M,h),b)},this.any=function(M,N){return g(v(M,h),N)},this.raw=function(M){return v(M,h)},this.hex_hmac=function(M,N){return o(x(M,N))},this.b64_hmac=function(M,N){return p(x(M,N),b)},this.any_hmac=function(M,N,U){return g(x(M,N),U)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(M){return typeof M=="boolean"&&(y=M),this},this.setPad=function(M){return typeof M<"u"&&(b=M),this},this.setUTF8=function(M){return typeof M=="boolean"&&(h=M),this};function v(M){return M=h?t(M):M,B(_(c(M),M.length*8))}function x(M,N){M=h?t(M):M,N=h?t(N):N;var U,H,L=c(M),S=Array(16),A=Array(16);for(L.length>16&&(L=_(L,M.length*8)),U=0;U<16;U+=1)S[U]=L[U]^909522486,A[U]=L[U]^1549556828;return H=_(S.concat(c(N)),512+N.length*8),B(_(A.concat(H),512+160))}function B(M){var N,U="",H=M.length*32;for(N=0;N>5]>>>N%32&255);return U}function _(M,N){var U,H,L,S,A=1732584193,j=4023233417,q=2562383102,z=271733878,W=3285377520,V,ue,ae,X,ie,pe,ee,Y,be,ne;for(M[N>>5]|=128<>>9<<4)+14]=N,S=M.length,L=0;Ln&&(n=o,r=a)}return[r,n]}function aE(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function oE(e,t,n,r){t=sE(t,n,r);let a=[],o;if(t)for(o in t)js.call(t,o)&&a.push([o,iE(e,t[o])]);return a.length===0?O0():a.sort(uE)}function iE(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharactersi+s.length,0));let o=e.length-r;for(let i of yE){let s=i[1],u=i[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/o>.5?t==="zh-CN"?Ig(e)?"zh-TW":"zh-CN":t:"auto"}d();d();d();d();d();function eo(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(o){await o,t="fulfilled",r(o)},reject(o){t="rejected",a(o)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}d();var N0=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function zs(e,t){let n=eo(),r=setTimeout(()=>n.reject(new N0),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}d();d();function pr(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,o)=>{let i=()=>{clearTimeout(u),o(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",i),a()},e);if(n?.addEventListener("abort",i,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ng=class{#e=0;#t=[];#n=[];#r=eo();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;t$E,bgBlue:()=>YE,bgBrightBlack:()=>ZE,bgBrightBlue:()=>rx,bgBrightCyan:()=>ox,bgBrightGreen:()=>tx,bgBrightMagenta:()=>ax,bgBrightRed:()=>ex,bgBrightWhite:()=>ix,bgBrightYellow:()=>nx,bgCyan:()=>XE,bgGreen:()=>VE,bgMagenta:()=>JE,bgRed:()=>GE,bgRgb24:()=>cx,bgRgb8:()=>ux,bgWhite:()=>QE,bgYellow:()=>KE,black:()=>_E,blue:()=>ME,bold:()=>vE,brightBlack:()=>Hg,brightBlue:()=>HE,brightCyan:()=>qE,brightGreen:()=>jE,brightMagenta:()=>zE,brightRed:()=>NE,brightWhite:()=>WE,brightYellow:()=>UE,cyan:()=>RE,dim:()=>CE,getColorEnabled:()=>xE,gray:()=>OE,green:()=>FE,hidden:()=>AE,inverse:()=>DE,italic:()=>SE,magenta:()=>BE,red:()=>LE,reset:()=>TE,rgb24:()=>lx,rgb8:()=>sx,setColorEnabled:()=>EE,strikethrough:()=>kE,stripColor:()=>mx,underline:()=>wE,white:()=>IE,yellow:()=>PE});d();var{Deno:jg}=globalThis,Ug=typeof jg?.noColor=="boolean"?jg.noColor:!0,j0=!Ug;function EE(e){Ug||(j0=e)}function xE(){return j0}function Ae(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function ke(e,t){return j0?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function TE(e){return ke(e,Ae([0],0))}function vE(e){return ke(e,Ae([1],22))}function CE(e){return ke(e,Ae([2],22))}function SE(e){return ke(e,Ae([3],23))}function wE(e){return ke(e,Ae([4],24))}function DE(e){return ke(e,Ae([7],27))}function AE(e){return ke(e,Ae([8],28))}function kE(e){return ke(e,Ae([9],29))}function _E(e){return ke(e,Ae([30],39))}function LE(e){return ke(e,Ae([31],39))}function FE(e){return ke(e,Ae([32],39))}function PE(e){return ke(e,Ae([33],39))}function ME(e){return ke(e,Ae([34],39))}function BE(e){return ke(e,Ae([35],39))}function RE(e){return ke(e,Ae([36],39))}function IE(e){return ke(e,Ae([37],39))}function OE(e){return Hg(e)}function Hg(e){return ke(e,Ae([90],39))}function NE(e){return ke(e,Ae([91],39))}function jE(e){return ke(e,Ae([92],39))}function UE(e){return ke(e,Ae([93],39))}function HE(e){return ke(e,Ae([94],39))}function zE(e){return ke(e,Ae([95],39))}function qE(e){return ke(e,Ae([96],39))}function WE(e){return ke(e,Ae([97],39))}function $E(e){return ke(e,Ae([40],49))}function GE(e){return ke(e,Ae([41],49))}function VE(e){return ke(e,Ae([42],49))}function KE(e){return ke(e,Ae([43],49))}function YE(e){return ke(e,Ae([44],49))}function JE(e){return ke(e,Ae([45],49))}function XE(e){return ke(e,Ae([46],49))}function QE(e){return ke(e,Ae([47],49))}function ZE(e){return ke(e,Ae([100],49))}function ex(e){return ke(e,Ae([101],49))}function tx(e){return ke(e,Ae([102],49))}function nx(e){return ke(e,Ae([103],49))}function rx(e){return ke(e,Ae([104],49))}function ax(e){return ke(e,Ae([105],49))}function ox(e){return ke(e,Ae([106],49))}function ix(e){return ke(e,Ae([107],49))}function Pr(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function sx(e,t){return ke(e,Ae([38,5,Pr(t)],39))}function ux(e,t){return ke(e,Ae([48,5,Pr(t)],49))}function lx(e,t){return typeof t=="number"?ke(e,Ae([38,2,t>>16&255,t>>8&255,t&255],39)):ke(e,Ae([38,2,Pr(t.r),Pr(t.g),Pr(t.b)],39))}function cx(e,t){return typeof t=="number"?ke(e,Ae([48,2,t>>16&255,t>>8&255,t&255],49)):ke(e,Ae([48,2,Pr(t.r),Pr(t.g),Pr(t.b)],49))}var dx=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function mx(e){return e.replace(dx,"")}d();d();var U0=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},px={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function H0(e,t){let n={...px,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let o=0;osetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=i}throw new U0(a,n.maxAttempts)}d();var gr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function gi(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=gr[(t[r-2]&3)<<4|t[r-1]>>4],n+=gr[(t[r-1]&15)<<2|t[r]>>6],n+=gr[t[r]&63];return r===a+1&&(n+=gr[t[r-2]>>2],n+=gr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=gr[t[r-2]>>2],n+=gr[(t[r-2]&3)<<4|t[r-1]>>4],n+=gr[(t[r-1]&15)<<2],n+="="),n}d();d();var gx=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,fx=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,hx=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,z0={Space_Separator:gx,ID_Start:fx,ID_Continue:hx},vt={isSpaceSeparator(e){return typeof e=="string"&&z0.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||z0.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||z0.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},W0,cn,hr,Ws,Mr,Un,Mt,V0,hi,bx=function(e,t){W0=String(e),cn="start",hr=[],Ws=0,Mr=1,Un=0,Mt=void 0,V0=void 0,hi=void 0;do Mt=yx(),Tx[cn]();while(Mt.type!=="eof");return typeof t=="function"?$0({"":hi},"",t):hi};function $0(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",IMMERSIVE_TRANSLATE_USERSCRIPT:"1",INSTALL_FROM:"official_userscript"}});var h1=U6((wl,gs)=>{d();(function(){var e;function t(f){var y,b,h="",C=-1,w;if(f&&f.length)for(w=f.length;(C+=1)>>6&31,128|y&63):y<=65535?h+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(h+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return h}function n(f){var y,b,h,C,w,k=[],R;if(y=b=h=C=w=0,f&&f.length)for(R=f.length,f+="";y191&&h<224?(C=f.charCodeAt(y+1),k[b]=String.fromCharCode((h&31)<<6|C&63),y+=2):(C=f.charCodeAt(y+1),w=f.charCodeAt(y+2),k[b]=String.fromCharCode((h&15)<<12|(C&63)<<6|w&63),y+=3);return k.join("")}function r(f,y){var b=(f&65535)+(y&65535),h=(f>>16)+(y>>16)+(b>>16);return h<<16|b&65535}function a(f,y){return f<>>32-y}function o(f,y){for(var b=y?"0123456789ABCDEF":"0123456789abcdef",h="",C,w=0,k=f.length;w>>4&15)+b.charAt(C&15);return h}function i(f){var y,b=f.length,h="";for(y=0;y>>8&255);return h}function s(f){var y,b=f.length,h="";for(y=0;y>>8&255,f.charCodeAt(y)&255);return h}function u(f){var y,b=f.length*32,h="";for(y=0;y>5]>>>24-y%32&255);return h}function l(f){var y,b=f.length*32,h="";for(y=0;y>5]>>>y%32&255);return h}function c(f){var y,b=f.length*8,h=Array(f.length>>2),C=h.length;for(y=0;y>5]|=(f.charCodeAt(y/8)&255)<>2),C=h.length;for(y=0;y>5]|=(f.charCodeAt(y/8)&255)<<24-y%32;return h}function g(f,y){var b=y.length,h=Array(),C,w,k,R,v,x,B,_;for(x=Array(Math.ceil(f.length/2)),R=x.length,C=0;C0;){for(v=Array(),k=0,C=0;C0||w>0)&&(v[v.length]=w);h[h.length]=k,x=v}for(B="",C=h.length-1;C>=0;C--)B+=y.charAt(h[C]);for(_=Math.ceil(f.length*8/(Math.log(y.length)/Math.log(2))),C=B.length;C<_;C+=1)B=y[0]+B;return B}function p(f,y){var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="",C=f.length,w,k,R;for(y=y||"=",w=0;wf.length*8?h+=y:h+=b.charAt(R>>>6*(3-k)&63);return h}e={VERSION:"1.0.6",Base64:function(){var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",b=!1,h=!0;this.encode=function(C){var w,k,R,v="";for(y=y||"=",C=h?t(C):C,len=C.length,w=0;wlen*8?v+=y:v+=f.charAt(R>>>6*(3-k)&63);return v},this.decode=function(C){var w,k,R,v,x,B,_,E,O,F,M="",N=[];if(!C)return C;w=F=0,C=C.replace(new RegExp("\\"+y,"gi"),"");do x=f.indexOf(C.charAt(w++)),B=f.indexOf(C.charAt(w++)),_=f.indexOf(C.charAt(w++)),E=f.indexOf(C.charAt(w++)),O=x<<18|B<<12|_<<6|E,k=O>>16&255,R=O>>8&255,v=O&255,F+=1,_===64?N[F]=String.fromCharCode(k):E===64?N[F]=String.fromCharCode(k,R):N[F]=String.fromCharCode(k,R,v);while(w>>8^b;return(y^-1)>>>0},MD5:function(f){var y=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pad:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0;this.hex=function(E){return o(C(E,h),y)},this.b64=function(E){return p(C(E),b)},this.any=function(E,O){return g(C(E,h),O)},this.raw=function(E){return C(E,h)},this.hex_hmac=function(E,O){return o(w(E,O),y)},this.b64_hmac=function(E,O){return p(w(E,O),b)},this.any_hmac=function(E,O,F){return g(w(E,O),F)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(E){return typeof E=="boolean"&&(y=E),this},this.setPad=function(E){return b=E||b,this},this.setUTF8=function(E){return typeof E=="boolean"&&(h=E),this};function C(E){return E=h?t(E):E,l(k(c(E),E.length*8))}function w(E,O){var F,M,N,U,H;for(E=h?t(E):E,O=h?t(O):O,F=c(E),F.length>16&&(F=k(F,E.length*8)),M=Array(16),N=Array(16),H=0;H<16;H+=1)M[H]=F[H]^909522486,N[H]=F[H]^1549556828;return U=k(M.concat(c(O)),512+O.length*8),l(k(N.concat(U),512+128))}function k(E,O){var F,M,N,U,H,L=1732584193,S=-271733879,A=-1732584194,j=271733878;for(E[O>>5]|=128<>>9<<4)+14]=O,F=0;F16&&(_=k(_,x.length*8)),E=Array(16),O=Array(16),F=0;F<16;F+=1)E[F]=_[F]^909522486,O[F]=_[F]^1549556828;return M=k(E.concat(m(B)),512+B.length*8),u(k(O.concat(M),512+160))}function k(x,B){var _,E,O,F,M,N,U,H,L=Array(80),S=1732584193,A=-271733879,j=-1732584194,q=271733878,z=-1009589776;for(x[B>>5]|=128<<24-B%32,x[(B+64>>9<<4)+15]=B,_=0;_16&&(z=L(z,S.length*8));q<16;q+=1)W[q]=z[q]^909522486,V[q]=z[q]^1549556828;return j=L(W.concat(m(A)),512+A.length*8),u(L(V.concat(j),512+256))}function R(S,A){return S>>>A|S<<32-A}function v(S,A){return S>>>A}function x(S,A,j){return S&A^~S&j}function B(S,A,j){return S&A^S&j^A&j}function _(S){return R(S,2)^R(S,13)^R(S,22)}function E(S){return R(S,6)^R(S,11)^R(S,25)}function O(S){return R(S,7)^R(S,18)^v(S,3)}function F(S){return R(S,17)^R(S,19)^v(S,10)}function M(S){return R(S,28)^R(S,34)^R(S,39)}function N(S){return R(S,14)^R(S,18)^R(S,41)}function U(S){return R(S,1)^R(S,8)^v(S,7)}function H(S){return R(S,19)^R(S,61)^v(S,6)}C=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function L(S,A){var j=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],q=new Array(64),z,W,V,ue,ae,X,ie,pe,ee,Y,ye,ne;for(S[A>>5]|=128<<24-A%32,S[(A+64>>9<<4)+15]=A,ee=0;ee32&&(S=R(S,N.length*8));L<32;L+=1)A[L]=S[L]^909522486,j[L]=S[L]^1549556828;return H=R(A.concat(m(U)),1024+U.length*8),u(R(j.concat(H),1024+512))}function R(N,U){var H,L,S,A=new Array(80),j=new Array(16),q=[new v(1779033703,-205731576),new v(-1150833019,-2067093701),new v(1013904242,-23791573),new v(-1521486534,1595750129),new v(1359893119,-1377402159),new v(-1694144372,725511199),new v(528734635,-79577749),new v(1541459225,327033209)],z=new v(0,0),W=new v(0,0),V=new v(0,0),ue=new v(0,0),ae=new v(0,0),X=new v(0,0),ie=new v(0,0),pe=new v(0,0),ee=new v(0,0),Y=new v(0,0),ye=new v(0,0),ne=new v(0,0),re=new v(0,0),Te=new v(0,0),Re=new v(0,0),_e=new v(0,0),de=new v(0,0);for(C===void 0&&(C=[new v(1116352408,-685199838),new v(1899447441,602891725),new v(-1245643825,-330482897),new v(-373957723,-2121671748),new v(961987163,-213338824),new v(1508970993,-1241133031),new v(-1841331548,-1357295717),new v(-1424204075,-630357736),new v(-670586216,-1560083902),new v(310598401,1164996542),new v(607225278,1323610764),new v(1426881987,-704662302),new v(1925078388,-226784913),new v(-2132889090,991336113),new v(-1680079193,633803317),new v(-1046744716,-815192428),new v(-459576895,-1628353838),new v(-272742522,944711139),new v(264347078,-1953704523),new v(604807628,2007800933),new v(770255983,1495990901),new v(1249150122,1856431235),new v(1555081692,-1119749164),new v(1996064986,-2096016459),new v(-1740746414,-295247957),new v(-1473132947,766784016),new v(-1341970488,-1728372417),new v(-1084653625,-1091629340),new v(-958395405,1034457026),new v(-710438585,-1828018395),new v(113926993,-536640913),new v(338241895,168717936),new v(666307205,1188179964),new v(773529912,1546045734),new v(1294757372,1522805485),new v(1396182291,-1651133473),new v(1695183700,-1951439906),new v(1986661051,1014477480),new v(-2117940946,1206759142),new v(-1838011259,344077627),new v(-1564481375,1290863460),new v(-1474664885,-1136513023),new v(-1035236496,-789014639),new v(-949202525,106217008),new v(-778901479,-688958952),new v(-694614492,1432725776),new v(-200395387,1467031594),new v(275423344,851169720),new v(430227734,-1194143544),new v(506948616,1363258195),new v(659060556,-544281703),new v(883997877,-509917016),new v(958139571,-976659869),new v(1322822218,-482243893),new v(1537002063,2003034995),new v(1747873779,-692930397),new v(1955562222,1575990012),new v(2024104815,1125592928),new v(-2067236844,-1578062990),new v(-1933114872,442776044),new v(-1866530822,593698344),new v(-1538233109,-561857047),new v(-1090935817,-1295615723),new v(-965641998,-479046869),new v(-903397682,-366583396),new v(-779700025,566280711),new v(-354779690,-840897762),new v(-176337025,-294727304),new v(116418474,1914138554),new v(174292421,-1563912026),new v(289380356,-1090974290),new v(460393269,320620315),new v(685471733,587496836),new v(852142971,1086792851),new v(1017036298,365543100),new v(1126000580,-1676669620),new v(1288033470,-885112138),new v(1501505948,-60457430),new v(1607167915,987167468),new v(1816402316,1246189591)]),L=0;L<80;L+=1)A[L]=new v(0,0);for(N[U>>5]|=128<<24-(U&31),N[(U+128>>10<<5)+31]=U,S=N.length,L=0;L>>H|U.h<<32-H,N.h=U.h>>>H|U.l<<32-H}function _(N,U,H){N.l=U.h>>>H|U.l<<32-H,N.h=U.l>>>H|U.h<<32-H}function E(N,U,H){N.l=U.l>>>H|U.h<<32-H,N.h=U.h>>>H}function O(N,U,H){var L=(U.l&65535)+(H.l&65535),S=(U.l>>>16)+(H.l>>>16)+(L>>>16),A=(U.h&65535)+(H.h&65535)+(S>>>16),j=(U.h>>>16)+(H.h>>>16)+(A>>>16);N.l=L&65535|S<<16,N.h=A&65535|j<<16}function F(N,U,H,L,S){var A=(U.l&65535)+(H.l&65535)+(L.l&65535)+(S.l&65535),j=(U.l>>>16)+(H.l>>>16)+(L.l>>>16)+(S.l>>>16)+(A>>>16),q=(U.h&65535)+(H.h&65535)+(L.h&65535)+(S.h&65535)+(j>>>16),z=(U.h>>>16)+(H.h>>>16)+(L.h>>>16)+(S.h>>>16)+(q>>>16);N.l=A&65535|j<<16,N.h=q&65535|z<<16}function M(N,U,H,L,S,A){var j=(U.l&65535)+(H.l&65535)+(L.l&65535)+(S.l&65535)+(A.l&65535),q=(U.l>>>16)+(H.l>>>16)+(L.l>>>16)+(S.l>>>16)+(A.l>>>16)+(j>>>16),z=(U.h&65535)+(H.h&65535)+(L.h&65535)+(S.h&65535)+(A.h&65535)+(q>>>16),W=(U.h>>>16)+(H.h>>>16)+(L.h>>>16)+(S.h>>>16)+(A.h>>>16)+(z>>>16);N.l=j&65535|q<<16,N.h=z&65535|W<<16}},RMD160:function(f){var y=f&&typeof f.uppercase=="boolean"?f.uppercase:!1,b=f&&typeof f.pad=="string"?f.pa:"=",h=f&&typeof f.utf8=="boolean"?f.utf8:!0,C=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],w=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],k=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],R=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(M){return o(v(M,h))},this.b64=function(M){return p(v(M,h),b)},this.any=function(M,N){return g(v(M,h),N)},this.raw=function(M){return v(M,h)},this.hex_hmac=function(M,N){return o(x(M,N))},this.b64_hmac=function(M,N){return p(x(M,N),b)},this.any_hmac=function(M,N,U){return g(x(M,N),U)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(M){return typeof M=="boolean"&&(y=M),this},this.setPad=function(M){return typeof M<"u"&&(b=M),this},this.setUTF8=function(M){return typeof M=="boolean"&&(h=M),this};function v(M){return M=h?t(M):M,B(_(c(M),M.length*8))}function x(M,N){M=h?t(M):M,N=h?t(N):N;var U,H,L=c(M),S=Array(16),A=Array(16);for(L.length>16&&(L=_(L,M.length*8)),U=0;U<16;U+=1)S[U]=L[U]^909522486,A[U]=L[U]^1549556828;return H=_(S.concat(c(N)),512+N.length*8),B(_(A.concat(H),512+160))}function B(M){var N,U="",H=M.length*32;for(N=0;N>5]>>>N%32&255);return U}function _(M,N){var U,H,L,S,A=1732584193,j=4023233417,q=2562383102,z=271733878,W=3285377520,V,ue,ae,X,ie,pe,ee,Y,ye,ne;for(M[N>>5]|=128<>>9<<4)+14]=N,S=M.length,L=0;Ln&&(n=o,r=a)}return[r,n]}function aE(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function oE(e,t,n,r){t=sE(t,n,r);let a=[],o;if(t)for(o in t)js.call(t,o)&&a.push([o,iE(e,t[o])]);return a.length===0?I0():a.sort(uE)}function iE(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharactersi+s.length,0));let o=e.length-r;for(let i of yE){let s=i[1],u=i[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/o>.5?t==="zh-CN"?Ig(e)?"zh-TW":"zh-CN":t:"auto"}d();d();d();d();d();function eo(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(o){await o,t="fulfilled",r(o)},reject(o){t="rejected",a(o)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}d();var O0=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function zs(e,t){let n=eo(),r=setTimeout(()=>n.reject(new O0),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}d();d();function pr(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,o)=>{let i=()=>{clearTimeout(u),o(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",i),a()},e);if(n?.addEventListener("abort",i,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}d();var Ng=class{#e=0;#t=[];#n=[];#r=eo();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;t$E,bgBlue:()=>YE,bgBrightBlack:()=>ZE,bgBrightBlue:()=>rx,bgBrightCyan:()=>ox,bgBrightGreen:()=>tx,bgBrightMagenta:()=>ax,bgBrightRed:()=>ex,bgBrightWhite:()=>ix,bgBrightYellow:()=>nx,bgCyan:()=>XE,bgGreen:()=>VE,bgMagenta:()=>JE,bgRed:()=>GE,bgRgb24:()=>cx,bgRgb8:()=>ux,bgWhite:()=>QE,bgYellow:()=>KE,black:()=>_E,blue:()=>ME,bold:()=>vE,brightBlack:()=>Hg,brightBlue:()=>HE,brightCyan:()=>qE,brightGreen:()=>jE,brightMagenta:()=>zE,brightRed:()=>NE,brightWhite:()=>WE,brightYellow:()=>UE,cyan:()=>RE,dim:()=>CE,getColorEnabled:()=>xE,gray:()=>OE,green:()=>FE,hidden:()=>AE,inverse:()=>DE,italic:()=>SE,magenta:()=>BE,red:()=>LE,reset:()=>TE,rgb24:()=>lx,rgb8:()=>sx,setColorEnabled:()=>EE,strikethrough:()=>kE,stripColor:()=>mx,underline:()=>wE,white:()=>IE,yellow:()=>PE});d();var{Deno:jg}=globalThis,Ug=typeof jg?.noColor=="boolean"?jg.noColor:!0,N0=!Ug;function EE(e){Ug||(N0=e)}function xE(){return N0}function Ae(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function ke(e,t){return N0?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function TE(e){return ke(e,Ae([0],0))}function vE(e){return ke(e,Ae([1],22))}function CE(e){return ke(e,Ae([2],22))}function SE(e){return ke(e,Ae([3],23))}function wE(e){return ke(e,Ae([4],24))}function DE(e){return ke(e,Ae([7],27))}function AE(e){return ke(e,Ae([8],28))}function kE(e){return ke(e,Ae([9],29))}function _E(e){return ke(e,Ae([30],39))}function LE(e){return ke(e,Ae([31],39))}function FE(e){return ke(e,Ae([32],39))}function PE(e){return ke(e,Ae([33],39))}function ME(e){return ke(e,Ae([34],39))}function BE(e){return ke(e,Ae([35],39))}function RE(e){return ke(e,Ae([36],39))}function IE(e){return ke(e,Ae([37],39))}function OE(e){return Hg(e)}function Hg(e){return ke(e,Ae([90],39))}function NE(e){return ke(e,Ae([91],39))}function jE(e){return ke(e,Ae([92],39))}function UE(e){return ke(e,Ae([93],39))}function HE(e){return ke(e,Ae([94],39))}function zE(e){return ke(e,Ae([95],39))}function qE(e){return ke(e,Ae([96],39))}function WE(e){return ke(e,Ae([97],39))}function $E(e){return ke(e,Ae([40],49))}function GE(e){return ke(e,Ae([41],49))}function VE(e){return ke(e,Ae([42],49))}function KE(e){return ke(e,Ae([43],49))}function YE(e){return ke(e,Ae([44],49))}function JE(e){return ke(e,Ae([45],49))}function XE(e){return ke(e,Ae([46],49))}function QE(e){return ke(e,Ae([47],49))}function ZE(e){return ke(e,Ae([100],49))}function ex(e){return ke(e,Ae([101],49))}function tx(e){return ke(e,Ae([102],49))}function nx(e){return ke(e,Ae([103],49))}function rx(e){return ke(e,Ae([104],49))}function ax(e){return ke(e,Ae([105],49))}function ox(e){return ke(e,Ae([106],49))}function ix(e){return ke(e,Ae([107],49))}function Pr(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function sx(e,t){return ke(e,Ae([38,5,Pr(t)],39))}function ux(e,t){return ke(e,Ae([48,5,Pr(t)],49))}function lx(e,t){return typeof t=="number"?ke(e,Ae([38,2,t>>16&255,t>>8&255,t&255],39)):ke(e,Ae([38,2,Pr(t.r),Pr(t.g),Pr(t.b)],39))}function cx(e,t){return typeof t=="number"?ke(e,Ae([48,2,t>>16&255,t>>8&255,t&255],49)):ke(e,Ae([48,2,Pr(t.r),Pr(t.g),Pr(t.b)],49))}var dx=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function mx(e){return e.replace(dx,"")}d();d();var j0=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},px={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function U0(e,t){let n={...px,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let o=0;osetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=i}throw new j0(a,n.maxAttempts)}d();var gr=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function fi(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=gr[(t[r-2]&3)<<4|t[r-1]>>4],n+=gr[(t[r-1]&15)<<2|t[r]>>6],n+=gr[t[r]&63];return r===a+1&&(n+=gr[t[r-2]>>2],n+=gr[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=gr[t[r-2]>>2],n+=gr[(t[r-2]&3)<<4|t[r-1]>>4],n+=gr[(t[r-1]&15)<<2],n+="="),n}d();d();var gx=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,fx=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,hx=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,H0={Space_Separator:gx,ID_Start:fx,ID_Continue:hx},vt={isSpaceSeparator(e){return typeof e=="string"&&H0.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||H0.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||H0.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},q0,cn,hr,Ws,Mr,Un,Bt,G0,bi,bx=function(e,t){q0=String(e),cn="start",hr=[],Ws=0,Mr=1,Un=0,Bt=void 0,G0=void 0,bi=void 0;do Bt=yx(),Tx[cn]();while(Bt.type!=="eof");return typeof t=="function"?W0({"":bi},"",t):bi};function W0(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=br();if(!vt.isHexDigit(n))throw lt($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var Tx={start(){if(Mt.type==="eof")throw xa();q0()},beforePropertyName(){switch(Mt.type){case"identifier":case"string":V0=Mt.value,cn="afterPropertyName";return;case"punctuator":qs();return;case"eof":throw xa()}},afterPropertyName(){if(Mt.type==="eof")throw xa();cn="beforePropertyValue"},beforePropertyValue(){if(Mt.type==="eof")throw xa();q0()},beforeArrayValue(){if(Mt.type==="eof")throw xa();if(Mt.type==="punctuator"&&Mt.value==="]"){qs();return}q0()},afterPropertyValue(){if(Mt.type==="eof")throw xa();switch(Mt.value){case",":cn="beforePropertyName";return;case"}":qs()}},afterArrayValue(){if(Mt.type==="eof")throw xa();switch(Mt.value){case",":cn="beforeArrayValue";return;case"]":qs()}},end(){}};function q0(){let e;switch(Mt.type){case"punctuator":switch(Mt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Mt.value;break}if(hi===void 0)hi=e;else{let t=hr[hr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,V0,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")hr.push(e),Array.isArray(e)?cn="beforeArrayValue":cn="beforePropertyName";else{let t=hr[hr.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}}function qs(){hr.pop();let e=hr[hr.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}function lt(e){return K0(e===void 0?`JSON5: invalid end of input at ${Mr}:${Un}`:`JSON5: invalid character '${vx(e)}' at ${Mr}:${Un}`)}function xa(){return K0(`JSON5: invalid end of input at ${Mr}:${Un}`)}function zg(){return Un-=5,K0(`JSON5: invalid identifier character at ${Mr}:${Un}`)}function vx(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function K0(e){let t=new SyntaxError(e);return t.lineNumber=Mr,t.columnNumber=Un,t}var Cx=function(e,t,n){let r=[],a="",o,i,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")i=t;else if(Array.isArray(t)){o=[];for(let f of t){let y;typeof f=="string"?y=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(y=String(f)),y!==void 0&&o.indexOf(y)<0&&o.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(f,y){let b=y[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),i&&(b=i.call(y,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?p(b):m(b)}function c(f){let y={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let y=a;a=a+s;let b=o||Object.keys(f),h=[];for(let w of b){let k=l(w,f);if(k!==void 0){let R=g(w)+":";s!==""&&(R+=" "),R+=k,h.push(R)}}let C;if(h.length===0)C="{}";else{let w;if(s==="")w=h.join(","),C="{"+w+"}";else{let k=`, +`&&$(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw lt($());case void 0:throw lt($())}return $()}function xx(){let e="",t=br();if(!vt.isHexDigit(t)||(e+=$(),t=br(),!vt.isHexDigit(t)))throw lt($());return e+=$(),String.fromCodePoint(parseInt(e,16))}function $0(){let e="",t=4;for(;t-- >0;){let n=br();if(!vt.isHexDigit(n))throw lt($());e+=$()}return String.fromCodePoint(parseInt(e,16))}var Tx={start(){if(Bt.type==="eof")throw xa();z0()},beforePropertyName(){switch(Bt.type){case"identifier":case"string":G0=Bt.value,cn="afterPropertyName";return;case"punctuator":qs();return;case"eof":throw xa()}},afterPropertyName(){if(Bt.type==="eof")throw xa();cn="beforePropertyValue"},beforePropertyValue(){if(Bt.type==="eof")throw xa();z0()},beforeArrayValue(){if(Bt.type==="eof")throw xa();if(Bt.type==="punctuator"&&Bt.value==="]"){qs();return}z0()},afterPropertyValue(){if(Bt.type==="eof")throw xa();switch(Bt.value){case",":cn="beforePropertyName";return;case"}":qs()}},afterArrayValue(){if(Bt.type==="eof")throw xa();switch(Bt.value){case",":cn="beforeArrayValue";return;case"]":qs()}},end(){}};function z0(){let e;switch(Bt.type){case"punctuator":switch(Bt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Bt.value;break}if(bi===void 0)bi=e;else{let t=hr[hr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,G0,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")hr.push(e),Array.isArray(e)?cn="beforeArrayValue":cn="beforePropertyName";else{let t=hr[hr.length-1];t==null?cn="end":Array.isArray(t)?cn="afterArrayValue":cn="afterPropertyValue"}}function qs(){hr.pop();let e=hr[hr.length-1];e==null?cn="end":Array.isArray(e)?cn="afterArrayValue":cn="afterPropertyValue"}function lt(e){return V0(e===void 0?`JSON5: invalid end of input at ${Mr}:${Un}`:`JSON5: invalid character '${vx(e)}' at ${Mr}:${Un}`)}function xa(){return V0(`JSON5: invalid end of input at ${Mr}:${Un}`)}function zg(){return Un-=5,V0(`JSON5: invalid identifier character at ${Mr}:${Un}`)}function vx(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function V0(e){let t=new SyntaxError(e);return t.lineNumber=Mr,t.columnNumber=Un,t}var Cx=function(e,t,n){let r=[],a="",o,i,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")i=t;else if(Array.isArray(t)){o=[];for(let f of t){let y;typeof f=="string"?y=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(y=String(f)),y!==void 0&&o.indexOf(y)<0&&o.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(f,y){let b=y[f];switch(b!=null&&(typeof b.toJSON5=="function"?b=b.toJSON5(f):typeof b.toJSON=="function"&&(b=b.toJSON(f))),i&&(b=i.call(y,f,b)),b instanceof Number?b=Number(b):b instanceof String?b=String(b):b instanceof Boolean&&(b=b.valueOf()),b){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof b=="string")return c(b,!1);if(typeof b=="number")return String(b);if(typeof b=="object")return Array.isArray(b)?p(b):m(b)}function c(f){let y={"'":.1,'"':.2},b={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},h="";for(let w=0;wy[w]=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let y=a;a=a+s;let b=o||Object.keys(f),h=[];for(let w of b){let k=l(w,f);if(k!==void 0){let R=g(w)+":";s!==""&&(R+=" "),R+=k,h.push(R)}}let C;if(h.length===0)C="{}";else{let w;if(s==="")w=h.join(","),C="{"+w+"}";else{let k=`, `+a;w=h.join(k),C=`{ `+a+w+`, `+y+"}"}}return r.pop(),a=y,C}function g(f){if(f.length===0)return c(f,!0);let y=String.fromCodePoint(f.codePointAt(0));if(!vt.isIdStartChar(y))return c(f,!0);for(let b=y.length;b=0)throw TypeError("Converting circular structure to JSON5");r.push(f);let y=a;a=a+s;let b=[];for(let C=0;C()=>(t||e((t={exports:{}}).exports,t),t.exports),Mx=(e,t)=>{for(var n in t)J0(e,n,{get:t[n],enumerable:!0})},Y0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _x(t))!Fx.call(e,a)&&a!==n&&J0(e,a,{get:()=>t[a],enumerable:!(r=kx(t,a))||r.enumerable});return e},Bx=(e,t,n)=>(Y0(e,t,"default"),n&&Y0(n,t,"default")),$g=(e,t,n)=>(n=e!=null?Ax(Lx(e)):{},Y0(t||!e||!e.__esModule?J0(n,"default",{value:e,enumerable:!0}):n,e)),Gg=Px((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Gs=="object"&&Gs&&Gs.Object===Object&&Gs,m=typeof self=="object"&&self&&self.Object===Object&&self,g=c||m||Function("return this")(),p=Object.prototype,f=p.toString,y=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(B,_,E){var O,F,M,N,U,H,L=0,S=!1,A=!1,j=!0;if(typeof B!="function")throw new TypeError(n);_=x(_)||0,k(E)&&(S=!!E.leading,A="maxWait"in E,M=A?y(x(E.maxWait)||0,_):M,j="trailing"in E?!!E.trailing:j);function q(ee){var Y=O,be=F;return O=F=void 0,L=ee,N=B.apply(be,Y),N}function z(ee){return L=ee,U=setTimeout(ue,_),S?q(ee):N}function W(ee){var Y=ee-H,be=ee-L,ne=_-Y;return A?b(ne,M-be):ne}function V(ee){var Y=ee-H,be=ee-L;return H===void 0||Y>=_||Y<0||A&&be>=M}function ue(){var ee=h();if(V(ee))return ae(ee);U=setTimeout(ue,W(ee))}function ae(ee){return U=void 0,j&&O?q(ee):(O=F=void 0,N)}function X(){U!==void 0&&clearTimeout(U),L=0,O=H=F=U=void 0}function ie(){return U===void 0?N:ae(h())}function pe(){var ee=h(),Y=V(ee);if(O=arguments,F=this,H=ee,Y){if(U===void 0)return z(H);if(A)return U=setTimeout(ue,_),q(H)}return U===void 0&&(U=setTimeout(ue,_)),N}return pe.cancel=X,pe.flush=ie,pe}function w(B,_,E){var O=!0,F=!0;if(typeof B!="function")throw new TypeError(n);return k(E)&&(O="leading"in E?!!E.leading:O,F="trailing"in E?!!E.trailing:F),C(B,_,{leading:O,maxWait:_,trailing:F})}function k(B){var _=typeof B;return!!B&&(_=="object"||_=="function")}function R(B){return!!B&&typeof B=="object"}function v(B){return typeof B=="symbol"||R(B)&&f.call(B)==a}function x(B){if(typeof B=="number")return B;if(v(B))return r;if(k(B)){var _=typeof B.valueOf=="function"?B.valueOf():B;B=k(_)?_+"":_}if(typeof B!="string")return B===0?B:+B;B=B.replace(o,"");var E=s.test(B);return E||u.test(B)?l(B.slice(2),E?2:8):i.test(B)?r:+B}t.exports=w}),Vg={};Mx(Vg,{default:()=>Hn});var Rx=$g(Gg());Bx(Vg,$g(Gg()));var{default:Wg,...Ix}=Rx,Hn=Wg!==void 0?Wg:Ix;d();d();var Vs=globalThis||(typeof window<"u"?window:self),Ox=Object.create,Q0=Object.defineProperty,Nx=Object.getOwnPropertyDescriptor,jx=Object.getOwnPropertyNames,Ux=Object.getPrototypeOf,Hx=Object.prototype.hasOwnProperty,zx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qx=(e,t)=>{for(var n in t)Q0(e,n,{get:t[n],enumerable:!0})},X0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jx(t))!Hx.call(e,a)&&a!==n&&Q0(e,a,{get:()=>t[a],enumerable:!(r=Nx(t,a))||r.enumerable});return e},Wx=(e,t,n)=>(X0(e,t,"default"),n&&X0(n,t,"default")),Yg=(e,t,n)=>(n=e!=null?Ox(Ux(e)):{},X0(t||!e||!e.__esModule?Q0(n,"default",{value:e,enumerable:!0}):n,e)),Jg=zx((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Vs=="object"&&Vs&&Vs.Object===Object&&Vs,m=typeof self=="object"&&self&&self.Object===Object&&self,g=c||m||Function("return this")(),p=Object.prototype,f=p.toString,y=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(x,B,_){var E,O,F,M,N,U,H=0,L=!1,S=!1,A=!0;if(typeof x!="function")throw new TypeError(n);B=v(B)||0,w(_)&&(L=!!_.leading,S="maxWait"in _,F=S?y(v(_.maxWait)||0,B):F,A="trailing"in _?!!_.trailing:A);function j(pe){var ee=E,Y=O;return E=O=void 0,H=pe,M=x.apply(Y,ee),M}function q(pe){return H=pe,N=setTimeout(V,B),L?j(pe):M}function z(pe){var ee=pe-U,Y=pe-H,be=B-ee;return S?b(be,F-Y):be}function W(pe){var ee=pe-U,Y=pe-H;return U===void 0||ee>=B||ee<0||S&&Y>=F}function V(){var pe=h();if(W(pe))return ue(pe);N=setTimeout(V,z(pe))}function ue(pe){return N=void 0,A&&E?j(pe):(E=O=void 0,M)}function ae(){N!==void 0&&clearTimeout(N),H=0,E=U=O=N=void 0}function X(){return N===void 0?M:ue(h())}function ie(){var pe=h(),ee=W(pe);if(E=arguments,O=this,U=pe,ee){if(N===void 0)return q(U);if(S)return N=setTimeout(V,B),j(U)}return N===void 0&&(N=setTimeout(V,B)),M}return ie.cancel=ae,ie.flush=X,ie}function w(x){var B=typeof x;return!!x&&(B=="object"||B=="function")}function k(x){return!!x&&typeof x=="object"}function R(x){return typeof x=="symbol"||k(x)&&f.call(x)==a}function v(x){if(typeof x=="number")return x;if(R(x))return r;if(w(x)){var B=typeof x.valueOf=="function"?x.valueOf():x;x=w(B)?B+"":B}if(typeof x!="string")return x===0?x:+x;x=x.replace(o,"");var _=s.test(x);return _||u.test(x)?l(x.slice(2),_?2:8):i.test(x)?r:+x}t.exports=C}),Xg={};qx(Xg,{default:()=>bi});var $x=Yg(Jg());Wx(Xg,Yg(Jg()));var{default:Kg,...Gx}=$x,bi=Kg!==void 0?Kg:Gx;d();d();var Vx=Object.create,ec=Object.defineProperty,Kx=Object.getOwnPropertyDescriptor,Yx=Object.getOwnPropertyNames,Jx=Object.getPrototypeOf,Xx=Object.prototype.hasOwnProperty,Qx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zx=(e,t)=>{for(var n in t)ec(e,n,{get:t[n],enumerable:!0})},Z0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yx(t))!Xx.call(e,a)&&a!==n&&ec(e,a,{get:()=>t[a],enumerable:!(r=Kx(t,a))||r.enumerable});return e},eT=(e,t,n)=>(Z0(e,t,"default"),n&&Z0(n,t,"default")),Zg=(e,t,n)=>(n=e!=null?Vx(Jx(e)):{},Z0(t||!e||!e.__esModule?ec(n,"default",{value:e,enumerable:!0}):n,e)),e4=Qx((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(o){if(a[o])return a[o].exports;var i=a[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var a={};return r.m=n,r.c=a,r.i=function(o){return o},r.d=function(o,i,s){r.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:s})},r.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(i,"a",i),i},r.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(o){var i,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,m){l(r)==="object"&&l(o)==="object"?o.exports=m():(s=[],i=m,u=typeof i=="function"?i.apply(r,s):i,u!==void 0&&(o.exports=u))})(void 0,function(){return function(c){function m(p){if(g[p])return g[p].exports;var f=g[p]={i:p,l:!1,exports:{}};return c[p].call(f.exports,f,f.exports,m),f.l=!0,f.exports}var g={};return m.m=c,m.c=g,m.i=function(p){return p},m.d=function(p,f,y){m.o(p,f)||Object.defineProperty(p,f,{configurable:!1,enumerable:!0,get:y})},m.n=function(p){var f=p&&p.__esModule?function(){return p.default}:function(){return p};return m.d(f,"a",f),f},m.o=function(p,f){return Object.prototype.hasOwnProperty.call(p,f)},m.p="",m(m.s=0)}([function(c,m,g){function p(z,W){var V={};for(var ue in z)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(z,ue)&&(V[ue]=z[ue]);return V}Object.defineProperty(m,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(z){return typeof z>"u"?"undefined":l(z)}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z>"u"?"undefined":l(z)},y=Object.assign||function(z){for(var W=1;W'+ue+"
",be.onclick=function(){return F(ne,Y)},be.listener=function(re){(_(re)||E(re))&&U()},O(be,Y),X&&X<1&&(X=1),!pe&&X&&k(X).then(function(){return F(ne,Y)})},L=m.force=function(z,W){var V=z.type,ue=V===void 0?5:V,ae=z.text,X=z.buttonText,ie=X===void 0?"OK":X,pe=z.callback,ee=z.position,Y=ee===void 0?h.positions.force||Y.top:ee;R(),U();var be=document.createElement("div"),ne=v();be.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var Te=document.createElement("div");Te.classList.add(h.classes.button),Te.classList.add(x[ue]),Te.innerHTML=ie,Te.onclick=function(){F(ne,Y),N(),pe?pe():W&&W()},be.appendChild(re),be.appendChild(Te),be.listener=function(Re){_(Re)&&Te.click()},O(be,Y),M()},S=m.confirm=function(z,W,V){var ue=z.text,ae=z.submitText,X=ae===void 0?"Yes":ae,ie=z.cancelText,pe=ie===void 0?"Cancel":ie,ee=z.submitCallback,Y=z.cancelCallback,be=z.position,ne=be===void 0?h.positions.confirm||ne.top:be;R(),U();var re=document.createElement("div"),Te=v();re.id=Te;var Re=document.createElement("div");Re.classList.add(h.classes.textbox),Re.classList.add(h.classes.backgroundInfo),Re.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=X,_e.onclick=function(){F(Te,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=pe,de.onclick=function(){F(Te,ne),N(),Y?Y():V&&V()},re.appendChild(Re),re.appendChild(_e),re.appendChild(de),re.listener=function(mt){_(mt)?_e.click():E(mt)&&de.click()},O(re,ne),M(re,ne)},A=function(z,W,V){var ue=z.text,ae=z.submitText,X=ae===void 0?"Submit":ae,ie=z.cancelText,pe=ie===void 0?"Cancel":ie,ee=z.submitCallback,Y=z.cancelCallback,be=z.position,ne=be===void 0?h.positions.input||ne.top:be,re=p(z,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);R(),U();var Te=document.createElement("div"),Re=v();Te.id=Re;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var Tt="",sn=re.allowed,Mn=0;Mn'+V+"",Y.appendChild(ne),ie.forEach(function(Te,Re){var _e=Te.type,de=_e===void 0?1:_e,mt=Te.text,kt=Te.handler,bt=document.createElement("div");bt.classList.add(x[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var Tt=ie[Re+1];Tt&&!Tt.type&&(Tt.type=1),Tt&&Tt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=mt,bt.onclick=function(){F(be,ee),N(),kt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){F(be,ee),N(),X?X():W&&W()},Y.appendChild(re),Y.listener=function(Te){E(Te)&&re.click()},O(Y,ee),M(Y,ee)},q=m.date=function(z,W,V){var ue=z.value,ae=ue===void 0?new Date:ue,X=z.submitText,ie=X===void 0?"OK":X,pe=z.cancelText,ee=pe===void 0?"Cancel":pe,Y=z.submitCallback,be=z.cancelCallback,ne=z.position,re=ne===void 0?h.positions.date||re.top:ne;R(),U();var Te="▾",Re=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),mt=function(pt){Re.innerHTML=h.dateMonths[pt.getMonth()],_e.innerHTML=pt.getDate(),de.innerHTML=pt.getFullYear()},kt=function(pt){var Je=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),wn=pt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(wn)>Je&&(wn=Je.toString()),pt.target.textContent=wn,Number(wn)<1&&(wn="1"),ae.setDate(Number(wn))},bt=function(pt){var Je=pt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);pt.target.textContent=Je,ae.setFullYear(Number(Je))},Tt=function(pt){mt(ae)},sn=function(pt){var Je=new Date(ae.getFullYear(),ae.getMonth()+pt+1,0).getDate();ae.getDate()>Je&&ae.setDate(Je),ae.setMonth(ae.getMonth()+pt),mt(ae)},Mn=function(pt){ae.setDate(ae.getDate()+pt),mt(ae)},mi=function(pt){var Je=ae.getFullYear()+pt;Je<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+pt),mt(ae)},er=document.createElement("div"),ba=v();er.id=ba;var Xa=document.createElement("div");Xa.classList.add(h.classes.backgroundInfo);var Vt=document.createElement("div");Vt.classList.add(h.classes.dateSelectorInner);var jn=document.createElement("div");jn.classList.add(h.classes.button),jn.classList.add(h.classes.elementThird),jn.classList.add(h.classes.dateSelectorUp),jn.innerHTML=Te;var Kt=document.createElement("div");Kt.classList.add(h.classes.button),Kt.classList.add(h.classes.elementThird),Kt.classList.add(h.classes.dateSelectorUp),Kt.innerHTML=Te;var Sn=document.createElement("div");Sn.classList.add(h.classes.button),Sn.classList.add(h.classes.elementThird),Sn.classList.add(h.classes.dateSelectorUp),Sn.innerHTML=Te,Re.classList.add(h.classes.element),Re.classList.add(h.classes.elementThird),Re.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",kt),_e.addEventListener("blur",Tt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",Tt),de.innerHTML=ae.getFullYear();var lr=document.createElement("div");lr.classList.add(h.classes.button),lr.classList.add(h.classes.elementThird),lr.innerHTML=Te;var cr=document.createElement("div");cr.classList.add(h.classes.button),cr.classList.add(h.classes.elementThird),cr.innerHTML=Te;var ya=document.createElement("div");ya.classList.add(h.classes.button),ya.classList.add(h.classes.elementThird),ya.innerHTML=Te,jn.onclick=function(){return sn(1)},Kt.onclick=function(){return Mn(1)},Sn.onclick=function(){return mi(1)},lr.onclick=function(){return sn(-1)},cr.onclick=function(){return Mn(-1)},ya.onclick=function(){return mi(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){F(ba,re),N(),Y?Y(ae):W&&W(ae)};var dr=document.createElement("div");dr.classList.add(h.classes.button),dr.classList.add(h.classes.elementHalf),dr.classList.add(h.classes.backgroundError),dr.innerHTML=ee,dr.onclick=function(){F(ba,re),N(),be?be(ae):V&&V(ae)},Vt.appendChild(jn),Vt.appendChild(Kt),Vt.appendChild(Sn),Vt.appendChild(Re),Vt.appendChild(_e),Vt.appendChild(de),Vt.appendChild(lr),Vt.appendChild(cr),Vt.appendChild(ya),Xa.appendChild(Vt),er.appendChild(Xa),er.appendChild(un),er.appendChild(dr),er.listener=function(pt){_(pt)?un.click():E(pt)&&dr.click()},O(er,re),M(er,re)};m.default={alert:H,force:L,confirm:S,input:A,select:j,date:q,setOptions:C,hideAlerts:U}}])})}).call(r,a(0)(n))}])})}),t4={};Zx(t4,{default:()=>Ks});var tT=Zg(e4());eT(t4,Zg(e4()));var{default:Qg,...nT}=tT,Ks=Qg!==void 0?Qg:nT;d();d();var Ys=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function yi(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function tc(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function n4(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let o=0;oto[e.toLowerCase()]||zn[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),rT=e=>Object.keys(to).find(t=>to[t]===e),aT=e=>Object.keys(zn).find(t=>zn[t]===e);function u4(e){i4=e||"all"}function Ei(){return i4||"all"}function oT(){return et.slice(0)}function iT(){return et.map(e=>rT(e)||aT(e)||String.fromCharCode(e))}function sT(){let e=[];return Object.keys(gt).forEach(t=>{gt[t].forEach(({key:n,scope:r,mods:a,shortcut:o})=>{e.push({scope:r,shortcut:o,mods:a,keys:n.split("+").map(i=>xi(i))})})}),e}function uT(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function lT(e){return typeof e=="string"&&(e=xi(e)),et.indexOf(e)!==-1}function cT(e,t){let n,r;e||(e=Ei());for(let a in gt)if(Object.prototype.hasOwnProperty.call(gt,a))for(n=gt[a],r=0;r=0&&et.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&et.splice(0,et.length),(t===93||t===224)&&(t=91),t in Bt){Bt[t]=!1;for(let r in zn)zn[r]===t&&(yr[r]=!1)}}function l4(e,...t){if(typeof e>"u")Object.keys(gt).forEach(n=>delete gt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&rc(n)});else if(typeof e=="object")e.key&&rc(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),rc({key:e,scope:n,method:r,splitKey:"+"})}}var rc=({key:e,scope:t,method:n,splitKey:r="+"})=>{nc(e).forEach(o=>{let i=o.split(r),s=i.length,u=i[s-1],l=u==="*"?"*":xi(u);if(!gt[l])return;t||(t=Ei());let c=s>1?tc(zn,i):[];gt[l]=gt[l].filter(m=>!((n?m.method===n:!0)&&m.scope===t&&n4(m.mods,c)))})};function a4(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let o in Bt)Object.prototype.hasOwnProperty.call(Bt,o)&&(!Bt[o]&&t.mods.indexOf(+o)>-1||Bt[o]&&t.mods.indexOf(+o)===-1)&&(a=!1);(t.mods.length===0&&!Bt[16]&&!Bt[18]&&!Bt[17]&&!Bt[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(et),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function o4(e,t){let n=gt["*"],r=e.keyCode||e.which||e.charCode;if(!yr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),et.indexOf(r)===-1&&r!==229&&et.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(o=>{let i=Js[o];e[o]&&et.indexOf(i)===-1?et.push(i):!e[o]&&et.indexOf(i)>-1?et.splice(et.indexOf(i),1):o==="metaKey"&&e[o]&&et.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(et=et.slice(et.indexOf(i))))}),r in Bt){Bt[r]=!0;for(let o in zn)zn[o]===r&&(yr[o]=!0);if(!n)return}for(let o in Bt)Object.prototype.hasOwnProperty.call(Bt,o)&&(Bt[o]=e[Js[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(et.indexOf(17)===-1&&et.push(17),et.indexOf(18)===-1&&et.push(18),Bt[17]=!0,Bt[18]=!0);let a=Ei();if(n)for(let o=0;o-1}function yr(e,t,n){et=[];let r=nc(e),a=[],o="all",i=document,s=0,u=!1,l=!0,c="+",m=!1,g=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(i=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(m=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(g=!0)),typeof t=="string"&&(o=t),g&&l4(e,o);s1&&(a=tc(zn,e)),e=e[e.length-1],e=e==="*"?"*":xi(e),e in gt||(gt[e]=[]),gt[e].push({keyup:u,keydown:l,scope:o,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:i});typeof i<"u"&&!mT(i)&&window&&(s4.push(i),yi(i,"keydown",p=>{o4(p,i)},m),r4||(r4=!0,yi(window,"focus",()=>{et=[]},m),yi(window,"click",()=>{et=[]},!1)),yi(i,"keyup",p=>{o4(p,i),dT(p)},m))}function pT(e,t="all"){Object.keys(gt).forEach(n=>{gt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var ac={getPressedKeyString:iT,setScope:u4,getScope:Ei,deleteScope:cT,getPressedKeyCodes:oT,getAllKeyCodes:sT,isPressed:lT,filter:uT,trigger:pT,unbind:l4,keyMap:to,modifier:zn,modifierMap:Js};for(let e in ac)Object.prototype.hasOwnProperty.call(ac,e)&&(yr[e]=ac[e]);if(typeof window<"u"){let e=window.hotkeys;yr.noConflict=t=>(t&&window.hotkeys===yr&&(window.hotkeys=e),yr),window.hotkeys=yr}var xn=yr;d();d();var gT={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},d4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Br={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=G.getVersionPrecision(e),a=G.getVersionPrecision(t),o=Math.max(r,a),i=0,s=G.map([e,t],u=>{let l=o-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),m=>new Array(20-m.length).join("0")+m).reverse()});for(n&&(i=o-Math.min(r,a)),o-=1;o>=i;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===i)return 0;o-=1}else if(s[0][o]{n[i]=o[i]})}return e}static getBrowserAlias(e){return gT[e]}static getBrowserTypeByAlias(e){return d4[e]||""}},tt=/version\/(\d+(\.?_?\d+)+)/i,fT=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=G.getFirstMatch(tt,e)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=G.getFirstMatch(tt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:G.getFirstMatch(r,e),version:G.getSecondMatch(r,e)}}}],hT=fT,bT=[{test:[/Roku\/DVP/],describe(e){let t=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:dn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:dn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=G.getWindowsVersionName(t);return{name:dn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(t),r={name:dn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:dn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=G.getAndroidVersionName(t),r={name:dn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:dn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||G.getFirstMatch(/\bbb(\d+)/i,e);return{name:dn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:dn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:dn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:dn.PlayStation4,version:t}}}],yT=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=G.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=G.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ct.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ct.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],ET=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Br.Blink};let t=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Br.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Br.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:Br.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:Br.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Br.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:Br.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],xT=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=G.find(hT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=G.find(bT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=G.find(yT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=G.find(ET,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?(r[o]=i,a+=1):typeof i=="object"&&(t[o]=i,n+=1)}),n>0){let o=Object.keys(t),i=G.find(o,u=>this.isOS(u));if(i){let u=this.satisfies(t[i]);if(u!==void 0)return u}let s=G.find(o,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let o=Object.keys(r),i=G.find(o,s=>this.isBrowser(s,!0));if(i!==void 0)return this.compareVersion(r[i])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=G.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(G.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},c4=xT,TT=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new c4(e,t)}static parse(e){return new c4(e).getResult()}static get BROWSER_MAP(){return d4}static get ENGINE_MAP(){return Br}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},no=TT;d();d();var{entries:E4,setPrototypeOf:m4,isFrozen:vT,getPrototypeOf:CT,getOwnPropertyDescriptor:ST}=Object,{freeze:mn,seal:Wn,create:wT}=Object,{apply:cc,construct:dc}=typeof Reflect<"u"&&Reflect;cc||(cc=function(e,t,n){return e.apply(t,n)});mn||(mn=function(e){return e});Wn||(Wn=function(e){return e});dc||(dc=function(e,t){return new e(...t)});var DT=Rn(Array.prototype.forEach),p4=Rn(Array.prototype.pop),Ti=Rn(Array.prototype.push),Zs=Rn(String.prototype.toLowerCase),oc=Rn(String.prototype.toString),AT=Rn(String.prototype.match),qn=Rn(String.prototype.replace),kT=Rn(String.prototype.indexOf),_T=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),vi=LT(TypeError);function Rn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),RT=Wn(/\${[\w\W]*}/gm),IT=Wn(/^data-[\-\w.\u00B7-\uFFFF]/),OT=Wn(/^aria-[\-\w]+$/),x4=Wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NT=Wn(/^(?:\w+script|data):/i),jT=Wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T4=Wn(/^html$/i),y4=Object.freeze({__proto__:null,MUSTACHE_EXPR:MT,ERB_EXPR:BT,TMPLIT_EXPR:RT,DATA_ATTR:IT,ARIA_ATTR:OT,IS_ALLOWED_URI:x4,IS_SCRIPT_OR_DATA:NT,ATTR_WHITESPACE:jT,DOCTYPE_NAME:T4}),UT=()=>typeof window>"u"?null:window,HT=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}};function v4(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UT(),t=I=>v4(I);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:p}=e,f=u.prototype,y=Xs(f,"cloneNode"),b=Xs(f,"nextSibling"),h=Xs(f,"childNodes"),C=Xs(f,"parentNode");if(typeof i=="function"){let I=a.createElement("template");I.content&&I.content.ownerDocument&&(a=I.content.ownerDocument)}let w,k="",{implementation:R,createNodeIterator:v,createDocumentFragment:x,getElementsByTagName:B}=a,{importNode:_}=n,E={};t.isSupported=typeof E4=="function"&&typeof C=="function"&&R&&R.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:F,TMPLIT_EXPR:M,DATA_ATTR:N,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:L}=y4,{IS_ALLOWED_URI:S}=y4,A=null,j=Be({},[...g4,...ic,...sc,...uc,...f4]),q=null,z=Be({},[...h4,...lc,...b4,...Qs]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ue=null,ae=!0,X=!0,ie=!1,pe=!0,ee=!1,Y=!1,be=!1,ne=!1,re=!1,Te=!1,Re=!1,_e=!0,de=!1,mt="user-content-",kt=!0,bt=!1,Tt={},sn=null,Mn=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),mi=null,er=Be({},["audio","video","img","source","image","track"]),ba=null,Xa=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",jn="http://www.w3.org/2000/svg",Kt="http://www.w3.org/1999/xhtml",Sn=Kt,lr=!1,cr=null,ya=Be({},[Vt,jn,Kt],oc),un,dr=["application/xhtml+xml","text/html"],pt="text/html",Je,wn=null,_6=a.createElement("form"),fg=function(I){return I instanceof RegExp||I instanceof Function},F0=function(I){if(!(wn&&wn===I)){if((!I||typeof I!="object")&&(I={}),I=ro(I),un=dr.indexOf(I.PARSER_MEDIA_TYPE)===-1?un=pt:un=I.PARSER_MEDIA_TYPE,Je=un==="application/xhtml+xml"?oc:Zs,A="ALLOWED_TAGS"in I?Be({},I.ALLOWED_TAGS,Je):j,q="ALLOWED_ATTR"in I?Be({},I.ALLOWED_ATTR,Je):z,cr="ALLOWED_NAMESPACES"in I?Be({},I.ALLOWED_NAMESPACES,oc):ya,ba="ADD_URI_SAFE_ATTR"in I?Be(ro(Xa),I.ADD_URI_SAFE_ATTR,Je):Xa,mi="ADD_DATA_URI_TAGS"in I?Be(ro(er),I.ADD_DATA_URI_TAGS,Je):er,sn="FORBID_CONTENTS"in I?Be({},I.FORBID_CONTENTS,Je):Mn,V="FORBID_TAGS"in I?Be({},I.FORBID_TAGS,Je):{},ue="FORBID_ATTR"in I?Be({},I.FORBID_ATTR,Je):{},Tt="USE_PROFILES"in I?I.USE_PROFILES:!1,ae=I.ALLOW_ARIA_ATTR!==!1,X=I.ALLOW_DATA_ATTR!==!1,ie=I.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=I.SAFE_FOR_TEMPLATES||!1,Y=I.WHOLE_DOCUMENT||!1,re=I.RETURN_DOM||!1,Te=I.RETURN_DOM_FRAGMENT||!1,Re=I.RETURN_TRUSTED_TYPE||!1,ne=I.FORCE_BODY||!1,_e=I.SANITIZE_DOM!==!1,de=I.SANITIZE_NAMED_PROPS||!1,kt=I.KEEP_CONTENT!==!1,bt=I.IN_PLACE||!1,S=I.ALLOWED_URI_REGEXP||x4,Sn=I.NAMESPACE||Kt,W=I.CUSTOM_ELEMENT_HANDLING||{},I.CUSTOM_ELEMENT_HANDLING&&fg(I.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=I.CUSTOM_ELEMENT_HANDLING.tagNameCheck),I.CUSTOM_ELEMENT_HANDLING&&fg(I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(X=!1),Te&&(re=!0),Tt&&(A=Be({},[...f4]),q=[],Tt.html===!0&&(Be(A,g4),Be(q,h4)),Tt.svg===!0&&(Be(A,ic),Be(q,lc),Be(q,Qs)),Tt.svgFilters===!0&&(Be(A,sc),Be(q,lc),Be(q,Qs)),Tt.mathMl===!0&&(Be(A,uc),Be(q,b4),Be(q,Qs))),I.ADD_TAGS&&(A===j&&(A=ro(A)),Be(A,I.ADD_TAGS,Je)),I.ADD_ATTR&&(q===z&&(q=ro(q)),Be(q,I.ADD_ATTR,Je)),I.ADD_URI_SAFE_ATTR&&Be(ba,I.ADD_URI_SAFE_ATTR,Je),I.FORBID_CONTENTS&&(sn===Mn&&(sn=ro(sn)),Be(sn,I.FORBID_CONTENTS,Je)),kt&&(A["#text"]=!0),Y&&Be(A,["html","head","body"]),A.table&&(Be(A,["tbody"]),delete V.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=I.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=HT(p,r)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));mn&&mn(I),wn=I}},hg=Be({},["mi","mo","mn","ms","mtext"]),bg=Be({},["foreignobject","desc","title","annotation-xml"]),L6=Be({},["title","style","font","a","script"]),Os=Be({},ic);Be(Os,sc),Be(Os,FT);let P0=Be({},uc);Be(P0,PT);let F6=function(I){let le=C(I);(!le||!le.tagName)&&(le={namespaceURI:Sn,tagName:"template"});let Q=Zs(I.tagName),qe=Zs(le.tagName);return cr[I.namespaceURI]?I.namespaceURI===jn?le.namespaceURI===Kt?Q==="svg":le.namespaceURI===Vt?Q==="svg"&&(qe==="annotation-xml"||hg[qe]):!!Os[Q]:I.namespaceURI===Vt?le.namespaceURI===Kt?Q==="math":le.namespaceURI===jn?Q==="math"&&bg[qe]:!!P0[Q]:I.namespaceURI===Kt?le.namespaceURI===jn&&!bg[qe]||le.namespaceURI===Vt&&!hg[qe]?!1:!P0[Q]&&(L6[Q]||!Os[Q]):!!(un==="application/xhtml+xml"&&cr[I.namespaceURI]):!1},Qa=function(I){Ti(t.removed,{element:I});try{I.parentNode.removeChild(I)}catch{I.remove()}},M0=function(I,le){try{Ti(t.removed,{attribute:le.getAttributeNode(I),from:le})}catch{Ti(t.removed,{attribute:null,from:le})}if(le.removeAttribute(I),I==="is"&&!q[I])if(re||Te)try{Qa(le)}catch{}else try{le.setAttribute(I,"")}catch{}},yg=function(I){let le,Q;if(ne)I=""+I;else{let ln=AT(I,/^[\r\n\t ]+/);Q=ln&&ln[0]}un==="application/xhtml+xml"&&Sn===Kt&&(I=''+I+"");let qe=w?w.createHTML(I):I;if(Sn===Kt)try{le=new g().parseFromString(qe,un)}catch{}if(!le||!le.documentElement){le=R.createDocument(Sn,"template",null);try{le.documentElement.innerHTML=lr?k:qe}catch{}}let _t=le.body||le.documentElement;return I&&Q&&_t.insertBefore(a.createTextNode(Q),_t.childNodes[0]||null),Sn===Kt?B.call(le,Y?"html":"body")[0]:Y?le.documentElement:_t},Eg=function(I){return v.call(I.ownerDocument||I,I,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},P6=function(I){return I instanceof m&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof c)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Ns=function(I){return typeof s=="object"?I instanceof s:I&&typeof I=="object"&&typeof I.nodeType=="number"&&typeof I.nodeName=="string"},mr=function(I,le,Q){E[I]&&DT(E[I],qe=>{qe.call(t,le,Q,wn)})},xg=function(I){let le;if(mr("beforeSanitizeElements",I,null),P6(I))return Qa(I),!0;let Q=Je(I.nodeName);if(mr("uponSanitizeElement",I,{tagName:Q,allowedTags:A}),I.hasChildNodes()&&!Ns(I.firstElementChild)&&(!Ns(I.content)||!Ns(I.content.firstElementChild))&&Dn(/<[/\w]/g,I.innerHTML)&&Dn(/<[/\w]/g,I.textContent))return Qa(I),!0;if(!A[Q]||V[Q]){if(!V[Q]&&vg(Q)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,Q)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Q)))return!1;if(kt&&!sn[Q]){let qe=C(I)||I.parentNode,_t=h(I)||I.childNodes;if(_t&&qe){let ln=_t.length;for(let En=ln-1;En>=0;--En)qe.insertBefore(y(_t[En],!0),b(I))}}return Qa(I),!0}return I instanceof u&&!F6(I)||(Q==="noscript"||Q==="noembed")&&Dn(/<\/no(script|embed)/i,I.innerHTML)?(Qa(I),!0):(ee&&I.nodeType===3&&(le=I.textContent,le=qn(le,O," "),le=qn(le,F," "),le=qn(le,M," "),I.textContent!==le&&(Ti(t.removed,{element:I.cloneNode()}),I.textContent=le)),mr("afterSanitizeElements",I,null),!1)},Tg=function(I,le,Q){if(_e&&(le==="id"||le==="name")&&(Q in a||Q in _6))return!1;if(!(X&&!ue[le]&&Dn(N,le))&&!(ae&&Dn(U,le))){if(!q[le]||ue[le]){if(!(vg(I)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,I)||W.tagNameCheck instanceof Function&&W.tagNameCheck(I))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,Q)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Q))))return!1}else if(!ba[le]&&!Dn(S,qn(Q,L,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&I!=="script"&&kT(Q,"data:")===0&&mi[I])&&!(ie&&!Dn(H,qn(Q,L,"")))&&Q)return!1}return!0},vg=function(I){return I.indexOf("-")>0},Cg=function(I){let le,Q,qe,_t;mr("beforeSanitizeAttributes",I,null);let{attributes:ln}=I;if(!ln)return;let En={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q};for(_t=ln.length;_t--;){le=ln[_t];let{name:Pt,namespaceURI:Za}=le;if(Q=Pt==="value"?le.value:_T(le.value),qe=Je(Pt),En.attrName=qe,En.attrValue=Q,En.keepAttr=!0,En.forceKeepAttr=void 0,mr("uponSanitizeAttribute",I,En),Q=En.attrValue,En.forceKeepAttr||(M0(Pt,I),!En.keepAttr))continue;if(!pe&&Dn(/\/>/i,Q)){M0(Pt,I);continue}ee&&(Q=qn(Q,O," "),Q=qn(Q,F," "),Q=qn(Q,M," "));let Sg=Je(I.nodeName);if(Tg(Sg,qe,Q)){if(de&&(qe==="id"||qe==="name")&&(M0(Pt,I),Q=mt+Q),w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Za)switch(p.getAttributeType(Sg,qe)){case"TrustedHTML":{Q=w.createHTML(Q);break}case"TrustedScriptURL":{Q=w.createScriptURL(Q);break}}try{Za?I.setAttributeNS(Za,Pt,Q):I.setAttribute(Pt,Q),p4(t.removed)}catch{}}}mr("afterSanitizeAttributes",I,null)},M6=function I(le){let Q,qe=Eg(le);for(mr("beforeSanitizeShadowDOM",le,null);Q=qe.nextNode();)mr("uponSanitizeShadowNode",Q,null),!xg(Q)&&(Q.content instanceof o&&I(Q.content),Cg(Q));mr("afterSanitizeShadowDOM",le,null)};return t.sanitize=function(I){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q,qe,_t,ln;if(lr=!I,lr&&(I=""),typeof I!="string"&&!Ns(I))if(typeof I.toString=="function"){if(I=I.toString(),typeof I!="string")throw vi("dirty is not a string, aborting")}else throw vi("toString is not a function");if(!t.isSupported)return I;if(be||F0(le),t.removed=[],typeof I=="string"&&(bt=!1),bt){if(I.nodeName){let Za=Je(I.nodeName);if(!A[Za]||V[Za])throw vi("root node is forbidden and cannot be sanitized in-place")}}else if(I instanceof s)Q=yg(""),qe=Q.ownerDocument.importNode(I,!0),qe.nodeType===1&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?Q=qe:Q.appendChild(qe);else{if(!re&&!ee&&!Y&&I.indexOf("<")===-1)return w&&Re?w.createHTML(I):I;if(Q=yg(I),!Q)return re?null:Re?k:""}Q&&ne&&Qa(Q.firstChild);let En=Eg(bt?I:Q);for(;_t=En.nextNode();)xg(_t)||(_t.content instanceof o&&M6(_t.content),Cg(_t));if(bt)return I;if(re){if(Te)for(ln=x.call(Q.ownerDocument);Q.firstChild;)ln.appendChild(Q.firstChild);else ln=Q;return(q.shadowroot||q.shadowrootmod)&&(ln=_.call(n,ln,!0)),ln}let Pt=Y?Q.outerHTML:Q.innerHTML;return Y&&A["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Dn(T4,Q.ownerDocument.doctype.name)&&(Pt=" -`+Pt),ee&&(Pt=qn(Pt,O," "),Pt=qn(Pt,F," "),Pt=qn(Pt,M," ")),w&&Re?w.createHTML(Pt):Pt},t.setConfig=function(I){F0(I),be=!0},t.clearConfig=function(){wn=null,be=!1},t.isValidAttribute=function(I,le,Q){wn||F0({});let qe=Je(I),_t=Je(le);return Tg(qe,_t,Q)},t.addHook=function(I,le){typeof le=="function"&&(E[I]=E[I]||[],Ti(E[I],le))},t.removeHook=function(I){if(E[I])return p4(E[I])},t.removeHooks=function(I){E[I]&&(E[I]=[])},t.removeAllHooks=function(){E={}},t}var Ge=v4();d();d();var zT=Object.create,pc=Object.defineProperty,qT=Object.getOwnPropertyDescriptor,WT=Object.getOwnPropertyNames,$T=Object.getPrototypeOf,GT=Object.prototype.hasOwnProperty,gc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VT=(e,t)=>{for(var n in t)pc(e,n,{get:t[n],enumerable:!0})},mc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of WT(t))!GT.call(e,a)&&a!==n&&pc(e,a,{get:()=>t[a],enumerable:!(r=qT(t,a))||r.enumerable});return e},KT=(e,t,n)=>(mc(e,t,"default"),n&&mc(n,t,"default")),S4=(e,t,n)=>(n=e!=null?zT($T(e)):{},mc(t||!e||!e.__esModule?pc(n,"default",{value:e,enumerable:!0}):n,e)),YT=gc((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(o){return o.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let o=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let s=Array.from(i.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${i.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?o(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?o(s):s}).join(" ");dump("Reader: (Readability) "+i+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var o=r.length-1;o>=0;o--){var i=r[o],s=i.parentNode;s&&(!a||a.call(this,i,o,r))&&s.removeChild(i)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let o of r)this._setNodeTag(o,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),o=a.map(function(i){return r.call(i)});return Array.prototype.concat.apply([],o)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(o){var i=r.getElementsByTagName(o);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(r){var a=this._classesToPreserve,o=(r.getAttribute("class")||"").split(/\s+/).filter(function(i){return a.indexOf(i)!=-1}).join(" ");for(o?r.setAttribute("class",o):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,o=this._doc.documentURI;function i(l){if(a==o&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var m=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(m,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",i(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),m=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",i(c)),m&&l.setAttribute("poster",i(m)),g){var p=g.replace(this.REGEXPS.srcsetUrl,function(f,y,b,h){return i(y)+(b||"")+h});l.setAttribute("srcset",p)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var o=a.children[0],i=0;i»] /.test(a))i=/ [\\\/>»] /.test(a),a=o.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=o.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(p){return p.textContent.trim()===l});c||(a=o.substring(o.lastIndexOf(":")+1),s(a)<3?a=o.substring(o.indexOf(":")+1):s(o.substr(0,o.indexOf(":")))>5&&(a=o))}else if(a.length>150||a.length<15){var m=r.getElementsByTagName("h1");m.length===1&&(a=this._getInnerText(m[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!i||g!=s(o.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=o),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var o=a.nextSibling,i=!1;(o=this._nextNode(o))&&o.tagName=="BR";){i=!0;var s=o.nextSibling;o.parentNode.removeChild(o),o=s}if(i){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),o=u.nextSibling;o;){if(o.tagName=="BR"){var l=this._nextNode(o.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(o))break;var c=o.nextSibling;u.appendChild(o),o=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var o=r.ownerDocument.createElement(a);r.firstChild;)o.appendChild(r.firstChild);r.parentNode.replaceChild(o,r),r.readability&&(o.readability=r.readability);for(var i=0;i!o.includes(l)),u=s.join(" ").length/i.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var o=r.getAttribute("rel"),i=r.getAttribute("itemprop");return(o==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var o=0,i=[];r.parentNode&&(i.push(r.parentNode),!(a&&++o===a));)r=r.parentNode;return i},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,o=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var i=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var m=null,g=l.firstChild;g;){var p=g.nextSibling;if(this._isPhrasingContent(g))m!==null?m.appendChild(g):this._isWhitespace(g)||(m=a.createElement("p"),l.replaceChild(m,g),m.appendChild(g));else if(m!==null){for(;m.lastChild&&this._isWhitespace(m.lastChild);)m.removeChild(m.lastChild);m=null}g=p}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var Te=this._getInnerText(re);if(!(Te.length<25)){var Re=this._getNodeAncestors(re,5);if(Re.length!==0){var _e=0;_e+=1,_e+=Te.split(",").length,_e+=Math.min(Math.floor(Te.length/100),3),this._forEachNode(Re,function(de,mt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),y.push(de)),mt===0)var kt=1;else mt===1?kt=2:kt=mt*3;de.readability.contentScore+=_e/kt}})}}}});for(var b=[],h=0,C=y.length;hv.readability.contentScore){b.splice(R,0,w),b.length>this._nbTopCandidates&&b.pop();break}}}var x=b[0]||null,B=!1,_;if(x===null||x.tagName==="BODY"){for(x=a.createElement("DIV"),B=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),x.appendChild(r.firstChild);r.appendChild(x),this._initializeNode(x)}else if(x){for(var E=[],O=1;O=.75&&E.push(this._getNodeAncestors(b[O]));var F=3;if(E.length>=F)for(_=x.parentNode;_.tagName!=="BODY";){for(var M=0,N=0;N=F){x=_;break}_=_.parentNode}x.readability||this._initializeNode(x),_=x.parentNode;for(var U=x.readability.contentScore,H=U/3;_.tagName!=="BODY";){if(!_.readability){_=_.parentNode;continue}var L=_.readability.contentScore;if(LU){x=_;break}U=_.readability.contentScore,_=_.parentNode}for(_=x.parentNode;_.tagName!="BODY"&&_.children.length==1;)x=_,_=x.parentNode;x.readability||this._initializeNode(x)}var S=a.createElement("DIV");o&&(S.id="readability-content");var A=Math.max(10,x.readability.contentScore*.2);_=x.parentNode;for(var j=_.children,q=0,z=j.length;q=A)V=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),X=this._getInnerText(W),ie=X.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&X.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),S.appendChild(W),j=_.children,q-=1,z-=1)}if(this._debug&&this.log("Article content pre-prep: "+S.innerHTML),this._prepArticle(S),this._debug&&this.log("Article content post-prep: "+S.innerHTML),B)x.id="readability-page-1",x.className="page";else{var pe=a.createElement("DIV");for(pe.id="readability-page-1",pe.className="page";S.firstChild;)pe.appendChild(S.firstChild);S.appendChild(pe)}this._debug&&this.log("Article content after paging: "+S.innerHTML);var ee=!0,Y=this._getInnerText(S,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(o,i){return a[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(o,i,s){var u=parseInt(i||s,i?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),o;return this._forEachNode(a,function(i){if(!o&&i.getAttribute("type")==="application/ld+json")try{var s=i.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(o={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,m=this._textSimilarity(u.headline,l)>.75;m&&!c?o.title=u.headline:o.title=u.name}else typeof u.name=="string"?o.title=u.name.trim():typeof u.headline=="string"&&(o.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?o.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(o.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(o.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(o.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),o||{}},_getArticleMetadata:function(r){var a={},o={},i=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(l){var c=l.getAttribute("name"),m=l.getAttribute("property"),g=l.getAttribute("content");if(g){var p=null,f=null;m&&(p=m.match(s),p&&(f=p[0].toLowerCase().replace(/\s/g,""),o[f]=g.trim())),!p&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),o[f]=g.trim()))}}),a.title=r.title||o["dc:title"]||o["dcterm:title"]||o["og:title"]||o["weibo:article:title"]||o["weibo:webpage:title"]||o.title||o["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||o["dc:creator"]||o["dcterm:creator"]||o.author,a.excerpt=r.excerpt||o["dc:description"]||o["dcterm:description"]||o["og:description"]||o["weibo:article:description"]||o["weibo:webpage:description"]||o.description||o["twitter:description"],a.siteName=r.siteName||o["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(i){for(var s=0;s"u"?!0:a;var o=r.textContent.trim();return a?o.replace(this.REGEXPS.normalize," "):o},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>o)return!1;if(r.parentNode.tagName===a&&(!i||i(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,o=0,i=r.getElementsByTagName("tr"),s=0;s0){i._readabilityDataTable=!0;continue}var m=["col","colgroup","tfoot","thead","th"],g=function(f){return!!i.getElementsByTagName(f)[0]};if(m.some(g)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var p=this._getRowAndColumnCount(i);if(p.rows>=10||p.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=p.rows*p.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var o=this.REGEXPS.b64DataUrl.exec(a.src);if(o[1]==="image/svg+xml")return;for(var i=!1,s=0;si+=this._getInnerText(u,!0).length),i/o},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(o){var i=function(_){return _._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(o,["ul","ol"]);this._forEachNode(l,_=>u+=this._getInnerText(_).length),s=u/this._getInnerText(o).length>.9}if(a==="table"&&i(o)||this._hasAncestorTag(o,"table",-1,i)||this._hasAncestorTag(o,"code"))return!1;var c=this._getClassWeight(o);this.log("Cleaning Conditionally",o);var m=0;if(c+m<0)return!0;if(this._getCharCount(o,",")<10){for(var g=o.getElementsByTagName("p").length,p=o.getElementsByTagName("img").length,f=o.getElementsByTagName("li").length-100,y=o.getElementsByTagName("input").length,b=this._getTextDensity(o,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(o,["object","embed","iframe"]),w=0;w1&&g/p<.5&&!this._hasAncestorTag(o,"figure")||!s&&f>g||y>Math.floor(g/3)||!s&&b<.9&&v<25&&(p===0||p>2)&&!this._hasAncestorTag(o,"figure")||!s&&c<25&&R>.2||c>=25&&R>.5||h===1&&v<75||h>1;if(s&&x){for(var B=0;B1)return x;let _=o.getElementsByTagName("li").length;if(p==_)return!1}return x}return!1})},_cleanMatchedNodes:function(r,a){for(var o=this._getNextNode(r,!0),i=this._getNextNode(r);i&&i!=o;)a.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(o){let i=this._getClassWeight(o)<0;return i&&this.log("Removing header with low class weight:",o),i})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var o=this._getArticleMetadata(a);this._articleTitle=o.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!o.excerpt){var s=i.getElementsByTagName("p");s.length>0&&(o.excerpt=s[0].textContent.trim())}var u=i.textContent;return{title:this._articleTitle,byline:o.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:u,length:u.length,excerpt:o.excerpt,siteName:o.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),JT=gc((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(o){return(!o.style||o.style.display!="none")&&!o.hasAttribute("hidden")&&(!o.hasAttribute("aria-hidden")||o.getAttribute("aria-hidden")!="true"||o.className&&o.className.indexOf&&o.className.indexOf("fallback-image")!==-1)}function a(o,i={}){typeof i=="function"&&(i={visibilityChecker:i});var s={minScore:20,minContentLength:140,visibilityChecker:r};i=Object.assign(s,i);var u=o.querySelectorAll("p, pre, article"),l=o.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var m=0;return[].some.call(u,function(g){if(!i.visibilityChecker(g))return!1;var p=g.className+" "+g.id;if(n.unlikelyCandidates.test(p)&&!n.okMaybeItsACandidate.test(p)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fi.minScore)})}typeof t=="object"&&(t.exports=a)}),w4=gc((e,t)=>{var n=YT(),r=JT();t.exports={Readability:n,isProbablyReaderable:r}}),D4={};VT(D4,{Readability:()=>eu,default:()=>_4,isProbablyReaderable:()=>k4});var A4=S4(w4());KT(D4,S4(w4()));var{Readability:eu,isProbablyReaderable:k4}=A4,{default:C4,...XT}=A4,_4=C4!==void 0?C4:XT;d();d();d();d();d();d();d();d();d();var L4=Object.prototype.toString;function tu(e){switch(L4.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return tr(e,Error)}}function Ci(e,t){return L4.call(e)===`[object ${t}]`}function nu(e){return Ci(e,"ErrorEvent")}function F4(e){return Ci(e,"DOMException")}function Er(e){return Ci(e,"String")}function ru(e){return e===null||typeof e!="object"&&typeof e!="function"}function xr(e){return Ci(e,"Object")}function Si(e){return typeof Event<"u"&&tr(e,Event)}function P4(e){return!1}function M4(e){return Ci(e,"RegExp")}function wi(e){return!!(e&&e.then&&typeof e.then=="function")}function B4(e){return xr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function R4(e){return typeof e=="number"&&e!==e}function tr(e,t){try{return e instanceof t}catch{return!1}}function Di(e,t){try{let n=e,r=5,a=80,o=[],i=0,s=0,u=" > ",l=u.length,c;for(;n&&i++1&&s+o.length*l+c.length>=a));)o.push(c),s+=c.length,n=n.parentNode;return o.reverse().join(u)}catch{return""}}function QT(e,t){let n=e,r=[],a,o,i,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(m=>n.getAttribute(m)).map(m=>[m,n.getAttribute(m)]):null;if(l&&l.length)l.forEach(m=>{r.push(`[${m[0]}="${m[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Er(a))for(o=a.split(/\s+/),u=0;u{let o=n[a]&&n[a].__sentry_original__;a in console&&o&&(r[a]=n[a],n[a]=o)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function O4(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Ai.forEach(n=>{t[n]=(...r)=>{e&&hc(()=>{})}}):Ai.forEach(n=>{t[n]=()=>{}}),t}var Xe;!1?Xe=ao("logger",O4):Xe=O4();d();d();function au(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function bc(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r"}}function j4(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function U4(e,t=40){let n=Object.keys(xc(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return au(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:au(a,t)}return""}function ki(e){return yc(e,new Map)}function yc(e,t){if(xr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=yc(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(yc(a,t))}),r}return e}d();var ev=50;function H4(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let o of n.split(` -`).slice(r))for(let i of t){let s=i(o);if(s){a.push(s);break}}return tv(a)}}function tv(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,ev).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Tc="";function Gn(e){try{return!e||typeof e!="function"?Tc:e.name||Tc}catch{return Tc}}d();function z4(){return!0}var Tr=ft(),_i={},q4={};function nv(e){if(!q4[e])switch(q4[e]=!0,e){case"console":rv();break;case"fetch":av();break;case"error":sv();break;case"unhandledrejection":uv();break;default:!1&&Xe.warn("unknown instrumentation type:",e);return}}function nr(e,t){_i[e]=_i[e]||[],_i[e].push(t),nv(e)}function io(e,t){if(!(!e||!_i[e]))for(let n of _i[e]||[])try{n(t)}catch(r){!1&&Xe.error(`Error while triggering instrumentation handler. +`+y+"]"}return r.pop(),a=y,h}},Sx={parse:bx,stringify:Cx},wx=Sx,$s=wx;d();d();var Fk=Number.isNaN||function(e){return typeof e=="number"&&e!==e};d();d();var Gs=globalThis||(typeof window<"u"?window:self),Ax=Object.create,Y0=Object.defineProperty,kx=Object.getOwnPropertyDescriptor,_x=Object.getOwnPropertyNames,Lx=Object.getPrototypeOf,Fx=Object.prototype.hasOwnProperty,Px=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mx=(e,t)=>{for(var n in t)Y0(e,n,{get:t[n],enumerable:!0})},K0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of _x(t))!Fx.call(e,a)&&a!==n&&Y0(e,a,{get:()=>t[a],enumerable:!(r=kx(t,a))||r.enumerable});return e},Bx=(e,t,n)=>(K0(e,t,"default"),n&&K0(n,t,"default")),$g=(e,t,n)=>(n=e!=null?Ax(Lx(e)):{},K0(t||!e||!e.__esModule?Y0(n,"default",{value:e,enumerable:!0}):n,e)),Gg=Px((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Gs=="object"&&Gs&&Gs.Object===Object&&Gs,m=typeof self=="object"&&self&&self.Object===Object&&self,g=c||m||Function("return this")(),p=Object.prototype,f=p.toString,y=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(B,_,E){var O,F,M,N,U,H,L=0,S=!1,A=!1,j=!0;if(typeof B!="function")throw new TypeError(n);_=x(_)||0,k(E)&&(S=!!E.leading,A="maxWait"in E,M=A?y(x(E.maxWait)||0,_):M,j="trailing"in E?!!E.trailing:j);function q(ee){var Y=O,ye=F;return O=F=void 0,L=ee,N=B.apply(ye,Y),N}function z(ee){return L=ee,U=setTimeout(ue,_),S?q(ee):N}function W(ee){var Y=ee-H,ye=ee-L,ne=_-Y;return A?b(ne,M-ye):ne}function V(ee){var Y=ee-H,ye=ee-L;return H===void 0||Y>=_||Y<0||A&&ye>=M}function ue(){var ee=h();if(V(ee))return ae(ee);U=setTimeout(ue,W(ee))}function ae(ee){return U=void 0,j&&O?q(ee):(O=F=void 0,N)}function X(){U!==void 0&&clearTimeout(U),L=0,O=H=F=U=void 0}function ie(){return U===void 0?N:ae(h())}function pe(){var ee=h(),Y=V(ee);if(O=arguments,F=this,H=ee,Y){if(U===void 0)return z(H);if(A)return U=setTimeout(ue,_),q(H)}return U===void 0&&(U=setTimeout(ue,_)),N}return pe.cancel=X,pe.flush=ie,pe}function w(B,_,E){var O=!0,F=!0;if(typeof B!="function")throw new TypeError(n);return k(E)&&(O="leading"in E?!!E.leading:O,F="trailing"in E?!!E.trailing:F),C(B,_,{leading:O,maxWait:_,trailing:F})}function k(B){var _=typeof B;return!!B&&(_=="object"||_=="function")}function R(B){return!!B&&typeof B=="object"}function v(B){return typeof B=="symbol"||R(B)&&f.call(B)==a}function x(B){if(typeof B=="number")return B;if(v(B))return r;if(k(B)){var _=typeof B.valueOf=="function"?B.valueOf():B;B=k(_)?_+"":_}if(typeof B!="string")return B===0?B:+B;B=B.replace(o,"");var E=s.test(B);return E||u.test(B)?l(B.slice(2),E?2:8):i.test(B)?r:+B}t.exports=w}),Vg={};Mx(Vg,{default:()=>Hn});var Rx=$g(Gg());Bx(Vg,$g(Gg()));var{default:Wg,...Ix}=Rx,Hn=Wg!==void 0?Wg:Ix;d();d();var Vs=globalThis||(typeof window<"u"?window:self),Ox=Object.create,X0=Object.defineProperty,Nx=Object.getOwnPropertyDescriptor,jx=Object.getOwnPropertyNames,Ux=Object.getPrototypeOf,Hx=Object.prototype.hasOwnProperty,zx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),qx=(e,t)=>{for(var n in t)X0(e,n,{get:t[n],enumerable:!0})},J0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of jx(t))!Hx.call(e,a)&&a!==n&&X0(e,a,{get:()=>t[a],enumerable:!(r=Nx(t,a))||r.enumerable});return e},Wx=(e,t,n)=>(J0(e,t,"default"),n&&J0(n,t,"default")),Yg=(e,t,n)=>(n=e!=null?Ox(Ux(e)):{},J0(t||!e||!e.__esModule?X0(n,"default",{value:e,enumerable:!0}):n,e)),Jg=zx((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof Vs=="object"&&Vs&&Vs.Object===Object&&Vs,m=typeof self=="object"&&self&&self.Object===Object&&self,g=c||m||Function("return this")(),p=Object.prototype,f=p.toString,y=Math.max,b=Math.min,h=function(){return g.Date.now()};function C(x,B,_){var E,O,F,M,N,U,H=0,L=!1,S=!1,A=!0;if(typeof x!="function")throw new TypeError(n);B=v(B)||0,w(_)&&(L=!!_.leading,S="maxWait"in _,F=S?y(v(_.maxWait)||0,B):F,A="trailing"in _?!!_.trailing:A);function j(pe){var ee=E,Y=O;return E=O=void 0,H=pe,M=x.apply(Y,ee),M}function q(pe){return H=pe,N=setTimeout(V,B),L?j(pe):M}function z(pe){var ee=pe-U,Y=pe-H,ye=B-ee;return S?b(ye,F-Y):ye}function W(pe){var ee=pe-U,Y=pe-H;return U===void 0||ee>=B||ee<0||S&&Y>=F}function V(){var pe=h();if(W(pe))return ue(pe);N=setTimeout(V,z(pe))}function ue(pe){return N=void 0,A&&E?j(pe):(E=O=void 0,M)}function ae(){N!==void 0&&clearTimeout(N),H=0,E=U=O=N=void 0}function X(){return N===void 0?M:ue(h())}function ie(){var pe=h(),ee=W(pe);if(E=arguments,O=this,U=pe,ee){if(N===void 0)return q(U);if(S)return N=setTimeout(V,B),j(U)}return N===void 0&&(N=setTimeout(V,B)),M}return ie.cancel=ae,ie.flush=X,ie}function w(x){var B=typeof x;return!!x&&(B=="object"||B=="function")}function k(x){return!!x&&typeof x=="object"}function R(x){return typeof x=="symbol"||k(x)&&f.call(x)==a}function v(x){if(typeof x=="number")return x;if(R(x))return r;if(w(x)){var B=typeof x.valueOf=="function"?x.valueOf():x;x=w(B)?B+"":B}if(typeof x!="string")return x===0?x:+x;x=x.replace(o,"");var _=s.test(x);return _||u.test(x)?l(x.slice(2),_?2:8):i.test(x)?r:+x}t.exports=C}),Xg={};qx(Xg,{default:()=>yi});var $x=Yg(Jg());Wx(Xg,Yg(Jg()));var{default:Kg,...Gx}=$x,yi=Kg!==void 0?Kg:Gx;d();d();var Vx=Object.create,Z0=Object.defineProperty,Kx=Object.getOwnPropertyDescriptor,Yx=Object.getOwnPropertyNames,Jx=Object.getPrototypeOf,Xx=Object.prototype.hasOwnProperty,Qx=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zx=(e,t)=>{for(var n in t)Z0(e,n,{get:t[n],enumerable:!0})},Q0=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Yx(t))!Xx.call(e,a)&&a!==n&&Z0(e,a,{get:()=>t[a],enumerable:!(r=Kx(t,a))||r.enumerable});return e},eT=(e,t,n)=>(Q0(e,t,"default"),n&&Q0(n,t,"default")),Zg=(e,t,n)=>(n=e!=null?Vx(Jx(e)):{},Q0(t||!e||!e.__esModule?Z0(n,"default",{value:e,enumerable:!0}):n,e)),e4=Qx((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(o){if(a[o])return a[o].exports;var i=a[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var a={};return r.m=n,r.c=a,r.i=function(o){return o},r.d=function(o,i,s){r.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:s})},r.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(i,"a",i),i},r.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(o){var i,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,m){l(r)==="object"&&l(o)==="object"?o.exports=m():(s=[],i=m,u=typeof i=="function"?i.apply(r,s):i,u!==void 0&&(o.exports=u))})(void 0,function(){return function(c){function m(p){if(g[p])return g[p].exports;var f=g[p]={i:p,l:!1,exports:{}};return c[p].call(f.exports,f,f.exports,m),f.l=!0,f.exports}var g={};return m.m=c,m.c=g,m.i=function(p){return p},m.d=function(p,f,y){m.o(p,f)||Object.defineProperty(p,f,{configurable:!1,enumerable:!0,get:y})},m.n=function(p){var f=p&&p.__esModule?function(){return p.default}:function(){return p};return m.d(f,"a",f),f},m.o=function(p,f){return Object.prototype.hasOwnProperty.call(p,f)},m.p="",m(m.s=0)}([function(c,m,g){function p(z,W){var V={};for(var ue in z)W.indexOf(ue)>=0||Object.prototype.hasOwnProperty.call(z,ue)&&(V[ue]=z[ue]);return V}Object.defineProperty(m,"__esModule",{value:!0});var f=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(z){return typeof z>"u"?"undefined":l(z)}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z>"u"?"undefined":l(z)},y=Object.assign||function(z){for(var W=1;W'+ue+"",ye.onclick=function(){return F(ne,Y)},ye.listener=function(re){(_(re)||E(re))&&U()},O(ye,Y),X&&X<1&&(X=1),!pe&&X&&k(X).then(function(){return F(ne,Y)})},L=m.force=function(z,W){var V=z.type,ue=V===void 0?5:V,ae=z.text,X=z.buttonText,ie=X===void 0?"OK":X,pe=z.callback,ee=z.position,Y=ee===void 0?h.positions.force||Y.top:ee;R(),U();var ye=document.createElement("div"),ne=v();ye.id=ne;var re=document.createElement("div");re.classList.add(h.classes.textbox),re.classList.add(h.classes.backgroundInfo),re.innerHTML='
'+ae+"
";var Te=document.createElement("div");Te.classList.add(h.classes.button),Te.classList.add(x[ue]),Te.innerHTML=ie,Te.onclick=function(){F(ne,Y),N(),pe?pe():W&&W()},ye.appendChild(re),ye.appendChild(Te),ye.listener=function(Re){_(Re)&&Te.click()},O(ye,Y),M()},S=m.confirm=function(z,W,V){var ue=z.text,ae=z.submitText,X=ae===void 0?"Yes":ae,ie=z.cancelText,pe=ie===void 0?"Cancel":ie,ee=z.submitCallback,Y=z.cancelCallback,ye=z.position,ne=ye===void 0?h.positions.confirm||ne.top:ye;R(),U();var re=document.createElement("div"),Te=v();re.id=Te;var Re=document.createElement("div");Re.classList.add(h.classes.textbox),Re.classList.add(h.classes.backgroundInfo),Re.innerHTML='
'+ue+"
";var _e=document.createElement("div");_e.classList.add(h.classes.button),_e.classList.add(h.classes.elementHalf),_e.classList.add(h.classes.backgroundSuccess),_e.innerHTML=X,_e.onclick=function(){F(Te,ne),N(),ee?ee():W&&W()};var de=document.createElement("div");de.classList.add(h.classes.button),de.classList.add(h.classes.elementHalf),de.classList.add(h.classes.backgroundError),de.innerHTML=pe,de.onclick=function(){F(Te,ne),N(),Y?Y():V&&V()},re.appendChild(Re),re.appendChild(_e),re.appendChild(de),re.listener=function(mt){_(mt)?_e.click():E(mt)&&de.click()},O(re,ne),M(re,ne)},A=function(z,W,V){var ue=z.text,ae=z.submitText,X=ae===void 0?"Submit":ae,ie=z.cancelText,pe=ie===void 0?"Cancel":ie,ee=z.submitCallback,Y=z.cancelCallback,ye=z.position,ne=ye===void 0?h.positions.input||ne.top:ye,re=p(z,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);R(),U();var Te=document.createElement("div"),Re=v();Te.id=Re;var _e=document.createElement("div");_e.classList.add(h.classes.textbox),_e.classList.add(h.classes.backgroundInfo),_e.innerHTML='
'+ue+"
";var de=document.createElement("input");de.classList.add(h.classes.inputField),de.setAttribute("autocapitalize",re.autocapitalize||"none"),de.setAttribute("autocomplete",re.autocomplete||"off"),de.setAttribute("autocorrect",re.autocorrect||"off"),de.setAttribute("autofocus",re.autofocus||"true"),de.setAttribute("inputmode",re.inputmode||"verbatim"),de.setAttribute("max",re.max||""),de.setAttribute("maxlength",re.maxlength||""),de.setAttribute("min",re.min||""),de.setAttribute("minlength",re.minlength||""),de.setAttribute("placeholder",re.placeholder||""),de.setAttribute("spellcheck",re.spellcheck||"default"),de.setAttribute("step",re.step||"any"),de.setAttribute("type",re.type||"text"),de.value=re.value||"",re.allowed&&(de.oninput=function(){var bt=void 0;if(Array.isArray(re.allowed)){for(var Tt="",sn=re.allowed,Mn=0;Mn'+V+"",Y.appendChild(ne),ie.forEach(function(Te,Re){var _e=Te.type,de=_e===void 0?1:_e,mt=Te.text,kt=Te.handler,bt=document.createElement("div");bt.classList.add(x[de]),bt.classList.add(h.classes.button),bt.classList.add(h.classes.selectChoice);var Tt=ie[Re+1];Tt&&!Tt.type&&(Tt.type=1),Tt&&Tt.type===de&&bt.classList.add(h.classes.selectChoiceRepeated),bt.innerHTML=mt,bt.onclick=function(){F(ye,ee),N(),kt()},Y.appendChild(bt)});var re=document.createElement("div");re.classList.add(h.classes.backgroundNeutral),re.classList.add(h.classes.button),re.innerHTML=ae,re.onclick=function(){F(ye,ee),N(),X?X():W&&W()},Y.appendChild(re),Y.listener=function(Te){E(Te)&&re.click()},O(Y,ee),M(Y,ee)},q=m.date=function(z,W,V){var ue=z.value,ae=ue===void 0?new Date:ue,X=z.submitText,ie=X===void 0?"OK":X,pe=z.cancelText,ee=pe===void 0?"Cancel":pe,Y=z.submitCallback,ye=z.cancelCallback,ne=z.position,re=ne===void 0?h.positions.date||re.top:ne;R(),U();var Te="▾",Re=document.createElement("div"),_e=document.createElement("div"),de=document.createElement("div"),mt=function(pt){Re.innerHTML=h.dateMonths[pt.getMonth()],_e.innerHTML=pt.getDate(),de.innerHTML=pt.getFullYear()},kt=function(pt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+1,0).getDate(),wn=pt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(wn)>Xe&&(wn=Xe.toString()),pt.target.textContent=wn,Number(wn)<1&&(wn="1"),ae.setDate(Number(wn))},bt=function(pt){var Xe=pt.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);pt.target.textContent=Xe,ae.setFullYear(Number(Xe))},Tt=function(pt){mt(ae)},sn=function(pt){var Xe=new Date(ae.getFullYear(),ae.getMonth()+pt+1,0).getDate();ae.getDate()>Xe&&ae.setDate(Xe),ae.setMonth(ae.getMonth()+pt),mt(ae)},Mn=function(pt){ae.setDate(ae.getDate()+pt),mt(ae)},pi=function(pt){var Xe=ae.getFullYear()+pt;Xe<0?ae.setFullYear(0):ae.setFullYear(ae.getFullYear()+pt),mt(ae)},er=document.createElement("div"),ba=v();er.id=ba;var Xa=document.createElement("div");Xa.classList.add(h.classes.backgroundInfo);var Vt=document.createElement("div");Vt.classList.add(h.classes.dateSelectorInner);var jn=document.createElement("div");jn.classList.add(h.classes.button),jn.classList.add(h.classes.elementThird),jn.classList.add(h.classes.dateSelectorUp),jn.innerHTML=Te;var Kt=document.createElement("div");Kt.classList.add(h.classes.button),Kt.classList.add(h.classes.elementThird),Kt.classList.add(h.classes.dateSelectorUp),Kt.innerHTML=Te;var Sn=document.createElement("div");Sn.classList.add(h.classes.button),Sn.classList.add(h.classes.elementThird),Sn.classList.add(h.classes.dateSelectorUp),Sn.innerHTML=Te,Re.classList.add(h.classes.element),Re.classList.add(h.classes.elementThird),Re.innerHTML=h.dateMonths[ae.getMonth()],_e.classList.add(h.classes.element),_e.classList.add(h.classes.elementThird),_e.setAttribute("contentEditable",!0),_e.addEventListener("input",kt),_e.addEventListener("blur",Tt),_e.innerHTML=ae.getDate(),de.classList.add(h.classes.element),de.classList.add(h.classes.elementThird),de.setAttribute("contentEditable",!0),de.addEventListener("input",bt),de.addEventListener("blur",Tt),de.innerHTML=ae.getFullYear();var lr=document.createElement("div");lr.classList.add(h.classes.button),lr.classList.add(h.classes.elementThird),lr.innerHTML=Te;var cr=document.createElement("div");cr.classList.add(h.classes.button),cr.classList.add(h.classes.elementThird),cr.innerHTML=Te;var ya=document.createElement("div");ya.classList.add(h.classes.button),ya.classList.add(h.classes.elementThird),ya.innerHTML=Te,jn.onclick=function(){return sn(1)},Kt.onclick=function(){return Mn(1)},Sn.onclick=function(){return pi(1)},lr.onclick=function(){return sn(-1)},cr.onclick=function(){return Mn(-1)},ya.onclick=function(){return pi(-1)};var un=document.createElement("div");un.classList.add(h.classes.button),un.classList.add(h.classes.elementHalf),un.classList.add(h.classes.backgroundSuccess),un.innerHTML=ie,un.onclick=function(){F(ba,re),N(),Y?Y(ae):W&&W(ae)};var dr=document.createElement("div");dr.classList.add(h.classes.button),dr.classList.add(h.classes.elementHalf),dr.classList.add(h.classes.backgroundError),dr.innerHTML=ee,dr.onclick=function(){F(ba,re),N(),ye?ye(ae):V&&V(ae)},Vt.appendChild(jn),Vt.appendChild(Kt),Vt.appendChild(Sn),Vt.appendChild(Re),Vt.appendChild(_e),Vt.appendChild(de),Vt.appendChild(lr),Vt.appendChild(cr),Vt.appendChild(ya),Xa.appendChild(Vt),er.appendChild(Xa),er.appendChild(un),er.appendChild(dr),er.listener=function(pt){_(pt)?un.click():E(pt)&&dr.click()},O(er,re),M(er,re)};m.default={alert:H,force:L,confirm:S,input:A,select:j,date:q,setOptions:C,hideAlerts:U}}])})}).call(r,a(0)(n))}])})}),t4={};Zx(t4,{default:()=>Ks});var tT=Zg(e4());eT(t4,Zg(e4()));var{default:Qg,...nT}=tT,Ks=Qg!==void 0?Qg:nT;d();d();var Ys=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ei(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function ec(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function n4(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let o=0;oto[e.toLowerCase()]||zn[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),rT=e=>Object.keys(to).find(t=>to[t]===e),aT=e=>Object.keys(zn).find(t=>zn[t]===e);function u4(e){i4=e||"all"}function xi(){return i4||"all"}function oT(){return tt.slice(0)}function iT(){return tt.map(e=>rT(e)||aT(e)||String.fromCharCode(e))}function sT(){let e=[];return Object.keys(gt).forEach(t=>{gt[t].forEach(({key:n,scope:r,mods:a,shortcut:o})=>{e.push({scope:r,shortcut:o,mods:a,keys:n.split("+").map(i=>Ti(i))})})}),e}function uT(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function lT(e){return typeof e=="string"&&(e=Ti(e)),tt.indexOf(e)!==-1}function cT(e,t){let n,r;e||(e=xi());for(let a in gt)if(Object.prototype.hasOwnProperty.call(gt,a))for(n=gt[a],r=0;r=0&&tt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&tt.splice(0,tt.length),(t===93||t===224)&&(t=91),t in Rt){Rt[t]=!1;for(let r in zn)zn[r]===t&&(yr[r]=!1)}}function l4(e,...t){if(typeof e>"u")Object.keys(gt).forEach(n=>delete gt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&nc(n)});else if(typeof e=="object")e.key&&nc(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),nc({key:e,scope:n,method:r,splitKey:"+"})}}var nc=({key:e,scope:t,method:n,splitKey:r="+"})=>{tc(e).forEach(o=>{let i=o.split(r),s=i.length,u=i[s-1],l=u==="*"?"*":Ti(u);if(!gt[l])return;t||(t=xi());let c=s>1?ec(zn,i):[];gt[l]=gt[l].filter(m=>!((n?m.method===n:!0)&&m.scope===t&&n4(m.mods,c)))})};function a4(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let o in Rt)Object.prototype.hasOwnProperty.call(Rt,o)&&(!Rt[o]&&t.mods.indexOf(+o)>-1||Rt[o]&&t.mods.indexOf(+o)===-1)&&(a=!1);(t.mods.length===0&&!Rt[16]&&!Rt[18]&&!Rt[17]&&!Rt[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(tt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function o4(e,t){let n=gt["*"],r=e.keyCode||e.which||e.charCode;if(!yr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),tt.indexOf(r)===-1&&r!==229&&tt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(o=>{let i=Js[o];e[o]&&tt.indexOf(i)===-1?tt.push(i):!e[o]&&tt.indexOf(i)>-1?tt.splice(tt.indexOf(i),1):o==="metaKey"&&e[o]&&tt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(tt=tt.slice(tt.indexOf(i))))}),r in Rt){Rt[r]=!0;for(let o in zn)zn[o]===r&&(yr[o]=!0);if(!n)return}for(let o in Rt)Object.prototype.hasOwnProperty.call(Rt,o)&&(Rt[o]=e[Js[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(tt.indexOf(17)===-1&&tt.push(17),tt.indexOf(18)===-1&&tt.push(18),Rt[17]=!0,Rt[18]=!0);let a=xi();if(n)for(let o=0;o-1}function yr(e,t,n){tt=[];let r=tc(e),a=[],o="all",i=document,s=0,u=!1,l=!0,c="+",m=!1,g=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(i=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(m=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(g=!0)),typeof t=="string"&&(o=t),g&&l4(e,o);s1&&(a=ec(zn,e)),e=e[e.length-1],e=e==="*"?"*":Ti(e),e in gt||(gt[e]=[]),gt[e].push({keyup:u,keydown:l,scope:o,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:i});typeof i<"u"&&!mT(i)&&window&&(s4.push(i),Ei(i,"keydown",p=>{o4(p,i)},m),r4||(r4=!0,Ei(window,"focus",()=>{tt=[]},m),Ei(window,"click",()=>{tt=[]},!1)),Ei(i,"keyup",p=>{o4(p,i),dT(p)},m))}function pT(e,t="all"){Object.keys(gt).forEach(n=>{gt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var rc={getPressedKeyString:iT,setScope:u4,getScope:xi,deleteScope:cT,getPressedKeyCodes:oT,getAllKeyCodes:sT,isPressed:lT,filter:uT,trigger:pT,unbind:l4,keyMap:to,modifier:zn,modifierMap:Js};for(let e in rc)Object.prototype.hasOwnProperty.call(rc,e)&&(yr[e]=rc[e]);if(typeof window<"u"){let e=window.hotkeys;yr.noConflict=t=>(t&&window.hotkeys===yr&&(window.hotkeys=e),yr),window.hotkeys=yr}var xn=yr;d();d();var gT={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},d4={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},Ct={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},dn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},Br={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},G=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=G.getVersionPrecision(e),a=G.getVersionPrecision(t),o=Math.max(r,a),i=0,s=G.map([e,t],u=>{let l=o-G.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return G.map(c.split("."),m=>new Array(20-m.length).join("0")+m).reverse()});for(n&&(i=o-Math.min(r,a)),o-=1;o>=i;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===i)return 0;o-=1}else if(s[0][o]{n[i]=o[i]})}return e}static getBrowserAlias(e){return gT[e]}static getBrowserTypeByAlias(e){return d4[e]||""}},nt=/version\/(\d+(\.?_?\d+)+)/i,fT=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=G.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=G.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=G.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=G.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=G.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=G.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=G.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=G.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=G.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=G.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=G.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=G.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=G.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=G.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=G.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=G.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=G.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=G.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=G.getFirstMatch(nt,e)||G.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=G.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=G.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=G.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=G.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=G.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=G.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=G.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=G.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=G.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=G.getFirstMatch(nt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:G.getFirstMatch(r,e),version:G.getSecondMatch(r,e)}}}],hT=fT,bT=[{test:[/Roku\/DVP/],describe(e){let t=G.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:dn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=G.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:dn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=G.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=G.getWindowsVersionName(t);return{name:dn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:dn.iOS},n=G.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=G.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=G.getMacOSVersionName(t),r={name:dn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=G.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:dn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=G.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=G.getAndroidVersionName(t),r={name:dn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=G.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:dn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=G.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||G.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||G.getFirstMatch(/\bbb(\d+)/i,e);return{name:dn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=G.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:dn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=G.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:dn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:dn.Linux}}},{test:[/CrOS/],describe(){return{name:dn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=G.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:dn.PlayStation4,version:t}}}],yT=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=G.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:Ct.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:Ct.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:Ct.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:Ct.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:Ct.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:Ct.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=G.getFirstMatch(/(ipod|iphone)/i,e);return{type:Ct.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:Ct.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:Ct.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:Ct.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:Ct.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:Ct.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:Ct.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:Ct.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:Ct.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:Ct.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:Ct.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:Ct.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:Ct.tv}}}],ET=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:Br.Blink};let t=G.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:Br.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:Br.Trident},n=G.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:Br.Presto},n=G.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:Br.Gecko},n=G.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:Br.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:Br.WebKit},n=G.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],xT=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=G.find(hT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=G.find(bT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=G.find(yT,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=G.find(ET,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return G.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?(r[o]=i,a+=1):typeof i=="object"&&(t[o]=i,n+=1)}),n>0){let o=Object.keys(t),i=G.find(o,u=>this.isOS(u));if(i){let u=this.satisfies(t[i]);if(u!==void 0)return u}let s=G.find(o,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let o=Object.keys(r),i=G.find(o,s=>this.isBrowser(s,!0));if(i!==void 0)return this.compareVersion(r[i])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=G.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(G.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},c4=xT,TT=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new c4(e,t)}static parse(e){return new c4(e).getResult()}static get BROWSER_MAP(){return d4}static get ENGINE_MAP(){return Br}static get OS_MAP(){return dn}static get PLATFORMS_MAP(){return Ct}},no=TT;d();d();var{entries:E4,setPrototypeOf:m4,isFrozen:vT,getPrototypeOf:CT,getOwnPropertyDescriptor:ST}=Object,{freeze:mn,seal:Wn,create:wT}=Object,{apply:lc,construct:cc}=typeof Reflect<"u"&&Reflect;lc||(lc=function(e,t,n){return e.apply(t,n)});mn||(mn=function(e){return e});Wn||(Wn=function(e){return e});cc||(cc=function(e,t){return new e(...t)});var DT=Rn(Array.prototype.forEach),p4=Rn(Array.prototype.pop),vi=Rn(Array.prototype.push),Zs=Rn(String.prototype.toLowerCase),ac=Rn(String.prototype.toString),AT=Rn(String.prototype.match),qn=Rn(String.prototype.replace),kT=Rn(String.prototype.indexOf),_T=Rn(String.prototype.trim),Dn=Rn(RegExp.prototype.test),Ci=LT(TypeError);function Rn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),RT=Wn(/\${[\w\W]*}/gm),IT=Wn(/^data-[\-\w.\u00B7-\uFFFF]/),OT=Wn(/^aria-[\-\w]+$/),x4=Wn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),NT=Wn(/^(?:\w+script|data):/i),jT=Wn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),T4=Wn(/^html$/i),y4=Object.freeze({__proto__:null,MUSTACHE_EXPR:MT,ERB_EXPR:BT,TMPLIT_EXPR:RT,DATA_ATTR:IT,ARIA_ATTR:OT,IS_ALLOWED_URI:x4,IS_SCRIPT_OR_DATA:NT,ATTR_WHITESPACE:jT,DOCTYPE_NAME:T4}),UT=()=>typeof window>"u"?null:window,HT=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}};function v4(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:UT(),t=I=>v4(I);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:g,trustedTypes:p}=e,f=u.prototype,y=Xs(f,"cloneNode"),b=Xs(f,"nextSibling"),h=Xs(f,"childNodes"),C=Xs(f,"parentNode");if(typeof i=="function"){let I=a.createElement("template");I.content&&I.content.ownerDocument&&(a=I.content.ownerDocument)}let w,k="",{implementation:R,createNodeIterator:v,createDocumentFragment:x,getElementsByTagName:B}=a,{importNode:_}=n,E={};t.isSupported=typeof E4=="function"&&typeof C=="function"&&R&&R.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:O,ERB_EXPR:F,TMPLIT_EXPR:M,DATA_ATTR:N,ARIA_ATTR:U,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:L}=y4,{IS_ALLOWED_URI:S}=y4,A=null,j=Be({},[...g4,...oc,...ic,...sc,...f4]),q=null,z=Be({},[...h4,...uc,...b4,...Qs]),W=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),V=null,ue=null,ae=!0,X=!0,ie=!1,pe=!0,ee=!1,Y=!1,ye=!1,ne=!1,re=!1,Te=!1,Re=!1,_e=!0,de=!1,mt="user-content-",kt=!0,bt=!1,Tt={},sn=null,Mn=Be({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),pi=null,er=Be({},["audio","video","img","source","image","track"]),ba=null,Xa=Be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Vt="http://www.w3.org/1998/Math/MathML",jn="http://www.w3.org/2000/svg",Kt="http://www.w3.org/1999/xhtml",Sn=Kt,lr=!1,cr=null,ya=Be({},[Vt,jn,Kt],ac),un,dr=["application/xhtml+xml","text/html"],pt="text/html",Xe,wn=null,_6=a.createElement("form"),fg=function(I){return I instanceof RegExp||I instanceof Function},L0=function(I){if(!(wn&&wn===I)){if((!I||typeof I!="object")&&(I={}),I=ro(I),un=dr.indexOf(I.PARSER_MEDIA_TYPE)===-1?un=pt:un=I.PARSER_MEDIA_TYPE,Xe=un==="application/xhtml+xml"?ac:Zs,A="ALLOWED_TAGS"in I?Be({},I.ALLOWED_TAGS,Xe):j,q="ALLOWED_ATTR"in I?Be({},I.ALLOWED_ATTR,Xe):z,cr="ALLOWED_NAMESPACES"in I?Be({},I.ALLOWED_NAMESPACES,ac):ya,ba="ADD_URI_SAFE_ATTR"in I?Be(ro(Xa),I.ADD_URI_SAFE_ATTR,Xe):Xa,pi="ADD_DATA_URI_TAGS"in I?Be(ro(er),I.ADD_DATA_URI_TAGS,Xe):er,sn="FORBID_CONTENTS"in I?Be({},I.FORBID_CONTENTS,Xe):Mn,V="FORBID_TAGS"in I?Be({},I.FORBID_TAGS,Xe):{},ue="FORBID_ATTR"in I?Be({},I.FORBID_ATTR,Xe):{},Tt="USE_PROFILES"in I?I.USE_PROFILES:!1,ae=I.ALLOW_ARIA_ATTR!==!1,X=I.ALLOW_DATA_ATTR!==!1,ie=I.ALLOW_UNKNOWN_PROTOCOLS||!1,pe=I.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=I.SAFE_FOR_TEMPLATES||!1,Y=I.WHOLE_DOCUMENT||!1,re=I.RETURN_DOM||!1,Te=I.RETURN_DOM_FRAGMENT||!1,Re=I.RETURN_TRUSTED_TYPE||!1,ne=I.FORCE_BODY||!1,_e=I.SANITIZE_DOM!==!1,de=I.SANITIZE_NAMED_PROPS||!1,kt=I.KEEP_CONTENT!==!1,bt=I.IN_PLACE||!1,S=I.ALLOWED_URI_REGEXP||x4,Sn=I.NAMESPACE||Kt,W=I.CUSTOM_ELEMENT_HANDLING||{},I.CUSTOM_ELEMENT_HANDLING&&fg(I.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(W.tagNameCheck=I.CUSTOM_ELEMENT_HANDLING.tagNameCheck),I.CUSTOM_ELEMENT_HANDLING&&fg(I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(W.attributeNameCheck=I.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),I.CUSTOM_ELEMENT_HANDLING&&typeof I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(W.allowCustomizedBuiltInElements=I.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(X=!1),Te&&(re=!0),Tt&&(A=Be({},[...f4]),q=[],Tt.html===!0&&(Be(A,g4),Be(q,h4)),Tt.svg===!0&&(Be(A,oc),Be(q,uc),Be(q,Qs)),Tt.svgFilters===!0&&(Be(A,ic),Be(q,uc),Be(q,Qs)),Tt.mathMl===!0&&(Be(A,sc),Be(q,b4),Be(q,Qs))),I.ADD_TAGS&&(A===j&&(A=ro(A)),Be(A,I.ADD_TAGS,Xe)),I.ADD_ATTR&&(q===z&&(q=ro(q)),Be(q,I.ADD_ATTR,Xe)),I.ADD_URI_SAFE_ATTR&&Be(ba,I.ADD_URI_SAFE_ATTR,Xe),I.FORBID_CONTENTS&&(sn===Mn&&(sn=ro(sn)),Be(sn,I.FORBID_CONTENTS,Xe)),kt&&(A["#text"]=!0),Y&&Be(A,["html","head","body"]),A.table&&(Be(A,["tbody"]),delete V.tbody),I.TRUSTED_TYPES_POLICY){if(typeof I.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ci('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof I.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ci('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=I.TRUSTED_TYPES_POLICY,k=w.createHTML("")}else w===void 0&&(w=HT(p,r)),w!==null&&typeof k=="string"&&(k=w.createHTML(""));mn&&mn(I),wn=I}},hg=Be({},["mi","mo","mn","ms","mtext"]),bg=Be({},["foreignobject","desc","title","annotation-xml"]),L6=Be({},["title","style","font","a","script"]),Os=Be({},oc);Be(Os,ic),Be(Os,FT);let F0=Be({},sc);Be(F0,PT);let F6=function(I){let le=C(I);(!le||!le.tagName)&&(le={namespaceURI:Sn,tagName:"template"});let Q=Zs(I.tagName),qe=Zs(le.tagName);return cr[I.namespaceURI]?I.namespaceURI===jn?le.namespaceURI===Kt?Q==="svg":le.namespaceURI===Vt?Q==="svg"&&(qe==="annotation-xml"||hg[qe]):!!Os[Q]:I.namespaceURI===Vt?le.namespaceURI===Kt?Q==="math":le.namespaceURI===jn?Q==="math"&&bg[qe]:!!F0[Q]:I.namespaceURI===Kt?le.namespaceURI===jn&&!bg[qe]||le.namespaceURI===Vt&&!hg[qe]?!1:!F0[Q]&&(L6[Q]||!Os[Q]):!!(un==="application/xhtml+xml"&&cr[I.namespaceURI]):!1},Qa=function(I){vi(t.removed,{element:I});try{I.parentNode.removeChild(I)}catch{I.remove()}},P0=function(I,le){try{vi(t.removed,{attribute:le.getAttributeNode(I),from:le})}catch{vi(t.removed,{attribute:null,from:le})}if(le.removeAttribute(I),I==="is"&&!q[I])if(re||Te)try{Qa(le)}catch{}else try{le.setAttribute(I,"")}catch{}},yg=function(I){let le,Q;if(ne)I=""+I;else{let ln=AT(I,/^[\r\n\t ]+/);Q=ln&&ln[0]}un==="application/xhtml+xml"&&Sn===Kt&&(I=''+I+"");let qe=w?w.createHTML(I):I;if(Sn===Kt)try{le=new g().parseFromString(qe,un)}catch{}if(!le||!le.documentElement){le=R.createDocument(Sn,"template",null);try{le.documentElement.innerHTML=lr?k:qe}catch{}}let _t=le.body||le.documentElement;return I&&Q&&_t.insertBefore(a.createTextNode(Q),_t.childNodes[0]||null),Sn===Kt?B.call(le,Y?"html":"body")[0]:Y?le.documentElement:_t},Eg=function(I){return v.call(I.ownerDocument||I,I,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},P6=function(I){return I instanceof m&&(typeof I.nodeName!="string"||typeof I.textContent!="string"||typeof I.removeChild!="function"||!(I.attributes instanceof c)||typeof I.removeAttribute!="function"||typeof I.setAttribute!="function"||typeof I.namespaceURI!="string"||typeof I.insertBefore!="function"||typeof I.hasChildNodes!="function")},Ns=function(I){return typeof s=="object"?I instanceof s:I&&typeof I=="object"&&typeof I.nodeType=="number"&&typeof I.nodeName=="string"},mr=function(I,le,Q){E[I]&&DT(E[I],qe=>{qe.call(t,le,Q,wn)})},xg=function(I){let le;if(mr("beforeSanitizeElements",I,null),P6(I))return Qa(I),!0;let Q=Xe(I.nodeName);if(mr("uponSanitizeElement",I,{tagName:Q,allowedTags:A}),I.hasChildNodes()&&!Ns(I.firstElementChild)&&(!Ns(I.content)||!Ns(I.content.firstElementChild))&&Dn(/<[/\w]/g,I.innerHTML)&&Dn(/<[/\w]/g,I.textContent))return Qa(I),!0;if(!A[Q]||V[Q]){if(!V[Q]&&vg(Q)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,Q)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Q)))return!1;if(kt&&!sn[Q]){let qe=C(I)||I.parentNode,_t=h(I)||I.childNodes;if(_t&&qe){let ln=_t.length;for(let En=ln-1;En>=0;--En)qe.insertBefore(y(_t[En],!0),b(I))}}return Qa(I),!0}return I instanceof u&&!F6(I)||(Q==="noscript"||Q==="noembed")&&Dn(/<\/no(script|embed)/i,I.innerHTML)?(Qa(I),!0):(ee&&I.nodeType===3&&(le=I.textContent,le=qn(le,O," "),le=qn(le,F," "),le=qn(le,M," "),I.textContent!==le&&(vi(t.removed,{element:I.cloneNode()}),I.textContent=le)),mr("afterSanitizeElements",I,null),!1)},Tg=function(I,le,Q){if(_e&&(le==="id"||le==="name")&&(Q in a||Q in _6))return!1;if(!(X&&!ue[le]&&Dn(N,le))&&!(ae&&Dn(U,le))){if(!q[le]||ue[le]){if(!(vg(I)&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,I)||W.tagNameCheck instanceof Function&&W.tagNameCheck(I))&&(W.attributeNameCheck instanceof RegExp&&Dn(W.attributeNameCheck,le)||W.attributeNameCheck instanceof Function&&W.attributeNameCheck(le))||le==="is"&&W.allowCustomizedBuiltInElements&&(W.tagNameCheck instanceof RegExp&&Dn(W.tagNameCheck,Q)||W.tagNameCheck instanceof Function&&W.tagNameCheck(Q))))return!1}else if(!ba[le]&&!Dn(S,qn(Q,L,""))&&!((le==="src"||le==="xlink:href"||le==="href")&&I!=="script"&&kT(Q,"data:")===0&&pi[I])&&!(ie&&!Dn(H,qn(Q,L,"")))&&Q)return!1}return!0},vg=function(I){return I.indexOf("-")>0},Cg=function(I){let le,Q,qe,_t;mr("beforeSanitizeAttributes",I,null);let{attributes:ln}=I;if(!ln)return;let En={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q};for(_t=ln.length;_t--;){le=ln[_t];let{name:Mt,namespaceURI:Za}=le;if(Q=Mt==="value"?le.value:_T(le.value),qe=Xe(Mt),En.attrName=qe,En.attrValue=Q,En.keepAttr=!0,En.forceKeepAttr=void 0,mr("uponSanitizeAttribute",I,En),Q=En.attrValue,En.forceKeepAttr||(P0(Mt,I),!En.keepAttr))continue;if(!pe&&Dn(/\/>/i,Q)){P0(Mt,I);continue}ee&&(Q=qn(Q,O," "),Q=qn(Q,F," "),Q=qn(Q,M," "));let Sg=Xe(I.nodeName);if(Tg(Sg,qe,Q)){if(de&&(qe==="id"||qe==="name")&&(P0(Mt,I),Q=mt+Q),w&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!Za)switch(p.getAttributeType(Sg,qe)){case"TrustedHTML":{Q=w.createHTML(Q);break}case"TrustedScriptURL":{Q=w.createScriptURL(Q);break}}try{Za?I.setAttributeNS(Za,Mt,Q):I.setAttribute(Mt,Q),p4(t.removed)}catch{}}}mr("afterSanitizeAttributes",I,null)},M6=function I(le){let Q,qe=Eg(le);for(mr("beforeSanitizeShadowDOM",le,null);Q=qe.nextNode();)mr("uponSanitizeShadowNode",Q,null),!xg(Q)&&(Q.content instanceof o&&I(Q.content),Cg(Q));mr("afterSanitizeShadowDOM",le,null)};return t.sanitize=function(I){let le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Q,qe,_t,ln;if(lr=!I,lr&&(I=""),typeof I!="string"&&!Ns(I))if(typeof I.toString=="function"){if(I=I.toString(),typeof I!="string")throw Ci("dirty is not a string, aborting")}else throw Ci("toString is not a function");if(!t.isSupported)return I;if(ye||L0(le),t.removed=[],typeof I=="string"&&(bt=!1),bt){if(I.nodeName){let Za=Xe(I.nodeName);if(!A[Za]||V[Za])throw Ci("root node is forbidden and cannot be sanitized in-place")}}else if(I instanceof s)Q=yg(""),qe=Q.ownerDocument.importNode(I,!0),qe.nodeType===1&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?Q=qe:Q.appendChild(qe);else{if(!re&&!ee&&!Y&&I.indexOf("<")===-1)return w&&Re?w.createHTML(I):I;if(Q=yg(I),!Q)return re?null:Re?k:""}Q&&ne&&Qa(Q.firstChild);let En=Eg(bt?I:Q);for(;_t=En.nextNode();)xg(_t)||(_t.content instanceof o&&M6(_t.content),Cg(_t));if(bt)return I;if(re){if(Te)for(ln=x.call(Q.ownerDocument);Q.firstChild;)ln.appendChild(Q.firstChild);else ln=Q;return(q.shadowroot||q.shadowrootmod)&&(ln=_.call(n,ln,!0)),ln}let Mt=Y?Q.outerHTML:Q.innerHTML;return Y&&A["!doctype"]&&Q.ownerDocument&&Q.ownerDocument.doctype&&Q.ownerDocument.doctype.name&&Dn(T4,Q.ownerDocument.doctype.name)&&(Mt=" +`+Mt),ee&&(Mt=qn(Mt,O," "),Mt=qn(Mt,F," "),Mt=qn(Mt,M," ")),w&&Re?w.createHTML(Mt):Mt},t.setConfig=function(I){L0(I),ye=!0},t.clearConfig=function(){wn=null,ye=!1},t.isValidAttribute=function(I,le,Q){wn||L0({});let qe=Xe(I),_t=Xe(le);return Tg(qe,_t,Q)},t.addHook=function(I,le){typeof le=="function"&&(E[I]=E[I]||[],vi(E[I],le))},t.removeHook=function(I){if(E[I])return p4(E[I])},t.removeHooks=function(I){E[I]&&(E[I]=[])},t.removeAllHooks=function(){E={}},t}var Ge=v4();d();d();var zT=Object.create,mc=Object.defineProperty,qT=Object.getOwnPropertyDescriptor,WT=Object.getOwnPropertyNames,$T=Object.getPrototypeOf,GT=Object.prototype.hasOwnProperty,pc=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),VT=(e,t)=>{for(var n in t)mc(e,n,{get:t[n],enumerable:!0})},dc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of WT(t))!GT.call(e,a)&&a!==n&&mc(e,a,{get:()=>t[a],enumerable:!(r=qT(t,a))||r.enumerable});return e},KT=(e,t,n)=>(dc(e,t,"default"),n&&dc(n,t,"default")),S4=(e,t,n)=>(n=e!=null?zT($T(e)):{},dc(t||!e||!e.__esModule?mc(n,"default",{value:e,enumerable:!0}):n,e)),YT=pc((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(o){return o.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let o=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let s=Array.from(i.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${i.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?o(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?o(s):s}).join(" ");dump("Reader: (Readability) "+i+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var o=r.length-1;o>=0;o--){var i=r[o],s=i.parentNode;s&&(!a||a.call(this,i,o,r))&&s.removeChild(i)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let o of r)this._setNodeTag(o,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),o=a.map(function(i){return r.call(i)});return Array.prototype.concat.apply([],o)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(o){var i=r.getElementsByTagName(o);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(r){var a=this._classesToPreserve,o=(r.getAttribute("class")||"").split(/\s+/).filter(function(i){return a.indexOf(i)!=-1}).join(" ");for(o?r.setAttribute("class",o):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,o=this._doc.documentURI;function i(l){if(a==o&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var m=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(m,l)}else{for(var g=this._doc.createElement("span");l.firstChild;)g.appendChild(l.firstChild);l.parentNode.replaceChild(g,l)}else l.setAttribute("href",i(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),m=l.getAttribute("poster"),g=l.getAttribute("srcset");if(c&&l.setAttribute("src",i(c)),m&&l.setAttribute("poster",i(m)),g){var p=g.replace(this.REGEXPS.srcsetUrl,function(f,y,b,h){return i(y)+(b||"")+h});l.setAttribute("srcset",p)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var o=a.children[0],i=0;i»] /.test(a))i=/ [\\\/>»] /.test(a),a=o.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=o.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(p){return p.textContent.trim()===l});c||(a=o.substring(o.lastIndexOf(":")+1),s(a)<3?a=o.substring(o.indexOf(":")+1):s(o.substr(0,o.indexOf(":")))>5&&(a=o))}else if(a.length>150||a.length<15){var m=r.getElementsByTagName("h1");m.length===1&&(a=this._getInnerText(m[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var g=s(a);return g<=4&&(!i||g!=s(o.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=o),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var o=a.nextSibling,i=!1;(o=this._nextNode(o))&&o.tagName=="BR";){i=!0;var s=o.nextSibling;o.parentNode.removeChild(o),o=s}if(i){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),o=u.nextSibling;o;){if(o.tagName=="BR"){var l=this._nextNode(o.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(o))break;var c=o.nextSibling;u.appendChild(o),o=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var o=r.ownerDocument.createElement(a);r.firstChild;)o.appendChild(r.firstChild);r.parentNode.replaceChild(o,r),r.readability&&(o.readability=r.readability);for(var i=0;i!o.includes(l)),u=s.join(" ").length/i.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var o=r.getAttribute("rel"),i=r.getAttribute("itemprop");return(o==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var o=0,i=[];r.parentNode&&(i.push(r.parentNode),!(a&&++o===a));)r=r.parentNode;return i},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,o=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var i=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let ne=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(ne&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),ne=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var m=null,g=l.firstChild;g;){var p=g.nextSibling;if(this._isPhrasingContent(g))m!==null?m.appendChild(g):this._isWhitespace(g)||(m=a.createElement("p"),l.replaceChild(m,g),m.appendChild(g));else if(m!==null){for(;m.lastChild&&this._isWhitespace(m.lastChild);)m.removeChild(m.lastChild);m=null}g=p}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var f=l.children[0];l.parentNode.replaceChild(f,l),l=f,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(re){if(!(!re.parentNode||typeof re.parentNode.tagName>"u")){var Te=this._getInnerText(re);if(!(Te.length<25)){var Re=this._getNodeAncestors(re,5);if(Re.length!==0){var _e=0;_e+=1,_e+=Te.split(",").length,_e+=Math.min(Math.floor(Te.length/100),3),this._forEachNode(Re,function(de,mt){if(!(!de.tagName||!de.parentNode||typeof de.parentNode.tagName>"u")){if(typeof de.readability>"u"&&(this._initializeNode(de),y.push(de)),mt===0)var kt=1;else mt===1?kt=2:kt=mt*3;de.readability.contentScore+=_e/kt}})}}}});for(var b=[],h=0,C=y.length;hv.readability.contentScore){b.splice(R,0,w),b.length>this._nbTopCandidates&&b.pop();break}}}var x=b[0]||null,B=!1,_;if(x===null||x.tagName==="BODY"){for(x=a.createElement("DIV"),B=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),x.appendChild(r.firstChild);r.appendChild(x),this._initializeNode(x)}else if(x){for(var E=[],O=1;O=.75&&E.push(this._getNodeAncestors(b[O]));var F=3;if(E.length>=F)for(_=x.parentNode;_.tagName!=="BODY";){for(var M=0,N=0;N=F){x=_;break}_=_.parentNode}x.readability||this._initializeNode(x),_=x.parentNode;for(var U=x.readability.contentScore,H=U/3;_.tagName!=="BODY";){if(!_.readability){_=_.parentNode;continue}var L=_.readability.contentScore;if(LU){x=_;break}U=_.readability.contentScore,_=_.parentNode}for(_=x.parentNode;_.tagName!="BODY"&&_.children.length==1;)x=_,_=x.parentNode;x.readability||this._initializeNode(x)}var S=a.createElement("DIV");o&&(S.id="readability-content");var A=Math.max(10,x.readability.contentScore*.2);_=x.parentNode;for(var j=_.children,q=0,z=j.length;q=A)V=!0;else if(W.nodeName==="P"){var ae=this._getLinkDensity(W),X=this._getInnerText(W),ie=X.length;(ie>80&&ae<.25||ie<80&&ie>0&&ae===0&&X.search(/\.( |$)/)!==-1)&&(V=!0)}}V&&(this.log("Appending node:",W),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(W.nodeName)===-1&&(this.log("Altering sibling:",W,"to div."),W=this._setNodeTag(W,"DIV")),S.appendChild(W),j=_.children,q-=1,z-=1)}if(this._debug&&this.log("Article content pre-prep: "+S.innerHTML),this._prepArticle(S),this._debug&&this.log("Article content post-prep: "+S.innerHTML),B)x.id="readability-page-1",x.className="page";else{var pe=a.createElement("DIV");for(pe.id="readability-page-1",pe.className="page";S.firstChild;)pe.appendChild(S.firstChild);S.appendChild(pe)}this._debug&&this.log("Article content after paging: "+S.innerHTML);var ee=!0,Y=this._getInnerText(S,!0).length;if(Y0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(o,i){return a[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(o,i,s){var u=parseInt(i||s,i?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),o;return this._forEachNode(a,function(i){if(!o&&i.getAttribute("type")==="application/ld+json")try{var s=i.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(g){return(g["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(o={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,m=this._textSimilarity(u.headline,l)>.75;m&&!c?o.title=u.headline:o.title=u.name}else typeof u.name=="string"?o.title=u.name.trim():typeof u.headline=="string"&&(o.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?o.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(o.byline=u.author.filter(function(g){return g&&typeof g.name=="string"}).map(function(g){return g.name.trim()}).join(", "))),typeof u.description=="string"&&(o.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(o.siteName=u.publisher.name.trim());return}catch(g){this.log(g.message)}}),o||{}},_getArticleMetadata:function(r){var a={},o={},i=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(l){var c=l.getAttribute("name"),m=l.getAttribute("property"),g=l.getAttribute("content");if(g){var p=null,f=null;m&&(p=m.match(s),p&&(f=p[0].toLowerCase().replace(/\s/g,""),o[f]=g.trim())),!p&&c&&u.test(c)&&(f=c,g&&(f=f.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),o[f]=g.trim()))}}),a.title=r.title||o["dc:title"]||o["dcterm:title"]||o["og:title"]||o["weibo:article:title"]||o["weibo:webpage:title"]||o.title||o["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||o["dc:creator"]||o["dcterm:creator"]||o.author,a.excerpt=r.excerpt||o["dc:description"]||o["dcterm:description"]||o["og:description"]||o["weibo:article:description"]||o["weibo:webpage:description"]||o.description||o["twitter:description"],a.siteName=r.siteName||o["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(i){for(var s=0;s"u"?!0:a;var o=r.textContent.trim();return a?o.replace(this.REGEXPS.normalize," "):o},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>o)return!1;if(r.parentNode.tagName===a&&(!i||i(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,o=0,i=r.getElementsByTagName("tr"),s=0;s0){i._readabilityDataTable=!0;continue}var m=["col","colgroup","tfoot","thead","th"],g=function(f){return!!i.getElementsByTagName(f)[0]};if(m.some(g)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var p=this._getRowAndColumnCount(i);if(p.rows>=10||p.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=p.rows*p.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var o=this.REGEXPS.b64DataUrl.exec(a.src);if(o[1]==="image/svg+xml")return;for(var i=!1,s=0;si+=this._getInnerText(u,!0).length),i/o},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(o){var i=function(_){return _._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(o,["ul","ol"]);this._forEachNode(l,_=>u+=this._getInnerText(_).length),s=u/this._getInnerText(o).length>.9}if(a==="table"&&i(o)||this._hasAncestorTag(o,"table",-1,i)||this._hasAncestorTag(o,"code"))return!1;var c=this._getClassWeight(o);this.log("Cleaning Conditionally",o);var m=0;if(c+m<0)return!0;if(this._getCharCount(o,",")<10){for(var g=o.getElementsByTagName("p").length,p=o.getElementsByTagName("img").length,f=o.getElementsByTagName("li").length-100,y=o.getElementsByTagName("input").length,b=this._getTextDensity(o,["h1","h2","h3","h4","h5","h6"]),h=0,C=this._getAllNodesWithTag(o,["object","embed","iframe"]),w=0;w1&&g/p<.5&&!this._hasAncestorTag(o,"figure")||!s&&f>g||y>Math.floor(g/3)||!s&&b<.9&&v<25&&(p===0||p>2)&&!this._hasAncestorTag(o,"figure")||!s&&c<25&&R>.2||c>=25&&R>.5||h===1&&v<75||h>1;if(s&&x){for(var B=0;B1)return x;let _=o.getElementsByTagName("li").length;if(p==_)return!1}return x}return!1})},_cleanMatchedNodes:function(r,a){for(var o=this._getNextNode(r,!0),i=this._getNextNode(r);i&&i!=o;)a.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(o){let i=this._getClassWeight(o)<0;return i&&this.log("Removing header with low class weight:",o),i})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var o=this._getArticleMetadata(a);this._articleTitle=o.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!o.excerpt){var s=i.getElementsByTagName("p");s.length>0&&(o.excerpt=s[0].textContent.trim())}var u=i.textContent;return{title:this._articleTitle,byline:o.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:u,length:u.length,excerpt:o.excerpt,siteName:o.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),JT=pc((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(o){return(!o.style||o.style.display!="none")&&!o.hasAttribute("hidden")&&(!o.hasAttribute("aria-hidden")||o.getAttribute("aria-hidden")!="true"||o.className&&o.className.indexOf&&o.className.indexOf("fallback-image")!==-1)}function a(o,i={}){typeof i=="function"&&(i={visibilityChecker:i});var s={minScore:20,minContentLength:140,visibilityChecker:r};i=Object.assign(s,i);var u=o.querySelectorAll("p, pre, article"),l=o.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(g){c.add(g.parentNode)}),u=Array.from(c)}var m=0;return[].some.call(u,function(g){if(!i.visibilityChecker(g))return!1;var p=g.className+" "+g.id;if(n.unlikelyCandidates.test(p)&&!n.okMaybeItsACandidate.test(p)||g.matches("li p"))return!1;var f=g.textContent.trim().length;return fi.minScore)})}typeof t=="object"&&(t.exports=a)}),w4=pc((e,t)=>{var n=YT(),r=JT();t.exports={Readability:n,isProbablyReaderable:r}}),D4={};VT(D4,{Readability:()=>eu,default:()=>_4,isProbablyReaderable:()=>k4});var A4=S4(w4());KT(D4,S4(w4()));var{Readability:eu,isProbablyReaderable:k4}=A4,{default:C4,...XT}=A4,_4=C4!==void 0?C4:XT;d();d();d();d();d();d();d();d();d();var L4=Object.prototype.toString;function tu(e){switch(L4.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return tr(e,Error)}}function Si(e,t){return L4.call(e)===`[object ${t}]`}function nu(e){return Si(e,"ErrorEvent")}function F4(e){return Si(e,"DOMException")}function Er(e){return Si(e,"String")}function ru(e){return e===null||typeof e!="object"&&typeof e!="function"}function xr(e){return Si(e,"Object")}function wi(e){return typeof Event<"u"&&tr(e,Event)}function P4(e){return!1}function M4(e){return Si(e,"RegExp")}function Di(e){return!!(e&&e.then&&typeof e.then=="function")}function B4(e){return xr(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function R4(e){return typeof e=="number"&&e!==e}function tr(e,t){try{return e instanceof t}catch{return!1}}function Ai(e,t){try{let n=e,r=5,a=80,o=[],i=0,s=0,u=" > ",l=u.length,c;for(;n&&i++1&&s+o.length*l+c.length>=a));)o.push(c),s+=c.length,n=n.parentNode;return o.reverse().join(u)}catch{return""}}function QT(e,t){let n=e,r=[],a,o,i,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(m=>n.getAttribute(m)).map(m=>[m,n.getAttribute(m)]):null;if(l&&l.length)l.forEach(m=>{r.push(`[${m[0]}="${m[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Er(a))for(o=a.split(/\s+/),u=0;u{let o=n[a]&&n[a].__sentry_original__;a in console&&o&&(r[a]=n[a],n[a]=o)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function O4(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?ki.forEach(n=>{t[n]=(...r)=>{e&&fc(()=>{})}}):ki.forEach(n=>{t[n]=()=>{}}),t}var Qe;!1?Qe=ao("logger",O4):Qe=O4();d();d();function au(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function hc(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r"}}function j4(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function U4(e,t=40){let n=Object.keys(Ec(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return au(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:au(a,t)}return""}function _i(e){return bc(e,new Map)}function bc(e,t){if(xr(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=bc(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(bc(a,t))}),r}return e}d();var ev=50;function H4(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let o of n.split(` +`).slice(r))for(let i of t){let s=i(o);if(s){a.push(s);break}}return tv(a)}}function tv(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,ev).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var xc="";function Gn(e){try{return!e||typeof e!="function"?xc:e.name||xc}catch{return xc}}d();function z4(){return!0}var Tr=ft(),Li={},q4={};function nv(e){if(!q4[e])switch(q4[e]=!0,e){case"console":rv();break;case"fetch":av();break;case"error":sv();break;case"unhandledrejection":uv();break;default:!1&&Qe.warn("unknown instrumentation type:",e);return}}function nr(e,t){Li[e]=Li[e]||[],Li[e].push(t),nv(e)}function io(e,t){if(!(!e||!Li[e]))for(let n of Li[e]||[])try{n(t)}catch(r){!1&&Qe.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${Gn(n)} -Error:`,r)}}function rv(){"console"in Tr&&Ai.forEach(function(e){e in console&&$n(console,e,function(t){return function(...n){io("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function av(){z4()&&$n(Tr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:ov(t),url:iv(t)},startTimestamp:Date.now()};return io("fetch",{...n}),e.apply(Tr,t).then(r=>(io("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw io("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function ov(e=[]){return"Request"in Tr&&tr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function iv(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Tr&&tr(e[0],Request)?e[0].url:String(e[0])}var vc=null;function sv(){vc=Tr.onerror,Tr.onerror=function(e,t,n,r,a){return io("error",{column:r,error:a,line:n,msg:e,url:t}),vc?vc.apply(this,arguments):!1}}var Cc=null;function uv(){Cc=Tr.onunhandledrejection,Tr.onunhandledrejection=function(e){return io("unhandledrejection",e),Cc?Cc.apply(this,arguments):!0}}d();function W4(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;ocrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function su(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function $4(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ir(e){let{message:t,event_id:n}=e;if(t)return t;let r=$4(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Li(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Ta(e,t){let n=$4(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let o={...a&&a.data,...t.data};n.mechanism.data=o}}d();function G4(){return!1}d();function wc(e,t=1/0,n=1/0){try{return Sc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Dc(e,t=3,n=100*1024){let r=wc(e,t);return dv(r)>n?Dc(e,t-1,n):r}function Sc(e,t,n=1/0,r=1/0,a=W4()){let[o,i]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!R4(t))return t;let s=lv(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return Sc("",g,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,m=xc(t);for(let g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let p=m[g];l[g]=Sc(g,p,n-1,r,a),c+=1}return i(t),l}function lv(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":B4(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${Gn(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function cv(e){return~-encodeURI(e).split(/%..|./).length}function dv(e){return cv(JSON.stringify(e))}d();d();d();var so=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){a(i)}},o=>{if(!n)a(o);else try{r(n(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(wi(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};d();d();var pv=["fatal","error","warning","log","info","debug"];function V4(e){return e==="warn"?"warning":pv.includes(e)?e:"log"}d();var kc={nowSeconds:()=>Date.now()/1e3};function gv(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var Ac=gv(),K4=Ac===void 0?kc:{nowSeconds:()=>(Ac.timeOrigin+Ac.now())/1e3},uo=kc.nowSeconds.bind(kc),_c=K4.nowSeconds.bind(K4);var lu,QL=(()=>{if(!performance||!performance.now){lu="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=rfv(n)};return e&&Or(n,e),n}function Or(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||_c(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Rr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Fc(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Or(e,n)}function fv(e){return ki({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var J4=100,rr=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Or(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):xr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,J4):J4;if(r<=0)return this;let a={timestamp:uo(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...X4(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new so((o,i)=>{let s=t[a];if(n===null||typeof s!="function")o(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Xe.log(`Event processor "${s.id}" dropped event`),wi(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(o)).then(null,i):this._notifyEventProcessors(t,u,r,a+1).then(o).then(null,i)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function X4(){return ao("globalEventProcessors",()=>[])}function Nr(e){X4().push(e)}d();d();var Pc=4,hv=100,jr=class{constructor(t,n=new rr,r=Pc){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{o.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},i)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Rr(),o=new Error(t);return this._withClient((i,s)=>{i.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:Rr();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,o)=>{a.captureEvent(t,{...n,event_id:r},o)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=hv}=a.getOptions&&a.getOptions()||{};if(i<=0)return;let u={timestamp:uo(),...t},l=o?hc(()=>o(u,n)):u;l!==null&&r.addBreadcrumb(l,i)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=Fi(this);try{t(this)}finally{Fi(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Xe.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&Fc(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:o}=r&&r.getOptions()||{},i=ft(),{userAgent:s}=i.navigator||{},u=Lc({release:a,environment:o,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Or(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Pi().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Xe.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Pi(){let e=ft();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Fi(e){let t=Pi(),n=Vn(t);return cu(t,e),n}function it(){let e=Pi();return(!Q4(e)||Vn(e).isOlderThan(Pc))&&cu(e,new jr),G4()?bv(e):Vn(e)}function bv(e){try{let t=Pi().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Vn(e);if(!Q4(n)||Vn(n).isOlderThan(Pc)){let r=Vn(e).getStackTop();cu(n,new jr(r.client,rr.clone(r.scope)))}return Vn(n)}catch{return Vn(e)}}function Q4(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Vn(e){return ao("hub",()=>new jr,e)}function cu(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}d();function Mi(e,t){return it().captureException(e,{captureContext:t})}function Bi(e){it().withScope(e)}d();d();d();d();d();d();d();var va={};R0(va,{FunctionToString:()=>lo,InboundFilters:()=>co});d();d();var pf,lo=class e{static id="FunctionToString";name=e.id;setupOnce(){pf=Function.prototype.toString,Function.prototype.toString=function(...t){let n=oo(this)||this;return pf.apply(n,t)}}};d();var xv=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],co=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let o=n();if(o){let i=o.getIntegration(e);if(i){let s=o.getClient(),u=s?s.getOptions():{},l=Tv(i._options,u);return vv(a,l)?null:a}}return a};r.id=this.name,t(r)}};function Tv(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...xv],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function vv(e,t){return t.ignoreInternal&&Av(e)?(!1&&Xe.warn(`Event dropped due to being internal Sentry Error. -Event: ${Ir(e)}`),!0):Cv(e,t.ignoreErrors)?(!1&&Xe.warn(`Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${Ir(e)}`),!0):Sv(e,t.denyUrls)?(!1&&Xe.warn(`Event dropped due to being matched by \`denyUrls\` option. +Error:`,r)}}function rv(){"console"in Tr&&ki.forEach(function(e){e in console&&$n(console,e,function(t){return function(...n){io("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function av(){z4()&&$n(Tr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:ov(t),url:iv(t)},startTimestamp:Date.now()};return io("fetch",{...n}),e.apply(Tr,t).then(r=>(io("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw io("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function ov(e=[]){return"Request"in Tr&&tr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function iv(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Tr&&tr(e[0],Request)?e[0].url:String(e[0])}var Tc=null;function sv(){Tc=Tr.onerror,Tr.onerror=function(e,t,n,r,a){return io("error",{column:r,error:a,line:n,msg:e,url:t}),Tc?Tc.apply(this,arguments):!1}}var vc=null;function uv(){vc=Tr.onunhandledrejection,Tr.onunhandledrejection=function(e){return io("unhandledrejection",e),vc?vc.apply(this,arguments):!0}}d();function W4(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;ocrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function su(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function $4(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Ir(e){let{message:t,event_id:n}=e;if(t)return t;let r=$4(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Fi(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Ta(e,t){let n=$4(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let o={...a&&a.data,...t.data};n.mechanism.data=o}}d();function G4(){return!1}d();function Sc(e,t=1/0,n=1/0){try{return Cc("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function wc(e,t=3,n=100*1024){let r=Sc(e,t);return dv(r)>n?wc(e,t-1,n):r}function Cc(e,t,n=1/0,r=1/0,a=W4()){let[o,i]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!R4(t))return t;let s=lv(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let g=u.toJSON();return Cc("",g,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,m=Ec(t);for(let g in m){if(!Object.prototype.hasOwnProperty.call(m,g))continue;if(c>=r){l[g]="[MaxProperties ~]";break}let p=m[g];l[g]=Cc(g,p,n-1,r,a),c+=1}return i(t),l}function lv(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":B4(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${Gn(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function cv(e){return~-encodeURI(e).split(/%..|./).length}function dv(e){return cv(JSON.stringify(e))}d();d();d();var so=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){a(i)}},o=>{if(!n)a(o);else try{r(n(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(Di(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};d();d();var pv=["fatal","error","warning","log","info","debug"];function V4(e){return e==="warn"?"warning":pv.includes(e)?e:"log"}d();var Ac={nowSeconds:()=>Date.now()/1e3};function gv(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var Dc=gv(),K4=Dc===void 0?Ac:{nowSeconds:()=>(Dc.timeOrigin+Dc.now())/1e3},uo=Ac.nowSeconds.bind(Ac),kc=K4.nowSeconds.bind(K4);var lu,QL=(()=>{if(!performance||!performance.now){lu="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=rfv(n)};return e&&Or(n,e),n}function Or(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||kc(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Rr()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Lc(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Or(e,n)}function fv(e){return _i({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var J4=100,rr=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Or(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):xr(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,J4):J4;if(r<=0)return this;let a={timestamp:uo(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...X4(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new so((o,i)=>{let s=t[a];if(n===null||typeof s!="function")o(n);else{let u=s({...n},r);!1&&s.id&&u===null&&Qe.log(`Event processor "${s.id}" dropped event`),Di(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(o)).then(null,i):this._notifyEventProcessors(t,u,r,a+1).then(o).then(null,i)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function X4(){return ao("globalEventProcessors",()=>[])}function Nr(e){X4().push(e)}d();d();var Fc=4,hv=100,jr=class{constructor(t,n=new rr,r=Fc){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{o.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},i)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:Rr(),o=new Error(t);return this._withClient((i,s)=>{i.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:Rr();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,o)=>{a.captureEvent(t,{...n,event_id:r},o)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=hv}=a.getOptions&&a.getOptions()||{};if(i<=0)return;let u={timestamp:uo(),...t},l=o?fc(()=>o(u,n)):u;l!==null&&r.addBreadcrumb(l,i)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=Pi(this);try{t(this)}finally{Pi(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&Qe.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&Lc(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:o}=r&&r.getOptions()||{},i=ft(),{userAgent:s}=i.navigator||{},u=_c({release:a,environment:o,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&Or(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Mi().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&Qe.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Mi(){let e=ft();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Pi(e){let t=Mi(),n=Vn(t);return cu(t,e),n}function it(){let e=Mi();return(!Q4(e)||Vn(e).isOlderThan(Fc))&&cu(e,new jr),G4()?bv(e):Vn(e)}function bv(e){try{let t=Mi().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return Vn(e);if(!Q4(n)||Vn(n).isOlderThan(Fc)){let r=Vn(e).getStackTop();cu(n,new jr(r.client,rr.clone(r.scope)))}return Vn(n)}catch{return Vn(e)}}function Q4(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Vn(e){return ao("hub",()=>new jr,e)}function cu(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}d();function Bi(e,t){return it().captureException(e,{captureContext:t})}function Ri(e){it().withScope(e)}d();d();d();d();d();d();d();var va={};B0(va,{FunctionToString:()=>lo,InboundFilters:()=>co});d();d();var pf,lo=class e{static id="FunctionToString";name=e.id;setupOnce(){pf=Function.prototype.toString,Function.prototype.toString=function(...t){let n=oo(this)||this;return pf.apply(n,t)}}};d();var xv=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],co=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let o=n();if(o){let i=o.getIntegration(e);if(i){let s=o.getClient(),u=s?s.getOptions():{},l=Tv(i._options,u);return vv(a,l)?null:a}}return a};r.id=this.name,t(r)}};function Tv(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...xv],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function vv(e,t){return t.ignoreInternal&&Av(e)?(!1&&Qe.warn(`Event dropped due to being internal Sentry Error. +Event: ${Ir(e)}`),!0):Cv(e,t.ignoreErrors)?(!1&&Qe.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${Ir(e)}`),!0):Sv(e,t.denyUrls)?(!1&&Qe.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${Ir(e)}. -Url: ${du(e)}`),!0):wv(e,t.allowUrls)?!1:(!1&&Xe.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Url: ${du(e)}`),!0):wv(e,t.allowUrls)?!1:(!1&&Qe.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${Ir(e)}. -Url: ${du(e)}`),!0)}function Cv(e,t){return!t||!t.length?!1:Dv(e).some(n=>t.some(r=>ou(n,r)))}function Sv(e,t){if(!t||!t.length)return!1;let n=du(e);return n?t.some(r=>ou(n,r)):!1}function wv(e,t){if(!t||!t.length)return!0;let n=du(e);return n?t.some(r=>ou(n,r)):!0}function Dv(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Xe.error(`Cannot extract message for event ${Ir(e)}`),[]}return[]}function Av(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function kv(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function du(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?kv(t):null}catch{return!1&&Xe.error(`Cannot extract url for event ${Ir(e)}`),null}}d();d();function Bc(e,t){let n=Rc(e,t),r={type:t&&t.name,value:Iv(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Mv(e,t,n,r){let a={exception:{values:[{type:Si(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${U4(t)}`}]},extra:{__serialized__:Dc(t)}};if(n){let o=Rc(e,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Mc(e,t){return{exception:{values:[Bc(e,t)]}}}function Rc(e,t){let n=t.stacktrace||t.stack||"",r=Rv(t);try{return e(n,r)}catch{}return[]}var Bv=/Minified React error #\d+;/i;function Rv(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Bv.test(e.message))return 1}return 0}function Iv(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ic(e,t,n,r,a){let o;if(nu(t)&&t.error)return Mc(e,t.error);if(F4(t)){let i=t;if("stack"in t)o=Mc(e,t);else{let s=i.name||"DOMException",u=i.message?`${s}: ${i.message}`:s;o=hf(e,u,n,r),Li(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return tu(t)?Mc(e,t):xr(t)||Si(t)?(o=Mv(e,t,n,a),Ta(o,{synthetic:!0}),o):(o=hf(e,t,n,r),Li(o,`${t}`,void 0),Ta(o,{synthetic:!0}),o)}function hf(e,t,n,r){let a={message:t};if(r&&n){let o=Rc(e,n);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]})}return a}d();var bf="Breadcrumbs",Ca=class e{static id=bf;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&nr("console",Nv),this.options.dom&&nr("dom",Ov(this.options.dom)),this.options.xhr&&nr("xhr",jv),this.options.fetch&&nr("fetch",Uv),this.options.history&&nr("history",Hv)}};function Ov(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Di(n.event.target,a):Di(n.event,a)}catch{r=""}r.length!==0&&it().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Nv(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:V4(e.level),message:bc(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${bc(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;it().addBreadcrumb(t,{input:e.args,level:e.level})}function jv(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};it().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function Uv(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?it().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):it().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function Hv(e){let t=ft(),n=e.from,r=e.to,a=su(t.location.href),o=su(n),i=su(r);o.path||(o=a),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),a.protocol===o.protocol&&a.host===o.host&&(n=o.relative),it().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var JM=ft();var cB=ft();d();d();d();var mu="?";var zv=30,qv=40,Wv=50;function Oc(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var $v=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gv=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vv=e=>{let t=$v.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=Gv.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,a]=Sf(t[1]||mu,t[2]);return Oc(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},Ef=[zv,Vv],Kv=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Yv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Jv=e=>{let t=Kv.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=Yv.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],a=t[1]||mu;return[a,r]=Sf(a,r),Oc(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},xf=[Wv,Jv],Xv=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qv=e=>{let t=Xv.exec(e);return t?Oc(t[2],t[1]||mu,+t[3],t[4]?+t[4]:void 0):void 0},Tf=[qv,Qv];var vf=[Ef,xf,Tf],Cf=H4(...vf),Sf=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:mu,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};d();d();var Nc=0;function jc(){return Nc>0}function Zv(){Nc+=1,setTimeout(()=>{Nc-=1})}function Ur(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(oo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=a.map(i=>Ur(i,t));return e.apply(this,o)}catch(o){throw Zv(),Bi(i=>{i.addEventProcessor(s=>(t.mechanism&&(Li(s,void 0,void 0),Ta(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),Mi(o)}),o}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Ec(r,e),iu(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var Uc={};R0(Uc,{Breadcrumbs:()=>Ca,Dedupe:()=>Aa,GlobalHandlers:()=>vr,HttpContext:()=>Da,LinkedErrors:()=>wa,TryCatch:()=>Sa});d();d();var vr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:eC,onunhandledrejection:tC};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(aC(n),r(),this._installFunc[n]=void 0)}}};function eC(){nr("error",e=>{let[t,n,r]=Af();if(!t.getIntegration(vr))return;let{msg:a,url:o,line:i,column:s,error:u}=e;if(jc()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Er(a)?rC(a,o,i,s):wf(Ic(n,u||a,void 0,r,!1),o,i,s);l.level="error",Df(t,u,l,"onerror")})}function tC(){nr("unhandledrejection",e=>{let[t,n,r]=Af();if(!t.getIntegration(vr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(jc()||a&&a.__sentry_own_request__)return!0;let o=ru(a)?nC(a):Ic(n,a,void 0,r,!0);o.level="error",Df(t,a,o,"onunhandledrejection")})}function nC(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function rC(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=nu(e)?e.message:e,i="Error",s=o.match(a);return s&&(i=s[1],o=s[2]),wf({exception:{values:[{type:i,value:o}]}},t,n,r)}function wf(e,t,n,r){let a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,m=Er(t)&&t.length>0?t:I4();return u.length===0&&u.push({colno:l,filename:m,function:"?",in_app:!0,lineno:c}),e}function aC(e){!1&&Xe.log(`Global Handler attached: ${e}`)}function Df(e,t,n,r){Ta(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Af(){let e=it(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}d();var oC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Sa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=ft();this._options.setTimeout&&$n(t,"setTimeout",kf),this._options.setInterval&&$n(t,"setInterval",kf),this._options.requestAnimationFrame&&$n(t,"requestAnimationFrame",iC),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&$n(XMLHttpRequest.prototype,"send",sC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:oC).forEach(uC)}};function kf(e){return function(...t){let n=t[0];return t[0]=Ur(n,{mechanism:{data:{function:Gn(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function iC(e){return function(t){return e.apply(this,[Ur(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Gn(e)},handled:!0,type:"instrument"}})])}}function sC(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&$n(n,a,function(o){let i={mechanism:{data:{function:a,handler:Gn(o)},handled:!0,type:"instrument"}},s=oo(o);return s&&(i.mechanism.data.handler=Gn(s)),Ur(o,i)})}),e.apply(this,t)}}function uC(e){let t=ft(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||($n(n,"addEventListener",function(r){return function(a,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ur(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Gn(o),target:e},handled:!0,type:"instrument"}}))}catch{}let s=Ur(o,{mechanism:{data:{function:"addEventListener",handler:Gn(o),target:e},handled:!0,type:"instrument"}}),u=[a,s,i];return r.apply(this,u)}}),$n(n,"removeEventListener",function(r){return function(a,o,i){let s=o;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,i)}catch{}return r.call(this,a,s,i)}}))}d();var lC="cause",cC=5,wa=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||lC,this._limit=t.limit||cC}setupOnce(){let t=it().getClient();t&&Nr((n,r)=>{let a=it().getIntegration(e);return a?dC(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function dC(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!tr(a.originalException,Error))return r;let o=_f(e,n,a.originalException,t);return r.exception.values=[...o,...r.exception.values],r}function _f(e,t,n,r,a=[]){if(!tr(n[r],Error)||a.length+1>=t)return a;let o=Bc(e,n[r]);return _f(e,t,n[r],r,[o,...a])}d();var Lf=ft(),Da=class e{static id="HttpContext";name=e.id;setupOnce(){Nr(t=>{if(it().getIntegration(e)){if(!navigator&&!location&&!Lf.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=Lf.document||{},{userAgent:a}=navigator||{},o={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},i={...n&&{url:n},headers:o};return{...t,request:i}}return t})}};d();var Aa=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let o=n().getIntegration(e);if(o){try{if(mC(a,o._previousEvent))return!1&&Xe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=a}return o._previousEvent=a}return a};r.id=this.name,t(r)}};function mC(e,t){return t?!!(pC(e,t)||gC(e,t)):!1}function pC(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Bf(e,t)||!Mf(e,t))}function gC(e,t){let n=Ff(t),r=Ff(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Bf(e,t)||!Mf(e,t))}function Mf(e,t){let n=Pf(e),r=Pf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"&&typeof Deno<"u"?Deno.env.toObject():T}var Se=Ce();function Ee(){return Se.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Yt(){return Se.PROD==="1"}function In(){return Se.PROD_API==="1"}function If(){return Se.HAS_CSP_ERROR=="1"}function nt(){if(Se.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function pu(){return typeof Deno<"u"}var lI=Ce().PROD==="1",mo=Ce().PROD!=="1";function gu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();var Of={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${du(e)}`),!0)}function Cv(e,t){return!t||!t.length?!1:Dv(e).some(n=>t.some(r=>ou(n,r)))}function Sv(e,t){if(!t||!t.length)return!1;let n=du(e);return n?t.some(r=>ou(n,r)):!1}function wv(e,t){if(!t||!t.length)return!0;let n=du(e);return n?t.some(r=>ou(n,r)):!0}function Dv(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&Qe.error(`Cannot extract message for event ${Ir(e)}`),[]}return[]}function Av(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function kv(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function du(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?kv(t):null}catch{return!1&&Qe.error(`Cannot extract url for event ${Ir(e)}`),null}}d();d();function Mc(e,t){let n=Bc(e,t),r={type:t&&t.name,value:Iv(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Mv(e,t,n,r){let a={exception:{values:[{type:wi(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${U4(t)}`}]},extra:{__serialized__:wc(t)}};if(n){let o=Bc(e,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function Pc(e,t){return{exception:{values:[Mc(e,t)]}}}function Bc(e,t){let n=t.stacktrace||t.stack||"",r=Rv(t);try{return e(n,r)}catch{}return[]}var Bv=/Minified React error #\d+;/i;function Rv(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(Bv.test(e.message))return 1}return 0}function Iv(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Rc(e,t,n,r,a){let o;if(nu(t)&&t.error)return Pc(e,t.error);if(F4(t)){let i=t;if("stack"in t)o=Pc(e,t);else{let s=i.name||"DOMException",u=i.message?`${s}: ${i.message}`:s;o=hf(e,u,n,r),Fi(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return tu(t)?Pc(e,t):xr(t)||wi(t)?(o=Mv(e,t,n,a),Ta(o,{synthetic:!0}),o):(o=hf(e,t,n,r),Fi(o,`${t}`,void 0),Ta(o,{synthetic:!0}),o)}function hf(e,t,n,r){let a={message:t};if(r&&n){let o=Bc(e,n);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]})}return a}d();var bf="Breadcrumbs",Ca=class e{static id=bf;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&nr("console",Nv),this.options.dom&&nr("dom",Ov(this.options.dom)),this.options.xhr&&nr("xhr",jv),this.options.fetch&&nr("fetch",Uv),this.options.history&&nr("history",Hv)}};function Ov(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?Ai(n.event.target,a):Ai(n.event,a)}catch{r=""}r.length!==0&&it().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function Nv(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:V4(e.level),message:hc(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${hc(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;it().addBreadcrumb(t,{input:e.args,level:e.level})}function jv(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};it().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function Uv(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?it().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):it().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function Hv(e){let t=ft(),n=e.from,r=e.to,a=su(t.location.href),o=su(n),i=su(r);o.path||(o=a),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),a.protocol===o.protocol&&a.host===o.host&&(n=o.relative),it().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}d();var JM=ft();var cB=ft();d();d();d();var mu="?";var zv=30,qv=40,Wv=50;function Ic(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var $v=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Gv=/\((\S*)(?::(\d+))(?::(\d+))\)/,Vv=e=>{let t=$v.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=Gv.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,a]=Sf(t[1]||mu,t[2]);return Ic(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},Ef=[zv,Vv],Kv=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Yv=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Jv=e=>{let t=Kv.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=Yv.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],a=t[1]||mu;return[a,r]=Sf(a,r),Ic(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},xf=[Wv,Jv],Xv=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Qv=e=>{let t=Xv.exec(e);return t?Ic(t[2],t[1]||mu,+t[3],t[4]?+t[4]:void 0):void 0},Tf=[qv,Qv];var vf=[Ef,xf,Tf],Cf=H4(...vf),Sf=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:mu,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};d();d();var Oc=0;function Nc(){return Oc>0}function Zv(){Oc+=1,setTimeout(()=>{Oc-=1})}function Ur(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(oo(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=a.map(i=>Ur(i,t));return e.apply(this,o)}catch(o){throw Zv(),Ri(i=>{i.addEventProcessor(s=>(t.mechanism&&(Fi(s,void 0,void 0),Ta(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),Bi(o)}),o}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}yc(r,e),iu(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var jc={};B0(jc,{Breadcrumbs:()=>Ca,Dedupe:()=>Aa,GlobalHandlers:()=>vr,HttpContext:()=>Da,LinkedErrors:()=>wa,TryCatch:()=>Sa});d();d();var vr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:eC,onunhandledrejection:tC};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(aC(n),r(),this._installFunc[n]=void 0)}}};function eC(){nr("error",e=>{let[t,n,r]=Af();if(!t.getIntegration(vr))return;let{msg:a,url:o,line:i,column:s,error:u}=e;if(Nc()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Er(a)?rC(a,o,i,s):wf(Rc(n,u||a,void 0,r,!1),o,i,s);l.level="error",Df(t,u,l,"onerror")})}function tC(){nr("unhandledrejection",e=>{let[t,n,r]=Af();if(!t.getIntegration(vr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(Nc()||a&&a.__sentry_own_request__)return!0;let o=ru(a)?nC(a):Rc(n,a,void 0,r,!0);o.level="error",Df(t,a,o,"onunhandledrejection")})}function nC(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function rC(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=nu(e)?e.message:e,i="Error",s=o.match(a);return s&&(i=s[1],o=s[2]),wf({exception:{values:[{type:i,value:o}]}},t,n,r)}function wf(e,t,n,r){let a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,m=Er(t)&&t.length>0?t:I4();return u.length===0&&u.push({colno:l,filename:m,function:"?",in_app:!0,lineno:c}),e}function aC(e){!1&&Qe.log(`Global Handler attached: ${e}`)}function Df(e,t,n,r){Ta(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Af(){let e=it(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}d();var oC=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Sa=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=ft();this._options.setTimeout&&$n(t,"setTimeout",kf),this._options.setInterval&&$n(t,"setInterval",kf),this._options.requestAnimationFrame&&$n(t,"requestAnimationFrame",iC),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&$n(XMLHttpRequest.prototype,"send",sC);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:oC).forEach(uC)}};function kf(e){return function(...t){let n=t[0];return t[0]=Ur(n,{mechanism:{data:{function:Gn(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function iC(e){return function(t){return e.apply(this,[Ur(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Gn(e)},handled:!0,type:"instrument"}})])}}function sC(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&$n(n,a,function(o){let i={mechanism:{data:{function:a,handler:Gn(o)},handled:!0,type:"instrument"}},s=oo(o);return s&&(i.mechanism.data.handler=Gn(s)),Ur(o,i)})}),e.apply(this,t)}}function uC(e){let t=ft(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||($n(n,"addEventListener",function(r){return function(a,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ur(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Gn(o),target:e},handled:!0,type:"instrument"}}))}catch{}let s=Ur(o,{mechanism:{data:{function:"addEventListener",handler:Gn(o),target:e},handled:!0,type:"instrument"}}),u=[a,s,i];return r.apply(this,u)}}),$n(n,"removeEventListener",function(r){return function(a,o,i){let s=o;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,i)}catch{}return r.call(this,a,s,i)}}))}d();var lC="cause",cC=5,wa=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||lC,this._limit=t.limit||cC}setupOnce(){let t=it().getClient();t&&Nr((n,r)=>{let a=it().getIntegration(e);return a?dC(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function dC(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!tr(a.originalException,Error))return r;let o=_f(e,n,a.originalException,t);return r.exception.values=[...o,...r.exception.values],r}function _f(e,t,n,r,a=[]){if(!tr(n[r],Error)||a.length+1>=t)return a;let o=Mc(e,n[r]);return _f(e,t,n[r],r,[o,...a])}d();var Lf=ft(),Da=class e{static id="HttpContext";name=e.id;setupOnce(){Nr(t=>{if(it().getIntegration(e)){if(!navigator&&!location&&!Lf.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=Lf.document||{},{userAgent:a}=navigator||{},o={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},i={...n&&{url:n},headers:o};return{...t,request:i}}return t})}};d();var Aa=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let o=n().getIntegration(e);if(o){try{if(mC(a,o._previousEvent))return!1&&Qe.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=a}return o._previousEvent=a}return a};r.id=this.name,t(r)}};function mC(e,t){return t?!!(pC(e,t)||gC(e,t)):!1}function pC(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Bf(e,t)||!Mf(e,t))}function gC(e,t){let n=Ff(t),r=Ff(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Bf(e,t)||!Mf(e,t))}function Mf(e,t){let n=Pf(e),r=Pf(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"&&typeof Deno<"u"?Deno.env.toObject():T}var Se=Ce();function Ee(){return Se.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function Yt(){return Se.PROD==="1"}function In(){return Se.PROD_API==="1"}function If(){return Se.HAS_CSP_ERROR=="1"}function rt(){if(Se.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function pu(){return typeof Deno<"u"}var lI=Ce().PROD==="1",mo=Ce().PROD!=="1";function gu(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}d();var Of={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5114,14 +5114,14 @@ ass, HTML, TXT files.`,"description.multiplePrompt":`When the number of paragrap {env.imt_sub_trans_field}: Translation - id: 2 {env.imt_sub_source_field}: Source - {env.imt_sub_trans_field}: Translation`,"subtitle.quickButton.black":"Black","subtitle.quickButton.cyan":"Blue","translationServices.claude":"Claude","subtitle.quickButton.backgroundColor":"Background color","subtitle.quickButton.green":"Green","subtitle.quickButton.blue":"Blue","subtitle.quickButton.white":"White","subtitle.quickButton.setting":"Settings","subtitle.quickButton.translationPosition":"Translation location","subtitle.quickButton.backgroundOpacity":"Background Opacity","subtitle.quickButton.sourceFontSize":"Original font size","subtitle.quickButton.sourceTextColor":"Original font color","subtitle.quickButton.yellow":"Yellow","subtitle.quickButton.translationFontSize":"Translation font size","subtitle.quickButton.translationPositionBottom":"Below the original text","subtitle.quickButton.red":"Red","subtitle.quickButton.translationPositionTop":"Above the original text","subtitle.quickButton.translationTextColor":"Translation font color","subtitle.quickButton.magenta":"Magenta",attachSubtitleTranslating:"Translating using {service}...","error.claude.403":"Access to the service is temporarily unavailable, possibly due to regional restrictions related to Claude. You can try changing your IP address, or use other translation services.","browser.brandDescriptionForSafari":"Free Translate Website, Translate PDF & Epub eBook, Translate Video Subtitles in Bilingual","browser.PdfProFile":"AI-Driven PDF Pro Translation","browser.textTranslate":"Text Translation"};var Uf=[{code:"zh-CN",messages:Of},{code:"zh-TW",messages:Nf},{code:"en",messages:jf}];var zc="immersiveTranslateBingGlobalState",qc="immersiveTranslateYandexGlobalState",Rt={};for(let e of Uf)Rt[e.code]=e.messages;var ka="Immersive Translate",J="immersive-translate";var ge="immersiveTranslate";var zf=ge+"GoogleAccessToken",qf=ge+"AuthFlow";var vC=ge+"AuthState",fu=ge+"IframeMessage",vI=ge+"WaitForRateLimit",hu=ge+"DocumentMessageAsk",Lt=ge+"DocumentMessageTellThirdParty",_a=ge+"showError",Wf=ge+"DocumentMessageThirdPartyTell",$f=ge+"DocumentMessageEventUpload",bu=ge+"DocumentMessageHandler",yu=`${ge}Share`,Ri=`${ge}ToggleMouseHoverTranslateDirectly`,Gf=`${ge}ReqDraft`,Vf=`${ge}ResDraft`,CC=`${ge}Container`,Kf=`${ge}SpecifiedContainer`,Hr="buildinConfig",Ii="localConfig",Wc="openOptionsPage",$c="openAboutPage";var Gc="openEbookViewer",Vc="openEbookBuilder";var La=`${ge}PageTranslatedStatus`,CI=`${ge}PageUrlChanged`,Cr=`${ge}ReceiveCommand`,Yf=ge+"LastUseMouseHoverTime",Eu=ge+"LastUseInputTime",Kn=ge+"LastUseManualTranslatePageTime",SI=`${ge}PopupReceiveMessage`,SC="immersivetranslate.com",wC="config.immersivetranslate.com",wI=`https://${SC}/`,Oi=`https://${wC}/default_config.json`,DI=`${ge}Mark`,Tn=`${ge}Root`,Jf=`${ge}Walked`,AI=`data-${J}-walked`,Xf=`${ge}Paragraph`,Qf=`data-${J}-paragraph`,ar=`data-${J}-translation-element-mark`,Zf=`${ge}TranslationElementMark`,kI=`${ge}TranslatedMark`,eh=`${ge}LoadingId`,Kc=`data-${J}-loading-id`,th=`${ge}ErrorId`,xu=`data-${J}-error-id`,DC=`${ge}AtomicBlockMark`,nh=`${ge}ExcludeMark`,_I=`data-${J}-exclude-mark`,AC=`${ge}StayOriginalMark`,LI=`${ge}PreWhitespaceMark`,Tu=`${ge}InlineMark`,rh=`${ge}BlockMark`,FI=`${ge}Left`,PI=`${ge}Right`,MI=`${ge}Width`,BI=`${ge}Height`,RI=`${ge}Top`,II=`${ge}FontSize`,Ni="lastRunTime",OI=`${ge}GlobalStyleMark`,ji=["@","#"],vu=" --- ",ah=` -`,yt=`${J}-target-wrapper`,NI=`${J}-pdf-target-container`,Cu=`${J}-target-inner`,jI=`${J}-source-wrapper`,Yc=`${J}-target-translation-block-wrapper`,UI=`${J}-root-translation-theme`,po=`${ge}RootTranslationTheme`,oh=`${J}-target-translation-vertical-block-wrapper`,HI=`${J}-target-translation-pdf-block-wrapper`,ih=`${J}-target-translation-pre-whitespace`,Jc=`${J}-target-translation-inline-wrapper`;var sh={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},An=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],uh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},lh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},ch={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var dh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],mh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],or="zh-CN";var Hf=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Su=["caiyun","cai"],ir={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_sub_trans_field}: Translation`,"subtitle.quickButton.black":"Black","subtitle.quickButton.cyan":"Blue","translationServices.claude":"Claude","subtitle.quickButton.backgroundColor":"Background color","subtitle.quickButton.green":"Green","subtitle.quickButton.blue":"Blue","subtitle.quickButton.white":"White","subtitle.quickButton.setting":"Settings","subtitle.quickButton.translationPosition":"Translation location","subtitle.quickButton.backgroundOpacity":"Background Opacity","subtitle.quickButton.sourceFontSize":"Original font size","subtitle.quickButton.sourceTextColor":"Original font color","subtitle.quickButton.yellow":"Yellow","subtitle.quickButton.translationFontSize":"Translation font size","subtitle.quickButton.translationPositionBottom":"Below the original text","subtitle.quickButton.red":"Red","subtitle.quickButton.translationPositionTop":"Above the original text","subtitle.quickButton.translationTextColor":"Translation font color","subtitle.quickButton.magenta":"Magenta",attachSubtitleTranslating:"Translating using {service}...","error.claude.403":"Access to the service is temporarily unavailable, possibly due to regional restrictions related to Claude. You can try changing your IP address, or use other translation services.","browser.brandDescriptionForSafari":"Free Translate Website, Translate PDF & Epub eBook, Translate Video Subtitles in Bilingual","browser.PdfProFile":"AI-Driven PDF Pro Translation","browser.textTranslate":"Text Translation"};var Uf=[{code:"zh-CN",messages:Of},{code:"zh-TW",messages:Nf},{code:"en",messages:jf}];var Hc="immersiveTranslateBingGlobalState",zc="immersiveTranslateYandexGlobalState",It={};for(let e of Uf)It[e.code]=e.messages;var ka="Immersive Translate",J="immersive-translate";var ge="immersiveTranslate";var zf=ge+"GoogleAccessToken",qf=ge+"AuthFlow";var vC=ge+"AuthState",fu=ge+"IframeMessage",vI=ge+"WaitForRateLimit",hu=ge+"DocumentMessageAsk",Lt=ge+"DocumentMessageTellThirdParty",_a=ge+"showError",Wf=ge+"DocumentMessageThirdPartyTell",$f=ge+"DocumentMessageEventUpload",bu=ge+"DocumentMessageHandler",yu=`${ge}Share`,Ii=`${ge}ToggleMouseHoverTranslateDirectly`,Gf=`${ge}ReqDraft`,Vf=`${ge}ResDraft`,CC=`${ge}Container`,Kf=`${ge}SpecifiedContainer`,Hr="buildinConfig",Oi="localConfig",qc="openOptionsPage",Wc="openAboutPage";var $c="openEbookViewer",Gc="openEbookBuilder";var La=`${ge}PageTranslatedStatus`,CI=`${ge}PageUrlChanged`,Cr=`${ge}ReceiveCommand`,Yf=ge+"LastUseMouseHoverTime",Eu=ge+"LastUseInputTime",Kn=ge+"LastUseManualTranslatePageTime",SI=`${ge}PopupReceiveMessage`,SC="immersivetranslate.com",wC="config.immersivetranslate.com",wI=`https://${SC}/`,Ni=`https://${wC}/default_config.json`,DI=`${ge}Mark`,Tn=`${ge}Root`,Jf=`${ge}Walked`,AI=`data-${J}-walked`,Xf=`${ge}Paragraph`,Qf=`data-${J}-paragraph`,ar=`data-${J}-translation-element-mark`,Zf=`${ge}TranslationElementMark`,kI=`${ge}TranslatedMark`,eh=`${ge}LoadingId`,Vc=`data-${J}-loading-id`,th=`${ge}ErrorId`,xu=`data-${J}-error-id`,DC=`${ge}AtomicBlockMark`,nh=`${ge}ExcludeMark`,_I=`data-${J}-exclude-mark`,AC=`${ge}StayOriginalMark`,LI=`${ge}PreWhitespaceMark`,Tu=`${ge}InlineMark`,rh=`${ge}BlockMark`,FI=`${ge}Left`,PI=`${ge}Right`,MI=`${ge}Width`,BI=`${ge}Height`,RI=`${ge}Top`,II=`${ge}FontSize`,ji="lastRunTime",OI=`${ge}GlobalStyleMark`,Ui=["@","#"],vu=" --- ",ah=` +`,yt=`${J}-target-wrapper`,NI=`${J}-pdf-target-container`,Cu=`${J}-target-inner`,jI=`${J}-source-wrapper`,Kc=`${J}-target-translation-block-wrapper`,UI=`${J}-root-translation-theme`,po=`${ge}RootTranslationTheme`,oh=`${J}-target-translation-vertical-block-wrapper`,HI=`${J}-target-translation-pdf-block-wrapper`,ih=`${J}-target-translation-pre-whitespace`,Yc=`${J}-target-translation-inline-wrapper`;var sh={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},An=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],uh={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},lh={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},ch={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var dh=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],mh=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],or="zh-CN";var Hf=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],Su=["caiyun","cai"],ir={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:ji,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...Hf,{type:"password",name:"apikey",required:!0}],props:Hf},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},wu={type:ge+"ChildFrameToRootFrameIdentifier"},Xc=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],Ui=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],ph=["ctrl","alt","shift","cmd","command","option","control"];var zI=Yt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",Qc="user_from_plugin",zt="user_info",Hi=Yt()||In()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",gh=Yt()||In()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",fh=gh+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",hh=gh+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Du=Yt()||In()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",go=Yt()||In()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",kC=Yt()||In()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",_C=Yt()||In()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",LC=Yt()||In()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",qI=go+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",WI=kC+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",bh=go+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Au=go+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yh=_C+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eh=LC+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xh=Du+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Th="https://immersivetranslate.com/docs/usage/";var vh=Ce().TRANSLATE_FILE_URL,$I=vh+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Ch=vh+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var fo=console,Zc=class{#e=performance.now();reset(){this.#e=performance.now()}stop(t){let n=performance.now(),r=Math.round(n-this.#e),a=Bn.green;r>1e4?a=Bn.red:r>1e3&&(a=Bn.yellow),fo.debug(Bn.dim(ka+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},zi=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&fo.log(Bn.dim(ka+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&fo.log(Bn.green(ka+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&fo.warn(Bn.yellow(ka+" WARN:"),...t)}error(...t){this.#e<=3&&fo.error(Bn.red(ka+" ERROR:"),...t)}fatal(...t){this.#e<=4&&fo.error(Bn.red(ka+" FATAL:"),...t)}timing(){return this.level===0?new Zc:{reset:()=>{},stop:()=>{}}}},P=new zi;var Sh=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],ed=new Map(Sh),FC=new Map(Sh.map(([e,t])=>[t,e]));function qi(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>FC.get(s));!t&&t!==0&&(t=25);let a=Hs(e);if(a!=="auto")return a;let o={minLength:t,whitelist:[...ed.keys()]},i=Fg(e,o);if(i&&i.length>0){if(i.length>1&&i[0][1]-i[1][1]<=.3)for(let c=0;c.5&&c/i.length<=.25){if(m=="eng"&&g<.95)break;return ed.get(m)}}let[s,u]=i[0],l=ed.get(s);if(l&&u>.9)return l}}catch(r){P.error(r)}return"auto"}if(typeof GM>"u"&&typeof GM_info<"u"&&typeof GM_getValue<"u"){let e=null;typeof GM_xmlhttpRequest<"u"?e=GM_xmlhttpRequest:typeof GM_xmlHttpRequest<"u"&&(e=GM_xmlHttpRequest);let t=null;typeof GM_registerMenuCommand<"u"&&(t=GM_registerMenuCommand),globalThis.GM={info:GM_info,getValue:GM_getValue,setValue:GM_setValue,deleteValue:GM_deleteValue,listValues:GM_listValues,xmlHttpRequest:e,registerMenuCommand:t,addStyle:typeof GM_addStyle<"u"?GM_addStyle:null,openInTab:typeof GM_openInTab<"u"?GM_openInTab:null,addElement:typeof GM_addElement<"u"?GM_addElement:null}}typeof GM<"u"&&GM&&GM.info===void 0&&typeof GM_info<"u"&&(GM.info=GM_info);var wh={get:async e=>{if(e===null){let r=await GM.listValues();Array.isArray(r)||r&&zC(r)&&(r=Object.keys(r));let a={};for(let o of r)a[o]=await GM.getValue(o);return a}let t=[];typeof e=="string"?t=[e]:Array.isArray(e)?t=e:t=Object.keys(e);let n={};for(let r of t)n[r]=await GM.getValue(r);return n},set:async e=>{for(let t in e)await GM.setValue(t,e[t])},remove:async e=>{if(typeof e=="string")await GM.deleteValue(e);else if(Array.isArray(e))for(let t of e)await GM.deleteValue(t)}};function PC(){if(typeof GM<"u"&&GM&&GM.info&&GM.info.script){let e=GM.info.script||{};return e._isUserscript=!0,e}else return{_isUserscript:!0,version:T.VERSION}}function zr(e,t=!0){GM&&GM.openInTab?GM.openInTab(e,!1):globalThis.open(e,t?"_blank":"_self")}function MC(e=!0,t=""){let n=Ce();GM&&GM.info&&GM.info.scriptHandler&&GM.info.scriptHandler==="Stay"?e=!1:e=!0;let r=n.OPTIONS_URL;if(r)zr(r+t,e);else throw new Error("options url not found")}function BC(e=!1){let n=Ce().OPTIONS_URL;if(n)zr(n+"#about",e);else throw new Error("options url not found")}function RC(e=!1){let n=Ce().PDF_VIEWER_URL;if(n)zr(n,e);else throw new Error("pdf url not found")}function IC(e=!1){let n=Ce().HTML_VIEWER_URL;if(n)zr(n,e);else throw new Error("html url not found")}function OC(e=!1){let n=Ce().EBOOK_VIEWER_URL;if(n)zr(n,e);else throw new Error("ebook url not found")}function NC(e=!1){let n=Ce().EBOOK_BUILDER_URL;if(n)zr(n,e);else throw new Error("ebook url not found")}function jC(e=!1){let n=Ce().SUBTITLE_BUILDER_URL;if(n)zr(n,e);else throw new Error("subtitle url not found")}function UC(){return globalThis.navigator.languages||[globalThis.navigator.language||globalThis.navigator.userLanguage]}var HC={storage:{local:wh,sync:wh},runtime:{getManifest:PC,lastError:null,openOptionsPage:MC},extra:{detectLanguage:qi,openAboutPage:BC,openHtmlViewerPage:IC,openEbookViewerPage:OC,openEbookBuilderPage:NC,openSubtitleBuilderPage:jC,openPdfViewerPage:RC,openInTab:zr},i18n:{getAcceptLanguages:UC,detectLanguage:qi}};function zC(e){return e!==null&&typeof e=="object"}globalThis.immersiveTranslateBrowserAPI=HC;d();(function(){"use strict";var e=window.Bluebird||window.Promise;if(self.GM_fetch)return;let t;if(typeof GM<"u"&&GM.xmlHttpRequest)t=GM.xmlHttpRequest;else if(typeof GM<"u"&&GM_xmlhttpRequest)t=GM_xmlhttpRequest;else if(typeof GM_xmlhttpRequest<"u")t=GM_xmlhttpRequest;else if(typeof GM<"u"&&GM.xmlHttpRequest)t=GM.xmlHttpRequest;else return;function n(p){if(typeof p!="string"&&(p=p.toString()),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(p))throw new TypeError("Invalid character in header field name");return p.toLowerCase()}function r(p){return typeof p!="string"&&(p=p.toString()),p}function a(p){if(p.bodyUsed)return e.reject(new TypeError("Already read"));p.bodyUsed=!0}function o(p){return new e(function(f,y){p.onload=function(){f(p.result)},p.onerror=function(){y(p.error)}})}function i(p){var f=new FileReader;return f.readAsArrayBuffer(p),o(f)}function s(p){var f=new FileReader;return f.readAsText(p),o(f)}var u={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in self},l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function c(p){var f=p.toUpperCase();return l.indexOf(f)>-1?f:p}function m(p){var f=new FormData;return p.trim().split("&").forEach(function(y){if(y){var b=y.split("="),h=b.shift().replace(/\+/g," "),C=b.join("=").replace(/\+/g," ");f.append(decodeURIComponent(h),decodeURIComponent(C))}}),f}function g(p){var f=new Headers;if(typeof p=="string"){var y=p.trim().split(` -`);y.forEach(function(h){var C=h.trim().split(":"),w=C.shift().trim(),k=C.join(":").trim();f.append(w,k)})}else if(typeof p=="object")for(var b in p)Array.isArray(p[b])&&p[b].forEach(function(h){f.append(b,h)});return f}self.Headers=Headers,self.Request=Request,self.Response=Response,self.GM_fetch=function(p,f){var y,b;return f||(typeof p=="string"?f={}:p=f.url),Request&&Request.prototype&&Request.prototype.isPrototypeOf&&Request.prototype.isPrototypeOf(f)?y=f:(f.body&&(b=f.body),y=new Request(p,f)),new e(function(h,C){var w={};f&&f.extra&&(w=f.extra);var k;function R(v,x){if(v)return v;if(x.get("X-Request-URL"))return x.get("X-Request-URL")}w.method=y.method||"GET",w.timeout=6e4,y.timeout&&(w.timeout=y.timeout),w.url=y.url,w.synchronous=!1,w.onload=function(v){var x=v.status;if(x<100||x>599){C(new TypeError("Network request failed"));return}var B=v.responseHeaders;k=g(B);var _=R(v.finalUrl||v.responseURL,k);k.set("X-Final-URL",_);var E={status:x,statusText:v.statusText,headers:k,url:_},O=v.responseText;let F=new Response(O,E);h(F)},w.onerror=function(v){C(new TypeError("Network request failed"))},w.ontimeout=function(v){C(new TypeError("Network request timeout"))},w.onabort=function(v){C(new TypeError("Network request abort"))},w.headers={},y.headers.forEach(function(v,x){w.headers[x]=v}),b&&(w.data=b),t(w)})},self.GM_fetch.polyfill=!0})();d();d();d();var td=/iPhone/i,Dh=/iPod/i,Ah=/iPad/i,kh=/\biOS-universal(?:.+)Mac\b/i,nd=/\bAndroid(?:.+)Mobile\b/i,_h=/Android/i,ho=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ku=/Silk/i,Sr=/Windows Phone/i,Lh=/\bWindows(?:.+)ARM\b/i,Fh=/BlackBerry/i,Ph=/BB10/i,Mh=/Opera Mini/i,Bh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rh=/Mobile(?:.+)Firefox\b/i,Ih=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function qC(e){return t=>t.test(e)}function st(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=qC(n),o={apple:{phone:a(td)&&!a(Sr),ipod:a(Dh),tablet:!a(td)&&(a(Ah)||Ih(t))&&!a(Sr),universal:a(kh),device:(a(td)||a(Dh)||a(Ah)||a(kh)||Ih(t))&&!a(Sr)},amazon:{phone:a(ho),tablet:!a(ho)&&a(ku),device:a(ho)||a(ku)},android:{phone:!a(Sr)&&a(ho)||!a(Sr)&&a(nd),tablet:!a(Sr)&&!a(ho)&&!a(nd)&&(a(ku)||a(_h)),device:!a(Sr)&&(a(ho)||a(ku)||a(nd)||a(_h))||a(/\bokhttp\b/i)},windows:{phone:a(Sr),tablet:a(Lh),device:a(Sr)||a(Lh)},other:{blackberry:a(Fh),blackberry10:a(Ph),opera:a(Mh),firefox:a(Rh),chrome:a(Bh),device:a(Fh)||a(Ph)||a(Mh)||a(Rh)||a(Bh)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var rd="DENO",ad="CHROME",_u="FIREFOX";function WC(e){let t=ad;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=_u:/deno/i.test(n)&&(t=rd)}catch{}return e===ad&&t===ad||e===_u&&t===_u||e===rd&&t===rd}function Oh(){return typeof Deno<"u"}function bo(){return WC(_u)}function Lu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function Wi(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}d();var Nh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:Nh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:Nh,query:()=>{},sendMessage:()=>{}}};var oe;Oh()?oe=jh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();function ye(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=An.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":An[a]}else return"auto";else return An[r]}function ht(){return ye(document?.documentElement?.lang||"en")}d();function Jt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function Uh(e){if(e){let t=new Date(e.createTime),n=$C(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function $C(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,o]=n.split("/");return n=`${o}-${r}-${a}`,n}catch{return"unknown"}}d();var Hh=ge+"SyncStoreKey_";function Dt(e,t){let n=Hh+e;return oe.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function Qe(e,t){let n=Hh+e;return oe.storage.sync.set({[n]:t})}d();var zh=ge+"StoreKey_";function wr(e,t){let n=zh+e;return oe.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function qh(e,t){let n=zh+e;return oe.storage.local.set({[n]:t})}d();var Fa=ge+"CacheKey_";function od(e,t){let n=Fa+e;return oe.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function GC(){let e=oe.storage.local.refresh;e&&e()}function id(e,t){let n=Fa+e;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:o}=r[n];return o&&or.startsWith(Fa)).filter(r=>r!==Fa+zt);if(n.length>0)return oe.storage.local.remove(n)}}var qt={get:od,set:ud,getExpired:id,setExpired:sd,remove:ld,clear:Wh,refresh:GC};d();d();d();d();function $h(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function cd(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let o=VC(r);if(typeof a=="object"||o){let i=a;o&&typeof i=="string"&&(i={tag:"a",href:i,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=i.tag||"a",c=n.indexOf(``);if(c!==-1){let m=n.substring(u+s.length,c),g=Object.keys(i).filter(p=>p!=="tag").map(p=>`${p}="${i[p]}"`).join(" ");n=n.replace(`${s}${m}`,`<${l} ${g}>${m}`)}}}else if(a){let i=new RegExp("{"+r+"}","gm");n=n.replace(i,a.toString())}}),n}function $i(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),o="";do{o+=a.shift();let i=r[o];i!==void 0&&(typeof i=="object"||!a.length)?(r=i,o=""):a.length?o+=".":r=n}while(a.length);return r}function sr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let o=$i(e,n,t);return o===t&&n!==r&&(o=$i(e,r,t)),cd(o,a)}function VC(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function At(e,t,n){return sr(Rt,t,e.config.interfaceLanguage,"en",n)}d();function Gh(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",o).replace("HH",i).replace("mm",s).replace("ss",u)}function Vh(e){return new Date(e).getTime()}var K=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=At.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=At.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=At.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=At.bind(null,t),r="retry",a="network",o=n("networkError");if(!this.status||this.status<0)return;let i=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?i=`${n("error.googleLimitIp")}

${i}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?i=`${n("error.openAIFreeLimit")}

+{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:Ui,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...Hf,{type:"password",name:"apikey",required:!0}],props:Hf},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},wu={type:ge+"ChildFrameToRootFrameIdentifier"},Jc=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],Hi=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],ph=["ctrl","alt","shift","cmd","command","option","control"];var zI=Yt()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",Xc="user_from_plugin",qt="user_info",zi=Yt()||In()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",gh=Yt()||In()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",fh=gh+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",hh=gh+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Du=Yt()||In()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",go=Yt()||In()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",kC=Yt()||In()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",_C=Yt()||In()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",LC=Yt()||In()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",qI=go+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",WI=kC+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",bh=go+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Au=go+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",yh=_C+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",Eh=LC+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",xh=Du+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",Th="https://immersivetranslate.com/docs/usage/";var vh=Ce().TRANSLATE_FILE_URL,$I=vh+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",Ch=vh+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var fo=console,Qc=class{#e=performance.now();reset(){this.#e=performance.now()}stop(t){let n=performance.now(),r=Math.round(n-this.#e),a=Bn.green;r>1e4?a=Bn.red:r>1e3&&(a=Bn.yellow),fo.debug(Bn.dim(ka+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},qi=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&fo.log(Bn.dim(ka+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&fo.log(Bn.green(ka+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&fo.warn(Bn.yellow(ka+" WARN:"),...t)}error(...t){this.#e<=3&&fo.error(Bn.red(ka+" ERROR:"),...t)}fatal(...t){this.#e<=4&&fo.error(Bn.red(ka+" FATAL:"),...t)}timing(){return this.level===0?new Qc:{reset:()=>{},stop:()=>{}}}},P=new qi;var Sh=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Zc=new Map(Sh),FC=new Map(Sh.map(([e,t])=>[t,e]));function Wi(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>FC.get(s));!t&&t!==0&&(t=25);let a=Hs(e);if(a!=="auto")return a;let o={minLength:t,whitelist:[...Zc.keys()]},i=Fg(e,o);if(i&&i.length>0){if(i.length>1&&i[0][1]-i[1][1]<=.3)for(let c=0;c.5&&c/i.length<=.25){if(m=="eng"&&g<.95)break;return Zc.get(m)}}let[s,u]=i[0],l=Zc.get(s);if(l&&u>.9)return l}}catch(r){P.error(r)}return"auto"}if(typeof GM>"u"&&typeof GM_info<"u"&&typeof GM_getValue<"u"){let e=null;typeof GM_xmlhttpRequest<"u"?e=GM_xmlhttpRequest:typeof GM_xmlHttpRequest<"u"&&(e=GM_xmlHttpRequest);let t=null;typeof GM_registerMenuCommand<"u"&&(t=GM_registerMenuCommand),globalThis.GM={info:GM_info,getValue:GM_getValue,setValue:GM_setValue,deleteValue:GM_deleteValue,listValues:GM_listValues,xmlHttpRequest:e,registerMenuCommand:t,addStyle:typeof GM_addStyle<"u"?GM_addStyle:null,openInTab:typeof GM_openInTab<"u"?GM_openInTab:null,addElement:typeof GM_addElement<"u"?GM_addElement:null}}typeof GM<"u"&&GM&&GM.info===void 0&&typeof GM_info<"u"&&(GM.info=GM_info);var wh={get:async e=>{if(e===null){let r=await GM.listValues();Array.isArray(r)||r&&zC(r)&&(r=Object.keys(r));let a={};for(let o of r)a[o]=await GM.getValue(o);return a}let t=[];typeof e=="string"?t=[e]:Array.isArray(e)?t=e:t=Object.keys(e);let n={};for(let r of t)n[r]=await GM.getValue(r);return n},set:async e=>{for(let t in e)await GM.setValue(t,e[t])},remove:async e=>{if(typeof e=="string")await GM.deleteValue(e);else if(Array.isArray(e))for(let t of e)await GM.deleteValue(t)}};function PC(){if(typeof GM<"u"&&GM&&GM.info&&GM.info.script){let e=GM.info.script||{};return e._isUserscript=!0,e}else return{_isUserscript:!0,version:T.VERSION}}function zr(e,t=!0){GM&&GM.openInTab?GM.openInTab(e,!1):globalThis.open(e,t?"_blank":"_self")}function MC(e=!0,t=""){let n=Ce();GM&&GM.info&&GM.info.scriptHandler&&GM.info.scriptHandler==="Stay"?e=!1:e=!0;let r=n.OPTIONS_URL;if(r)zr(r+t,e);else throw new Error("options url not found")}function BC(e=!1){let n=Ce().OPTIONS_URL;if(n)zr(n+"#about",e);else throw new Error("options url not found")}function RC(e=!1){let n=Ce().PDF_VIEWER_URL;if(n)zr(n,e);else throw new Error("pdf url not found")}function IC(e=!1){let n=Ce().HTML_VIEWER_URL;if(n)zr(n,e);else throw new Error("html url not found")}function OC(e=!1){let n=Ce().EBOOK_VIEWER_URL;if(n)zr(n,e);else throw new Error("ebook url not found")}function NC(e=!1){let n=Ce().EBOOK_BUILDER_URL;if(n)zr(n,e);else throw new Error("ebook url not found")}function jC(e=!1){let n=Ce().SUBTITLE_BUILDER_URL;if(n)zr(n,e);else throw new Error("subtitle url not found")}function UC(){return globalThis.navigator.languages||[globalThis.navigator.language||globalThis.navigator.userLanguage]}var HC={storage:{local:wh,sync:wh},runtime:{getManifest:PC,lastError:null,openOptionsPage:MC},extra:{detectLanguage:Wi,openAboutPage:BC,openHtmlViewerPage:IC,openEbookViewerPage:OC,openEbookBuilderPage:NC,openSubtitleBuilderPage:jC,openPdfViewerPage:RC,openInTab:zr},i18n:{getAcceptLanguages:UC,detectLanguage:Wi}};function zC(e){return e!==null&&typeof e=="object"}globalThis.immersiveTranslateBrowserAPI=HC;d();(function(){"use strict";var e=window.Bluebird||window.Promise;if(self.GM_fetch)return;let t;if(typeof GM<"u"&&GM.xmlHttpRequest)t=GM.xmlHttpRequest;else if(typeof GM<"u"&&GM_xmlhttpRequest)t=GM_xmlhttpRequest;else if(typeof GM_xmlhttpRequest<"u")t=GM_xmlhttpRequest;else if(typeof GM<"u"&&GM.xmlHttpRequest)t=GM.xmlHttpRequest;else return;function n(p){if(typeof p!="string"&&(p=p.toString()),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(p))throw new TypeError("Invalid character in header field name");return p.toLowerCase()}function r(p){return typeof p!="string"&&(p=p.toString()),p}function a(p){if(p.bodyUsed)return e.reject(new TypeError("Already read"));p.bodyUsed=!0}function o(p){return new e(function(f,y){p.onload=function(){f(p.result)},p.onerror=function(){y(p.error)}})}function i(p){var f=new FileReader;return f.readAsArrayBuffer(p),o(f)}function s(p){var f=new FileReader;return f.readAsText(p),o(f)}var u={blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in self},l=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function c(p){var f=p.toUpperCase();return l.indexOf(f)>-1?f:p}function m(p){var f=new FormData;return p.trim().split("&").forEach(function(y){if(y){var b=y.split("="),h=b.shift().replace(/\+/g," "),C=b.join("=").replace(/\+/g," ");f.append(decodeURIComponent(h),decodeURIComponent(C))}}),f}function g(p){var f=new Headers;if(typeof p=="string"){var y=p.trim().split(` +`);y.forEach(function(h){var C=h.trim().split(":"),w=C.shift().trim(),k=C.join(":").trim();f.append(w,k)})}else if(typeof p=="object")for(var b in p)Array.isArray(p[b])&&p[b].forEach(function(h){f.append(b,h)});return f}self.Headers=Headers,self.Request=Request,self.Response=Response,self.GM_fetch=function(p,f){var y,b;return f||(typeof p=="string"?f={}:p=f.url),Request&&Request.prototype&&Request.prototype.isPrototypeOf&&Request.prototype.isPrototypeOf(f)?y=f:(f.body&&(b=f.body),y=new Request(p,f)),new e(function(h,C){var w={};f&&f.extra&&(w=f.extra);var k;function R(v,x){if(v)return v;if(x.get("X-Request-URL"))return x.get("X-Request-URL")}w.method=y.method||"GET",w.timeout=6e4,y.timeout&&(w.timeout=y.timeout),w.url=y.url,w.synchronous=!1,w.onload=function(v){var x=v.status;if(x<100||x>599){C(new TypeError("Network request failed"));return}var B=v.responseHeaders;k=g(B);var _=R(v.finalUrl||v.responseURL,k);k.set("X-Final-URL",_);var E={status:x,statusText:v.statusText,headers:k,url:_},O=v.responseText;let F=new Response(O,E);h(F)},w.onerror=function(v){C(new TypeError("Network request failed"))},w.ontimeout=function(v){C(new TypeError("Network request timeout"))},w.onabort=function(v){C(new TypeError("Network request abort"))},w.headers={},y.headers.forEach(function(v,x){w.headers[x]=v}),b&&(w.data=b),t(w)})},self.GM_fetch.polyfill=!0})();d();d();d();var ed=/iPhone/i,Dh=/iPod/i,Ah=/iPad/i,kh=/\biOS-universal(?:.+)Mac\b/i,td=/\bAndroid(?:.+)Mobile\b/i,_h=/Android/i,ho=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,ku=/Silk/i,Sr=/Windows Phone/i,Lh=/\bWindows(?:.+)ARM\b/i,Fh=/BlackBerry/i,Ph=/BB10/i,Mh=/Opera Mini/i,Bh=/\b(CriOS|Chrome)(?:.+)Mobile/i,Rh=/Mobile(?:.+)Firefox\b/i,Ih=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function qC(e){return t=>t.test(e)}function st(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=qC(n),o={apple:{phone:a(ed)&&!a(Sr),ipod:a(Dh),tablet:!a(ed)&&(a(Ah)||Ih(t))&&!a(Sr),universal:a(kh),device:(a(ed)||a(Dh)||a(Ah)||a(kh)||Ih(t))&&!a(Sr)},amazon:{phone:a(ho),tablet:!a(ho)&&a(ku),device:a(ho)||a(ku)},android:{phone:!a(Sr)&&a(ho)||!a(Sr)&&a(td),tablet:!a(Sr)&&!a(ho)&&!a(td)&&(a(ku)||a(_h)),device:!a(Sr)&&(a(ho)||a(ku)||a(td)||a(_h))||a(/\bokhttp\b/i)},windows:{phone:a(Sr),tablet:a(Lh),device:a(Sr)||a(Lh)},other:{blackberry:a(Fh),blackberry10:a(Ph),opera:a(Mh),firefox:a(Rh),chrome:a(Bh),device:a(Fh)||a(Ph)||a(Mh)||a(Rh)||a(Bh)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var nd="DENO",rd="CHROME",_u="FIREFOX";function WC(e){let t=rd;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=_u:/deno/i.test(n)&&(t=nd)}catch{}return e===rd&&t===rd||e===_u&&t===_u||e===nd&&t===nd}function Oh(){return typeof Deno<"u"}function bo(){return WC(_u)}function Lu(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function $i(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}d();var Nh={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},jh={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:Nh,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:Nh,query:()=>{},sendMessage:()=>{}}};var oe;Oh()?oe=jh:oe=globalThis.immersiveTranslateBrowserAPI;d();d();function he(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=An.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":An[a]}else return"auto";else return An[r]}function ht(){return he(document?.documentElement?.lang||"en")}d();function Jt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function Uh(e){if(e){let t=new Date(e.createTime),n=$C(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function $C(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,o]=n.split("/");return n=`${o}-${r}-${a}`,n}catch{return"unknown"}}d();var Hh=ge+"SyncStoreKey_";function Dt(e,t){let n=Hh+e;return oe.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function Ze(e,t){let n=Hh+e;return oe.storage.sync.set({[n]:t})}d();var zh=ge+"StoreKey_";function wr(e,t){let n=zh+e;return oe.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function qh(e,t){let n=zh+e;return oe.storage.local.set({[n]:t})}d();var Fa=ge+"CacheKey_";function ad(e,t){let n=Fa+e;return oe.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function GC(){let e=oe.storage.local.refresh;e&&e()}function od(e,t){let n=Fa+e;return oe.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:o}=r[n];return o&&or.startsWith(Fa)).filter(r=>r!==Fa+qt);if(n.length>0)return oe.storage.local.remove(n)}}var Wt={get:ad,set:sd,getExpired:od,setExpired:id,remove:ud,clear:Wh,refresh:GC};d();d();d();d();function $h(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function ld(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let o=VC(r);if(typeof a=="object"||o){let i=a;o&&typeof i=="string"&&(i={tag:"a",href:i,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=i.tag||"a",c=n.indexOf(``);if(c!==-1){let m=n.substring(u+s.length,c),g=Object.keys(i).filter(p=>p!=="tag").map(p=>`${p}="${i[p]}"`).join(" ");n=n.replace(`${s}${m}`,`<${l} ${g}>${m}`)}}}else if(a){let i=new RegExp("{"+r+"}","gm");n=n.replace(i,a.toString())}}),n}function Gi(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),o="";do{o+=a.shift();let i=r[o];i!==void 0&&(typeof i=="object"||!a.length)?(r=i,o=""):a.length?o+=".":r=n}while(a.length);return r}function sr(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let o=Gi(e,n,t);return o===t&&n!==r&&(o=Gi(e,r,t)),ld(o,a)}function VC(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function At(e,t,n){return sr(It,t,e.config.interfaceLanguage,"en",n)}d();function Gh(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",o).replace("HH",i).replace("mm",s).replace("ss",u)}function Vh(e){return new Date(e).getTime()}var K=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=At.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=At.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=At.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=At.bind(null,t),r="retry",a="network",o=n("networkError");if(!this.status||this.status<0)return;let i=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?i=`${n("error.googleLimitIp")}

${i}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?i=`${n("error.openAIFreeLimit")}

${i}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?i=`${n("error.openAIExceededQuota")}

- ${i}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?i=`${n("error.gemini.429")}

${i}`:i=`${n("error.429")}

${i}`:this.status===403?this.data?.translationService=="claude"?i=`${n("error.claude.403")}

${i}`:i=`${n("error.403")}

${i}`:this.status===400?i=`${n("error.400")}

${i}`:this.status===502?i=`${n("error.502")}

${i}`:this.status===404&&i.includes("User subscription not found")&&(i=`${n("error.subscriptionExpired")}

${i}`,r="setting",a="configError",o=n("error.subscriptionExpiredTitle")),{type:a,title:o,errMsg:i,action:r}}handleFetchError(t){let n=At.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=At.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=At.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:o,isTrial:i,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let m=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",p=n("errorReason",{message:r});if(o=="onetime_7day")p+=n("proQuotaExceededError.onetime7day",{anotherService:m,brandId:J,href:Au});else{let f="";g=="OpenAI"?f=yh:f=Eh,i?p+=n("proQuotaExceededError.trial",{anotherService:m,brandId:J,href:xh}):p+=n("proQuotaExceededError.nonTrial",{anotherService:m,brandId:J,href:f,translationService:g}),!i&&(a.cancelAtPeriodEnd==="false"||Vh(u)>s)&&(p+=n("proQuotaExceededError.resetTime",{resetTime:Gh(s,"YYYY-MM-DD HH:mm:ss")}))}return p}}};async function Pa(e){let t;if(e&&e.retry&&e.retry>0)try{t=await H0(Kh.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await Kh(e);return t}async function Kh(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let o=e.fetchPolyfill||fetch,i=3e4;if(e.timeout&&(i=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},i),r.signal=l}let s;try{s=await o(t,r)}catch(u){P.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new K("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of KC(s.body)){let m=new TextDecoder().decode(c);u+=m;let g;for(;(g=u.indexOf(` -`))>=0;){let p=u.slice(0,g).trim();if(u=u.slice(g+1),p.startsWith("event:")||p==="")continue;let f="";if(p.startsWith("data:")&&(f=p.slice(5).trim()),f==="[DONE]")break;let y;try{y=JSON.parse(f??"")}catch(b){P.debug("json error",b);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(p){P.error("parse response failed",p)}u&&P.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new K("fetchError",c).initNetWork(s.status)}}async function*KC(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}d();var YC=new Map;function Fu(e){let t=JC(64),n=new CustomEvent(hu,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{YC.set(t,(o,i)=>{o?a(o):r(i)})})}function JC(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var QC="";function Xt(){return QC||Pu.version}function dd(){return oe.runtime.getManifest().version}d();function Ue(){try{let e=[Ce().EBOOK_BUILDER_URL,Ce().EBOOK_VIEWER_URL,Ce().SUBTITLE_BUILDER_URL,Ce().HTML_VIEWER_URL,Ce().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];Yt()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let o=new URL(a);return n.startsWith(o.pathname)&&t.includes(o.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var Gi=new Map,qr=class{fromType;logger;constructor(t,n=!1){this.logger=new zi,n&&this.logger.setLevel("debug"),this.fromType=t,Gi.has(t)||(Gi.set(t,new Map),oe.runtime.onMessage.addListener((r,a,o)=>{let i=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,i=`${i}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let m=pd(s),{type:g,name:p}=m;if(g!==t)return!1;let f=pd(i),b=Gi.get(g).get(p);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,w={type:t,name:f.name,id:u,url:l,active:c};if(C){try{let k=h(r.payload,w);o({ok:!0,data:k})}catch(k){o({ok:!1,errorName:k.name,errorMessage:k.message,errorDetails:k.details,errorStatus:k.status})}return!1}else return h(r.payload,w).then(k=>{o({ok:!0,data:k})}).catch(k=>{o({ok:!1,errorName:k.name,errorMessage:k.message,errorDetails:k.message,errorStatus:k.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let o=this.fromType,i=Gi.get(o);if(i.has(t))return i.get(t).connectionInstance;{let s=new md(`${o}:${t}`,this.logger);return Gi.get(o).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},md=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=pd(t),{type:a,id:o}=r;if(a!=="content_script"){let i={to:t,from:this.from,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");try{let s=await oe.runtime.sendMessage(i);return Yh(i,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let i={from:this.from,to:t,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");let s=await oe.tabs.sendMessage(o,i);return Yh(i,s,this.logger)}}};function Yh(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new K(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new K("noResponse","Unknown error")}function pd(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var ZC="";function yo(){return ZC||globalThis.navigator.userAgent}function gd(){return yo().includes("ImtFxiOS")}function Jh(){let t=yo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function eS(){return yo().includes("ImtFxAndroid")}function Xh(){let e=yo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Qh(){let t=yo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function Vi(){let e=yo();if(gd()||eS()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Mu;function fd(){return Mu||(Mu=new qr("content_script",!1).getConnection("pure_main",()=>{}),Mu)}var Zh="G-MKMD9LWFTR";async function Ki(e){try{let t=Ce(),n=t.INSTALL_FROM==="firefox_store";if(Vi()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=Ee(),o=Ue(),i=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await Dt("fakeUserId","");u||(u=await wr("fakeUserId",""),u&&await Qe("fakeUserId",u));let l=Xt(),c=new Date,m=await Dt("installedAt","");m||(m=await wr("installedAt",""),m&&await Qe("installedAt",m)),u?m||(m=new Date(0).toISOString(),await Qe("installedAt",m)):(u=tS(32),await Qe("fakeUserId",u)),m||(m=c.toISOString(),await Qe("installedAt",m));let g=new Date(m),p=e3(g),f=e3(c),y=p===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${Zh}&api_secret=${s}`;i||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Zh}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let w=no.parse(C),k=e.map(v=>{let x=v.params||{};if(w.os&&(x.os_name=w.os.name||"unknown",x.os_version=w.os.version||"unknown",x.os_version_name=w.os.versionName||"unknown"),w.browser){x.browser_name=w.browser.name||"unknown",x.browser_version=w.browser.version||"unknown";let B=Vi();B&&(x.browser_name=B.name,x.browser_version=B.version)}return w.platform&&(x.platform_type=w.platform.type||"unknown"),w.engine&&(x.engine_name=w.engine.name||"unknown",x.engine_version=w.engine.version||"unknown"),l&&(x.version=l),t.INSTALL_FROM&&(x.install_from=t.INSTALL_FROM),p&&(x.install_day=nS(g)),x.userscript=a.toString(),y?x.is_new_user_today="1":x.is_new_user_today="0",b?x.is_new_user_this_week="1":x.is_new_user_this_week="0",o?x.main_frame=0:x.main_frame=1,{...v,params:x}}),R=await Bu({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:k})})}catch{}}function tS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${i}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?i=`${n("error.gemini.429")}

${i}`:i=`${n("error.429")}

${i}`:this.status===403?this.data?.translationService=="claude"?i=`${n("error.claude.403")}

${i}`:i=`${n("error.403")}

${i}`:this.status===400?i=`${n("error.400")}

${i}`:this.status===502?i=`${n("error.502")}

${i}`:this.status===404&&i.includes("User subscription not found")&&(i=`${n("error.subscriptionExpired")}

${i}`,r="setting",a="configError",o=n("error.subscriptionExpiredTitle")),{type:a,title:o,errMsg:i,action:r}}handleFetchError(t){let n=At.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=At.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=At.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:o,isTrial:i,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let m=this.data?.translationService=="deepl"?"OpenAI":"Deepl",g=this.data?.translationService=="deepl"?"Deepl":"OpenAI",p=n("errorReason",{message:r});if(o=="onetime_7day")p+=n("proQuotaExceededError.onetime7day",{anotherService:m,brandId:J,href:Au});else{let f="";g=="OpenAI"?f=yh:f=Eh,i?p+=n("proQuotaExceededError.trial",{anotherService:m,brandId:J,href:xh}):p+=n("proQuotaExceededError.nonTrial",{anotherService:m,brandId:J,href:f,translationService:g}),!i&&(a.cancelAtPeriodEnd==="false"||Vh(u)>s)&&(p+=n("proQuotaExceededError.resetTime",{resetTime:Gh(s,"YYYY-MM-DD HH:mm:ss")}))}return p}}};async function Pa(e){let t;if(e&&e.retry&&e.retry>0)try{t=await U0(Kh.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await Kh(e);return t}async function Kh(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let o=e.fetchPolyfill||fetch,i=3e4;if(e.timeout&&(i=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},i),r.signal=l}let s;try{s=await o(t,r)}catch(u){P.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new K("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of KC(s.body)){let m=new TextDecoder().decode(c);u+=m;let g;for(;(g=u.indexOf(` +`))>=0;){let p=u.slice(0,g).trim();if(u=u.slice(g+1),p.startsWith("event:")||p==="")continue;let f="";if(p.startsWith("data:")&&(f=p.slice(5).trim()),f==="[DONE]")break;let y;try{y=JSON.parse(f??"")}catch(b){P.debug("json error",b);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(p){P.error("parse response failed",p)}u&&P.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,g=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),g&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new K("fetchError",c).initNetWork(s.status)}}async function*KC(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}d();var YC=new Map;function Fu(e){let t=JC(64),n=new CustomEvent(hu,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{YC.set(t,(o,i)=>{o?a(o):r(i)})})}function JC(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};var QC="";function Xt(){return QC||Pu.version}function cd(){return oe.runtime.getManifest().version}d();function Ue(){try{let e=[Ce().EBOOK_BUILDER_URL,Ce().EBOOK_VIEWER_URL,Ce().SUBTITLE_BUILDER_URL,Ce().HTML_VIEWER_URL,Ce().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];Yt()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let o=new URL(a);return n.startsWith(o.pathname)&&t.includes(o.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}d();var Vi=new Map,qr=class{fromType;logger;constructor(t,n=!1){this.logger=new qi,n&&this.logger.setLevel("debug"),this.fromType=t,Vi.has(t)||(Vi.set(t,new Map),oe.runtime.onMessage.addListener((r,a,o)=>{let i=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,i=`${i}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let m=md(s),{type:g,name:p}=m;if(g!==t)return!1;let f=md(i),b=Vi.get(g).get(p);if(!b)return this.logger.debug(`no message handler for ${g}:${s}, but it's ok`),!1;let{messageHandler:h,sync:C}=b,w={type:t,name:f.name,id:u,url:l,active:c};if(C){try{let k=h(r.payload,w);o({ok:!0,data:k})}catch(k){o({ok:!1,errorName:k.name,errorMessage:k.message,errorDetails:k.details,errorStatus:k.status})}return!1}else return h(r.payload,w).then(k=>{o({ok:!0,data:k})}).catch(k=>{o({ok:!1,errorName:k.name,errorMessage:k.message,errorDetails:k.message,errorStatus:k.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let o=this.fromType,i=Vi.get(o);if(i.has(t))return i.get(t).connectionInstance;{let s=new dd(`${o}:${t}`,this.logger);return Vi.get(o).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},dd=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=md(t),{type:a,id:o}=r;if(a!=="content_script"){let i={to:t,from:this.from,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");try{let s=await oe.runtime.sendMessage(i);return Yh(i,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let i={from:this.from,to:t,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");let s=await oe.tabs.sendMessage(o,i);return Yh(i,s,this.logger)}}};function Yh(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new K(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new K("noResponse","Unknown error")}function md(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}d();var ZC="";function yo(){return ZC||globalThis.navigator.userAgent}function pd(){return yo().includes("ImtFxiOS")}function Jh(){let t=yo().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function eS(){return yo().includes("ImtFxAndroid")}function Xh(){let e=yo();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function Qh(){let t=yo().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function Ki(){let e=yo();if(pd()||eS()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Mu;function gd(){return Mu||(Mu=new qr("content_script",!1).getConnection("pure_main",()=>{}),Mu)}var Zh="G-MKMD9LWFTR";async function Yi(e){try{let t=Ce(),n=t.INSTALL_FROM==="firefox_store";if(Ki()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=Ee(),o=Ue(),i=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await Dt("fakeUserId","");u||(u=await wr("fakeUserId",""),u&&await Ze("fakeUserId",u));let l=Xt(),c=new Date,m=await Dt("installedAt","");m||(m=await wr("installedAt",""),m&&await Ze("installedAt",m)),u?m||(m=new Date(0).toISOString(),await Ze("installedAt",m)):(u=tS(32),await Ze("fakeUserId",u)),m||(m=c.toISOString(),await Ze("installedAt",m));let g=new Date(m),p=e3(g),f=e3(c),y=p===f,b=c.getTime()-g.getTime()<7*24*60*60*1e3,h=`https://www.google-analytics.com/mp/collect?measurement_id=${Zh}&api_secret=${s}`;i||(h=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Zh}&api_secret=${s}`);let C="";typeof navigator<"u"&&(C=window.navigator.userAgent);let w=no.parse(C),k=e.map(v=>{let x=v.params||{};if(w.os&&(x.os_name=w.os.name||"unknown",x.os_version=w.os.version||"unknown",x.os_version_name=w.os.versionName||"unknown"),w.browser){x.browser_name=w.browser.name||"unknown",x.browser_version=w.browser.version||"unknown";let B=Ki();B&&(x.browser_name=B.name,x.browser_version=B.version)}return w.platform&&(x.platform_type=w.platform.type||"unknown"),w.engine&&(x.engine_name=w.engine.name||"unknown",x.engine_version=w.engine.version||"unknown"),l&&(x.version=l),t.INSTALL_FROM&&(x.install_from=t.INSTALL_FROM),p&&(x.install_day=nS(g)),x.userscript=a.toString(),y?x.is_new_user_today="1":x.is_new_user_today="0",b?x.is_new_user_this_week="1":x.is_new_user_this_week="0",o?x.main_frame=0:x.main_frame=1,{...v,params:x}}),R=await Bu({responseType:"text",url:h,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:k})})}catch{}}function tS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5277,10 +5277,10 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function Ru(e){if(e.beta)return!1;if(nt()&&e.spVersion)return Yi(dd(),e.spVersion);if(Xh()&&e.gspVersion){let t=Qh();if(t)return Yi(t,e.gspVersion)}if(gd()&&e.ispVersion){let t=Jh();if(t)return Yi(t,e.ispVersion)}return!1}function Yi(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,o=0,i=1;for(let s=0;s<3;s++)a+=i*Number(r[s]||"0"),o+=i*Number(n[s]||"0"),i*=100;return o>=a}function hd(e){e.message?.indexOf("token invalid")>=0&&qt.remove(zt)}d();function Iu(e){return Array.isArray(e)?e:e?[e]:[]}function Ou(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Nu(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function ju(e,t){let n={...e};return a3(n,t),oS(n,t),n}function r3(e,t,n){let r={...t};return Ma({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,o)=>r[a]=o}),Ma({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,o)=>r[a]=o}),r}function oS(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;a3(e,a)}function Ma({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[o,i,s]=iS(a);if(!o||e[a]===void 0)return;let u=e[a];n(o)&&(u=Iu(e[a]));let l=t(o);if(l==null){r(o,u);return}let c;if(i=="add_v"){if(!t3(s))return;c=bd(l,u)}else if(i=="remove_v"){if(!t3(s))return;c=n3(l,u)}else i==="add"?c=bd(l,u):i=="remove"&&(c=n3(l,u));if(c){r(o,c);return}Array.isArray(e[o])&&o.startsWith("additional")?c=bd(l,u):c=u,r(o,c)})}function a3(e,t){return Ma({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function bd(e,t){let n;if(Array.isArray(e)){let r=Iu(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function iS(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function t3(e){let t=Xt();return e&&Yi(t,e)}function n3(e,t){if(Array.isArray(e)){let n=Iu(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function o3(){if(Se.PROD==="1")return{};let e={};if(Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(Se.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=Se.DEEPL_PROXY_ENDPOINT),Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}Se.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=Se.IMMERSIVE_TRANSLATE_SERVICE);let t={};return Se.DEBUG==="1"&&(t.debug=!0,t.cache=!1),Se.MOCK==="1"&&(t.translationService="mock"),t}async function Qt(){let e=await oe.storage.local.get(Ii);if(e[Ii]){let t=e[Ii],n=t.tempTranslationUrlMatches||[],r=n.filter(i=>i.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let o={...t,tempTranslationUrlMatches:[...n]};return a&&await Zt(o),o}else return{}}async function Zt(e){await oe.storage.local.set({[Ii]:e})}async function i3(e){await oe.storage.local.set({[Hr]:e})}async function s3(){let e=await oe.storage.local.get(Hr),n={...await yd(),...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Hr]){let r=e[Hr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),o=new Date(n.buildinConfigUpdatedAt);a>o&&(n=r)}}return n}async function pn(){let e=await oe.storage.local.get(Hr),t={...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Hr]){let S=e[Hr];if(S&&S.buildinConfigUpdatedAt){let A=new Date(S.buildinConfigUpdatedAt),j=new Date(t.buildinConfigUpdatedAt);A>j&&(t=S)}}let n=await lS(t);t.targetLanguage=n;let r=await qt.get(zt,null),a={};if(!Ee()&&oe.commands&&oe.commands.getAll){let S=await oe.commands.getAll();for(let A of S)A.name&&A.shortcut&&(a[A.name]=A.shortcut)}let o=await yd(),i=o3(),s=await Dr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Qt(),c=new Date,m=Object.assign({},u,i,s);if(!m.interfaceLanguage){let S=await sS();m.interfaceLanguage=S}let g=m.interfaceLanguage==="en",p=m.targetLanguage==="en",f=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(m.translationService)||!m.translationService;!g&&!p&&!f&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let b=t&&t.enableDefaultAlwaysTranslatedUrls;m.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=m&&m.isChangedAlwaysTranslatedUrls,C=[];m.translationUrlPattern&&m.translationUrlPattern.matches&&(C=m.translationUrlPattern.matches||[]);let w=!1;h===void 0&&(C.length>0?h=!0:h=!1,m.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,w=!0);let k=(m?.translationLanguagePattern?.matches?.length||0)>0,R=await Dt("installedAt",""),v=Number(await wr("translage_page_daily",0)),x=Number(await Dt(Kn,0)),B;x>0&&(Date.now()-x0&&(Date.now()-v0){let S=l.tempTranslationUrlMatches.filter(A=>new Date(A.expiredAt)>c);if(S.length>0){let A=m.translationUrlPattern?m.translationUrlPattern?.matches||[]:[],j=Array.isArray(A)?A:[A],q=Array.from(new Set(j.concat(S.map(z=>z.match))));m.translationUrlPattern={...m.translationUrlPattern,matches:q}}}let F=Object.assign(o,t);Ma({rule:t,valueIsArray:S=>Array.isArray(o[S]),getMergedValue:S=>o[S],onMergedResult:(S,A)=>{S!="generalRule"&&(F[S]=A)}});let M=Jt(r),N={};m.translationServices&&m.translationServices.deepl&&(N=m.translationServices.deepl);let U={};m.translationServices&&m.translationServices.openai&&(U=m.translationServices.openai),!M&&N.authKey&&!N.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):N&&N.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!M&&U.APIKEY&&!U.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):U&&U.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let H=Object.keys(F),L=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let S of H){let A=S;if(A==="generalRule")typeof m[A]=="object"&&(F[A]=ju(o[A],m[A]));else if(A==="translationServices")cS(m,F);else if(typeof m[A]!="string"&&typeof m[A]!="boolean"&&typeof m[A]!="number"&&L.includes(A))m[A]&&(F[A]=Object.assign(F[A],m[A])),A==="shortcuts"&&(Ee()||nt()?F[A]={...F[A],...a}:F[A]={...a});else if(A==="rules"){if(Array.isArray(m[A])){let j=F.rules||[],q={};for(let W of j)W.id&&(q[W.id]=W);let z=m[A].map(W=>W.id&&q[W.id]?r3(t.generalRule,q[W.id],W):W);F[A]=[...z,...F[A]]}if(Se.PROD==="0"&&Se.DEV_RULES){let j=JSON.parse(Se.DEV_RULES);F[A]=[...j,...F[A]]}}else m[A]!==void 0&&(F[A]=m[A])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function Dr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function Ji(e){await oe.storage.sync.set({userConfig:e})}async function Xi(e,t){await oe.storage.local.set({[e]:t})}async function Uu(e){return(await oe.storage.local.get(e))[e]||""}var sS=async()=>{let e=["zh-CN"];try{e=await oe.i18n.getAcceptLanguages()}catch(r){P.warn("get browser language error:",r)}let n=e.map(r=>ye(r)).find(r=>Rt[r]);return n||"en"},yd=async()=>{let e={...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};return{...e,targetLanguage:or,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function uS(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function lS(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return or;let n=await Dt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ma({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ma({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let i=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,m)=>i.includes(m)?c:u?.env[m]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();d();function u3(e){return e.replace(//g,">")}d();function l3(e,t,n){let r=dS(e,t),a=[],o={from:e[0].from,fromByClient:e[0].fromByClient,to:e[0].to,tempSentences:[],url:e[0].url};for(let i of r)(o.tempSentences.reduce((u,l)=>u+l.text.length,0)+i.text.length>t||o.tempSentences.length>=n)&&(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}),(o.from!==i.from||o.to!==i.to)&&(o.tempSentences.length>0?(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}):(o.from=i.from,o.to=i.to)),o.tempSentences.push(i);return o.tempSentences.length>0&&a.push(o),a}function dS(e,t){let n=[],r=[];for(let a=0;a0?y"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};d();d();function Ru(e){if(e.beta)return!1;if(rt()&&e.spVersion)return Ji(cd(),e.spVersion);if(Xh()&&e.gspVersion){let t=Qh();if(t)return Ji(t,e.gspVersion)}if(pd()&&e.ispVersion){let t=Jh();if(t)return Ji(t,e.ispVersion)}return!1}function Ji(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,o=0,i=1;for(let s=0;s<3;s++)a+=i*Number(r[s]||"0"),o+=i*Number(n[s]||"0"),i*=100;return o>=a}function fd(e){e.message?.indexOf("token invalid")>=0&&Wt.remove(qt)}d();function Iu(e){return Array.isArray(e)?e:e?[e]:[]}function Ou(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function Nu(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function ju(e,t){let n={...e};return a3(n,t),oS(n,t),n}function r3(e,t,n){let r={...t};return Ma({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,o)=>r[a]=o}),Ma({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,o)=>r[a]=o}),r}function oS(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;a3(e,a)}function Ma({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[o,i,s]=iS(a);if(!o||e[a]===void 0)return;let u=e[a];n(o)&&(u=Iu(e[a]));let l=t(o);if(l==null){r(o,u);return}let c;if(i=="add_v"){if(!t3(s))return;c=hd(l,u)}else if(i=="remove_v"){if(!t3(s))return;c=n3(l,u)}else i==="add"?c=hd(l,u):i=="remove"&&(c=n3(l,u));if(c){r(o,c);return}Array.isArray(e[o])&&o.startsWith("additional")?c=hd(l,u):c=u,r(o,c)})}function a3(e,t){return Ma({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function hd(e,t){let n;if(Array.isArray(e)){let r=Iu(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function iS(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function t3(e){let t=Xt();return e&&Ji(t,e)}function n3(e,t){if(Array.isArray(e)){let n=Iu(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function o3(){if(Se.PROD==="1")return{};let e={};if(Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(Se.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=Se.DEEPL_PROXY_ENDPOINT),Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}Se.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=Se.IMMERSIVE_TRANSLATE_SERVICE);let t={};return Se.DEBUG==="1"&&(t.debug=!0,t.cache=!1),Se.MOCK==="1"&&(t.translationService="mock"),t}async function Qt(){let e=await oe.storage.local.get(Oi);if(e[Oi]){let t=e[Oi],n=t.tempTranslationUrlMatches||[],r=n.filter(i=>i.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let o={...t,tempTranslationUrlMatches:[...n]};return a&&await Zt(o),o}else return{}}async function Zt(e){await oe.storage.local.set({[Oi]:e})}async function i3(e){await oe.storage.local.set({[Hr]:e})}async function s3(){let e=await oe.storage.local.get(Hr),n={...await bd(),...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Hr]){let r=e[Hr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),o=new Date(n.buildinConfigUpdatedAt);a>o&&(n=r)}}return n}async function pn(){let e=await oe.storage.local.get(Hr),t={...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Hr]){let S=e[Hr];if(S&&S.buildinConfigUpdatedAt){let A=new Date(S.buildinConfigUpdatedAt),j=new Date(t.buildinConfigUpdatedAt);A>j&&(t=S)}}let n=await lS(t);t.targetLanguage=n;let r=await Wt.get(qt,null),a={};if(!Ee()&&oe.commands&&oe.commands.getAll){let S=await oe.commands.getAll();for(let A of S)A.name&&A.shortcut&&(a[A.name]=A.shortcut)}let o=await bd(),i=o3(),s=await Dr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await Qt(),c=new Date,m=Object.assign({},u,i,s);if(!m.interfaceLanguage){let S=await sS();m.interfaceLanguage=S}let g=m.interfaceLanguage==="en",p=m.targetLanguage==="en",f=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(m.translationService)||!m.translationService;!g&&!p&&!f&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let b=t&&t.enableDefaultAlwaysTranslatedUrls;m.enableDefaultAlwaysTranslatedUrls===!1&&(b=!1);let h=m&&m.isChangedAlwaysTranslatedUrls,C=[];m.translationUrlPattern&&m.translationUrlPattern.matches&&(C=m.translationUrlPattern.matches||[]);let w=!1;h===void 0&&(C.length>0?h=!0:h=!1,m.isChangedAlwaysTranslatedUrls=h,s.isChangedAlwaysTranslatedUrls=h,w=!0);let k=(m?.translationLanguagePattern?.matches?.length||0)>0,R=await Dt("installedAt",""),v=Number(await wr("translage_page_daily",0)),x=Number(await Dt(Kn,0)),B;x>0&&(Date.now()-x0&&(Date.now()-v0){let S=l.tempTranslationUrlMatches.filter(A=>new Date(A.expiredAt)>c);if(S.length>0){let A=m.translationUrlPattern?m.translationUrlPattern?.matches||[]:[],j=Array.isArray(A)?A:[A],q=Array.from(new Set(j.concat(S.map(z=>z.match))));m.translationUrlPattern={...m.translationUrlPattern,matches:q}}}let F=Object.assign(o,t);Ma({rule:t,valueIsArray:S=>Array.isArray(o[S]),getMergedValue:S=>o[S],onMergedResult:(S,A)=>{S!="generalRule"&&(F[S]=A)}});let M=Jt(r),N={};m.translationServices&&m.translationServices.deepl&&(N=m.translationServices.deepl);let U={};m.translationServices&&m.translationServices.openai&&(U=m.translationServices.openai),!M&&N.authKey&&!N.provider?(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="custom"):N&&N.provider||(F.translationServices.deepl||(F.translationServices.deepl={}),F.translationServices.deepl.provider="pro"),!M&&U.APIKEY&&!U.provider?(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="custom"):U&&U.provider||(F.translationServices.openai||(F.translationServices.openai={}),F.translationServices.openai.provider="pro");let H=Object.keys(F),L=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let S of H){let A=S;if(A==="generalRule")typeof m[A]=="object"&&(F[A]=ju(o[A],m[A]));else if(A==="translationServices")cS(m,F);else if(typeof m[A]!="string"&&typeof m[A]!="boolean"&&typeof m[A]!="number"&&L.includes(A))m[A]&&(F[A]=Object.assign(F[A],m[A])),A==="shortcuts"&&(Ee()||rt()?F[A]={...F[A],...a}:F[A]={...a});else if(A==="rules"){if(Array.isArray(m[A])){let j=F.rules||[],q={};for(let W of j)W.id&&(q[W.id]=W);let z=m[A].map(W=>W.id&&q[W.id]?r3(t.generalRule,q[W.id],W):W);F[A]=[...z,...F[A]]}if(Se.PROD==="0"&&Se.DEV_RULES){let j=JSON.parse(Se.DEV_RULES);F[A]=[...j,...F[A]]}}else m[A]!==void 0&&(F[A]=m[A])}return F.donateUrl=t.donateUrl,F.minVersion=t.minVersion,F.feedbackUrl=t.feedbackUrl,F.rawUserConfig=s,F}async function Dr(){return(await oe.storage.sync.get("userConfig")||{}).userConfig||{}}async function Xi(e){await oe.storage.sync.set({userConfig:e})}async function Qi(e,t){await oe.storage.local.set({[e]:t})}async function Uu(e){return(await oe.storage.local.get(e))[e]||""}var sS=async()=>{let e=["zh-CN"];try{e=await oe.i18n.getAcceptLanguages()}catch(r){P.warn("get browser language error:",r)}let n=e.map(r=>he(r)).find(r=>It[r]);return n||"en"},bd=async()=>{let e={...Eo,buildinConfigUpdatedAt:Se.BUILD_TIME};return{...e,targetLanguage:or,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function uS(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function lS(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return or;let n=await Dt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),Ma({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),Ma({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let i=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,m)=>i.includes(m)?c:u?.env[m]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}d();d();d();function u3(e){return e.replace(//g,">")}d();function l3(e,t,n){let r=dS(e,t),a=[],o={from:e[0].from,fromByClient:e[0].fromByClient,to:e[0].to,tempSentences:[],url:e[0].url};for(let i of r)(o.tempSentences.reduce((u,l)=>u+l.text.length,0)+i.text.length>t||o.tempSentences.length>=n)&&(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}),(o.from!==i.from||o.to!==i.to)&&(o.tempSentences.length>0?(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}):(o.from=i.from,o.to=i.to)),o.tempSentences.push(i);return o.tempSentences.length>0&&a.push(o),a}function dS(e,t){let n=[],r=[];for(let a=0;a0?yt){let C=[];Ed(b,t,C);for(let w=0;w0&&y{let s=e.lastIndexOf(i,t);return s>o?s:o},-1);if(a===-1){let o=e.slice(0,t);if(o&&!o.trim())return;n.push({text:o,prefix:"",suffix:""}),e.length>t&&Ed(e.slice(t),t,n)}else{let o=e.slice(0,a+1);if(o&&o.trim()==="")return;o.startsWith(" ")?n.push({text:o.slice(1),prefix:" ",suffix:""}):n.push({text:o,prefix:"",suffix:""}),a+10){m.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?p.push(y):g.push(y))});let f=p.concat(g).filter(y=>y.required);if(f.length>0){for(let y of f)if(!o[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:o,providers:a.providers||[],props:a.props||[],allProps:m,optionalProps:p,explicitProps:g}}var Qi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,o=n.canary,i=n.debug,s=e.user,u=Jt(s),l=Object.keys(ir);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let m=ir[c];if(c.startsWith("mock"))return i?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&nt())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||o||u);let g=!!m.canary,p=!!m.alpha,f=!!m.beta;return c===e[t]||g&&o||p&&(r||o)||f&&(a||r||o)?!0:!p&&!f&&!g}).map(c=>Hu(t,c,e))};function Zi(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function c3(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();d();d();var Gu,Le,f3,mS,es,d3,h3,qu={},b3=[],pS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $r(e,t){for(var n in t)e[n]=t[n];return e}function y3(e){var t=e.parentNode;t&&t.removeChild(e)}function Td(e,t,n){var r,a,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?Gu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return zu(e,i,r,a,null)}function zu(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++f3};return a==null&&Le.vnode!=null&&Le.vnode(o),o}function Ot(e){return e.children}function xo(e,t){this.props=e,this.context=t}function To(e,t){if(t==null)return e.__?To(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?zu(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(g=h[c])===null||g&&p.key==g.key&&p.type===g.type)h[c]=void 0;else for(m=0;m=n.__.length&&n.__.push({__V:Vu}),n.__[e]}function se(e){return ts=1,bS(R3,e)}function bS(e,t,n){var r=Yu(ns++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):R3(void 0,t),function(o){var i=r.__N?r.__N[0]:r.__[0],s=r.t(i,o);i!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=St,!St.u)){St.u=!0;var a=St.shouldComponentUpdate;St.shouldComponentUpdate=function(o,i,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,o,i,s);var l=!1;return u.forEach(function(c){if(c.__N){var m=c.__[0];c.__=c.__N,c.__N=void 0,m!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,o,i,s))}}return r.__N||r.__}function De(e,t){var n=Yu(ns++,3);!Le.__s&&B3(n.__H,t)&&(n.__=e,n.i=t,St.__H.__h.push(n))}function We(e){return ts=5,Oe(function(){return{current:e}},[])}function Oe(e,t){var n=Yu(ns++,7);return B3(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function $e(e,t){return ts=8,Oe(function(){return e},t)}function Ju(e){var t=St.context[e.__c],n=Yu(ns++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(St)),t.props.value):e.__}function yS(){for(var e;e=M3.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ku),e.__H.__h.forEach(Sd),e.__H.__h=[]}catch(t){e.__H.__h=[],Le.__e(t,e.__v)}}Le.__b=function(e){typeof e.type!="function"||e.o||e.type===Ot?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),St=null,A3&&A3(e)},Le.__r=function(e){k3&&k3(e),ns=0;var t=(St=e.__c).__H;t&&(Cd===St?(t.__h=[],St.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Vu,n.__N=n.i=void 0})):(t.__h.forEach(Ku),t.__h.forEach(Sd),t.__h=[])),Cd=St},Le.diffed=function(e){_3&&_3(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(M3.push(t)!==1&&D3===Le.requestAnimationFrame||((D3=Le.requestAnimationFrame)||ES)(yS)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Vu&&(n.__=n.__V),n.i=void 0,n.__V=Vu})),Cd=St=null},Le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ku),n.__h=n.__h.filter(function(r){return!r.__||Sd(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Le.__e(r,n.__v)}}),L3&&L3(e,t)},Le.unmount=function(e){F3&&F3(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ku(r)}catch(a){t=a}}),n.__H=void 0,t&&Le.__e(t,n.__v))};var P3=typeof requestAnimationFrame=="function";function ES(e){var t,n=function(){clearTimeout(r),P3&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);P3&&(t=requestAnimationFrame(n))}function Ku(e){var t=St,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),St=t}function Sd(e){var t=St;e.__c=e.__(),St=t}function B3(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function R3(e,t){return typeof t=="function"?t(e):t}d();var I3=["*://*/*","*","*://*"],N3="immersive-translate-wildcard-placeholder.com";function wd(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>I3.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,o=r.hostname,i=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===o)return!0;if(I3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===o,m=l.port===i;return l.port?c&&m:c}else return TS(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let m=u.replace(/\*/g,N3),g;try{g=new URL(m)}catch{return P.debug("invalid match pattern",m,"raw match value:",c),!1}let p=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let y=xS(l+":",O3(p),O3(f));if(y){let b=new URL(a);return y.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function O3(e){return e.replaceAll(N3,"*")}function xS(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function ct(e,t){return wd(e,t)!==null}function TS(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var vS=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function vn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function Gr(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:o,atomicBlockSelectors:i}=t;if(vn(e,o))return!1;if(vn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=m();return c&&(c=!vn(e,i)),c;function m(){return n&&n.display?!!vS.includes(n.display):vn(e,r)}}var Wt=vn;function Ba(e){return!!e.shadowRoot}function Vr(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function rs(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function ur(e,t=!1){let n=ji;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ra(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return ur(n,t)}function So(e,t){return Wr(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Dd(e){let{rule:t}=e,n=CS(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function CS(e){let t=e.config.loadingTheme;return`${J}-loading-${t}`}function as(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),ut(r,eh,t.toString());let a=Dd(e);return r.append(Ge.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function wo(e,t){return e.querySelector(`[${Kc}='${t}']`)}function j3(){document.querySelectorAll(`[${Kc}]`).forEach(t=>{t.remove()})}function U3(){document.querySelectorAll(`.${yt}-error`).forEach(t=>{t.remove()})}function H3(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{ko(n)&&t.push(n)}),t}function Ad(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:o,delimiters:i,excludeRegexps:s,targetLanguage:u}=e,l=o,c=1001;try{if(r&&r.length>0){let m={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(m[f.k]=f.v||"",!0):!1).sort((f,y)=>f.tl&&!y.tl?1:!f.tl&&y.tl?-1:0),p=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(p,(f,y)=>{let b=c++;return t[`${b}`]=m[y]||y,i.length>2?f.replace(y,`<${i[2]}${b}>`):f.replace(y,`${i[0]}${b}${i[1]}`)})}s&&s.length>0&&s.forEach(m=>{let g=new RegExp(m,"gi");l=l.replace(g,(p,f)=>{let y=c++;return t[`${y}`]=u3(f),i.length>2?p.replace(f,`<${i[2]}${y}>`):p.replace(f,`${i[0]}${y}${i[1]}`)})})}catch(m){P.debug(`format source text error: ${m.message}`)}return{text:l,variables:t}}function os(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:o}=e,i=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];i=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=o.trim();return s=s.replace(i,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(o)||s.includes("")||s.includes("< styles>")||X3(s)||V3(s)||J3(s)||K3(s)||Y3(s)||wS(s)||i.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ao(o,n,r)}function Ar(e){return e.nodeType===Node.ELEMENT_NODE}function z3(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}async function kd(){return await Dt("fakeUserId","")}async function SS(){return await Dt("installedAt","")}async function Xu(e){let n=Ce().INSTALL_FROM,r=Xt(),a=await SS(),o=await kd(),i=await pn(),s=!1,u=await qt.get(zt,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:i.interfaceLanguage,deviceId:o,isProUser:s,isTrial:l}}function q3(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,o=0,i=n;for(;i&&i!==r;)o++,i=i.parentNode;let s=o+"";for(let u=0;u{!e||!t||(async()=>{let a=await Ld(e,t);r(a)})()},[e,t,r]),n}async function Ld(e,t){if(!e||!t)return;let n=!1,r,a=!0;!nt()&&Ee()||st().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let o=await Dt("installedAt","");new Date(o).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),o=e.config.translationModeUrlPattern.dualMatches.find(s=>ct(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>ct(e.url,s))?"translation":o?"dual":a?"translation":r?"dual":null}var Qu=!1,DS=Ee();function Q3(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let o of a)n.push(o)}return n}function AS(e,t){let n=function(o){return o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE?o.nodeType===Node.ELEMENT_NODE&&Z3(o,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let o=r.currentNode;if(o.nodeType===Node.ELEMENT_NODE){if(Kr(o,Tu)){if(a===!0)return!0;continue}if(is(o.nodeName,t.inlineTags))return!0;if(!Fd(o,t))return!1}}return!0}function Pd(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(is(e.nodeName,n)||Fd(e,t)){if(Kr(e,rh)||is(e.nodeName,["BR"]))return!1;if(Kr(e,Tu))return!0;if(Fd(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return AS(e,t)}else return Kr(e,Tu);return!1}function Z3(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Kr(e,nh,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Kr(e,Kf))return!1;let{stayOriginalTags:r,excludeTags:a}=t,o=[];return n&&a&&a.length>0?o=a||[]:o=a.filter(i=>!r.includes(i)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||is(e.nodeName,o))}function Ao(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(i=>i.trim()!=="").length>=n||!t2(r)&&r.length>=n}function e2(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(t2(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function t2(e){for(let t=0;t127)return!1;return!0}function V3(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function K3(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function Y3(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function J3(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function X3(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Kr(e,t,n=!1){return Md(e,t,"1",n)}function Md(e,t,n,r=!1){return Qu&&!r?e[Tn]?!!(e[Tn]&&e[Tn][t]===n):!1:e.dataset[t]===n}function _o(e){return(e.innerText||e.textContent||"").trim()}function Bd(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Zu(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function ut(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Qu&&!r?(e[Tn]||(e[Tn]={}),e[Tn][t]||(e[Tn][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function el(e,t,n=!1){if(Qu&&!n){if(!e[Tn]||!e[Tn][t])return;delete e[Tn][t]}else delete e.dataset[t]}function Lo(e,t,n=!1){return Qu&&!n?!e[Tn]||!e[Tn][t]?void 0:e[Tn][t]:e.dataset[t]}function Fd(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!is(e.nodeName,n)}function xe(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Ue())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Cn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){P.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else P.warn("injectCSS failed, rootDocument does not have head node",e)}function ko(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(DS){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function is(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function n2(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function r2(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let o=r.document.createRange(),i=a.offsetNode;if(!i||i.nodeType!==Node.TEXT_NODE||Z3(i,n,!0))return null;try{o.setStart(i,a.offset),o.setEnd(i,a.offset)}catch(s){return P.warn("getRangeFromPoint error",s),null}return o}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function a2(e,t,n){let r=0,a=(o,i,s,u)=>{if(++r>100||u===o)return o;let l=o.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return o;let c=l.elementFromPoint(i,s);return c?a(c,i,s,o):o};return a(e,t,n)}d();d();d();var Fo="input is invalid type",Rd=typeof window=="object",Yr=Rd?window:{};Yr.JS_SHA256_NO_WINDOW&&(Rd=!1);var kS=!Rd&&typeof self=="object",_S=!Yr.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;_S?Yr=global:kS&&(Yr=self);var hU=!Yr.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,bU=typeof define=="function"&&define.amd,ss=!Yr.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",he="0123456789abcdef".split(""),LS=[-2147483648,8388608,32768,128],Yn=[24,16,8,0],tl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],nl=["hex","array","digest","arrayBuffer"],Nt=[];(Yr.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});ss&&(Yr.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var o2=function(e,t){return function(n){return new jt(t,!0).update(n)[e]()}},s2=function(e){var t=o2("hex",e);t.create=function(){return new jt(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[o>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};jt.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=LS[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};jt.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=this.blocks,l,c,m,g,p,f,y,b,h,C,w;for(l=16;l<64;++l)p=u[l-15],c=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=u[l-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,u[l]=u[l-16]+c+u[l-7]+m<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,p=u[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(b=704751109,p=u[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=e&t,g=b^e&n^w,y=a&o^~a&i,p=s+m+y+tl[l]+u[l],f=c+g,s=r+p<<0,r=p+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),m=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&e,g=h^r&t^b,y=s&a^~s&o,p=i+m+y+tl[l+1]+u[l+1],f=c+g,i=n+p<<0,n=p+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),C=n&r,g=C^n&e^h,y=i&s^~i&a,p=o+m+y+tl[l+2]+u[l+2],f=c+g,o=t+p<<0,t=p+f<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),w=t&n,g=w^t&r^C,y=o&i^~o&s,p=a+m+y+tl[l+3]+u[l+3],f=c+g,a=e+p<<0,e=p+f<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+o<<0,this.h6=this.h6+i<<0,this.h7=this.h7+s<<0};jt.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=he[e>>28&15]+he[e>>24&15]+he[e>>20&15]+he[e>>16&15]+he[e>>12&15]+he[e>>8&15]+he[e>>4&15]+he[e&15]+he[t>>28&15]+he[t>>24&15]+he[t>>20&15]+he[t>>16&15]+he[t>>12&15]+he[t>>8&15]+he[t>>4&15]+he[t&15]+he[n>>28&15]+he[n>>24&15]+he[n>>20&15]+he[n>>16&15]+he[n>>12&15]+he[n>>8&15]+he[n>>4&15]+he[n&15]+he[r>>28&15]+he[r>>24&15]+he[r>>20&15]+he[r>>16&15]+he[r>>12&15]+he[r>>8&15]+he[r>>4&15]+he[r&15]+he[a>>28&15]+he[a>>24&15]+he[a>>20&15]+he[a>>16&15]+he[a>>12&15]+he[a>>8&15]+he[a>>4&15]+he[a&15]+he[o>>28&15]+he[o>>24&15]+he[o>>20&15]+he[o>>16&15]+he[o>>12&15]+he[o>>8&15]+he[o>>4&15]+he[o&15]+he[i>>28&15]+he[i>>24&15]+he[i>>20&15]+he[i>>16&15]+he[i>>12&15]+he[i>>8&15]+he[i>>4&15]+he[i&15];return this.is224||(u+=he[s>>28&15]+he[s>>24&15]+he[s>>20&15]+he[s>>16&15]+he[s>>12&15]+he[s>>8&15]+he[s>>4&15]+he[s&15]),u};jt.prototype.toString=jt.prototype.hex;jt.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,o>>24&255,o>>16&255,o>>8&255,o&255,i>>24&255,i>>16&255,i>>8&255,i&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};jt.prototype.array=jt.prototype.digest;jt.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function rl(e,t,n){var r,a=typeof e;if(a==="string"){var o=[],i=e.length,s=0,u;for(r=0;r>6,o[s++]=128|u&63):u<55296||u>=57344?(o[s++]=224|u>>12,o[s++]=128|u>>6&63,o[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),o[s++]=240|u>>18,o[s++]=128|u>>12&63,o[s++]=128|u>>6&63,o[s++]=128|u&63);e=o}else if(a==="object"){if(e===null)throw new Error(Fo);if(ss&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ss||!ArrayBuffer.isView(e)))throw new Error(Fo)}else throw new Error(Fo);e.length>64&&(e=new jt(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var m=e[r]||0;l[r]=92^m,c[r]=54^m}jt.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}rl.prototype=new jt;rl.prototype.finalize=function(){if(jt.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();jt.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),jt.prototype.finalize.call(this)}};var Po=s2();Po.sha256=Po;Po.sha224=s2(!0);Po.sha256.hmac=u2();Po.sha224.hmac=u2(!0);var l2=Po;var c2=l2.sha256;function Jn(e){return Promise.resolve(c2(e))}function al(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Jr(e,t){let n=c2.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function d2(e,t){let n=await Jr(e,t);return al(n)}async function ol(e,t){let n=FS(t),r=await Jr(e,n);return al(r)}function FS(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}d();var p2="auto",il="auto",m2="auto";function g2(e){p2=e}function On(e){il=e}function Et(){return il!=="auto"?il:m2!=="auto"?m2:p2}function sl(){return il}function h2(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(o=>{r.set(o.id,o)});for(let o of r.keys()){let[i,s]=o.split("2");if(["auto",t.sourceLanguage].includes(i)&&["auto",t.targetLanguage].includes(s)){let u=r.get(o);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Ut(e){let{url:t,config:n,state:r}=e,a=new URL(t),o="auto",{translationParagraphLanguagePattern:i,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:m,targetLanguage:g,sourceLanguageUrlPattern:p,immediateTranslationPattern:f}=n,y=g||"zh-CN",b=Mo(t,i),h=Mo(t,f),C=s,w=Object.keys(u);for(let ne of w){let re=u[ne];if(Mo(t,re)){C=ne;break}}let k=l,R=Object.keys(c);for(let ne of R){let re=c[ne];if(re&&Mo(t,re)){k=ne;break}}let v=Mo(t,m),x=f2(t,m);x||(x=ct(t,mh)),x||(x=ct(t,n.blockUrls));let B=f2(t,n.inputTranslationUrlPattern);B||(B=ct(t,n.inputTranslationBlockUrls));let _=ct(t,n.mutationBlockUrls),E=Object.keys(p),O={};for(let ne of E){let re=p[ne];if(re&&re.matches)for(let Te of re.matches)O[Te]=ne}let F=Object.keys(O),M=wd(t,F);M&&(o=O[M]??"auto",O[M]&&O[M]!=="auto"&&On(O[M]));let N=a.hostname,U=await Jn(N),H=a.pathname+a.search+a.hash,L=await Jn(H),S=`https://${U}.com/${L}`,A=await Qt(),j=await s3(),q=n.translationStartMode;q==="dynamic"&&h&&(q="immediate");let z=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(z=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ue=await qt.get(zt,null),ae=!1;ue&&(ae=Jt(ue));let X={targetLanguage:y,config:n,translationService:C,inputTranslationService:z,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:v,sourceLanguage:o,mainFrame:document.body,isTranslateExcludeUrl:x,isMutationTranslationExcludeUrl:_,isInputTranslationExcludeUrl:B,rule:n.generalRule,url:t,encryptedUrl:S,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:k,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:k,isTranslateDirectlyOnHover:!1},localConfig:A};ue&&(X.user=ue,ae?X.isPro=!0:X.isPro=!1),X.state.translationArea==="body"&&(X.config.generalRule.excludeTags=X.config.generalRule.excludeTags.filter(ne=>!X.config.generalRule.bodyTranslateTags.includes(ne)),X.config.generalRule.additionalExcludeSelectors=X.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[X.translationService]||{};ie.immediateTranslationTextCount!==void 0&&PS(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(X.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),X.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&X.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(X.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(X.state.translationDebounce=ie.translationDebounce);let pe=j.immediateTranslationTextCount;n.immediateTranslationTextCount!==pe&&(X.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>Mo(t,ne)),X.state.translationArea==="body"&&(X.rule.paragraphMinTextCount=1,X.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(X.state.translationStartMode="immediate");let be=n.generalRule;if(Y&&(X.rule=ju(be,Y)),X.rule.selectors.length>0&&(X.rule.paragraphMinTextCount=2,X.rule.paragraphMinWordCount=1),X.state.translationArea==="body"&&X.rule.excludeTags&&(X.rule.excludeTags=X.rule.excludeTags.filter(ne=>!X.rule.bodyTranslateTags.includes(ne)&&!X.rule.forceTranslateTags.includes(ne))),X.rule.mainFrameSelector){let ne=document.querySelector(X.rule.mainFrameSelector);ne&&(X.mainFrame=ne)}return X}function Mo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:o}=t;return r&&r.length>0&&ct(e,r)?!1:n&&n.length>0&&ct(e,n)?!0:o&&o.length>0&&Zu(o)?!1:!!(a&&a.length>0&&Zu(a))}function f2(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&ct(e,n)||r&&r.length>0&&Zu(r))}function PS(e){return typeof e=="number"}d();var Bo="imt-subtitle-inject",ul=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:Bo,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(r=>{let a=this.getRandomId();globalThis.postMessage({type:Bo,to:this.to,from:this.from,action:t,data:n,id:a,isAsync:!0});let o=({data:i})=>{Bo===i.type&&i.id===a&&i.to===this.from&&(r(i.data),globalThis.removeEventListener("message",o))};globalThis.addEventListener("message",o)})}handleMessageOnce(t){return new Promise(n=>{let r=({data:a})=>{Bo===a.type&&a.action===t&&a.to===this.from&&(n(a.data),globalThis.removeEventListener("message",r))};globalThis.addEventListener("message",r)})}handleMessage(t,n){let r=({data:a})=>{Bo===a.type&&a.action===t&&a.to===this.from&&n(a)};return globalThis.addEventListener("message",r),()=>{globalThis.removeEventListener("message",r)}}handleMessages(t){let n=({data:r})=>{Bo===r.type&&r.to===this.from&&t(r)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},Ia=new ul("content-script","inject"),MS=new ul("inject","content-script"),b2={get(e,t,n){return t in e?(...r)=>{let a=e[t];return typeof a=="function"?a.apply(e,r):Reflect.get(e,t,n)}:r=>e.sendAsyncMessages({action:t,data:r})}},IU=new Proxy(MS,b2),y2=new Proxy(Ia,b2);async function BS(){try{let e=await OS(xe(),{});if(e.isTranslateExcludeUrl||!e.rule.subtitleRule.type||e.rule.subtitleRule.disabled||!e.rule.subtitleRule.isInject)return;IS(e),RS(e)}catch{}}function RS(e){if(Ee()){let n=Ce().IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT,r=document.createElement("script");r.id="imt-subtitles-inject",r.textContent=n,document.head.appendChild(r)}else oe.storage.sync.get("open").then(()=>{let t=oe.runtime.getURL("video-subtitle/inject.js");if(document.querySelector(`script[src='${t}']`))return;let r=document.createElement("script");r.src=t,r.id="imt-subtitles-inject",document.head.appendChild(r)})}function IS(e){Ia.handleMessages(({id:t,action:n})=>{if(n==="getConfig"){let r=e.rule.subtitleRule;Ia.sendMessages({id:t,data:r})}})}BS();var Ro=null;async function OS(e,t){let n=Object.keys(t);if(Ro){let r={url:e,config:Ro.config,state:{...Ro.state,...t}};Ro=await Ut(r)}else{let r=await NS(),a=t;n.length===0&&(a=void 0),Ro=await Ut({url:e,config:r,state:a})}return Ro}function NS(){return Ee()?pn():jS({method:"getConfig"})}async function jS(e){return await fd().sendMessage("background:main",e)}d();d();d();d();var US=` +`;continue}else if(b.length>t){let C=[];yd(b,t,C);for(let w=0;w0&&y{let s=e.lastIndexOf(i,t);return s>o?s:o},-1);if(a===-1){let o=e.slice(0,t);if(o&&!o.trim())return;n.push({text:o,prefix:"",suffix:""}),e.length>t&&yd(e.slice(t),t,n)}else{let o=e.slice(0,a+1);if(o&&o.trim()==="")return;o.startsWith(" ")?n.push({text:o.slice(1),prefix:" ",suffix:""}):n.push({text:o,prefix:"",suffix:""}),a+10){m.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?p.push(y):g.push(y))});let f=p.concat(g).filter(y=>y.required);if(f.length>0){for(let y of f)if(!o[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:o,providers:a.providers||[],props:a.props||[],allProps:m,optionalProps:p,explicitProps:g}}var Zi=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,o=n.canary,i=n.debug,s=e.user,u=Jt(s),l=Object.keys(ir);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let m=ir[c];if(c.startsWith("mock"))return i?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&rt())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||o||u);let g=!!m.canary,p=!!m.alpha,f=!!m.beta;return c===e[t]||g&&o||p&&(r||o)||f&&(a||r||o)?!0:!p&&!f&&!g}).map(c=>Hu(t,c,e))};function es(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function c3(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}d();d();d();var Gu,Le,f3,mS,ts,d3,h3,qu={},b3=[],pS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function $r(e,t){for(var n in t)e[n]=t[n];return e}function y3(e){var t=e.parentNode;t&&t.removeChild(e)}function xd(e,t,n){var r,a,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?Gu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return zu(e,i,r,a,null)}function zu(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++f3};return a==null&&Le.vnode!=null&&Le.vnode(o),o}function Nt(e){return e.children}function xo(e,t){this.props=e,this.context=t}function To(e,t){if(t==null)return e.__?To(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?zu(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null){if(p.__=n,p.__b=n.__b+1,(g=h[c])===null||g&&p.key==g.key&&p.type===g.type)h[c]=void 0;else for(m=0;m=n.__.length&&n.__.push({__V:Vu}),n.__[e]}function se(e){return ns=1,bS(R3,e)}function bS(e,t,n){var r=Yu(rs++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):R3(void 0,t),function(o){var i=r.__N?r.__N[0]:r.__[0],s=r.t(i,o);i!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=St,!St.u)){St.u=!0;var a=St.shouldComponentUpdate;St.shouldComponentUpdate=function(o,i,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,o,i,s);var l=!1;return u.forEach(function(c){if(c.__N){var m=c.__[0];c.__=c.__N,c.__N=void 0,m!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,o,i,s))}}return r.__N||r.__}function De(e,t){var n=Yu(rs++,3);!Le.__s&&B3(n.__H,t)&&(n.__=e,n.i=t,St.__H.__h.push(n))}function We(e){return ns=5,Oe(function(){return{current:e}},[])}function Oe(e,t){var n=Yu(rs++,7);return B3(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function $e(e,t){return ns=8,Oe(function(){return e},t)}function Ju(e){var t=St.context[e.__c],n=Yu(rs++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(St)),t.props.value):e.__}function yS(){for(var e;e=M3.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ku),e.__H.__h.forEach(Cd),e.__H.__h=[]}catch(t){e.__H.__h=[],Le.__e(t,e.__v)}}Le.__b=function(e){typeof e.type!="function"||e.o||e.type===Nt?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),St=null,A3&&A3(e)},Le.__r=function(e){k3&&k3(e),rs=0;var t=(St=e.__c).__H;t&&(vd===St?(t.__h=[],St.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Vu,n.__N=n.i=void 0})):(t.__h.forEach(Ku),t.__h.forEach(Cd),t.__h=[])),vd=St},Le.diffed=function(e){_3&&_3(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(M3.push(t)!==1&&D3===Le.requestAnimationFrame||((D3=Le.requestAnimationFrame)||ES)(yS)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Vu&&(n.__=n.__V),n.i=void 0,n.__V=Vu})),vd=St=null},Le.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Ku),n.__h=n.__h.filter(function(r){return!r.__||Cd(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Le.__e(r,n.__v)}}),L3&&L3(e,t)},Le.unmount=function(e){F3&&F3(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Ku(r)}catch(a){t=a}}),n.__H=void 0,t&&Le.__e(t,n.__v))};var P3=typeof requestAnimationFrame=="function";function ES(e){var t,n=function(){clearTimeout(r),P3&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);P3&&(t=requestAnimationFrame(n))}function Ku(e){var t=St,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),St=t}function Cd(e){var t=St;e.__c=e.__(),St=t}function B3(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function R3(e,t){return typeof t=="function"?t(e):t}d();var I3=["*://*/*","*","*://*"],N3="immersive-translate-wildcard-placeholder.com";function Sd(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>I3.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,o=r.hostname,i=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===o)return!0;if(I3.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===o,m=l.port===i;return l.port?c&&m:c}else return TS(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let b=u.split("://");l=b[0],l==="*"&&b.length>1&&(l="*",u="https://"+b[1])}else l="*",u="https://"+u;let m=u.replace(/\*/g,N3),g;try{g=new URL(m)}catch{return P.debug("invalid match pattern",m,"raw match value:",c),!1}let p=g.host,f=g.pathname;f==="/"&&(c.replace("://","").includes("/")||(f="/*"));let y=xS(l+":",O3(p),O3(f));if(y){let b=new URL(a);return y.test(b.href)}else return!1}});if(s)return s}return null}catch{return null}}function O3(e){return e.replaceAll(N3,"*")}function xS(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function ct(e,t){return Sd(e,t)!==null}function TS(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}var vS=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function vn(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function Gr(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:o,atomicBlockSelectors:i}=t;if(vn(e,o))return!1;if(vn(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=m();return c&&(c=!vn(e,i)),c;function m(){return n&&n.display?!!vS.includes(n.display):vn(e,r)}}var $t=vn;function Ba(e){return!!e.shadowRoot}function Vr(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function as(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function ur(e,t=!1){let n=Ui;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ra(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return ur(n,t)}function So(e,t){return Wr(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function wd(e){let{rule:t}=e,n=CS(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function CS(e){let t=e.config.loadingTheme;return`${J}-loading-${t}`}function os(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",yt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),ut(r,eh,t.toString());let a=wd(e);return r.append(Ge.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function wo(e,t){return e.querySelector(`[${Vc}='${t}']`)}function j3(){document.querySelectorAll(`[${Vc}]`).forEach(t=>{t.remove()})}function U3(){document.querySelectorAll(`.${yt}-error`).forEach(t=>{t.remove()})}function H3(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{ko(n)&&t.push(n)}),t}function Dd(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:o,delimiters:i,excludeRegexps:s,targetLanguage:u}=e,l=o,c=1001;try{if(r&&r.length>0){let m={},g=r.filter(f=>f.tl&&f.tl!==u?!1:f.k?(m[f.k]=f.v||"",!0):!1).sort((f,y)=>f.tl&&!y.tl?1:!f.tl&&y.tl?-1:0),p=new RegExp(a.replace("{word}",g.map(f=>f.k).join("|")),"g");l=l.replace(p,(f,y)=>{let b=c++;return t[`${b}`]=m[y]||y,i.length>2?f.replace(y,`<${i[2]}${b}>`):f.replace(y,`${i[0]}${b}${i[1]}`)})}s&&s.length>0&&s.forEach(m=>{let g=new RegExp(m,"gi");l=l.replace(g,(p,f)=>{let y=c++;return t[`${y}`]=u3(f),i.length>2?p.replace(f,`<${i[2]}${y}>`):p.replace(f,`${i[0]}${y}${i[1]}`)})})}catch(m){P.debug(`format source text error: ${m.message}`)}return{text:l,variables:t}}function is(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:o}=e,i=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];i=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=o.trim();return s=s.replace(i,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(o)||s.includes("")||s.includes("< styles>")||X3(s)||V3(s)||J3(s)||K3(s)||Y3(s)||wS(s)||i.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:Ao(o,n,r)}function Ar(e){return e.nodeType===Node.ELEMENT_NODE}function z3(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}async function Ad(){return await Dt("fakeUserId","")}async function SS(){return await Dt("installedAt","")}async function Xu(e){let n=Ce().INSTALL_FROM,r=Xt(),a=await SS(),o=await Ad(),i=await pn(),s=!1,u=await Wt.get(qt,null),l=!1;return u&&Jt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:i.interfaceLanguage,deviceId:o,isProUser:s,isTrial:l}}function q3(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,o=0,i=n;for(;i&&i!==r;)o++,i=i.parentNode;let s=o+"";for(let u=0;u{!e||!t||(async()=>{let a=await _d(e,t);r(a)})()},[e,t,r]),n}async function _d(e,t){if(!e||!t)return;let n=!1,r,a=!0;!rt()&&Ee()||st().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let o=await Dt("installedAt","");new Date(o).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),o=e.config.translationModeUrlPattern.dualMatches.find(s=>ct(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>ct(e.url,s))?"translation":o?"dual":a?"translation":r?"dual":null}var Qu=!1,DS=Ee();function Q3(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let o of a)n.push(o)}return n}function AS(e,t){let n=function(o){return o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE?o.nodeType===Node.ELEMENT_NODE&&Z3(o,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let o=r.currentNode;if(o.nodeType===Node.ELEMENT_NODE){if(Kr(o,Tu)){if(a===!0)return!0;continue}if(ss(o.nodeName,t.inlineTags))return!0;if(!Ld(o,t))return!1}}return!0}function Fd(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(ss(e.nodeName,n)||Ld(e,t)){if(Kr(e,rh)||ss(e.nodeName,["BR"]))return!1;if(Kr(e,Tu))return!0;if(Ld(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return AS(e,t)}else return Kr(e,Tu);return!1}function Z3(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&Kr(e,nh,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&Kr(e,Kf))return!1;let{stayOriginalTags:r,excludeTags:a}=t,o=[];return n&&a&&a.length>0?o=a||[]:o=a.filter(i=>!r.includes(i)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||ss(e.nodeName,o))}function Ao(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(i=>i.trim()!=="").length>=n||!t2(r)&&r.length>=n}function e2(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(t2(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function t2(e){for(let t=0;t127)return!1;return!0}function V3(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function K3(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function Y3(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function J3(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function X3(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function Kr(e,t,n=!1){return Pd(e,t,"1",n)}function Pd(e,t,n,r=!1){return Qu&&!r?e[Tn]?!!(e[Tn]&&e[Tn][t]===n):!1:e.dataset[t]===n}function _o(e){return(e.innerText||e.textContent||"").trim()}function Md(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function Zu(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function ut(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(Qu&&!r?(e[Tn]||(e[Tn]={}),e[Tn][t]||(e[Tn][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function el(e,t,n=!1){if(Qu&&!n){if(!e[Tn]||!e[Tn][t])return;delete e[Tn][t]}else delete e.dataset[t]}function Lo(e,t,n=!1){return Qu&&!n?!e[Tn]||!e[Tn][t]?void 0:e[Tn][t]:e.dataset[t]}function Ld(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!ss(e.nodeName,n)}function xe(){if(!globalThis||!globalThis.location)return"https://example.com";if(!Ue())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function Cn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){P.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else P.warn("injectCSS failed, rootDocument does not have head node",e)}function ko(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(DS){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function ss(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function n2(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function r2(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let o=r.document.createRange(),i=a.offsetNode;if(!i||i.nodeType!==Node.TEXT_NODE||Z3(i,n,!0))return null;try{o.setStart(i,a.offset),o.setEnd(i,a.offset)}catch(s){return P.warn("getRangeFromPoint error",s),null}return o}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function a2(e,t,n){let r=0,a=(o,i,s,u)=>{if(++r>100||u===o)return o;let l=o.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return o;let c=l.elementFromPoint(i,s);return c?a(c,i,s,o):o};return a(e,t,n)}d();d();d();var Fo="input is invalid type",Bd=typeof window=="object",Yr=Bd?window:{};Yr.JS_SHA256_NO_WINDOW&&(Bd=!1);var kS=!Bd&&typeof self=="object",_S=!Yr.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;_S?Yr=global:kS&&(Yr=self);var hU=!Yr.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,bU=typeof define=="function"&&define.amd,us=!Yr.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",be="0123456789abcdef".split(""),LS=[-2147483648,8388608,32768,128],Yn=[24,16,8,0],tl=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],nl=["hex","array","digest","arrayBuffer"],jt=[];(Yr.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});us&&(Yr.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var o2=function(e,t){return function(n){return new Ut(t,!0).update(n)[e]()}},s2=function(e){var t=o2("hex",e);t.create=function(){return new Ut(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[o>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};Ut.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=LS[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};Ut.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=this.blocks,l,c,m,g,p,f,y,b,h,C,w;for(l=16;l<64;++l)p=u[l-15],c=(p>>>7|p<<25)^(p>>>18|p<<14)^p>>>3,p=u[l-2],m=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,u[l]=u[l-16]+c+u[l-7]+m<<0;for(w=t&n,l=0;l<64;l+=4)this.first?(this.is224?(b=300032,p=u[0]-1413257819,s=p-150054599<<0,r=p+24177077<<0):(b=704751109,p=u[0]-210244248,s=p-1521486534<<0,r=p+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),m=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),b=e&t,g=b^e&n^w,y=a&o^~a&i,p=s+m+y+tl[l]+u[l],f=c+g,s=r+p<<0,r=p+f<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),m=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),h=r&e,g=h^r&t^b,y=s&a^~s&o,p=i+m+y+tl[l+1]+u[l+1],f=c+g,i=n+p<<0,n=p+f<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),m=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),C=n&r,g=C^n&e^h,y=i&s^~i&a,p=o+m+y+tl[l+2]+u[l+2],f=c+g,o=t+p<<0,t=p+f<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),m=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),w=t&n,g=w^t&r^C,y=o&i^~o&s,p=a+m+y+tl[l+3]+u[l+3],f=c+g,a=e+p<<0,e=p+f<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+o<<0,this.h6=this.h6+i<<0,this.h7=this.h7+s<<0};Ut.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=be[e>>28&15]+be[e>>24&15]+be[e>>20&15]+be[e>>16&15]+be[e>>12&15]+be[e>>8&15]+be[e>>4&15]+be[e&15]+be[t>>28&15]+be[t>>24&15]+be[t>>20&15]+be[t>>16&15]+be[t>>12&15]+be[t>>8&15]+be[t>>4&15]+be[t&15]+be[n>>28&15]+be[n>>24&15]+be[n>>20&15]+be[n>>16&15]+be[n>>12&15]+be[n>>8&15]+be[n>>4&15]+be[n&15]+be[r>>28&15]+be[r>>24&15]+be[r>>20&15]+be[r>>16&15]+be[r>>12&15]+be[r>>8&15]+be[r>>4&15]+be[r&15]+be[a>>28&15]+be[a>>24&15]+be[a>>20&15]+be[a>>16&15]+be[a>>12&15]+be[a>>8&15]+be[a>>4&15]+be[a&15]+be[o>>28&15]+be[o>>24&15]+be[o>>20&15]+be[o>>16&15]+be[o>>12&15]+be[o>>8&15]+be[o>>4&15]+be[o&15]+be[i>>28&15]+be[i>>24&15]+be[i>>20&15]+be[i>>16&15]+be[i>>12&15]+be[i>>8&15]+be[i>>4&15]+be[i&15];return this.is224||(u+=be[s>>28&15]+be[s>>24&15]+be[s>>20&15]+be[s>>16&15]+be[s>>12&15]+be[s>>8&15]+be[s>>4&15]+be[s&15]),u};Ut.prototype.toString=Ut.prototype.hex;Ut.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,o>>24&255,o>>16&255,o>>8&255,o&255,i>>24&255,i>>16&255,i>>8&255,i&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};Ut.prototype.array=Ut.prototype.digest;Ut.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function rl(e,t,n){var r,a=typeof e;if(a==="string"){var o=[],i=e.length,s=0,u;for(r=0;r>6,o[s++]=128|u&63):u<55296||u>=57344?(o[s++]=224|u>>12,o[s++]=128|u>>6&63,o[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),o[s++]=240|u>>18,o[s++]=128|u>>12&63,o[s++]=128|u>>6&63,o[s++]=128|u&63);e=o}else if(a==="object"){if(e===null)throw new Error(Fo);if(us&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!us||!ArrayBuffer.isView(e)))throw new Error(Fo)}else throw new Error(Fo);e.length>64&&(e=new Ut(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var m=e[r]||0;l[r]=92^m,c[r]=54^m}Ut.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}rl.prototype=new Ut;rl.prototype.finalize=function(){if(Ut.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Ut.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Ut.prototype.finalize.call(this)}};var Po=s2();Po.sha256=Po;Po.sha224=s2(!0);Po.sha256.hmac=u2();Po.sha224.hmac=u2(!0);var l2=Po;var c2=l2.sha256;function Jn(e){return Promise.resolve(c2(e))}function al(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Jr(e,t){let n=c2.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function d2(e,t){let n=await Jr(e,t);return al(n)}async function ol(e,t){let n=FS(t),r=await Jr(e,n);return al(r)}function FS(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}d();var p2="auto",il="auto",m2="auto";function g2(e){p2=e}function On(e){il=e}function Et(){return il!=="auto"?il:m2!=="auto"?m2:p2}function sl(){return il}function h2(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(o=>{r.set(o.id,o)});for(let o of r.keys()){let[i,s]=o.split("2");if(["auto",t.sourceLanguage].includes(i)&&["auto",t.targetLanguage].includes(s)){let u=r.get(o);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function Ht(e){let{url:t,config:n,state:r}=e,a=new URL(t),o="auto",{translationParagraphLanguagePattern:i,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:m,targetLanguage:g,sourceLanguageUrlPattern:p,immediateTranslationPattern:f}=n,y=g||"zh-CN",b=Mo(t,i),h=Mo(t,f),C=s,w=Object.keys(u);for(let ne of w){let re=u[ne];if(Mo(t,re)){C=ne;break}}let k=l,R=Object.keys(c);for(let ne of R){let re=c[ne];if(re&&Mo(t,re)){k=ne;break}}let v=Mo(t,m),x=f2(t,m);x||(x=ct(t,mh)),x||(x=ct(t,n.blockUrls));let B=f2(t,n.inputTranslationUrlPattern);B||(B=ct(t,n.inputTranslationBlockUrls));let _=ct(t,n.mutationBlockUrls),E=Object.keys(p),O={};for(let ne of E){let re=p[ne];if(re&&re.matches)for(let Te of re.matches)O[Te]=ne}let F=Object.keys(O),M=Sd(t,F);M&&(o=O[M]??"auto",O[M]&&O[M]!=="auto"&&On(O[M]));let N=a.hostname,U=await Jn(N),H=a.pathname+a.search+a.hash,L=await Jn(H),S=`https://${U}.com/${L}`,A=await Qt(),j=await s3(),q=n.translationStartMode;q==="dynamic"&&h&&(q="immediate");let z=C;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(z=n.inputTranslationService);let W=C;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(W=n.mouseHoverTranslationService);let V=C;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(V=n.subtitleTranslateService);let ue=await Wt.get(qt,null),ae=!1;ue&&(ae=Jt(ue));let X={targetLanguage:y,config:n,translationService:C,inputTranslationService:z,mouseHoverTranslationService:W,subtitleTranslateService:V,isTranslateUrl:v,sourceLanguage:o,mainFrame:document.body,isTranslateExcludeUrl:x,isMutationTranslationExcludeUrl:_,isInputTranslationExcludeUrl:B,rule:n.generalRule,url:t,encryptedUrl:S,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:k,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:b,cache:n.cache,translationTheme:k,isTranslateDirectlyOnHover:!1},localConfig:A};ue&&(X.user=ue,ae?X.isPro=!0:X.isPro=!1),X.state.translationArea==="body"&&(X.config.generalRule.excludeTags=X.config.generalRule.excludeTags.filter(ne=>!X.config.generalRule.bodyTranslateTags.includes(ne)),X.config.generalRule.additionalExcludeSelectors=X.config.generalRule.additionalExcludeSelectors.filter(ne=>ne!==".btn"));let ie=n.translationServices[X.translationService]||{};ie.immediateTranslationTextCount!==void 0&&PS(ie.immediateTranslationTextCount)&&ie.immediateTranslationTextCount>=0&&(X.state.immediateTranslationTextCount=ie.immediateTranslationTextCount),X.translationService==="deepl"&&(ie&&ie.authKey&&ie.authKey.startsWith("immersive_")||ie&&ie.provider==="pro"&&X.user?.token)&&ie.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ie.immediateTranslationTextCountForImmersiveDeepl>=0&&(X.state.immediateTranslationTextCount=ie.immediateTranslationTextCountForImmersiveDeepl),ie&&ie.translationDebounce&&typeof ie.translationDebounce=="number"&&(X.state.translationDebounce=ie.translationDebounce);let pe=j.immediateTranslationTextCount;n.immediateTranslationTextCount!==pe&&(X.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ee=n.rules,Y;globalThis.PDFViewerApplication?Y=ee.find(ne=>ne.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?Y=ee.find(ne=>ne.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?Y=ee.find(ne=>ne.pageType=="ebookBuilder"):Y=ee.find(ne=>Mo(t,ne)),X.state.translationArea==="body"&&(X.rule.paragraphMinTextCount=1,X.rule.paragraphMinWordCount=1),Y&&Y.pageType==="ebookBuilder"&&(X.state.translationStartMode="immediate");let ye=n.generalRule;if(Y&&(X.rule=ju(ye,Y)),X.rule.selectors.length>0&&(X.rule.paragraphMinTextCount=2,X.rule.paragraphMinWordCount=1),X.state.translationArea==="body"&&X.rule.excludeTags&&(X.rule.excludeTags=X.rule.excludeTags.filter(ne=>!X.rule.bodyTranslateTags.includes(ne)&&!X.rule.forceTranslateTags.includes(ne))),X.rule.mainFrameSelector){let ne=document.querySelector(X.rule.mainFrameSelector);ne&&(X.mainFrame=ne)}return X}function Mo(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:o}=t;return r&&r.length>0&&ct(e,r)?!1:n&&n.length>0&&ct(e,n)?!0:o&&o.length>0&&Zu(o)?!1:!!(a&&a.length>0&&Zu(a))}function f2(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&ct(e,n)||r&&r.length>0&&Zu(r))}function PS(e){return typeof e=="number"}d();var Bo="imt-subtitle-inject",ul=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:Bo,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(r=>{let a=this.getRandomId();globalThis.postMessage({type:Bo,to:this.to,from:this.from,action:t,data:n,id:a,isAsync:!0});let o=({data:i})=>{Bo===i.type&&i.id===a&&i.to===this.from&&(r(i.data),globalThis.removeEventListener("message",o))};globalThis.addEventListener("message",o)})}handleMessageOnce(t){return new Promise(n=>{let r=({data:a})=>{Bo===a.type&&a.action===t&&a.to===this.from&&(n(a.data),globalThis.removeEventListener("message",r))};globalThis.addEventListener("message",r)})}handleMessage(t,n){let r=({data:a})=>{Bo===a.type&&a.action===t&&a.to===this.from&&n(a)};return globalThis.addEventListener("message",r),()=>{globalThis.removeEventListener("message",r)}}handleMessages(t){let n=({data:r})=>{Bo===r.type&&r.to===this.from&&t(r)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},Ia=new ul("content-script","inject"),MS=new ul("inject","content-script"),b2={get(e,t,n){return t in e?(...r)=>{let a=e[t];return typeof a=="function"?a.apply(e,r):Reflect.get(e,t,n)}:r=>e.sendAsyncMessages({action:t,data:r})}},IU=new Proxy(MS,b2),y2=new Proxy(Ia,b2);async function BS(){try{let e=await OS(xe(),{});if(e.isTranslateExcludeUrl||!e.rule.subtitleRule.type||e.rule.subtitleRule.disabled||!e.rule.subtitleRule.isInject)return;IS(e),RS(e)}catch{}}function RS(e){if(Ee()){let n=Ce().IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT,r=document.createElement("script");r.id="imt-subtitles-inject",r.textContent=n,document.head.appendChild(r)}else oe.storage.sync.get("open").then(()=>{let t=oe.runtime.getURL("video-subtitle/inject.js");if(document.querySelector(`script[src='${t}']`))return;let r=document.createElement("script");r.src=t,r.id="imt-subtitles-inject",document.head.appendChild(r)})}function IS(e){Ia.handleMessages(({id:t,action:n})=>{if(n==="getConfig"){let r=e.rule.subtitleRule;Ia.sendMessages({id:t,data:r})}})}BS();var Ro=null;async function OS(e,t){let n=Object.keys(t);if(Ro){let r={url:e,config:Ro.config,state:{...Ro.state,...t}};Ro=await Ht(r)}else{let r=await NS(),a=t;n.length===0&&(a=void 0),Ro=await Ht({url:e,config:r,state:a})}return Ro}function NS(){return Ee()?pn():jS({method:"getConfig"})}async function jS(e){return await gd().sendMessage("background:main",e)}d();d();d();d();var US=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5363,41 +5363,41 @@ Translate the content to {{to}} Language: max-width: fit-content; } } -`,Id="immersive-translate-toastify-shadow-root",Od=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Id)){let t=document.getElementById(Id);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Id,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=US,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,o=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${o})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),o;for(let i=0;i0?window.innerWidth:screen.width)<=360?(a[i].style[o]=`${r[o]}px`,r[o]+=s+u):a[i].classList.contains("toastify-left")===!0?(a[i].style[o]=`${t[o]}px`,t[o]+=s+u):(a[i].style[o]=`${n[o]}px`,n[o]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function ll(e){e=e||{},new Od({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}d();d();d();d();function Xr(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function HS(e,t){return e<>>32-t}function dl(e,t,n,r,a,o){return Xr(HS(Xr(Xr(t,e),Xr(r,o)),a),n)}function en(e,t,n,r,a,o,i){return dl(t&n|~t&r,e,t,a,o,i)}function tn(e,t,n,r,a,o,i){return dl(t&r|n&~r,e,t,a,o,i)}function nn(e,t,n,r,a,o,i){return dl(t^n^r,e,t,a,o,i)}function rn(e,t,n,r,a,o,i){return dl(n^(t|~r),e,t,a,o,i)}function cl(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,o,i,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function Nd(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=cl(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,o[n]=r[n]^1549556828;return i=cl(a.concat(Nd(t)),512+t.length*8),E2(cl(o.concat(i),512+128))}function x2(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function jd(e){return unescape(encodeURIComponent(e))}function T2(e){return zS(jd(e))}function WS(e){return x2(T2(e))}function v2(e,t){return qS(jd(e),jd(t))}function $S(e,t){return x2(v2(e,t))}function kn(e,t,n){return t?n?v2(t,e):$S(t,e):n?T2(e):WS(e)}var Io=[];async function ml(e,t){return await new Promise((n,r)=>{let a=e,o=1,i=indexedDB.open(a,o);i.onsuccess=s=>{n(i.result)},i.onerror=s=>{r()},i.onupgradeneeded=s=>{let u=i.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function C2(e){let t=`${J}-${e.service}@${e.from}->${e.to}`;return await KS(t,e)}async function S2(e){let t=kn(e.originalText),n=`${J}-${e.service}@${e.from}->${e.to}`;return await VS(n,t)}async function VS(e,t){let n=await ml(e);return await new Promise((r,a)=>{if(!n)return a();let o="cache",s=n.transaction([o],"readonly").objectStore(o).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function KS(e,t){let n=await ml(e);return(await JS()).includes(e)||await YS(e),await new Promise(a=>{if(!n)return a(!1);let o="cache",s=n.transaction([o],"readwrite").objectStore(o).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function YS(e){let t="cache_list",n=await ml(J+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=o=>{n.close(),Io.push(e)},a.onerror=o=>{n.close()}}async function JS(){if(Io&&Io.length>0)return Io;let e=await ml(J+"-cacheList","cache_list");return Io=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=o=>{e.close(),t(a.result)},a.onerror=o=>{e.close(),t([])}}),Io}d();d();var Ud="Original";function Ke(){return Ud}function gn(e){Ud=e,w2(Ud)}d();function Oa(e){return e?.id?.endsWith("pdfWebPage")||!1}function Qr(e){try{if(!e||!Oa(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:o}=r;if(a&&o){let i=document.querySelector(a);if(!i)return"";t=i.getAttribute(o)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var Ye={},Zr=async function(e,t){let{method:n,data:r}=e,a=await Ye.updateGlobalContext(),o=Date.now();if(P.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Qe(Kn,o);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Qe(Kn,o);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Qe(Kn,o);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Qe(Kn,o);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Qe(Kn,o);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Qe(Kn,o);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Qe(Kn,o);else if(n==="translatePage")await Ye.translatePage(a,r),Qe(Kn,o);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(yu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Ri,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Ue()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Ue())return JSON.stringify(a)}};function D2(e){Object.assign(Ye,e)}function A2(e){Object.assign(Ye,e)}function k2(e){Object.assign(Ye,e)}var XS=function(e,t){let{method:n,data:r}=e;if(P.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Ke();if(n==="getCurrentPageLanguage"){let a=Et();return Ye.detectCurrentPageLanguage().catch(o=>{P.warn("detectCurrentPageLanguage failed",o)}),a}else{if(n==="setCurrentPageLanguageByClient")return On(r),Et();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:o,bodyNode:i,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return Qr(a?.rule)}}},pl,gl;function _2(){let e=fl();Ue()||QS(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function fl(){return pl||(pl=new qr("content_script",!1).getConnection("main",Zr),pl)}function QS(){return gl||(gl=new qr("content_script",!1).getConnection("main_sync",XS,{sync:!0}),gl)}d();var Hd=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],hl="https://transmart.qq.com/api/imt",kr=class e{static langMapReverse=new Map(Hd.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await ce({url:hl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,o=e.langMapReverse.get(a);return o||a}};d();function ZS(e,t){return Math.floor(Math.random()*(t-e+1))+e}var e5=30,zd="RATE_LIMITER_TICKS",Oo=class e{static strictTicks={};static clearStrictTicks(){Xi(zd,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Uu(zd);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){P.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(o=>{setTimeout(()=>{r(o)},o)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await Xi(zd,JSON.stringify(this.strictTicks))}catch(a){P.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=ZS(4,e5);await pr(l)}let a=await this.getStrictTicks(t,r)||[],{limit:o,interval:i}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};async function xt(e){return await fl().sendMessage("background:main",e)}function ce(e){return gu()?Fu({method:"request",data:e}):Ee()||pu()?(e.fetchPolyfill=globalThis.GM_fetch,Pa(e)):xt({method:"fetch",data:e})}function an(){return Ee()?pn():xt({method:"getConfig"})}function fn(e){return Ee()?Ji(e):xt({method:"setUserConfig",data:e})}function hn(){return Ee()?Dr():xt({method:"getUserConfig"})}function us(){return Ee()?Qt():xt({method:"getLocalConfig"})}function bl(e){return Ee()?Zt(e):xt({method:"setLocalConfig",data:e})}function L2(e){return Ee()?i3(e):xt({method:"setBuildinConfig",data:e})}async function Pe(e){if(e.text){let n=Hs(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(Ee()||nt()){if(e.translateService&&!Su.includes(e.translateService))return Promise.resolve("auto");let r=qi(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await xt({method:"detectLanguage",data:e});return Promise.resolve(t)}function F2(){return xt({method:"detectTabLanguage"})}async function yl(e){let t=await Pe({text:e,pageLangs:["en"]});try{if(Ee()||nt()){let n=e.substring(0,200);t=await kr.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function w2(e){let t=new CustomEvent(La,{detail:e});if(document.dispatchEvent(t),Ee())return;fl().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function P2(e){return Ee()?S2(e):xt({method:"queryParagraphCache",data:e})}async function M2(e){if(Ee()){await C2(e);return}return xt({method:"setParagraphCache",data:e})}async function B2(){if(Ee())return Promise.resolve();await xt({method:"mockRequest"})}function No(e=!1,t=""){return Ee()?(oe.runtime.openOptionsPage(e,t),Promise.resolve()):xt({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function jo(e=""){return Ee()||nt()?Ce().OPTIONS_URL:oe.runtime.getURL("options.html")}function R2(e=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function El(e=!1){return Ee()?(oe.extra.openAboutPage(e),Promise.resolve()):xt({method:"openAboutPage"})}function Uo(e){return Ee()?(oe.extra.openInTab(e),Promise.resolve()):xt({method:"openInTab",data:e})}function I2(e=!1){return Ee()?(oe.extra.openEbookViewerPage(e),Promise.resolve()):xt({method:"openEbookViewerPage"})}function O2(e=!1){return Ee()?(oe.extra.openEbookBuilderPage(e),Promise.resolve()):xt({method:"openEbookBuilderPage"})}function xl(e){nt()}function Ho(e=!1,t){return Ee()?(oe.extra.openPdfViewerPage(e),Promise.resolve()):xt({method:"openPdfViewerPage",data:{url:t}})}function N2(e=!1){return Ee()?(oe.extra.openSubtitleBuilderPage(e),Promise.resolve()):xt({method:"openSubtitleBuilderPage"})}function zo(e){return Ee()?Promise.resolve():xt({method:"setBadge",data:{text:e}})}function j2(){return Ee()?(P.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):xt({method:"autoSyncLatestConfig"})}function Tl(e,t=!1){return Ee()?oe.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function U2(e,t){return Ee()?Oo.getDelay(e,t):xt({method:"getDelay",data:{key:e,options:t}})}var H2="G-MKMD9LWFTR";async function rt(e,t,n){try{let r=Vi(),a=Ce(),o=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(o=!1);let i=Ee(),s=Ue(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let _=await wr(l,0),E=vl(new Date(_)),O=Date.now(),F=vl(new Date(O));if(E===F)return;await qh(l,O)}else if(!n.config.telemetry)return;let m="sitc4WmvShWYwfU0dANM3Q",g=await Dt("fakeUserId","");g||(g=await wr("fakeUserId",""),g&&await Qe("fakeUserId",g));let p=Xt(),f=new Date,y=await Dt("installedAt","");y||(y=await wr("installedAt",""),y&&await Qe("installedAt",y)),g?y||(y=new Date(0).toISOString(),await Qe("installedAt",y)):(g=t5(32),await Qe("fakeUserId",g)),y||(y=f.toISOString(),await Qe("installedAt",y));let b=new Date(y),h=vl(b),C=vl(f),w=h===C,k=f.getTime()-b.getTime()<7*24*60*60*1e3,R=`https://www.google-analytics.com/mp/collect?measurement_id=${H2}&api_secret=${m}`;u||(R=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${H2}&api_secret=${m}`);let v=no.parse(window.navigator.userAgent),x=t.map(_=>{let E=_.params||{};if(v.os&&(E.os_name=v.os.name||"unknown",E.os_version=v.os.version||"unknown",E.os_version_name=v.os.versionName||"unknown"),v.browser&&(E.browser_name=v.browser.name||"unknown",E.browser_version=v.browser.version||"unknown",r&&(E.browser_name=r.name,E.browser_version=r.version)),v.platform&&(E.platform_type=v.platform.type||"unknown"),v.engine&&(E.engine_name=v.engine.name||"unknown",E.engine_version=v.engine.version||"unknown"),n.translationService&&(E.translation_service||(E.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(E.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?E.openai_is_official="1":E.openai_is_official="0":E.openai_is_official="1"))),n.targetLanguage&&(E.target_language=n.targetLanguage),n.config.interfaceLanguage&&(E.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?E.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":E.enable_default_always_translated_urls="0",p&&(E.version=p),n.config.enableInputTranslation?E.enable_input_translation=n.config.enableInputTranslation?"1":"0":E.enable_input_translation="0",n.config.translationTheme&&(E.translation_theme=n.config.translationTheme),n.config.alpha&&(E.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?E.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):E.always_translate_languages="none",a.INSTALL_FROM&&(E.install_from=a.INSTALL_FROM),n.config.beta&&(E.beta=n.config.alpha.toString()),n.config.translationArea&&(E.translation_area=n.config.translationArea),h&&(E.install_day=n5(b)),n.user){let F=Uh(n.user);F&&Object.keys(F).forEach(M=>{E[M]=F[M]})}else E.user_type="anonymous";n.config.translationMode&&(E.translation_mode=n.config.translationMode),E.userscript=i.toString(),w?E.is_new_user_today="1":E.is_new_user_today="0",k?E.is_new_user_this_week="1":E.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?E.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():E.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),E.page_type=O,s?E.main_frame=0:E.main_frame=1,!c){let F=n.url;try{let M=new URL(F);E.site_host=M.hostname}catch{E.site_host="unknown"}n.sourceLanguage&&(E.source_language=n.sourceLanguage)}return{..._,params:E}});if(o)return;let B=await ce({responseType:"text",url:R,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:x})})}catch{}}function t5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;at.removeEventListener("message",n)),e.length=0}function i5(e,t,n,r){return new Promise(a=>{let o=i=>{let s=i.data;a5(t,n,s)&&s.id===r&&(e.removeEventListener("message",o),a(s.response))};e.addEventListener("message",o)})}function s5(e,t,n,r){let a=o=>{let i=o.data;G2(t,"tell",n,i)&&r(i.body)};return e.addEventListener("message",a),[e,a]}function z2(e,t,n,r,a,o){let i=async s=>{let u=s.data;if(G2(n,"ask",r,u)){let l=await o(u.body);t=s.source,t.postMessage(r5(n,r,u.id,l),s.origin)}};return e.addEventListener("message",i),[e,i]}function u5(e,t,n,r,a){let o=Math.random().toString();return e.postMessage($2(t,"tell",n,o,r),a)}async function q2(e,t,n,r,a,o,i){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let m=setTimeout(()=>c(new Error(`Failed to get response within ${i}ms`)),i),g=await i5(e,n,r,s);clearTimeout(m),l(g)});return t.postMessage($2(n,"ask",r,s,a),o),u}var ta=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;z2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let o=n.contentWindow;if(ea(o))return new e(t,o,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await q2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(s5(this.thisWindow,this.protocol,t,n))}tell(t,n){u5(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(z2(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return q2(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){o5(this.listeners)}};var V2;async function K2(){if(Ue()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=ta.iframe(wu,"*",{targetWindow:t});V2=n,await ta.connect(n).catch(r=>{P.error("connect with parent frame error",r)})}}function Y2(){return V2}d();function J2(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}d();d();d();d();d();function qd(e,t,n=[],r){let a=["notranslate"];return r&&a.push(ih),e&&(a.push(`${J}-target-translation-theme-${e}`),t?a.push(`${Jc}-theme-${e}`):a.push(`${Yc}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Jc):a.push(Yc),a}function Wd(e){let t=["notranslate",Cu];return e&&t.push(`${J}-target-translation-theme-${e}-inner`),t}function X2(e,t,n){let{rule:r,state:a}=n,{translationTheme:o}=a,{variables:i,isVertical:s}=e;i=i||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,m=Ra(n,!0),g="afterend",p=m[0],f=m[1],y=`${p}(\\d+)${f}`,b=new RegExp(y,"g"),h=Ge.sanitize(u);i.length>0&&(h=h.replace(b,R=>{let v=h.indexOf(R),x=h[v-1]===" ",B=h[v+R.length]===" ",E=R.replace(new RegExp(m[0],"g"),"").replace(new RegExp(m[1],"g"),""),O=Number(E);if(isNaN(O))return R;let F=i[O];if(F&&F.type==="element"){let M=F.value.outerHTML;return x||(M=" "+M),B||(M=M+" "),M}else P.error("variable type not supported",F,R);return R}));let C=qd(o,e.inline,r.translationClasses||[],e.preWhitespace);s&&C.push(oh);let w=Wd(o),k="";return r.translationBlockStyle&&(k=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${k} class="${C.join(" ")}" ${ar}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${ar}="1">${h}`,e.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),e.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ar}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function Cl(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:o,isPreWhitespace:i}=t,s=[],u={};for(let l=0;l2&&(h=`<${o[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";g&&(y=Vr($d(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&Wt(c,a)){let b=Object.keys(u).length,h=`${o[0]}${b}${o[1]}`;o.length>2&&(h=`<${o[2]}${b}>`),u[b]=c;let C=Gd(s).endsWith(" ")?" ":"",w=Vr(c.innerText||c.textContent),k=Vr(c.nextSibling).startsWith(" ")?" ":"",R=rs(C+w+k),v=R[0]+h+R[1];if(C===" ")v=v.trimStart();else if(!v.startsWith(" ")){let x=rs(c.previousSibling)[1];x===""&&(x=" "),v=x+v}s.push({text:v,type:"variable"})}else{let y=Gd(s).endsWith(" ")?" ":"",b=Vr(c.innerText||c.textContent);g&&(b=Vr($d(c)));let h=Vr(c.nextSibling).startsWith(" ")?" ":"",C=rs(y+b+h),w=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(y===" ")w=w.trimStart();else{let k=rs(c.previousSibling)[1];k===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(k=" "),w=k+w}s.push({text:w,type:"text"})}else{let y=Gd(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=Vr($d(c))),y===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}e.targetText=Ge.sanitize(e.targetText);let a=!1,o=e.text,i=o.split(" ").length,s=o.split(` -`).length;i<=n.blockMinWordCount&&o.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ra(t);if(l.length>2){let c=l[2];return l5({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=X2(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function $d(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function l5(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:o,variables:i,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;i=i||[];let m=e.targetText;m=Ge.sanitize(m);let g=m,p=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${t}(\\d+)>`);i.length>0&&(g=g.replace(p,C=>{let w=g.indexOf(C),k=g[w-1]===" ",R=g[w+C.length]===" ",v=C.match(f);if(!v)return C;let x=v[1],B=Number(x);if(isNaN(B))return C;let _=i[Number(B)];if(_&&_.type==="element"){let E=_.value.outerHTML;return k||(E=" "+E),R||(E=E+" "),E}else if(_&&_.type==="text"){let E=_.value;return k||(E=" "+E),R||(E=E+" "),E}else P.error("variable type not supported",_,C);return C}));let y=qd(l,n,r||[],s),b=Wd(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${y.join(" ")}" ${ar}="1"><${a} class="${b.join(" ")}" ${ar}="1">${g}`,n||(o==="smart"?g=`
${g}`:g=`${o}${g}`),n&&(o!=="smart"?g=`${o}${g}`:g=`<${a} class="notranslate" ${ar}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function Gd(e){let t=e[e.length-1];return t?t.text:""}function Vd(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let o=n[2],i=new RegExp(`<${o}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${o}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(i,c=>{let m=c.match(s);if(!m)return c;let g=m[1],p=Number(g);if(isNaN(p))return c;let f=r[g];return f||c})),u}else{let o=`${n[0]}(\\d+)${n[1]}`,i=new RegExp(o,"g");a=a.replace(i,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var we=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,o=!1,i=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(o=!0),b.debug&&(i=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let m=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(m=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(m=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=l3(a,c,m)}catch(b){if(r)for(let h=0;hb));let g=[],p=[],f=(b,h,C)=>{let w="";if(h.translatedTexts&&h.translatedTexts[0]&&(w=h.translatedTexts[0]),p[b]||(p[b]=h,p[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),p[b].hasError)return;if(C){let v=C instanceof K?new K(C.name,C.message).initNetWork(C.status).initData(C.data):C;p[b].hasError=!0,h.callback&&h.callback(v,null,h.sentence);return}p[b].translatedTexts[h.partIndex]=w;let k=p[b],R=0;for(let v=0;v{let R=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(R=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(x=>x.text),forces:h.tempSentences.map(x=>x.force),xpaths:h.tempSentences.map(x=>x.xpath||""),from:R,to:h.to,url:C,options:n,refresh:o,debug:i}),sourceTempSentences:h.tempSentences};{let v=ah;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(v=this.serviceConfig.translationTextSeparator);let x=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(x=this.serviceConfig.newlinePlaceholderDelimiters);let B=[],_=ur(this.serviceConfig);if(h.tempSentences.forEach((H,L)=>{let S=Ad({text:H.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:_,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});H.force!==!0&&(S&&S.text&&S.text.trim().lengthL.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:H,from:R,to:h.to})}let E="";x&&x.length>=2?E=B.map((H,L)=>{let{item:S}=H;return L===B.length-1?S.text:S.text+x[0]+(L+1)+x[1]}).join(""):E=B.map(({item:H})=>H.text).join(v);let O=await this.translate({text:E,from:R,to:h.to,url:C,options:{...n,rawTextArrayLength:B.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:o,debug:i}),{text:F}=O,M=[];if(x&&x.length>=2){let H=`${x[0]}\\d+${x[1]}`;x&&x.length>=3&&(H=x[2]);let L=new RegExp(H,"g");M=F.split(L)}else M=F.split(v);let N=[];if(M.length>B.length){for(let H=0;HH.text);return _=ur(this.serviceConfig,!0),N.forEach((H,L)=>{let S=B[L],A=S.index,j=S.variables||{};Object.keys(j).length>0&&(H=Vd({text:H,delimiters:_,variables:j})),U[A]=H}),{sourceTempSentences:h.tempSentences,text:U,from:O.from,to:O.to}}};g.push(k().then(R=>{let{text:v,sourceTempSentences:x}=R;for(let B=0;B{if(R instanceof K&&R.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let v=0;v{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],o=ur(this.serviceConfig);if(this.serviceConfig&&o.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((m,g)=>{let p=Ad({text:m,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:o,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[g]!==!0&&(p&&p.text&&p.text.trim().lengthm.text),n.xpaths=a.map(m=>m.xpath)}catch(l){P.debug("formatAndTranslateList error",t,l)}let i=await this.translateList(n),{text:s}=i,u=t.text.map(l=>l);return o=ur(this.serviceConfig,!0),s.forEach((l,c)=>{let m=a[c];if(m){let g=m.index,p=m.variables,f=Object.keys(p);u[g]=l,f.length>0&&(u[g]=Vd({text:l,delimiters:o,variables:p}))}}),{...i,text:u}}detectLanguageLocally(t){return Pe({text:t,minLength:18,pageLangs:[Et(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};var Z2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],ls=class e extends we{static langMap=new Map(Z2);maxTextGroupLength=50;static langMapReverse=new Map(Z2.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new K("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetText,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetTextList,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=`${o}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Jn(a)].join(` +`,Rd="immersive-translate-toastify-shadow-root",Id=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Rd)){let t=document.getElementById(Rd);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Rd,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=US,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,o=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${o})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),o;for(let i=0;i0?window.innerWidth:screen.width)<=360?(a[i].style[o]=`${r[o]}px`,r[o]+=s+u):a[i].classList.contains("toastify-left")===!0?(a[i].style[o]=`${t[o]}px`,t[o]+=s+u):(a[i].style[o]=`${n[o]}px`,n[o]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function ll(e){e=e||{},new Id({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}d();d();d();d();function Xr(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function HS(e,t){return e<>>32-t}function dl(e,t,n,r,a,o){return Xr(HS(Xr(Xr(t,e),Xr(r,o)),a),n)}function en(e,t,n,r,a,o,i){return dl(t&n|~t&r,e,t,a,o,i)}function tn(e,t,n,r,a,o,i){return dl(t&r|n&~r,e,t,a,o,i)}function nn(e,t,n,r,a,o,i){return dl(t^n^r,e,t,a,o,i)}function rn(e,t,n,r,a,o,i){return dl(n^(t|~r),e,t,a,o,i)}function cl(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,o,i,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function Od(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=cl(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,o[n]=r[n]^1549556828;return i=cl(a.concat(Od(t)),512+t.length*8),E2(cl(o.concat(i),512+128))}function x2(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function Nd(e){return unescape(encodeURIComponent(e))}function T2(e){return zS(Nd(e))}function WS(e){return x2(T2(e))}function v2(e,t){return qS(Nd(e),Nd(t))}function $S(e,t){return x2(v2(e,t))}function kn(e,t,n){return t?n?v2(t,e):$S(t,e):n?T2(e):WS(e)}var Io=[];async function ml(e,t){return await new Promise((n,r)=>{let a=e,o=1,i=indexedDB.open(a,o);i.onsuccess=s=>{n(i.result)},i.onerror=s=>{r()},i.onupgradeneeded=s=>{let u=i.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function C2(e){let t=`${J}-${e.service}@${e.from}->${e.to}`;return await KS(t,e)}async function S2(e){let t=kn(e.originalText),n=`${J}-${e.service}@${e.from}->${e.to}`;return await VS(n,t)}async function VS(e,t){let n=await ml(e);return await new Promise((r,a)=>{if(!n)return a();let o="cache",s=n.transaction([o],"readonly").objectStore(o).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function KS(e,t){let n=await ml(e);return(await JS()).includes(e)||await YS(e),await new Promise(a=>{if(!n)return a(!1);let o="cache",s=n.transaction([o],"readwrite").objectStore(o).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function YS(e){let t="cache_list",n=await ml(J+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=o=>{n.close(),Io.push(e)},a.onerror=o=>{n.close()}}async function JS(){if(Io&&Io.length>0)return Io;let e=await ml(J+"-cacheList","cache_list");return Io=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=o=>{e.close(),t(a.result)},a.onerror=o=>{e.close(),t([])}}),Io}d();d();var jd="Original";function Ke(){return jd}function gn(e){jd=e,w2(jd)}d();function Oa(e){return e?.id?.endsWith("pdfWebPage")||!1}function Qr(e){try{if(!e||!Oa(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:o}=r;if(a&&o){let i=document.querySelector(a);if(!i)return"";t=i.getAttribute(o)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var Ye={},Zr=async function(e,t){let{method:n,data:r}=e,a=await Ye.updateGlobalContext(),o=Date.now();if(P.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Ye.translateTheWholePage(r),Ze(Kn,o);else if(n==="translateTheMainPage")await Ye.translateTheMainPage(r),Ze(Kn,o);else if(n==="translateToThePageEndImmediately")await Ye.translateToThePageEndImmediately(r),Ze(Kn,o);else if(n==="toggleTranslatePage")await Ye.toggleTranslatePage(r),Ze(Kn,o);else if(n==="toggleTranslateTheWholePage")await Ye.toggleTranslateTheWholePage(r),Ze(Kn,o);else if(n==="toggleTranslateTheMainPage")await Ye.toggleTranslateTheMainPage(r),Ze(Kn,o);else if(n==="toggleOnlyTransation")await Ye.ensureSwitchTranslationMode(r),Ze(Kn,o);else if(n==="translatePage")await Ye.translatePage(a,r),Ze(Kn,o);else if(n==="toggleTranslationMask")await Ye.toggleTranslationMask(r);else if(n==="restorePage")Ye.restorePage();else if(n==="retryFailedParagraphs")Ye.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Ye.switchTranslationMode(r.mode),await Ye.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Ye.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(yu,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Ye.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Ii,{detail:r}));else if(n==="translateWithOpenAI")await Ye.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Ye.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Ye.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Ye.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Ye.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Ye.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Ye.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")Ue()||await Ye.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!Ue())return JSON.stringify(a)}};function D2(e){Object.assign(Ye,e)}function A2(e){Object.assign(Ye,e)}function k2(e){Object.assign(Ye,e)}var XS=function(e,t){let{method:n,data:r}=e;if(P.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Ke();if(n==="getCurrentPageLanguage"){let a=Et();return Ye.detectCurrentPageLanguage().catch(o=>{P.warn("detectCurrentPageLanguage failed",o)}),a}else{if(n==="setCurrentPageLanguageByClient")return On(r),Et();if(n==="getContextString"){let a=Ye.getPureGlobalContext(),{articleNode:o,bodyNode:i,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Ye.getPureGlobalContext();return Qr(a?.rule)}}},pl,gl;function _2(){let e=fl();Ue()||QS(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function fl(){return pl||(pl=new qr("content_script",!1).getConnection("main",Zr),pl)}function QS(){return gl||(gl=new qr("content_script",!1).getConnection("main_sync",XS,{sync:!0}),gl)}d();var Ud=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],hl="https://transmart.qq.com/api/imt",kr=class e{static langMapReverse=new Map(Ud.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await ce({url:hl,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,o=e.langMapReverse.get(a);return o||a}};d();function ZS(e,t){return Math.floor(Math.random()*(t-e+1))+e}var e5=30,Hd="RATE_LIMITER_TICKS",Oo=class e{static strictTicks={};static clearStrictTicks(){Qi(Hd,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await Uu(Hd);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){P.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(o=>{setTimeout(()=>{r(o)},o)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await Qi(Hd,JSON.stringify(this.strictTicks))}catch(a){P.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=ZS(4,e5);await pr(l)}let a=await this.getStrictTicks(t,r)||[],{limit:o,interval:i}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};async function xt(e){return await fl().sendMessage("background:main",e)}function ce(e){return gu()?Fu({method:"request",data:e}):Ee()||pu()?(e.fetchPolyfill=globalThis.GM_fetch,Pa(e)):xt({method:"fetch",data:e})}function an(){return Ee()?pn():xt({method:"getConfig"})}function fn(e){return Ee()?Xi(e):xt({method:"setUserConfig",data:e})}function hn(){return Ee()?Dr():xt({method:"getUserConfig"})}function ls(){return Ee()?Qt():xt({method:"getLocalConfig"})}function bl(e){return Ee()?Zt(e):xt({method:"setLocalConfig",data:e})}function L2(e){return Ee()?i3(e):xt({method:"setBuildinConfig",data:e})}async function Pe(e){if(e.text){let n=Hs(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(Ee()||rt()){if(e.translateService&&!Su.includes(e.translateService))return Promise.resolve("auto");let r=Wi(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await xt({method:"detectLanguage",data:e});return Promise.resolve(t)}function F2(){return xt({method:"detectTabLanguage"})}async function yl(e){let t=await Pe({text:e,pageLangs:["en"]});try{if(Ee()||rt()){let n=e.substring(0,200);t=await kr.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function w2(e){let t=new CustomEvent(La,{detail:e});if(document.dispatchEvent(t),Ee())return;fl().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function P2(e){return Ee()?S2(e):xt({method:"queryParagraphCache",data:e})}async function M2(e){if(Ee()){await C2(e);return}return xt({method:"setParagraphCache",data:e})}async function B2(){if(Ee())return Promise.resolve();await xt({method:"mockRequest"})}function No(e=!1,t=""){return Ee()?(oe.runtime.openOptionsPage(e,t),Promise.resolve()):xt({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function jo(e=""){return Ee()||rt()?Ce().OPTIONS_URL:oe.runtime.getURL("options.html")}function R2(e=""){return oe&&oe.runtime&&oe.runtime.getURL?oe.runtime.getURL("options.html"):""}function El(e=!1){return Ee()?(oe.extra.openAboutPage(e),Promise.resolve()):xt({method:"openAboutPage"})}function Uo(e){return Ee()?(oe.extra.openInTab(e),Promise.resolve()):xt({method:"openInTab",data:e})}function I2(e=!1){return Ee()?(oe.extra.openEbookViewerPage(e),Promise.resolve()):xt({method:"openEbookViewerPage"})}function O2(e=!1){return Ee()?(oe.extra.openEbookBuilderPage(e),Promise.resolve()):xt({method:"openEbookBuilderPage"})}function xl(e){rt()}function Ho(e=!1,t){return Ee()?(oe.extra.openPdfViewerPage(e),Promise.resolve()):xt({method:"openPdfViewerPage",data:{url:t}})}function N2(e=!1){return Ee()?(oe.extra.openSubtitleBuilderPage(e),Promise.resolve()):xt({method:"openSubtitleBuilderPage"})}function zo(e){return Ee()?Promise.resolve():xt({method:"setBadge",data:{text:e}})}function j2(){return Ee()?(P.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):xt({method:"autoSyncLatestConfig"})}function Tl(e,t=!1){return Ee()?oe.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function U2(e,t){return Ee()?Oo.getDelay(e,t):xt({method:"getDelay",data:{key:e,options:t}})}var H2="G-MKMD9LWFTR";async function at(e,t,n){try{let r=Ki(),a=Ce(),o=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(o=!1);let i=Ee(),s=Ue(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let _=await wr(l,0),E=vl(new Date(_)),O=Date.now(),F=vl(new Date(O));if(E===F)return;await qh(l,O)}else if(!n.config.telemetry)return;let m="sitc4WmvShWYwfU0dANM3Q",g=await Dt("fakeUserId","");g||(g=await wr("fakeUserId",""),g&&await Ze("fakeUserId",g));let p=Xt(),f=new Date,y=await Dt("installedAt","");y||(y=await wr("installedAt",""),y&&await Ze("installedAt",y)),g?y||(y=new Date(0).toISOString(),await Ze("installedAt",y)):(g=t5(32),await Ze("fakeUserId",g)),y||(y=f.toISOString(),await Ze("installedAt",y));let b=new Date(y),h=vl(b),C=vl(f),w=h===C,k=f.getTime()-b.getTime()<7*24*60*60*1e3,R=`https://www.google-analytics.com/mp/collect?measurement_id=${H2}&api_secret=${m}`;u||(R=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${H2}&api_secret=${m}`);let v=no.parse(window.navigator.userAgent),x=t.map(_=>{let E=_.params||{};if(v.os&&(E.os_name=v.os.name||"unknown",E.os_version=v.os.version||"unknown",E.os_version_name=v.os.versionName||"unknown"),v.browser&&(E.browser_name=v.browser.name||"unknown",E.browser_version=v.browser.version||"unknown",r&&(E.browser_name=r.name,E.browser_version=r.version)),v.platform&&(E.platform_type=v.platform.type||"unknown"),v.engine&&(E.engine_name=v.engine.name||"unknown",E.engine_version=v.engine.version||"unknown"),n.translationService&&(E.translation_service||(E.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(E.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?E.openai_is_official="1":E.openai_is_official="0":E.openai_is_official="1"))),n.targetLanguage&&(E.target_language=n.targetLanguage),n.config.interfaceLanguage&&(E.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?E.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":E.enable_default_always_translated_urls="0",p&&(E.version=p),n.config.enableInputTranslation?E.enable_input_translation=n.config.enableInputTranslation?"1":"0":E.enable_input_translation="0",n.config.translationTheme&&(E.translation_theme=n.config.translationTheme),n.config.alpha&&(E.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?E.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):E.always_translate_languages="none",a.INSTALL_FROM&&(E.install_from=a.INSTALL_FROM),n.config.beta&&(E.beta=n.config.alpha.toString()),n.config.translationArea&&(E.translation_area=n.config.translationArea),h&&(E.install_day=n5(b)),n.user){let F=Uh(n.user);F&&Object.keys(F).forEach(M=>{E[M]=F[M]})}else E.user_type="anonymous";n.config.translationMode&&(E.translation_mode=n.config.translationMode),E.userscript=i.toString(),w?E.is_new_user_today="1":E.is_new_user_today="0",k?E.is_new_user_this_week="1":E.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?E.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():E.temp_translate_domain_minutes="0";let O="html";if(n.rule.pageType&&(O=n.rule.pageType),E.page_type=O,s?E.main_frame=0:E.main_frame=1,!c){let F=n.url;try{let M=new URL(F);E.site_host=M.hostname}catch{E.site_host="unknown"}n.sourceLanguage&&(E.source_language=n.sourceLanguage)}return{..._,params:E}});if(o)return;let B=await ce({responseType:"text",url:R,method:"POST",body:JSON.stringify({client_id:g,user_id:g,events:x})})}catch{}}function t5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;at.removeEventListener("message",n)),e.length=0}function i5(e,t,n,r){return new Promise(a=>{let o=i=>{let s=i.data;a5(t,n,s)&&s.id===r&&(e.removeEventListener("message",o),a(s.response))};e.addEventListener("message",o)})}function s5(e,t,n,r){let a=o=>{let i=o.data;G2(t,"tell",n,i)&&r(i.body)};return e.addEventListener("message",a),[e,a]}function z2(e,t,n,r,a,o){let i=async s=>{let u=s.data;if(G2(n,"ask",r,u)){let l=await o(u.body);t=s.source,t.postMessage(r5(n,r,u.id,l),s.origin)}};return e.addEventListener("message",i),[e,i]}function u5(e,t,n,r,a){let o=Math.random().toString();return e.postMessage($2(t,"tell",n,o,r),a)}async function q2(e,t,n,r,a,o,i){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let m=setTimeout(()=>c(new Error(`Failed to get response within ${i}ms`)),i),g=await i5(e,n,r,s);clearTimeout(m),l(g)});return t.postMessage($2(n,"ask",r,s,a),o),u}var ta=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;z2(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let o=n.contentWindow;if(ea(o))return new e(t,o,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await q2(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(s5(this.thisWindow,this.protocol,t,n))}tell(t,n){u5(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push(z2(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return q2(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){o5(this.listeners)}};var V2;async function K2(){if(Ue()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=ta.iframe(wu,"*",{targetWindow:t});V2=n,await ta.connect(n).catch(r=>{P.error("connect with parent frame error",r)})}}function Y2(){return V2}d();function J2(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}d();d();d();d();d();function zd(e,t,n=[],r){let a=["notranslate"];return r&&a.push(ih),e&&(a.push(`${J}-target-translation-theme-${e}`),t?a.push(`${Yc}-theme-${e}`):a.push(`${Kc}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Yc):a.push(Kc),a}function qd(e){let t=["notranslate",Cu];return e&&t.push(`${J}-target-translation-theme-${e}-inner`),t}function X2(e,t,n){let{rule:r,state:a}=n,{translationTheme:o}=a,{variables:i,isVertical:s}=e;i=i||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,m=Ra(n,!0),g="afterend",p=m[0],f=m[1],y=`${p}(\\d+)${f}`,b=new RegExp(y,"g"),h=Ge.sanitize(u);i.length>0&&(h=h.replace(b,R=>{let v=h.indexOf(R),x=h[v-1]===" ",B=h[v+R.length]===" ",E=R.replace(new RegExp(m[0],"g"),"").replace(new RegExp(m[1],"g"),""),O=Number(E);if(isNaN(O))return R;let F=i[O];if(F&&F.type==="element"){let M=F.value.outerHTML;return x||(M=" "+M),B||(M=M+" "),M}else P.error("variable type not supported",F,R);return R}));let C=zd(o,e.inline,r.translationClasses||[],e.preWhitespace);s&&C.push(oh);let w=qd(o),k="";return r.translationBlockStyle&&(k=`style="${r.translationBlockStyle}"`),h=`<${n.rule.targetWrapperTag} ${k} class="${C.join(" ")}" ${ar}="1"><${r.targetWrapperTag} class="${w.join(" ")}" ${ar}="1">${h}`,e.inline||(l==="smart"?h=`
${h}`:h=`${l}${h}`),e.inline&&(l!=="smart"?h=`${l}${h}`:h=`<${r.targetWrapperTag} class="notranslate" ${ar}="1"> ${h}`),c==="smart"?h=`${h}`:h=`${h}${c}`,{html:h,position:g}}function Cl(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:o,isPreWhitespace:i}=t,s=[],u={};for(let l=0;l2&&(h=`<${o[2]}${b}>`),u[b]=c,s.push({text:h,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";g&&(y=Vr(Wd(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&$t(c,a)){let b=Object.keys(u).length,h=`${o[0]}${b}${o[1]}`;o.length>2&&(h=`<${o[2]}${b}>`),u[b]=c;let C=$d(s).endsWith(" ")?" ":"",w=Vr(c.innerText||c.textContent),k=Vr(c.nextSibling).startsWith(" ")?" ":"",R=as(C+w+k),v=R[0]+h+R[1];if(C===" ")v=v.trimStart();else if(!v.startsWith(" ")){let x=as(c.previousSibling)[1];x===""&&(x=" "),v=x+v}s.push({text:v,type:"variable"})}else{let y=$d(s).endsWith(" ")?" ":"",b=Vr(c.innerText||c.textContent);g&&(b=Vr(Wd(c)));let h=Vr(c.nextSibling).startsWith(" ")?" ":"",C=as(y+b+h),w=C[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+C[1];if(y===" ")w=w.trimStart();else{let k=as(c.previousSibling)[1];k===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(k=" "),w=k+w}s.push({text:w,type:"text"})}else{let y=$d(s).endsWith(" ")?" ":"",b="";c.textContent&&(b=Vr(Wd(c))),y===" "&&(b=b.trimStart()),s.push({text:b,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(g=s[c-1].text),c/g,">"))}e.targetText=Ge.sanitize(e.targetText);let a=!1,o=e.text,i=o.split(" ").length,s=o.split(` +`).length;i<=n.blockMinWordCount&&o.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ra(t);if(l.length>2){let c=l[2];return l5({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=X2(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function Wd(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function l5(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:o,variables:i,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;i=i||[];let m=e.targetText;m=Ge.sanitize(m);let g=m,p=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),f=new RegExp(`<${t}(\\d+)>`);i.length>0&&(g=g.replace(p,C=>{let w=g.indexOf(C),k=g[w-1]===" ",R=g[w+C.length]===" ",v=C.match(f);if(!v)return C;let x=v[1],B=Number(x);if(isNaN(B))return C;let _=i[Number(B)];if(_&&_.type==="element"){let E=_.value.outerHTML;return k||(E=" "+E),R||(E=E+" "),E}else if(_&&_.type==="text"){let E=_.value;return k||(E=" "+E),R||(E=E+" "),E}else P.error("variable type not supported",_,C);return C}));let y=zd(l,n,r||[],s),b=qd(l),h="";return c&&(h=`style="${c}"`),g=`<${a} ${h} class="${y.join(" ")}" ${ar}="1"><${a} class="${b.join(" ")}" ${ar}="1">${g}`,n||(o==="smart"?g=`
${g}`:g=`${o}${g}`),n&&(o!=="smart"?g=`${o}${g}`:g=`<${a} class="notranslate" ${ar}="1"> ${g}`),u==="smart"?g=`${g}`:g=`${g}${u}`,{html:g,position:"afterend"}}function $d(e){let t=e[e.length-1];return t?t.text:""}function Gd(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let o=n[2],i=new RegExp(`<${o}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${o}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(i,c=>{let m=c.match(s);if(!m)return c;let g=m[1],p=Number(g);if(isNaN(p))return c;let f=r[g];return f||c})),u}else{let o=`${n[0]}(\\d+)${n[1]}`,i=new RegExp(o,"g");a=a.replace(i,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}var we=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,o=!1,i=!1,s=[],u=null,l=new Set;for(let b of a)b.from&&b.from!=="auto"&&l.add(b.from),b.refresh&&(o=!0),b.debug&&(i=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let m=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(m=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(m=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=l3(a,c,m)}catch(b){if(r)for(let h=0;hb));let g=[],p=[],f=(b,h,C)=>{let w="";if(h.translatedTexts&&h.translatedTexts[0]&&(w=h.translatedTexts[0]),p[b]||(p[b]=h,p[b].translatedTexts=Array(h.sentenceTotalParts).fill(null)),p[b].hasError)return;if(C){let v=C instanceof K?new K(C.name,C.message).initNetWork(C.status).initData(C.data):C;p[b].hasError=!0,h.callback&&h.callback(v,null,h.sentence);return}p[b].translatedTexts[h.partIndex]=w;let k=p[b],R=0;for(let v=0;v{let R=h.from;if(h.fromByClient&&h.fromByClient!=="auto"&&(R=h.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:h.tempSentences.map(x=>x.text),forces:h.tempSentences.map(x=>x.force),xpaths:h.tempSentences.map(x=>x.xpath||""),from:R,to:h.to,url:C,options:n,refresh:o,debug:i}),sourceTempSentences:h.tempSentences};{let v=ah;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(v=this.serviceConfig.translationTextSeparator);let x=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(x=this.serviceConfig.newlinePlaceholderDelimiters);let B=[],_=ur(this.serviceConfig);if(h.tempSentences.forEach((H,L)=>{let S=Dd({text:H.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:_,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:h.to});H.force!==!0&&(S&&S.text&&S.text.trim().lengthL.text);return Promise.resolve({sourceTempSentences:h.tempSentences,text:H,from:R,to:h.to})}let E="";x&&x.length>=2?E=B.map((H,L)=>{let{item:S}=H;return L===B.length-1?S.text:S.text+x[0]+(L+1)+x[1]}).join(""):E=B.map(({item:H})=>H.text).join(v);let O=await this.translate({text:E,from:R,to:h.to,url:C,options:{...n,rawTextArrayLength:B.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:o,debug:i}),{text:F}=O,M=[];if(x&&x.length>=2){let H=`${x[0]}\\d+${x[1]}`;x&&x.length>=3&&(H=x[2]);let L=new RegExp(H,"g");M=F.split(L)}else M=F.split(v);let N=[];if(M.length>B.length){for(let H=0;HH.text);return _=ur(this.serviceConfig,!0),N.forEach((H,L)=>{let S=B[L],A=S.index,j=S.variables||{};Object.keys(j).length>0&&(H=Gd({text:H,delimiters:_,variables:j})),U[A]=H}),{sourceTempSentences:h.tempSentences,text:U,from:O.from,to:O.to}}};g.push(k().then(R=>{let{text:v,sourceTempSentences:x}=R;for(let B=0;B{if(R instanceof K&&R.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let v=0;v{let h=b.sentence.text;return b.translatedTexts&&b.translatedTexts.length>0&&(h=b.translatedTexts.join("")),{...b.sentence,text:h}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],o=ur(this.serviceConfig);if(this.serviceConfig&&o.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((m,g)=>{let p=Dd({text:m,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:o,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[g]!==!0&&(p&&p.text&&p.text.trim().lengthm.text),n.xpaths=a.map(m=>m.xpath)}catch(l){P.debug("formatAndTranslateList error",t,l)}let i=await this.translateList(n),{text:s}=i,u=t.text.map(l=>l);return o=ur(this.serviceConfig,!0),s.forEach((l,c)=>{let m=a[c];if(m){let g=m.index,p=m.variables,f=Object.keys(p);u[g]=l,f.length>0&&(u[g]=Gd({text:l,delimiters:o,variables:p}))}}),{...i,text:u}}detectLanguageLocally(t){return Pe({text:t,minLength:18,pageLangs:[Et(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};var Z2=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],cs=class e extends we{static langMap=new Map(Z2);maxTextGroupLength=50;static langMapReverse=new Map(Z2.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new K("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetText,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetTextList,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=`${o}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await Jn(a)].join(` `),m=e.getUTCDate(u),g=["TC3-HMAC-SHA256",l,`${m}/${o}/tc3_request`,await Jn(c)].join(` -`),p=await d2(m,`TC3${n}`),f=await ol(o,p),y=await ol("tc3_request",f),b=await ol(g,y),h=await ce({retry:this.retry,url:`https://${o}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":i,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${m}/${o}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new K(h.Response.Error.Message);return h}};d();var e1=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],c5={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},cs=class e extends we{static langMap=new Map(e1);static langMapReverse=new Map(e1.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,o=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),i=await ce({url:`https://wxapp.translator.qq.com/api/translate?${o}`,retry:this.retry,method:"GET",headers:c5,timeout:this.requestTimeout});return{text:i.targetText,from:e.langMapReverse.get(i.source)||r,to:e.langMapReverse.get(i.target)||a}}};d();var t1=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Na=class e extends we{static langMap=new Map(t1);static langMapReverse=new Map(t1.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=It(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,o,i);if(!s)throw new K("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new K("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,o,i);if(!s)throw new K("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new K("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let o="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await ce({retry:this.retry,url:o,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),o=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:o,timeout:this.requestTimeout})}}};d();d();d();function d5(e,t){return t?e+(t-e%t):e}function m5(e,t){return e.split(t).length-1}function Kd(e){let t=Date.now(),n=1;for(let r of e)n+=m5(r,"i");return d5(t,n)}function p5(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Yd(){return p5(1e6,1e8)}d();d();d();var Jd="https://www2.deepl.com/jsonrpc",Xd="auto",n1=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function g5(e=n1){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function Qd(e){return g5()[e.toLowerCase()]}var f5={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function h5(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function b5(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function y5(e,t,n,r,a,o,i){let s=Yd(),u=b5(r,n),l=[];t.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Kd(t);let c=await ce({retry:2,method:"POST",url:e,body:h5(u),headers:f5}),m={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{m.text.push(g.text)}),m}async function r1(e,t,n,r=Xd,a,o,i){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:y5(e,t,Qd(n),Qd(r)??"auto",a,o,i):{text:[],from:r,to:n}}var a1=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],qo=class e extends we{static langMap=new Map(a1);static langMapReverse=new Map(a1.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Jd;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=It(Jd,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,o=await r1(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:o.text,from:e.langMapReverse.get(o.from),to:e.langMapReverse.get(o.to)}}};d();var ds=class e extends we{static langMap=new Map(Hd);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=kr.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),o=e.langMap.get(a)||a,i=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Ce(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=o1());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:o,orig_url:u},target:{lang:i}}),m=await ce({url:hl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(m.header.ret_code!=="succ")throw new K(m.message||m.header.ret_code);return{text:m.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,o=Ce(),i=t.url;if(o.INSTALL_FROM==="firefox_store"&&(i=o1()),r.length===1){let p=await this.translate({from:n,text:r[0],to:a,url:i,options:t.options});return{text:[p.text],from:p.from,to:p.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,m=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:i},target:{lang:c},type:"plain"}),g=await ce({url:hl,body:m,method:"POST"});if(g.header.ret_code!=="succ")throw new K(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return kr.detectLanguageRemotelyByTransmart(t)}};function o1(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}d();d();function Zd(){return Math.random()>=.1}var Wo=class extends we{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Zd())throw new K("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await B2(),!Zd())throw new K("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(o=>{let i=o.match(/^\s*/)[0].length;return o.slice(0,i)+"\u6A21\u62DF\uFF1A"+o.slice(i,-6)})}}};d();var s1=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],em=new Map(s1),i1=new Map(s1.map(([e,t])=>[t,e])),tm=class e extends we{static langMap=em;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new K("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,o=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:em.get(r)||"auto",target_lang:em.get(a)||a}),timeout:this.requestTimeout});if(o.status){let i=o;return i.result&&a=="zh-TW",{text:i.result,from:i1.get(i.source_lang),to:i1.get(i.target_lang)}}else throw new K(o.msg)}},Sl=tm;d();var u1=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ms=new Map(u1),E5=new Map(u1.map(([e,t])=>[t,e])),nm=class extends we{static langMap=ms;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Yt()||In()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new K("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new K("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new K("authKey are required");if(!this.authKey)throw new K("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=It(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=It(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=It(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=It(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=It(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:o,merged:i}=this.optimizationText(t),s={source_lang:ms.get(n)||"",target_lang:ms.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);o.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:o,source_lang:ms.get(n)||"auto",target_lang:ms.get(r)||r},m=this.freeApiUrl;a.endsWith(":im")?m=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(m=this.proApiUrl);let g,p={};t.refresh&&(p={"X-Refresh":"True"}),t.debug&&(p={...p,"X-Debug":"True"}),this.provider==="pro"?g=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...p,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...p,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await ce({retry:2,url:m,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,i,!!t.debug),y=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Na(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(w=>w.text).join(` +`),p=await d2(m,`TC3${n}`),f=await ol(o,p),y=await ol("tc3_request",f),b=await ol(g,y),h=await ce({retry:this.retry,url:`https://${o}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":i,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${m}/${o}/tc3_request, SignedHeaders=content-type;host, Signature=${b}`},body:a,timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Response&&h.Response.Error&&h.Response.Error.Message)throw new K(h.Response.Error.Message);return h}};d();var e1=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],c5={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},ds=class e extends we{static langMap=new Map(e1);static langMapReverse=new Map(e1.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,o=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),i=await ce({url:`https://wxapp.translator.qq.com/api/translate?${o}`,retry:this.retry,method:"GET",headers:c5,timeout:this.requestTimeout});return{text:i.targetText,from:e.langMapReverse.get(i.source)||r,to:e.langMapReverse.get(i.target)||a}}};d();var t1=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Na=class e extends we{static langMap=new Map(t1);static langMapReverse=new Map(t1.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=Ot(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,o,i);if(!s)throw new K("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new K("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,o,i);if(!s)throw new K("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new K("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let o="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await ce({retry:this.retry,url:o,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),o=this.apiUrl+"?"+a.toString();return{data:await ce({retry:this.retry,url:o,timeout:this.requestTimeout})}}};d();d();d();function d5(e,t){return t?e+(t-e%t):e}function m5(e,t){return e.split(t).length-1}function Vd(e){let t=Date.now(),n=1;for(let r of e)n+=m5(r,"i");return d5(t,n)}function p5(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Kd(){return p5(1e6,1e8)}d();d();d();var Yd="https://www2.deepl.com/jsonrpc",Jd="auto",n1=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];d();function g5(e=n1){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function Xd(e){return g5()[e.toLowerCase()]}var f5={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function h5(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function b5(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function y5(e,t,n,r,a,o,i){let s=Kd(),u=b5(r,n),l=[];t.forEach(g=>{l.push({text:g,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Vd(t);let c=await ce({retry:2,method:"POST",url:e,body:h5(u),headers:f5}),m={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(g=>{m.text.push(g.text)}),m}async function r1(e,t,n,r=Jd,a,o,i){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:y5(e,t,Xd(n),Xd(r)??"auto",a,o,i):{text:[],from:r,to:n}}var a1=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],qo=class e extends we{static langMap=new Map(a1);static langMapReverse=new Map(a1.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Yd;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=Ot(Yd,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,o=await r1(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:o.text,from:e.langMapReverse.get(o.from),to:e.langMapReverse.get(o.to)}}};d();var ms=class e extends we{static langMap=new Map(Ud);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=kr.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),o=e.langMap.get(a)||a,i=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Ce(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=o1());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:o,orig_url:u},target:{lang:i}}),m=await ce({url:hl,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(m.header.ret_code!=="succ")throw new K(m.message||m.header.ret_code);return{text:m.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,o=Ce(),i=t.url;if(o.INSTALL_FROM==="firefox_store"&&(i=o1()),r.length===1){let p=await this.translate({from:n,text:r[0],to:a,url:i,options:t.options});return{text:[p.text],from:p.from,to:p.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,m=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:i},target:{lang:c},type:"plain"}),g=await ce({url:hl,body:m,method:"POST"});if(g.header.ret_code!=="succ")throw new K(g.message||g.header.ret_code);return{text:g.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return kr.detectLanguageRemotelyByTransmart(t)}};function o1(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}d();d();function Qd(){return Math.random()>=.1}var Wo=class extends we{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Qd())throw new K("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await B2(),!Qd())throw new K("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(o=>{let i=o.match(/^\s*/)[0].length;return o.slice(0,i)+"\u6A21\u62DF\uFF1A"+o.slice(i,-6)})}}};d();var s1=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Zd=new Map(s1),i1=new Map(s1.map(([e,t])=>[t,e])),em=class e extends we{static langMap=Zd;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new K("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,o=await ce({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Zd.get(r)||"auto",target_lang:Zd.get(a)||a}),timeout:this.requestTimeout});if(o.status){let i=o;return i.result&&a=="zh-TW",{text:i.result,from:i1.get(i.source_lang),to:i1.get(i.target_lang)}}else throw new K(o.msg)}},Sl=em;d();var u1=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],ps=new Map(u1),E5=new Map(u1.map(([e,t])=>[t,e])),tm=class extends we{static langMap=ps;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=Yt()||In()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new K("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new K("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new K("authKey are required");if(!this.authKey)throw new K("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=Ot(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=Ot(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=Ot(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=Ot(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=Ot(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:o,merged:i}=this.optimizationText(t),s={source_lang:ps.get(n)||"",target_lang:ps.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);o.forEach(b=>{u.append("text",b)});let l=u.toString(),c={text:o,source_lang:ps.get(n)||"auto",target_lang:ps.get(r)||r},m=this.freeApiUrl;a.endsWith(":im")?m=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(m=this.proApiUrl);let g,p={};t.refresh&&(p={"X-Refresh":"True"}),t.debug&&(p={...p,"X-Debug":"True"}),this.provider==="pro"?g=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...p,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?g=await ce({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...p,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):g=await ce({retry:2,url:m,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:f}=this.restoreText(g,i,!!t.debug),y=f.map(b=>b.text);if(r==="zh-TW"){let b=this.serviceConfig||{};b&&b.googleApiUrl&&(b.apiUrl=b.googleApiUrl);let C=await new Na(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:f.map(w=>w.text).join(` `),url:"",options:{}});C&&C.text&&(y=C.text.split(` -`))}return{text:y,from:f[0]&&E5.get(f[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,o=[];for(let i=0;i=0){o.push(n[i]);continue}if(this.qualityMinTextLength>0&&n[i].length({text:!Yt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));o.push(...u)}else o.push(s)}return{...t,translations:o}}},l1=nm;d();var x5=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],rm=new Map(x5),am=class extends we{static langMap=rm;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new K("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,o=n,i={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:o,from:rm.get(r)||r,to:rm.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(i);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new K(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},c1=am;d();var T5=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],om=new Map(T5),im=class extends we{static langMap=om;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new K("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=It(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let o={"api-version":"3.0",to:om.get(a)||a};r!=="auto"&&(o.from=om.get(r)||r);let i=new URLSearchParams(o),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,p)=>{i.append(p,g)}),u.search=i.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},m=await ce(c);if(m.length===0)throw new K("server response invalid");return{from:r,to:a,text:m.map(g=>g.translations.map(f=>f.text).join(" "))}}},d1=im;d();var v5=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],$o=new Map(v5),sm=class extends we{static langMap=$o;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,o;if(n.length===0)return{from:r,to:a,text:[]};let i=` +`))}return{text:y,from:f[0]&&E5.get(f[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,o=[];for(let i=0;i=0){o.push(n[i]);continue}if(this.qualityMinTextLength>0&&n[i].length({text:!Yt()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));o.push(...u)}else o.push(s)}return{...t,translations:o}}},l1=tm;d();var x5=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],nm=new Map(x5),rm=class extends we{static langMap=nm;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new K("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,o=n,i={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:o,from:nm.get(r)||r,to:nm.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await ce(i);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new K(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},c1=rm;d();var T5=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],am=new Map(T5),om=class extends we{static langMap=am;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new K("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=Ot(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let o={"api-version":"3.0",to:am.get(a)||a};r!=="auto"&&(o.from=am.get(r)||r);let i=new URLSearchParams(o),s=JSON.stringify(n.map(g=>({text:g}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((g,p)=>{i.append(p,g)}),u.search=i.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},m=await ce(c);if(m.length===0)throw new K("server response invalid");return{from:r,to:a,text:m.map(g=>g.translations.map(f=>f.text).join(" "))}}},d1=om;d();var v5=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],$o=new Map(v5),im=class extends we{static langMap=$o;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,o;if(n.length===0)return{from:r,to:a,text:[]};let i=`
-`,s=n.join(i),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!$o.get(r)?(o=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:o||$o.get(r)||r,target:$o.get(a)||a})):u.body=JSON.stringify({text:s,source:$o.get(r),target:$o.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new K("server response invalid");let c=l.translatedText.split("
").map(m=>m.trim());return{from:r,to:a,text:c}}},m1=sm;d();d();d();function p1(e){let t=e.split(` +`,s=n.join(i),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!$o.get(r)?(o=(await ce({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:o||$o.get(r)||r,target:$o.get(a)||a})):u.body=JSON.stringify({text:s,source:$o.get(r),target:$o.get(a)||a});let l=await ce(u);if(l.translatedText==="")throw new K("server response invalid");let c=l.translatedText.split("
").map(m=>m.trim());return{from:r,to:a,text:c}}},m1=im;d();d();d();function p1(e){let t=e.split(` `),n=[],r,a="",o="";for(let i of t){i.startsWith("- ")&&(i=i.slice(1),r&&n.push(r),r={},a="",o="");let s=i.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=i.slice(i.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?o="":o=l):o+=` `+i}else o+=` -`+i;if(!a)continue;r||(r={});let u=Number(o);r[a]=Number.isNaN(u)?o:Number(o)}return r&&n.push(r),Object.values(n).forEach(i=>{Object.entries(i).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?i[s]=l.slice(1,-1):i[s]=l}})}),n}var um=class extends we{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+i;if(!a)continue;r||(r={});let u=Number(o);r[a]=Number.isNaN(u)?o:Number(o)}return r&&n.push(r),Object.values(n).forEach(i=>{Object.entries(i).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?i[s]=l.slice(1,-1):i[s]=l}})}),n}var sm=class extends we{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(t,n,r){if(super(t,n,r),t||(t={}),t.APIKEY){let a=t.APIKEY?.trim();this.apiKeys=a.split(",").map(o=>o.trim())}Array.isArray(t.ignoreResRegexs)&&(this.ignoreResReges=t.ignoreResRegexs),t.translationTextSeparator&&(this.translationTextSeparator=t.translationTextSeparator),t.model&&(this.model=t.model),t.systemPrompt&&(this.systemPrompt=t.systemPrompt),t.prompt&&(this.prompt=t.prompt),t.multiplePrompt&&(this.multiplePrompt=t.multiplePrompt),t.subtitlePrompt&&(this.subtitlePrompt=t.subtitlePrompt),t.bodyConfigs&&(this.bodyConfigs=t.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a,options:o}=t;if(n.length===0)return{from:r,to:a,text:""};let i=this.getLangMap(),s=this.prompt||"",u=i.get(r)||r,l=i.get(a)||a,c=this.serviceConfig.env||{},m=o?.sourceProgram,g=["subtitle","videoSubtitle"].includes(m),p=[n];o?.rawTextArrayLength&&(p=n.split(this.translationTextSeparator)),p.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),g&&this.subtitlePrompt&&p.length>1&&(s=this.subtitlePrompt);let f="",y="",b=s.includes("{{json}}"),h=s.includes("{{yaml}}");if(b){let R=[],v=c.imt_json_item||"";g&&(v=c.imt_subtitle_json_item||v);for(let x=0;xv==="from"?u:v==="to"?l+" Language":v==="text"?n:v=="json"?f:v=="yaml"?y:c[v]||R).replace(/{{(.+?)}}/g,(R,v)=>c[v]||R);let C=await this.handleOptions(s,t);P.debug("request options",C);let w=await ce(C),k=this.parseResponse(w);if(k=this.filterContent(n,k,s,p),P.debug("filterContent after",k),!b&&!h||!k)return{from:r,to:a,text:k||n};k=C5(n,k),k=c3(k);try{let R={};if(b){P.debug("extractValidJson before",k);let B=this.extractValidJson(k);P.debug("parse before",k),R=$s.parse(B)}else if(h){P.debug("parseYAML before",k);let B=this.extractValidYaml(k);R=p1(B)}let v=c.imt_trans_field;g&&(v=c.imt_sub_trans_field||v);let x=c.imt_source_field;return g&&(x=c.imt_sub_source_field||x),k=this.restoreText(p,R,v,this.translationTextSeparator,x),{from:r,to:a,text:k}}catch(R){return P.error("parse response failed",k,R),{from:r,to:a,text:k}}}extractValidJson(t){let n=t.indexOf("["),r=t.lastIndexOf("]");return n!==-1&&r!==-1?t.slice(n,r+1):""}extractValidYaml(t){let n=t.split(` `),r=[];for(let a=0;anew RegExp(s).test(o))&&(o=t)}catch(i){P.debug("e",i)}return o}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(t.join("_"))}},Go=um;function C5(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var S5=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],g1=new Map(S5),lm=class extends Go{static langMap=g1;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Yt()||In()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new K("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(o=>o.trim()),!a)throw new K("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=It(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=It(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=It(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return g1}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],o={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},i=this.getRandomKey();return this.provider==="pro"?(o.url=this.immersiveProApiUrl,o.headers.token=i,o.headers={...o.headers,...r}):i&&(o.headers.Authorization="Bearer "+i,o.headers["api-key"]=i,i.startsWith("immersiveopenai_")&&(o.url=this.immersiveProApiUrl,o.headers.token=i,i.endsWith("x")||(o.headers["Immersive-Corpus-Campagin"]="yes"),delete o.headers.Authorization,delete o.headers["api-key"],o.headers={...o.headers,...r})),o}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(t.join("_"))}},f1=lm;d();var y1=z6(h1());var b1=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],gs=class e extends we{static langMap=new Map(b1);static langMapReverse=new Map(b1.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new K("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new y1.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},i=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:i,payload:o,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=this.scene=="general"?"translate_standard":"translate_ecommerce",i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,m)=>(l[m]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:o},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:i,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:i,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},m=(y=>{let h=Object.keys(y).sort().map(C=>`${this.encode(C)}=${this.encode(y[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,m),p=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await ce({retry:this.retry,url:`https://${o}.aliyuncs.com?${p}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new K(f.Message);return f}};d();d();var w5=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],wt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},cm=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},dm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=cm(t);if(r)return Array.isArray(n)?`${r}=${n.map(cm).sort().join(`&${r}=`)}`:`${r}=${cm(n)}`}).filter(t=>t).join("&"),Vo=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${wt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},o=this.request.params,i=this.request.headers;t.sessionToken&&(a[wt.tokenHeader]=t.sessionToken),a[wt.dateHeader]=r,a[wt.notSignBody]="",a[wt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[wt.algorithmKey]=wt.algorithm,a[wt.signHeadersKey]="",a[wt.signQueriesKey]=void 0,a[wt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=o,this.request.headers=i,a[wt.signQueriesKey]=Object.keys(a).sort().join(";"),a[wt.signatureKey]=s,dm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[wt.dateHeader]=n,t.sessionToken&&(this.request.headers[wt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[wt.contentSha256Header]=await Jn(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return al(await Jr(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(wt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=dm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} +`)}restoreText(t,n,r,a,o){let i=[];for(let s=0;snew RegExp(s).test(o))&&(o=t)}catch(i){P.debug("e",i)}return o}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(t.join("_"))}},Go=sm;function C5(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var S5=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],g1=new Map(S5),um=class extends Go{static langMap=g1;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=Yt()||In()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new K("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(o=>o.trim()),!a)throw new K("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=Ot(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=Ot(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=Ot(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return g1}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],o={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},i=this.getRandomKey();return this.provider==="pro"?(o.url=this.immersiveProApiUrl,o.headers.token=i,o.headers={...o.headers,...r}):i&&(o.headers.Authorization="Bearer "+i,o.headers["api-key"]=i,i.startsWith("immersiveopenai_")&&(o.url=this.immersiveProApiUrl,o.headers.token=i,i.endsWith("x")||(o.headers["Immersive-Corpus-Campagin"]="yes"),delete o.headers.Authorization,delete o.headers["api-key"],o.headers={...o.headers,...r})),o}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return kn(t.join("_"))}},f1=um;d();var y1=z6(h1());var b1=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],fs=class e extends we{static langMap=new Map(b1);static langMapReverse=new Map(b1.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new K("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new y1.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},i=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:i,payload:o,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=this.scene=="general"?"translate_standard":"translate_ecommerce",i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,m)=>(l[m]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:o},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:i,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:i,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},m=(y=>{let h=Object.keys(y).sort().map(C=>`${this.encode(C)}=${this.encode(y[C])}`).join("&");return`POST&%2F&${this.encode(h)}`})(Object.assign({},l,a)),g=this.SHA1.b64_hmac(`${n}&`,m),p=new URLSearchParams(Object.assign({},l,{Signature:g})).toString(),f=await ce({retry:this.retry,url:`https://${o}.aliyuncs.com?${p}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(f instanceof Error)throw f;if(f.Code!=="200")throw new K(f.Message);return f}};d();d();var w5=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],wt={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},lm=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},cm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=lm(t);if(r)return Array.isArray(n)?`${r}=${n.map(lm).sort().join(`&${r}=`)}`:`${r}=${lm(n)}`}).filter(t=>t).join("&"),Vo=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${wt.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},o=this.request.params,i=this.request.headers;t.sessionToken&&(a[wt.tokenHeader]=t.sessionToken),a[wt.dateHeader]=r,a[wt.notSignBody]="",a[wt.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[wt.algorithmKey]=wt.algorithm,a[wt.signHeadersKey]="",a[wt.signQueriesKey]=void 0,a[wt.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=o,this.request.headers=i,a[wt.signQueriesKey]=Object.keys(a).sort().join(";"),a[wt.signatureKey]=s,cm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[wt.dateHeader]=n,t.sessionToken&&(this.request.headers[wt.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[wt.contentSha256Header]=await Jn(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return al(await Jr(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(wt.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=cm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} `),t.push(this.signedHeaders()),t.push(await this.hexEncodedBodyHash()),t.join(` `)}canonicalHeaders(){let t=[];Object.keys(this.request.headers).forEach(r=>{t.push([r,this.request.headers[r]])}),t.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let o=r[1];if(typeof o>"u"||o===null||typeof o.toString!="function")throw new K(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(o.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Jn(t)}async hexEncodedBodyHash(){return this.request.headers[wt.contentSha256Header]?this.request.headers[wt.contentSha256Header]:this.request.body?await this.hexEncodedHash(dm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return w5.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let o=await Jr(n,`${wt.kDatePrefix}${t.secretKey}`),i=await Jr(r,o),s=await Jr(a,i);return Jr(wt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,wt.v4Identifier].join("/")}};var E1=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],mm=new Map(E1),D5=new Map(E1.map(([e,t])=>[t,e])),pm=class extends we{static langMap=mm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new K("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new Vo(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let o=new URLSearchParams(r.params),i=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+o.toString(),headers:a.request.headers,method:r.method,body:r.body});if(i.DetectedLanguageList&&i.DetectedLanguageList.length>0)return i.DetectedLanguageList[0].Language;if(i.ResponseMetadata&&i.ResponseMetadata.Error){let s=i.ResponseMetadata.Error;throw new K(s.Code,s.Message)}else if(i.ResponseMetaData&&i.ResponseMetaData.Error){let s=i.ResponseMetaData.Error;throw new K(s.Code,s.Message)}else throw new K("response: "+JSON.stringify(i))}async translateList(t){let{text:n,from:r,to:a}=t,o=mm.get(r),i={TargetLanguage:mm.get(a)||a,TextList:n};o?i.SourceLanguage=o:i.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(i)},u=new Vo(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let m=c.TranslationList.map(p=>p.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=D5.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:m,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let m=c.ResponseMetadata.Error;throw new K(m.Code,m.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let m=c.ResponseMetaData.Error;throw new K(m.Code,m.Message)}else throw new K("response: "+JSON.stringify(c))}},x1=pm;d();var T1=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],gm=new Map(T1),A5=new Map(T1.map(([e,t])=>[t,e])),fs=class extends we{static langMap=gm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,o=gm.get(r)||"detect",i=gm.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:o,target_language:i,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=A5.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new K(l.status_code.toString(),l.status_message)}}};d();var k5=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],fm=new Map(k5),hs=class extends we{static langMap=fm;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new K("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,o=this.getRandomKey(),s=await ce({retry:this.retry,url:o,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:fm.get(r)||r,target_lang:fm.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new K(s.message||s.message||"API Error")}};d();d();var hm="https://{s}bing.com",D1=hm+"/translator",_5=hm+"/ttranslatev3",L5=hm+"/tspellcheckv3",Dl="bingGlobalConfig",A1=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],v1=new Map(A1),C1=new Map(A1.map(([e,t])=>[t,e])),S1=1e3,Xn,Ko;function bm(e,t){return e.replace("{s}",t?t+".":"")}async function F5(){if(!Xn){let n=await oe.storage.local.get(Dl);return n&&(Xn=n[Dl]),!0}let{tokenTs:e,tokenExpiryInterval:t}=Xn;return Date.now()-e>t}async function w1(){let e,t,n,r,a,o,i,s,u,l;try{let c=bm(D1,e),m=await ce({retry:2,url:c,responseType:"raw"}),{body:g,headers:p,url:f}=m;e=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=p["set-cookie"],t=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,o,i,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return Xn={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:o,isVertical:i,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[Dl]:Xn}),Xn}function P5(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=Xn;return bm(e?L5:_5,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+Xn.count++:"")}function M5(e,t,n,r){let{token:a,key:o}=Xn,i={fromLang:n,text:t,token:a,key:o};return!e&&r&&(i.to=r),i}async function k1(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>S1)throw new Error(`The supported maximum length of text is ${S1}. Please shorten the text.`);Ko||(Ko=w1()),await Ko,await F5()&&(Ko=w1(),await Ko),t=t||"auto",n=n||"zh-CN",t=v1.get(t)||t,n=v1.get(n)||n;let a=P5(!1),o=M5(!1,e,t,n==="auto-detect"?"zh-Hans":n),i={referer:bm(D1,Xn.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(o),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:i,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(Xn=null,Ko=null,await oe.storage.local.remove(Dl),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await Jn(t)}async hexEncodedBodyHash(){return this.request.headers[wt.contentSha256Header]?this.request.headers[wt.contentSha256Header]:this.request.body?await this.hexEncodedHash(cm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return w5.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let o=await Jr(n,`${wt.kDatePrefix}${t.secretKey}`),i=await Jr(r,o),s=await Jr(a,i);return Jr(wt.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,wt.v4Identifier].join("/")}};var E1=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],dm=new Map(E1),D5=new Map(E1.map(([e,t])=>[t,e])),mm=class extends we{static langMap=dm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new K("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new Vo(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let o=new URLSearchParams(r.params),i=await ce({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+o.toString(),headers:a.request.headers,method:r.method,body:r.body});if(i.DetectedLanguageList&&i.DetectedLanguageList.length>0)return i.DetectedLanguageList[0].Language;if(i.ResponseMetadata&&i.ResponseMetadata.Error){let s=i.ResponseMetadata.Error;throw new K(s.Code,s.Message)}else if(i.ResponseMetaData&&i.ResponseMetaData.Error){let s=i.ResponseMetaData.Error;throw new K(s.Code,s.Message)}else throw new K("response: "+JSON.stringify(i))}async translateList(t){let{text:n,from:r,to:a}=t,o=dm.get(r),i={TargetLanguage:dm.get(a)||a,TextList:n};o?i.SourceLanguage=o:i.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(i)},u=new Vo(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await ce({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let m=c.TranslationList.map(p=>p.Translation),g=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(g=D5.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:m,from:g,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let m=c.ResponseMetadata.Error;throw new K(m.Code,m.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let m=c.ResponseMetaData.Error;throw new K(m.Code,m.Message)}else throw new K("response: "+JSON.stringify(c))}},x1=mm;d();var T1=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],pm=new Map(T1),A5=new Map(T1.map(([e,t])=>[t,e])),hs=class extends we{static langMap=pm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,o=pm.get(r)||"detect",i=pm.get(a)||a,u=await ce({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:o,target_language:i,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=A5.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new K(l.status_code.toString(),l.status_message)}}};d();var k5=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],gm=new Map(k5),bs=class extends we{static langMap=gm;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new K("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,o=this.getRandomKey(),s=await ce({retry:this.retry,url:o,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:gm.get(r)||r,target_lang:gm.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new K(s.message||s.message||"API Error")}};d();d();var fm="https://{s}bing.com",D1=fm+"/translator",_5=fm+"/ttranslatev3",L5=fm+"/tspellcheckv3",Dl="bingGlobalConfig",A1=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],v1=new Map(A1),C1=new Map(A1.map(([e,t])=>[t,e])),S1=1e3,Xn,Ko;function hm(e,t){return e.replace("{s}",t?t+".":"")}async function F5(){if(!Xn){let n=await oe.storage.local.get(Dl);return n&&(Xn=n[Dl]),!0}let{tokenTs:e,tokenExpiryInterval:t}=Xn;return Date.now()-e>t}async function w1(){let e,t,n,r,a,o,i,s,u,l;try{let c=hm(D1,e),m=await ce({retry:2,url:c,responseType:"raw"}),{body:g,headers:p,url:f}=m;e=f.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=p["set-cookie"],t=g.match(/IG:"([^"]+)"/)[1],n=g.match(/data-iid="([^"]+)"/)[1],[a,r,o,i,s,u]=JSON.parse(g.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return Xn={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:o,isVertical:i,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await oe.storage.local.set({[Dl]:Xn}),Xn}function P5(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=Xn;return hm(e?L5:_5,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+Xn.count++:"")}function M5(e,t,n,r){let{token:a,key:o}=Xn,i={fromLang:n,text:t,token:a,key:o};return!e&&r&&(i.to=r),i}async function k1(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>S1)throw new Error(`The supported maximum length of text is ${S1}. Please shorten the text.`);Ko||(Ko=w1()),await Ko,await F5()&&(Ko=w1(),await Ko),t=t||"auto",n=n||"zh-CN",t=v1.get(t)||t,n=v1.get(n)||n;let a=P5(!1),o=M5(!1,e,t,n==="auto-detect"?"zh-Hans":n),i={referer:hm(D1,Xn.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(o),u=a,l=s.toString(),c=await ce({retry:2,url:u,headers:i,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(Xn=null,Ko=null,await oe.storage.local.remove(Dl),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let m=c[0].translations[0],g=c[0].detectedLanguage;return{text:m.text,from:C1.get(g.language),to:C1.get(m.to)}}d();var Al=new Map;async function ym(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=kn(e.body)),Al.has(t))return Al.get(t);let n=ce(e);Al.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{Al.delete(t)},3e3)}}async function _1(e){return ym(e)}async function kl(e){if(Ue()){let n=Y2();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw P.error("can not comunicate with root frame, use strict limiter",r),r}else return ym(e)}else return ym(e)}d();function L1(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),o=JSON.parse(a),i=new Date(o.exp*1e3);return{accessToken:e,accessTokenExpiresAt:i.toISOString()}}d();async function _l(e){await ld(e)}async function Ll(e,t){let n=await id(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),o=new Date(n.accessTokenExpiresAt).getTime();if(o-r>30*1e3)return n;if(o-r>3e3)return F1(e,t)}return F1(e,t)}async function F1(e,t){let n=await t(),r=n.accessTokenExpiresAt,o=new Date(r).getTime()-Date.now();return await sd(e,n,o-1e3),n}var B5=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Em=new Map(B5),bs=class extends we{static langMap=Em;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await _l(zc)}async translate(t){let{text:n,from:r,to:a}=t;return n?await k1(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await Ll(zc,async()=>{let t=await kl({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return L1(t)})}async translateList(t){let{from:n,to:r,text:a}=t,o=Em.get(n)||"auto",i=Em.get(r)||r;o==="auto"&&(o="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${o}&to=${i}&api-version=3.0&includeSentenceLength=true`,m=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(m&&m.length>0&&m[0].translations&&m[0].translations.length>0)return{text:m.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new K("Microsoft translate error "+JSON.stringify(m))}};d();var P1=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],xm=new Map(P1),R5=new Map(P1.map(([e,t])=>[t,e])),Tm=class extends we{static langMap=xm;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new K("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:o}=this,{text:i,from:s,to:u}=t,l=kn(a+i+n+o);this.domain&&(l=kn(a+i+n+this.domain+o));let c=new URLSearchParams({from:xm.get(s)||"auto",to:xm.get(u)||u,q:i,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let m=new URL(r);m.search=c.toString();let g=await ce({url:m.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new K("API_SERVER_ERROR",g.error_msg);let{trans_result:p,from:f}=g,y=p.map(({dst:h})=>h);return{from:R5.get(f)||f,to:u,text:y.join(` -`)}}},M1=Tm;d();d();var ja=class extends we{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new K(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n);if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Bu(i);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new K("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new K(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n.join(" "));if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Bu(i);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},o=a?.body||"",i=this.apiServiceConfig.keywords||{};a.body=u(o);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(m,g)=>{let[p,f]=g.split(":"),y=i[p];return f==="random"?I5(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let o of a){if(Array.isArray(r))return r=r.map(i=>i[o]),r;r=r[o]}return r}detectLanguageRemotely(t){return kr.detectLanguageRemotelyByTransmart(t)}};function I5(e){let t=Math.floor(Math.random()*e.length);return e[t]}var B1=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],vm=class extends ja{static langMap=new Map(B1);constructor(t,n,r){if(!t?.token)throw new K("token are required");super({...t,isSupportList:!0,langs:B1,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},R1=vm;d();var O5=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],Fl=new Map(O5),Cm=class extends we{static langMap=Fl;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!Fl.get(a))throw new K(`Unsupported language: ${a}`);if(r==="auto")throw new K("Unsupported language: auto");let i=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:i,trans_type:`${Fl.get(r)||"auto"}2${Fl.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},I1=Cm;d();var O1=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Sm=new Map(O1),N5=new Map(O1.map(([e,t])=>[t,e]));function j5(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var wm=class extends we{static langMap=Sm;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new K("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o=U5(32),i=Math.round(new Date().getTime()/1e3),s=this.appId+j5(n)+o+i+this.appSecret,u=await Jn(s),l={q:n,appKey:this.appId,salt:o.toString(),from:Sm.get(r)||"auto",to:Sm.get(a)||a,sign:u,signType:"v3",curtime:i.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new K(JSON.stringify(g));let p=g.l,[f,y]=p.split("2");return{text:g.translation.join(` -`),from:N5.get(f),to:a}}};function U5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Am=class extends we{static langMap=Dm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o={q:n,from:Dm.get(r)||"auto",to:Dm.get(a)||a},i=new URLSearchParams(o),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:i.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new K("Youdao translation failed: "+JSON.stringify(s))}},U1=Am;d();var ys=class extends ja{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||ji,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var H1="immersive-translate-gemini-fake-user-key",H5=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],z1=new Map(H5),km=class extends Go{static langMap=z1;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return z1}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await od(H1,""),this.fakeId||(this.fakeId=z5(10),await ud(H1,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let o=this.systemPrompt+t;this.randomPrefix&&(o=this.randomPrefix.replace("{{id}}",this.fakeId)+o);let i={contents:[{role:"user",parts:[{text:o}]}],...this.bodyConfigs};return a.body=JSON.stringify(i,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let o=super.filterContent(t,n,r);return o.includes(this.fakeId)&&a.length<=1?t:o}};function z5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await kl({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=await this.getAccessToken(),i=new URLSearchParams;i.append("srv","tr-url-widget"),i.append("id",`${o.accessToken}-0-0`),i.append("format","html"),i.append("lang",`${r==="auto"?"":Lm.get(r)+"-"}${Lm.get(a)}`),n.forEach(l=>{i.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${i.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var $5={mock:Wo,mock2:Wo,custom:ys,google:Na,transmart:ds,deepl:l1,volc:x1,volcAlpha:fs,bing:bs,tencent:ls,tenAlpha:cs,baidu:M1,caiyun:R1,cai:I1,openl:Sl,youdao:N1,you:U1,d:qo,dpro:qo,deeplx:hs,niu:c1,azure:d1,openai:f1,gemini:q1,claude:$1,papago:m1,aliyun:gs,yandex:Es},na={};Object.keys(ir).forEach(e=>{na[e]={...ir[e],class:$5[e]}});function Pl(e,t){let n=An;if(na[e]&&na[e].class&&na[e].class.langMap&&na[e].class.langMap.size>0){let r=na[e].class.langMap,a=n.filter(o=>r.get(o));return a.includes(t)||a.unshift("placeholder"),a}else return An}async function ra(e,t,n){if(!e.text)return e;let r=null,a=await Ze({sentences:[e]},t,(o,i,s)=>{o&&(r=o)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new K("translateFailed","translate failed")}async function G1(e,t){for(let n of e)try{return await ra({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Fm(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,o=n,i=a[o]||{},s=Jt(e.user);await new na[o].class(i,r,{translationService:o,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function G5(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function Ze(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:o,state:i}=t,s=a.translationGeneralConfig,u=a.translationServices,l=o,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let m=u[l]||{};m=h2(m,{sourceLanguage:G5(e.sentences),targetLanguage:c,model:m.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(m={...m,...r});let g=a.beta,p=i.cache===!1&&g,f=a.debug===!0&&g;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(x=>(p&&(x.refresh=!0),f&&(x.debug=!0),x))),l==="openai"&&(e.sentences=e.sentences.map(x=>({...x,from:"auto"})));let y=[],b={sentences:Array(e.sentences.length)},h=e.sentences.length,C=-1,w=Jt(t.user),k;try{k=new na[l].class(m,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await k.init()}catch(x){if(n){y.push(...e.sentences);let B={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let _ of y){let E=x instanceof K?new K(x.name,x.message).initNetWork(x.status).initData(x.data||B):x;n(E,null,_)}}return{sentences:[]}}if(i.cache)for(let x of e.sentences){C++;let B=l;l==="openl"&&(B=l+"-"+m.codename||Sl.DEFAULT_CODENAME);let _=k.getCacheKeyPrefix();_&&(B=_+"-"+B);let E=null;try{E=await zs(P2({originalText:x.text,from:x.from,to:x.to,service:B}),200)}catch(O){P.warn("query cache DB error, but it's ok",O)}if(E){let O={...x,text:E.translatedText};b.sentences[C]=O,n&&n(null,O,x)}else y.push(x)}else y.push(...e.sentences);let R=y.length;if(h-R>0&&P.debug(`use ${h-R} sentences from cache`),!y.length)return b;let v=await k.multipleTranslate({sentences:y},m,(x,B,_)=>{if(n&&n(x,B,_),!x&&B&&!l.startsWith("mock")&&i.cache){let E=l;l==="openl"&&(E=l+"-"+m.codename||Sl.DEFAULT_CODENAME);let O=k.getCacheKeyPrefix();O&&(E=O+"-"+E),i.cache&&zs(M2({translatedText:B.text,from:_.from,to:_.to,detectedFrom:B.from,key:kn(_.text),service:E}),3e3).catch(F=>{P.warn("set cache DB error",F)})}});for(let x of v?.sentences||[]){let B=b.sentences.findIndex(_=>!_);if(B===-1)throw new K("translateFailed","can not match the result");b.sentences[B]=x}return b}d();d();function V1(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return P.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return P.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let o=window.document.cloneNode(!0),s=new eu(o,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=V5(s.content,s.textContent),t&&(n=Y1(r,t))}catch(o){P.debug(o)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function K1(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&P.debug("update article node",n),e.articleNode=n)}function Pm(e,t){return t&&e?.contains(t)||!1}function V5(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let o=K5(a[0]),i=document.querySelector(o);return!i||(a.length>1&&(i=i.parentElement),i==document.documentElement)?null:(i?.textContent?.length||0)>=t.length&&t.length>=500?i:null}function K5(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function Y1(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(o=>e.articleChildTags.includes(o.nodeName)).length>=e.articleChildTagsNum)return t;for(let o=0;o{let S=H(L);return S==NodeFilter.FILTER_ACCEPT?dt.mark(L,M,y):S==NodeFilter.FILTER_REJECT,S}),U=E;if(H(U)===NodeFilter.FILTER_REJECT)return;for(dt.mark(U,M,y);U;){if(s=Pm(o,U),c&&c.length>0){let{currentNode:L,isMatchedSelection:S}=k(N,U,c);if(L)U=L;else break;if(!S)continue}if(U.nodeType===Node.ELEMENT_NODE||U.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let L=U;if(L.nodeName==="IFRAME"){O&&O(L),R(),Mm(b,!0),U=N.nextNode();continue}L.nodeType===Node.ELEMENT_NODE&&(l&&Rm(L,l),p&&Om(L,p));let S=Gr(L,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},L.immersiveTranslateComputedStyle||null);if(S&&n.paragraphFirstLetterFontSize>0&&L.childNodes.length==1&&L.childNodes[0].nodeType===Node.TEXT_NODE&&L.innerText?.length==1&&L?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(S=!1),Wt(L,u)&&!S){v(L);let q=null;for(;!(q=N.nextSibling())&&N.parentNode(););U=q;continue}let A=Ba(L);if(!J1(b,L)||S){R(L);let q=S?L:L.parentElement;q&&q.childNodes.length>0&&x(b,q,q.immersiveTranslateComputedStyle||null)}A&&L.shadowRoot?.mode==="open"&&(S?O?.(L.shadowRoot):w({..._,container:L.shadowRoot})),L.nodeType===Node.ELEMENT_NODE&&L.nodeName==="PRE"&&m&&ew(L)}else if(U.nodeType===Node.TEXT_NODE)v(U);else throw new Error("should not be here");U=N.nextNode(),b.commonAncestorContainer&&U&&U.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&U&&U.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(U)}function H(L){if(L.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Ar(L)){if(p){let q=Object.keys(p);if(q.length>0&&Wt(L,q))for(let W of q){let V=p[W];if(L.matches(W)){let ue=p[W],ae=Object.keys(ue);for(let X of ae){let ie=ue[X];L.getAttribute(X)!==ie&&(ie===null?L.removeAttribute(X):L.setAttribute(X,ie))}break}}}if(!_.force&&dt.isMarked(L,M)||z3(L,M)||Bl(L,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||L.nodeName==="IFRAME"&&!ko(L))return NodeFilter.FILTER_REJECT;if(L.nodeType===Node.ELEMENT_NODE){let q=window.getComputedStyle(L);if(L.immersiveTranslateComputedStyle=q,Im(q))return F&&F(L),NodeFilter.FILTER_REJECT;let z=Gr(L,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},q||null);if(Wt(L,u)&&z)return NodeFilter.FILTER_REJECT}let S=L.getBoundingClientRect(),{width:A,height:j}=S;return L.nodeName==="IMG"&&(A>48&&j>48?L.immersiveTranslateComputedStyle={display:"block"}:A>0&&j>0&&f!==!1&&(L.setAttribute("width",A),L.setAttribute("height",j))),!L.childNodes||L.childNodes&&L.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(A>0&&A<4||j>0&&j<4)&&(L.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(L.nodeType===Node.TEXT_NODE){let S=L.textContent?.trim();if(!S)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let A=L.parentNode;if(A.getBoundingClientRect){let{width:j,height:q}=A.getBoundingClientRect();if(j>0&&j<4||q>0&&q<4)return NodeFilter.FILTER_REJECT}return g>0&&S.length>=g&&Bm(L,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&R();function k(_,E,O){let F=E.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(E))if(h=!1,E&&E.nodeType===Node.ELEMENT_NODE)if(Ml(E,O))h=!0,C=E,R(),x(b,C,F);else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h}}else if(E&&E.nodeType===Node.ELEMENT_NODE)if(Ml(E,O))h=!0,C=E,R(),x(b,C,F);else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};return{currentNode:E,isMatchedSelection:!0}}function R(_){if(_&&_.nodeName==="BR"){b.commonAncestorContainer=_.parentNode;let O=[...b.flatNodes],F=b.flatNodes.filter(M=>_.parentNode?.contains(M));F.length>0&&O.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=O)}let E=Z5(b,a,n);E&&(E.xpath=q3(r,s,E.commonAncestorContainer,o),t&&t(E)),Mm(b)}function v(_){if(!J1(b,_)){R(),Mm(b);let E=_.parentNode;E&&x(b,E,E.computedStyle)}b.flatNodes.push(_)}function x(_,E,O){_.commonAncestorContainer=E;let F=B(O);_.isPreWhitespace=F}function B(_){return _&&_.whiteSpace&&_.whiteSpace.startsWith("pre")||_&&_.whiteSpace==="break-spaces"||!1}}function J1(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Ba(t));let r=Q5(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function J5(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function X5(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Rm(e,t){if(t){let n=Object.keys(t);if(n.length>0&&Wt(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=e.style.cssText||"";i&&(i=i.trim()),i&&!i.endsWith(";")&&(i+=";"),e.style.cssText=i+o;break}}}}function Q5(e){return e&&e._currentStacks?e._currentStacks.some(t=>Ba(t)):!1}function Z5(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(p=>p.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let i=tw(r,a,n);i||(i=a);let s=[];for(let p of r){let f=X5(e,i,p);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],m=u,g=0;for(;m&&(c.push(m),m!==l);){if(g++,g>Y5){P.warn("loop too many times for convert root nodes, break");break}m=m.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:i,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Mm(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Im(e){return e.display==="none"}var dt={_marked_key:Jf,isMarked(e,t){return Md(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||Ba(e)))return el(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)dt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||Ba(e)))return ut(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=Lo(e,"markWalk")||"";return ut(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||Ba(e)):!1}};function ew(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function tw(e,t,n){if(!e.length)return null;let r=e.map(a=>{let o=new Set;for(;(a=a.parentNode)&&(o.add(a),a!==t););return o});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(vn(a,n.atomicBlockSelectors))continue;if(r.every(o=>o.has(a)))return a}return null}function Bm(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let o=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((i,s)=>{let u=n.lastIndexOf(s,t);return u>i?u:i},-1);if(o>1){let i=n[o-1]||"",s=n[o-2]||"",u=n[o+1]||"";i==="."||u==="."||u===")"||s==="."&&i==="S"||s.toUpperCase()==="M"&&(i.toUpperCase()==="R"||i.toUpperCase()==="S")?o=-1:isNaN(Number(i))||(o=-1)}if(o===-1)n.length>t+20&&Bm(e,t+20);else{let i=n.slice(o+1);if(!i.trim())return;o++,i.startsWith(" ")&&o++,e.immersive=!0;let s=e.splitText(o);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),o+10)for(let r of n){let a=t[r],o=Object.keys(a),i=Q3(e,[r]);for(let s of i)for(let u of o){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function Q1(e,t,n,r,a,o,i){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),m=e.querySelector(u);if(m)for(let g of c){let p=l[g];if(g==="translate"&&p==="no"){let y=m.innerText||m.textContent||"";if(!y.trim()||nw(m,a,o,i)||!e2(y,n,r))continue}m.getAttribute(g)!==p&&(p===null?m.removeAttribute(g):m.setAttribute(g,p))}}}function Om(e,t){if(t){let n=Object.keys(t);if(n.length>0&&Wt(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=t[a],s=Object.keys(i);for(let u of s){let l=i[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function Bl(e,t){return Wt(e,t.excludeSelectors||[])?Wt(e,t.selectors||[])?!1:!Wt(e,t.stayOriginalSelectors||[]):!1}function Ml(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return Wt(e,t.concat(n))}function nw(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,o=>o.nodeType===Node.ELEMENT_NODE&&Bl(o,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let o=a.currentNode;if(o.nodeType===Node.TEXT_NODE&&parent){let i=o.textContent||"";if(i.includes("Copyright"))continue;if(Ao(i,t,n))return!0}}return!1}d();d();d();function Z1(e,t,n,r,a){let o=t,i=sh[o]||[],s="";e&&i&&i.length>0&&i.forEach(c=>{let{name:m}=c;if(e&&n&&n[m]){let g=n[m];if(["borderRadius"].includes(m)&&(g+="px"),s+=`--immersive-translate-theme-${o}-${m}: ${g}; + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let m=c[0].translations[0],g=c[0].detectedLanguage;return{text:m.text,from:C1.get(g.language),to:C1.get(m.to)}}d();var Al=new Map;async function bm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=kn(e.body)),Al.has(t))return Al.get(t);let n=ce(e);Al.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{Al.delete(t)},3e3)}}async function _1(e){return bm(e)}async function kl(e){if(Ue()){let n=Y2();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw P.error("can not comunicate with root frame, use strict limiter",r),r}else return bm(e)}else return bm(e)}d();function L1(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),o=JSON.parse(a),i=new Date(o.exp*1e3);return{accessToken:e,accessTokenExpiresAt:i.toISOString()}}d();async function _l(e){await ud(e)}async function Ll(e,t){let n=await od(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),o=new Date(n.accessTokenExpiresAt).getTime();if(o-r>30*1e3)return n;if(o-r>3e3)return F1(e,t)}return F1(e,t)}async function F1(e,t){let n=await t(),r=n.accessTokenExpiresAt,o=new Date(r).getTime()-Date.now();return await id(e,n,o-1e3),n}var B5=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],ym=new Map(B5),ys=class extends we{static langMap=ym;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await _l(Hc)}async translate(t){let{text:n,from:r,to:a}=t;return n?await k1(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await Ll(Hc,async()=>{let t=await kl({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return L1(t)})}async translateList(t){let{from:n,to:r,text:a}=t,o=ym.get(n)||"auto",i=ym.get(r)||r;o==="auto"&&(o="");let s=await this.getAccessToken(),u=[];for(let g of a)u.push({Text:g});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${o}&to=${i}&api-version=3.0&includeSentenceLength=true`,m=await ce({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(m&&m.length>0&&m[0].translations&&m[0].translations.length>0)return{text:m.map(g=>g.translations[0]?.text||""),from:n,to:r};throw new K("Microsoft translate error "+JSON.stringify(m))}};d();var P1=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Em=new Map(P1),R5=new Map(P1.map(([e,t])=>[t,e])),xm=class extends we{static langMap=Em;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new K("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:o}=this,{text:i,from:s,to:u}=t,l=kn(a+i+n+o);this.domain&&(l=kn(a+i+n+this.domain+o));let c=new URLSearchParams({from:Em.get(s)||"auto",to:Em.get(u)||u,q:i,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let m=new URL(r);m.search=c.toString();let g=await ce({url:m.toString(),retry:this.retry,timeout:this.requestTimeout});if(g.error_code)throw new K("API_SERVER_ERROR",g.error_msg);let{trans_result:p,from:f}=g,y=p.map(({dst:h})=>h);return{from:R5.get(f)||f,to:u,text:y.join(` +`)}}},M1=xm;d();d();var ja=class extends we{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new K(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n);if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Bu(i);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new K("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new K(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n.join(" "));if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Bu(i);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},o=a?.body||"",i=this.apiServiceConfig.keywords||{};a.body=u(o);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(m,g)=>{let[p,f]=g.split(":"),y=i[p];return f==="random"?I5(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let o of a){if(Array.isArray(r))return r=r.map(i=>i[o]),r;r=r[o]}return r}detectLanguageRemotely(t){return kr.detectLanguageRemotelyByTransmart(t)}};function I5(e){let t=Math.floor(Math.random()*e.length);return e[t]}var B1=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Tm=class extends ja{static langMap=new Map(B1);constructor(t,n,r){if(!t?.token)throw new K("token are required");super({...t,isSupportList:!0,langs:B1,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},R1=Tm;d();var O5=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],Fl=new Map(O5),vm=class extends we{static langMap=Fl;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!Fl.get(a))throw new K(`Unsupported language: ${a}`);if(r==="auto")throw new K("Unsupported language: auto");let i=n;return{text:(await ce({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:i,trans_type:`${Fl.get(r)||"auto"}2${Fl.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},I1=vm;d();var O1=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Cm=new Map(O1),N5=new Map(O1.map(([e,t])=>[t,e]));function j5(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var Sm=class extends we{static langMap=Cm;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new K("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o=U5(32),i=Math.round(new Date().getTime()/1e3),s=this.appId+j5(n)+o+i+this.appSecret,u=await Jn(s),l={q:n,appKey:this.appId,salt:o.toString(),from:Cm.get(r)||"auto",to:Cm.get(a)||a,sign:u,signType:"v3",curtime:i.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),g=await ce({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!g.translation)throw new K(JSON.stringify(g));let p=g.l,[f,y]=p.split("2");return{text:g.translation.join(` +`),from:N5.get(f),to:a}}};function U5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var Dm=class extends we{static langMap=wm;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o={q:n,from:wm.get(r)||"auto",to:wm.get(a)||a},i=new URLSearchParams(o),s=await ce({url:"https://aidemo.youdao.com/trans",method:"POST",body:i.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new K("Youdao translation failed: "+JSON.stringify(s))}},U1=Dm;d();var Es=class extends ja{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||Ui,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};d();var H1="immersive-translate-gemini-fake-user-key",H5=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],z1=new Map(H5),Am=class extends Go{static langMap=z1;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return z1}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await ad(H1,""),this.fakeId||(this.fakeId=z5(10),await sd(H1,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let o=this.systemPrompt+t;this.randomPrefix&&(o=this.randomPrefix.replace("{{id}}",this.fakeId)+o);let i={contents:[{role:"user",parts:[{text:o}]}],...this.bodyConfigs};return a.body=JSON.stringify(i,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let o=super.filterContent(t,n,r);return o.includes(this.fakeId)&&a.length<=1?t:o}};function z5(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await kl({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=await this.getAccessToken(),i=new URLSearchParams;i.append("srv","tr-url-widget"),i.append("id",`${o.accessToken}-0-0`),i.append("format","html"),i.append("lang",`${r==="auto"?"":_m.get(r)+"-"}${_m.get(a)}`),n.forEach(l=>{i.append("text",l)});let s=await ce({url:`https://translate.yandex.net/api/v1/tr.json/translate?${i.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var $5={mock:Wo,mock2:Wo,custom:Es,google:Na,transmart:ms,deepl:l1,volc:x1,volcAlpha:hs,bing:ys,tencent:cs,tenAlpha:ds,baidu:M1,caiyun:R1,cai:I1,openl:Sl,youdao:N1,you:U1,d:qo,dpro:qo,deeplx:bs,niu:c1,azure:d1,openai:f1,gemini:q1,claude:$1,papago:m1,aliyun:fs,yandex:xs},na={};Object.keys(ir).forEach(e=>{na[e]={...ir[e],class:$5[e]}});function Pl(e,t){let n=An;if(na[e]&&na[e].class&&na[e].class.langMap&&na[e].class.langMap.size>0){let r=na[e].class.langMap,a=n.filter(o=>r.get(o));return a.includes(t)||a.unshift("placeholder"),a}else return An}async function ra(e,t,n){if(!e.text)return e;let r=null,a=await Je({sentences:[e]},t,(o,i,s)=>{o&&(r=o)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new K("translateFailed","translate failed")}async function G1(e,t){for(let n of e)try{return await ra({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function Lm(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,o=n,i=a[o]||{},s=Jt(e.user);await new na[o].class(i,r,{translationService:o,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function G5(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function Je(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:o,state:i}=t,s=a.translationGeneralConfig,u=a.translationServices,l=o,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let m=u[l]||{};m=h2(m,{sourceLanguage:G5(e.sentences),targetLanguage:c,model:m.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(m={...m,...r});let g=a.beta,p=i.cache===!1&&g,f=a.debug===!0&&g;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(x=>(p&&(x.refresh=!0),f&&(x.debug=!0),x))),l==="openai"&&(e.sentences=e.sentences.map(x=>({...x,from:"auto"})));let y=[],b={sentences:Array(e.sentences.length)},h=e.sentences.length,C=-1,w=Jt(t.user),k;try{k=new na[l].class(m,s,{translationService:l,userToken:t.user?.token,isPro:w,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await k.init()}catch(x){if(n){y.push(...e.sentences);let B={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let _ of y){let E=x instanceof K?new K(x.name,x.message).initNetWork(x.status).initData(x.data||B):x;n(E,null,_)}}return{sentences:[]}}if(i.cache)for(let x of e.sentences){C++;let B=l;l==="openl"&&(B=l+"-"+m.codename||Sl.DEFAULT_CODENAME);let _=k.getCacheKeyPrefix();_&&(B=_+"-"+B);let E=null;try{E=await zs(P2({originalText:x.text,from:x.from,to:x.to,service:B}),200)}catch(O){P.warn("query cache DB error, but it's ok",O)}if(E){let O={...x,text:E.translatedText};b.sentences[C]=O,n&&n(null,O,x)}else y.push(x)}else y.push(...e.sentences);let R=y.length;if(h-R>0&&P.debug(`use ${h-R} sentences from cache`),!y.length)return b;let v=await k.multipleTranslate({sentences:y},m,(x,B,_)=>{if(n&&n(x,B,_),!x&&B&&!l.startsWith("mock")&&i.cache){let E=l;l==="openl"&&(E=l+"-"+m.codename||Sl.DEFAULT_CODENAME);let O=k.getCacheKeyPrefix();O&&(E=O+"-"+E),i.cache&&zs(M2({translatedText:B.text,from:_.from,to:_.to,detectedFrom:B.from,key:kn(_.text),service:E}),3e3).catch(F=>{P.warn("set cache DB error",F)})}});for(let x of v?.sentences||[]){let B=b.sentences.findIndex(_=>!_);if(B===-1)throw new K("translateFailed","can not match the result");b.sentences[B]=x}return b}d();d();function V1(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return P.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return P.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let o=window.document.cloneNode(!0),s=new eu(o,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=V5(s.content,s.textContent),t&&(n=Y1(r,t))}catch(o){P.debug(o)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function K1(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&P.debug("update article node",n),e.articleNode=n)}function Fm(e,t){return t&&e?.contains(t)||!1}function V5(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let o=K5(a[0]),i=document.querySelector(o);return!i||(a.length>1&&(i=i.parentElement),i==document.documentElement)?null:(i?.textContent?.length||0)>=t.length&&t.length>=500?i:null}function K5(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function Y1(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(o=>e.articleChildTags.includes(o.nodeName)).length>=e.articleChildTagsNum)return t;for(let o=0;o{let S=H(L);return S==NodeFilter.FILTER_ACCEPT?dt.mark(L,M,y):S==NodeFilter.FILTER_REJECT,S}),U=E;if(H(U)===NodeFilter.FILTER_REJECT)return;for(dt.mark(U,M,y);U;){if(s=Fm(o,U),c&&c.length>0){let{currentNode:L,isMatchedSelection:S}=k(N,U,c);if(L)U=L;else break;if(!S)continue}if(U.nodeType===Node.ELEMENT_NODE||U.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let L=U;if(L.nodeName==="IFRAME"){O&&O(L),R(),Pm(b,!0),U=N.nextNode();continue}L.nodeType===Node.ELEMENT_NODE&&(l&&Bm(L,l),p&&Im(L,p));let S=Gr(L,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},L.immersiveTranslateComputedStyle||null);if(S&&n.paragraphFirstLetterFontSize>0&&L.childNodes.length==1&&L.childNodes[0].nodeType===Node.TEXT_NODE&&L.innerText?.length==1&&L?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(S=!1),$t(L,u)&&!S){v(L);let q=null;for(;!(q=N.nextSibling())&&N.parentNode(););U=q;continue}let A=Ba(L);if(!J1(b,L)||S){R(L);let q=S?L:L.parentElement;q&&q.childNodes.length>0&&x(b,q,q.immersiveTranslateComputedStyle||null)}A&&L.shadowRoot?.mode==="open"&&(S?O?.(L.shadowRoot):w({..._,container:L.shadowRoot})),L.nodeType===Node.ELEMENT_NODE&&L.nodeName==="PRE"&&m&&ew(L)}else if(U.nodeType===Node.TEXT_NODE)v(U);else throw new Error("should not be here");U=N.nextNode(),b.commonAncestorContainer&&U&&U.parentNode===b.commonAncestorContainer&&(b._currentStacks=[]),b.commonAncestorContainer&&U&&U.nodeType===Node.ELEMENT_NODE&&b._currentStacks.push(U)}function H(L){if(L.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(Ar(L)){if(p){let q=Object.keys(p);if(q.length>0&&$t(L,q))for(let W of q){let V=p[W];if(L.matches(W)){let ue=p[W],ae=Object.keys(ue);for(let X of ae){let ie=ue[X];L.getAttribute(X)!==ie&&(ie===null?L.removeAttribute(X):L.setAttribute(X,ie))}break}}}if(!_.force&&dt.isMarked(L,M)||z3(L,M)||Bl(L,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||L.nodeName==="IFRAME"&&!ko(L))return NodeFilter.FILTER_REJECT;if(L.nodeType===Node.ELEMENT_NODE){let q=window.getComputedStyle(L);if(L.immersiveTranslateComputedStyle=q,Rm(q))return F&&F(L),NodeFilter.FILTER_REJECT;let z=Gr(L,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},q||null);if($t(L,u)&&z)return NodeFilter.FILTER_REJECT}let S=L.getBoundingClientRect(),{width:A,height:j}=S;return L.nodeName==="IMG"&&(A>48&&j>48?L.immersiveTranslateComputedStyle={display:"block"}:A>0&&j>0&&f!==!1&&(L.setAttribute("width",A),L.setAttribute("height",j))),!L.childNodes||L.childNodes&&L.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!b.isPreWhitespace&&(A>0&&A<4||j>0&&j<4)&&(L.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(L.nodeType===Node.TEXT_NODE){let S=L.textContent?.trim();if(!S)return b.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let A=L.parentNode;if(A.getBoundingClientRect){let{width:j,height:q}=A.getBoundingClientRect();if(j>0&&j<4||q>0&&q<4)return NodeFilter.FILTER_REJECT}return g>0&&S.length>=g&&Mm(L,g),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}w(e),b&&b.commonAncestorContainer&&b.flatNodes.length>0&&R();function k(_,E,O){let F=E.immersiveTranslateComputedStyle||null;if(C){if(!C.contains(E))if(h=!1,E&&E.nodeType===Node.ELEMENT_NODE)if(Ml(E,O))h=!0,C=E,R(),x(b,C,F);else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h}}else if(E&&E.nodeType===Node.ELEMENT_NODE)if(Ml(E,O))h=!0,C=E,R(),x(b,C,F);else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};else return h=!1,E=_.nextNode(),{currentNode:E,isMatchedSelection:h};return{currentNode:E,isMatchedSelection:!0}}function R(_){if(_&&_.nodeName==="BR"){b.commonAncestorContainer=_.parentNode;let O=[...b.flatNodes],F=b.flatNodes.filter(M=>_.parentNode?.contains(M));F.length>0&&O.length!=F.length&&(b.flatNodes=F,b.flatNodes.original=O)}let E=Z5(b,a,n);E&&(E.xpath=q3(r,s,E.commonAncestorContainer,o),t&&t(E)),Pm(b)}function v(_){if(!J1(b,_)){R(),Pm(b);let E=_.parentNode;E&&x(b,E,E.computedStyle)}b.flatNodes.push(_)}function x(_,E,O){_.commonAncestorContainer=E;let F=B(O);_.isPreWhitespace=F}function B(_){return _&&_.whiteSpace&&_.whiteSpace.startsWith("pre")||_&&_.whiteSpace==="break-spaces"||!1}}function J1(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=Ba(t));let r=Q5(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function J5(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function X5(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Bm(e,t){if(t){let n=Object.keys(t);if(n.length>0&&$t(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=e.style.cssText||"";i&&(i=i.trim()),i&&!i.endsWith(";")&&(i+=";"),e.style.cssText=i+o;break}}}}function Q5(e){return e&&e._currentStacks?e._currentStacks.some(t=>Ba(t)):!1}function Z5(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(p=>p.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let i=tw(r,a,n);i||(i=a);let s=[];for(let p of r){let f=X5(e,i,p);f&&(s.includes(f)||s.push(f))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],m=u,g=0;for(;m&&(c.push(m),m!==l);){if(g++,g>Y5){P.warn("loop too many times for convert root nodes, break");break}m=m.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:i,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Pm(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Rm(e){return e.display==="none"}var dt={_marked_key:Jf,isMarked(e,t){return Pd(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||Ba(e)))return el(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)dt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||Ba(e)))return ut(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=Lo(e,"markWalk")||"";return ut(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||Ba(e)):!1}};function ew(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function tw(e,t,n){if(!e.length)return null;let r=e.map(a=>{let o=new Set;for(;(a=a.parentNode)&&(o.add(a),a!==t););return o});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(vn(a,n.atomicBlockSelectors))continue;if(r.every(o=>o.has(a)))return a}return null}function Mm(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let o=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((i,s)=>{let u=n.lastIndexOf(s,t);return u>i?u:i},-1);if(o>1){let i=n[o-1]||"",s=n[o-2]||"",u=n[o+1]||"";i==="."||u==="."||u===")"||s==="."&&i==="S"||s.toUpperCase()==="M"&&(i.toUpperCase()==="R"||i.toUpperCase()==="S")?o=-1:isNaN(Number(i))||(o=-1)}if(o===-1)n.length>t+20&&Mm(e,t+20);else{let i=n.slice(o+1);if(!i.trim())return;o++,i.startsWith(" ")&&o++,e.immersive=!0;let s=e.splitText(o);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),o+10)for(let r of n){let a=t[r],o=Object.keys(a),i=Q3(e,[r]);for(let s of i)for(let u of o){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function Q1(e,t,n,r,a,o,i){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),m=e.querySelector(u);if(m)for(let g of c){let p=l[g];if(g==="translate"&&p==="no"){let y=m.innerText||m.textContent||"";if(!y.trim()||nw(m,a,o,i)||!e2(y,n,r))continue}m.getAttribute(g)!==p&&(p===null?m.removeAttribute(g):m.setAttribute(g,p))}}}function Im(e,t){if(t){let n=Object.keys(t);if(n.length>0&&$t(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=t[a],s=Object.keys(i);for(let u of s){let l=i[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function Bl(e,t){return $t(e,t.excludeSelectors||[])?$t(e,t.selectors||[])?!1:!$t(e,t.stayOriginalSelectors||[]):!1}function Ml(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return $t(e,t.concat(n))}function nw(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,o=>o.nodeType===Node.ELEMENT_NODE&&Bl(o,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let o=a.currentNode;if(o.nodeType===Node.TEXT_NODE&&parent){let i=o.textContent||"";if(i.includes("Copyright"))continue;if(Ao(i,t,n))return!0}}return!1}d();d();d();function Z1(e,t,n,r,a){let o=t,i=sh[o]||[],s="";e&&i&&i.length>0&&i.forEach(c=>{let{name:m}=c;if(e&&n&&n[m]){let g=n[m];if(["borderRadius"].includes(m)&&(g+="px"),s+=`--immersive-translate-theme-${o}-${m}: ${g}; `,t==="marker"&&m==="backgroundColor"&&typeof g=="string"){let{r:p,g:f,b:y}=n2(g);s+=`--immersive-translate-theme-${o}-${m}-rgb: ${p}, ${f}, ${y}; `}}}),r||(r="inherit"),e&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5411,9 +5411,9 @@ ${s}} `):t.rule.injectedCss&&(s+=t.rule.injectedCss),t.rule.additionalInjectedCss&&Array.isArray(t.rule.additionalInjectedCss)&&t.rule.additionalInjectedCss.length>0?s+=` `+t.rule.additionalInjectedCss.join(` `):t.rule.additionalInjectedCss&&(s+=` -`+t.rule.additionalInjectedCss)),s&&Cn(e,s,"immersive-translate-dynamic-injected-css")}d();async function eb(){let e="auto",t=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Pe({text:_o(document.body),pageLangs:t})),e}d();d();function tb(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(vu)||Nm(e).catch(o=>{P.error("translateTitle error:",o.name,o.message,o.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var Rl="";async function Nm(e){let t=document.title;if(!t||t.includes(vu))return;Rl!==t&&(Rl=t);let n=await Pe({text:t,pageLangs:[Et(),"en"]});if(!So(e,n))try{let r=await ra({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+vu+Rl)}catch(r){throw r}}function nb(e){e.rule.isTranslateTitle&&(document.title=Rl)}function Jo(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function on(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,o=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(o),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var rw={sanitize:e=>e};function zm(e,t){if(e.interruptEffectDOM)return;let n=on(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Ha.bind(null,e),onFrame:r=>{Um(e,r,!0)},onIgnoreElement:r=>{dt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),mo&&ut(t,"consumeContainer",e.id)}function Um(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!ko(t))return;P.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Ua(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else P.debug("onFrame shadowRoot",t.host),Ua(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ua(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=on(t.ctx),o=0;if(u(t,e,n))return;if(Ar(e)&&s(e)){i(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(Ar(c)&&(r&&Rm(c,r),a&&Om(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(i(c);;){if(l.nextSibling()){let m=l.currentNode;if(dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(m)){i(m);continue}else break}if(!l.parentNode())return}}}catch{}if(o==0&&e instanceof HTMLElement){i(e);return}return t.observeContainers;function i(l){dt.clearMark(l),o++,t.immediateTranslateCapacity>=0?zm(t,l):(mo&&ut(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Um(t,l.shadowRoot,n),!1;if(c==="iframe")return Um(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let m=t.containerRule;if(m.selectors&&m.selectors?.length>0)return Ml(l,m.selectors);if(m.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,m){if(K1(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||m&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let p=on(l.ctx);return!!Bl(c,{excludeSelectors:p.excludeSelectors,selectors:p.selectors,stayOriginalSelectors:p.stayOriginalSelectors})}}function xs(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),o=r.contains(e.targetNodes[0]);if(a&&o)n="dual";else if(a)n="original";else if(o)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(Il(e.rootNodes),ab(e.commonAncestorContainer)),n=="original"&&t=="translation"){let i=jm(e.rootNodes);if(Il(e.rootNodes),rb(i))return;Xo(i,r,e.targetNodes||[]),ab(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let i=e.targetNodes[0];Xo(i,r,e.rootNodes||[]),ob(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let i=jm(e.rootNodes);if(rb(i))return;Xo(i,r,e.targetNodes||[]),ob(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let i=jm(e.targetNodes);Il(e.targetNodes),Xo(i,r,e.rootNodes||[])}n=="dual"&&t=="original"&&Il(e.targetNodes),$m(e)}catch(i){P.error(i)}}}function rb(e){return!e||!Ar(e)?!1:e.classList.contains(yt)}function ab(e){if(!Ar(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ob(e){if(!Ar(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Lo(r,"immersiveTranslateClassBak");el(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function jm(e){return e?e[e.length-1].nextSibling:null}function Il(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function Xo(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var aw=bi(Ol,300);async function Ha(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||ow(t.rootNodes)||t.stepState>=2)return;t.stepState=2,mo&&ut(a,"onParseParagraph",e.id);let{ctx:o}=e,{rule:i}=o,s=Ra(o),u=Cl(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:dw(o)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=o?.config?.translationLanguagePattern?.excludeMatches||[],c=await Wm(o,t,{excludeLanguages:n?[]:l,targetLanguage:o.targetLanguage,noTranslateRegexp:o.rule.noTranslateRegexp,delimiters:ur(o.config.translationServices[o.translationService]),minTextCount:n||o.state.translationArea==="body"?3:i.paragraphMinTextCount,minWordCount:i.paragraphMinWordCount,isDetectParagraphLanguage:i.detectParagraphLanguage||o.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:o.rule.ignoreZhCNandZhTW});if(c){if(P.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),iw(e,t.text),qm(e,t,r)):(mo&&ut(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function ow(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?Ar(t)&&t.classList.contains(yt):!1}function iw(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function qm(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),mo&&ut(t.commonAncestorContainer,"consumeParagraph",e.id),ut(t.commonAncestorContainer,Xf,"1",!0),n=="hover"){Ol.call(e,e.ctx);return}aw.call(e,e.ctx)}async function Ol(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Ze(r,t,(a,o,i)=>{let s=i.id,u=sw(e,s.toString());u&&uw.call(null,a,o,i,u,t,n)})}catch(a){P.error("translateCurrentQueue error",a);return}}function sw(e,t){return e.find(n=>n.id===t)}function uw(e,t,n,r,a,o){let i=!1,s=r;if(wo(s.commonAncestorContainer,n.id)?.remove(),$m(r),s&&(e||!t)){e||(P.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,th,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let m=r.rootNodes[r.rootNodes.length-1].nextSibling;if(Xo(m,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let g=lw(a,e).replaceAll(` +`+t.rule.additionalInjectedCss)),s&&Cn(e,s,"immersive-translate-dynamic-injected-css")}d();async function eb(){let e="auto",t=[ht(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Pe({text:_o(document.body),pageLangs:t})),e}d();d();function tb(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(vu)||Om(e).catch(o=>{P.error("translateTitle error:",o.name,o.message,o.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var Rl="";async function Om(e){let t=document.title;if(!t||t.includes(vu))return;Rl!==t&&(Rl=t);let n=await Pe({text:t,pageLangs:[Et(),"en"]});if(!So(e,n))try{let r=await ra({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+vu+Rl)}catch(r){throw r}}function nb(e){e.rule.isTranslateTitle&&(document.title=Rl)}function Jo(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function on(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,o=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(o),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var rw={sanitize:e=>e};function Hm(e,t){if(e.interruptEffectDOM)return;let n=on(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Ha.bind(null,e),onFrame:r=>{jm(e,r,!0)},onIgnoreElement:r=>{dt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),mo&&ut(t,"consumeContainer",e.id)}function jm(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!ko(t))return;P.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Ua(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else P.debug("onFrame shadowRoot",t.host),Ua(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ua(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=on(t.ctx),o=0;if(u(t,e,n))return;if(Ar(e)&&s(e)){i(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(Ar(c)&&(r&&Bm(c,r),a&&Im(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(i(c);;){if(l.nextSibling()){let m=l.currentNode;if(dt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(m)){i(m);continue}else break}if(!l.parentNode())return}}}catch{}if(o==0&&e instanceof HTMLElement){i(e);return}return t.observeContainers;function i(l){dt.clearMark(l),o++,t.immediateTranslateCapacity>=0?Hm(t,l):(mo&&ut(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return jm(t,l.shadowRoot,n),!1;if(c==="iframe")return jm(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let m=t.containerRule;if(m.selectors&&m.selectors?.length>0)return Ml(l,m.selectors);if(m.pageHeight){let g=l.scrollHeight;if(g>0&&g0)return!0}return!1}function u(l,c,m){if(K1(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||m&&dt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let p=on(l.ctx);return!!Bl(c,{excludeSelectors:p.excludeSelectors,selectors:p.selectors,stayOriginalSelectors:p.stayOriginalSelectors})}}function Ts(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!dt.isSkipMarkEle(r)&&!dt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),o=r.contains(e.targetNodes[0]);if(a&&o)n="dual";else if(a)n="original";else if(o)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(Il(e.rootNodes),ab(e.commonAncestorContainer)),n=="original"&&t=="translation"){let i=Nm(e.rootNodes);if(Il(e.rootNodes),rb(i))return;Xo(i,r,e.targetNodes||[]),ab(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let i=e.targetNodes[0];Xo(i,r,e.rootNodes||[]),ob(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let i=Nm(e.rootNodes);if(rb(i))return;Xo(i,r,e.targetNodes||[]),ob(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let i=Nm(e.targetNodes);Il(e.targetNodes),Xo(i,r,e.rootNodes||[])}n=="dual"&&t=="original"&&Il(e.targetNodes),Wm(e)}catch(i){P.error(i)}}}function rb(e){return!e||!Ar(e)?!1:e.classList.contains(yt)}function ab(e){if(!Ar(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{ut(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function ob(e){if(!Ar(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Lo(r,"immersiveTranslateClassBak");el(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Nm(e){return e?e[e.length-1].nextSibling:null}function Il(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function Xo(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var aw=yi(Ol,300);async function Ha(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||ow(t.rootNodes)||t.stepState>=2)return;t.stepState=2,mo&&ut(a,"onParseParagraph",e.id);let{ctx:o}=e,{rule:i}=o,s=Ra(o),u=Cl(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:dw(o)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=o?.config?.translationLanguagePattern?.excludeMatches||[],c=await qm(o,t,{excludeLanguages:n?[]:l,targetLanguage:o.targetLanguage,noTranslateRegexp:o.rule.noTranslateRegexp,delimiters:ur(o.config.translationServices[o.translationService]),minTextCount:n||o.state.translationArea==="body"?3:i.paragraphMinTextCount,minWordCount:i.paragraphMinWordCount,isDetectParagraphLanguage:i.detectParagraphLanguage||o.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:o.rule.ignoreZhCNandZhTW});if(c){if(P.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),iw(e,t.text),zm(e,t,r)):(mo&&ut(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function ow(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?Ar(t)&&t.classList.contains(yt):!1}function iw(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function zm(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),mo&&ut(t.commonAncestorContainer,"consumeParagraph",e.id),ut(t.commonAncestorContainer,Xf,"1",!0),n=="hover"){Ol.call(e,e.ctx);return}aw.call(e,e.ctx)}async function Ol(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await Je(r,t,(a,o,i)=>{let s=i.id,u=sw(e,s.toString());u&&uw.call(null,a,o,i,u,t,n)})}catch(a){P.error("translateCurrentQueue error",a);return}}function sw(e,t){return e.find(n=>n.id===t)}function uw(e,t,n,r,a,o){let i=!1,s=r;if(wo(s.commonAncestorContainer,n.id)?.remove(),Wm(r),s&&(e||!t)){e||(P.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);ut(c,th,l.toString()),c.classList.add("notranslate",yt,yt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let m=r.rootNodes[r.rootNodes.length-1].nextSibling;if(Xo(m,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let g=lw(a,e).replaceAll(` `,"").replaceAll('"',"""),p=e.message.replaceAll(` -`,"").replaceAll('"',"""),f=sr(Rt,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=sr(Rt,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+p,b=sr(Rt,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=sr(Rt,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${J}-error notranslate"> +`,"").replaceAll('"',"""),f=sr(It,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=sr(It,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+p,b=sr(It,"error.retry",a.config.interfaceLanguage,"zh-CN"),h=sr(It,"error.reason",a.config.interfaceLanguage,"zh-CN"),C=`<${u.targetWrapperTag} class="${J}-error notranslate"> <${u.targetWrapperTag} class="${J}-error-wrapper"> @@ -5428,17 +5428,17 @@ ${s}} ${h} - `;c.innerHTML=Ge.sanitize(C)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=Q2(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",yt),Jo(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(ar,"1");let m=rw.sanitize(l);c.innerHTML=m,r.targetNodes=[c],xs(r,o)}i=!0}else P.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:i}})}))}async function Wm(e,t,n){let{text:r}=t,a=await Pe({text:r||"",minLength:15,pageLangs:[Et(),"en"],translateService:e.translationService}),{targetLanguage:o}=n;if(!os({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=sl();n.isDetectParagraphLanguage&&(u="auto");let l=Et(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!Su.includes(e.translationService)&&(Ee()||nt())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let m=u!=="auto"?u:c;return Wr(m,o,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(f=>Wr(m,f,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Ts(){Hm=0}var Hm=0;function lw(e,t){Hm+=1;let n=t.message;if(t instanceof K){let r=t.uiConfig(e);if(n=JSON.stringify(r),Hm!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(_a,{detail:r}))}return n}function $m(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,cw(t,`[${Qf}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function cw(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function dw(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}d();var mw=[];function ib(e){mw.push(e)}d();var Gm;function sb(e){let t=e.ctx.rule.aiRule;if(P.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=on(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(o=>{vs(e,o,t,r)}),Gm=new MutationObserver(o=>{o.forEach(function(i){for(let s of o)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&vn(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||Km(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&vs(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!Gr(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=Do(r,u.parentElement);c&&(dt.clearToParentMark(u,c),vs(e,c,t,r));continue}vs(e,u,t,r)}catch(u){P.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(i=>{dt.isMarked(i,e.id)||vs(e,i,t,r)})}),Gm.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function vs(e,t,n,r,a=!1){let o=t.closest(n.messageWrapperSelector);if(!o)return;let i=t;for(;i!=o;)clearTimeout(i.timer),i=i.parentElement;clearTimeout(o.timer);let s=t;s.timer=setTimeout(()=>{a&&Vm(t),_r({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Ha(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function ub(){Gm?.disconnect()}d();d();d();d();d();d();var Qo={},pw={root:"",lang:"en",fallbackLang:"en"};function Ym(e,t){let n=Object.assign({},pw,e);Qo=t||Qo;let[r,a]=se(n.lang),[o,i]=se(Qo),[s,u]=se(!1),l=m=>{if(o.hasOwnProperty(m))return;u(!1);let g=$h(n.root||"",m);n.getUrl&&(g=n.getUrl(n.root||"",m),fetch(g).then(p=>p.json()).then(p=>{Qo[m]=p,i({...Qo}),u(!0)}).catch(p=>{i({...Qo}),u(!0)}))};return De(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(m,g)=>{if(!o.hasOwnProperty(r))return m;let p=$i(o,r,m);return p===m&&r!==n.fallbackLang&&(p=$i(o,n.fallbackLang,m)),cd(p,g)},isReady:s}}d();d();var gw=0;function D(e,t,n,r,a){var o,i,s={};for(i in t)i=="ref"?o=t[i]:s[i]=t[i];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gw,__source:a,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(i in o)s[i]===void 0&&(s[i]=o[i]);return Le.vnode&&Le.vnode(u),u}var Xm=Co(null),Jm={root:"assets",lang:"en",fallbackLang:"en"},jl=e=>{let{t,setLang:n,lang:r,isReady:a}=Ym({root:e.root||Jm.root,lang:e.lang||Jm.lang,fallbackLang:e.fallbackLang||Jm.fallbackLang,getUrl:e.getUrl},e.translations);return D(Xm.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function ve(){return Ju(Xm)}d();function Ul({parent:e,ctx:t,Component:n,props:r={},style:a="",id:o,initialCSS:i=!0}){let s=o||J+n.name;e.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,i&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&Cn(l,a),e.appendChild(u),vo(D(jl,{lang:t.config.interfaceLanguage,fallbackLang:"zh-CN",translations:Rt,children:D(n,{...r})}),l)}d();d();d();function Zo(e){return aa(e).subtitles}function aa(e){let t=[],n=e.split(/\r?\n/),r={},a=-1;return n.forEach((o,i)=>{let s=o.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${cp.htmlEncode(o.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`${n}`,r},Xw=e=>/]*>[\s\S]*]*>/.test(e),Ub=Ht({name:jb,build:Jw,detect:Xw,helper:cp,parse:Yw});d();var Qw="srt",Ds={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Zw=(e,t)=>{let n=[],r=t.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${t.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${cp.htmlEncode(o.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`
${n}`,r},Xw=e=>/]*>[\s\S]*]*>/.test(e),Ub=zt({name:jb,build:Jw,detect:Xw,helper:cp,parse:Yw});d();var Qw="srt",Ds={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},Zw=(e,t)=>{let n=[],r=t.eol||`\r `,a=e.split(/\r?\n\s*\n/g);for(let o=0;o\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[o]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Ds.toMilliseconds(s[2]),u.end=Ds.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}t.verbose}return n},e8=(e,t)=>{let n="",r=t.eol||`\r -`;for(let a=0;a ${Ds.toTimeString(o.end)}${r}`,n+=o.text+r,n+=r;continue}t.verbose}return n},t8=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),Hb=Ht({name:Qw,build:e8,detect:t8,helper:Ds,parse:Zw});d();var n8="sub",dp=25,r8=(e,t)=>{t.fps||=dp;let n=t.fps>0?t.fps:dp,r=[],a=t.eol||`\r +`;for(let a=0;a ${Ds.toTimeString(o.end)}${r}`,n+=o.text+r,n+=r;continue}t.verbose}return n},t8=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),Hb=zt({name:Qw,build:e8,detect:t8,helper:Ds,parse:Zw});d();var n8="sub",dp=25,r8=(e,t)=>{t.fps||=dp;let n=t.fps>0?t.fps:dp,r=[],a=t.eol||`\r `,o=e.split(/\r?\n/g);for(let i=0;i{let n=(t.fps||0)>0?t.fps:dp,r="",a=t.eol||`\r -`;for(let o=0;o=0?i.frame.start:i.start*n,u=typeof i.frame=="object"&&i.frame.end>=0?i.frame.end:i.end*n,l=i.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},o8=e=>/^\{\d+\}\{\d+\}.*/.test(e),zb=Ht({name:n8,build:a8,detect:o8,parse:r8});d();var i8="vtt",As={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},s8=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let o=0;o\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[o]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=As.toMilliseconds(s[2]),l.end=As.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[o])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[o]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},u8=(e,t)=>{let n=t.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${As.toTimeString(o.end)}${n}`,r+=o.text+n,r+=n;continue}t.verbose}return r},l8=e=>/^\s*WEBVTT\r?\n/.test(e),qb=Ht({name:i8,build:u8,detect:l8,helper:As,parse:s8});var c8={vtt:qb,lrc:Ob,smi:Ub,ssa:Bb,ass:Rb,sub:zb,srt:Hb,sbv:Nb,json:Ib},Wb=c8;var d8=e=>JSON.parse(JSON.stringify(e)),mp=class{format=Wb;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof o.detect!="function")continue;let i=o.detect(t);if(i===!0||i===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.parse;if(typeof o!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return o(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.build;if(typeof o!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return o(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},o=this.parse(t,a);r.resync&&(o=this.resync(o,r.resync));let i={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(o,i)};resync=(t,n={})=>{let r,a,o=!1,i;if(typeof n=="function")r=n;else if(typeof n=="number")i=n,r=u=>[u[0]+i,u[1]+i];else if(typeof n=="object")i=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,o=n.frame||!1,r=u=>[Math.round(u[0]*a+i),Math.round(u[1]*a+i)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),i=await Pe({text:o.map(c=>c.text).join(` -`),pageLangs:[ht(),"en"]});if(at(ye(i),this.ctx.targetLanguage))return null;Ne(this.ctx,ye(i));let s=o.map(c=>c.text),u=await this._translateSubtitle(s,i);return o.forEach((c,m)=>{c.text=u[m]}),ks.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return P.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};d();var i0=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:o}=this.parseFromXml(r),i=await Pe({text:o.map(u=>u.textContent).join(` -`),pageLangs:[ht(),"en"]});return at(ye(i),this.ctx.targetLanguage)?null:(Ne(this.ctx,ye(i)),(await this._translateSubtitle(o.map(u=>u.textContent||""),ye(i))).forEach((u,l)=>{o[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return P.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var s0=class extends je{hasSubtitle=!1;async mutationVideoChange(){let t=m8(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let o=new URL(a.getAttribute("src")||"");o.searchParams.set("code",t),a.setAttribute("src",o.toString());return}let r=await this.fetchSubtitle(t);r&&(Ne(this.ctx,"ja","av"),this.hasSubtitle=!0,Lr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await ce({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return ks.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){P.error("fetchSubtitle",n);return}}};function m8(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var p8={youtube:$l,netflix:Gl,webvtt:ei,khanacademy:Vl,bilibili:Kl,udemy:Yl,hulu:n0,text_track:ia,text_track_dynamic:ni,general:Jl,live:ti,ebutt:Zl,disneyplus:e0,"fmp4.xml":t0,multi_attach_vtt:r0,twitter:a0,subsrt:o0,xml:i0,av:s0},u0;function Gb(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=p8[t.type];if(!n)return;u0=new n(e)}catch(t){P.error(t)}}async function pp(){u0?.onPageStatusChange()}async function g8(e,t){if(u0?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&Ue())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),rt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function f8(){u0?.onTranslationModeChanged()}k2({autoEnableSubtitleChanged:g8,reloadSubtitleWithTranslationModeChanged:f8});var me=null;function _s(){return me||null}function ri(e){h8(e),C8(e),x8(e),v8(e),Yo(document,e),gn("Translated"),T8(me),E8(me),ib(Wa),b8(me),pp(),F8()}function h8(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=on(e);Q1(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}Jo(e)&&ut(document.documentElement,ge+"_rtl",e.targetLanguage)}function b8(e){sb(e)}function y8(){ub()}function E8(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=V1(e.ctx);if(P.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Ua(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(o=>{Ua(o,e)})}async function x8(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Qt(),n=Date.now(),a=new URL(e.url).hostname,o=t.tempTranslationUrlMatches||[],i=o.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;i>-1||(o.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Zt({...t,tempTranslationUrlMatches:[...o]})}}function T8(e){e.ctx.rule.isTranslateTitle&&(Nm(e.ctx),e.titleDynamicObserver=tb(e.ctx))}function v8(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function gp(e){if(!me)return;let t=on(e);me.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},me.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},me.translationService=e.translationService,me.urlChangeDelay=e.rule.urlChangeDelay,me.immediateTranslateCapacity=e.state.immediateTranslationTextCount,me.translateState=e.state.translationMode||e.config.translationMode||"dual"}function C8(e){let t=Zi();me&&(t=me.id),me=me||{},me.ctx=e,me.id=t,me.paragraphQueue=me.paragraphQueue||[],gp(e),me.currentUrl=window.location.href,me.paragraphEntities=me.paragraphEntities||{},me.autoIncreaseParagraphId=me.autoIncreaseParagraphId||1,me.interruptEffectDOM=!1,me.observeContainers=me.observeContainers||[],me.observeParagraphs=me.observeParagraphs||[],me.dynamicContainerObserver=me.dynamicContainerObserver||_8(me),me.ignoreResizeObserver=me.ignoreResizeObserver||L8(me),me.containerVisibleObserver=me.containerVisibleObserver||D8(me),me.paragraphVisibleObserver=me.paragraphVisibleObserver||A8(me),me.injectCssToDocument=l0,me.walkContainer=_r,me.allInlineWindows=[window],window.onerror=w8(me,e),window.immersiveTranslateSwitchTranslateState=hp.bind(me)}function Jb(e,t){t.getRootNode()instanceof ShadowRoot?l0(t.getRootNode(),e):l0(t.ownerDocument,e),S8(e)}function S8(e){me||(me={},me.ctx=e,me.id=Zi(),fp(me,e))}function fp(e,t){e.paragraphQueue=[],e.injectCssToDocument=l0;let n=on(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=hp.bind(e),e}function Wa(e=!0){me&&(gn("Original"),pp(),y8(),Ts(),me.interruptEffectDOM=!0,me.ignoreResizeObserver?.disconnect(),me.dynamicContainerObserver?.disconnect(),me.containerVisibleObserver?.disconnect(),me.paragraphVisibleObserver?.disconnect(),me.titleDynamicObserver?.disconnect(),nb(me.ctx),j3(),U3(),e&&hp.call(me,"original"),Object.values(me.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),me=null)}function w8(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,o=!1;return a?.indexOf("Minified React error")>=0&&(o=!0),o&&(clearTimeout(n),Wa(),n=setTimeout(()=>{ri(t)},e.urlChangeDelay||2e3)),!0}}function D8(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(zm(e,r.target),n.unobserve(r.target))})})}function A8(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(i=>{qm(e,i)}),n.unobserve(a)}})})}var Vb;function k8(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(Vb),e.translateState=="original"?!1:(Wa(e.urlChangeDelay>20),Vb=setTimeout(()=>{let a=e.ctx;ri(a)},e.urlChangeDelay),!0)):!1}function _8(e){let t=e.ctx.rule,n=on(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&k8(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!vn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&vn(a.target,t.mutationExcludeSelectors))continue;let o=a.target;if(a.type=="characterData"){let u=o.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Cu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&Kb(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&Km(a))continue;if(o.recordLength){o.recordLength!==o.innerHTML.length&&Kb(e,n,o);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!Gr(o,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(o))){let u=Do(n,o.parentElement);u&&(dt.clearToParentMark(o,u),Yb(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||Wt(u,[...e.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:o.contains(u)).length&&Yb(e,a.target)}catch(o){P.error(o)}}})}function Kb(e,t,n){let r=e.ctx.rule;for(let i of r.mutationExcludeContainsSelectors)if(n.querySelector(i))return;if(Wt(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,o=n;clearTimeout(o.timer),o.timer=setTimeout(()=>{Vm(n),_r({id:e.id,container:n,filterRule:t,force:!0,onParagraph:i=>{Ha(e,i,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),o.timer=null},a)}function Yb(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,o=t;dt.clearMark(o),clearTimeout(o.timer),o.timer=setTimeout(()=>{Ua(t,e,n),o.timer=null},a)}function Vm(e){e.paragraphs=[],dt.clearMark(e),e.querySelectorAll("."+yt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,dt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function Km(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||Wt(n,["."+yt]))).length==0}function L8(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,o=globalThis.getComputedStyle(a);Im(o)||(n.unobserve(r.target),dt.clearMark(a),Ua(a,e))}})}function hp(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{xs(t,e)}),e=="original"&&document.querySelectorAll(`.${yt}`).forEach(t=>t.remove())}function l0(e,t){if(e instanceof HTMLIFrameElement){Yo(e.contentDocument,t);return}Yo(e,t)}async function Xb(e){let t=Ue(),n="auto";if(Ee()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Bd(e.mainFrame),n=await Pe({text:r,pageLangs:["en"]})):(r=_o(e.mainFrame).slice(0,1e3),n=await Pe({text:r,pageLangs:[ht(),"en"]}))}else if(t)n=await Pe({text:_o(e.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Bd(e.mainFrame),n=await Pe({text:r,pageLangs:["en"]})}else n=await F2();return n==="auto"&&(n=await eb()),g2(n),n}async function Qb(){if(!me)return;Ts(),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=me.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){me.paragraphQueue.push(n);let o=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);o&&o.remove()}}Ol.call(me,me.ctx)}async function bp(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),rt("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Et()});let r=me?.ctx||t,a=await Qt(),o=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(p=>{[...o?.querySelectorAll(p),...s?.querySelectorAll(p)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?$3():"",m="";globalThis.document.documentElement.getAttributeNames().forEach(p=>{m+=`${p}="${globalThis.document.documentElement.getAttribute(p)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(p=>{g+=`${p}="${globalThis.document.body.getAttribute(p)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let o=0;o=0?i.frame.start:i.start*n,u=typeof i.frame=="object"&&i.frame.end>=0?i.frame.end:i.end*n,l=i.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},o8=e=>/^\{\d+\}\{\d+\}.*/.test(e),zb=zt({name:n8,build:a8,detect:o8,parse:r8});d();var i8="vtt",As={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},s8=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let o=0;o\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[o]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=As.toMilliseconds(s[2]),l.end=As.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[o])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[o]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},u8=(e,t)=>{let n=t.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${As.toTimeString(o.end)}${n}`,r+=o.text+n,r+=n;continue}t.verbose}return r},l8=e=>/^\s*WEBVTT\r?\n/.test(e),qb=zt({name:i8,build:u8,detect:l8,helper:As,parse:s8});var c8={vtt:qb,lrc:Ob,smi:Ub,ssa:Bb,ass:Rb,sub:zb,srt:Hb,sbv:Nb,json:Ib},Wb=c8;var d8=e=>JSON.parse(JSON.stringify(e)),mp=class{format=Wb;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof o.detect!="function")continue;let i=o.detect(t);if(i===!0||i===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.parse;if(typeof o!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return o(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.build;if(typeof o!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return o(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},o=this.parse(t,a);r.resync&&(o=this.resync(o,r.resync));let i={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(o,i)};resync=(t,n={})=>{let r,a,o=!1,i;if(typeof n=="function")r=n;else if(typeof n=="number")i=n,r=u=>[u[0]+i,u[1]+i];else if(typeof n=="object")i=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,o=n.frame||!1,r=u=>[Math.round(u[0]*a+i),Math.round(u[1]*a+i)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),i=await Pe({text:o.map(c=>c.text).join(` +`),pageLangs:[ht(),"en"]});if(et(he(i),this.ctx.targetLanguage))return null;Ne(this.ctx,he(i));let s=o.map(c=>c.text),u=await this._translateSubtitle(s,i);return o.forEach((c,m)=>{c.text=u[m]}),ks.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return P.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};d();var o0=class extends je{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:o}=this.parseFromXml(r),i=await Pe({text:o.map(u=>u.textContent).join(` +`),pageLangs:[ht(),"en"]});return et(he(i),this.ctx.targetLanguage)?null:(Ne(this.ctx,he(i)),(await this._translateSubtitle(o.map(u=>u.textContent||""),he(i))).forEach((u,l)=>{o[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return P.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};d();var i0=class extends je{hasSubtitle=!1;async mutationVideoChange(){let t=m8(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let o=new URL(a.getAttribute("src")||"");o.searchParams.set("code",t),a.setAttribute("src",o.toString());return}let r=await this.fetchSubtitle(t);r&&(Ne(this.ctx,"ja","av"),this.hasSubtitle=!0,Lr(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await ce({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return ks.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){P.error("fetchSubtitle",n);return}}};function m8(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var p8={youtube:Wl,netflix:$l,webvtt:ti,khanacademy:Gl,bilibili:Vl,udemy:Kl,hulu:t0,text_track:ia,text_track_dynamic:ri,general:Yl,live:ni,ebutt:Ql,disneyplus:Zl,"fmp4.xml":e0,multi_attach_vtt:n0,twitter:r0,subsrt:a0,xml:o0,av:i0},s0;function Gb(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=p8[t.type];if(!n)return;s0=new n(e)}catch(t){P.error(t)}}async function pp(){s0?.onPageStatusChange()}async function g8(e,t){if(s0?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&Ue())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),at("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function f8(){s0?.onTranslationModeChanged()}k2({autoEnableSubtitleChanged:g8,reloadSubtitleWithTranslationModeChanged:f8});var me=null;function _s(){return me||null}function ai(e){h8(e),C8(e),x8(e),v8(e),Yo(document,e),gn("Translated"),T8(me),E8(me),ib(Wa),b8(me),pp(),F8()}function h8(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=on(e);Q1(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}Jo(e)&&ut(document.documentElement,ge+"_rtl",e.targetLanguage)}function b8(e){sb(e)}function y8(){ub()}function E8(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=V1(e.ctx);if(P.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Ua(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(o=>{Ua(o,e)})}async function x8(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await Qt(),n=Date.now(),a=new URL(e.url).hostname,o=t.tempTranslationUrlMatches||[],i=o.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;i>-1||(o.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Zt({...t,tempTranslationUrlMatches:[...o]})}}function T8(e){e.ctx.rule.isTranslateTitle&&(Om(e.ctx),e.titleDynamicObserver=tb(e.ctx))}function v8(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function gp(e){if(!me)return;let t=on(e);me.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},me.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},me.translationService=e.translationService,me.urlChangeDelay=e.rule.urlChangeDelay,me.immediateTranslateCapacity=e.state.immediateTranslationTextCount,me.translateState=e.state.translationMode||e.config.translationMode||"dual"}function C8(e){let t=es();me&&(t=me.id),me=me||{},me.ctx=e,me.id=t,me.paragraphQueue=me.paragraphQueue||[],gp(e),me.currentUrl=window.location.href,me.paragraphEntities=me.paragraphEntities||{},me.autoIncreaseParagraphId=me.autoIncreaseParagraphId||1,me.interruptEffectDOM=!1,me.observeContainers=me.observeContainers||[],me.observeParagraphs=me.observeParagraphs||[],me.dynamicContainerObserver=me.dynamicContainerObserver||_8(me),me.ignoreResizeObserver=me.ignoreResizeObserver||L8(me),me.containerVisibleObserver=me.containerVisibleObserver||D8(me),me.paragraphVisibleObserver=me.paragraphVisibleObserver||A8(me),me.injectCssToDocument=u0,me.walkContainer=_r,me.allInlineWindows=[window],window.onerror=w8(me,e),window.immersiveTranslateSwitchTranslateState=hp.bind(me)}function Jb(e,t){t.getRootNode()instanceof ShadowRoot?u0(t.getRootNode(),e):u0(t.ownerDocument,e),S8(e)}function S8(e){me||(me={},me.ctx=e,me.id=es(),fp(me,e))}function fp(e,t){e.paragraphQueue=[],e.injectCssToDocument=u0;let n=on(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=hp.bind(e),e}function Wa(e=!0){me&&(gn("Original"),pp(),y8(),vs(),me.interruptEffectDOM=!0,me.ignoreResizeObserver?.disconnect(),me.dynamicContainerObserver?.disconnect(),me.containerVisibleObserver?.disconnect(),me.paragraphVisibleObserver?.disconnect(),me.titleDynamicObserver?.disconnect(),nb(me.ctx),j3(),U3(),e&&hp.call(me,"original"),Object.values(me.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),me=null)}function w8(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,o=!1;return a?.indexOf("Minified React error")>=0&&(o=!0),o&&(clearTimeout(n),Wa(),n=setTimeout(()=>{ai(t)},e.urlChangeDelay||2e3)),!0}}function D8(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(Hm(e,r.target),n.unobserve(r.target))})})}function A8(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(i=>{zm(e,i)}),n.unobserve(a)}})})}var Vb;function k8(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(Vb),e.translateState=="original"?!1:(Wa(e.urlChangeDelay>20),Vb=setTimeout(()=>{let a=e.ctx;ai(a)},e.urlChangeDelay),!0)):!1}function _8(e){let t=e.ctx.rule,n=on(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&k8(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!vn(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&vn(a.target,t.mutationExcludeSelectors))continue;let o=a.target;if(a.type=="characterData"){let u=o.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Cu)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&Kb(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&Vm(a))continue;if(o.recordLength){o.recordLength!==o.innerHTML.length&&Kb(e,n,o);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!dt.isSkipMarkEle(a.target)&&!dt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!Gr(o,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(o))){let u=Do(n,o.parentElement);u&&(dt.clearToParentMark(o,u),Yb(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||$t(u,[...e.ctx.rule.mutationExcludeSelectors,"."+yt])?!1:o.contains(u)).length&&Yb(e,a.target)}catch(o){P.error(o)}}})}function Kb(e,t,n){let r=e.ctx.rule;for(let i of r.mutationExcludeContainsSelectors)if(n.querySelector(i))return;if($t(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,o=n;clearTimeout(o.timer),o.timer=setTimeout(()=>{Gm(n),_r({id:e.id,container:n,filterRule:t,force:!0,onParagraph:i=>{Ha(e,i,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),o.timer=null},a)}function Yb(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,o=t;dt.clearMark(o),clearTimeout(o.timer),o.timer=setTimeout(()=>{Ua(t,e,n),o.timer=null},a)}function Gm(e){e.paragraphs=[],dt.clearMark(e),e.querySelectorAll("."+yt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,dt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function Vm(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||$t(n,["."+yt]))).length==0}function L8(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,o=globalThis.getComputedStyle(a);Rm(o)||(n.unobserve(r.target),dt.clearMark(a),Ua(a,e))}})}function hp(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Ts(t,e)}),e=="original"&&document.querySelectorAll(`.${yt}`).forEach(t=>t.remove())}function u0(e,t){if(e instanceof HTMLIFrameElement){Yo(e.contentDocument,t);return}Yo(e,t)}async function Xb(e){let t=Ue(),n="auto";if(Ee()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=Md(e.mainFrame),n=await Pe({text:r,pageLangs:["en"]})):(r=_o(e.mainFrame).slice(0,1e3),n=await Pe({text:r,pageLangs:[ht(),"en"]}))}else if(t)n=await Pe({text:_o(e.mainFrame).slice(0,1e3),pageLangs:[ht(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=Md(e.mainFrame),n=await Pe({text:r,pageLangs:["en"]})}else n=await F2();return n==="auto"&&(n=await eb()),g2(n),n}async function Qb(){if(!me)return;vs(),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=me.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){me.paragraphQueue.push(n);let o=r.commonAncestorContainer.querySelector(`[${xu}='${n}']`);o&&o.remove()}}Ol.call(me,me.ctx)}async function bp(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),at("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Et()});let r=me?.ctx||t,a=await Qt(),o=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(p=>{[...o?.querySelectorAll(p),...s?.querySelectorAll(p)].forEach(f=>{f.nodeName.toLowerCase()=="script"&&f.type=="application/ld+json"||f.remove()})});let c=u.injectCss?$3():"",m="";globalThis.document.documentElement.getAttributeNames().forEach(p=>{m+=`${p}="${globalThis.document.documentElement.getAttribute(p)}" `});let g="";globalThis.document.body.getAttributeNames().forEach(p=>{g+=`${p}="${globalThis.document.body.getAttribute(p)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${o.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Zt(a);let f=Ce().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let b=new URL(f);b.pathname=y.shareConfig.sharePath,f=b.toString()}Uo(f)}catch(p){P.error(p)}}async function Zb(){let e=await Qt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Vf,{detail:JSON.stringify(e.draft)}))}async function F8(){try{if(await Uu("reportActive"))return;P.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await kd();await ce({url:Hi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),Xi("reportActive","1")}catch(e){P.error(e)}}d();d();var ey={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},ty={...Rt,"zh-CN":{...ey["zh-CN"],...Rt["zh-CN"]},"zh-TW":{...ey["zh-TW"],...Rt["zh-TW"]}},ny=ty;function ai(e,t,n){return sr(ty,e,t,or,n)}var sa=(e,t,n,r)=>{let a=uh[e]||e,o=lh[e],i=ch[e],s={"zh-CN":o,"zh-TW":i,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};d();function yp(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((o,i)=>(o[t[i]]=i,o),{}),a=Object.keys(r);for(let o of a){let i=o.replace(/MacCtrl/ig,"Ctrl");i&&xn(i,s=>{s.preventDefault();let u=r[o];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var ry=`${J}-float-ball`;function ua(e){return e.type=="logo"?D("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${ry}-logo-img`,children:[D("path",{fill:"none",d:"M0 0h24v24H0z"}),D("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?D("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D("g",{"clip-path":"url(#clip0_2589_9951)",children:D("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),D("defs",{children:D("clipPath",{id:"clip0_2589_9951",children:D("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?D("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?D("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?D("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${ry}-translated-img`,children:[D("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),D("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?D("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function ay(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},o=Object.keys(n);for(let l of o){let m=n[l].matches;for(let g of m)a[g]||(a[g]=[]),a[g].push(l)}let i=a[e];if(i&&i.length>0)for(let l of i)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(m=>m!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}d();d();function oy(e,t=2e3){return n=>{let r,a=0;return o=>{++a==e&&(n(o),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}d();var c0="DROP_DOWN_DEFAULT_VALUE";function Ep(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:o,style:i}=e;r=r||"",t=t??!0,o=o||80;let s=We(null);return D("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:c0,style:{maxWidth:`${o}px`,...i},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==c0){s.current.value=c0,s.current?.dispatchEvent(new Event("change"));let c=a.find(m=>m.value===l);c&&n(c)}},children:[{value:c0,label:e.label}].concat(a).map((u,l)=>D("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function oi(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var P8=({date:e})=>{let{t}=ve(),[n,r]=se(!1);return De(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:D("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},M8=({minVersion:e})=>{let{t}=ve();return D("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},B8=()=>{let{t:e}=ve();return D("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},R8=({message:e,handleSyncing:t,date:n})=>{let{t:r}=ve();return D("p",{class:"text-sm",children:[r("failToSyncRules")," ",D("a",{onClick:t,children:r("retry")}),D("br",{}),r("failedReason"),"\uFF1A",e,D("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function xp(e){let{isShowError:t,request:n}=e,[r,a]=se(null),{t:o}=ve(),[i,s]=se(null),[u,l]=se(null),[c,m]=se(""),[g,p]=se(!1),[f,y]=se(!1),[b,h]=se(!1),[C,w]=se(null),[k,R]=se(null),v=Xt(),x=async()=>{m("");let B=i;if(i===null)try{let _=await n({url:Oi});_?(s(_),B=_,p(!0)):(m(o("unknownError")),l(null))}catch(_){l(null),m(_.message);return}B!==null?(e.setStorageBuildinConfig(B),l(!1),a(B.buildinConfigUpdatedAt)):(m(o("canNotFetchRemoteRule")),l(null))};return De(()=>{pn().then(B=>{let _=B.buildinConfigUpdatedAt;w(B);let E=new Date(_);if(a(_),v==="0.0.0"){h(!0);return}n({url:Oi}).then(O=>{let F=O,M=F.minVersion,N=v;s(F);let U=F.latestVersion;if(U&&(oi(N,U)?R(!0):R(!1)),oi(N,M)){let H=F.buildinConfigUpdatedAt;new Date(H)>E?(l(!0),x()):l(!1)}else y(!0),l(null)}).catch(O=>{l(null),m(O.message)})})},[]),De(()=>{pn().then(B=>{w(B)})},[r]),C?D("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?D(B8,{}):c?t===!1?null:D(R8,{handleSyncing:x,message:c,date:r||""}):f?t===!1?null:D(M8,{minVersion:i.minVersion}):u===null||u===!0?null:g?D(P8,{date:r}):null}):null}d();function I8(){return navigator.userAgent.indexOf("Mac")!==-1}var iy={Alt:"\u2325"};function d0(e=""){return I8()?Object.keys(iy).reduce((t,n)=>t.replace(n,iy[n]),e):e}d();function sy({config:e,isLogin:t,isProUser:n}){let{t:r}=ve();return Ru(e)?D("div",{}):D("div",{class:"flex items-center",children:[D("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Du:hh,children:[D("img",{src:t?Db:wb}),D("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),D("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Du:bh,children:D("img",{src:n?Cb:Sb})})]})}d();function uy({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=ve();if(!t)return null;let o=Pl(t.config.translationService,t.config.targetLanguage),i=An;o.length<=30&&(i=o.indexOf("auto")>=0?o:["auto",...o]);let s=o.filter(u=>u!=="auto");return D("div",{class:"flex mt-4 items-center",children:[D(O8,{supportedLanguages:i,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),D("img",{src:Ab,style:{maxWidth:"unset"},class:"mx-2"}),D(N8,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function O8(e){let{t}=ve(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),D("div",{class:"language-select-container",children:[D("label",{children:a}),D("select",{autoComplete:"off",class:"language-select",onChange:o=>{let i=o.target.value;i&&e.onSelected(i)},children:e.supportedLanguages.map((o,i)=>{let s=sa(o,e.interfaceLanguage),u="";return o==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=sa(r,e.interfaceLanguage)+` (${t("languages.auto")})`),D("option",{value:o,selected:o===e.value,children:u||s},"selectlink"+i)})})]})}function N8(e){return D("div",{class:"language-select-container",children:[D("label",{children:e.label}),D("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=sa(t,e.interfaceLanguage);return D("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}d();d();function la(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:o}=ve();return n=n||(o==="en"?144:160),D("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(i=>i.selected)?.value,onChange:i=>{let s=i.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((i,s)=>D("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+s))})}function ly(e){let{t}=ve(),{translationServiceItems:n,translationServiceOptions:r}=z8(e);return n.length?D(Ot,{children:[D(cy,{class:"mt-3",label:t("popupService"),items:r}),D(j8,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function cy(e){return D("div",{class:`min-select-container ${e.class||""}`,children:[D("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),D(la,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function j8({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=ve(),a=H8(e),o=U8(e),i=$e((u,l)=>{t(c=>{let m=c.translationServices||{},g=m[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...m,[a.id]:{...g,[u]:l}}}})},[]),s=Oe(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(m=>({label:`${m.label?r(m.label):m.value}`,value:m.value,selected:m.value==o[u.name],onSelected:()=>{i(u.name,m.value)}}));return{label:l,items:c}}),[o]);return!o||!a?.props?.length||!s||!s?.length?null:D(Ot,{children:s.map(({label:u,items:l},c)=>D(cy,{class:"mt-2",label:u,items:l},"field-"+c))})}function U8(e){return Oe(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function H8(e){return Oe(()=>{let{translationService:n}=e.config;if(ir[n])return Hu("translationService",n,e)},[ir,Hu,e])}function z8({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:o,openOptionsPage:i}){let{t:s}=ve(),u=Oe(()=>t?Qi(t,"translationService"):[],[Qi,t]),l=$e(m=>{let g=u.find(p=>p.id===m.value);if(g.ok){if(n(p=>({...p,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{o()},1)}else n(p=>({...p,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{i()},100)},[i,o,a,n]),c=Oe(()=>{let m=nt();return u.filter(p=>t.config.showUnconfiguredTranslationServiceInPopup===!1?p.ok:!0).map(p=>({label:`${s("translationServices."+p.id)}${p.ok?"":" "+(" "+(!e&&!m&&p.providers&&p.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:p.id,selected:p.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function dy(e){let t;try{t=new URL(e)}catch{return!1}let n=R2(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(q8(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function q8(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function my(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function py(e){let{t}=ve(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:o}=W8(e),[i,s]=se(()=>a?"excludeMatches":"matches"),u=Oe(()=>r||a||!1,[r,a]),l=$e(c=>{s(c),u&&o(c,n.hostname)},[s,o,u]);return D("div",{class:"flex justify-between mt-5",children:[D(la,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:i==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:i==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),D("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let m=c.target.checked;o(m?i:"default",n.hostname)}})]})}function W8({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:o,onTranslatePage:i,setSettings:s,onClose:u}){let l=null,c=null,m=null,g=null,p=null,{translationUrlPattern:f}=t.config;if(l=Oe(()=>new URL(e||""),[e]),t.config&&e&&dy(e)){c=my(e);let{matches:h,excludeMatches:C}=f;m=!!h.find(w=>ct(e,w)),g=!!C.find(w=>ct(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=t.config,{matches:C}=h;C.includes(n)?p=!0:p=!1}let y=$e(()=>{let h=l.hostname,C=t.localConfig.tempTranslationUrlMatches||[],w=C.filter(R=>R.match!==h),k=!1;w.length!==C.length&&(k=!0),k&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),b=$e((h,C)=>{if(h==="default"){s(R=>{let v={...R.translationUrlPattern};return{...R,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...R.translationUrlPattern,matches:Tp(e,v.matches),excludeMatches:Tp(e,v.excludeMatches)}}}),y();return}let w=h,k=w==="matches"?"excludeMatches":"matches";l&&s(R=>{let v={...R.translationUrlPattern};return v[k]=Tp(e,v[k]),v[w]=Ou(C,v[w]),{...R,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...R.translationUrlPattern,...v}}}),w==="matches"&&a==="Original"?setTimeout(()=>{i(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{o(),u()},100)},[i,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:m,isNeverTranslateDomain:g,isAlwaysTranslateLang:p,handleTranslationUrlPatternSelected:b}}function Tp(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!ct(e,n)):t):[]}d();d();d();var $8=new AbortController,{signal:G8}=$8,m0=0,p0=0,ii=!1,$a,gy=0,ca=[];function si(e,t){V8();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",o=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let i=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){i=!i,i?(P.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,si(n,t)):(P.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,si(n,t))}document.addEventListener(Ri,s),ca.push(()=>{document.removeEventListener(Ri,s)});let u=Hn(g=>{if(!(Math.abs(g.clientX-m0)+Math.abs(g.clientY-p0)<=3)&&(m0=g.clientX,p0=g.clientY,i||ii&&!$a)){let p=yy(n.rule,t);if(p){if(wp(p))return;Sp(n,!1,p)}}},i?700:300),l=g=>{let p=g.target;wp(p)||Sp(n,!0)},c=g=>{let p=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=xn.getPressedKeyCodes();if(f.length>1&&xn[p]&&(gy=Date.now(),ii=!1),f.length===1&&xn[p]){let y=Date.now();ii=!0,$a&&clearTimeout($a),$a=setTimeout(()=>{let b=gy-y;b>0&&b<=o?ii=!1:l(g),$a=void 0},o)}};if(ca.push(()=>{$a&&clearTimeout($a)}),a)return;vp("mousemove",u,t),ca.push(()=>{t.removeEventListener("mousemove",u)});function m(){i?u.cancel():ii=!1}if(vp("blur",m,t),ca.push(()=>{t.removeEventListener("blur",m)}),!i){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",p=ph;vp("keyup",fy,t),ca.push(()=>{t.removeEventListener("keyup",fy)}),p.includes(g)?xn("*","mouseHover",c):xn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),xn.setScope("mouseHover"),ca.push(()=>{xn.deleteScope("mouseHover")})}}function V8(){ca.forEach(e=>e()),ca=[],xn.setScope("all")}function fy(e){ii=!1}function vp(e,t,n=window){return n.addEventListener(e,t,{signal:G8})}function Sp(e,t,n,r=window){if(n=n||yy(e.rule,r),!n){P.debug("can not find selection part!");return}if(Y8(n,t))return;if(wp(n)){P.debug("exclude dom");return}Jb(e,n);let o=_s();o&&(o.setupMouseHoverListener=si);let i=on(e);i.excludeSelectors=[],i.selectors=[];let s=!1,u=fp({...o},e);_r({id:o.id,container:n,filterRule:i,force:!0,onParagraph:l=>{Ha(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let m=Date.now();Qe(Yf,m),rt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function yy(e,t){return K8(m0,p0,e,t)}function K8(e,t,n,r){let a=r2(e,t,n,r);if(a==null)return;let o=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=a2(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:by(l,n)},i=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){P.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{X8(r)}),!0}function J8(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function X8(e){let t=_s();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{xs(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function Cp(e){return!!(e.host&&e.mode)}function hy(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||Cp(n))return e;for(;n&&n.nodeName!=="BODY"&&!Cp(n)&&Pd(n,t);){let r=n.parentNode;if(r&&Cp(r))break;n=r}return n}function by(e,t){return e.nodeType===Node.TEXT_NODE||Pd(e,t)?hy(e,t):e}function Ey(e,t){m0=t.clientX,p0=t.clientY,Sp(e,!0)}var Ls=[];function Dp(e,t){let n=0,r=0,a,o=s=>{let u=new Date().getTime();r++,u-n<300?i(s):r=1,n=u},i=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",o),Ls.push(()=>{document.removeEventListener("click",o)})}function xy(e,t){let n=0,r=0,a=0,o=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},i=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",o),document.addEventListener("touchend",i),Ls.push(()=>{document.removeEventListener("touchstart",o),document.removeEventListener("touchend",i)})}function g0(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ls.push(()=>{document.removeEventListener("touchstart",r)})}var Ap={touchShortcutsOff:()=>{},"multipleClick.2":Dp,"multipleClick.3":Dp,"multipleClick.4":Dp,"slide.left":xy,"slide.right":xy,"fingers.2":g0,"fingers.3":g0,"fingers.4":g0,"fingers.5":g0};async function vy(e){try{rD();let t=await Dr(),n=dh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Q8(e,t,r.command),o=Ap[a];if(a==="touchShortcutsOff"||!o)return;let i=a.split(".");if(i.length!==2)return;let s=i[1];s&&o(s,u=>{nD(r.command,e,u)})})}catch(t){P.error(t)}}function Q8(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var Z8=()=>{kp();let e=new CustomEvent(Cr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},eD=()=>{Lp();let e=new CustomEvent(Cr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},tD=()=>{_p();let e=new CustomEvent(Cr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},Ty=0,nD=(e,t,n)=>{new Date().getTime()-Ty<200||(Ty=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?Z8():e==="touchShortcutsToggleTranslationMask"?tD():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?eD():e==="touchShortcutsToggleTranslateTouchElement"&&Ey(t,n))};function rD(){Ls.forEach(e=>{e()}),Ls=[]}function Cy(e){let{t}=ve(),{ctx:n,setSettings:r}=e,a=aD(e);return Wi(n.localConfig)?a.length?D("div",{class:"flex mt-3 items-center justify-between",children:[D("div",{class:"flex items-center",children:[D("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),D(la,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),D("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:o=>{let i=o.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Ui[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:i?u:"Off"}}})}})]}):null:D(oD,{...e})}function aD({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=ve(),a=Oe(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),o=Oe(()=>Ui.filter(s=>!(s==="Off"||Ui.includes(a)&&s==="OtherCustom")),[e,a]);return Oe(()=>o.map(s=>{let u=r("mouseHoldKey",{key:d0(s)}),l=Ui.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:m=>{m.value==="Other"?t("#shortcuts"):n(g=>{let p={...g.generalRule,mouseHoverPreferenceKey:m.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(p.mouseHoverHoldKey=m.value),{...g,generalRule:p}})}}}),[o,a])}function oD(e){let{ctx:t,setSettings:n}=e,{t:r}=ve(),a=t.config.generalRule,o=Object.keys(Ap).filter(l=>l!="touchShortcutsOff"),i=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return i!=="touchShortcutsOff"&&i!==s&&(u=i),D("div",{class:"flex mt-3 items-center justify-between",children:[D("div",{class:"flex items-center",children:[D("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),D(la,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:o.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(m){n(g=>{let p={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:m.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(p.touchShortcutsToggleTranslateTouchElement=m.value),{...g,generalRule:p}})}}))})]}),D("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(m=>{let g=m.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...m,generalRule:{...m.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function Sy(e){let{isAlwaysTranslateLang:t}=iD({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=ve();if(e.currentLang!=="auto")return D("div",{class:"flex justify-between mt-3 items-center",children:[D("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:sa(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),D("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let o=a.target.checked;r(o?"matches":void 0)}})]});return D("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Nu(e.currentLang,u.matches),excludeMatches:Nu(e.currentLang,u.excludeMatches)}}});return}let o=a,i=o==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[o]=Ou(e.currentLang,u[o]),u[i]=Nu(e.currentLang,u[i]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),o==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function iD({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var sD=({text:e,children:t,position:n="top",containerStyle:r,containerClass:a,multiple:o=!1,width:i,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:m,onShow:g})=>{let[p,f]=se(!1),y=We(null),b=We(null),h=()=>{u||!l&&st().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{st().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),m?.()),f(!1)},k=Oe(()=>{let R={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(o&&(R.maxWidth="200px",i&&(R.width=i+"px"),R.whiteSpace="normal"),n){case"top":return{...R,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...R,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...R,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...R,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,o,i,c]);return D("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[D("div",{onMouseEnter:h,onMouseLeave:w,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:t}),p&&D("div",{style:k,role:"tooltip",children:e})]})},da=sD;d();var wy=D("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),D("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),D("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),D("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Dy=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ay=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),ky=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),_y=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),D("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),D("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Ly=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),D("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Fy=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function My({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=ve(),a=Ce(),o=Math.round((Eo.supportedVideoSubtitleSites||[]).length/10),i=Oe(()=>[{title:r("widget.translateFile"),icon:wy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Dy,tooltipText:r("widget.videoSubtitleTooltip",{count:o*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:Ay,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(Th)}}],[a,e,t,r]);return D("div",{class:"widgets-container mt-5",children:i.map(s=>s.tooltipText?D(da,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:D(Py,{...s})}):D(Py,{...s}))})}function Py(e){return D("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,D("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Fp(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:o,onAutoEnableSubtitleChanged:i}=e,[s,u]=se(""),[l,c]=se(o),[m,g]=se(null),[p,f]=se(null);De(()=>{qt.get(zt,null).then(C=>{C?(g(C),f(Jt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let y=!0,b=nt();n&&b&&(y=n.generalRule.showSponsorOnSafari);let h=Ru(n);return D("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[D("div",{class:"popup-content text-sm",children:[h?D("div",{style:{marginTop:-12}}):D("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[D(sy,{isLogin:!!m,isProUser:!!p,config:n}),D(pD,{openSharePage:r})]}),D(uy,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),D(ly,{isProUser:!!p,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),D("div",{class:"flex flex-row mt-3 items-center",children:[D(lD,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),D(dD,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),D("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),D("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),D(xp,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),D("div",{class:"text-sm px-1 text-gray-2",children:[D(py,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),D(Cy,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),D(Sy,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),D(uD,{onAutoEnableSubtitleChanged:i,ctx:a,setSettings:t})]}),D(My,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),D(cD,{...e,isProUser:!!p,isShowPricing:y,setMessage:u})]})}function uD(e){let{t}=ve(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return Oe(()=>!n.rule.subtitleRule.disabled&&Xc.includes(n.rule.subtitleRule.type||""),[n,Xc])?D("div",{class:"flex justify-between mt-3 items-center",children:[D("label",{class:"mb-0",children:t("autoEnableSubtitle")}),D("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:i=>{let s=i.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function lD(e){let{t}=ve(),n=e.ctx.state.translationMode,r=()=>{let o=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(o)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return D(da,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:D("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?_y:Ly})})}function cD(e){let{t,lang:n}=ve(),{isProUser:r,isShowPricing:a}=e,{config:o}=e.ctx,i=60;n.startsWith("zh")||(i=70);let s=Ce(),u=`${e.type}_more`;return D("footer",{children:D("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[D("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[ky,D("span",{class:"ml-1 text-gray-6",children:t("options")})]}),D(mD,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),D(Ep,{label:t("more"),showArrow:!0,maxWidth:i,className:"text-gray-6 transform-padding-left more",onSelected:p=>{p.value==="openPremium"?(globalThis.open(go),e.onClose()):p.value==="changeToOnlyTranslationMode"?c("translation"):p.value==="changeToDualTranslationMode"?c("dual"):p.value==="translateTheWholePage"?e.onTranslateTheWholePage():p.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():p.value==="translateTheMainPage"?e.onTranslateTheMainPage():p.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):p.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):p.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):p.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):p.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):p.value==="donate"?(globalThis.open(o.donateUrl),e.onClose()):p.value==="feedback"?(globalThis.open(o.feedbackUrl),e.onClose()):p.value==="options"?(e.openOptionsPage(),e.onClose()):p.value==="changeToTranslateTheWholePage"?m():p.value==="changeToTranslateTheMainPage"?g():p.value==="about"?e.openAboutPage():p.value==="toggleEnabled"?e.onToggleEnabled():p.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):p.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):p.value==="goPro"&&e.onOpenUrl(go,u)},menus:[o.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},o.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},o.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},o.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(p){p.preventDefault(),e.openOptionsPage()}function c(p){e.setSettings(f=>({...f,translationMode:p})),e.onSwitchTranslationMode(p)}function m(){e.setSettings(p=>({...p,translationArea:"body"})),e.onTranslateTheWholePage()}function g(){e.setSettings(p=>({...p,translationArea:"main"})),e.onTranslateTheMainPage()}}function dD({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:o,noPermissionPDF:i}){let{t:s,lang:u}=ve(),l=r.config,c=Oe(()=>new URL(e||""),[e]),m=c?.pathname.toLowerCase().endsWith(".pdf");Oa(r?.rule)&&!m&&(m=!0);let g=s("translate");t==="Translated"||t==="Error"?g=s("show-original"):t==="Original"?m?bo()&&c.protocol==="file:"||i?g=s("translate-firefox-local-pdf"):Ee()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(t);let p=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Lu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${d0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(p+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),D("button",{class:"mb-0 main-button",onClick:()=>{m?n&&n():a()},"aria-busy":t==="Translating",disabled:o||t==="Translating",children:g})}function mD({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:o}=ve(),i=Xt();return D("div",{class:"flex",children:D("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:oy(7)(s),children:["V",i,e.config.enabled?null:D("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function pD(e){let{t}=ve();return D("div",{class:"share-button-container",onClick:e.openSharePage,children:[D("span",{class:"text-gray-9",children:t("buildSnapshots")}),Fy]})}d();d();d();d();var Pp={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return oe.storage[n].get(r)},set:(e,t,n)=>oe.storage[n].set({[e]:t})};function f0(e,t,n){let[r]=se(()=>typeof t=="function"?t():t),[a]=se(n),[o,i]=se(r),[s,u]=se(!1),[l,c]=se("");De(()=>{Pp.get(e,r,a).then(g=>{g[e]&&i(g[e]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[e,r,a]);let m=$e(g=>{let p=typeof g=="function"?g(o):g;P.debug("new settings",p),Pp.set(e,p,a).then(()=>{i(p),u(!0),c("")}).catch(f=>{i(p),u(!1),c(f)})},[a,e,o]);return[o,m,s,l]}d();function Mp(e,t,n){let r=[];return function(){let[o,i,s,u]=f0(e,t,n),l=$e(c=>{for(let m of r)m(c)},[]);return De(()=>(r.push(i),()=>{r.splice(r.indexOf(i),1)}),[i]),[o,l,s,u]}}function By(e,t){return Mp(e,t,"sync")}var gD="userConfig",fD=null,hD=By(gD,fD);function Fr(e){let[t,n,r,a]=hD(),o=$e(i=>{let s=typeof i=="function"?i(t):i;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,o,r,a,n]}d();d();async function h0(e){try{let t=new Date;P.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await oe.storage.local.set({[Ni]:t.toISOString()}),await bD(),Ee()||await j2()}catch(t){P.error("run cron task failed",t)}}async function Ry(){let t=(await an()).interval;if(t){let n=await oe.storage.local.get(Ni);if(n&&n[Ni]){let r=n[Ni];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:t}),P.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Zr({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{P.error("send content message request failed from cron task",u)})):P.debug(`no need to sync rules, latest: ${r}`):P.info(`local version is too old, please update to ${i} or later`)}catch(e){P.error("sync rules error: ",e)}}d();d();d();d();d();d();var Bp;function Wp(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function Wy(e,t=","){return e.map(Wp).join(t)}var $y=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function y0(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function E0(e,t="@media "){return t+Fn(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Fn(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function yD(){}var Gt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Gy(e){return e.match(/[-=:;]/g)?.length||0}function Up(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Gy(e),15)<<18}var ED=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function $p({n:e,i:t,v:n=[]},r,a,o){e&&(e=Wp({n:e,i:t,v:n})),o=[...Fn(o)];for(let s of n){let u=r.theme("screens",s);for(let l of Fn(u&&E0(u)||r.v(s))){var i;o.push(l),a|=u?67108864|Up(l):s=="dark"?1073741824:l[0]=="@"?Up(l):(i=l,1<<~(/:([a-z-]+)/.test(i)&&~ED.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:o,i:t}}var Gp=new Map;function Iy(e){if(e.d){let t=[],n=Rp(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?Rp(r,o=>Rp(a,i=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(i);if(s){let u=o.indexOf(s[1]);return~u?o.slice(0,u)+s[0]+o.slice(u+s[1].length):Ip(o,i)}return Ip(i,o)})):r,"&"),r=>Ip(r,e.n?"."+$y(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function Rp(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function Ip(e,t){return e.replace(/&/g,t)}var Oy=new Intl.Collator("en",{numeric:!0});function xD(e,t){for(var n=0,r=e.length;n>1;0>=Vy(e[a],t)?n=a+1:r=a}return r}function Vy(e,t){let n=e.p&Gt.o;return n==(t.p&Gt.o)&&(n==Gt.b||n==Gt.o)?0:e.p-t.p||e.o-t.o||Oy.compare(Ny(e.n),Ny(t.n))||Oy.compare(jy(e.n),jy(t.n))}function Ny(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function jy(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Op(e,t){return Math.round(parseInt(e,16)*t)}function ma(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let o=(e.length-1)/3,i=[17,1,.062272][o-1];return`rgba(${[Op(e.substr(1,o),i),Op(e.substr(1+o,o),i),Op(e.substr(1+2*o,o),i),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Ky(e,t,n,r,a=[]){return function o(i,{n:s,p:u,r:l=[],i:c},m){let g=[],p="",f=0,y=0;for(let C in i||{}){var b,h;let w=i[C];if(C[0]=="@"){if(!w)continue;if(C[1]=="a"){g.push(...Jy(s,u,Kp(""+w),m,u,l,c,!0));continue}if(C[1]=="l"){for(let k of Fn(w))g.push(...o(k,{n:s,p:(b=Gt[C[7]],u&~Gt.o|b),r:C[7]=="d"?[]:l,i:c},m));continue}if(C[1]=="i"){g.push(...Fn(w).map(k=>({p:-1,o:0,r:[],d:C+" "+k})));continue}if(C[1]=="k"){g.push({p:Gt.d,o:0,r:[C],d:o(w,{p:Gt.d},m).map(Iy).join("")});continue}if(C[1]=="f"){g.push(...Fn(w).map(k=>({p:Gt.d,o:0,r:[C],d:o(k,{p:Gt.d},m).map(Iy).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))C=="label"&&w?s=w+y0(JSON.stringify([u,c,i])):(w||w===0)&&(C=C.replace(/[A-Z]/g,k=>"-"+k.toLowerCase()),y+=1,f=Math.max(f,(h=C)[0]=="-"?0:Gy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+Fn(w).map(k=>m.s(C,Yy(""+k,m.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let k=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(R,v)=>{let x=m.theme("screens",v);return x?(k|=67108864,E0(x,"")):R}),k|=Up(C)),g.push(...o(w,{n:s,p:k,r:[...l,C],i:c},m))}else g.push(...o(w,{p:u,r:[...l,C]},m))}return g.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(f||15,15),r:l,d:p}),g.sort(Vy)}(e,$p(t,n,r,a),n)}function Yy(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,o,i="")=>{let s=t(a,i);return typeof s=="function"&&/color|fill|stroke/i.test(a)?ma(s):""+Fn(s).filter(u=>Object(u)!==u)})}function Vp(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function Hp(e,t,n=Gt.u,r,a){let o=[];for(let i of e)for(let s of function(u,l,c,m,g){u={...u,i:u.i||g};let p=function(f,y){let b=Gp.get(f.n);return b?b(f,y):y.r(f.n,f.v[0]=="dark")}(u,l);return p?typeof p=="string"?({r:m,p:c}=$p(u,l,c,m),Vp(Hp(Kp(p),l,c,m,u.i),u.n)):Array.isArray(p)?p.map(f=>{var y,b;return{o:0,...f,r:[...Fn(m),...Fn(f.r)],p:(y=c,b=f.p??c,y&~Gt.o|b)}}):Ky(p,u,l,c,m):[{c:Wp(u),p:0,o:0,r:[]}]}(i,t,n,r,a))o.splice(xD(o,s),0,s);return o}function Jy(e,t,n,r,a,o,i,s){return Vp((s?n.flatMap(u=>Hp([u],r,a,o,i)):Hp(n,r,a,o,i)).map(u=>u.p&Gt.o&&(u.n||t==Gt.b)?{...u,p:u.p&~Gt.o|t,o:0}:u),e)}function TD(e,t,n,r){var a;return a=(o,i)=>{let{n:s,p:u,r:l,i:c}=$p(o,i,t);return n&&Jy(s,t,n,i,u,l,c,r)},Gp.set(e,a),e}function Np(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,o=!1,i="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),o=!o),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(i+=(i&&"-")+s)}i&&(o&&(i="-"+i),t[0].push({n:i,v:r.filter(vD),i:a}))}}function vD(e,t,n){return n.indexOf(e)==t}var Uy=new Map;function Kp(e){let t=Uy.get(e);if(!t){let n=[],r=[[]],a=0,o=0,i=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Np(n,r)),a=s+1};for(;s1?m.slice(0,-1)+y0(JSON.stringify([m,g])):m+"("+Wy(g)+")",Gt.a,g,/@$/.test(m))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),Uy.set(e,t=r[0])}return t}function Xy(e,t,n){return t.reduce((r,a,o)=>r+n(a)+e[o+1],e[0])}function Qy(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?Xy(e,t,n=>jp(n).trim()):t.filter(Boolean).reduce((n,r)=>n+jp(r),e?jp(e):"")}function jp(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=Qy(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var Voe=Zy("@"),Koe=Zy("~");function Zy(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...o){return t(r,a,o)}}});function t(n,r,a){return Wy(Kp(n+e+"("+Qy(r,a)+")"))}}function zp(e,t){return Array.isArray(e)?Hy(Xy(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?Hy(e):[e]}var CD=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function Hy(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CD.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))),n[0][t[1]]=t[2]);return r}function e9(e,...t){var n;let r=zp(e,t),a=(r.find(o=>o.label)?.label||"css")+y0(JSON.stringify(r));return n=(o,i)=>Vp(r.flatMap(s=>Ky(s,o,i,Gt.o)),a),Gp.set(a,n),a}var Yoe=new Proxy(function(e,t){return zy("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return zy(t,n,r)}}});function zy(e,t,n){return{toString(){return e9({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function Z(e,t,n){return[e,SD(t,n)]}function SD(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):qp(n,1)}):n=>e||{[n[1]]:qp(n,2)}}function qp(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function te(e,t,n,r){return[e,wD(t,n,r)]}function wD(e,t,n){let r=typeof t=="string"?(a,o)=>({[t]:n?n(a,o):a._}):t||(({1:a,_:o},i,s)=>({[a||s]:o}));return(a,o)=>{let i=t9(e||a[1]),s=o.theme(i,a.$$)??ui(a.$$,i,o);if(s!=null)return a._=qp(a,0,s),r(a,o,i)}}function Ft(e,t={},n){return[e,DD(t,n)]}function DD(e={},t){return(n,r)=>{let{section:a=t9(n[0]).replace("-","")+"Color"}=e,[o,i]=AD(n.$$);if(!o)return;let s=r.theme(a,o)||ui(o,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:m}=e,g=r.theme(l,i||"DEFAULT")||i&&ui(i,l,r),p=t||(({_:y})=>{let b=Fs(c,y);return m?{[m]:b}:b});n._={value:ma(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:y=>ma(s,y),opacityVariable:u||void 0,opacityValue:g||void 0};let f=p(n,r);if(!n.dark){let y=r.d(a,o,s);y&&y!==s&&(n._={value:ma(y,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>ma(y,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:p(n,r)})}return f}}function AD(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Fs(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function ui(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=b0(Yy(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function t9(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function b0(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>b0(n)+r+b0(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var Joe=Symbol();var n9=new Proxy(yD,{apply(e,t,n){return Bp(n[0])},get(e,t){let n=Bp[t];return typeof n=="function"?function(){return n.apply(Bp,arguments)}:n}});var Xoe=function e(t){return new Proxy(function(n,...r){return qy(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...o){return qy(t,r,a,o)}}})}();function qy(e,t,n,r){return{toString(){let a=zp(n,r),o=$y(t+y0(JSON.stringify([t,a])));return(typeof e=="function"?e:n9)(e9({[`@keyframes ${o}`]:zp(n,r)})),o}}}d();d();d();d();d();var r9={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Pn(4,"rem",4,.5,.5),...Pn(12,"rem",4,5),14:"3.5rem",...Pn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:ze("blur"),backdropBrightness:ze("brightness"),backdropContrast:ze("contrast"),backdropGrayscale:ze("grayscale"),backdropHueRotate:ze("hueRotate"),backdropInvert:ze("invert"),backdropOpacity:ze("opacity"),backdropSaturate:ze("saturate"),backdropSepia:ze("sepia"),backgroundColor:ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Pn(200,"",100,0,50),...Pn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:ze("spacing"),borderWidth:{DEFAULT:"1px",...Nn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:ze("colors"),caretColor:ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Pn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:ze("borderColor"),divideOpacity:ze("borderOpacity"),divideWidth:ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Ps(2,6),...Ps(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:ze("spacing"),gradientColorStops:ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Ps(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Ps(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Pn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Pn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:ze("spacing"),placeholderColor:ze("colors"),placeholderOpacity:ze("opacity"),outlineColor:ze("colors"),outlineOffset:Nn(8,"px"),outlineWidth:Nn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:ze("colors"),ringOffsetWidth:Nn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Nn(8,"px")},rotate:{...Nn(2,"deg"),...Nn(12,"deg",3),...Nn(180,"deg",45)},saturate:Pn(200,"",100,0,50),scale:{...Pn(150,"",100,0,50),...Pn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:ze("spacing"),scrollPadding:ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Nn(2,"deg"),...Nn(12,"deg",3)},space:ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Pn(2),textColor:ze("colors"),textDecorationColor:ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Nn(8,"px")},textUnderlineOffset:{auto:"auto",...Nn(8,"px")},textIndent:ze("spacing"),textOpacity:ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Ps(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Pn(50,"",1,0,10),auto:"auto"}};function Ps(e,t){let n={};do for(var r=1;rt(e)}var fie={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${r9.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${r9.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},bie=[Z("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:ui(`[${t}]`,"",n)}}})),Z("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),te("aspect-","aspectRatio"),Z("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...i("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(o[E0(u)]={"&":{maxWidth:u,...i(s)}})}return o;function i(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),Z("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),Z("box-(border|content)","boxSizing",({1:e})=>e+"-box"),Z("hidden",{display:"none"}),Z("table-(auto|fixed)","tableLayout"),Z(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",Z("isolate","isolation"),Z("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),Z("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",x0),Z("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),Z("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),te("-?(top|bottom|left|right)(?:$|-)","inset"),Z("(visible|collapse)","visibility"),Z("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),Z("flex-((row|col)(-reverse)?)","flexDirection",a9),Z("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),Z("grid-cols-(\\d+)","gridTemplateColumns",u9),te("col-","gridColumn"),Z("col-(span)-(\\d+)","gridColumn",s9),te("col-start-","gridColumnStart"),Z("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),Z("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),Z("grid-rows-(\\d+)","gridTemplateRows",u9),te("row-","gridRow"),Z("row-(span)-(\\d+)","gridRow",s9),te("row-start-","gridRowStart"),Z("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),Z("row-end-(auto|\\d+)","gridRowEnd"),Z("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>x0(a9(e))),Z("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",Z("justify-","justifyContent",o9),Z("(content|items|self)-",e=>({["align-"+e[1]]:o9(e)})),Z("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),te("p([xytrbl])?(?:$|-)","padding",li("padding")),te("-?m([xytrbl])?(?:$|-)","margin",li("margin")),te("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),Z("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:e})=>typeof(e=Fn(e))[1]=="string"?{fontFamily:Qn(e)}:{fontFamily:Qn(e[0]),...e[1]}),Z("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),Z("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),Z("italic","fontStyle"),Z("not-italic",{fontStyle:"normal"}),Z("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...pa({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),Z("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),Z("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Ft("placeholder-",{property:"color",selector:"&::placeholder"}),Z("text-(left|center|right|justify|start|end)","textAlign"),Z("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),Ft("text-",{property:"color"}),te("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),te("indent-","textIndent"),Z("(overline|underline|line-through)","textDecorationLine"),Z("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),Ft("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),Z("decoration-","textDecorationStyle"),Z("(uppercase|lowercase|capitalize)","textTransform"),Z("normal-case",{textTransform:"none"}),Z("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Z("align-","verticalAlign"),Z("whitespace-","whiteSpace"),Z("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),Z("break-words",{overflowWrap:"break-word"}),Z("break-all",{wordBreak:"break-all"}),Z("break-keep",{wordBreak:"keep-all"}),Ft("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Ft("accent-",{opacityVariable:!1,opacitySection:"opacity"}),Z("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${Ga(e," ")},var(--tw-gradient-stops))`),Ft("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Ft("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Ft("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),Z("bg-(fixed|local|scroll)","backgroundAttachment"),Z("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),Z(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),Z("bg-blend-","backgroundBlendMode"),Z("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Ft("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),Z("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",x0),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${Ga(n[0])}-radius`]:t,[`border-${Ga(n[1])}-radius`]:t}}),Z("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),Z("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...pa({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Ft("border-([xytrbl])-",{section:"borderColor"},li("border","Color")),Ft("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",li("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),Z("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),Z("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${Ga(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${Ga(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Ft("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Ft("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),Z("ring-inset",{"--tw-ring-inset":"inset"}),Ft("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...pa({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ma(t("ringOffsetColor","","#fff")),"--tw-ring-color":ma(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Ft("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:e})=>({...pa({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":Qn(e),"--tw-shadow-colored":Qn(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),Z("mix-blend-","mixBlendMode"),...i9(),...i9("backdrop-"),te("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:Qn(e),transitionTimingFunction:e._=="none"?void 0:Qn(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:Qn(t("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",Qn),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Qn),te("delay(?:$|-)","transitionDelay","transitionDelay",Qn),te("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=Qn(e),o=a.split(" "),i=t("keyframes",o[0]);return i?{["@keyframes "+(o[0]=r(n(o[0])))]:i,animation:o.join(" ")}:{animation:a}}),"(transform)-(none)",Z("transform",Jp),Z("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":l9(e=="gpu")})),te("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Jp()})),te("-?(rotate)-","rotate",Yp),te("-?(translate-[xy])-","translate",Yp),te("-?(skew-[xy])-","skew",Yp),Z("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",x0),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",Z("snap-(none)","scroll-snap-type"),Z("snap-(x|y|both)",({1:e})=>({...pa({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),Z("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),Z("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),Z("snap-(normal|always)","scroll-snap-stop"),Z("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",li("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",li("scroll-margin")),Z("touch-(auto|none|manipulation)","touch-action"),Z("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...pa({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),Z("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),Z("outline",{outlineStyle:"solid"}),Z("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),Ft("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],Z("select-(none|text|all|auto)","userSelect"),Ft("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Ft("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),Z("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),Z("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function x0(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function a9(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function Ga(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function Qn(e){return e&&""+(e._||e)}function o9({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function li(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Fs(e+"-"+Ga(a[0])+t,r),...Fs(e+"-"+Ga(a[1])+t,r)}:Fs(e+t,r)}}function i9(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...pa(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,Z(`${e}filter`,n),...t.map(r=>te(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:o})=>({[`--tw-${a}`]:Fn(o).map(i=>`${r}(${i})`).join(" "),...n})))]}function Yp({1:e,_:t}){return{["--tw-"+e]:t,...Jp()}}function Jp(){return{...pa({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":l9()}),transform:"var(--tw-transform)"}}function l9(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function s9({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function u9({1:e}){return`repeat(${e},minmax(0,1fr))`}function pa(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}d();d();var T0=globalThis||(typeof window<"u"?window:self),LD=Object.create,Qp=Object.defineProperty,FD=Object.getOwnPropertyDescriptor,PD=Object.getOwnPropertyNames,MD=Object.getPrototypeOf,BD=Object.prototype.hasOwnProperty,RD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ID=(e,t)=>{for(var n in t)Qp(e,n,{get:t[n],enumerable:!0})},Xp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of PD(t))!BD.call(e,a)&&a!==n&&Qp(e,a,{get:()=>t[a],enumerable:!(r=FD(t,a))||r.enumerable});return e},OD=(e,t,n)=>(Xp(e,t,"default"),n&&Xp(n,t,"default")),d9=(e,t,n)=>(n=e!=null?LD(MD(e)):{},Xp(t||!e||!e.__esModule?Qp(n,"default",{value:e,enumerable:!0}):n,e)),m9=RD((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,m){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,m)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof T0=="object"&&T0.global===T0?T0:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,m){var g=i.URL||i.webkitURL,p=document.createElement("a");c=c||l.name||"download",p.download=c,p.rel="noopener",typeof l=="string"?(p.href=l,p.origin===location.origin?o(p):a(p.href)?r(l,c,m):o(p,p.target="_blank")):(p.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(p.href)},4e4),setTimeout(function(){o(p)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,m){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,m),c);else if(a(l))r(l,c,m);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){o(g)})}}:function(l,c,m,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,m);var p=l.type==="application/octet-stream",f=/constructor/i.test(i.HTMLElement)||i.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||p&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var w=b.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=w:location=w,g=null},b.readAsDataURL(l)}else{var h=i.URL||i.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});i.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),p9={};ID(p9,{default:()=>v0});var ND=d9(m9());OD(p9,d9(m9()));var{default:c9,...jD}=ND,v0=c9!==void 0?c9:jD;d();d();d();d();d();d();var rse=Ce().REDIRECT_URL;d();var Rse=Co([]);function h9(e){let[t,n]=se(null);return De(()=>{pn().then(r=>{n(r),P.debug("current config",r)})},[]),De(()=>{pn().then(r=>{n(r)})},[e]),t}function b9(e){let[t,n]=se(null);return De(()=>{e&&Ut({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function y9(){let[e,t]=se(null);return De(()=>{Qt().then(r=>{t(r)})},[]),[e,r=>{t(r),Zt(r)}]}d();async function VD(e,t,n){try{if(t===null)return"noupdate";let r=await Qt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await Zp(e,t),await Zt(r),"upload"}let a=await x9(e);r.accountLastSyncedAt=Date.now(),P.debug("settings",t),P.debug("local settings.updatedAt",t.updatedAt),P.debug("remote settings.updatedAt",a.updatedAt),P.debug("last synced at",r.accountLastSyncedAt);let o=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(o=!0),!o&&t.updatedAt>a.updatedAt&&(o=!0),P.debug("isUpload",o),o)return await Zp(e,t),await Zt(r),"upload";let i=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(i=!0),!i&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||KD(n)&&VD(n.token,e,t).then(o=>{P.debug("syncUserSetting result",o)})},[e,n])}function KD(e){return Jt(e)?!0:new Date(e.createTime){qt.get(zt,null).then(n=>{t(n)})},[t]),e}function x9(e){return(location.href?.indexOf("popup.html")>0?Pa:ce)({responseType:"json",url:Hi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function Zp(e,t){return(location.href?.indexOf("popup.html")>0?Pa:ce)({responseType:"json",url:Hi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}function S0(e){let{onClose:t}=e,[n,r]=se("Original"),[a,o,i,s]=Fr(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});C0(a,o);let[u,l]=se(null),[c,m]=se(globalThis.location.href),[g,p]=se("auto"),[f,y]=se(null),b=O=>{r(O.detail)};if(De(()=>(document.addEventListener(La,b,!1),an().then(O=>{l(O);let F=Et();p(F);let M=Ke();r(M),h0(O.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),De(()=>{an().then(O=>{l(O)})},[a]),De(()=>{c&&u&&eg().then(O=>{y(O)})},[c,u]),!u||!f)return null;return D(Fp,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:O=>{w("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:k,onToggleEnabled:R,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:B,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{x(Qr(f.rule)||c)},openAboutPage:_,openSharePage:w("shareToDraft",!0),onSetPageLanguage:h,setSettings:o,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:bl,onSetBuildinConfig:L2,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:v});function h(O){p(O);let F=ay(c,O,u.sourceLanguageUrlPattern);o(M=>({...M,sourceLanguageUrlPattern:F})),On(O)}function C(){m(globalThis.location.href)}function w(O,F,M={}){let N={trigger:"page_popup",...M};return()=>{_n({method:O,data:N}),F&&t()}}function k(){t()}function R(){o(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{k()},50)}function v(O,F){let M=O;F&&(M=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Tl(M,!0),setTimeout(()=>{k()},50)}function x(O){O&&(Ho(!1,O),setTimeout(()=>{k()},50))}function B(O=""){No(!0,O),setTimeout(()=>{t()},50)}function _(){El(),setTimeout(()=>{t()},50)}function E(){N2(),setTimeout(()=>{t()},50)}}d();function S9(){let[e,t]=se("Original");return De(()=>{let n=Ke();t(n);let r=a=>{t(a.detail)};return document.addEventListener(La,r),()=>{document.removeEventListener(La,r)}},[]),{pageStatus:e}}var T9=6,JD={position:"right",top:335};function w9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let o=We(null),i=We(null),[s,u]=se(!1),l=We(null),c=We(!1),m=We(n.floatBallConfig||JD),g=We(0),p=We(0),f=We(0),y=We(!1),b=We(0),h=We(0),C=We(0),w=We(0),k=We(!1),R=$e(v=>{a||(clearTimeout(l.current),v?u(v):l.current=setTimeout(()=>{u(v),y.current=!1},st().any?3e3:0))},[u,l,y,a]);return De(()=>{a||u(!1)},[a]),De(()=>{if(o.current&&m.current){let v=tg(m.current.top);m.current.top=v,o.current.style.top=`${v}px`,o.current.style.display="flex"}},[t,o]),De(()=>{if(!i.current||!o.current)return;let v=M=>{M.preventDefault&&M.preventDefault(),g.current=M.clientX,p.current=M.clientY,b.current=Date.now(),f.current=o.current.offsetTop,c.current=!0,clearTimeout(l.current),R(!0),C.current=M.clientX,w.current=M.clientY,k.current=!1,st().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{v9({startX:g.current,startY:p.current,endX:C.current,endY:w.current})||(k.current=!0,r())},500)),document.addEventListener("mousemove",x),document.addEventListener("touchmove",E),document.addEventListener("mouseup",B),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},x=M=>{if(M.preventDefault&&M.preventDefault(),!c.current||!o.current||(C.current=M.clientX,w.current=M.clientY,k.current))return;let N=M.clientY-p.current+f.current,U=tg(N);o.current.style.top=`${U}px`},B=M=>{if(M.preventDefault&&M.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||R(!1),k.current)return;v9({startX:g.current,startY:p.current,endX:M.clientX,endY:M.clientY})||(clearTimeout(h.current),e());let U=tg(M.clientY-30);m.current.top=U;let H=us();bl({...H,floatBallConfig:m.current})},_=M=>{M.preventDefault&&M.preventDefault(),v(M.changedTouches[0])},E=M=>{M.preventDefault&&M.preventDefault(),x(M.changedTouches[0])},O=M=>{M.preventDefault&&M.preventDefault(),B(M.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return i.current.addEventListener("mousedown",v),i.current.addEventListener("touchstart",_),()=>{i.current&&(i.current.removeEventListener("mousedown",v),i.current.removeEventListener("touchstart",_))}},[t,i,o,l,c,n,R,e]),De(()=>{if(st().any)return;let v=B=>{B.target===o.current&&!y.current||(y.current=!0,R(!0),clearTimeout(l.current))},x=B=>{if(c.current){y.current=!1;return}B.target===o.current&&!y.current||R(!1)};return o.current?.addEventListener("mouseover",v),o.current?.addEventListener("mouseout",x),()=>{o.current?.removeEventListener("mouseover",v),o.current?.removeEventListener("mouseout",x)}},[o,c,R,t,y]),{ballRef:i,floatBallConfigRef:m,containerRef:o,active:s,setActive:R}}function v9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),o=Math.abs(r-t);return a>T9||o>T9}function D9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=Oe(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),o=Oe(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),i=Oe(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:o,settingTransform:i}}function A9(){let[e,t]=se(!1);return De(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var C9="hasShownFloatingBallGuide",XD="2024-01-06";function k9(e){let[t,n]=se(!1);De(()=>{!e.config.enableShowFloatingBallGuide||Et()==e.targetLanguage||(async()=>{let a=await Dt(C9,""),o=await Dt("installedAt","");o&&new Date(o){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function _9(e,t){let n=We(0),[r,a]=se(!0),[o,i]=se(!1),s=Fr(),[u,l]=s,{t:c}=ve(),m=$e(()=>{e?.config.floatBallTooltipRule&&(st().any?i(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,i]);De(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,st().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),m())},[e]);let g=$e(()=>{e&&(n.current=n.current+1,m(),l(y=>{let b={...y};return st().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,m,n,e]),p=Oe(()=>st().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),f=Oe(()=>st().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:sa(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:o,tooltipDelay:p,tooltipText:f,handleShowTooltip:g}}function tg(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}d();var Va=`${J}-float-ball`;function L9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?D("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:D(QD,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function QD(e){let{t}=ve(),[n,r]=se("UntilNext"),a=jo()+"#floating",o=t("closeQuickTranslation.settingOpen",{1:a}),i=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:o},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:o}];return D("div",{class:`${Va}-close-content`,children:[D("div",{class:"flex justify-between",children:[D("div",{class:`${Va}-close-title`,children:t("closeQuickTranslation")}),D("div",{class:"clickable",onClick:e.onClose,children:D(ua,{type:"modal-close"})})]}),D("div",{class:`${Va}-close-radio-content mt-3`,children:i.map(s=>D(ZD,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Uo(u)}},s.type))}),D("div",{class:"flex mt-3 flex-end",children:[D("div",{class:`${Va}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),D("div",{class:`${Va}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function ZD(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,o=e7(r||"");return D("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[D("div",{class:t?`${Va}-radio-sel`:`${Va}-radio-nor`,children:D("div",{})}),D("div",{class:"ml-2 text-sm",children:[D("span",{children:n}),r?D("small",{class:"muted text-sm",children:o.map(i=>i.type==="text"?i.value:D("a",{onClick:()=>i.href&&a&&a(i.href),children:i.value}))}):null]})]})}function e7(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let o=a[2],i=a[3],s=a[4];o&&i?t.push({type:"link",href:o,value:i}):s&&t.push({type:"text",value:s})}return t}d();d();function F9(e){return Se.ASSETS_BASE_URL+e}var Ka=`${J}-float-ball`;function P9(e){let{t}=ve(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=Oe(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?D("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:`${Ka}-guide-container`,style:r,children:[D("img",{class:`${Ka}-guide-bg ${e.fixedPosition}`,src:t7}),D("div",{class:`${Ka}-guide-content ${e.fixedPosition}`,children:[D("img",{class:`${Ka}-guide-img`,src:F9("images/float_ball_intro.png")}),D("div",{class:`${Ka}-guide-message`,children:[t("floatBall.guideClickToTranslate"),st().any?` -${t("floatBall.longPress")}`:""]}),D("div",{class:`${Ka}-primary-btn ${Ka}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var t7="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function n7({isVisible:e,onClose:t,children:n}){return D(Ot,{children:[e&&D("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),D("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:D("div",{className:"immersive-translate-sheet-content",children:n})})]})}var M9=n7;var Ms=`${J}-float-ball`;function ng(e){let{t}=ve(),n=Fr(),[r,a,o,i]=n;C0(r,a);let s=h9(r),u=b9(s),{isFullScreen:l}=A9(),[c,m]=se(!1),[g,p]=se(!0),{pageStatus:f}=S9(),y=_d(u,r),b=$e(()=>{if(y?.clickType==="popup")return m(!0);if(y?.clickType==="translate"){let A=xe();if(Oa(u?.rule)){let j=Qr(u.rule);Ho(!0,j||A);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,_n,m]),h=$e(()=>{m(!0)},[m]),C=g&&!!s,{containerRef:w,active:k,ballRef:R,floatBallConfigRef:v,setActive:x}=w9({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:e.localConfig,popupVisible:c}),B=y?.fixedPosition||"right",_=B==="right"?"left":"right",{isShowGuide:E,handleCloseGuide:O}=k9(e.ctx),{closeTransform:F,logoContainerTransform:M,settingTransform:N}=D9(y,k||E),{tooltipDelay:U,disableTooltipDelay:H,tooltipText:L,handleShowTooltip:S}=_9(u,f);return C?D("div",{class:`${Ms}-container ${B} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:k||E||c?"all":"none"},ref:w,children:[D(r7,{ctx:u,setVisible:p,closeTransform:F,setActive:x,getModalStyle:()=>B9(v.current.top,300,B)}),D(da,{enableMobile:!0,text:L,position:_,delay:U,onShow:S,disable:H,children:D("div",{class:`${Ms}-btn ${B} btn-animate `,ref:R,style:{transform:M,opacity:k||E?1:.5},children:D("div",{children:[D(ua,{type:"logo"}),f!=="Original"?D(ua,{type:"translated"}):null]})})}),D("div",{style:{marginTop:"12px",transform:N},class:`${Ms}-more-buttons btn-animate`,children:[D(da,{text:t("translateFileTooltip"),multiple:!0,width:200,position:_,containerClass:"btn-animate",children:D("div",{class:`${Ms}-more-button`,onClick:()=>{Tl(Ch,!0)},children:D(ua,{type:"file"})})}),D(da,{text:t("floatBall.setting"),position:_,containerClass:"btn-animate",children:D("div",{class:`${Ms}-more-button`,onClick:()=>{x(!0),m(!0)},children:D(ua,{type:"setting"})})})]}),D(a7,{onClose:()=>{x(!1),m(!1)},visible:c,getModalStyle:()=>B9(v.current.top,500,B)}),D(P9,{visible:E,top:v.current.top,fixedPosition:B,onClose:()=>{O(),x(!1)}})]}):null}function r7(e){let{t}=ve(),[n,r]=se(!1),a=Fr(),[o,i,s,u]=a,l=_d(e.ctx,o),c=$e(g=>{e.ctx&&i(p=>W3({...p},g))},[e.ctx,i]),m=$e(g=>{l&&(e.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return D(Ot,{children:[D("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:D(ua,{type:"close"})}),D(L9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:m})]})}function a7(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?D(M9,{isVisible:e.visible,onClose:e.onClose,children:D(S0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?D("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:D(S0,{onClose:e.onClose})})}):null}function o7(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var B9=(e,t,n)=>{let a=o7().height,o={position:"fixed"},i=0;return If()&&(e=i7.top),o.top=e-i,o.top+t>=a?(o.bottom=30,delete o.top):o.top<=10&&(o.top=10),n==="left"?o.left=65:o.right=65,o},i7={position:"right",right:0,top:335};function s7(e,t){for(let n of t){if(Ee()&&!bo()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function rg(){let e=Ce(),t=await an(),n=await Dr(),r={url:globalThis.location.href,config:t},a=await Ut(r),o=await Ld(a,n),i=ct(a.url,o?.blockUrls),s=await Qt();if(!o?.enable||i)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return s7(l,[c]),u7(l,t,s,a)}function u7(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),vo(D(jl,{lang:t.interfaceLanguage,fallbackLang:"en",translations:ny,children:D(ng,{localConfig:n,ctx:r})}),a)}var ag=!1;async function R9(e){if(!e){let t=await an(),n={url:globalThis.location.href,config:t};e=await Ut(n)}e.config.debug&&P.setLevel("debug"),e.isTranslateExcludeUrl?P.debug("detect exclude url, do not inject anything."):(ag=!0,rg().catch(t=>{P.debug("init popup error",t)}))}async function I9(){ag||(ag=!0,rg().catch(e=>{P.error("init popup error",e)}))}var O9=!1,H9=[()=>{xn.unbind()}],N9=[...H9],l7=Hn(async()=>{await No()},50),c7=Hn(async()=>{await El()},50),d7=Hn(async()=>{await O2()},50),m7=Hn(async()=>{await I2()},50),z9=Hn(e=>{_n({method:e,data:{trigger:"userscript_menu"}})},50);function p7(e,t){let n=e.document;if(O9)return;O9=!0,Ee()||_2(),n.addEventListener("securitypolicyviolation",S7),document.addEventListener(ge+"DocumentMessageUser",$9),document.addEventListener(ge+"DocumentMessageUpdateUser",G9),document.addEventListener(ge+"ChangeSuccessService",V9.bind(null,t)),document.addEventListener(ge+"ChangeService",K9.bind(null,t)),document.addEventListener(_a,T7.bind(null,t)),n.addEventListener(ge+"EbookLoaded",C7),n.addEventListener(Wf,v7.bind(null,t)),n.addEventListener($f,w7.bind(null,t)),n.addEventListener(yu,a=>{Ue()||bp(a,t)}),n.addEventListener(Gf,Zb),n.addEventListener("click",a=>{h7(a,t)}),Ue()&&e.addEventListener("message",f7,!1),Ee()&&(Ue()||n.addEventListener(Cr,g7)),Ue()||ta.rootIframe(wu).handleAsk("throttleRequest",_1)}function Bs(e,t){D7(),p7(t,e),Ee()&&(Ue()||(yp(e.config),A7(e.config))),Lu()&&vy(e),nt()&&yp(e.config)}function g7(e){I9()}function f7(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===fu&&Zr(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function h7(e,t){let n=e.target;if(!n||!n.getAttribute){ga(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&rt(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${J}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),og({method:"retryFailedParagraphs"}),ga(n,!0);return}else if(a=="toast-error"){let o=n.getAttribute(`data-${J}-tooltip-text`)||"",i="",s="retry";try{let u=JSON.parse(o);i=u.title,o=u.errMsg,s=u.action}catch{}q9(W9.bind(null,t,i,o,s));return}}}async function b7(){let e=await hn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await fn(e)}async function y7(){let e=await hn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await fn(e)}var j9=0;function q9(e){let t=Date.now();if(t-j9<2e3||(j9=t,E7()))return;let n=`${J}-modal-root`,r=`${J}-modal`,a=document.getElementById(n),o=`${J}-modal-title`,i=`${J}-modal-body`,s=`${J}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${o}`),c=u.querySelector(`.${s}`),m=u.querySelector(`.${i}`);e(u,l,m,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),m=Ce();c.textContent=m.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=J+"-modal-content notranslate",u.appendChild(g);let p=document.createElement("span");p.textContent="\xD7",p.className=J+"-close",g.appendChild(p);let f=document.createElement("div");f.className=o+" notranslate",g.appendChild(f);let y=document.createElement("div");y.className=i+" notranslate",g.appendChild(y);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),p.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),e(u,f,y,b)}setTimeout(()=>{x7()},100)}function W9(e,t,n,r="retry",a,o,i,s){let u=At.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");o.innerText=l,i.innerHTML=Ge.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let m="",g=document.createElement("button");if(r=="retry"){m=u("retryAllButton"),g.setAttribute(`data-${J}-action`,"retry");let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("viewBox","0 0 16 16"),p.setAttribute("width","20"),p.setAttribute("height","20"),p.innerHTML='',g.appendChild(p),g.onclick=()=>{a.style.display="none",og({method:"retryFailedParagraphs"}),ga(g,!0)}}else if(r=="login")m=u("goLogin"),g.onclick=()=>{ga(g,!0),window.open(fh)};else if(r=="upgrade")m=u("upgradeToPro"),g.onclick=()=>{ga(g,!0),window.open(Au)};else if(r=="setting")m=u("goSettings"),g.onclick=()=>{ga(g,!0),window.open(Se.OPTIONS_URL)};else if(r=="changeService")m=u("detectServiceLoading"),g.onclick=()=>{ga(g,!0),window.open(Se.OPTIONS_URL)},sg(e,e.config.translationService,!1).then(p=>{p?(m=u("toggleToService",{service:u("translationServices."+p)}),g.innerHTML=Ge.sanitize(m),g.onclick=()=>{Y9(p),ga(g,!0)}):(m=u("goSettings"),g.innerHTML=Ge.sanitize(m))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=Ge.sanitize(m),s.appendChild(g)}function E7(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${J}-modal`)?.style.display=="block":!1}function x7(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${J}-modal`);t&&(t.style.display="block")}}function ga(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${J}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function T7(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:o,action:i}=r;q9(W9.bind(null,e,a,o,i))}catch(r){P.warn("parse message error",r)}}async function v7(e,t){let n=t;if(P.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")og({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")xl(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")b7();else if(a.type==="toggleEnableInputTranslation")y7();else if(a.type==="translatePage")k7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Qi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Pl(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let o=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:o,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let o={...e,translationService:a.data.service};try{r=await _7(a.data,o)}catch(i){U9(a.type,i.uiConfig(o),a.id)}}else a.type==="getAsyncLanguageByText"?r=await yl(a.data):a.type==="sharePage"?bp({detail:a.data},e):a.type==="switchTranslationMode"?ig(a.data):z9(a.type);r&&a.id&&U9(a.type,r,a.id)}}catch(a){P.warn("parse message error",a)}}}function C7(e){setTimeout(()=>{w0()},10)}function S7(e){Se.HAS_CSP_ERROR="1"}function w7(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&rt(n.name,[{name:n.name}],{...e})}function D7(){N9.forEach(e=>{e()}),N9=H9}function A7(e){if(Ee()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Pu.commands,a=[...Object.keys(t).filter(o=>o==="toggleTranslatePage").map(o=>{let i=t[o].description,s=i;return i.startsWith("__MSG_")&&i.endsWith("__")&&(s=ai(`browser.${i.slice(6,-2)}`,e.interfaceLanguage)),{id:o,title:s}}),{id:Gc,title:ai("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:Vc,title:ai("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:Wc,title:ai("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:$c,title:ai("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let o of a)GM.registerMenuCommand(o.title,()=>{o.id===Wc?l7():o.id===$c?c7():o.id===Vc?d7():o.id===Gc?m7():z9(o.id)},o.key)}}function og(e){Zr(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{P.error("send content message request failed",e,n)});let t=new CustomEvent(Cr,{detail:e});globalThis.document.dispatchEvent(t)}async function k7(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await He(xe(),t);yn(n)}function U9(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function _7({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let o=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),i=null;try{let s=await Ze({sentences:o},{...a,translationService:r},u=>i=u);if(i)throw i;return s}catch(s){throw s}}d();var Ya={};async function ug(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Pe({text:t,minLength:200,pageLangs:[ht(),"en"]});return On(n),n}async function J9(e){gn("Translating");let t=Et(),n=sl(),r=[...document.querySelectorAll(".source-text")];if(So(e,t))return;let a=r.filter(o=>o.innerText?.trim()).map((o,i)=>{let s=o.parentElement?.parentElement?.querySelector(".target-text");return ut(o,"id",i+""),s&&(wo(s,i)?.remove(),s.appendChild(as(e,i))),{text:o.innerText||"",id:i,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Ze({sentences:a},{...e,sourceProgram:"subtitle"},(o,i,s)=>{let u=s.id,l=wo(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),o?(c.innerHTML=Ge.sanitize(`${o.message}`),Ya[u]={ok:!1,sentence:s}):i&&(c.innerHTML=Ge.sanitize(i.text),Ya[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!o}})})))})}catch(o){throw o}finally{gn("Translated")}}async function X9(e){gn("Translating"),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Ya),n=[],r=[];for(let a of t){let o=Ya[a];if(!o.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Ya[a],u.appendChild(as(e,a)),r.push(o.sentence))}}}try{await Ze({sentences:r},e,(a,o,i)=>{let s=i.id,u=wo(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ge.sanitize(`${a.message}`),Ya[s]={ok:!1,sentence:i}):o&&(l.innerHTML=Ge.sanitize(o.text),Ya[s]={ok:!0,sentence:i}),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function lg(){gn("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}d();var cg={};async function Q9(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let o=a.body;if(o&&(t=t+o.innerText||"",t.length>1e3))break}let n=await Pe({text:t,pageLangs:["en"]});return On(n),n}async function Z9(e){gn("Translating"),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(cg),n=[];for(let r of t){let a=cg[r];if(a.error){let i=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);i&&i.remove(),n.push(a)}}try{Ts(),await Nl(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{gn("Translated")}}function e6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function t6(e){gn("Translating");let t=Zi(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;Yo(u,e);let l=u.body;if(!l)continue;let c=on(e);c.isModifyImage=!1,_r({id:t,container:l,filterRule:c,onParagraph:m=>{r.push(m)}})}let o=ur(e.config.translationServices[e.translationService]),i=1;for(let s of r){let u=Cl(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:o,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(i++).toString();let l=await Wm(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:o,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),cg[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Nl(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{gn("Translated")}}d();var Zn=!1,D0,n6=!1,A0=null;function dg(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){P.debug("exclude url for input");return}if(A0===!1){P.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};An.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=0,s=Date.now();D0&&self.removeEventListener("keydown",D0),D0=u,self.addEventListener("keydown",D0);function u(c){if(Zn||A0===!1)return;let m=c,g=m.target||m.srcElement,p=g?.tagName;(g?.isContentEditable||p=="INPUT"||p=="SELECT"||p=="TEXTAREA")&&(q7(c,o.triggerKey,o.codePrefixAlias)?l(c):i=0)}async function l(c){Date.now()-s=o.triggerTimes&&P7()&&(i=0,F7(c,e,o))}W7(e)}function a6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let o of a){let i=t.map(s=>{let u=o+s;return a.includes(s)||(u+=" "),u});r.push(...i)}return new RegExp(r.join("|"))}function k0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var ci;function o6(e){let t=e.parentElement;if(!t)return;ci=document.createElement("div"),ci.className=J+"-input",ci.innerHTML=`
`,t.appendChild(ci);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function i6(){ci&&ci.remove()}async function L7(e){if(!Zn)try{let f=function(){c=e.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&o.flatAlias.includes(b)?(c=k0(b,o.codeAlias),u=l.slice(b.length+1)):u=l},y=function(){c="";let b=a6(o),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let w=l.lastIndexOf(u),k=l.slice(0,w).lastIndexOf(h[h.length-2]);s=l.slice(0,k+h[h.length-2].length)}if(s.endsWith(o.codePrefix))return;if(s.endsWith(":")&&o.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=k0(C,o.codeAlias),!c){P.warn("not found alias",C);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};An.forEach(b=>n[b]=[b,...n[b]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=document.activeElement;if(!i||i.tagName==="BODY")return;Zn=!0;let s="",u="",l=fa(i)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?f():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&f());let m=s6(u,o),g=await Pe({text:m,pageLangs:["en"]});P.debug("translateContent",m,g);let p={text:m||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!p.text||p.text.length>5e3)return;o6(i),Qe(Eu,Date.now());try{let b=await ra(p,{...e,translationService:e.inputTranslationService});l6(e),u6(e,i,s+b.text)}catch(b){if(b instanceof K){let h=b.uiConfig(e);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(_a,{detail:h}))}}finally{Zn=!1}}catch(t){throw Zn=!1,t}finally{Zn=!1,i6()}}async function F7(e,t,n){if(!Zn)try{let m=function(){s=t.config.inputTargetLanguage;let p=i.split(" ")[0];p&&p[0]&&(p=p[0].toLowerCase()+p.slice(1)),p.trim()&&n.flatAlias.includes(p)?(s=k0(p,n.codeAlias),o=i.slice(p.length+1)):o=i},g=function(){s="";let p=a6(n),f=i.split(p);if(f.length<2)return;if(o=f[f.length-1],a=f[0],f.length>2){let b=i.lastIndexOf(o),h=i.slice(0,b).lastIndexOf(f[f.length-2]);a=i.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",o="";return}let y=i.slice(a.length+1,i.indexOf(o)).trim();if(s=k0(y,n.codeAlias),!s){P.warn("not found alias",y);return}},r=document.activeElement;Zn=!0;let a="",o="",i=fa(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?m():(g(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&m());let u=s6(o,n),l=await Pe({text:u,pageLangs:["en"]});P.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!n6){n6=!0;let p=await $7(t);if(e.target&&e.target.focus(),p==="open_settings"){No(!0,"#input");return}else if(p==="open_learn_more"){Uo("https://immersivetranslate.com/docs/input/");return}else if(p==="disable_once"||p==="disable_forever"){if(A0=!1,p==="disable_forever"){let f=await hn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await fn(f)}else if(p==="disable_once"){let f=await hn();f.isShowInputTranslationConsent=!1,await fn(f)}return}else if(p==="close_disable_once"||p==="close_disable_forever"){if(A0=!1,p==="close_disable_forever"){let f=await hn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await fn(f)}return}else if(p==="enable"){let f=await hn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await fn(f)}else if(p==="close_enable"){let f=await hn();f.enableInputTranslation=!0,await fn(f)}}o6(r),Qe(Eu,Date.now());try{let p=await ra(c,{...t,translationService:t.inputTranslationService});l6(t),u6(t,r,a+p.text)}catch(p){if(p instanceof K){let f=p.uiConfig(t);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(_a,{detail:f}))}}finally{Zn=!1}}catch(r){throw Zn=!1,r}finally{Zn=!1,i6()}}function P7(){let e=document.activeElement;if(!e)return!1;if(_0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` + ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(b,h)=>"imt_"+h.replaceAll("translation","t"))},await Zt(a);let f=Ce().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let b=new URL(f);b.pathname=y.shareConfig.sharePath,f=b.toString()}Uo(f)}catch(p){P.error(p)}}async function Zb(){let e=await Qt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(Vf,{detail:JSON.stringify(e.draft)}))}async function F8(){try{if(await Uu("reportActive"))return;P.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Ad();await ce({url:zi+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),Qi("reportActive","1")}catch(e){P.error(e)}}d();d();var ey={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},ty={...It,"zh-CN":{...ey["zh-CN"],...It["zh-CN"]},"zh-TW":{...ey["zh-TW"],...It["zh-TW"]}},ny=ty;function oi(e,t,n){return sr(ty,e,t,or,n)}var sa=(e,t,n,r)=>{let a=uh[e]||e,o=lh[e],i=ch[e],s={"zh-CN":o,"zh-TW":i,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};d();function yp(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((o,i)=>(o[t[i]]=i,o),{}),a=Object.keys(r);for(let o of a){let i=o.replace(/MacCtrl/ig,"Ctrl");i&&xn(i,s=>{s.preventDefault();let u=r[o];_n({method:u,data:{trigger:"shortcut"}})})}}d();d();d();d();var ry=`${J}-float-ball`;function ua(e){return e.type=="logo"?D("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${ry}-logo-img`,children:[D("path",{fill:"none",d:"M0 0h24v24H0z"}),D("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?D("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[D("g",{"clip-path":"url(#clip0_2589_9951)",children:D("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),D("defs",{children:D("clipPath",{id:"clip0_2589_9951",children:D("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?D("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?D("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?D("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${ry}-translated-img`,children:[D("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),D("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?D("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:D("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}d();d();function ay(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},o=Object.keys(n);for(let l of o){let m=n[l].matches;for(let g of m)a[g]||(a[g]=[]),a[g].push(l)}let i=a[e];if(i&&i.length>0)for(let l of i)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(m=>m!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}d();d();function oy(e,t=2e3){return n=>{let r,a=0;return o=>{++a==e&&(n(o),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}d();var l0="DROP_DOWN_DEFAULT_VALUE";function Ep(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:o,style:i}=e;r=r||"",t=t??!0,o=o||80;let s=We(null);return D("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:l0,style:{maxWidth:`${o}px`,...i},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==l0){s.current.value=l0,s.current?.dispatchEvent(new Event("change"));let c=a.find(m=>m.value===l);c&&n(c)}},children:[{value:l0,label:e.label}].concat(a).map((u,l)=>D("option",{value:u.value,children:u.label},"option-"+l))})}d();d();function ii(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var P8=({date:e})=>{let{t}=ve(),[n,r]=se(!1);return De(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:D("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},M8=({minVersion:e})=>{let{t}=ve();return D("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},B8=()=>{let{t:e}=ve();return D("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},R8=({message:e,handleSyncing:t,date:n})=>{let{t:r}=ve();return D("p",{class:"text-sm",children:[r("failToSyncRules")," ",D("a",{onClick:t,children:r("retry")}),D("br",{}),r("failedReason"),"\uFF1A",e,D("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function xp(e){let{isShowError:t,request:n}=e,[r,a]=se(null),{t:o}=ve(),[i,s]=se(null),[u,l]=se(null),[c,m]=se(""),[g,p]=se(!1),[f,y]=se(!1),[b,h]=se(!1),[C,w]=se(null),[k,R]=se(null),v=Xt(),x=async()=>{m("");let B=i;if(i===null)try{let _=await n({url:Ni});_?(s(_),B=_,p(!0)):(m(o("unknownError")),l(null))}catch(_){l(null),m(_.message);return}B!==null?(e.setStorageBuildinConfig(B),l(!1),a(B.buildinConfigUpdatedAt)):(m(o("canNotFetchRemoteRule")),l(null))};return De(()=>{pn().then(B=>{let _=B.buildinConfigUpdatedAt;w(B);let E=new Date(_);if(a(_),v==="0.0.0"){h(!0);return}n({url:Ni}).then(O=>{let F=O,M=F.minVersion,N=v;s(F);let U=F.latestVersion;if(U&&(ii(N,U)?R(!0):R(!1)),ii(N,M)){let H=F.buildinConfigUpdatedAt;new Date(H)>E?(l(!0),x()):l(!1)}else y(!0),l(null)}).catch(O=>{l(null),m(O.message)})})},[]),De(()=>{pn().then(B=>{w(B)})},[r]),C?D("div",{class:"text-sm mt-2",style:{maxWidth:218},children:b?D(B8,{}):c?t===!1?null:D(R8,{handleSyncing:x,message:c,date:r||""}):f?t===!1?null:D(M8,{minVersion:i.minVersion}):u===null||u===!0?null:g?D(P8,{date:r}):null}):null}d();function I8(){return navigator.userAgent.indexOf("Mac")!==-1}var iy={Alt:"\u2325"};function c0(e=""){return I8()?Object.keys(iy).reduce((t,n)=>t.replace(n,iy[n]),e):e}d();function sy({config:e,isLogin:t,isProUser:n}){let{t:r}=ve();return Ru(e)?D("div",{}):D("div",{class:"flex items-center",children:[D("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Du:hh,children:[D("img",{src:t?Db:wb}),D("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),D("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Du:bh,children:D("img",{src:n?Cb:Sb})})]})}d();function uy({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=ve();if(!t)return null;let o=Pl(t.config.translationService,t.config.targetLanguage),i=An;o.length<=30&&(i=o.indexOf("auto")>=0?o:["auto",...o]);let s=o.filter(u=>u!=="auto");return D("div",{class:"flex mt-4 items-center",children:[D(O8,{supportedLanguages:i,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),D("img",{src:Ab,style:{maxWidth:"unset"},class:"mx-2"}),D(N8,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function O8(e){let{t}=ve(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),D("div",{class:"language-select-container",children:[D("label",{children:a}),D("select",{autoComplete:"off",class:"language-select",onChange:o=>{let i=o.target.value;i&&e.onSelected(i)},children:e.supportedLanguages.map((o,i)=>{let s=sa(o,e.interfaceLanguage),u="";return o==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=sa(r,e.interfaceLanguage)+` (${t("languages.auto")})`),D("option",{value:o,selected:o===e.value,children:u||s},"selectlink"+i)})})]})}function N8(e){return D("div",{class:"language-select-container",children:[D("label",{children:e.label}),D("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=sa(t,e.interfaceLanguage);return D("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}d();d();function la(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:o}=ve();return n=n||(o==="en"?144:160),D("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(i=>i.selected)?.value,onChange:i=>{let s=i.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((i,s)=>D("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+s))})}function ly(e){let{t}=ve(),{translationServiceItems:n,translationServiceOptions:r}=z8(e);return n.length?D(Nt,{children:[D(cy,{class:"mt-3",label:t("popupService"),items:r}),D(j8,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function cy(e){return D("div",{class:`min-select-container ${e.class||""}`,children:[D("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),D(la,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function j8({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=ve(),a=H8(e),o=U8(e),i=$e((u,l)=>{t(c=>{let m=c.translationServices||{},g=m[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...m,[a.id]:{...g,[u]:l}}}})},[]),s=Oe(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(m=>({label:`${m.label?r(m.label):m.value}`,value:m.value,selected:m.value==o[u.name],onSelected:()=>{i(u.name,m.value)}}));return{label:l,items:c}}),[o]);return!o||!a?.props?.length||!s||!s?.length?null:D(Nt,{children:s.map(({label:u,items:l},c)=>D(cy,{class:"mt-2",label:u,items:l},"field-"+c))})}function U8(e){return Oe(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function H8(e){return Oe(()=>{let{translationService:n}=e.config;if(ir[n])return Hu("translationService",n,e)},[ir,Hu,e])}function z8({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:o,openOptionsPage:i}){let{t:s}=ve(),u=Oe(()=>t?Zi(t,"translationService"):[],[Zi,t]),l=$e(m=>{let g=u.find(p=>p.id===m.value);if(g.ok){if(n(p=>({...p,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;g.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{o()},1)}else n(p=>({...p,translationService:g.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{i()},100)},[i,o,a,n]),c=Oe(()=>{let m=rt();return u.filter(p=>t.config.showUnconfiguredTranslationServiceInPopup===!1?p.ok:!0).map(p=>({label:`${s("translationServices."+p.id)}${p.ok?"":" "+(" "+(!e&&!m&&p.providers&&p.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:p.id,selected:p.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}d();d();function dy(e){let t;try{t=new URL(e)}catch{return!1}let n=R2(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(q8(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function q8(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}d();function my(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function py(e){let{t}=ve(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:o}=W8(e),[i,s]=se(()=>a?"excludeMatches":"matches"),u=Oe(()=>r||a||!1,[r,a]),l=$e(c=>{s(c),u&&o(c,n.hostname)},[s,o,u]);return D("div",{class:"flex justify-between mt-5",children:[D(la,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:i==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:i==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),D("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let m=c.target.checked;o(m?i:"default",n.hostname)}})]})}function W8({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:o,onTranslatePage:i,setSettings:s,onClose:u}){let l=null,c=null,m=null,g=null,p=null,{translationUrlPattern:f}=t.config;if(l=Oe(()=>new URL(e||""),[e]),t.config&&e&&dy(e)){c=my(e);let{matches:h,excludeMatches:C}=f;m=!!h.find(w=>ct(e,w)),g=!!C.find(w=>ct(e,w))}if(n&&n!=="auto"){let{translationLanguagePattern:h}=t.config,{matches:C}=h;C.includes(n)?p=!0:p=!1}let y=$e(()=>{let h=l.hostname,C=t.localConfig.tempTranslationUrlMatches||[],w=C.filter(R=>R.match!==h),k=!1;w.length!==C.length&&(k=!0),k&&r({...t.localConfig,tempTranslationUrlMatches:[...w]})},[r]),b=$e((h,C)=>{if(h==="default"){s(R=>{let v={...R.translationUrlPattern};return{...R,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...R.translationUrlPattern,matches:Tp(e,v.matches),excludeMatches:Tp(e,v.excludeMatches)}}}),y();return}let w=h,k=w==="matches"?"excludeMatches":"matches";l&&s(R=>{let v={...R.translationUrlPattern};return v[k]=Tp(e,v[k]),v[w]=Ou(C,v[w]),{...R,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...R.translationUrlPattern,...v}}}),w==="matches"&&a==="Original"?setTimeout(()=>{i(),u()},100):w==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{o(),u()},100)},[i,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:m,isNeverTranslateDomain:g,isAlwaysTranslateLang:p,handleTranslationUrlPatternSelected:b}}function Tp(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!ct(e,n)):t):[]}d();d();d();var $8=new AbortController,{signal:G8}=$8,d0=0,m0=0,si=!1,$a,gy=0,ca=[];function ui(e,t){V8();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",o=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let i=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){i=!i,i?(P.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,ui(n,t)):(P.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,ui(n,t))}document.addEventListener(Ii,s),ca.push(()=>{document.removeEventListener(Ii,s)});let u=Hn(g=>{if(!(Math.abs(g.clientX-d0)+Math.abs(g.clientY-m0)<=3)&&(d0=g.clientX,m0=g.clientY,i||si&&!$a)){let p=yy(n.rule,t);if(p){if(wp(p))return;Sp(n,!1,p)}}},i?700:300),l=g=>{let p=g.target;wp(p)||Sp(n,!0)},c=g=>{let p=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=xn.getPressedKeyCodes();if(f.length>1&&xn[p]&&(gy=Date.now(),si=!1),f.length===1&&xn[p]){let y=Date.now();si=!0,$a&&clearTimeout($a),$a=setTimeout(()=>{let b=gy-y;b>0&&b<=o?si=!1:l(g),$a=void 0},o)}};if(ca.push(()=>{$a&&clearTimeout($a)}),a)return;vp("mousemove",u,t),ca.push(()=>{t.removeEventListener("mousemove",u)});function m(){i?u.cancel():si=!1}if(vp("blur",m,t),ca.push(()=>{t.removeEventListener("blur",m)}),!i){let g=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",p=ph;vp("keyup",fy,t),ca.push(()=>{t.removeEventListener("keyup",fy)}),p.includes(g)?xn("*","mouseHover",c):xn(r.generalRule.mouseHoverHoldKey,"mouseHover",l),xn.setScope("mouseHover"),ca.push(()=>{xn.deleteScope("mouseHover")})}}function V8(){ca.forEach(e=>e()),ca=[],xn.setScope("all")}function fy(e){si=!1}function vp(e,t,n=window){return n.addEventListener(e,t,{signal:G8})}function Sp(e,t,n,r=window){if(n=n||yy(e.rule,r),!n){P.debug("can not find selection part!");return}if(Y8(n,t))return;if(wp(n)){P.debug("exclude dom");return}Jb(e,n);let o=_s();o&&(o.setupMouseHoverListener=ui);let i=on(e);i.excludeSelectors=[],i.selectors=[];let s=!1,u=fp({...o},e);_r({id:o.id,container:n,filterRule:i,force:!0,onParagraph:l=>{Ha(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let m=Date.now();Ze(Yf,m),at("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function yy(e,t){return K8(d0,m0,e,t)}function K8(e,t,n,r){let a=r2(e,t,n,r);if(a==null)return;let o=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=a2(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:by(l,n)},i=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){P.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{X8(r)}),!0}function J8(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function X8(e){let t=_s();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Ts(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function Cp(e){return!!(e.host&&e.mode)}function hy(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||Cp(n))return e;for(;n&&n.nodeName!=="BODY"&&!Cp(n)&&Fd(n,t);){let r=n.parentNode;if(r&&Cp(r))break;n=r}return n}function by(e,t){return e.nodeType===Node.TEXT_NODE||Fd(e,t)?hy(e,t):e}function Ey(e,t){d0=t.clientX,m0=t.clientY,Sp(e,!0)}var Ls=[];function Dp(e,t){let n=0,r=0,a,o=s=>{let u=new Date().getTime();r++,u-n<300?i(s):r=1,n=u},i=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",o),Ls.push(()=>{document.removeEventListener("click",o)})}function xy(e,t){let n=0,r=0,a=0,o=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},i=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",o),document.addEventListener("touchend",i),Ls.push(()=>{document.removeEventListener("touchstart",o),document.removeEventListener("touchend",i)})}function p0(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Ls.push(()=>{document.removeEventListener("touchstart",r)})}var Ap={touchShortcutsOff:()=>{},"multipleClick.2":Dp,"multipleClick.3":Dp,"multipleClick.4":Dp,"slide.left":xy,"slide.right":xy,"fingers.2":p0,"fingers.3":p0,"fingers.4":p0,"fingers.5":p0};async function vy(e){try{rD();let t=await Dr(),n=dh.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=Q8(e,t,r.command),o=Ap[a];if(a==="touchShortcutsOff"||!o)return;let i=a.split(".");if(i.length!==2)return;let s=i[1];s&&o(s,u=>{nD(r.command,e,u)})})}catch(t){P.error(t)}}function Q8(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var Z8=()=>{kp();let e=new CustomEvent(Cr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},eD=()=>{Lp();let e=new CustomEvent(Cr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},tD=()=>{_p();let e=new CustomEvent(Cr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},Ty=0,nD=(e,t,n)=>{new Date().getTime()-Ty<200||(Ty=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?Z8():e==="touchShortcutsToggleTranslationMask"?tD():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?eD():e==="touchShortcutsToggleTranslateTouchElement"&&Ey(t,n))};function rD(){Ls.forEach(e=>{e()}),Ls=[]}function Cy(e){let{t}=ve(),{ctx:n,setSettings:r}=e,a=aD(e);return $i(n.localConfig)?a.length?D("div",{class:"flex mt-3 items-center justify-between",children:[D("div",{class:"flex items-center",children:[D("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),D(la,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),D("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:o=>{let i=o.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Hi[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:i?u:"Off"}}})}})]}):null:D(oD,{...e})}function aD({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=ve(),a=Oe(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),o=Oe(()=>Hi.filter(s=>!(s==="Off"||Hi.includes(a)&&s==="OtherCustom")),[e,a]);return Oe(()=>o.map(s=>{let u=r("mouseHoldKey",{key:c0(s)}),l=Hi.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:m=>{m.value==="Other"?t("#shortcuts"):n(g=>{let p={...g.generalRule,mouseHoverPreferenceKey:m.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(p.mouseHoverHoldKey=m.value),{...g,generalRule:p}})}}}),[o,a])}function oD(e){let{ctx:t,setSettings:n}=e,{t:r}=ve(),a=t.config.generalRule,o=Object.keys(Ap).filter(l=>l!="touchShortcutsOff"),i=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return i!=="touchShortcutsOff"&&i!==s&&(u=i),D("div",{class:"flex mt-3 items-center justify-between",children:[D("div",{class:"flex items-center",children:[D("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),D(la,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:o.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(m){n(g=>{let p={...g.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:m.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(p.touchShortcutsToggleTranslateTouchElement=m.value),{...g,generalRule:p}})}}))})]}),D("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(m=>{let g=m.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...m,generalRule:{...m.generalRule,touchShortcutsToggleTranslateTouchElement:c?g:"touchShortcutsOff"}}})}})]})}d();function Sy(e){let{isAlwaysTranslateLang:t}=iD({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=ve();if(e.currentLang!=="auto")return D("div",{class:"flex justify-between mt-3 items-center",children:[D("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:sa(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),D("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let o=a.target.checked;r(o?"matches":void 0)}})]});return D("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:Nu(e.currentLang,u.matches),excludeMatches:Nu(e.currentLang,u.excludeMatches)}}});return}let o=a,i=o==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[o]=Ou(e.currentLang,u[o]),u[i]=Nu(e.currentLang,u[i]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),o==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function iD({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}d();d();var sD=({text:e,children:t,position:n="top",containerStyle:r,containerClass:a,multiple:o=!1,width:i,delay:s=0,disable:u,enableMobile:l,tipStyle:c,onHidden:m,onShow:g})=>{let[p,f]=se(!1),y=We(null),b=We(null),h=()=>{u||!l&&st().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{f(!0),g?.()},s))},C=()=>{st().any&&(b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{w()},2e3))},w=()=>{y.current&&(clearTimeout(y.current),m?.()),f(!1)},k=Oe(()=>{let R={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(o&&(R.maxWidth="200px",i&&(R.width=i+"px"),R.whiteSpace="normal"),n){case"top":return{...R,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...R,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...R,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...R,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,o,i,c]);return D("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[D("div",{onMouseEnter:h,onMouseLeave:w,onTouchStart:()=>{l&&h()},onTouchEnd:()=>{l&&C()},children:t}),p&&D("div",{style:k,role:"tooltip",children:e})]})},da=sD;d();var wy=D("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),D("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),D("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),D("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),Dy=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),Ay=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),ky=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),_y=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),D("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),D("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Ly=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),D("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Fy=D("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:D("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function My({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=ve(),a=Ce(),o=Math.round((Eo.supportedVideoSubtitleSites||[]).length/10),i=Oe(()=>[{title:r("widget.translateFile"),icon:wy,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:Dy,tooltipText:r("widget.videoSubtitleTooltip",{count:o*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:Ay,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e(Th)}}],[a,e,t,r]);return D("div",{class:"widgets-container mt-5",children:i.map(s=>s.tooltipText?D(da,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:D(Py,{...s})}):D(Py,{...s}))})}function Py(e){return D("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,D("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Fp(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:o,onAutoEnableSubtitleChanged:i}=e,[s,u]=se(""),[l,c]=se(o),[m,g]=se(null),[p,f]=se(null);De(()=>{Wt.get(qt,null).then(C=>{C?(g(C),f(Jt(C))):f(!1)}).catch(C=>{f(!1)})},[]);let y=!0,b=rt();n&&b&&(y=n.generalRule.showSponsorOnSafari);let h=Ru(n);return D("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[D("div",{class:"popup-content text-sm",children:[h?D("div",{style:{marginTop:-12}}):D("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[D(sy,{isLogin:!!m,isProUser:!!p,config:n}),D(pD,{openSharePage:r})]}),D(uy,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),D(ly,{isProUser:!!p,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),D("div",{class:"flex flex-row mt-3 items-center",children:[D(lD,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),D(dD,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),D("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),D("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),D(xp,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),D("div",{class:"text-sm px-1 text-gray-2",children:[D(py,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),D(Cy,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),D(Sy,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),D(uD,{onAutoEnableSubtitleChanged:i,ctx:a,setSettings:t})]}),D(My,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),D(cD,{...e,isProUser:!!p,isShowPricing:y,setMessage:u})]})}function uD(e){let{t}=ve(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return Oe(()=>!n.rule.subtitleRule.disabled&&Jc.includes(n.rule.subtitleRule.type||""),[n,Jc])?D("div",{class:"flex justify-between mt-3 items-center",children:[D("label",{class:"mb-0",children:t("autoEnableSubtitle")}),D("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:i=>{let s=i.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function lD(e){let{t}=ve(),n=e.ctx.state.translationMode,r=()=>{let o=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(o)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return D(da,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:D("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?_y:Ly})})}function cD(e){let{t,lang:n}=ve(),{isProUser:r,isShowPricing:a}=e,{config:o}=e.ctx,i=60;n.startsWith("zh")||(i=70);let s=Ce(),u=`${e.type}_more`;return D("footer",{children:D("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[D("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[ky,D("span",{class:"ml-1 text-gray-6",children:t("options")})]}),D(mD,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),D(Ep,{label:t("more"),showArrow:!0,maxWidth:i,className:"text-gray-6 transform-padding-left more",onSelected:p=>{p.value==="openPremium"?(globalThis.open(go),e.onClose()):p.value==="changeToOnlyTranslationMode"?c("translation"):p.value==="changeToDualTranslationMode"?c("dual"):p.value==="translateTheWholePage"?e.onTranslateTheWholePage():p.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():p.value==="translateTheMainPage"?e.onTranslateTheMainPage():p.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):p.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):p.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):p.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):p.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):p.value==="donate"?(globalThis.open(o.donateUrl),e.onClose()):p.value==="feedback"?(globalThis.open(o.feedbackUrl),e.onClose()):p.value==="options"?(e.openOptionsPage(),e.onClose()):p.value==="changeToTranslateTheWholePage"?m():p.value==="changeToTranslateTheMainPage"?g():p.value==="about"?e.openAboutPage():p.value==="toggleEnabled"?e.onToggleEnabled():p.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):p.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):p.value==="goPro"&&e.onOpenUrl(go,u)},menus:[o.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},o.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},o.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},o.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(p){p.preventDefault(),e.openOptionsPage()}function c(p){e.setSettings(f=>({...f,translationMode:p})),e.onSwitchTranslationMode(p)}function m(){e.setSettings(p=>({...p,translationArea:"body"})),e.onTranslateTheWholePage()}function g(){e.setSettings(p=>({...p,translationArea:"main"})),e.onTranslateTheMainPage()}}function dD({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:o,noPermissionPDF:i}){let{t:s,lang:u}=ve(),l=r.config,c=Oe(()=>new URL(e||""),[e]),m=c?.pathname.toLowerCase().endsWith(".pdf");Oa(r?.rule)&&!m&&(m=!0);let g=s("translate");t==="Translated"||t==="Error"?g=s("show-original"):t==="Original"?m?bo()&&c.protocol==="file:"||i?g=s("translate-firefox-local-pdf"):Ee()?g=s("noSupportTranslate-pdf"):g=s("translate-pdf"):g=s("translate"):g=s(t);let p=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Lu()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(g+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):g+=` (${c0(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(p+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),D("button",{class:"mb-0 main-button",onClick:()=>{m?n&&n():a()},"aria-busy":t==="Translating",disabled:o||t==="Translating",children:g})}function mD({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:o}=ve(),i=Xt();return D("div",{class:"flex",children:D("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:oy(7)(s),children:["V",i,e.config.enabled?null:D("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function pD(e){let{t}=ve();return D("div",{class:"share-button-container",onClick:e.openSharePage,children:[D("span",{class:"text-gray-9",children:t("buildSnapshots")}),Fy]})}d();d();d();d();var Pp={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return oe.storage[n].get(r)},set:(e,t,n)=>oe.storage[n].set({[e]:t})};function g0(e,t,n){let[r]=se(()=>typeof t=="function"?t():t),[a]=se(n),[o,i]=se(r),[s,u]=se(!1),[l,c]=se("");De(()=>{Pp.get(e,r,a).then(g=>{g[e]&&i(g[e]),u(!0),c("")}).catch(g=>{u(!1),c(g)})},[e,r,a]);let m=$e(g=>{let p=typeof g=="function"?g(o):g;P.debug("new settings",p),Pp.set(e,p,a).then(()=>{i(p),u(!0),c("")}).catch(f=>{i(p),u(!1),c(f)})},[a,e,o]);return[o,m,s,l]}d();function Mp(e,t,n){let r=[];return function(){let[o,i,s,u]=g0(e,t,n),l=$e(c=>{for(let m of r)m(c)},[]);return De(()=>(r.push(i),()=>{r.splice(r.indexOf(i),1)}),[i]),[o,l,s,u]}}function By(e,t){return Mp(e,t,"sync")}var gD="userConfig",fD=null,hD=By(gD,fD);function Fr(e){let[t,n,r,a]=hD(),o=$e(i=>{let s=typeof i=="function"?i(t):i;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,o,r,a,n]}d();d();async function f0(e){try{let t=new Date;P.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await oe.storage.local.set({[ji]:t.toISOString()}),await bD(),Ee()||await j2()}catch(t){P.error("run cron task failed",t)}}async function Ry(){let t=(await an()).interval;if(t){let n=await oe.storage.local.get(ji);if(n&&n[ji]){let r=n[ji];if(Date.now()-new Date(r).getTime()r?(await oe.storage.local.set({buildinConfig:t}),P.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Zr({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{P.error("send content message request failed from cron task",u)})):P.debug(`no need to sync rules, latest: ${r}`):P.info(`local version is too old, please update to ${i} or later`)}catch(e){P.error("sync rules error: ",e)}}d();d();d();d();d();d();var Bp;function Wp(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function Wy(e,t=","){return e.map(Wp).join(t)}var $y=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function b0(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function y0(e,t="@media "){return t+Fn(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function Fn(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function yD(){}var Gt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Gy(e){return e.match(/[-=:;]/g)?.length||0}function Up(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Gy(e),15)<<18}var ED=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function $p({n:e,i:t,v:n=[]},r,a,o){e&&(e=Wp({n:e,i:t,v:n})),o=[...Fn(o)];for(let s of n){let u=r.theme("screens",s);for(let l of Fn(u&&y0(u)||r.v(s))){var i;o.push(l),a|=u?67108864|Up(l):s=="dark"?1073741824:l[0]=="@"?Up(l):(i=l,1<<~(/:([a-z-]+)/.test(i)&&~ED.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:o,i:t}}var Gp=new Map;function Iy(e){if(e.d){let t=[],n=Rp(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?Rp(r,o=>Rp(a,i=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(i);if(s){let u=o.indexOf(s[1]);return~u?o.slice(0,u)+s[0]+o.slice(u+s[1].length):Ip(o,i)}return Ip(i,o)})):r,"&"),r=>Ip(r,e.n?"."+$y(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function Rp(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function Ip(e,t){return e.replace(/&/g,t)}var Oy=new Intl.Collator("en",{numeric:!0});function xD(e,t){for(var n=0,r=e.length;n>1;0>=Vy(e[a],t)?n=a+1:r=a}return r}function Vy(e,t){let n=e.p&Gt.o;return n==(t.p&Gt.o)&&(n==Gt.b||n==Gt.o)?0:e.p-t.p||e.o-t.o||Oy.compare(Ny(e.n),Ny(t.n))||Oy.compare(jy(e.n),jy(t.n))}function Ny(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function jy(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Op(e,t){return Math.round(parseInt(e,16)*t)}function ma(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let o=(e.length-1)/3,i=[17,1,.062272][o-1];return`rgba(${[Op(e.substr(1,o),i),Op(e.substr(1+o,o),i),Op(e.substr(1+2*o,o),i),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function Ky(e,t,n,r,a=[]){return function o(i,{n:s,p:u,r:l=[],i:c},m){let g=[],p="",f=0,y=0;for(let C in i||{}){var b,h;let w=i[C];if(C[0]=="@"){if(!w)continue;if(C[1]=="a"){g.push(...Jy(s,u,Kp(""+w),m,u,l,c,!0));continue}if(C[1]=="l"){for(let k of Fn(w))g.push(...o(k,{n:s,p:(b=Gt[C[7]],u&~Gt.o|b),r:C[7]=="d"?[]:l,i:c},m));continue}if(C[1]=="i"){g.push(...Fn(w).map(k=>({p:-1,o:0,r:[],d:C+" "+k})));continue}if(C[1]=="k"){g.push({p:Gt.d,o:0,r:[C],d:o(w,{p:Gt.d},m).map(Iy).join("")});continue}if(C[1]=="f"){g.push(...Fn(w).map(k=>({p:Gt.d,o:0,r:[C],d:o(k,{p:Gt.d},m).map(Iy).join("")})));continue}}if(typeof w!="object"||Array.isArray(w))C=="label"&&w?s=w+b0(JSON.stringify([u,c,i])):(w||w===0)&&(C=C.replace(/[A-Z]/g,k=>"-"+k.toLowerCase()),y+=1,f=Math.max(f,(h=C)[0]=="-"?0:Gy(h)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(h)?+!!RegExp.$1||-!!RegExp.$2:0)+1),p+=(p?";":"")+Fn(w).map(k=>m.s(C,Yy(""+k,m.theme)+(c?" !important":""))).join(";"));else if(C[0]=="@"||C.includes("&")){let k=u;C[0]=="@"&&(C=C.replace(/\bscreen\(([^)]+)\)/g,(R,v)=>{let x=m.theme("screens",v);return x?(k|=67108864,y0(x,"")):R}),k|=Up(C)),g.push(...o(w,{n:s,p:k,r:[...l,C],i:c},m))}else g.push(...o(w,{p:u,r:[...l,C]},m))}return g.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(f||15,15),r:l,d:p}),g.sort(Vy)}(e,$p(t,n,r,a),n)}function Yy(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,o,i="")=>{let s=t(a,i);return typeof s=="function"&&/color|fill|stroke/i.test(a)?ma(s):""+Fn(s).filter(u=>Object(u)!==u)})}function Vp(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function Hp(e,t,n=Gt.u,r,a){let o=[];for(let i of e)for(let s of function(u,l,c,m,g){u={...u,i:u.i||g};let p=function(f,y){let b=Gp.get(f.n);return b?b(f,y):y.r(f.n,f.v[0]=="dark")}(u,l);return p?typeof p=="string"?({r:m,p:c}=$p(u,l,c,m),Vp(Hp(Kp(p),l,c,m,u.i),u.n)):Array.isArray(p)?p.map(f=>{var y,b;return{o:0,...f,r:[...Fn(m),...Fn(f.r)],p:(y=c,b=f.p??c,y&~Gt.o|b)}}):Ky(p,u,l,c,m):[{c:Wp(u),p:0,o:0,r:[]}]}(i,t,n,r,a))o.splice(xD(o,s),0,s);return o}function Jy(e,t,n,r,a,o,i,s){return Vp((s?n.flatMap(u=>Hp([u],r,a,o,i)):Hp(n,r,a,o,i)).map(u=>u.p&Gt.o&&(u.n||t==Gt.b)?{...u,p:u.p&~Gt.o|t,o:0}:u),e)}function TD(e,t,n,r){var a;return a=(o,i)=>{let{n:s,p:u,r:l,i:c}=$p(o,i,t);return n&&Jy(s,t,n,i,u,l,c,r)},Gp.set(e,a),e}function Np(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,o=!1,i="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),o=!o),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(i+=(i&&"-")+s)}i&&(o&&(i="-"+i),t[0].push({n:i,v:r.filter(vD),i:a}))}}function vD(e,t,n){return n.indexOf(e)==t}var Uy=new Map;function Kp(e){let t=Uy.get(e);if(!t){let n=[],r=[[]],a=0,o=0,i=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Np(n,r)),a=s+1};for(;s1?m.slice(0,-1)+b0(JSON.stringify([m,g])):m+"("+Wy(g)+")",Gt.a,g,/@$/.test(m))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),Uy.set(e,t=r[0])}return t}function Xy(e,t,n){return t.reduce((r,a,o)=>r+n(a)+e[o+1],e[0])}function Qy(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?Xy(e,t,n=>jp(n).trim()):t.filter(Boolean).reduce((n,r)=>n+jp(r),e?jp(e):"")}function jp(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=Qy(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var Yoe=Zy("@"),Joe=Zy("~");function Zy(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...o){return t(r,a,o)}}});function t(n,r,a){return Wy(Kp(n+e+"("+Qy(r,a)+")"))}}function zp(e,t){return Array.isArray(e)?Hy(Xy(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?Hy(e):[e]}var CD=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function Hy(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=CD.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))),n[0][t[1]]=t[2]);return r}function e9(e,...t){var n;let r=zp(e,t),a=(r.find(o=>o.label)?.label||"css")+b0(JSON.stringify(r));return n=(o,i)=>Vp(r.flatMap(s=>Ky(s,o,i,Gt.o)),a),Gp.set(a,n),a}var Xoe=new Proxy(function(e,t){return zy("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return zy(t,n,r)}}});function zy(e,t,n){return{toString(){return e9({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function Z(e,t,n){return[e,SD(t,n)]}function SD(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):qp(n,1)}):n=>e||{[n[1]]:qp(n,2)}}function qp(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function te(e,t,n,r){return[e,wD(t,n,r)]}function wD(e,t,n){let r=typeof t=="string"?(a,o)=>({[t]:n?n(a,o):a._}):t||(({1:a,_:o},i,s)=>({[a||s]:o}));return(a,o)=>{let i=t9(e||a[1]),s=o.theme(i,a.$$)??li(a.$$,i,o);if(s!=null)return a._=qp(a,0,s),r(a,o,i)}}function Pt(e,t={},n){return[e,DD(t,n)]}function DD(e={},t){return(n,r)=>{let{section:a=t9(n[0]).replace("-","")+"Color"}=e,[o,i]=AD(n.$$);if(!o)return;let s=r.theme(a,o)||li(o,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:m}=e,g=r.theme(l,i||"DEFAULT")||i&&li(i,l,r),p=t||(({_:y})=>{let b=Fs(c,y);return m?{[m]:b}:b});n._={value:ma(s,{opacityVariable:u||void 0,opacityValue:g||void 0}),color:y=>ma(s,y),opacityVariable:u||void 0,opacityValue:g||void 0};let f=p(n,r);if(!n.dark){let y=r.d(a,o,s);y&&y!==s&&(n._={value:ma(y,{opacityVariable:u||void 0,opacityValue:g||"1"}),color:b=>ma(y,b),opacityVariable:u||void 0,opacityValue:g||void 0},f={"&":f,[r.v("dark")]:p(n,r)})}return f}}function AD(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function Fs(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function li(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=h0(Yy(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function t9(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function h0(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>h0(n)+r+h0(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var Qoe=Symbol();var n9=new Proxy(yD,{apply(e,t,n){return Bp(n[0])},get(e,t){let n=Bp[t];return typeof n=="function"?function(){return n.apply(Bp,arguments)}:n}});var Zoe=function e(t){return new Proxy(function(n,...r){return qy(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...o){return qy(t,r,a,o)}}})}();function qy(e,t,n,r){return{toString(){let a=zp(n,r),o=$y(t+b0(JSON.stringify([t,a])));return(typeof e=="function"?e:n9)(e9({[`@keyframes ${o}`]:zp(n,r)})),o}}}d();d();d();d();d();var r9={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...Pn(4,"rem",4,.5,.5),...Pn(12,"rem",4,5),14:"3.5rem",...Pn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:ze("blur"),backdropBrightness:ze("brightness"),backdropContrast:ze("contrast"),backdropGrayscale:ze("grayscale"),backdropHueRotate:ze("hueRotate"),backdropInvert:ze("invert"),backdropOpacity:ze("opacity"),backdropSaturate:ze("saturate"),backdropSepia:ze("sepia"),backgroundColor:ze("colors"),backgroundImage:{none:"none"},backgroundOpacity:ze("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...Pn(200,"",100,0,50),...Pn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:ze("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:ze("spacing"),borderWidth:{DEFAULT:"1px",...Nn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:ze("colors"),caretColor:ze("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...Pn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:ze("borderColor"),divideOpacity:ze("borderOpacity"),divideWidth:ze("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...Ps(2,6),...Ps(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:ze("spacing"),gradientColorStops:ze("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...Ps(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...Ps(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...Pn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...Pn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:ze("spacing"),placeholderColor:ze("colors"),placeholderOpacity:ze("opacity"),outlineColor:ze("colors"),outlineOffset:Nn(8,"px"),outlineWidth:Nn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:ze("colors"),ringOffsetWidth:Nn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Nn(8,"px")},rotate:{...Nn(2,"deg"),...Nn(12,"deg",3),...Nn(180,"deg",45)},saturate:Pn(200,"",100,0,50),scale:{...Pn(150,"",100,0,50),...Pn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:ze("spacing"),scrollPadding:ze("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Nn(2,"deg"),...Nn(12,"deg",3)},space:ze("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:Pn(2),textColor:ze("colors"),textDecorationColor:ze("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Nn(8,"px")},textUnderlineOffset:{auto:"auto",...Nn(8,"px")},textIndent:ze("spacing"),textOpacity:ze("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:ze("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...Ps(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...Pn(50,"",1,0,10),auto:"auto"}};function Ps(e,t){let n={};do for(var r=1;rt(e)}var bie={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${r9.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${r9.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},Eie=[Z("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:li(`[${t}]`,"",n)}}})),Z("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),te("aspect-","aspectRatio"),Z("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...i("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(o[y0(u)]={"&":{maxWidth:u,...i(s)}})}return o;function i(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),te("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),Z("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),Z("box-(border|content)","boxSizing",({1:e})=>e+"-box"),Z("hidden",{display:"none"}),Z("table-(auto|fixed)","tableLayout"),Z(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",Z("isolate","isolation"),Z("object-(contain|cover|fill|none|scale-down)","objectFit"),te("object-","objectPosition"),Z("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",E0),Z("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),Z("(static|fixed|absolute|relative|sticky)","position"),te("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),te("-?(top|bottom|left|right)(?:$|-)","inset"),Z("(visible|collapse)","visibility"),Z("invisible",{visibility:"hidden"}),te("-?z-","zIndex"),Z("flex-((row|col)(-reverse)?)","flexDirection",a9),Z("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),te("(flex-(?:grow|shrink))(?:$|-)"),te("(flex)-"),te("grow(?:$|-)","flexGrow"),te("shrink(?:$|-)","flexShrink"),te("basis-","flexBasis"),te("-?(order)-"),"-?(order)-(\\d+)",te("grid-cols-","gridTemplateColumns"),Z("grid-cols-(\\d+)","gridTemplateColumns",u9),te("col-","gridColumn"),Z("col-(span)-(\\d+)","gridColumn",s9),te("col-start-","gridColumnStart"),Z("col-start-(auto|\\d+)","gridColumnStart"),te("col-end-","gridColumnEnd"),Z("col-end-(auto|\\d+)","gridColumnEnd"),te("grid-rows-","gridTemplateRows"),Z("grid-rows-(\\d+)","gridTemplateRows",u9),te("row-","gridRow"),Z("row-(span)-(\\d+)","gridRow",s9),te("row-start-","gridRowStart"),Z("row-start-(auto|\\d+)","gridRowStart"),te("row-end-","gridRowEnd"),Z("row-end-(auto|\\d+)","gridRowEnd"),Z("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>E0(a9(e))),Z("grid-flow-(dense)","gridAutoFlow"),te("auto-cols-","gridAutoColumns"),te("auto-rows-","gridAutoRows"),te("gap-x(?:$|-)","gap","columnGap"),te("gap-y(?:$|-)","gap","rowGap"),te("gap(?:$|-)","gap"),"(justify-(?:items|self))-",Z("justify-","justifyContent",o9),Z("(content|items|self)-",e=>({["align-"+e[1]]:o9(e)})),Z("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),te("p([xytrbl])?(?:$|-)","padding",ci("padding")),te("-?m([xytrbl])?(?:$|-)","margin",ci("margin")),te("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),Z("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),te("w-","width"),te("min-w-","minWidth"),te("max-w-","maxWidth"),te("h-","height"),te("min-h-","minHeight"),te("max-h-","maxHeight"),te("font-","fontWeight"),te("font-","fontFamily",({_:e})=>typeof(e=Fn(e))[1]=="string"?{fontFamily:Qn(e)}:{fontFamily:Qn(e[0]),...e[1]}),Z("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),Z("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),Z("italic","fontStyle"),Z("not-italic",{fontStyle:"normal"}),Z("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...pa({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),te("tracking-","letterSpacing"),te("leading-","lineHeight"),Z("list-(inside|outside)","listStylePosition"),te("list-","listStyleType"),Z("list-","listStyleType"),te("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Pt("placeholder-",{property:"color",selector:"&::placeholder"}),Z("text-(left|center|right|justify|start|end)","textAlign"),Z("text-(ellipsis|clip)","textOverflow"),te("text-opacity-","textOpacity","--tw-text-opacity"),Pt("text-",{property:"color"}),te("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),te("indent-","textIndent"),Z("(overline|underline|line-through)","textDecorationLine"),Z("no-underline",{textDecorationLine:"none"}),te("underline-offset-","textUnderlineOffset"),Pt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),te("decoration-","textDecorationThickness"),Z("decoration-","textDecorationStyle"),Z("(uppercase|lowercase|capitalize)","textTransform"),Z("normal-case",{textTransform:"none"}),Z("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Z("align-","verticalAlign"),Z("whitespace-","whiteSpace"),Z("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),Z("break-words",{overflowWrap:"break-word"}),Z("break-all",{wordBreak:"break-all"}),Z("break-keep",{wordBreak:"keep-all"}),Pt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Pt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),Z("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${Ga(e," ")},var(--tw-gradient-stops))`),Pt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Pt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Pt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),Z("bg-(fixed|local|scroll)","backgroundAttachment"),Z("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),Z(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),Z("bg-blend-","backgroundBlendMode"),Z("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),te("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Pt("bg-",{section:"backgroundColor"}),te("bg-","backgroundImage"),te("bg-","backgroundPosition"),Z("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",E0),te("bg-","backgroundSize"),te("rounded(?:$|-)","borderRadius"),te("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${Ga(n[0])}-radius`]:t,[`border-${Ga(n[1])}-radius`]:t}}),Z("border-(collapse|separate)","borderCollapse"),te("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),Z("border-(solid|dashed|dotted|double|none)","borderStyle"),te("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...pa({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Pt("border-([xytrbl])-",{section:"borderColor"},ci("border","Color")),Pt("border-"),te("border-([xytrbl])(?:$|-)","borderWidth",ci("border","Width")),te("border(?:$|-)","borderWidth"),te("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),Z("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),Z("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),te("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${Ga(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${Ga(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Pt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),te("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Pt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),te("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),Z("ring-inset",{"--tw-ring-inset":"inset"}),Pt("ring-",{property:"--tw-ring-color"}),te("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...pa({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":ma(t("ringOffsetColor","","#fff")),"--tw-ring-color":ma(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Pt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),te("shadow(?:$|-)","boxShadow",({_:e})=>({...pa({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":Qn(e),"--tw-shadow-colored":Qn(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),te("(opacity)-"),Z("mix-blend-","mixBlendMode"),...i9(),...i9("backdrop-"),te("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:Qn(e),transitionTimingFunction:e._=="none"?void 0:Qn(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:Qn(t("transitionDuration",""))})),te("duration(?:$|-)","transitionDuration","transitionDuration",Qn),te("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",Qn),te("delay(?:$|-)","transitionDelay","transitionDelay",Qn),te("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=Qn(e),o=a.split(" "),i=t("keyframes",o[0]);return i?{["@keyframes "+(o[0]=r(n(o[0])))]:i,animation:o.join(" ")}:{animation:a}}),"(transform)-(none)",Z("transform",Jp),Z("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":l9(e=="gpu")})),te("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...Jp()})),te("-?(rotate)-","rotate",Yp),te("-?(translate-[xy])-","translate",Yp),te("-?(skew-[xy])-","skew",Yp),Z("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",E0),"(appearance)-",te("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",te("(cursor)-"),"(cursor)-",Z("snap-(none)","scroll-snap-type"),Z("snap-(x|y|both)",({1:e})=>({...pa({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),Z("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),Z("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),Z("snap-(normal|always)","scroll-snap-stop"),Z("scroll-(auto|smooth)","scroll-behavior"),te("scroll-p([xytrbl])?(?:$|-)","padding",ci("scroll-padding")),te("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",ci("scroll-margin")),Z("touch-(auto|none|manipulation)","touch-action"),Z("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...pa({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),Z("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),Z("outline",{outlineStyle:"solid"}),Z("outline-(dashed|dotted|double)","outlineStyle"),te("-?(outline-offset)-"),Pt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),te("outline-","outlineWidth"),"(pointer-events)-",te("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],Z("select-(none|text|all|auto)","userSelect"),Pt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Pt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),te("stroke-","strokeWidth"),Z("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),Z("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function E0(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function a9(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function Ga(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function Qn(e){return e&&""+(e._||e)}function o9({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function ci(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...Fs(e+"-"+Ga(a[0])+t,r),...Fs(e+"-"+Ga(a[1])+t,r)}:Fs(e+t,r)}}function i9(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...pa(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,Z(`${e}filter`,n),...t.map(r=>te(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:o})=>({[`--tw-${a}`]:Fn(o).map(i=>`${r}(${i})`).join(" "),...n})))]}function Yp({1:e,_:t}){return{["--tw-"+e]:t,...Jp()}}function Jp(){return{...pa({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":l9()}),transform:"var(--tw-transform)"}}function l9(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function s9({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function u9({1:e}){return`repeat(${e},minmax(0,1fr))`}function pa(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}d();d();var x0=globalThis||(typeof window<"u"?window:self),LD=Object.create,Qp=Object.defineProperty,FD=Object.getOwnPropertyDescriptor,PD=Object.getOwnPropertyNames,MD=Object.getPrototypeOf,BD=Object.prototype.hasOwnProperty,RD=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ID=(e,t)=>{for(var n in t)Qp(e,n,{get:t[n],enumerable:!0})},Xp=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of PD(t))!BD.call(e,a)&&a!==n&&Qp(e,a,{get:()=>t[a],enumerable:!(r=FD(t,a))||r.enumerable});return e},OD=(e,t,n)=>(Xp(e,t,"default"),n&&Xp(n,t,"default")),d9=(e,t,n)=>(n=e!=null?LD(MD(e)):{},Xp(t||!e||!e.__esModule?Qp(n,"default",{value:e,enumerable:!0}):n,e)),m9=RD((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,m){var g=new XMLHttpRequest;g.open("GET",l),g.responseType="blob",g.onload=function(){u(g.response,c,m)},g.onerror=function(){},g.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof x0=="object"&&x0.global===x0?x0:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,m){var g=i.URL||i.webkitURL,p=document.createElement("a");c=c||l.name||"download",p.download=c,p.rel="noopener",typeof l=="string"?(p.href=l,p.origin===location.origin?o(p):a(p.href)?r(l,c,m):o(p,p.target="_blank")):(p.href=g.createObjectURL(l),setTimeout(function(){g.revokeObjectURL(p.href)},4e4),setTimeout(function(){o(p)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,m){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,m),c);else if(a(l))r(l,c,m);else{var g=document.createElement("a");g.href=l,g.target="_blank",setTimeout(function(){o(g)})}}:function(l,c,m,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,m);var p=l.type==="application/octet-stream",f=/constructor/i.test(i.HTMLElement)||i.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||p&&f||s)&&typeof FileReader<"u"){var b=new FileReader;b.onloadend=function(){var w=b.result;w=y?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=w:location=w,g=null},b.readAsDataURL(l)}else{var h=i.URL||i.webkitURL,C=h.createObjectURL(l);g?g.location=C:location.href=C,g=null,setTimeout(function(){h.revokeObjectURL(C)},4e4)}});i.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),p9={};ID(p9,{default:()=>T0});var ND=d9(m9());OD(p9,d9(m9()));var{default:c9,...jD}=ND,T0=c9!==void 0?c9:jD;d();d();d();d();d();d();var ose=Ce().REDIRECT_URL;d();var Ose=Co([]);function h9(e){let[t,n]=se(null);return De(()=>{pn().then(r=>{n(r),P.debug("current config",r)})},[]),De(()=>{pn().then(r=>{n(r)})},[e]),t}function b9(e){let[t,n]=se(null);return De(()=>{e&&Ht({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function y9(){let[e,t]=se(null);return De(()=>{Qt().then(r=>{t(r)})},[]),[e,r=>{t(r),Zt(r)}]}d();async function VD(e,t,n){try{if(t===null)return"noupdate";let r=await Qt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await Zp(e,t),await Zt(r),"upload"}let a=await x9(e);r.accountLastSyncedAt=Date.now(),P.debug("settings",t),P.debug("local settings.updatedAt",t.updatedAt),P.debug("remote settings.updatedAt",a.updatedAt),P.debug("last synced at",r.accountLastSyncedAt);let o=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(o=!0),!o&&t.updatedAt>a.updatedAt&&(o=!0),P.debug("isUpload",o),o)return await Zp(e,t),await Zt(r),"upload";let i=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(i=!0),!i&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||KD(n)&&VD(n.token,e,t).then(o=>{P.debug("syncUserSetting result",o)})},[e,n])}function KD(e){return Jt(e)?!0:new Date(e.createTime){Wt.get(qt,null).then(n=>{t(n)})},[t]),e}function x9(e){return(location.href?.indexOf("popup.html")>0?Pa:ce)({responseType:"json",url:zi+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function Zp(e,t){return(location.href?.indexOf("popup.html")>0?Pa:ce)({responseType:"json",url:zi+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}function C0(e){let{onClose:t}=e,[n,r]=se("Original"),[a,o,i,s]=Fr(()=>{setTimeout(()=>{w("updateGlobalContext",!1)()},250)});v0(a,o);let[u,l]=se(null),[c,m]=se(globalThis.location.href),[g,p]=se("auto"),[f,y]=se(null),b=O=>{r(O.detail)};if(De(()=>(document.addEventListener(La,b,!1),an().then(O=>{l(O);let F=Et();p(F);let M=Ke();r(M),f0(O.interval)}),document.addEventListener("urlChange",C),()=>{document.removeEventListener("pageTranslatedStatus",b),document.removeEventListener("urlChange",C)}),[]),De(()=>{an().then(O=>{l(O)})},[a]),De(()=>{c&&u&&eg().then(O=>{y(O)})},[c,u]),!u||!f)return null;return D(Fp,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:O=>{w("switchTranslationMode",!0,{mode:O})()},request:ce,onClose:k,onToggleEnabled:R,onTranslateTheWholePage:w("translateTheWholePage",!0),openOptionsPage:B,onToggleTranslate:w("toggleTranslatePage",!0),onTranslateTheMainPage:w("translateTheMainPage",!0),onTranslateToThePageEndImmediately:w("translateToThePageEndImmediately",!0),onTranslatePage:w("translatePage",!0),onRestorePage:w("restorePage",!1),onTranslatePdf:()=>{x(Qr(f.rule)||c)},openAboutPage:_,openSharePage:w("shareToDraft",!0),onSetPageLanguage:h,setSettings:o,config:u,pageStatus:n,ctx:f,currentUrl:c,currentLang:g,onSetLocalConfig:bl,onSetBuildinConfig:L2,onAutoEnableSubtitleChanged:w("autoEnableSubtitleChanged",!0),onOpenUrl:v});function h(O){p(O);let F=ay(c,O,u.sourceLanguageUrlPattern);o(M=>({...M,sourceLanguageUrlPattern:F})),On(O)}function C(){m(globalThis.location.href)}function w(O,F,M={}){let N={trigger:"page_popup",...M};return()=>{_n({method:O,data:N}),F&&t()}}function k(){t()}function R(){o(O=>({...O,enabled:!O.enabled})),setTimeout(()=>{k()},50)}function v(O,F){let M=O;F&&(M=`${O}?utm_source=extension&utm_medium=extension&utm_campaign=${F}`),Tl(M,!0),setTimeout(()=>{k()},50)}function x(O){O&&(Ho(!1,O),setTimeout(()=>{k()},50))}function B(O=""){No(!0,O),setTimeout(()=>{t()},50)}function _(){El(),setTimeout(()=>{t()},50)}function E(){N2(),setTimeout(()=>{t()},50)}}d();function S9(){let[e,t]=se("Original");return De(()=>{let n=Ke();t(n);let r=a=>{t(a.detail)};return document.addEventListener(La,r),()=>{document.removeEventListener(La,r)}},[]),{pageStatus:e}}var T9=6,JD={position:"right",top:335};function w9({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let o=We(null),i=We(null),[s,u]=se(!1),l=We(null),c=We(!1),m=We(n.floatBallConfig||JD),g=We(0),p=We(0),f=We(0),y=We(!1),b=We(0),h=We(0),C=We(0),w=We(0),k=We(!1),R=$e(v=>{a||(clearTimeout(l.current),v?u(v):l.current=setTimeout(()=>{u(v),y.current=!1},st().any?3e3:0))},[u,l,y,a]);return De(()=>{a||u(!1)},[a]),De(()=>{if(o.current&&m.current){let v=tg(m.current.top);m.current.top=v,o.current.style.top=`${v}px`,o.current.style.display="flex"}},[t,o]),De(()=>{if(!i.current||!o.current)return;let v=M=>{M.preventDefault&&M.preventDefault(),g.current=M.clientX,p.current=M.clientY,b.current=Date.now(),f.current=o.current.offsetTop,c.current=!0,clearTimeout(l.current),R(!0),C.current=M.clientX,w.current=M.clientY,k.current=!1,st().any&&(clearTimeout(h.current),h.current=setTimeout(()=>{v9({startX:g.current,startY:p.current,endX:C.current,endY:w.current})||(k.current=!0,r())},500)),document.addEventListener("mousemove",x),document.addEventListener("touchmove",E),document.addEventListener("mouseup",B),document.addEventListener("touchend",O),document.addEventListener("touchcancel",O)},x=M=>{if(M.preventDefault&&M.preventDefault(),!c.current||!o.current||(C.current=M.clientX,w.current=M.clientY,k.current))return;let N=M.clientY-p.current+f.current,U=tg(N);o.current.style.top=`${U}px`},B=M=>{if(M.preventDefault&&M.preventDefault(),F(),c.current=!1,clearTimeout(l.current),y.current||R(!1),k.current)return;v9({startX:g.current,startY:p.current,endX:M.clientX,endY:M.clientY})||(clearTimeout(h.current),e());let U=tg(M.clientY-30);m.current.top=U;let H=ls();bl({...H,floatBallConfig:m.current})},_=M=>{M.preventDefault&&M.preventDefault(),v(M.changedTouches[0])},E=M=>{M.preventDefault&&M.preventDefault(),x(M.changedTouches[0])},O=M=>{M.preventDefault&&M.preventDefault(),B(M.changedTouches[0])},F=()=>{document.removeEventListener("mousemove",x),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",B),document.removeEventListener("touchend",O),document.removeEventListener("touchcancel",O)};return i.current.addEventListener("mousedown",v),i.current.addEventListener("touchstart",_),()=>{i.current&&(i.current.removeEventListener("mousedown",v),i.current.removeEventListener("touchstart",_))}},[t,i,o,l,c,n,R,e]),De(()=>{if(st().any)return;let v=B=>{B.target===o.current&&!y.current||(y.current=!0,R(!0),clearTimeout(l.current))},x=B=>{if(c.current){y.current=!1;return}B.target===o.current&&!y.current||R(!1)};return o.current?.addEventListener("mouseover",v),o.current?.addEventListener("mouseout",x),()=>{o.current?.removeEventListener("mouseover",v),o.current?.removeEventListener("mouseout",x)}},[o,c,R,t,y]),{ballRef:i,floatBallConfigRef:m,containerRef:o,active:s,setActive:R}}function v9({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),o=Math.abs(r-t);return a>T9||o>T9}function D9(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=Oe(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),o=Oe(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),i=Oe(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:o,settingTransform:i}}function A9(){let[e,t]=se(!1);return De(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var C9="hasShownFloatingBallGuide",XD="2024-01-06";function k9(e){let[t,n]=se(!1);De(()=>{!e.config.enableShowFloatingBallGuide||Et()==e.targetLanguage||(async()=>{let a=await Dt(C9,""),o=await Dt("installedAt","");o&&new Date(o){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function _9(e,t){let n=We(0),[r,a]=se(!0),[o,i]=se(!1),s=Fr(),[u,l]=s,{t:c}=ve(),m=$e(()=>{e?.config.floatBallTooltipRule&&(st().any?i(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,i]);De(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,st().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),m())},[e]);let g=$e(()=>{e&&(n.current=n.current+1,m(),l(y=>{let b={...y};return st().any?b.h5FloatBallMainBtnTooltipShownCount=n.current:b.pcFloatBallMainBtnTooltipShownCount=n.current,b}))},[l,m,n,e]),p=Oe(()=>st().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),f=Oe(()=>st().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:sa(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:o,tooltipDelay:p,tooltipText:f,handleShowTooltip:g}}function tg(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}d();var Va=`${J}-float-ball`;function L9(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?D("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:D(QD,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function QD(e){let{t}=ve(),[n,r]=se("UntilNext"),a=jo()+"#floating",o=t("closeQuickTranslation.settingOpen",{1:a}),i=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:o},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:o}];return D("div",{class:`${Va}-close-content`,children:[D("div",{class:"flex justify-between",children:[D("div",{class:`${Va}-close-title`,children:t("closeQuickTranslation")}),D("div",{class:"clickable",onClick:e.onClose,children:D(ua,{type:"modal-close"})})]}),D("div",{class:`${Va}-close-radio-content mt-3`,children:i.map(s=>D(ZD,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{Uo(u)}},s.type))}),D("div",{class:"flex mt-3 flex-end",children:[D("div",{class:`${Va}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),D("div",{class:`${Va}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function ZD(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,o=e7(r||"");return D("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[D("div",{class:t?`${Va}-radio-sel`:`${Va}-radio-nor`,children:D("div",{})}),D("div",{class:"ml-2 text-sm",children:[D("span",{children:n}),r?D("small",{class:"muted text-sm",children:o.map(i=>i.type==="text"?i.value:D("a",{onClick:()=>i.href&&a&&a(i.href),children:i.value}))}):null]})]})}function e7(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let o=a[2],i=a[3],s=a[4];o&&i?t.push({type:"link",href:o,value:i}):s&&t.push({type:"text",value:s})}return t}d();d();function F9(e){return Se.ASSETS_BASE_URL+e}var Ka=`${J}-float-ball`;function P9(e){let{t}=ve(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=Oe(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?D("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:`${Ka}-guide-container`,style:r,children:[D("img",{class:`${Ka}-guide-bg ${e.fixedPosition}`,src:t7}),D("div",{class:`${Ka}-guide-content ${e.fixedPosition}`,children:[D("img",{class:`${Ka}-guide-img`,src:F9("images/float_ball_intro.png")}),D("div",{class:`${Ka}-guide-message`,children:[t("floatBall.guideClickToTranslate"),st().any?` +${t("floatBall.longPress")}`:""]}),D("div",{class:`${Ka}-primary-btn ${Ka}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var t7="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";d();function n7({isVisible:e,onClose:t,children:n}){return D(Nt,{children:[e&&D("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),D("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:D("div",{className:"immersive-translate-sheet-content",children:n})})]})}var M9=n7;var Ms=`${J}-float-ball`;function ng(e){let{t}=ve(),n=Fr(),[r,a,o,i]=n;v0(r,a);let s=h9(r),u=b9(s),{isFullScreen:l}=A9(),[c,m]=se(!1),[g,p]=se(!0),{pageStatus:f}=S9(),y=kd(u,r),b=$e(()=>{if(y?.clickType==="popup")return m(!0);if(y?.clickType==="translate"){let A=xe();if(Oa(u?.rule)){let j=Qr(u.rule);Ho(!0,j||A);return}_n({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,_n,m]),h=$e(()=>{m(!0)},[m]),C=g&&!!s,{containerRef:w,active:k,ballRef:R,floatBallConfigRef:v,setActive:x}=w9({handleBallClick:b,handleMobileBallLongPress:h,isShow:C,localConfig:e.localConfig,popupVisible:c}),B=y?.fixedPosition||"right",_=B==="right"?"left":"right",{isShowGuide:E,handleCloseGuide:O}=k9(e.ctx),{closeTransform:F,logoContainerTransform:M,settingTransform:N}=D9(y,k||E),{tooltipDelay:U,disableTooltipDelay:H,tooltipText:L,handleShowTooltip:S}=_9(u,f);return C?D("div",{class:`${Ms}-container ${B} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:k||E||c?"all":"none"},ref:w,children:[D(r7,{ctx:u,setVisible:p,closeTransform:F,setActive:x,getModalStyle:()=>B9(v.current.top,300,B)}),D(da,{enableMobile:!0,text:L,position:_,delay:U,onShow:S,disable:H,children:D("div",{class:`${Ms}-btn ${B} btn-animate `,ref:R,style:{transform:M,opacity:k||E?1:.5},children:D("div",{children:[D(ua,{type:"logo"}),f!=="Original"?D(ua,{type:"translated"}):null]})})}),D("div",{style:{marginTop:"12px",transform:N},class:`${Ms}-more-buttons btn-animate`,children:[D(da,{text:t("translateFileTooltip"),multiple:!0,width:200,position:_,containerClass:"btn-animate",children:D("div",{class:`${Ms}-more-button`,onClick:()=>{Tl(Ch,!0)},children:D(ua,{type:"file"})})}),D(da,{text:t("floatBall.setting"),position:_,containerClass:"btn-animate",children:D("div",{class:`${Ms}-more-button`,onClick:()=>{x(!0),m(!0)},children:D(ua,{type:"setting"})})})]}),D(a7,{onClose:()=>{x(!1),m(!1)},visible:c,getModalStyle:()=>B9(v.current.top,500,B)}),D(P9,{visible:E,top:v.current.top,fixedPosition:B,onClose:()=>{O(),x(!1)}})]}):null}function r7(e){let{t}=ve(),[n,r]=se(!1),a=Fr(),[o,i,s,u]=a,l=kd(e.ctx,o),c=$e(g=>{e.ctx&&i(p=>W3({...p},g))},[e.ctx,i]),m=$e(g=>{l&&(e.setVisible(!1),g==="AlwaysClose"?c({...l,enable:!1}):g==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return D(Nt,{children:[D("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:D(ua,{type:"close"})}),D(L9,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:m})]})}function a7(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?D(M9,{isVisible:e.visible,onClose:e.onClose,children:D(C0,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?D("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:D("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:D(C0,{onClose:e.onClose})})}):null}function o7(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var B9=(e,t,n)=>{let a=o7().height,o={position:"fixed"},i=0;return If()&&(e=i7.top),o.top=e-i,o.top+t>=a?(o.bottom=30,delete o.top):o.top<=10&&(o.top=10),n==="left"?o.left=65:o.right=65,o},i7={position:"right",right:0,top:335};function s7(e,t){for(let n of t){if(Ee()&&!bo()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function rg(){let e=Ce(),t=await an(),n=await Dr(),r={url:globalThis.location.href,config:t},a=await Ht(r),o=await _d(a,n),i=ct(a.url,o?.blockUrls),s=await Qt();if(!o?.enable||i)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return s7(l,[c]),u7(l,t,s,a)}function u7(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),vo(D(jl,{lang:t.interfaceLanguage,fallbackLang:"en",translations:ny,children:D(ng,{localConfig:n,ctx:r})}),a)}var ag=!1;async function R9(e){if(!e){let t=await an(),n={url:globalThis.location.href,config:t};e=await Ht(n)}e.config.debug&&P.setLevel("debug"),e.isTranslateExcludeUrl?P.debug("detect exclude url, do not inject anything."):(ag=!0,rg().catch(t=>{P.debug("init popup error",t)}))}async function I9(){ag||(ag=!0,rg().catch(e=>{P.error("init popup error",e)}))}var O9=!1,H9=[()=>{xn.unbind()}],N9=[...H9],l7=Hn(async()=>{await No()},50),c7=Hn(async()=>{await El()},50),d7=Hn(async()=>{await O2()},50),m7=Hn(async()=>{await I2()},50),z9=Hn(e=>{_n({method:e,data:{trigger:"userscript_menu"}})},50);function p7(e,t){let n=e.document;if(O9)return;O9=!0,Ee()||_2(),n.addEventListener("securitypolicyviolation",S7),document.addEventListener(ge+"DocumentMessageUser",$9),document.addEventListener(ge+"DocumentMessageUpdateUser",G9),document.addEventListener(ge+"ChangeSuccessService",V9.bind(null,t)),document.addEventListener(ge+"ChangeService",K9.bind(null,t)),document.addEventListener(_a,T7.bind(null,t)),n.addEventListener(ge+"EbookLoaded",C7),n.addEventListener(Wf,v7.bind(null,t)),n.addEventListener($f,w7.bind(null,t)),n.addEventListener(yu,a=>{Ue()||bp(a,t)}),n.addEventListener(Gf,Zb),n.addEventListener("click",a=>{h7(a,t)}),Ue()&&e.addEventListener("message",f7,!1),Ee()&&(Ue()||n.addEventListener(Cr,g7)),Ue()||ta.rootIframe(wu).handleAsk("throttleRequest",_1)}function Bs(e,t){D7(),p7(t,e),Ee()&&(Ue()||(yp(e.config),A7(e.config))),Lu()&&vy(e),rt()&&yp(e.config)}function g7(e){I9()}function f7(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===fu&&Zr(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function h7(e,t){let n=e.target;if(!n||!n.getAttribute){ga(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&at(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${J}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),og({method:"retryFailedParagraphs"}),ga(n,!0);return}else if(a=="toast-error"){let o=n.getAttribute(`data-${J}-tooltip-text`)||"",i="",s="retry";try{let u=JSON.parse(o);i=u.title,o=u.errMsg,s=u.action}catch{}q9(W9.bind(null,t,i,o,s));return}}}async function b7(){let e=await hn(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await fn(e)}async function y7(){let e=await hn(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await fn(e)}var j9=0;function q9(e){let t=Date.now();if(t-j9<2e3||(j9=t,E7()))return;let n=`${J}-modal-root`,r=`${J}-modal`,a=document.getElementById(n),o=`${J}-modal-title`,i=`${J}-modal-body`,s=`${J}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${o}`),c=u.querySelector(`.${s}`),m=u.querySelector(`.${i}`);e(u,l,m,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),m=Ce();c.textContent=m.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let g=document.createElement("div");g.className=J+"-modal-content notranslate",u.appendChild(g);let p=document.createElement("span");p.textContent="\xD7",p.className=J+"-close",g.appendChild(p);let f=document.createElement("div");f.className=o+" notranslate",g.appendChild(f);let y=document.createElement("div");y.className=i+" notranslate",g.appendChild(y);let b=document.createElement("div");b.className=s,g.appendChild(b),l.appendChild(u),p.onclick=function(){u.style.display="none"},l.addEventListener("click",h=>{h.target==u&&(u.style.display="none")}),e(u,f,y,b)}setTimeout(()=>{x7()},100)}function W9(e,t,n,r="retry",a,o,i,s){let u=At.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");o.innerText=l,i.innerHTML=Ge.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let m="",g=document.createElement("button");if(r=="retry"){m=u("retryAllButton"),g.setAttribute(`data-${J}-action`,"retry");let p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("viewBox","0 0 16 16"),p.setAttribute("width","20"),p.setAttribute("height","20"),p.innerHTML='',g.appendChild(p),g.onclick=()=>{a.style.display="none",og({method:"retryFailedParagraphs"}),ga(g,!0)}}else if(r=="login")m=u("goLogin"),g.onclick=()=>{ga(g,!0),window.open(fh)};else if(r=="upgrade")m=u("upgradeToPro"),g.onclick=()=>{ga(g,!0),window.open(Au)};else if(r=="setting")m=u("goSettings"),g.onclick=()=>{ga(g,!0),window.open(Se.OPTIONS_URL)};else if(r=="changeService")m=u("detectServiceLoading"),g.onclick=()=>{ga(g,!0),window.open(Se.OPTIONS_URL)},sg(e,e.config.translationService,!1).then(p=>{p?(m=u("toggleToService",{service:u("translationServices."+p)}),g.innerHTML=Ge.sanitize(m),g.onclick=()=>{Y9(p),ga(g,!0)}):(m=u("goSettings"),g.innerHTML=Ge.sanitize(m))});else if(r=="none")return;g.className="immersive-translate-btn",g.innerHTML+=Ge.sanitize(m),s.appendChild(g)}function E7(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${J}-modal`)?.style.display=="block":!1}function x7(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${J}-modal`);t&&(t.style.display="block")}}function ga(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${J}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function T7(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:o,action:i}=r;q9(W9.bind(null,e,a,o,i))}catch(r){P.warn("parse message error",r)}}async function v7(e,t){let n=t;if(P.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")og({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")xl(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")b7();else if(a.type==="toggleEnableInputTranslation")y7();else if(a.type==="translatePage")k7(a.data);else if(a.type==="getAsyncTranslationServiceList")r=Zi(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=Pl(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let o=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:o,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let o={...e,translationService:a.data.service};try{r=await _7(a.data,o)}catch(i){U9(a.type,i.uiConfig(o),a.id)}}else a.type==="getAsyncLanguageByText"?r=await yl(a.data):a.type==="sharePage"?bp({detail:a.data},e):a.type==="switchTranslationMode"?ig(a.data):z9(a.type);r&&a.id&&U9(a.type,r,a.id)}}catch(a){P.warn("parse message error",a)}}}function C7(e){setTimeout(()=>{S0()},10)}function S7(e){Se.HAS_CSP_ERROR="1"}function w7(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&at(n.name,[{name:n.name}],{...e})}function D7(){N9.forEach(e=>{e()}),N9=H9}function A7(e){if(Ee()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Pu.commands,a=[...Object.keys(t).filter(o=>o==="toggleTranslatePage").map(o=>{let i=t[o].description,s=i;return i.startsWith("__MSG_")&&i.endsWith("__")&&(s=oi(`browser.${i.slice(6,-2)}`,e.interfaceLanguage)),{id:o,title:s}}),{id:$c,title:oi("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:Gc,title:oi("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:qc,title:oi("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:Wc,title:oi("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let o of a)GM.registerMenuCommand(o.title,()=>{o.id===qc?l7():o.id===Wc?c7():o.id===Gc?d7():o.id===$c?m7():z9(o.id)},o.key)}}function og(e){Zr(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{P.error("send content message request failed",e,n)});let t=new CustomEvent(Cr,{detail:e});globalThis.document.dispatchEvent(t)}async function k7(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await He(xe(),t);yn(n)}function U9(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function _7({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let o=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),i=null;try{let s=await Je({sentences:o},{...a,translationService:r},u=>i=u);if(i)throw i;return s}catch(s){throw s}}d();var Ya={};async function ug(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Pe({text:t,minLength:200,pageLangs:[ht(),"en"]});return On(n),n}async function J9(e){gn("Translating");let t=Et(),n=sl(),r=[...document.querySelectorAll(".source-text")];if(So(e,t))return;let a=r.filter(o=>o.innerText?.trim()).map((o,i)=>{let s=o.parentElement?.parentElement?.querySelector(".target-text");return ut(o,"id",i+""),s&&(wo(s,i)?.remove(),s.appendChild(os(e,i))),{text:o.innerText||"",id:i,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Je({sentences:a},{...e,sourceProgram:"subtitle"},(o,i,s)=>{let u=s.id,l=wo(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),o?(c.innerHTML=Ge.sanitize(`${o.message}`),Ya[u]={ok:!1,sentence:s}):i&&(c.innerHTML=Ge.sanitize(i.text),Ya[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!o}})})))})}catch(o){throw o}finally{gn("Translated")}}async function X9(e){gn("Translating"),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Ya),n=[],r=[];for(let a of t){let o=Ya[a];if(!o.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Ya[a],u.appendChild(os(e,a)),r.push(o.sentence))}}}try{await Je({sentences:r},e,(a,o,i)=>{let s=i.id,u=wo(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=Ge.sanitize(`${a.message}`),Ya[s]={ok:!1,sentence:i}):o&&(l.innerHTML=Ge.sanitize(o.text),Ya[s]={ok:!0,sentence:i}),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{gn("Translated")}}function lg(){gn("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}d();var cg={};async function Q9(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let o=a.body;if(o&&(t=t+o.innerText||"",t.length>1e3))break}let n=await Pe({text:t,pageLangs:["en"]});return On(n),n}async function Z9(e){gn("Translating"),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(cg),n=[];for(let r of t){let a=cg[r];if(a.error){let i=a.commonAncestorContainer.querySelector(`[${xu}='${r}']`);i&&i.remove(),n.push(a)}}try{vs(),await Nl(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{gn("Translated")}}function e6(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+yt);for(let a of r)a.remove()}gn("Original")}async function t6(e){gn("Translating");let t=es(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;Yo(u,e);let l=u.body;if(!l)continue;let c=on(e);c.isModifyImage=!1,_r({id:t,container:l,filterRule:c,onParagraph:m=>{r.push(m)}})}let o=ur(e.config.translationServices[e.translationService]),i=1;for(let s of r){let u=Cl(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:o,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(i++).toString();let l=await qm(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:o,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),cg[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Nl(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{gn("Translated")}}d();var Zn=!1,w0,n6=!1,D0=null;function dg(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){P.debug("exclude url for input");return}if(D0===!1){P.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};An.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=0,s=Date.now();w0&&self.removeEventListener("keydown",w0),w0=u,self.addEventListener("keydown",w0);function u(c){if(Zn||D0===!1)return;let m=c,g=m.target||m.srcElement,p=g?.tagName;(g?.isContentEditable||p=="INPUT"||p=="SELECT"||p=="TEXTAREA")&&(q7(c,o.triggerKey,o.codePrefixAlias)?l(c):i=0)}async function l(c){Date.now()-s=o.triggerTimes&&P7()&&(i=0,F7(c,e,o))}W7(e)}function a6({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let o of a){let i=t.map(s=>{let u=o+s;return a.includes(s)||(u+=" "),u});r.push(...i)}return new RegExp(r.join("|"))}function A0(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var di;function o6(e){let t=e.parentElement;if(!t)return;di=document.createElement("div"),di.className=J+"-input",di.innerHTML=`
`,t.appendChild(di);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function i6(){di&&di.remove()}async function L7(e){if(!Zn)try{let f=function(){c=e.config.inputTargetLanguage;let b=l.split(" ")[0];b&&b[0]&&(b=b[0].toLowerCase()+b.slice(1)),b.trim()&&o.flatAlias.includes(b)?(c=A0(b,o.codeAlias),u=l.slice(b.length+1)):u=l},y=function(){c="";let b=a6(o),h=l.split(b);if(h.length<2)return;if(u=h[h.length-1],s=h[0],h.length>2){let w=l.lastIndexOf(u),k=l.slice(0,w).lastIndexOf(h[h.length-2]);s=l.slice(0,k+h[h.length-2].length)}if(s.endsWith(o.codePrefix))return;if(s.endsWith(":")&&o.codePrefix=="/"){s="",u="";return}let C=l.slice(s.length+1,l.indexOf(u)).trim();if(c=A0(C,o.codeAlias),!c){P.warn("not found alias",C);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};An.forEach(b=>n[b]=[b,...n[b]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;st().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=document.activeElement;if(!i||i.tagName==="BODY")return;Zn=!0;let s="",u="",l=fa(i)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?f():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&f());let m=s6(u,o),g=await Pe({text:m,pageLangs:["en"]});P.debug("translateContent",m,g);let p={text:m||"",id:0,from:g,to:c,url:"https://google.com",fromByClient:g,force:!0};if(!p.text||p.text.length>5e3)return;o6(i),Ze(Eu,Date.now());try{let b=await ra(p,{...e,translationService:e.inputTranslationService});l6(e),u6(e,i,s+b.text)}catch(b){if(b instanceof K){let h=b.uiConfig(e);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(_a,{detail:h}))}}finally{Zn=!1}}catch(t){throw Zn=!1,t}finally{Zn=!1,i6()}}async function F7(e,t,n){if(!Zn)try{let m=function(){s=t.config.inputTargetLanguage;let p=i.split(" ")[0];p&&p[0]&&(p=p[0].toLowerCase()+p.slice(1)),p.trim()&&n.flatAlias.includes(p)?(s=A0(p,n.codeAlias),o=i.slice(p.length+1)):o=i},g=function(){s="";let p=a6(n),f=i.split(p);if(f.length<2)return;if(o=f[f.length-1],a=f[0],f.length>2){let b=i.lastIndexOf(o),h=i.slice(0,b).lastIndexOf(f[f.length-2]);a=i.slice(0,h+f[f.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",o="";return}let y=i.slice(a.length+1,i.indexOf(o)).trim();if(s=A0(y,n.codeAlias),!s){P.warn("not found alias",y);return}},r=document.activeElement;Zn=!0;let a="",o="",i=fa(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?m():(g(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&m());let u=s6(o,n),l=await Pe({text:u,pageLangs:["en"]});P.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!n6){n6=!0;let p=await $7(t);if(e.target&&e.target.focus(),p==="open_settings"){No(!0,"#input");return}else if(p==="open_learn_more"){Uo("https://immersivetranslate.com/docs/input/");return}else if(p==="disable_once"||p==="disable_forever"){if(D0=!1,p==="disable_forever"){let f=await hn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await fn(f)}else if(p==="disable_once"){let f=await hn();f.isShowInputTranslationConsent=!1,await fn(f)}return}else if(p==="close_disable_once"||p==="close_disable_forever"){if(D0=!1,p==="close_disable_forever"){let f=await hn();f.enableInputTranslation=!1,f.isShowInputTranslationConsent=!1,await fn(f)}return}else if(p==="enable"){let f=await hn();f.enableInputTranslation=!0,f.isShowInputTranslationConsent=!1,await fn(f)}else if(p==="close_enable"){let f=await hn();f.enableInputTranslation=!0,await fn(f)}}o6(r),Ze(Eu,Date.now());try{let p=await ra(c,{...t,translationService:t.inputTranslationService});l6(t),u6(t,r,a+p.text)}catch(p){if(p instanceof K){let f=p.uiConfig(t);f.action=="retry"&&(f.action="none"),document.dispatchEvent(new CustomEvent(_a,{detail:f}))}}finally{Zn=!1}}catch(r){throw Zn=!1,r}finally{Zn=!1,i6()}}function P7(){let e=document.activeElement;if(!e)return!1;if(k0(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` `).reverse()[0].trim(),o=n<=t;return P.debug("cursorPosition",t,"textLength",n),P.debug("input isTail",o,"tailHasText",a),o&&!!a}else{let t=window.getSelection();if(!t)return P.debug("No active selection found."),!1;if(t.rangeCount>0){let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=M7(r,e);P.debug("Current text node:",r.textContent),P.debug("Cursor position within text node:",n.startOffset);let o=r.textContent?.length===n.startOffset&&a,i=e.innerText?.split(` -`).reverse(),s=nt()?i[0]||i[1]:i[0];return P.debug("editdiv isTail",o,"tailHasText",s),o&&!!s}else P.debug("Cursor is not within a text node.")}}return!1}function M7(e,t){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let o of a.childNodes)r(o)}return r(t),n==e}function s6(e,t){let{triggerTimes:n,triggerKey:r}=t,a=0,o=" ";r.length==1?(a=n,o=r):r.toLowerCase()=="space"&&(a=n);let i=e.length;for(let s=e.length-1;s>=e.length-a;s--){if([10,8629].includes(e[s].charCodeAt(0))){i--;continue}if(![...t.codePrefixAlias[r]||[],o].includes(e[s]))break;i--}return e.length-i<3&&[".","\u3002"].includes(e[i-1])&&i--,e.slice(0,i)}function B7(e,t){let n=t.innerHTML,r=fa(t);return{html:n.replace(r,e),text:e}}function r6(e,t,n=!1){let r=fa(t);return n?r.trim().endsWith(e.text.trim()):r?.trim()?.indexOf(e?.text?.trim())>=0}function fa(e){return e.value||e.innerText||e.textContent}async function ha(e){await new Promise((t,n)=>{setTimeout(()=>{t("")},e)})}async function R7(e,t,n){await ha(10);let r=new DataTransfer;e.forEach(a=>{a==="plain"&&r.setData("text/plain",t.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await ha(10)}async function I7(e,t){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,e.text),t.dispatchEvent(n),await ha(10))}async function O7(e,t){t.value&&t.select(),document.execCommand("insertText",!1,e.text.replace(/\n/g,"\r")),await ha(20),(t.value||t.value==="")&&(t.value=e.text)}async function N7(e,t){_0(t)&&(t.value=e.text,t.dispatchEvent(new Event("input",{bubbles:!0})),await ha(20))}var j7=[R7.bind(null,["plain"])];function U7(e){let t;_0(e)?t=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):t=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),e.dispatchEvent(t)}function _0(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function H7(e){if(_0(e))return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}async function u6(e,t,n){await H7(t),await ha(50);let r=e.rule.inputConfig,a=B7(n,t);try{r?.clearContentEnable&&U7(t),await ha(50),r?.execCommandDeleteEnable&&!bo()&&fa(t)?.trim()!=""&&(document.execCommand("delete"),await ha(50)),P.debug("clearContent",fa(t))}catch(o){P.error(o)}for(let o of[...j7,O7,N7,I7]){await o(a,t);let i=z7();if(!i)return;if(P.debug("setContent",o.name,r6(a,i),fa(i),a),r6(a,i))break}}function z7(){return document.activeElement}function l6(e){rt("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:e.config.inputTrailingTriggerKey,input_starting_trigger_key:e.config.inputStartingTriggerKey,input_target_language:e.config.inputTargetLanguage}}],e)}function q7(e,t,n){let r="";e&&e.code&&(r=e.code.toLowerCase());let a="";e&&e.key&&(a=e.key.toLowerCase());let o=e.keyCode,i=n[t]||[];return o===229&&t!=="space"?!1:!!(i.includes(r)||i.includes(a)||r===t||a===t)}async function W7(e){if(e.config.interfaceLanguage!=="zh-CN"||e.config.targetLanguage!=="zh-CN")return;let t="inputTutorialsShowedAt";if(await Dt(t,"")||Number(await Dt(Eu,0))>0)return;let a=e.rule.inputConfig,o=a.tutorialsSelectors,i=a.tutorialsText;if((o?.length||0)>0&&i)for(let s=0;s{G7()},100),new Promise(m=>{let g=m;if(i){let _=i.shadowRoot;if(!_)return;s=_.querySelector(`.${n}`);let E=s.querySelector(`.${r}`),O=s.querySelector(`.${o}`),F=s.querySelector(`.${a}`)}else{let _=document.createElement("div");_.setAttribute("translate","no"),_.className="no-translate immersive-translate-error-modal-input-shadow-root",_.id=t,_.style.all="initial",_.style.zIndex="2147483647",document.body.appendChild(_);let E=_.attachShadow({mode:"open"}),O=document.createElement("style"),F=Ce();O.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,E.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let M=document.createElement("div");M.className=J+"-modal-content notranslate "+J+"-modal-content-in-input",s.appendChild(M);let N=document.createElement("span");N.textContent="\xD7",N.className=J+"-close",M.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",M.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",M.appendChild(c),l=document.createElement("div"),l.className=o,M.appendChild(l),E.appendChild(s),N.onclick=function(){R(),m("close")},E.addEventListener("click",U=>{U.target==s&&(s.style.display="none",m("close"))})}document.addEventListener("keydown",B);let p=At.bind(null,e);u.innerHTML=`
${Wl} ${p("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=p("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let y=document.createElement("div");y.style.cssText="margin-bottom: 12px;",y.innerHTML=Ge.sanitize(p("disableInputTranslationTips",{option:`${p("option")}`,learnMore:`${p("learnMore")}`})),c.appendChild(y);let b=[{id:"enable-search-enhancement",value:"enable",text:p("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:p("disableOnce")},{id:"disable-global",value:"global",text:p("disableGlobal")}];for(let _=0;_0&&await aA(e.rule.waitForSelectors,e.rule.waitForSelectorsTimeout),e.rule.isInjectOptionsUrl){let s=jo(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){P.warn("inject options url failed",l)}}if(e.rule.globalMeta&&Object.keys(e.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=e.rule.globalMeta[u],document.head.appendChild(l)}),e.rule.initialGlobalAttributes&&X1(document.body,e.rule.initialGlobalAttributes),e.rule.pageType=="pdfReader"){yn(e);return}if(e.config.arxivRule&&e.config.arxivRule.matches&&ct(e.url,e.config.arxivRule.matches)){let u=document.querySelector(e.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(e.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let p=new URL(e.url).pathname.split("/").pop(),f=!1,y=!0;if(p)try{let h=p.split(".")[0],C=h.slice(0,2),w=h.slice(2,4),k=new Date(`20${C}-${w}-27`),R=new Date(e.config.arxivRule.validBefore);k${At(e,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${At(e,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(e.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!e.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!e.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}d6||(d6=!0,Ue()&&e.rule.useIframePostMessage&&await K2());let n=e.sourceLanguage;n==="auto"?n=await m6():On(n);let r=G3(e,n);if(r&&(e=await He(xe(),{translationMode:r})),e.rule.isInjectMeta)try{let s=await Xu(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=gi(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){P.warn("inject meta failed",s)}let a=new URL(e.url),i=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||e.state.isAutoTranslate||e.isTranslateUrl||e.rule.pageType=="pdfReader";if(!i&&!e.isTranslateExcludeUrl&&(P.debug(`detect page language: ${e.url} ${n}`),Wr(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto"||J2(n,e.config.translationLanguagePattern)&&(i=!0,P.debug(`match language pattern ${n}, auto translate`))),e.rule.pageType=="ebookBuilder"&&(i=!1),e.rule.pageType!=="pdfReader"&&Wi(t)&&si(e,window),i)fe.state.isAutoTranslate=!0,yn(fe);else if(P.debug("do not auto translate",e),e.rule.initTranslationServiceAsSoonAsPossible&&e.translationService==="deepl"){if(Wr(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto")return;e.config&&e.config.translationServices&&e.config.translationServices.deepl&&e.config.translationServices.deepl.authKey&&typeof e.config.translationServices.deepl.authKey=="string"&&e.config.translationServices.deepl.authKey.startsWith("immersive_")&&(L0[e.translationService]||(L0[e.translationService]=!0,Ue()||Fm(e).catch(s=>{P.warn("init translation engine error",s)})))}}async function kp(e){if(Ke()==="Original"){let t={};di&&(t.translationTheme=di),fe&&(t={...fe.state,...t});let n=await He(xe(),t);if(e?.trigger=="right_menu"&&Oa(n?.rule)){let r=Qr(n.rule);Ho(!0,r||xe());return}await yn(fe,e)}else(Ke()==="Translated"||Ke()==="Error")&&Ja()}async function K7(){if(fe=await He(xe(),{}),fe.rule.pageType=="ebookBuilder")return Z9(fe);if(fe.rule.pageType=="subtitleBuilder")return X9(fe);Qb()}async function _p(e){if(Ke()==="Original"){fe=await He(xe(),{}),di||(di=fe.state.translationTheme);let t="mask";fe.state.translationTheme==="opacity"&&(t="opacity"),fe=await He(xe(),{translationTheme:t}),await yn(fe,e)}else if(Ke()==="Translated"){let t="mask";fe?.state?.translationTheme==="opacity"&&(t="opacity");let n=H3().filter(o=>o.contentDocument?.body).map(o=>o.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let o of r){let i=Lo(o,po,!0);a==="mask"||a==="opacity"?i!=="none"?ut(o,po,"none",!0):ut(o,po,t,!0):i!=="mask"&&i!=="opacity"?ut(o,po,t,!0):ut(o,po,"none",!0)}}}async function m6(){let e=await He(xe(),{});return e.rule.pageType=="subtitleBuilder"?ug():Xb(e)}function Y7(e){Ke()==="Original"?c6(e):Wa()}function J7(e){Ke()==="Original"?J9(e):lg()}function X7(e){Ke()==="Original"?ri(e):Wa()}async function Ja(){zo(""),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let e=await He(xe(),{});if(e.rule.pageType=="subtitleBuilder"){lg();return}else e.rule.pageType=="ebookBuilder"&&e6();Wa()}async function yn(e,t){e.config?.sentryConfig?.contentInitTime=="translate_page"&&(e.config?.sentryConfig,void 0);let n=Ke(),r={pageStatus:n,translateService:e.state.translationService||e.translationService,translationMode:e.state.translationMode};n!=="Original"&&await Ja(),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:e.targetLanguage}})})),L0[e.translationService]||(L0[e.translationService]=!0,Ue()||Fm(e).catch(o=>{P.warn("init translation engine error",o)}));let a={};if(t&&t.trigger&&(a.trigger=t.trigger),rt("translage_page_daily",[{name:"translage_page_daily",params:a}],e),rt("translate_page",[{name:"translate_page",params:a}],{...e,sourceLanguage:Et()}),e.rule.pageType=="subtitleBuilder"){J7(e),zo("yes");return}if(e.rule.pageType=="ebookBuilder"){t6(e),zo("yes");return}if(e.rule.pageType==="pdfReader"){Y7(e),zo("yes");return}X7(e),zo("yes")}async function Q7(e,t){let n=fe?.translationService;if(Ke()==="Original"||n!=e){fe=await He(xe(),{translationService:e});let r=At(fe,"temprarilyChangeTranslationTo_"+e);ll({text:r}),await yn(fe,t)}else{Ja();let r=await an(),a={url:xe(),config:r,state:{}},o=await Ut(a);fe=await He(xe(),{translationService:o.translationService})}}async function Z7(e){Ke()==="Original"?await pg(e):(Ke()==="Translated"||Ke()==="Error")&&(fe=await He(xe(),{}),fe.state.translationArea!=="main"?await pg(e):Ja())}async function pg(e){fe=await He(xe(),{translationArea:"main"}),await yn(fe,e)}async function p6(e){fe=await He(xe(),{translationArea:"body"}),await yn(fe,e)}async function Lp(e){let t=await He(xe(),{}),n=t.state.translationMode=="dual"?"translation":"dual";if(t=await He(xe(),{translationMode:n}),Ke()==="Original"){yn(t,e);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function ig(e){if(fe=await He(xe(),{translationMode:e}),rt("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:e}}],{...fe,sourceLanguage:"unknown"}),Ke()==="Original"){yn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(e)}async function eA(e){if(Ke()==="Original")await p6(e);else if(Ke()==="Translated"||Ke()==="Error"){let t={};fe&&fe.state&&(t=fe.state),fe=await He(xe(),t),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await He(xe(),fe.state),await yn(fe,e)):Ja()}}async function g6(e){fe=await He(xe(),{translationStartMode:"immediate"}),await yn(fe,e)}async function tA(e){Ke()==="Original"?await g6(e):(Ke()==="Translated"||Ke()==="Error")&&Ja()}async function f6(){let e=await He(xe(),{});if(!ct(e.url,e.config.inputStyleBlockUrls)){let n=Ce().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;Cn(document,n,"immersive-translate-input-injected-css")}e.rule.pageType&&e.rule.pageType!=="html"||e.config.enableInputTranslation&&dg(e)}function nA(){return fe}async function He(e,t){let n=Object.keys(t);if(fe){let r={url:e,config:fe.config,state:{...fe.state,...t}};fe=await Ut(r)}else{let r=await an(),a=t;n.length===0&&(a=void 0),fe=await Ut({url:e,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function rA(){let e=await hn()||{},t=e.generalRule||{},n=t["subtitleRule.add"]||{},r=!n.preTranslation;await fn({...e,generalRule:{...t,"subtitleRule.add":{...n,preTranslation:r}}}),r?ll({text:At(fe,"videoSubtitlePreTranslationOn")}):ll({text:At(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function eg(){let e=await an(),t=await us(),n;fe&&fe.state&&(n=fe.state);let r={url:xe(),config:e,state:n},a=await Ut(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,gp(fe);let o=_s(),i=[];return o?i=o.allInlineWindows||[window]:i=[window],i.forEach(s=>{Bs(a,s),Wi(t)&&si(a,s),dg(a)}),a}function aA(e,t=3e3){return new Promise((n,r)=>{let a=t?setTimeout(()=>{n(new Error("timeout"))},t):void 0,o=setInterval(()=>{e.every(s=>document.querySelector(s)!==null)&&(clearInterval(o),a&&clearTimeout(a),n(null))},50)})}async function $9(e){let t=e.detail,n=hn();await E9(t.token,n,fn),qt.set(zt,t);let r=await qt.get(Qc,!1);qt.set(Qc,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),mg()}function G9(e){P.debug("update user info",e);let t=e.detail;qt.set(zt,t),mg()}async function V9(e){let t=await hn();if(t.translationService)return;let n=e.config.translationService,r=await sg(e,n);if(e.translationService!==r){if(!r){Ki([{name:"no_avaliable_translation_service"}]);return}t.translationService=r,fn(t),e.translationService=r,Ki([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function K9(e,t){let n=t.detail;if(e.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,o=await hn();o.translationService=r,a&&o?.translationServices?.[r]?.provider&&(o.translationServices[r].provider=a),o.translationServiceChangedbyUserAt=new Date().toISOString(),fn(o)}async function sg(e,t,n=!0){let r=e.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,o)=>a===t?n?-1:1:o===t?n?1:-1:0),await G1(r,e)}async function Y9(e){let t=await hn();t.translationService=e,await fn(t);let n=await He(xe(),{});n.translationService=e,await yn(n)}D2({detectCurrentPageLanguage:m6,ensureSwitchTranslationMode:Lp,restorePage:Ja,retryFailedParagraphs:K7,switchTranslationMode:ig,toggleTranslatePage:kp,toggleTranslateTheMainPage:Z7,toggleTranslateTheWholePage:eA,toggleTranslationMask:_p,toggleVideoSubtitlePreTranslation:rA,translatePage:yn,translatePageWithTranslationService:Q7,translateTheMainPage:pg,translateTheWholePage:p6,translateToThePageEndImmediately:g6,toggleTranslateToThePageEndImmediately:tA,updateGlobalContext:eg,getPureGlobalContext:nA});async function h6(e){if(!e){let n=await an();e=await Ut({config:n,url:xe()})}if(e.config.debug?P.setLevel("debug"):P.setLevel("info"),!e.isTranslateExcludeUrl){if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){if(e.rule.isInjectMeta){try{let n=await Xu("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=gi(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){P.warn("inject meta failed",n)}if(e.rule.isInjectOptionsUrl){let n=jo(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){P.warn("inject options url failed",a)}}if(e.rule.isInjectVersion){let n=Xt(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){P.warn("inject version failed",a)}}}}else await w0();Ue()||await R9().catch(n=>{P.error(`init popup page error: ${n}`)}),Ue()||Ry()}await f6()}d();var Rs={capture:!0,once:!0,passive:!0},E6=()=>document.readyState==="interactive"||document.readyState==="complete",oA=e=>document.readyState===e,Is=(e,t)=>oA(e)||E6()?(t(e),!0):!1,iA=()=>new Promise(e=>{Is("loading",e)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&e("loading")},Rs)}),sA=()=>new Promise(e=>{Is("interactive",e)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&e("interactive")},Rs)}),uA=()=>new Promise(e=>{Is("complete",e)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e("complete")},Rs)}),b6=()=>new Promise(e=>{Is("domready",e)||document.addEventListener("DOMContentLoaded",()=>{e("domready")},Rs)}),y6=()=>new Promise(e=>{Is("load",e)||window.addEventListener("load",()=>{e("load")},Rs)}),x6={};Object.defineProperties(x6,{state:{get:function(){return document.readyState}},loading:{get:function(){return iA()}},interactive:{get:function(){return sA()}},complete:{get:function(){return uA()}},window:{get:function(){return y6()}},load:{get:function(){return y6()}},domready:{get:function(){return b6()}},dom:{get:function(){return b6()}},ready:{get:function(){return E6()}}});var T6=x6;d();d();var v6={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function lA(e){return()=>Promise.resolve().then(()=>e()).catch(t=>{throw t})}function cA(e){if(typeof e!="function")throw new Error(v6.NOT_FUNCTION)}var gg=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:t=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:o=1,backoffMaxInterval:i,message:s=""}={}){this._interval=t,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=o,this._backoffMaxInterval=i||n,this.start=+Date.now()}tryEvery(t){return this._interval=t,this}stopAfter(t){return this._timeout=t,this}execute(t){return this._applyPromiseHandlers(),cA(t),this._executeFn=lA(t),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(t){return this._stopOnFailure=t,this}_applyPromiseHandlers(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let t=this._interval,n=t*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),t)}_failedToWait(){let t=`${v6.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(t=`${t}: ${this._userMessage}`),this._lastError){this._lastError.message=`${t} +`).reverse(),s=rt()?i[0]||i[1]:i[0];return P.debug("editdiv isTail",o,"tailHasText",s),o&&!!s}else P.debug("Cursor is not within a text node.")}}return!1}function M7(e,t){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let o of a.childNodes)r(o)}return r(t),n==e}function s6(e,t){let{triggerTimes:n,triggerKey:r}=t,a=0,o=" ";r.length==1?(a=n,o=r):r.toLowerCase()=="space"&&(a=n);let i=e.length;for(let s=e.length-1;s>=e.length-a;s--){if([10,8629].includes(e[s].charCodeAt(0))){i--;continue}if(![...t.codePrefixAlias[r]||[],o].includes(e[s]))break;i--}return e.length-i<3&&[".","\u3002"].includes(e[i-1])&&i--,e.slice(0,i)}function B7(e,t){let n=t.innerHTML,r=fa(t);return{html:n.replace(r,e),text:e}}function r6(e,t,n=!1){let r=fa(t);return n?r.trim().endsWith(e.text.trim()):r?.trim()?.indexOf(e?.text?.trim())>=0}function fa(e){return e.value||e.innerText||e.textContent}async function ha(e){await new Promise((t,n)=>{setTimeout(()=>{t("")},e)})}async function R7(e,t,n){await ha(10);let r=new DataTransfer;e.forEach(a=>{a==="plain"&&r.setData("text/plain",t.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await ha(10)}async function I7(e,t){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,e.text),t.dispatchEvent(n),await ha(10))}async function O7(e,t){t.value&&t.select(),document.execCommand("insertText",!1,e.text.replace(/\n/g,"\r")),await ha(20),(t.value||t.value==="")&&(t.value=e.text)}async function N7(e,t){k0(t)&&(t.value=e.text,t.dispatchEvent(new Event("input",{bubbles:!0})),await ha(20))}var j7=[R7.bind(null,["plain"])];function U7(e){let t;k0(e)?t=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):t=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),e.dispatchEvent(t)}function k0(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function H7(e){if(k0(e))return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}async function u6(e,t,n){await H7(t),await ha(50);let r=e.rule.inputConfig,a=B7(n,t);try{r?.clearContentEnable&&U7(t),await ha(50),r?.execCommandDeleteEnable&&!bo()&&fa(t)?.trim()!=""&&(document.execCommand("delete"),await ha(50)),P.debug("clearContent",fa(t))}catch(o){P.error(o)}for(let o of[...j7,O7,N7,I7]){await o(a,t);let i=z7();if(!i)return;if(P.debug("setContent",o.name,r6(a,i),fa(i),a),r6(a,i))break}}function z7(){return document.activeElement}function l6(e){at("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:e.config.inputTrailingTriggerKey,input_starting_trigger_key:e.config.inputStartingTriggerKey,input_target_language:e.config.inputTargetLanguage}}],e)}function q7(e,t,n){let r="";e&&e.code&&(r=e.code.toLowerCase());let a="";e&&e.key&&(a=e.key.toLowerCase());let o=e.keyCode,i=n[t]||[];return o===229&&t!=="space"?!1:!!(i.includes(r)||i.includes(a)||r===t||a===t)}async function W7(e){if(e.config.interfaceLanguage!=="zh-CN"||e.config.targetLanguage!=="zh-CN")return;let t="inputTutorialsShowedAt";if(await Dt(t,"")||Number(await Dt(Eu,0))>0)return;let a=e.rule.inputConfig,o=a.tutorialsSelectors,i=a.tutorialsText;if((o?.length||0)>0&&i)for(let s=0;s{G7()},100),new Promise(m=>{let g=m;if(i){let _=i.shadowRoot;if(!_)return;s=_.querySelector(`.${n}`);let E=s.querySelector(`.${r}`),O=s.querySelector(`.${o}`),F=s.querySelector(`.${a}`)}else{let _=document.createElement("div");_.setAttribute("translate","no"),_.className="no-translate immersive-translate-error-modal-input-shadow-root",_.id=t,_.style.all="initial",_.style.zIndex="2147483647",document.body.appendChild(_);let E=_.attachShadow({mode:"open"}),O=document.createElement("style"),F=Ce();O.textContent=F.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,E.appendChild(O),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let M=document.createElement("div");M.className=J+"-modal-content notranslate "+J+"-modal-content-in-input",s.appendChild(M);let N=document.createElement("span");N.textContent="\xD7",N.className=J+"-close",M.appendChild(N),u=document.createElement("div"),u.className=r+" notranslate",M.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",M.appendChild(c),l=document.createElement("div"),l.className=o,M.appendChild(l),E.appendChild(s),N.onclick=function(){R(),m("close")},E.addEventListener("click",U=>{U.target==s&&(s.style.display="none",m("close"))})}document.addEventListener("keydown",B);let p=At.bind(null,e);u.innerHTML=`
${ql} ${p("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let f=document.createElement("p");f.innerHTML=p("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),f.style.cssText="margin-bottom:12px",c.appendChild(f);let y=document.createElement("div");y.style.cssText="margin-bottom: 12px;",y.innerHTML=Ge.sanitize(p("disableInputTranslationTips",{option:`${p("option")}`,learnMore:`${p("learnMore")}`})),c.appendChild(y);let b=[{id:"enable-search-enhancement",value:"enable",text:p("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:p("disableOnce")},{id:"disable-global",value:"global",text:p("disableGlobal")}];for(let _=0;_0&&await aA(e.rule.waitForSelectors,e.rule.waitForSelectorsTimeout),e.rule.isInjectOptionsUrl){let s=jo(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){P.warn("inject options url failed",l)}}if(e.rule.globalMeta&&Object.keys(e.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=e.rule.globalMeta[u],document.head.appendChild(l)}),e.rule.initialGlobalAttributes&&X1(document.body,e.rule.initialGlobalAttributes),e.rule.pageType=="pdfReader"){yn(e);return}if(e.config.arxivRule&&e.config.arxivRule.matches&&ct(e.url,e.config.arxivRule.matches)){let u=document.querySelector(e.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(e.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let b=l.getAttribute("href");try{let h=new URL(b);h.searchParams.set("_immersive_translate_auto_translate","1"),c=h.toString()}catch{}}let p=new URL(e.url).pathname.split("/").pop(),f=!1,y=!0;if(p)try{let h=p.split(".")[0],C=h.slice(0,2),w=h.slice(2,4),k=new Date(`20${C}-${w}-27`),R=new Date(e.config.arxivRule.validBefore);k${At(e,"viewWithImmersiveTranslate")}`,u.appendChild(b)}else{let b="";if(c&&(b=c),b){let h=document.createElement("li");h.innerHTML=`${At(e,"viewWithImmersiveTranslate")}`,u.appendChild(h)}}}}if(e.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!e.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!e.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}d6||(d6=!0,Ue()&&e.rule.useIframePostMessage&&await K2());let n=e.sourceLanguage;n==="auto"?n=await m6():On(n);let r=G3(e,n);if(r&&(e=await He(xe(),{translationMode:r})),e.rule.isInjectMeta)try{let s=await Xu(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=fi(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){P.warn("inject meta failed",s)}let a=new URL(e.url),i=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||e.state.isAutoTranslate||e.isTranslateUrl||e.rule.pageType=="pdfReader";if(!i&&!e.isTranslateExcludeUrl&&(P.debug(`detect page language: ${e.url} ${n}`),Wr(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto"||J2(n,e.config.translationLanguagePattern)&&(i=!0,P.debug(`match language pattern ${n}, auto translate`))),e.rule.pageType=="ebookBuilder"&&(i=!1),e.rule.pageType!=="pdfReader"&&$i(t)&&ui(e,window),i)fe.state.isAutoTranslate=!0,yn(fe);else if(P.debug("do not auto translate",e),e.rule.initTranslationServiceAsSoonAsPossible&&e.translationService==="deepl"){if(Wr(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto")return;e.config&&e.config.translationServices&&e.config.translationServices.deepl&&e.config.translationServices.deepl.authKey&&typeof e.config.translationServices.deepl.authKey=="string"&&e.config.translationServices.deepl.authKey.startsWith("immersive_")&&(_0[e.translationService]||(_0[e.translationService]=!0,Ue()||Lm(e).catch(s=>{P.warn("init translation engine error",s)})))}}async function kp(e){if(Ke()==="Original"){let t={};mi&&(t.translationTheme=mi),fe&&(t={...fe.state,...t});let n=await He(xe(),t);if(e?.trigger=="right_menu"&&Oa(n?.rule)){let r=Qr(n.rule);Ho(!0,r||xe());return}await yn(fe,e)}else(Ke()==="Translated"||Ke()==="Error")&&Ja()}async function K7(){if(fe=await He(xe(),{}),fe.rule.pageType=="ebookBuilder")return Z9(fe);if(fe.rule.pageType=="subtitleBuilder")return X9(fe);Qb()}async function _p(e){if(Ke()==="Original"){fe=await He(xe(),{}),mi||(mi=fe.state.translationTheme);let t="mask";fe.state.translationTheme==="opacity"&&(t="opacity"),fe=await He(xe(),{translationTheme:t}),await yn(fe,e)}else if(Ke()==="Translated"){let t="mask";fe?.state?.translationTheme==="opacity"&&(t="opacity");let n=H3().filter(o=>o.contentDocument?.body).map(o=>o.contentDocument.body),r=[fe.mainFrame,...n],a=fe?.state.translationTheme;for(let o of r){let i=Lo(o,po,!0);a==="mask"||a==="opacity"?i!=="none"?ut(o,po,"none",!0):ut(o,po,t,!0):i!=="mask"&&i!=="opacity"?ut(o,po,t,!0):ut(o,po,"none",!0)}}}async function m6(){let e=await He(xe(),{});return e.rule.pageType=="subtitleBuilder"?ug():Xb(e)}function Y7(e){Ke()==="Original"?c6(e):Wa()}function J7(e){Ke()==="Original"?J9(e):lg()}function X7(e){Ke()==="Original"?ai(e):Wa()}async function Ja(){zo(""),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let e=await He(xe(),{});if(e.rule.pageType=="subtitleBuilder"){lg();return}else e.rule.pageType=="ebookBuilder"&&e6();Wa()}async function yn(e,t){e.config?.sentryConfig?.contentInitTime=="translate_page"&&(e.config?.sentryConfig,void 0);let n=Ke(),r={pageStatus:n,translateService:e.state.translationService||e.translationService,translationMode:e.state.translationMode};n!=="Original"&&await Ja(),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(Lt,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:e.targetLanguage}})})),_0[e.translationService]||(_0[e.translationService]=!0,Ue()||Lm(e).catch(o=>{P.warn("init translation engine error",o)}));let a={};if(t&&t.trigger&&(a.trigger=t.trigger),at("translage_page_daily",[{name:"translage_page_daily",params:a}],e),at("translate_page",[{name:"translate_page",params:a}],{...e,sourceLanguage:Et()}),e.rule.pageType=="subtitleBuilder"){J7(e),zo("yes");return}if(e.rule.pageType=="ebookBuilder"){t6(e),zo("yes");return}if(e.rule.pageType==="pdfReader"){Y7(e),zo("yes");return}X7(e),zo("yes")}async function Q7(e,t){let n=fe?.translationService;if(Ke()==="Original"||n!=e){fe=await He(xe(),{translationService:e});let r=At(fe,"temprarilyChangeTranslationTo_"+e);ll({text:r}),await yn(fe,t)}else{Ja();let r=await an(),a={url:xe(),config:r,state:{}},o=await Ht(a);fe=await He(xe(),{translationService:o.translationService})}}async function Z7(e){Ke()==="Original"?await pg(e):(Ke()==="Translated"||Ke()==="Error")&&(fe=await He(xe(),{}),fe.state.translationArea!=="main"?await pg(e):Ja())}async function pg(e){fe=await He(xe(),{translationArea:"main"}),await yn(fe,e)}async function p6(e){fe=await He(xe(),{translationArea:"body"}),await yn(fe,e)}async function Lp(e){let t=await He(xe(),{}),n=t.state.translationMode=="dual"?"translation":"dual";if(t=await He(xe(),{translationMode:n}),Ke()==="Original"){yn(t,e);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function ig(e){if(fe=await He(xe(),{translationMode:e}),at("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:e}}],{...fe,sourceLanguage:"unknown"}),Ke()==="Original"){yn(fe);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(e)}async function eA(e){if(Ke()==="Original")await p6(e);else if(Ke()==="Translated"||Ke()==="Error"){let t={};fe&&fe.state&&(t=fe.state),fe=await He(xe(),t),fe.state.translationArea!=="body"?(fe.state.translationArea="body",fe=await He(xe(),fe.state),await yn(fe,e)):Ja()}}async function g6(e){fe=await He(xe(),{translationStartMode:"immediate"}),await yn(fe,e)}async function tA(e){Ke()==="Original"?await g6(e):(Ke()==="Translated"||Ke()==="Error")&&Ja()}async function f6(){let e=await He(xe(),{});if(!ct(e.url,e.config.inputStyleBlockUrls)){let n=Ce().IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS;Cn(document,n,"immersive-translate-input-injected-css")}e.rule.pageType&&e.rule.pageType!=="html"||e.config.enableInputTranslation&&dg(e)}function nA(){return fe}async function He(e,t){let n=Object.keys(t);if(fe){let r={url:e,config:fe.config,state:{...fe.state,...t}};fe=await Ht(r)}else{let r=await an(),a=t;n.length===0&&(a=void 0),fe=await Ht({url:e,config:r,state:a})}return fe.state&&fe.state.translationService&&(fe.translationService=fe.state.translationService),fe.state&&fe.state.targetLanguage&&(fe.targetLanguage=fe.state.targetLanguage),fe}async function rA(){let e=await hn()||{},t=e.generalRule||{},n=t["subtitleRule.add"]||{},r=!n.preTranslation;await fn({...e,generalRule:{...t,"subtitleRule.add":{...n,preTranslation:r}}}),r?ll({text:At(fe,"videoSubtitlePreTranslationOn")}):ll({text:At(fe,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function eg(){let e=await an(),t=await ls(),n;fe&&fe.state&&(n=fe.state);let r={url:xe(),config:e,state:n},a=await Ht(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),fe=a,gp(fe);let o=_s(),i=[];return o?i=o.allInlineWindows||[window]:i=[window],i.forEach(s=>{Bs(a,s),$i(t)&&ui(a,s),dg(a)}),a}function aA(e,t=3e3){return new Promise((n,r)=>{let a=t?setTimeout(()=>{n(new Error("timeout"))},t):void 0,o=setInterval(()=>{e.every(s=>document.querySelector(s)!==null)&&(clearInterval(o),a&&clearTimeout(a),n(null))},50)})}async function $9(e){let t=e.detail,n=hn();await E9(t.token,n,fn),Wt.set(qt,t);let r=await Wt.get(Xc,!1);Wt.set(Xc,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),mg()}function G9(e){P.debug("update user info",e);let t=e.detail;Wt.set(qt,t),mg()}async function V9(e){let t=await hn();if(t.translationService)return;let n=e.config.translationService,r=await sg(e,n);if(e.translationService!==r){if(!r){Yi([{name:"no_avaliable_translation_service"}]);return}t.translationService=r,fn(t),e.translationService=r,Yi([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function K9(e,t){let n=t.detail;if(e.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,o=await hn();o.translationService=r,a&&o?.translationServices?.[r]?.provider&&(o.translationServices[r].provider=a),o.translationServiceChangedbyUserAt=new Date().toISOString(),fn(o)}async function sg(e,t,n=!0){let r=e.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,o)=>a===t?n?-1:1:o===t?n?1:-1:0),await G1(r,e)}async function Y9(e){let t=await hn();t.translationService=e,await fn(t);let n=await He(xe(),{});n.translationService=e,await yn(n)}D2({detectCurrentPageLanguage:m6,ensureSwitchTranslationMode:Lp,restorePage:Ja,retryFailedParagraphs:K7,switchTranslationMode:ig,toggleTranslatePage:kp,toggleTranslateTheMainPage:Z7,toggleTranslateTheWholePage:eA,toggleTranslationMask:_p,toggleVideoSubtitlePreTranslation:rA,translatePage:yn,translatePageWithTranslationService:Q7,translateTheMainPage:pg,translateTheWholePage:p6,translateToThePageEndImmediately:g6,toggleTranslateToThePageEndImmediately:tA,updateGlobalContext:eg,getPureGlobalContext:nA});async function h6(e){if(!e){let n=await an();e=await Ht({config:n,url:xe()})}if(e.config.debug?P.setLevel("debug"):P.setLevel("info"),!e.isTranslateExcludeUrl){if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){if(e.rule.isInjectMeta){try{let n=await Xu("auto"),r=document.createElement("meta");r.name="immersive-translate-meta",r.content=fi(JSON.stringify(n)),document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(n){P.warn("inject meta failed",n)}if(e.rule.isInjectOptionsUrl){let n=jo(),r=document.createElement("meta");r.name="immersive-translate-options-url",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){P.warn("inject options url failed",a)}}if(e.rule.isInjectVersion){let n=Xt(),r=document.createElement("meta");r.name="immersive-translate-version",r.content=n;try{document.head&&document.head.appendChild&&document.head.appendChild(r)}catch(a){P.warn("inject version failed",a)}}}}else await S0();Ue()||await R9().catch(n=>{P.error(`init popup page error: ${n}`)}),Ue()||Ry()}await f6()}d();var Rs={capture:!0,once:!0,passive:!0},E6=()=>document.readyState==="interactive"||document.readyState==="complete",oA=e=>document.readyState===e,Is=(e,t)=>oA(e)||E6()?(t(e),!0):!1,iA=()=>new Promise(e=>{Is("loading",e)||document.addEventListener("readystatechange",()=>{document.readyState==="loading"&&e("loading")},Rs)}),sA=()=>new Promise(e=>{Is("interactive",e)||document.addEventListener("readystatechange",()=>{document.readyState==="interactive"&&e("interactive")},Rs)}),uA=()=>new Promise(e=>{Is("complete",e)||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&e("complete")},Rs)}),b6=()=>new Promise(e=>{Is("domready",e)||document.addEventListener("DOMContentLoaded",()=>{e("domready")},Rs)}),y6=()=>new Promise(e=>{Is("load",e)||window.addEventListener("load",()=>{e("load")},Rs)}),x6={};Object.defineProperties(x6,{state:{get:function(){return document.readyState}},loading:{get:function(){return iA()}},interactive:{get:function(){return sA()}},complete:{get:function(){return uA()}},window:{get:function(){return y6()}},load:{get:function(){return y6()}},domready:{get:function(){return b6()}},dom:{get:function(){return b6()}},ready:{get:function(){return E6()}}});var T6=x6;d();d();var v6={NOT_FUNCTION:"Your executor is not a function. functions and promises are valid.",FAILED_TO_WAIT:"Failed to wait"};function lA(e){return()=>Promise.resolve().then(()=>e()).catch(t=>{throw t})}function cA(e){if(typeof e!="function")throw new Error(v6.NOT_FUNCTION)}var gg=class{_interval;_timeout;_stopOnFailure;_backoffFactor;_backoffMaxInterval;_Console;originalStacktraceError;_userMessage;_verbose;_isWaiting;_isResolved;_executeFn;start;promise;resolve;reject;_lastError;constructor({interval:t=100,timeout:n=1e3,stopOnFailure:r=!1,verbose:a=!1,backoffFactor:o=1,backoffMaxInterval:i,message:s=""}={}){this._interval=t,this._timeout=n,this._stopOnFailure=r,this._isWaiting=!1,this._isResolved=!1,this._verbose=a,this._userMessage=s,this.originalStacktraceError=new Error,this._Console=console,this._backoffFactor=o,this._backoffMaxInterval=i||n,this.start=+Date.now()}tryEvery(t){return this._interval=t,this}stopAfter(t){return this._timeout=t,this}execute(t){return this._applyPromiseHandlers(),cA(t),this._executeFn=lA(t),this.start=Date.now(),this._isWaiting=!0,this._log("starting to execute"),this._runFunction(),this.promise}getPromise(){return this.promise}isResolved(){return this._isResolved}isWaiting(){return this._isWaiting}stopOnFailure(t){return this._stopOnFailure=t,this}_applyPromiseHandlers(){this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n})}_timeFromStart(){return Date.now()-this.start}_shouldStopTrying(){return this._timeFromStart()>this._timeout}_executeAgain(){this._log("executing again");let t=this._interval,n=t*this._backoffFactor;this._interval=n>this._backoffMaxInterval?this._backoffMaxInterval:n,setTimeout(this._runFunction.bind(this),t)}_failedToWait(){let t=`${v6.FAILED_TO_WAIT} after ${this._timeFromStart()}ms`;if(this._userMessage&&(t=`${t}: ${this._userMessage}`),this._lastError){this._lastError.message=`${t} ${this._lastError.message}`;let n=this.originalStacktraceError.stack;n&&(this._lastError.stack+=n.substring(n.indexOf(` -`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=t;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(t=>{if(t===!1){this._log(`then execute again with result: ${t}`),this._executeAgain();return}this.resolve?.(t),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${t}`)}).catch(t=>this._stopOnFailure?(this._log(`stopped on failure with err: ${t}`),this.reject?.(t)):(this._lastError=t,this._log(`catch with err: ${t}`),this._executeAgain()))}_log(t){this._verbose&&this._Console&&this._Console.log&&this._Console.log(t)}},C6=(e,t)=>new gg(t).execute(e);async function S6(e){try{let t=e.config.domReadyDetectTimeout;return await C6(()=>{let r=e.mainFrame.innerText||"";if(Ao(r,e.rule.mainFrameMinTextCount,e.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:t!==void 0?t:3e3}),!0}catch(t){if(Ue())throw t;return P.debug("check dom element ready failed:",t,e),!0}}d();function w6(){let e=document.querySelector("meta[name=immersive-translate-options]");return!!(e&&e.getAttribute("content")==="true")}d();async function A6(){if(!document.getElementById("immersive-translate-status")){P.error("Could not find status element");return}await D6("local"),await D6("sync"),mA();let t=document.getElementById("immersive-translate-page-ready");t&&setTimeout(()=>{t.value="true",t.dispatchEvent(new Event("change"))},100)}async function dA(e,t){let n;try{n=JSON.parse(e.detail)}catch(a){P.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},o=await t(a),i={id:r,ok:!0,data:o};document.dispatchEvent(new CustomEvent(bu,{detail:JSON.stringify({...i,type:"answer"})}))}catch(a){let o={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(bu,{detail:JSON.stringify({...o,id:r,type:"answer"})}))}}function mA(){document.addEventListener(hu,r=>{let a=r;if(P.debug("document message",a),a&&a.detail){let o;try{o=JSON.parse(a.detail)}catch(i){P.error("parse detail failed",i);return}o.type==="ask"?o.method==="request"&&dA(a,ce):o.type==="tell"&&o.method==="updateCommands"&&xl(o.data)}});let e=document.getElementById("immersive-translate-manifest");if(!e){P.error("Could not find manifest element");return}let t=oe.runtime.getManifest();nt()&&(t._isSafari=!0),e.value=JSON.stringify(t),e.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){P.error("parse message error",a)}})}async function D6(e){let t=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${e}-storage`);if(n){P.debug("init storage");let r=await oe.storage[e].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let o=JSON.parse(a.target.value);oe.storage[e].set(o)}catch(o){P.error("save to storage error",o)}}),n.addEventListener("refresh-"+e,async a=>{let o=await oe.storage[e].get(null);n.value=JSON.stringify(o),P.debug("refresh ",e,"storage")})}else{P.error(`Could not find storage ${e} element`),t.innerText="Could not find storage local input element";return}}var k6=["textarea","input","button","select","option","iframe","strong","form","body"];async function pA(){let e=await pn();e.sentryConfig?.contentInitTime=="init"&&(e.sentryConfig,void 0),e.excludeTranslationHtmlTags&&(k6=e.excludeTranslationHtmlTags),Ge.addHook("beforeSanitizeElements",function(r,a,o){let i=(r.nodeName||"").toLowerCase();if(k6.includes(i)){let u=`<${i}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ge.addHook("uponSanitizeElement",function(r,a){let o=r.nodeName||"";/\d+$/.test(o)&&(a.allowedTags[a.tagName]=!0)});let t=xe(),n=await Ut({config:e,url:t});rt("init_page_daily",[{name:"init_page_daily"}],n),T6.domready.then(()=>{if(n.isTranslateExcludeUrl&&w6())P.debug("detect web options page"),Bs(n,window),A6();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Xt(),o=document.createElement("meta");o.name="immersive-translate-version",o.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(o)}catch(i){P.warn("inject version failed",i)}}if(ct(n.url,n.config.blockUrls))return;Bs(n,window),S6(n).then(()=>{h6(n).catch(a=>{a&&P.debug("translate page error",a.name,a.message,a)})}).catch(a=>{P.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&P.debug("translate dom ready detect error",r)})}pA().catch(e=>{P.debug("init error",e)});})(); +`)+1))}else this._lastError=this.originalStacktraceError,this._lastError.message=t;return this._log(this._lastError),this._lastError}_runFunction(){if(this._shouldStopTrying()){this._isWaiting=!1,this.reject?.(this._failedToWait());return}this._executeFn().then(t=>{if(t===!1){this._log(`then execute again with result: ${t}`),this._executeAgain();return}this.resolve?.(t),this._isWaiting=!1,this._isResolved=!0,this._log(`then done waiting with result: ${t}`)}).catch(t=>this._stopOnFailure?(this._log(`stopped on failure with err: ${t}`),this.reject?.(t)):(this._lastError=t,this._log(`catch with err: ${t}`),this._executeAgain()))}_log(t){this._verbose&&this._Console&&this._Console.log&&this._Console.log(t)}},C6=(e,t)=>new gg(t).execute(e);async function S6(e){try{let t=e.config.domReadyDetectTimeout;return await C6(()=>{let r=e.mainFrame.innerText||"";if(Ao(r,e.rule.mainFrameMinTextCount,e.rule.mainFrameMinWordCount))return!0;throw new Error("there is no main text")},{timeout:t!==void 0?t:3e3}),!0}catch(t){if(Ue())throw t;return P.debug("check dom element ready failed:",t,e),!0}}d();function w6(){let e=document.querySelector("meta[name=immersive-translate-options]");return!!(e&&e.getAttribute("content")==="true")}d();async function A6(){if(!document.getElementById("immersive-translate-status")){P.error("Could not find status element");return}await D6("local"),await D6("sync"),mA();let t=document.getElementById("immersive-translate-page-ready");t&&setTimeout(()=>{t.value="true",t.dispatchEvent(new Event("change"))},100)}async function dA(e,t){let n;try{n=JSON.parse(e.detail)}catch(a){P.error("parse detail failed",a);return}let r=n.id||"default";try{let a=n.data||{},o=await t(a),i={id:r,ok:!0,data:o};document.dispatchEvent(new CustomEvent(bu,{detail:JSON.stringify({...i,type:"answer"})}))}catch(a){let o={ok:!1,errorName:a.name,errorMessage:a.message,errorDetails:a.details||a.detail};document.dispatchEvent(new CustomEvent(bu,{detail:JSON.stringify({...o,id:r,type:"answer"})}))}}function mA(){document.addEventListener(hu,r=>{let a=r;if(P.debug("document message",a),a&&a.detail){let o;try{o=JSON.parse(a.detail)}catch(i){P.error("parse detail failed",i);return}o.type==="ask"?o.method==="request"&&dA(a,ce):o.type==="tell"&&o.method==="updateCommands"&&xl(o.data)}});let e=document.getElementById("immersive-translate-manifest");if(!e){P.error("Could not find manifest element");return}let t=oe.runtime.getManifest();rt()&&(t._isSafari=!0),e.value=JSON.stringify(t),e.dispatchEvent(new Event("change")),document.getElementById("immersive-translate-message").addEventListener("change",r=>{try{let a=JSON.parse(r.target.value);a&&a.method==="removeStorageKey"&&a.data&&a.data.area&&a.data.keys&&oe.storage[a.data.area].remove(a.data.keys)}catch(a){P.error("parse message error",a)}})}async function D6(e){let t=document.getElementById("immersive-translate-status"),n=document.getElementById(`immersive-translate-${e}-storage`);if(n){P.debug("init storage");let r=await oe.storage[e].get(null);n.value=JSON.stringify(r),n.dispatchEvent(new Event("change")),n.addEventListener("change",a=>{try{let o=JSON.parse(a.target.value);oe.storage[e].set(o)}catch(o){P.error("save to storage error",o)}}),n.addEventListener("refresh-"+e,async a=>{let o=await oe.storage[e].get(null);n.value=JSON.stringify(o),P.debug("refresh ",e,"storage")})}else{P.error(`Could not find storage ${e} element`),t.innerText="Could not find storage local input element";return}}var k6=["textarea","input","button","select","option","iframe","strong","form","body"];async function pA(){let e=await pn();e.sentryConfig?.contentInitTime=="init"&&(e.sentryConfig,void 0),e.excludeTranslationHtmlTags&&(k6=e.excludeTranslationHtmlTags),Ge.addHook("beforeSanitizeElements",function(r,a,o){let i=(r.nodeName||"").toLowerCase();if(k6.includes(i)){let u=`<${i}>${r.textContent||""}`,l=document.createTextNode(u);return r.replaceWith(l),r}return r}),Ge.addHook("uponSanitizeElement",function(r,a){let o=r.nodeName||"";/\d+$/.test(o)&&(a.allowedTags[a.tagName]=!0)});let t=xe(),n=await Ht({config:e,url:t});at("init_page_daily",[{name:"init_page_daily"}],n),T6.domready.then(()=>{if(n.isTranslateExcludeUrl&&w6())P.debug("detect web options page"),Bs(n,window),A6();else{if(!n.config.enabled)return;if(n.rule.isInjectVersion){let a=Xt(),o=document.createElement("meta");o.name="immersive-translate-version",o.content=a;try{document.head&&document.head.appendChild&&document.head.appendChild(o)}catch(i){P.warn("inject version failed",i)}}if(ct(n.url,n.config.blockUrls))return;Bs(n,window),S6(n).then(()=>{h6(n).catch(a=>{a&&P.debug("translate page error",a.name,a.message,a)})}).catch(a=>{P.debug("can not detect a valid body: ",a)})}}).catch(r=>{r&&P.debug("translate dom ready detect error",r)})}pA().catch(e=>{P.debug("init error",e)});})(); /*! Bundled license information: bowser/src/bowser.js: diff --git a/docs/options/options.js b/docs/options/options.js index a47fafc..93c9b8b 100644 --- a/docs/options/options.js +++ b/docs/options/options.js @@ -1,4 +1,4 @@ -(()=>{var k5=Object.create;var Nc=Object.defineProperty;var A5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var _5=Object.getPrototypeOf,M5=Object.prototype.hasOwnProperty;var P5=(e,t)=>()=>(e&&(t=e(e=0)),t);var F5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Uc=(e,t)=>{for(var n in t)Nc(e,n,{get:t[n],enumerable:!0})},B5=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L5(t))!M5.call(e,a)&&a!==n&&Nc(e,a,{get:()=>t[a],enumerable:!(r=A5(t,a))||r.enumerable});return e};var R5=(e,t,n)=>(n=e!=null?k5(_5(e)):{},B5(t||!e||!e.__esModule?Nc(n,"default",{value:e,enumerable:!0}):n,e));var E,m=P5(()=>{E={BUILD_TIME:"2024-04-03T14:10:03.000Z",VERSION:"1.4.4",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { +(()=>{var k5=Object.create;var Oc=Object.defineProperty;var A5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var _5=Object.getPrototypeOf,M5=Object.prototype.hasOwnProperty;var P5=(e,t)=>()=>(e&&(t=e(e=0)),t);var F5=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Nc=(e,t)=>{for(var n in t)Oc(e,n,{get:t[n],enumerable:!0})},B5=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of L5(t))!M5.call(e,a)&&a!==n&&Oc(e,a,{get:()=>t[a],enumerable:!(r=A5(t,a))||r.enumerable});return e};var R5=(e,t,n)=>(n=e!=null?k5(_5(e)):{},B5(t||!e||!e.__esModule?Oc(n,"default",{value:e,enumerable:!0}):n,e));var E,m=P5(()=>{E={BUILD_TIME:"2024-04-03T14:28:35.000Z",VERSION:"1.4.5",PROD:"1",REDIRECT_URL:"https://dash.immersivetranslate.com/auth-done/",PROD_API:"1",BETA:"0",IMMERSIVE_TRANSLATE_INJECTED_CSS:`:root { --immersive-translate-theme-underline-borderColor: #72ece9; --immersive-translate-theme-nativeUnderline-borderColor: #72ece9; --immersive-translate-theme-nativeDashed-borderColor: #72ece9; @@ -4936,32 +4936,32 @@ select.text-gray-6 {
-`,IMMERSIVE_TRANSLATE_VIDEO_SUBTITLE_INJECT:'(()=>{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",IMMERSIVE_TRANSLATE_USERSCRIPT:"1",INSTALL_FROM:"official_userscript"}});var P6=F5((B0,fu)=>{m();(function(){var e;function t(h){var y,C,b="",x=-1,S;if(h&&h.length)for(S=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,C,b,x,S,A=[],P;if(y=C=b=x=S=0,h&&h.length)for(P=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),A[C]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),S=h.charCodeAt(y+2),A[C]=String.fromCharCode((b&15)<<12|(x&63)<<6|S&63),y+=3);return A.join("")}function r(h,y){var C=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(C>>16);return b<<16|C&65535}function a(h,y){return h<>>32-y}function o(h,y){for(var C=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,S=0,A=h.length;S>>4&15)+C.charAt(x&15);return b}function i(h){var y,C=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,C=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,C=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,C=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,C=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function p(h,y){var C=y.length,b=Array(),x,S,A,P,w,v,L,D;for(v=Array(Math.ceil(h.length/2)),P=v.length,x=0;x0;){for(w=Array(),A=0,x=0;x0||S>0)&&(w[w.length]=S);b[b.length]=A,v=w}for(L="",x=b.length-1;x>=0;x--)L+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=L.length;xh.length*8?b+=y:b+=C.charAt(P>>>6*(3-A)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",C=!1,b=!0;this.encode=function(x){var S,A,P,w="";for(y=y||"=",x=b?t(x):x,len=x.length,S=0;Slen*8?w+=y:w+=h.charAt(P>>>6*(3-A)&63);return w},this.decode=function(x){var S,A,P,w,v,L,D,T,j,R,M="",O=[];if(!x)return x;S=R=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(S++)),L=h.indexOf(x.charAt(S++)),D=h.indexOf(x.charAt(S++)),T=h.indexOf(x.charAt(S++)),j=v<<18|L<<12|D<<6|T,A=j>>16&255,P=j>>8&255,w=j&255,R+=1,D===64?O[R]=String.fromCharCode(A):T===64?O[R]=String.fromCharCode(A,P):O[R]=String.fromCharCode(A,P,w);while(S>>8^C;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,C=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(T){return o(x(T,b),y)},this.b64=function(T){return f(x(T),C)},this.any=function(T,j){return p(x(T,b),j)},this.raw=function(T){return x(T,b)},this.hex_hmac=function(T,j){return o(S(T,j),y)},this.b64_hmac=function(T,j){return f(S(T,j),C)},this.any_hmac=function(T,j,R){return p(S(T,j),R)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(T){return typeof T=="boolean"&&(y=T),this},this.setPad=function(T){return C=T||C,this},this.setUTF8=function(T){return typeof T=="boolean"&&(b=T),this};function x(T){return T=b?t(T):T,l(A(c(T),T.length*8))}function S(T,j){var R,M,O,N,H;for(T=b?t(T):T,j=b?t(j):j,R=c(T),R.length>16&&(R=A(R,T.length*8)),M=Array(16),O=Array(16),H=0;H<16;H+=1)M[H]=R[H]^909522486,O[H]=R[H]^1549556828;return N=A(M.concat(c(j)),512+j.length*8),l(A(O.concat(N),512+128))}function A(T,j){var R,M,O,N,H,B=1732584193,k=-271733879,_=-1732584194,F=271733878;for(T[j>>5]|=128<>>9<<4)+14]=j,R=0;R16&&(D=A(D,v.length*8)),T=Array(16),j=Array(16),R=0;R<16;R+=1)T[R]=D[R]^909522486,j[R]=D[R]^1549556828;return M=A(T.concat(g(L)),512+L.length*8),u(A(j.concat(M),512+160))}function A(v,L){var D,T,j,R,M,O,N,H,B=Array(80),k=1732584193,_=-271733879,F=-1732584194,q=271733878,z=-1009589776;for(v[L>>5]|=128<<24-L%32,v[(L+64>>9<<4)+15]=L,D=0;D16&&(z=B(z,k.length*8));q<16;q+=1)V[q]=z[q]^909522486,K[q]=z[q]^1549556828;return F=B(V.concat(g(_)),512+_.length*8),u(B(K.concat(F),512+256))}function P(k,_){return k>>>_|k<<32-_}function w(k,_){return k>>>_}function v(k,_,F){return k&_^~k&F}function L(k,_,F){return k&_^k&F^_&F}function D(k){return P(k,2)^P(k,13)^P(k,22)}function T(k){return P(k,6)^P(k,11)^P(k,25)}function j(k){return P(k,7)^P(k,18)^w(k,3)}function R(k){return P(k,17)^P(k,19)^w(k,10)}function M(k){return P(k,28)^P(k,34)^P(k,39)}function O(k){return P(k,14)^P(k,18)^P(k,41)}function N(k){return P(k,1)^P(k,8)^w(k,7)}function H(k){return P(k,19)^P(k,61)^w(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function B(k,_){var F=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],q=new Array(64),z,V,K,oe,te,Z,ce,he,ae,X,ve,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=P(k,O.length*8));B<32;B+=1)_[B]=k[B]^909522486,F[B]=k[B]^1549556828;return H=P(_.concat(g(N)),1024+N.length*8),u(P(F.concat(H),1024+512))}function P(O,N){var H,B,k,_=new Array(80),F=new Array(16),q=[new w(1779033703,-205731576),new w(-1150833019,-2067093701),new w(1013904242,-23791573),new w(-1521486534,1595750129),new w(1359893119,-1377402159),new w(-1694144372,725511199),new w(528734635,-79577749),new w(1541459225,327033209)],z=new w(0,0),V=new w(0,0),K=new w(0,0),oe=new w(0,0),te=new w(0,0),Z=new w(0,0),ce=new w(0,0),he=new w(0,0),ae=new w(0,0),X=new w(0,0),ve=new w(0,0),se=new w(0,0),ue=new w(0,0),De=new w(0,0),He=new w(0,0),Fe=new w(0,0),pe=new w(0,0);for(x===void 0&&(x=[new w(1116352408,-685199838),new w(1899447441,602891725),new w(-1245643825,-330482897),new w(-373957723,-2121671748),new w(961987163,-213338824),new w(1508970993,-1241133031),new w(-1841331548,-1357295717),new w(-1424204075,-630357736),new w(-670586216,-1560083902),new w(310598401,1164996542),new w(607225278,1323610764),new w(1426881987,-704662302),new w(1925078388,-226784913),new w(-2132889090,991336113),new w(-1680079193,633803317),new w(-1046744716,-815192428),new w(-459576895,-1628353838),new w(-272742522,944711139),new w(264347078,-1953704523),new w(604807628,2007800933),new w(770255983,1495990901),new w(1249150122,1856431235),new w(1555081692,-1119749164),new w(1996064986,-2096016459),new w(-1740746414,-295247957),new w(-1473132947,766784016),new w(-1341970488,-1728372417),new w(-1084653625,-1091629340),new w(-958395405,1034457026),new w(-710438585,-1828018395),new w(113926993,-536640913),new w(338241895,168717936),new w(666307205,1188179964),new w(773529912,1546045734),new w(1294757372,1522805485),new w(1396182291,-1651133473),new w(1695183700,-1951439906),new w(1986661051,1014477480),new w(-2117940946,1206759142),new w(-1838011259,344077627),new w(-1564481375,1290863460),new w(-1474664885,-1136513023),new w(-1035236496,-789014639),new w(-949202525,106217008),new w(-778901479,-688958952),new w(-694614492,1432725776),new w(-200395387,1467031594),new w(275423344,851169720),new w(430227734,-1194143544),new w(506948616,1363258195),new w(659060556,-544281703),new w(883997877,-509917016),new w(958139571,-976659869),new w(1322822218,-482243893),new w(1537002063,2003034995),new w(1747873779,-692930397),new w(1955562222,1575990012),new w(2024104815,1125592928),new w(-2067236844,-1578062990),new w(-1933114872,442776044),new w(-1866530822,593698344),new w(-1538233109,-561857047),new w(-1090935817,-1295615723),new w(-965641998,-479046869),new w(-903397682,-366583396),new w(-779700025,566280711),new w(-354779690,-840897762),new w(-176337025,-294727304),new w(116418474,1914138554),new w(174292421,-1563912026),new w(289380356,-1090974290),new w(460393269,320620315),new w(685471733,587496836),new w(852142971,1086792851),new w(1017036298,365543100),new w(1126000580,-1676669620),new w(1288033470,-885112138),new w(1501505948,-60457430),new w(1607167915,987167468),new w(1816402316,1246189591)]),B=0;B<80;B+=1)_[B]=new w(0,0);for(O[N>>5]|=128<<24-(N&31),O[(N+128>>10<<5)+31]=N,k=O.length,B=0;B>>H|N.h<<32-H,O.h=N.h>>>H|N.l<<32-H}function D(O,N,H){O.l=N.h>>>H|N.l<<32-H,O.h=N.l>>>H|N.h<<32-H}function T(O,N,H){O.l=N.l>>>H|N.h<<32-H,O.h=N.h>>>H}function j(O,N,H){var B=(N.l&65535)+(H.l&65535),k=(N.l>>>16)+(H.l>>>16)+(B>>>16),_=(N.h&65535)+(H.h&65535)+(k>>>16),F=(N.h>>>16)+(H.h>>>16)+(_>>>16);O.l=B&65535|k<<16,O.h=_&65535|F<<16}function R(O,N,H,B,k){var _=(N.l&65535)+(H.l&65535)+(B.l&65535)+(k.l&65535),F=(N.l>>>16)+(H.l>>>16)+(B.l>>>16)+(k.l>>>16)+(_>>>16),q=(N.h&65535)+(H.h&65535)+(B.h&65535)+(k.h&65535)+(F>>>16),z=(N.h>>>16)+(H.h>>>16)+(B.h>>>16)+(k.h>>>16)+(q>>>16);O.l=_&65535|F<<16,O.h=q&65535|z<<16}function M(O,N,H,B,k,_){var F=(N.l&65535)+(H.l&65535)+(B.l&65535)+(k.l&65535)+(_.l&65535),q=(N.l>>>16)+(H.l>>>16)+(B.l>>>16)+(k.l>>>16)+(_.l>>>16)+(F>>>16),z=(N.h&65535)+(H.h&65535)+(B.h&65535)+(k.h&65535)+(_.h&65535)+(q>>>16),V=(N.h>>>16)+(H.h>>>16)+(B.h>>>16)+(k.h>>>16)+(_.h>>>16)+(z>>>16);O.l=F&65535|q<<16,O.h=z&65535|V<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,C=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],S=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],A=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],P=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(M){return o(w(M,b))},this.b64=function(M){return f(w(M,b),C)},this.any=function(M,O){return p(w(M,b),O)},this.raw=function(M){return w(M,b)},this.hex_hmac=function(M,O){return o(v(M,O))},this.b64_hmac=function(M,O){return f(v(M,O),C)},this.any_hmac=function(M,O,N){return p(v(M,O),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(M){return typeof M=="boolean"&&(y=M),this},this.setPad=function(M){return typeof M<"u"&&(C=M),this},this.setUTF8=function(M){return typeof M=="boolean"&&(b=M),this};function w(M){return M=b?t(M):M,L(D(c(M),M.length*8))}function v(M,O){M=b?t(M):M,O=b?t(O):O;var N,H,B=c(M),k=Array(16),_=Array(16);for(B.length>16&&(B=D(B,M.length*8)),N=0;N<16;N+=1)k[N]=B[N]^909522486,_[N]=B[N]^1549556828;return H=D(k.concat(c(O)),512+O.length*8),L(D(_.concat(H),512+160))}function L(M){var O,N="",H=M.length*32;for(O=0;O>5]>>>O%32&255);return N}function D(M,O){var N,H,B,k,_=1732584193,F=4023233417,q=2562383102,z=271733878,V=3285377520,K,oe,te,Z,ce,he,ae,X,ve,se;for(M[O>>5]|=128<>>9<<4)+14]=O,k=M.length,B=0;Bt(i),get:u=>{if(u===null)return Promise.resolve(e(i));let l=[],c=e(i);typeof u=="string"?l=[u]:Array.isArray(u)?l=u:l=Object.keys(u);let g={};for(let p of l)g[p]=c[p];return Promise.resolve(g)},set:u=>{let l=r(),c=e(i);for(let f in u)c[f]=u[f];let g=document.getElementById("immersive-translate-sync-storage"),p=document.getElementById("immersive-translate-local-storage");if(!g||!p)throw new Error("Storage element not found");if(i==="sync"||l._isUserscript){g.value=JSON.stringify(c);let f=new Event("change");g.dispatchEvent(f)}return(i==="local"||l._isUserscript)&&(p.value=JSON.stringify(c),p.dispatchEvent(new Event("change"))),Promise.resolve()},remove:u=>{let l=r(),c=document.getElementById("immersive-translate-message");if(!c)throw new Error("Message element not found");let g={method:"removeStorageKey",data:{area:i,keys:u}};return new Promise((p,f)=>{c.value=JSON.stringify(g);let h=new Event("change");c.dispatchEvent(h),l._isUserscript?setTimeout(()=>{c.value=JSON.stringify({...g,data:{...g.data,area:g.data.area==="sync"?"local":"sync"}}),c.dispatchEvent(new Event("change")),p(null)},10):p(null)})}}}function r(){let i=document.getElementById("immersive-translate-manifest");if(!i)throw new Error("Manifest element not found");let s=i.value,u={};if(s){try{u=JSON.parse(s)}catch(l){throw l}return u}else return{}}function a(){return globalThis.navigator.languages||[globalThis.navigator.language||globalThis.navigator.userLanguage]}let o={storage:{local:n("local"),sync:n("sync")},runtime:{getManifest:r,lastError:null,getURL:i=>i},contextMenus:{update:()=>{}},i18n:{getAcceptLanguages:a}};globalThis.immersiveTranslateBrowserAPI=o})();m();m();m();m();var Vu,Be,sf,O5,is,nf,uf,qu={},lf=[],N5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(e,t){for(var n in t)e[n]=t[n];return e}function cf(e){var t=e.parentNode;t&&t.removeChild(e)}function ss(e,t,n){var r,a,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?Vu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return zu(e,i,r,a,null)}function zu(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++sf};return a==null&&Be.vnode!=null&&Be.vnode(o),o}function xe(e){return e.children}function no(e,t){this.props=e,this.context=t}function Go(e,t){if(t==null)return e.__?Go(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?zu(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(p=b[c])===null||p&&f.key==p.key&&f.type===p.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:Ku}),n.__[e]}function $(e){return us=1,z5(kf,e)}function z5(e,t,n){var r=Yu(ls++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):kf(void 0,t),function(o){var i=r.__N?r.__N[0]:r.__[0],s=r.t(i,o);i!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=Bt,!Bt.u)){Bt.u=!0;var a=Bt.shouldComponentUpdate;Bt.shouldComponentUpdate=function(o,i,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,o,i,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,o,i,s))}}return r.__N||r.__}function le(e,t){var n=Yu(ls++,3);!Be.__s&&Df(n.__H,t)&&(n.__=e,n.i=t,Bt.__H.__h.push(n))}function qe(e){return us=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=Yu(ls++,7);return Df(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ne(e,t){return us=8,Re(function(){return e},t)}function Le(e){var t=Bt.context[e.__c],n=Yu(ls++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Bt)),t.props.value):e.__}function q5(){for(var e;e=wf.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gu),e.__H.__h.forEach(qc),e.__H.__h=[]}catch(t){e.__H.__h=[],Be.__e(t,e.__v)}}Be.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),Bt=null,Cf&&Cf(e)},Be.__r=function(e){Tf&&Tf(e),ls=0;var t=(Bt=e.__c).__H;t&&(zc===Bt?(t.__h=[],Bt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ku,n.__N=n.i=void 0})):(t.__h.forEach(Gu),t.__h.forEach(qc),t.__h=[])),zc=Bt},Be.diffed=function(e){vf&&vf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wf.push(t)!==1&&yf===Be.requestAnimationFrame||((yf=Be.requestAnimationFrame)||W5)(q5)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ku&&(n.__=n.__V),n.i=void 0,n.__V=Ku})),zc=Bt=null},Be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Gu),n.__h=n.__h.filter(function(r){return!r.__||qc(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Be.__e(r,n.__v)}}),xf&&xf(e,t)},Be.unmount=function(e){Ef&&Ef(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Gu(r)}catch(a){t=a}}),n.__H=void 0,t&&Be.__e(t,n.__v))};var Sf=typeof requestAnimationFrame=="function";function W5(e){var t,n=function(){clearTimeout(r),Sf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Sf&&(t=requestAnimationFrame(n))}function Gu(e){var t=Bt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Bt=t}function qc(e){var t=Bt;e.__c=e.__(),Bt=t}function Df(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function kf(e,t){return typeof t=="function"?t(e):t}m();m();m();var cs;function td(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function Of(e,t=","){return e.map(td).join(t)}var nd=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Jo(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function Qu(e,t="@media "){return t+lt(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function lt(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function Af(e){return e}function gs(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Nf(e){return e.match(/[-=:;]/g)?.length||0}function Yc(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Nf(e),15)<<18}var $5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function rd({n:e,i:t,v:n=[]},r,a,o){e&&(e=td({n:e,i:t,v:n})),o=[...lt(o)];for(let s of n){let u=r.theme("screens",s);for(let l of lt(u&&Qu(u)||r.v(s))){var i;o.push(l),a|=u?67108864|Yc(l):s=="dark"?1073741824:l[0]=="@"?Yc(l):(i=l,1<<~(/:([a-z-]+)/.test(i)&&~$5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:o,i:t}}var ad=new Map;function Jc(e){if(e.d){let t=[],n=Wc(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?Wc(r,o=>Wc(a,i=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(i);if(s){let u=o.indexOf(s[1]);return~u?o.slice(0,u)+s[0]+o.slice(u+s[1].length):$c(o,i)}return $c(i,o)})):r,"&"),r=>$c(r,e.n?"."+nd(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function Wc(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function $c(e,t){return e.replace(/&/g,t)}var Lf=new Intl.Collator("en",{numeric:!0});function Uf(e,t){for(var n=0,r=e.length;n>1;0>=jf(e[a],t)?n=a+1:r=a}return r}function jf(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||Lf.compare(_f(e.n),_f(t.n))||Lf.compare(Mf(e.n),Mf(t.n))}function _f(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function Mf(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function Vc(e,t){return Math.round(parseInt(e,16)*t)}function Nr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let o=(e.length-1)/3,i=[17,1,.062272][o-1];return`rgba(${[Vc(e.substr(1,o),i),Vc(e.substr(1+o,o),i),Vc(e.substr(1+2*o,o),i),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function od(e,t,n,r,a=[]){return function o(i,{n:s,p:u,r:l=[],i:c},g){let p=[],f="",h=0,y=0;for(let x in i||{}){var C,b;let S=i[x];if(x[0]=="@"){if(!S)continue;if(x[1]=="a"){p.push(...ud(s,u,ds(""+S),g,u,l,c,!0));continue}if(x[1]=="l"){for(let A of lt(S))p.push(...o(A,{n:s,p:(C=Nt[x[7]],u&~Nt.o|C),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){p.push(...lt(S).map(A=>({p:-1,o:0,r:[],d:x+" "+A})));continue}if(x[1]=="k"){p.push({p:Nt.d,o:0,r:[x],d:o(S,{p:Nt.d},g).map(Jc).join("")});continue}if(x[1]=="f"){p.push(...lt(S).map(A=>({p:Nt.d,o:0,r:[x],d:o(A,{p:Nt.d},g).map(Jc).join("")})));continue}}if(typeof S!="object"||Array.isArray(S))x=="label"&&S?s=S+Jo(JSON.stringify([u,c,i])):(S||S===0)&&(x=x.replace(/[A-Z]/g,A=>"-"+A.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:Nf(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),f+=(f?";":"")+lt(S).map(A=>g.s(x,id(""+A,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let A=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(P,w)=>{let v=g.theme("screens",w);return v?(A|=67108864,Qu(v,"")):P}),A|=Yc(x)),p.push(...o(S,{n:s,p:A,r:[...l,x],i:c},g))}else p.push(...o(S,{p:u,r:[...l,x]},g))}return p.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:f}),p.sort(jf)}(e,rd(t,n,r,a),n)}function id(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,o,i="")=>{let s=t(a,i);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Nr(s):""+lt(s).filter(u=>Object(u)!==u)})}function sd(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function Ju(e,t,n=Nt.u,r,a){let o=[];for(let i of e)for(let s of function(u,l,c,g,p){u={...u,i:u.i||p};let f=function(h,y){let C=ad.get(h.n);return C?C(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return f?typeof f=="string"?({r:g,p:c}=rd(u,l,c,g),sd(Ju(ds(f),l,c,g,u.i),u.n)):Array.isArray(f)?f.map(h=>{var y,C;return{o:0,...h,r:[...lt(g),...lt(h.r)],p:(y=c,C=h.p??c,y&~Nt.o|C)}}):od(f,u,l,c,g):[{c:td(u),p:0,o:0,r:[]}]}(i,t,n,r,a))o.splice(Uf(o,s),0,s);return o}function ud(e,t,n,r,a,o,i,s){return sd((s?n.flatMap(u=>Ju([u],r,a,o,i)):Ju(n,r,a,o,i)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function V5(e,t,n,r){var a;return a=(o,i)=>{let{n:s,p:u,r:l,i:c}=rd(o,i,t);return n&&ud(s,t,n,i,u,l,c,r)},ad.set(e,a),e}function Kc(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,o=!1,i="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),o=!o),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(i+=(i&&"-")+s)}i&&(o&&(i="-"+i),t[0].push({n:i,v:r.filter(K5),i:a}))}}function K5(e,t,n){return n.indexOf(e)==t}var Pf=new Map;function ds(e){let t=Pf.get(e);if(!t){let n=[],r=[[]],a=0,o=0,i=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Kc(n,r)),a=s+1};for(;s1?g.slice(0,-1)+Jo(JSON.stringify([g,p])):g+"("+Of(p)+")",Nt.a,p,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),Pf.set(e,t=r[0])}return t}function Hf(e,t,n){return t.reduce((r,a,o)=>r+n(a)+e[o+1],e[0])}function zf(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?Hf(e,t,n=>Gc(n).trim()):t.filter(Boolean).reduce((n,r)=>n+Gc(r),e?Gc(e):"")}function Gc(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=zf(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var Z_=qf("@"),X_=qf("~");function qf(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...o){return t(r,a,o)}}});function t(n,r,a){return Of(ds(n+e+"("+zf(r,a)+")"))}}function Qc(e,t){return Array.isArray(e)?Ff(Hf(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?Ff(e):[e]}var G5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function Ff(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=G5.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))),n[0][t[1]]=t[2]);return r}function Wf(e,...t){var n;let r=Qc(e,t),a=(r.find(o=>o.label)?.label||"css")+Jo(JSON.stringify(r));return n=(o,i)=>sd(r.flatMap(s=>od(s,o,i,Nt.o)),a),ad.set(a,n),a}var eM=new Proxy(function(e,t){return Bf("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return Bf(t,n,r)}}});function Bf(e,t,n){return{toString(){return Wf({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Zc(t,n)]}function Zc(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Xc(n,1)}):n=>e||{[n[1]]:Xc(n,2)}}function Xc(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function ie(e,t,n,r){return[e,Y5(t,n,r)]}function Y5(e,t,n){let r=typeof t=="string"?(a,o)=>({[t]:n?n(a,o):a._}):t||(({1:a,_:o},i,s)=>({[a||s]:o}));return(a,o)=>{let i=$f(e||a[1]),s=o.theme(i,a.$$)??vr(a.$$,i,o);if(s!=null)return a._=Xc(a,0,s),r(a,o,i)}}function Kt(e,t={},n){return[e,J5(t,n)]}function J5(e={},t){return(n,r)=>{let{section:a=$f(n[0]).replace("-","")+"Color"}=e,[o,i]=Q5(n.$$);if(!o)return;let s=r.theme(a,o)||vr(o,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,p=r.theme(l,i||"DEFAULT")||i&&vr(i,l,r),f=t||(({_:y})=>{let C=ms(c,y);return g?{[g]:C}:C});n._={value:Nr(s,{opacityVariable:u||void 0,opacityValue:p||void 0}),color:y=>Nr(s,y),opacityVariable:u||void 0,opacityValue:p||void 0};let h=f(n,r);if(!n.dark){let y=r.d(a,o,s);y&&y!==s&&(n._={value:Nr(y,{opacityVariable:u||void 0,opacityValue:p||"1"}),color:C=>Nr(y,C),opacityVariable:u||void 0,opacityValue:p||void 0},h={"&":h,[r.v("dark")]:f(n,r)})}return h}}function Q5(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ms(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function vr(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=Qo(id(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function $f(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function Qo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>Qo(n)+r+Qo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var tM=Symbol();function ps({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:lt(t.variants),rules:lt(t.rules),ignorelist:lt(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of lt([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&<(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:o=n.darkMode,darkColor:i=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:p=n.stringify,finalize:f}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...lt(a)],darkMode:o,darkColor:i,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...lt(u)],rules:[...n.rules,...lt(l)],ignorelist:[...n.ignorelist,...lt(c)],hash:g,stringify:p,finalize:[...n.finalize,...lt(f)]}}return n}function Rf(e,t,n,r,a,o){for(let i of t){let s=n.get(i);s||n.set(i,s=r(i));let u=s(e,a,o);if(u)return u}}function Z5(e){var t;return ed(e[0],typeof(t=e[1])=="function"?t:()=>t)}function X5(e){var t,n;return Array.isArray(e)?ed(e[0],Zc(e[1],e[2])):ed(e,Zc(t,n))}function ed(e,t){return Vf(e,(n,r,a,o)=>{let i=r.exec(n);if(i)return i.$$=n.slice(i[0].length),i.dark=o,t(i,a)})}function Vf(e,t){let n=lt(e).map(eT);return(r,a,o)=>{for(let i of n){let s=t(r,i,a,o);if(s)return s}}}function eT(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function tT(e,t){let n=ps(e),r=function({theme:u,darkMode:l,darkColor:c=gs,variants:g,rules:p,hash:f,stringify:h,ignorelist:y,finalize:C}){let b=new Map,x=new Map,S=new Map,A=new Map,P=Vf(y,(L,D)=>D.test(L));g.push(["dark",Array.isArray(l)||l=="class"?`${lt(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let w=typeof f=="function"?L=>f(L,Jo):f?Jo:Af;w!==Af&&C.push(L=>({...L,n:L.n&&w(L.n),d:L.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,T)=>"--"+w(T).replace("#",""))}));let v={theme:function({extend:L={},...D}){let T={},j={get colors(){return R("colors")},theme:R,negative(){return{}},breakpoints(O){let N={};for(let H in O)typeof O[H]=="string"&&(N["screen-"+H]=O[H]);return N}};return R;function R(O,N,H,B){if(O){if({1:O,2:B}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let q=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(z,V,K=V)=>q.push(K)),O=q.shift(),H=N,N=q.join("-")}let _=T[O]||Object.assign(Object.assign(T[O]={},M(D,O)),M(L,O));if(N==null)return _;N||="DEFAULT";let F=_[N]??N.split("-").reduce((q,z)=>q?.[z],_)??H;return B?Nr(F,{opacityValue:id(B,R)}):F}let k={};for(let _ of[...Object.keys(D),...Object.keys(L)])k[_]=R(_);return k}function M(O,N){let H=O[N];return typeof H=="function"&&(H=H(j)),H&&/color|fill|stroke/i.test(N)?function B(k,_=[]){let F={};for(let q in k){let z=k[q],V=[..._,q];F[V.join("-")]=z,q=="DEFAULT"&&(V=_,F[_.join("-")]=z),typeof z=="object"&&Object.assign(F,B(z,V))}return F}(H):H}}(u),e:nd,h:w,s(L,D){return h(L,D,v)},d(L,D,T){return c(L,D,v,T)},v(L){return b.has(L)||b.set(L,Rf(L,g,x,Z5,v)||"&:"+L),b.get(L)},r(L,D){let T=JSON.stringify([L,D]);return S.has(T)||S.set(T,!P(L,v)&&Rf(L,p,A,X5,v,D)),S.get(T)},f(L){return C.reduce((D,T)=>T(D,v),L)}};return v}(n),a=new Map,o=[],i=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,o.length,l),o.push(l),i.add(u)});function s(u){let l=r.f(u),c=Jc(l);if(c&&!i.has(c)){i.add(c);let g=Uf(o,u);t.insert(c,g,u),o.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of lt(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?ud("",Nt.b,ds(c),r,Nt.b,[],!1,!0):od(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of Ju(ds(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(i),c=new Map(a),g=[...o];return()=>{u(),i=l,a=c,o=g}},clear(){t.clear(),i=new Set,a=new Map,o=[]},destroy(){this.clear(),t.destroy()}}))}function nT(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function rT(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:o,target:i}of a)if(o[0]=="a")r(i);else for(let s of i.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let o,i=a.getAttribute?.("class");i&&nT(i,o=e(i))&&a.setAttribute("class",o)}}function aT(e=ld,t=typeof document<"u"&&document.documentElement){if(t){let n=rT(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function Kf(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function oT(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:Kf(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:gs}}function iT(e){let t=e&&typeof e!="string"?e:Kf(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:gs}}function sT(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:gs}}function Gf(e,t){let n=typeof document>"u"?sT(!t):e?iT():oT();return t||(n.resume=lT),n}function uT(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):lt(e)).join("")}function lT(e,t){let n=uT(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let o;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let i of document.querySelectorAll("[class]"))e(i.getAttribute("class"));for(;a=r.exec(n),o&&t(n.slice(o.index+o[0].length,a?.index),{p:parseInt(o[1],36),o:parseInt(o[2],36)/2,n:o[3]}),o=a;);}}var ld=new Proxy(gs,{apply(e,t,n){return cs(n[0])},get(e,t){let n=cs[t];return typeof n=="function"?function(){return n.apply(cs,arguments)}:n}});function Yf(e={},t=Gf,n){return cs?.destroy(),cs=aT(tT(e,typeof t=="function"?t():t),n)}function cd(e,t=!0){let n=ps(e);return Yf({...n,hash:n.hash??t},()=>Gf(!t))}var nM=function e(t){return new Proxy(function(n,...r){return If(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...o){return If(t,r,a,o)}}})}();function If(e,t,n,r){return{toString(){let a=Qc(n,r),o=nd(t+Jo(JSON.stringify([t,a])));return(typeof e=="function"?e:ld)(Wf({[`@keyframes ${o}`]:Qc(n,r)})),o}}}m();m();m();var cT=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Jf(e){return cT.get(e)}function Qf(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Zf(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var dT=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Zu(){return({stringify:e})=>({stringify(t,n,r){let a="",o=Jf(t);o&&(a+=e(o,n,r)+";");let i=Qf(t),s=Zf(t,n);for(let u of dT)i&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}m();m();var gd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...jn(4,"rem",4,.5,.5),...jn(12,"rem",4,5),14:"3.5rem",...jn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ge("blur"),backdropBrightness:Ge("brightness"),backdropContrast:Ge("contrast"),backdropGrayscale:Ge("grayscale"),backdropHueRotate:Ge("hueRotate"),backdropInvert:Ge("invert"),backdropOpacity:Ge("opacity"),backdropSaturate:Ge("saturate"),backdropSepia:Ge("sepia"),backgroundColor:Ge("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ge("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...jn(200,"",100,0,50),...jn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ge("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ge("spacing"),borderWidth:{DEFAULT:"1px",...Kn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ge("colors"),caretColor:Ge("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...jn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ge("borderColor"),divideOpacity:Ge("borderOpacity"),divideWidth:Ge("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...fs(2,6),...fs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ge("spacing"),gradientColorStops:Ge("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...fs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...fs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...jn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...jn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ge("spacing"),placeholderColor:Ge("colors"),placeholderOpacity:Ge("opacity"),outlineColor:Ge("colors"),outlineOffset:Kn(8,"px"),outlineWidth:Kn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ge("colors"),ringOffsetWidth:Kn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Kn(8,"px")},rotate:{...Kn(2,"deg"),...Kn(12,"deg",3),...Kn(180,"deg",45)},saturate:jn(200,"",100,0,50),scale:{...jn(150,"",100,0,50),...jn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ge("spacing"),scrollPadding:Ge("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Kn(2,"deg"),...Kn(12,"deg",3)},space:Ge("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:jn(2),textColor:Ge("colors"),textDecorationColor:Ge("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Kn(8,"px")},textUnderlineOffset:{auto:"auto",...Kn(8,"px")},textIndent:Ge("spacing"),textOpacity:Ge("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ge("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...fs(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...jn(50,"",1,0,10),auto:"auto"}};function fs(e,t){let n={};do for(var r=1;rt(e)}var gT={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${gd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${gd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},mT=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:vr(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),ie("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...i("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(o[Qu(u)]={"&":{maxWidth:u,...i(s)}})}return o;function i(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ie("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),ie("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Xu),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),ie("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),ie("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),ie("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",Xf),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ie("(flex-(?:grow|shrink))(?:$|-)"),ie("(flex)-"),ie("grow(?:$|-)","flexGrow"),ie("shrink(?:$|-)","flexShrink"),ie("basis-","flexBasis"),ie("-?(order)-"),"-?(order)-(\\d+)",ie("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",r3),ie("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",n3),ie("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),ie("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),ie("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",r3),ie("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",n3),ie("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),ie("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Xu(Xf(e))),re("grid-flow-(dense)","gridAutoFlow"),ie("auto-cols-","gridAutoColumns"),ie("auto-rows-","gridAutoRows"),ie("gap-x(?:$|-)","gap","columnGap"),ie("gap-y(?:$|-)","gap","rowGap"),ie("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",e3),re("(content|items|self)-",e=>({["align-"+e[1]]:e3(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),ie("p([xytrbl])?(?:$|-)","padding",Zo("padding")),ie("-?m([xytrbl])?(?:$|-)","margin",Zo("margin")),ie("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),ie("w-","width"),ie("min-w-","minWidth"),ie("max-w-","maxWidth"),ie("h-","height"),ie("min-h-","minHeight"),ie("max-h-","maxHeight"),ie("font-","fontWeight"),ie("font-","fontFamily",({_:e})=>typeof(e=lt(e))[1]=="string"?{fontFamily:rr(e)}:{fontFamily:rr(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ie("tracking-","letterSpacing"),ie("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),ie("list-","listStyleType"),re("list-","listStyleType"),ie("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Kt("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),ie("text-opacity-","textOpacity","--tw-text-opacity"),Kt("text-",{property:"color"}),ie("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),ie("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),ie("underline-offset-","textUnderlineOffset"),Kt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ie("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),Kt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Kt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${ro(e," ")},var(--tw-gradient-stops))`),Kt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Kt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Kt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),ie("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Kt("bg-",{section:"backgroundColor"}),ie("bg-","backgroundImage"),ie("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Xu),ie("bg-","backgroundSize"),ie("rounded(?:$|-)","borderRadius"),ie("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${ro(n[0])}-radius`]:t,[`border-${ro(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),ie("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),ie("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Kt("border-([xytrbl])-",{section:"borderColor"},Zo("border","Color")),Kt("border-"),ie("border-([xytrbl])(?:$|-)","borderWidth",Zo("border","Width")),ie("border(?:$|-)","borderWidth"),ie("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),ie("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${ro(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${ro(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Kt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ie("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Kt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ie("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),Kt("ring-",{property:"--tw-ring-color"}),ie("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Nr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Nr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Kt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ie("shadow(?:$|-)","boxShadow",({_:e})=>({...ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(e),"--tw-shadow-colored":rr(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ie("(opacity)-"),re("mix-blend-","mixBlendMode"),...t3(),...t3("backdrop-"),ie("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:rr(e),transitionTimingFunction:e._=="none"?void 0:rr(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:rr(t("transitionDuration",""))})),ie("duration(?:$|-)","transitionDuration","transitionDuration",rr),ie("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),ie("delay(?:$|-)","transitionDelay","transitionDelay",rr),ie("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=rr(e),o=a.split(" "),i=t("keyframes",o[0]);return i?{["@keyframes "+(o[0]=r(n(o[0])))]:i,animation:o.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",md),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":a3(e=="gpu")})),ie("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...md()})),ie("-?(rotate)-","rotate",dd),ie("-?(translate-[xy])-","translate",dd),ie("-?(skew-[xy])-","skew",dd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Xu),"(appearance)-",ie("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ie("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),ie("scroll-p([xytrbl])?(?:$|-)","padding",Zo("scroll-padding")),ie("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Zo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),ie("-?(outline-offset)-"),Kt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ie("outline-","outlineWidth"),"(pointer-events)-",ie("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),Kt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Kt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ie("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Xu(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function Xf(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function ro(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function rr(e){return e&&""+(e._||e)}function e3({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function Zo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...ms(e+"-"+ro(a[0])+t,r),...ms(e+"-"+ro(a[1])+t,r)}:ms(e+t,r)}}function t3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...ca(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>ie(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:o})=>({[`--tw-${a}`]:lt(o).map(i=>`${r}(${i})`).join(" "),...n})))]}function dd({1:e,_:t}){return{["--tw-"+e]:t,...md()}}function md(){return{...ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":a3()}),transform:"var(--tw-transform)"}}function a3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function n3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function r3({1:e}){return`repeat(${e},minmax(0,1fr))`}function ca(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var pT=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||vr(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:o,h:i,v:s})=>{let u=Qo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${o(i(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||vr(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||vr(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=vr(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&Qo(e).replace(/[}]+$/,"").split("{")]];function fT({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:gT,theme:{...gd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:pT,rules:mT,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var hT={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},bT={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},yT={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},CT={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},TT={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},vT={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},xT={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ET={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ST={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},wT={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},DT={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},kT={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},AT={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},LT={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},_T={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},MT={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},PT={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},FT={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},BT={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},RT={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},IT={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},OT={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},NT={__proto__:null,slate:hT,gray:bT,zinc:yT,neutral:CT,stone:TT,red:vT,orange:xT,amber:ET,yellow:ST,lime:wT,green:DT,emerald:kT,teal:AT,cyan:LT,sky:_T,blue:MT,indigo:PT,violet:FT,purple:BT,fuchsia:RT,pink:IT,rose:OT};function el({disablePreflight:e}={}){return fT({colors:NT,disablePreflight:e})}m();m();var tl=globalThis||(typeof window<"u"?window:self),UT=Object.create,fd=Object.defineProperty,jT=Object.getOwnPropertyDescriptor,HT=Object.getOwnPropertyNames,zT=Object.getPrototypeOf,qT=Object.prototype.hasOwnProperty,WT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$T=(e,t)=>{for(var n in t)fd(e,n,{get:t[n],enumerable:!0})},pd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HT(t))!qT.call(e,a)&&a!==n&&fd(e,a,{get:()=>t[a],enumerable:!(r=jT(t,a))||r.enumerable});return e},VT=(e,t,n)=>(pd(e,t,"default"),n&&pd(n,t,"default")),i3=(e,t,n)=>(n=e!=null?UT(zT(e)):{},pd(t||!e||!e.__esModule?fd(n,"default",{value:e,enumerable:!0}):n,e)),s3=WT((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var p=new XMLHttpRequest;p.open("GET",l),p.responseType="blob",p.onload=function(){u(p.response,c,g)},p.onerror=function(){},p.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof tl=="object"&&tl.global===tl?tl:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var p=i.URL||i.webkitURL,f=document.createElement("a");c=c||l.name||"download",f.download=c,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?o(f):a(f.href)?r(l,c,g):o(f,f.target="_blank")):(f.href=p.createObjectURL(l),setTimeout(function(){p.revokeObjectURL(f.href)},4e4),setTimeout(function(){o(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var p=document.createElement("a");p.href=l,p.target="_blank",setTimeout(function(){o(p)})}}:function(l,c,g,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var f=l.type==="application/octet-stream",h=/constructor/i.test(i.HTMLElement)||i.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||f&&h||s)&&typeof FileReader<"u"){var C=new FileReader;C.onloadend=function(){var S=C.result;S=y?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},C.readAsDataURL(l)}else{var b=i.URL||i.webkitURL,x=b.createObjectURL(l);p?p.location=x:location.href=x,p=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});i.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),u3={};$T(u3,{default:()=>ao});var KT=i3(s3());VT(u3,i3(s3()));var{default:o3,...GT}=KT,ao=o3!==void 0?o3:GT;m();m();m();m();m();m();m();function Xo(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(o){await o,t="fulfilled",r(o)},reject(o){t="rejected",a(o)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}m();var hd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function nl(e,t){let n=Xo(),r=setTimeout(()=>n.reject(new hd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}m();m();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,o)=>{let i=()=>{clearTimeout(u),o(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",i),a()},e);if(n?.addEventListener("abort",i,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}m();var l3=class{#e=0;#t=[];#n=[];#r=Xo();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tv8,bgBlue:()=>w8,bgBrightBlack:()=>L8,bgBrightBlue:()=>F8,bgBrightCyan:()=>R8,bgBrightGreen:()=>M8,bgBrightMagenta:()=>B8,bgBrightRed:()=>_8,bgBrightWhite:()=>I8,bgBrightYellow:()=>P8,bgCyan:()=>k8,bgGreen:()=>E8,bgMagenta:()=>D8,bgRed:()=>x8,bgRgb24:()=>j8,bgRgb8:()=>N8,bgWhite:()=>A8,bgYellow:()=>S8,black:()=>o8,blue:()=>l8,bold:()=>ZT,brightBlack:()=>g3,brightBlue:()=>b8,brightCyan:()=>C8,brightGreen:()=>f8,brightMagenta:()=>y8,brightRed:()=>p8,brightWhite:()=>T8,brightYellow:()=>h8,cyan:()=>d8,dim:()=>XT,getColorEnabled:()=>JT,gray:()=>m8,green:()=>s8,hidden:()=>r8,inverse:()=>n8,italic:()=>e8,magenta:()=>c8,red:()=>i8,reset:()=>QT,rgb24:()=>U8,rgb8:()=>O8,setColorEnabled:()=>YT,strikethrough:()=>a8,stripColor:()=>z8,underline:()=>t8,white:()=>g8,yellow:()=>u8});m();var{Deno:c3}=globalThis,d3=typeof c3?.noColor=="boolean"?c3.noColor:!0,bd=!d3;function YT(e){d3||(bd=e)}function JT(){return bd}function _e(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Me(e,t){return bd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function QT(e){return Me(e,_e([0],0))}function ZT(e){return Me(e,_e([1],22))}function XT(e){return Me(e,_e([2],22))}function e8(e){return Me(e,_e([3],23))}function t8(e){return Me(e,_e([4],24))}function n8(e){return Me(e,_e([7],27))}function r8(e){return Me(e,_e([8],28))}function a8(e){return Me(e,_e([9],29))}function o8(e){return Me(e,_e([30],39))}function i8(e){return Me(e,_e([31],39))}function s8(e){return Me(e,_e([32],39))}function u8(e){return Me(e,_e([33],39))}function l8(e){return Me(e,_e([34],39))}function c8(e){return Me(e,_e([35],39))}function d8(e){return Me(e,_e([36],39))}function g8(e){return Me(e,_e([37],39))}function m8(e){return g3(e)}function g3(e){return Me(e,_e([90],39))}function p8(e){return Me(e,_e([91],39))}function f8(e){return Me(e,_e([92],39))}function h8(e){return Me(e,_e([93],39))}function b8(e){return Me(e,_e([94],39))}function y8(e){return Me(e,_e([95],39))}function C8(e){return Me(e,_e([96],39))}function T8(e){return Me(e,_e([97],39))}function v8(e){return Me(e,_e([40],49))}function x8(e){return Me(e,_e([41],49))}function E8(e){return Me(e,_e([42],49))}function S8(e){return Me(e,_e([43],49))}function w8(e){return Me(e,_e([44],49))}function D8(e){return Me(e,_e([45],49))}function k8(e){return Me(e,_e([46],49))}function A8(e){return Me(e,_e([47],49))}function L8(e){return Me(e,_e([100],49))}function _8(e){return Me(e,_e([101],49))}function M8(e){return Me(e,_e([102],49))}function P8(e){return Me(e,_e([103],49))}function F8(e){return Me(e,_e([104],49))}function B8(e){return Me(e,_e([105],49))}function R8(e){return Me(e,_e([106],49))}function I8(e){return Me(e,_e([107],49))}function da(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function O8(e,t){return Me(e,_e([38,5,da(t)],39))}function N8(e,t){return Me(e,_e([48,5,da(t)],49))}function U8(e,t){return typeof t=="number"?Me(e,_e([38,2,t>>16&255,t>>8&255,t&255],39)):Me(e,_e([38,2,da(t.r),da(t.g),da(t.b)],39))}function j8(e,t){return typeof t=="number"?Me(e,_e([48,2,t>>16&255,t>>8&255,t&255],49)):Me(e,_e([48,2,da(t.r),da(t.g),da(t.b)],49))}var H8=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function z8(e){return e.replace(H8,"")}m();m();var yd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},q8={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function Cd(e,t){let n={...q8,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let o=0;osetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=i}throw new yd(a,n.maxAttempts)}m();var Ur=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Td(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Ur[(t[r-2]&3)<<4|t[r-1]>>4],n+=Ur[(t[r-1]&15)<<2|t[r]>>6],n+=Ur[t[r]&63];return r===a+1&&(n+=Ur[t[r-2]>>2],n+=Ur[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Ur[t[r-2]>>2],n+=Ur[(t[r-2]&3)<<4|t[r-1]>>4],n+=Ur[(t[r-1]&15)<<2],n+="="),n}m();m();var W8=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,$8=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,V8=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,vd={Space_Separator:W8,ID_Start:$8,ID_Continue:V8},Rt={isSpaceSeparator(e){return typeof e=="string"&&vd.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||vd.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||vd.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},Ed,En,Hr,al,ga,ar,Xt,Dd,bs,K8=function(e,t){Ed=String(e),En="start",Hr=[],al=0,ga=1,ar=0,Xt=void 0,Dd=void 0,bs=void 0;do Xt=G8(),Q8[En]();while(Xt.type!=="eof");return typeof t=="function"?Sd({"":bs},"",t):bs};function Sd(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a{var u="imt-subtitle-inject",f=class{from;to;constructor(t,n){this.from=t,this.to=n}sendMessages(t){globalThis.postMessage({type:u,to:this.to,from:this.from,action:t.action,data:t.data,id:t.id||new Date().getTime(),isAsync:!1})}getRandomId(){return(new Date().getTime()+Math.random())*Math.random()}sendAsyncMessages({action:t,data:n}){return new Promise(e=>{let r=this.getRandomId();globalThis.postMessage({type:u,to:this.to,from:this.from,action:t,data:n,id:r,isAsync:!0});let a=({data:o})=>{u===o.type&&o.id===r&&o.to===this.from&&(e(o.data),globalThis.removeEventListener("message",a))};globalThis.addEventListener("message",a)})}handleMessageOnce(t){return new Promise(n=>{let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&(n(r.data),globalThis.removeEventListener("message",e))};globalThis.addEventListener("message",e)})}handleMessage(t,n){let e=({data:r})=>{u===r.type&&r.action===t&&r.to===this.from&&n(r)};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}handleMessages(t){let n=({data:e})=>{u===e.type&&e.to===this.from&&t(e)};return globalThis.addEventListener("message",n),()=>{globalThis.removeEventListener("message",n)}}},R=new f("content-script","inject"),l=new f("inject","content-script"),S={get(s,t,n){return t in s?(...e)=>{let r=s[t];return typeof r=="function"?r.apply(s,e):Reflect.get(s,t,n)}:e=>s.sendAsyncMessages({action:t,data:e})}},x=new Proxy(l,S),L=new Proxy(R,S);function T(s){if(!s)return null;try{let t=s;return s.startsWith("//")?t=globalThis.location.protocol+s:s.startsWith("/")?t=`${globalThis.location.protocol}//${globalThis.location.host}${s}`:s.startsWith("http")||(t=`${globalThis.location.protocol}//${s}`),new URL(t).toString()}catch(t){return console.error(t),s}}var i=class{content=x;config;constructor(t){this.config=t,l.handleMessages(async({action:n,id:e,data:r})=>{let a=this[n];if(!a)return;let o=a.apply(this,[r]);o instanceof Promise&&(o=await o),l.sendMessages({id:e,data:o})})}triggerSubtitle(t){}async translateSubtitle(t){let n=await this.content.requestSubtitle({url:T(t._url)});if(n){if(this.config.responseType=="document"){let r=new DOMParser().parseFromString(n,"text/xml");Object.defineProperty(t,"responseXML",{value:r,writable:!1}),Object.defineProperty(t,"response",{value:r,writable:!1});return}let e=n;(t.responseType=="arraybuffer"||this.config.responseType=="arraybuffer")&&typeof n=="string"&&(e=new TextEncoder().encode(n).buffer),Object.defineProperty(t,"responseText",{value:e,writable:!1}),Object.defineProperty(t,"response",{value:e,writable:!1})}}async translateSubtitleWithFetch(t,n){let e={...n},r;return typeof t=="string"?r={url:t,method:"GET",headers:{}}:r=await v(t),e?.body&&(e.body=M(e.body)),this.content.requestSubtitle({fetchInfo:JSON.stringify({input:r,options:e})})}async getVideoMeta(t){}isSubtitleRequest(t){return!this.config||!this.config.subtitleUrlRegExp||!t?!1:new RegExp(this.config.subtitleUrlRegExp).test(t||"")}};function v(s){if(s instanceof URL)return{url:s.href,method:"GET",headers:{}};let t=s.clone(),n={url:s.url,method:s.method,headers:Object.fromEntries(s.headers.entries())};if(t.body){let e=M(t.body);if(t.body!==e)return t.text().then(r=>(n.body=r,n));n.body=e}return Promise.resolve(n)}function M(s){if(!s)return s;if(s instanceof FormData||s instanceof URLSearchParams){let t={};for(let[n,e]of s.entries())t[n]=e;return t._formatBodyType="FormData",t}return s}var d=class extends i{timer=null;triggerSubtitle({force:t}){setTimeout(()=>{if(this.config?.subtitleButtonSelector){let n=document.querySelector(this.config.subtitleButtonSelector);if(n){let e=n.getAttribute("aria-pressed")==="true";e&&t?(n.click(),setTimeout(()=>{n.click()},100)):e||n.click();return}}if(this.config?.videoPlayerSelector){let n=document.querySelector(this.config.videoPlayerSelector);n?.toggleSubtitles(),setTimeout(()=>{n?.toggleSubtitles()},100)}},1e3)}async getVideoMeta(){if(!this.config.videoPlayerSelector)return null;try{return await this.sleep(100),document.querySelector(this.config.videoPlayerSelector)?.getPlayerResponse()}catch{return null}}sleep(t){return new Promise(n=>{setTimeout(()=>{n(null)},t)})}};var m=class extends i{timer=null;videoMeta={};lastVideoMeta=null;constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e&&e.result&&e.result.timedtexttracks&&e.result.movieId&&(this.videoMeta[e.result.movieId]=e.result,this.lastVideoMeta=e.result)}catch(r){console.log(r)}return e}}getVideoMeta(t){return this.lastVideoMeta}};var p=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{e?.asset?.captions?.length?this.videoMeta[e.id]=e?.asset:e?.previews&&e?.course&&e?.previews?.forEach(r=>{this.videoMeta[r.id]=r})}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var g=class extends i{timer=null;videoMeta={};constructor(t){super(t),this.hookJSON()}hookJSON(){let t=JSON.parse;JSON.parse=n=>{let e=t(n);try{if(e?.stream?.sources?.length&&e?.stream?.sources[0]?.complete?.url){let r=window.location.pathname.split("/");r.length>2&&r[r.length-2]==="video"&&(this.videoMeta[r[r.length-1]]=e.stream.sources[0].complete.url)}}catch(r){console.error(r)}return e}}getVideoMeta(t){return this.videoMeta[t]}};var h=class extends i{constructor(t){super(t)}async translateSubtitleWithFetch(t,n){this.main(t,n)}async main(t,n){let e=globalThis.__originalFetch;if(!e)return;let r=t;t instanceof Request&&(r=t.clone());let a=await e(r,n);if(!a.ok)return;let o=await a.json();o.transcripts_urls&&this.requestSubtitle(o.transcripts_urls)}async requestSubtitle(t){await c(),await this.content.requestSubtitle(t)}};async function w(){let s=await l.sendAsyncMessages({action:"getConfig"});if(!s)return;let n={youtube:d,netflix:m,webvtt:i,khanacademy:i,bilibili:i,udemy:p,general:i,ebutt:i,hulu:h,disneyplus:g,"fmp4.xml":i,multi_attach_vtt:i,twitter:i,subsrt:i,xml:i,text_track_dynamic:i,av:i}[s.type||""];if(!n)return;let e=new n(s);I(e,s)}c();w();function I(s,t){if(t.hookType.includes("xhr")){let n=XMLHttpRequest.prototype.open,e=XMLHttpRequest.prototype.send,r=function(){return this._url=arguments[1],n.apply(this,arguments)},a=async function(){return s.isSubtitleRequest(this._url)?(await c(),await s.translateSubtitle(this),e.apply(this,arguments)):e.apply(this,arguments)};Object.defineProperty(XMLHttpRequest.prototype,"open",{value:r,writable:!0}),Object.defineProperty(XMLHttpRequest.prototype,"send",{value:a,writable:!0})}if(t.hookType.includes("fetch")){let n=globalThis.fetch;globalThis.__originalFetch=n,globalThis.fetch=async function(e,r){let a=typeof e=="string"?e:e.url||e.href;if(!s.isSubtitleRequest(a))return n(e,r);await c();let y=await s.translateSubtitleWithFetch(e,r);return y?new Response(y):n(e,r)}}}var b=!1;async function c(){return b||(await l.handleMessageOnce("contentReady"),b=!0),b}})();\n',OPTIONS_URL:"https://dash.immersivetranslate.com/",SHARE_DRAFT_URL:"https://immersivetranslate.com/preview",ASSETS_BASE_URL:"https://app.immersivetranslate.com/global-assets/",EBOOK_VIEWER_URL:"https://app.immersivetranslate.com/ebook/",EBOOK_BUILDER_URL:"https://app.immersivetranslate.com/ebook/make/",SUBTITLE_BUILDER_URL:"https://app.immersivetranslate.com/subtitle/",HTML_VIEWER_URL:"https://app.immersivetranslate.com/html/",PDF_VIEWER_URL:"https://app.immersivetranslate.com/pdf/",PDF_PRO_URL:"https://app.immersivetranslate.com/pdf-pro/",TEXT_TRANSLATE_URL:"https://app.immersivetranslate.com/text/",TRANSLATE_FILE_URL:"https://app.immersivetranslate.com/",MOCK:"0",DEBUG:"0",IMMERSIVE_TRANSLATE_USERSCRIPT:"1",INSTALL_FROM:"official_userscript"}});var P6=F5((B0,hu)=>{m();(function(){var e;function t(h){var y,C,b="",x=-1,S;if(h&&h.length)for(S=h.length;(x+=1)>>6&31,128|y&63):y<=65535?b+=String.fromCharCode(224|y>>>12&15,128|y>>>6&63,128|y&63):y<=2097151&&(b+=String.fromCharCode(240|y>>>18&7,128|y>>>12&63,128|y>>>6&63,128|y&63));return b}function n(h){var y,C,b,x,S,A=[],P;if(y=C=b=x=S=0,h&&h.length)for(P=h.length,h+="";y191&&b<224?(x=h.charCodeAt(y+1),A[C]=String.fromCharCode((b&31)<<6|x&63),y+=2):(x=h.charCodeAt(y+1),S=h.charCodeAt(y+2),A[C]=String.fromCharCode((b&15)<<12|(x&63)<<6|S&63),y+=3);return A.join("")}function r(h,y){var C=(h&65535)+(y&65535),b=(h>>16)+(y>>16)+(C>>16);return b<<16|C&65535}function a(h,y){return h<>>32-y}function o(h,y){for(var C=y?"0123456789ABCDEF":"0123456789abcdef",b="",x,S=0,A=h.length;S>>4&15)+C.charAt(x&15);return b}function i(h){var y,C=h.length,b="";for(y=0;y>>8&255);return b}function s(h){var y,C=h.length,b="";for(y=0;y>>8&255,h.charCodeAt(y)&255);return b}function u(h){var y,C=h.length*32,b="";for(y=0;y>5]>>>24-y%32&255);return b}function l(h){var y,C=h.length*32,b="";for(y=0;y>5]>>>y%32&255);return b}function c(h){var y,C=h.length*8,b=Array(h.length>>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<>2),x=b.length;for(y=0;y>5]|=(h.charCodeAt(y/8)&255)<<24-y%32;return b}function p(h,y){var C=y.length,b=Array(),x,S,A,P,w,v,L,D;for(v=Array(Math.ceil(h.length/2)),P=v.length,x=0;x0;){for(w=Array(),A=0,x=0;x0||S>0)&&(w[w.length]=S);b[b.length]=A,v=w}for(L="",x=b.length-1;x>=0;x--)L+=y.charAt(b[x]);for(D=Math.ceil(h.length*8/(Math.log(y.length)/Math.log(2))),x=L.length;xh.length*8?b+=y:b+=C.charAt(P>>>6*(3-A)&63);return b}e={VERSION:"1.0.6",Base64:function(){var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",C=!1,b=!0;this.encode=function(x){var S,A,P,w="";for(y=y||"=",x=b?t(x):x,len=x.length,S=0;Slen*8?w+=y:w+=h.charAt(P>>>6*(3-A)&63);return w},this.decode=function(x){var S,A,P,w,v,L,D,T,j,R,M="",O=[];if(!x)return x;S=R=0,x=x.replace(new RegExp("\\"+y,"gi"),"");do v=h.indexOf(x.charAt(S++)),L=h.indexOf(x.charAt(S++)),D=h.indexOf(x.charAt(S++)),T=h.indexOf(x.charAt(S++)),j=v<<18|L<<12|D<<6|T,A=j>>16&255,P=j>>8&255,w=j&255,R+=1,D===64?O[R]=String.fromCharCode(A):T===64?O[R]=String.fromCharCode(A,P):O[R]=String.fromCharCode(A,P,w);while(S>>8^C;return(y^-1)>>>0},MD5:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,C=h&&typeof h.pad=="string"?h.pad:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0;this.hex=function(T){return o(x(T,b),y)},this.b64=function(T){return f(x(T),C)},this.any=function(T,j){return p(x(T,b),j)},this.raw=function(T){return x(T,b)},this.hex_hmac=function(T,j){return o(S(T,j),y)},this.b64_hmac=function(T,j){return f(S(T,j),C)},this.any_hmac=function(T,j,R){return p(S(T,j),R)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(T){return typeof T=="boolean"&&(y=T),this},this.setPad=function(T){return C=T||C,this},this.setUTF8=function(T){return typeof T=="boolean"&&(b=T),this};function x(T){return T=b?t(T):T,l(A(c(T),T.length*8))}function S(T,j){var R,M,O,N,H;for(T=b?t(T):T,j=b?t(j):j,R=c(T),R.length>16&&(R=A(R,T.length*8)),M=Array(16),O=Array(16),H=0;H<16;H+=1)M[H]=R[H]^909522486,O[H]=R[H]^1549556828;return N=A(M.concat(c(j)),512+j.length*8),l(A(O.concat(N),512+128))}function A(T,j){var R,M,O,N,H,B=1732584193,k=-271733879,_=-1732584194,F=271733878;for(T[j>>5]|=128<>>9<<4)+14]=j,R=0;R16&&(D=A(D,v.length*8)),T=Array(16),j=Array(16),R=0;R<16;R+=1)T[R]=D[R]^909522486,j[R]=D[R]^1549556828;return M=A(T.concat(g(L)),512+L.length*8),u(A(j.concat(M),512+160))}function A(v,L){var D,T,j,R,M,O,N,H,B=Array(80),k=1732584193,_=-271733879,F=-1732584194,q=271733878,z=-1009589776;for(v[L>>5]|=128<<24-L%32,v[(L+64>>9<<4)+15]=L,D=0;D16&&(z=B(z,k.length*8));q<16;q+=1)V[q]=z[q]^909522486,K[q]=z[q]^1549556828;return F=B(V.concat(g(_)),512+_.length*8),u(B(K.concat(F),512+256))}function P(k,_){return k>>>_|k<<32-_}function w(k,_){return k>>>_}function v(k,_,F){return k&_^~k&F}function L(k,_,F){return k&_^k&F^_&F}function D(k){return P(k,2)^P(k,13)^P(k,22)}function T(k){return P(k,6)^P(k,11)^P(k,25)}function j(k){return P(k,7)^P(k,18)^w(k,3)}function R(k){return P(k,17)^P(k,19)^w(k,10)}function M(k){return P(k,28)^P(k,34)^P(k,39)}function O(k){return P(k,14)^P(k,18)^P(k,41)}function N(k){return P(k,1)^P(k,8)^w(k,7)}function H(k){return P(k,19)^P(k,61)^w(k,6)}x=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998];function B(k,_){var F=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],q=new Array(64),z,V,K,oe,te,Z,ce,he,ae,X,ve,se;for(k[_>>5]|=128<<24-_%32,k[(_+64>>9<<4)+15]=_,ae=0;ae32&&(k=P(k,O.length*8));B<32;B+=1)_[B]=k[B]^909522486,F[B]=k[B]^1549556828;return H=P(_.concat(g(N)),1024+N.length*8),u(P(F.concat(H),1024+512))}function P(O,N){var H,B,k,_=new Array(80),F=new Array(16),q=[new w(1779033703,-205731576),new w(-1150833019,-2067093701),new w(1013904242,-23791573),new w(-1521486534,1595750129),new w(1359893119,-1377402159),new w(-1694144372,725511199),new w(528734635,-79577749),new w(1541459225,327033209)],z=new w(0,0),V=new w(0,0),K=new w(0,0),oe=new w(0,0),te=new w(0,0),Z=new w(0,0),ce=new w(0,0),he=new w(0,0),ae=new w(0,0),X=new w(0,0),ve=new w(0,0),se=new w(0,0),ue=new w(0,0),De=new w(0,0),He=new w(0,0),Fe=new w(0,0),pe=new w(0,0);for(x===void 0&&(x=[new w(1116352408,-685199838),new w(1899447441,602891725),new w(-1245643825,-330482897),new w(-373957723,-2121671748),new w(961987163,-213338824),new w(1508970993,-1241133031),new w(-1841331548,-1357295717),new w(-1424204075,-630357736),new w(-670586216,-1560083902),new w(310598401,1164996542),new w(607225278,1323610764),new w(1426881987,-704662302),new w(1925078388,-226784913),new w(-2132889090,991336113),new w(-1680079193,633803317),new w(-1046744716,-815192428),new w(-459576895,-1628353838),new w(-272742522,944711139),new w(264347078,-1953704523),new w(604807628,2007800933),new w(770255983,1495990901),new w(1249150122,1856431235),new w(1555081692,-1119749164),new w(1996064986,-2096016459),new w(-1740746414,-295247957),new w(-1473132947,766784016),new w(-1341970488,-1728372417),new w(-1084653625,-1091629340),new w(-958395405,1034457026),new w(-710438585,-1828018395),new w(113926993,-536640913),new w(338241895,168717936),new w(666307205,1188179964),new w(773529912,1546045734),new w(1294757372,1522805485),new w(1396182291,-1651133473),new w(1695183700,-1951439906),new w(1986661051,1014477480),new w(-2117940946,1206759142),new w(-1838011259,344077627),new w(-1564481375,1290863460),new w(-1474664885,-1136513023),new w(-1035236496,-789014639),new w(-949202525,106217008),new w(-778901479,-688958952),new w(-694614492,1432725776),new w(-200395387,1467031594),new w(275423344,851169720),new w(430227734,-1194143544),new w(506948616,1363258195),new w(659060556,-544281703),new w(883997877,-509917016),new w(958139571,-976659869),new w(1322822218,-482243893),new w(1537002063,2003034995),new w(1747873779,-692930397),new w(1955562222,1575990012),new w(2024104815,1125592928),new w(-2067236844,-1578062990),new w(-1933114872,442776044),new w(-1866530822,593698344),new w(-1538233109,-561857047),new w(-1090935817,-1295615723),new w(-965641998,-479046869),new w(-903397682,-366583396),new w(-779700025,566280711),new w(-354779690,-840897762),new w(-176337025,-294727304),new w(116418474,1914138554),new w(174292421,-1563912026),new w(289380356,-1090974290),new w(460393269,320620315),new w(685471733,587496836),new w(852142971,1086792851),new w(1017036298,365543100),new w(1126000580,-1676669620),new w(1288033470,-885112138),new w(1501505948,-60457430),new w(1607167915,987167468),new w(1816402316,1246189591)]),B=0;B<80;B+=1)_[B]=new w(0,0);for(O[N>>5]|=128<<24-(N&31),O[(N+128>>10<<5)+31]=N,k=O.length,B=0;B>>H|N.h<<32-H,O.h=N.h>>>H|N.l<<32-H}function D(O,N,H){O.l=N.h>>>H|N.l<<32-H,O.h=N.l>>>H|N.h<<32-H}function T(O,N,H){O.l=N.l>>>H|N.h<<32-H,O.h=N.h>>>H}function j(O,N,H){var B=(N.l&65535)+(H.l&65535),k=(N.l>>>16)+(H.l>>>16)+(B>>>16),_=(N.h&65535)+(H.h&65535)+(k>>>16),F=(N.h>>>16)+(H.h>>>16)+(_>>>16);O.l=B&65535|k<<16,O.h=_&65535|F<<16}function R(O,N,H,B,k){var _=(N.l&65535)+(H.l&65535)+(B.l&65535)+(k.l&65535),F=(N.l>>>16)+(H.l>>>16)+(B.l>>>16)+(k.l>>>16)+(_>>>16),q=(N.h&65535)+(H.h&65535)+(B.h&65535)+(k.h&65535)+(F>>>16),z=(N.h>>>16)+(H.h>>>16)+(B.h>>>16)+(k.h>>>16)+(q>>>16);O.l=_&65535|F<<16,O.h=q&65535|z<<16}function M(O,N,H,B,k,_){var F=(N.l&65535)+(H.l&65535)+(B.l&65535)+(k.l&65535)+(_.l&65535),q=(N.l>>>16)+(H.l>>>16)+(B.l>>>16)+(k.l>>>16)+(_.l>>>16)+(F>>>16),z=(N.h&65535)+(H.h&65535)+(B.h&65535)+(k.h&65535)+(_.h&65535)+(q>>>16),V=(N.h>>>16)+(H.h>>>16)+(B.h>>>16)+(k.h>>>16)+(_.h>>>16)+(z>>>16);O.l=F&65535|q<<16,O.h=z&65535|V<<16}},RMD160:function(h){var y=h&&typeof h.uppercase=="boolean"?h.uppercase:!1,C=h&&typeof h.pad=="string"?h.pa:"=",b=h&&typeof h.utf8=="boolean"?h.utf8:!0,x=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],S=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],A=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],P=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];this.hex=function(M){return o(w(M,b))},this.b64=function(M){return f(w(M,b),C)},this.any=function(M,O){return p(w(M,b),O)},this.raw=function(M){return w(M,b)},this.hex_hmac=function(M,O){return o(v(M,O))},this.b64_hmac=function(M,O){return f(v(M,O),C)},this.any_hmac=function(M,O,N){return p(v(M,O),N)},this.vm_test=function(){return hex("abc").toLowerCase()==="900150983cd24fb0d6963f7d28e17f72"},this.setUpperCase=function(M){return typeof M=="boolean"&&(y=M),this},this.setPad=function(M){return typeof M<"u"&&(C=M),this},this.setUTF8=function(M){return typeof M=="boolean"&&(b=M),this};function w(M){return M=b?t(M):M,L(D(c(M),M.length*8))}function v(M,O){M=b?t(M):M,O=b?t(O):O;var N,H,B=c(M),k=Array(16),_=Array(16);for(B.length>16&&(B=D(B,M.length*8)),N=0;N<16;N+=1)k[N]=B[N]^909522486,_[N]=B[N]^1549556828;return H=D(k.concat(c(O)),512+O.length*8),L(D(_.concat(H),512+160))}function L(M){var O,N="",H=M.length*32;for(O=0;O>5]>>>O%32&255);return N}function D(M,O){var N,H,B,k,_=1732584193,F=4023233417,q=2562383102,z=271733878,V=3285377520,K,oe,te,Z,ce,he,ae,X,ve,se;for(M[O>>5]|=128<>>9<<4)+14]=O,k=M.length,B=0;Bt(i),get:u=>{if(u===null)return Promise.resolve(e(i));let l=[],c=e(i);typeof u=="string"?l=[u]:Array.isArray(u)?l=u:l=Object.keys(u);let g={};for(let p of l)g[p]=c[p];return Promise.resolve(g)},set:u=>{let l=r(),c=e(i);for(let f in u)c[f]=u[f];let g=document.getElementById("immersive-translate-sync-storage"),p=document.getElementById("immersive-translate-local-storage");if(!g||!p)throw new Error("Storage element not found");if(i==="sync"||l._isUserscript){g.value=JSON.stringify(c);let f=new Event("change");g.dispatchEvent(f)}return(i==="local"||l._isUserscript)&&(p.value=JSON.stringify(c),p.dispatchEvent(new Event("change"))),Promise.resolve()},remove:u=>{let l=r(),c=document.getElementById("immersive-translate-message");if(!c)throw new Error("Message element not found");let g={method:"removeStorageKey",data:{area:i,keys:u}};return new Promise((p,f)=>{c.value=JSON.stringify(g);let h=new Event("change");c.dispatchEvent(h),l._isUserscript?setTimeout(()=>{c.value=JSON.stringify({...g,data:{...g.data,area:g.data.area==="sync"?"local":"sync"}}),c.dispatchEvent(new Event("change")),p(null)},10):p(null)})}}}function r(){let i=document.getElementById("immersive-translate-manifest");if(!i)throw new Error("Manifest element not found");let s=i.value,u={};if(s){try{u=JSON.parse(s)}catch(l){throw l}return u}else return{}}function a(){return globalThis.navigator.languages||[globalThis.navigator.language||globalThis.navigator.userLanguage]}let o={storage:{local:n("local"),sync:n("sync")},runtime:{getManifest:r,lastError:null,getURL:i=>i},contextMenus:{update:()=>{}},i18n:{getAcceptLanguages:a}};globalThis.immersiveTranslateBrowserAPI=o})();m();m();m();m();var Vu,Be,sf,O5,ss,nf,uf,qu={},lf=[],N5=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ua(e,t){for(var n in t)e[n]=t[n];return e}function cf(e){var t=e.parentNode;t&&t.removeChild(e)}function us(e,t,n){var r,a,o,i={};for(o in t)o=="key"?r=t[o]:o=="ref"?a=t[o]:i[o]=t[o];if(arguments.length>2&&(i.children=arguments.length>3?Vu.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)i[o]===void 0&&(i[o]=e.defaultProps[o]);return zu(e,i,r,a,null)}function zu(e,t,n,r,a){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:a??++sf};return a==null&&Be.vnode!=null&&Be.vnode(o),o}function xe(e){return e.children}function no(e,t){this.props=e,this.context=t}function Go(e,t){if(t==null)return e.__?Go(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?zu(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=n,f.__b=n.__b+1,(p=b[c])===null||p&&f.key==p.key&&f.type===p.type)b[c]=void 0;else for(g=0;g=n.__.length&&n.__.push({__V:Ku}),n.__[e]}function $(e){return ls=1,z5(kf,e)}function z5(e,t,n){var r=Yu(cs++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):kf(void 0,t),function(o){var i=r.__N?r.__N[0]:r.__[0],s=r.t(i,o);i!==s&&(r.__N=[s,r.__[1]],r.__c.setState({}))}],r.__c=Bt,!Bt.u)){Bt.u=!0;var a=Bt.shouldComponentUpdate;Bt.shouldComponentUpdate=function(o,i,s){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(c){return c.__c});if(u.every(function(c){return!c.__N}))return!a||a.call(this,o,i,s);var l=!1;return u.forEach(function(c){if(c.__N){var g=c.__[0];c.__=c.__N,c.__N=void 0,g!==c.__[0]&&(l=!0)}}),!!l&&(!a||a.call(this,o,i,s))}}return r.__N||r.__}function le(e,t){var n=Yu(cs++,3);!Be.__s&&Df(n.__H,t)&&(n.__=e,n.i=t,Bt.__H.__h.push(n))}function We(e){return ls=5,Re(function(){return{current:e}},[])}function Re(e,t){var n=Yu(cs++,7);return Df(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Ne(e,t){return ls=8,Re(function(){return e},t)}function Le(e){var t=Bt.context[e.__c],n=Yu(cs++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Bt)),t.props.value):e.__}function q5(){for(var e;e=wf.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Gu),e.__H.__h.forEach(zc),e.__H.__h=[]}catch(t){e.__H.__h=[],Be.__e(t,e.__v)}}Be.__b=function(e){typeof e.type!="function"||e.o||e.type===xe?e.o||(e.o=e.__&&e.__.o?e.__.o:""):e.o=(e.__&&e.__.o?e.__.o:"")+(e.__&&e.__.__k?e.__.__k.indexOf(e):0),Bt=null,Cf&&Cf(e)},Be.__r=function(e){Tf&&Tf(e),cs=0;var t=(Bt=e.__c).__H;t&&(Hc===Bt?(t.__h=[],Bt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=Ku,n.__N=n.i=void 0})):(t.__h.forEach(Gu),t.__h.forEach(zc),t.__h=[])),Hc=Bt},Be.diffed=function(e){vf&&vf(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(wf.push(t)!==1&&yf===Be.requestAnimationFrame||((yf=Be.requestAnimationFrame)||W5)(q5)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==Ku&&(n.__=n.__V),n.i=void 0,n.__V=Ku})),Hc=Bt=null},Be.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Gu),n.__h=n.__h.filter(function(r){return!r.__||zc(r)})}catch(r){t.some(function(a){a.__h&&(a.__h=[])}),t=[],Be.__e(r,n.__v)}}),xf&&xf(e,t)},Be.unmount=function(e){Ef&&Ef(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Gu(r)}catch(a){t=a}}),n.__H=void 0,t&&Be.__e(t,n.__v))};var Sf=typeof requestAnimationFrame=="function";function W5(e){var t,n=function(){clearTimeout(r),Sf&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);Sf&&(t=requestAnimationFrame(n))}function Gu(e){var t=Bt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Bt=t}function zc(e){var t=Bt;e.__c=e.__(),Bt=t}function Df(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function kf(e,t){return typeof t=="function"?t(e):t}m();m();m();var ds;function ed(e){return[...e.v,(e.i?"!":"")+e.n].join(":")}function Of(e,t=","){return e.map(ed).join(t)}var td=typeof CSS<"u"&&CSS.escape||(e=>e.replace(/[!"'`*+.,;:\\/<=>?@#$%&^|~()[\]{}]/g,"\\$&").replace(/^\d/,"\\3$& "));function Jo(e){for(var t=9,n=e.length;n--;)t=Math.imul(t^e.charCodeAt(n),1597334677);return"#"+((t^t>>>9)>>>0).toString(36)}function Qu(e,t="@media "){return t+ct(e).map(n=>(typeof n=="string"&&(n={min:n}),n.raw||Object.keys(n).map(r=>`(${r}-width:${n[r]})`).join(" and "))).join(",")}function ct(e=[]){return Array.isArray(e)?e:e==null?[]:[e]}function Af(e){return e}function ms(){}var Nt={d:0,b:134217728,c:268435456,a:671088640,u:805306368,o:939524096};function Nf(e){return e.match(/[-=:;]/g)?.length||0}function Gc(e){return Math.min(/(?:^|width[^\d]+)(\d+(?:.\d+)?)(p)?/.test(e)?Math.max(0,29.63*(+RegExp.$1/(RegExp.$2?15:1))**.137-43):0,15)<<22|Math.min(Nf(e),15)<<18}var $5=["rst-c","st-ch","h-chi","y-lin","nk","sited","ecked","pty","ad-on","cus-w","ver","cus","cus-v","tive","sable","tiona","quire"];function nd({n:e,i:t,v:n=[]},r,a,o){e&&(e=ed({n:e,i:t,v:n})),o=[...ct(o)];for(let s of n){let u=r.theme("screens",s);for(let l of ct(u&&Qu(u)||r.v(s))){var i;o.push(l),a|=u?67108864|Gc(l):s=="dark"?1073741824:l[0]=="@"?Gc(l):(i=l,1<<~(/:([a-z-]+)/.test(i)&&~$5.indexOf(RegExp.$1.slice(2,7))||-18))}}return{n:e,p:a,r:o,i:t}}var rd=new Map;function Yc(e){if(e.d){let t=[],n=qc(e.r.reduce((r,a)=>a[0]=="@"?(t.push(a),r):a?qc(r,o=>qc(a,i=>{let s=/(:merge\(.+?\))(:[a-z-]+|\\[.+])/.exec(i);if(s){let u=o.indexOf(s[1]);return~u?o.slice(0,u)+s[0]+o.slice(u+s[1].length):Wc(o,i)}return Wc(i,o)})):r,"&"),r=>Wc(r,e.n?"."+td(e.n):""));return n&&t.push(n.replace(/:merge\((.+?)\)/g,"$1")),t.reduceRight((r,a)=>a+"{"+r+"}",e.d)}}function qc(e,t){return e.replace(/ *((?:\(.+?\)|\[.+?\]|[^,])+) *(,|$)/g,(n,r,a)=>t(r)+a)}function Wc(e,t){return e.replace(/&/g,t)}var Lf=new Intl.Collator("en",{numeric:!0});function Uf(e,t){for(var n=0,r=e.length;n>1;0>=jf(e[a],t)?n=a+1:r=a}return r}function jf(e,t){let n=e.p&Nt.o;return n==(t.p&Nt.o)&&(n==Nt.b||n==Nt.o)?0:e.p-t.p||e.o-t.o||Lf.compare(_f(e.n),_f(t.n))||Lf.compare(Mf(e.n),Mf(t.n))}function _f(e){return(e||"").split(/:/).pop().split("/").pop()||"\0"}function Mf(e){return(e||"").replace(/\W/g,t=>String.fromCharCode(127+t.charCodeAt(0)))+"\0"}function $c(e,t){return Math.round(parseInt(e,16)*t)}function Nr(e,t={}){if(typeof e=="function")return e(t);let{opacityValue:n="1",opacityVariable:r}=t,a=r?`var(${r})`:n;if(e.includes(""))return e.replace("",a);if(e[0]=="#"&&(e.length==4||e.length==7)){let o=(e.length-1)/3,i=[17,1,.062272][o-1];return`rgba(${[$c(e.substr(1,o),i),$c(e.substr(1+o,o),i),$c(e.substr(1+2*o,o),i),a]})`}return a=="1"?e:a=="0"?"#0000":e.replace(/^(rgb|hsl)(\([^)]+)\)$/,`$1a$2,${a})`)}function ad(e,t,n,r,a=[]){return function o(i,{n:s,p:u,r:l=[],i:c},g){let p=[],f="",h=0,y=0;for(let x in i||{}){var C,b;let S=i[x];if(x[0]=="@"){if(!S)continue;if(x[1]=="a"){p.push(...sd(s,u,gs(""+S),g,u,l,c,!0));continue}if(x[1]=="l"){for(let A of ct(S))p.push(...o(A,{n:s,p:(C=Nt[x[7]],u&~Nt.o|C),r:x[7]=="d"?[]:l,i:c},g));continue}if(x[1]=="i"){p.push(...ct(S).map(A=>({p:-1,o:0,r:[],d:x+" "+A})));continue}if(x[1]=="k"){p.push({p:Nt.d,o:0,r:[x],d:o(S,{p:Nt.d},g).map(Yc).join("")});continue}if(x[1]=="f"){p.push(...ct(S).map(A=>({p:Nt.d,o:0,r:[x],d:o(A,{p:Nt.d},g).map(Yc).join("")})));continue}}if(typeof S!="object"||Array.isArray(S))x=="label"&&S?s=S+Jo(JSON.stringify([u,c,i])):(S||S===0)&&(x=x.replace(/[A-Z]/g,A=>"-"+A.toLowerCase()),y+=1,h=Math.max(h,(b=x)[0]=="-"?0:Nf(b)+(/^(?:(border-(?!w|c|sty)|[tlbr].{2,4}m?$|c.{7,8}$)|([fl].{5}l|g.{8}$|pl))/.test(b)?+!!RegExp.$1||-!!RegExp.$2:0)+1),f+=(f?";":"")+ct(S).map(A=>g.s(x,od(""+A,g.theme)+(c?" !important":""))).join(";"));else if(x[0]=="@"||x.includes("&")){let A=u;x[0]=="@"&&(x=x.replace(/\bscreen\(([^)]+)\)/g,(P,w)=>{let v=g.theme("screens",w);return v?(A|=67108864,Qu(v,"")):P}),A|=Gc(x)),p.push(...o(S,{n:s,p:A,r:[...l,x],i:c},g))}else p.push(...o(S,{p:u,r:[...l,x]},g))}return p.unshift({n:s,p:u,o:Math.max(0,15-y)+1.5*Math.min(h||15,15),r:l,d:f}),p.sort(jf)}(e,nd(t,n,r,a),n)}function od(e,t){return e.replace(/theme\((["'`])?(.+?)\1(?:\s*,\s*(["'`])?(.+?)\3)?\)/g,(n,r,a,o,i="")=>{let s=t(a,i);return typeof s=="function"&&/color|fill|stroke/i.test(a)?Nr(s):""+ct(s).filter(u=>Object(u)!==u)})}function id(e,t){let n,r=[];for(let a of e)a.d&&a.n?n?.p==a.p&&""+n.r==""+a.r?(n.c=[n.c,a.c].filter(Boolean).join(" "),n.d=n.d+";"+a.d):r.push(n={...a,n:a.n&&t}):r.push({...a,n:a.n&&t});return r}function Ju(e,t,n=Nt.u,r,a){let o=[];for(let i of e)for(let s of function(u,l,c,g,p){u={...u,i:u.i||p};let f=function(h,y){let C=rd.get(h.n);return C?C(h,y):y.r(h.n,h.v[0]=="dark")}(u,l);return f?typeof f=="string"?({r:g,p:c}=nd(u,l,c,g),id(Ju(gs(f),l,c,g,u.i),u.n)):Array.isArray(f)?f.map(h=>{var y,C;return{o:0,...h,r:[...ct(g),...ct(h.r)],p:(y=c,C=h.p??c,y&~Nt.o|C)}}):ad(f,u,l,c,g):[{c:ed(u),p:0,o:0,r:[]}]}(i,t,n,r,a))o.splice(Uf(o,s),0,s);return o}function sd(e,t,n,r,a,o,i,s){return id((s?n.flatMap(u=>Ju([u],r,a,o,i)):Ju(n,r,a,o,i)).map(u=>u.p&Nt.o&&(u.n||t==Nt.b)?{...u,p:u.p&~Nt.o|t,o:0}:u),e)}function V5(e,t,n,r){var a;return a=(o,i)=>{let{n:s,p:u,r:l,i:c}=nd(o,i,t);return n&&sd(s,t,n,i,u,l,c,r)},rd.set(e,a),e}function Vc(e,t,n){if(e[e.length-1]!="("){let r=[],a=!1,o=!1,i="";for(let s of e)if(!(s=="("||/[~@]$/.test(s))){if(s[0]=="!"&&(s=s.slice(1),a=!a),s.endsWith(":")){r[s=="dark:"?"unshift":"push"](s.slice(0,-1));continue}s[0]=="-"&&(s=s.slice(1),o=!o),s.endsWith("-")&&(s=s.slice(0,-1)),s&&s!="&"&&(i+=(i&&"-")+s)}i&&(o&&(i="-"+i),t[0].push({n:i,v:r.filter(K5),i:a}))}}function K5(e,t,n){return n.indexOf(e)==t}var Pf=new Map;function gs(e){let t=Pf.get(e);if(!t){let n=[],r=[[]],a=0,o=0,i=null,s=0,u=(l,c=0)=>{a!=s&&(n.push(e.slice(a,s+c)),l&&Vc(n,r)),a=s+1};for(;s1?g.slice(0,-1)+Jo(JSON.stringify([g,p])):g+"("+Of(p)+")",Nt.a,p,/@$/.test(g))],r)}c=n.lastIndexOf("(",c-1)}n.length=c+1}else/[~@]/.test(l)&&e[s+1]=="("&&r.unshift([])}u(!0),Pf.set(e,t=r[0])}return t}function Hf(e,t,n){return t.reduce((r,a,o)=>r+n(a)+e[o+1],e[0])}function zf(e,t){return Array.isArray(e)&&Array.isArray(e.raw)?Hf(e,t,n=>Kc(n).trim()):t.filter(Boolean).reduce((n,r)=>n+Kc(r),e?Kc(e):"")}function Kc(e){let t,n="";if(e&&typeof e=="object")if(Array.isArray(e))(t=zf(e[0],e.slice(1)))&&(n+=" "+t);else for(let r in e)e[r]&&(n+=" "+r);else e!=null&&typeof e!="boolean"&&(n+=" "+e);return n}var Z_=qf("@"),X_=qf("~");function qf(e){return new Proxy(function(n,...r){return t("",n,r)},{get(n,r){return r in n?n[r]:function(a,...o){return t(r,a,o)}}});function t(n,r,a){return Of(gs(n+e+"("+zf(r,a)+")"))}}function Jc(e,t){return Array.isArray(e)?Ff(Hf(e,t,n=>n!=null&&typeof n!="boolean"?n:"")):typeof e=="string"?Ff(e):[e]}var G5=/ *(?:(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}))/g;function Ff(e){let t;e=e.replace(/\/\*[^]*?\*\/|\s\s+|\n/gm," ");let n=[{}],r=[n[0]],a=[];for(;t=G5.exec(e);)t[4]&&(n.shift(),a.shift()),t[3]?(a.unshift(t[3]),n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))):t[4]||(n[0][t[1]]&&(n.unshift({}),r.push(a.reduce((o,i)=>({[i]:o}),n[0]))),n[0][t[1]]=t[2]);return r}function Wf(e,...t){var n;let r=Jc(e,t),a=(r.find(o=>o.label)?.label||"css")+Jo(JSON.stringify(r));return n=(o,i)=>id(r.flatMap(s=>ad(s,o,i,Nt.o)),a),rd.set(a,n),a}var eM=new Proxy(function(e,t){return Bf("animation",e,t)},{get(e,t){return t in e?e[t]:function(n,r){return Bf(t,n,r)}}});function Bf(e,t,n){return{toString(){return Wf({label:e,"@layer components":{...typeof t=="object"?t:{animation:t},animationName:""+n}})}}}function re(e,t,n){return[e,Qc(t,n)]}function Qc(e,t){return typeof e=="function"?e:typeof e=="string"&&/^[\w-]+$/.test(e)?(n,r)=>({[e]:t?t(n,r):Zc(n,1)}):n=>e||{[n[1]]:Zc(n,2)}}function Zc(e,t,n=e.slice(t).find(Boolean)||e.$$||e.input){return e.input[0]=="-"?`calc(${n} * -1)`:n}function ie(e,t,n,r){return[e,Y5(t,n,r)]}function Y5(e,t,n){let r=typeof t=="string"?(a,o)=>({[t]:n?n(a,o):a._}):t||(({1:a,_:o},i,s)=>({[a||s]:o}));return(a,o)=>{let i=$f(e||a[1]),s=o.theme(i,a.$$)??vr(a.$$,i,o);if(s!=null)return a._=Zc(a,0,s),r(a,o,i)}}function Kt(e,t={},n){return[e,J5(t,n)]}function J5(e={},t){return(n,r)=>{let{section:a=$f(n[0]).replace("-","")+"Color"}=e,[o,i]=Q5(n.$$);if(!o)return;let s=r.theme(a,o)||vr(o,a,r);if(!s||typeof s=="object")return;let{opacityVariable:u=`--tw-${n[0].replace(/-$/,"")}-opacity`,opacitySection:l=a.replace("Color","Opacity"),property:c=a,selector:g}=e,p=r.theme(l,i||"DEFAULT")||i&&vr(i,l,r),f=t||(({_:y})=>{let C=ps(c,y);return g?{[g]:C}:C});n._={value:Nr(s,{opacityVariable:u||void 0,opacityValue:p||void 0}),color:y=>Nr(s,y),opacityVariable:u||void 0,opacityValue:p||void 0};let h=f(n,r);if(!n.dark){let y=r.d(a,o,s);y&&y!==s&&(n._={value:Nr(y,{opacityVariable:u||void 0,opacityValue:p||"1"}),color:C=>Nr(y,C),opacityVariable:u||void 0,opacityValue:p||void 0},h={"&":h,[r.v("dark")]:f(n,r)})}return h}}function Q5(e){return(e.match(/^(\[[^\]]+]|[^/]+?)(?:\/(.+))?$/)||[]).slice(1)}function ps(e,t){let n={};return typeof t=="string"?n[e]=t:(t.opacityVariable&&t.value.includes(t.opacityVariable)&&(n[t.opacityVariable]=t.opacityValue||"1"),n[e]=t.value),n}function vr(e,t,n){if(e[0]=="["&&e.slice(-1)=="]"){if(e=Qo(od(e.slice(1,-1),n.theme)),!t)return e;if(!(/color|fill|stroke/i.test(t)&&!(/^color:/.test(e)||/^(#|((hsl|rgb)a?|hwb|lab|lch|color)\(|[a-z]+$)/.test(e))||/image/i.test(t)&&!(/^image:/.test(e)||/^[a-z-]+\(/.test(e))||/weight/i.test(t)&&!(/^(number|any):/.test(e)||/^\d+$/.test(e))||/position/i.test(t)&&/^(length|size):/.test(e)))return e.replace(/^[a-z-]+:/,"")}}function $f(e){return e.replace(/-./g,t=>t[1].toUpperCase())}function Qo(e){return e.includes("url(")?e.replace(/(.*?)(url\(.*?\))(.*?)/g,(t,n="",r,a="")=>Qo(n)+r+Qo(a)):e.replace(/(^|[^\\])_+/g,(t,n)=>n+" ".repeat(t.length-n.length)).replace(/\\_/g,"_").replace(/(calc|min|max|clamp)\(.+\)/g,t=>t.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 "))}var tM=Symbol();function fs({presets:e=[],...t}){let n={darkMode:void 0,darkColor:void 0,preflight:t.preflight!==!1&&[],theme:{},variants:ct(t.variants),rules:ct(t.rules),ignorelist:ct(t.ignorelist),hash:void 0,stringify:(r,a)=>r+":"+a,finalize:[]};for(let r of ct([...e,{darkMode:t.darkMode,darkColor:t.darkColor,preflight:t.preflight!==!1&&ct(t.preflight),theme:t.theme,hash:t.hash,stringify:t.stringify,finalize:t.finalize}])){let{preflight:a,darkMode:o=n.darkMode,darkColor:i=n.darkColor,theme:s,variants:u,rules:l,ignorelist:c,hash:g=n.hash,stringify:p=n.stringify,finalize:f}=typeof r=="function"?r(n):r;n={preflight:n.preflight!==!1&&a!==!1&&[...n.preflight,...ct(a)],darkMode:o,darkColor:i,theme:{...n.theme,...s,extend:{...n.theme.extend,...s?.extend}},variants:[...n.variants,...ct(u)],rules:[...n.rules,...ct(l)],ignorelist:[...n.ignorelist,...ct(c)],hash:g,stringify:p,finalize:[...n.finalize,...ct(f)]}}return n}function Rf(e,t,n,r,a,o){for(let i of t){let s=n.get(i);s||n.set(i,s=r(i));let u=s(e,a,o);if(u)return u}}function Z5(e){var t;return Xc(e[0],typeof(t=e[1])=="function"?t:()=>t)}function X5(e){var t,n;return Array.isArray(e)?Xc(e[0],Qc(e[1],e[2])):Xc(e,Qc(t,n))}function Xc(e,t){return Vf(e,(n,r,a,o)=>{let i=r.exec(n);if(i)return i.$$=n.slice(i[0].length),i.dark=o,t(i,a)})}function Vf(e,t){let n=ct(e).map(eT);return(r,a,o)=>{for(let i of n){let s=t(r,i,a,o);if(s)return s}}}function eT(e){return typeof e=="string"?RegExp("^"+e+(e.includes("$")||e.slice(-1)=="-"?"":"$")):e}function tT(e,t){let n=fs(e),r=function({theme:u,darkMode:l,darkColor:c=ms,variants:g,rules:p,hash:f,stringify:h,ignorelist:y,finalize:C}){let b=new Map,x=new Map,S=new Map,A=new Map,P=Vf(y,(L,D)=>D.test(L));g.push(["dark",Array.isArray(l)||l=="class"?`${ct(l)[1]||".dark"} &`:typeof l=="string"&&l!="media"?l:"@media (prefers-color-scheme:dark)"]);let w=typeof f=="function"?L=>f(L,Jo):f?Jo:Af;w!==Af&&C.push(L=>({...L,n:L.n&&w(L.n),d:L.d?.replace(/--(tw(?:-[\w-]+)?)\b/g,(D,T)=>"--"+w(T).replace("#",""))}));let v={theme:function({extend:L={},...D}){let T={},j={get colors(){return R("colors")},theme:R,negative(){return{}},breakpoints(O){let N={};for(let H in O)typeof O[H]=="string"&&(N["screen-"+H]=O[H]);return N}};return R;function R(O,N,H,B){if(O){if({1:O,2:B}=/^(\S+?)(?:\s*\/\s*([^/]+))?$/.exec(O)||[,O],/[.[]/.test(O)){let q=[];O.replace(/\[([^\]]+)\]|([^.[]+)/g,(z,V,K=V)=>q.push(K)),O=q.shift(),H=N,N=q.join("-")}let _=T[O]||Object.assign(Object.assign(T[O]={},M(D,O)),M(L,O));if(N==null)return _;N||="DEFAULT";let F=_[N]??N.split("-").reduce((q,z)=>q?.[z],_)??H;return B?Nr(F,{opacityValue:od(B,R)}):F}let k={};for(let _ of[...Object.keys(D),...Object.keys(L)])k[_]=R(_);return k}function M(O,N){let H=O[N];return typeof H=="function"&&(H=H(j)),H&&/color|fill|stroke/i.test(N)?function B(k,_=[]){let F={};for(let q in k){let z=k[q],V=[..._,q];F[V.join("-")]=z,q=="DEFAULT"&&(V=_,F[_.join("-")]=z),typeof z=="object"&&Object.assign(F,B(z,V))}return F}(H):H}}(u),e:td,h:w,s(L,D){return h(L,D,v)},d(L,D,T){return c(L,D,v,T)},v(L){return b.has(L)||b.set(L,Rf(L,g,x,Z5,v)||"&:"+L),b.get(L)},r(L,D){let T=JSON.stringify([L,D]);return S.has(T)||S.set(T,!P(L,v)&&Rf(L,p,A,X5,v,D)),S.get(T)},f(L){return C.reduce((D,T)=>T(D,v),L)}};return v}(n),a=new Map,o=[],i=new Set;t.resume(u=>a.set(u,u),(u,l)=>{t.insert(u,o.length,l),o.push(l),i.add(u)});function s(u){let l=r.f(u),c=Yc(l);if(c&&!i.has(c)){i.add(c);let g=Uf(o,u);t.insert(c,g,u),o.splice(g,0,u)}return l.n}return Object.defineProperties(function(u){if(!a.size)for(let c of ct(n.preflight))typeof c=="function"&&(c=c(r)),c&&(typeof c=="string"?sd("",Nt.b,gs(c),r,Nt.b,[],!1,!0):ad(c,{},r,Nt.b)).forEach(s);u=""+u;let l=a.get(u);if(!l){let c=new Set;for(let g of Ju(gs(u),r))c.add(g.c).add(s(g));l=[...c].filter(Boolean).join(" "),a.set(u,l).set(l,l)}return l},Object.getOwnPropertyDescriptors({get target(){return t.target},theme:r.theme,config:n,snapshot(){let u=t.snapshot(),l=new Set(i),c=new Map(a),g=[...o];return()=>{u(),i=l,a=c,o=g}},clear(){t.clear(),i=new Set,a=new Map,o=[]},destroy(){this.clear(),t.destroy()}}))}function nT(e,t){return e!=t&&""+e.split(" ").sort()!=""+t.split(" ").sort()}function rT(e){let t=new MutationObserver(n);return{observe(a){t.observe(a,{attributeFilter:["class"],subtree:!0,childList:!0}),r(a),n([{target:a,type:""}])},disconnect(){t.disconnect()}};function n(a){for(let{type:o,target:i}of a)if(o[0]=="a")r(i);else for(let s of i.querySelectorAll("[class]"))r(s);t.takeRecords()}function r(a){let o,i=a.getAttribute?.("class");i&&nT(i,o=e(i))&&a.setAttribute("class",o)}}function aT(e=ud,t=typeof document<"u"&&document.documentElement){if(t){let n=rT(e);n.observe(t);let{destroy:r}=e;e.destroy=()=>{n.disconnect(),r.call(e)}}return e}function Kf(e){let t=document.querySelector(e||'style[data-twind=""]');return(!t||t.tagName!="STYLE")&&(t=document.createElement("style"),document.head.prepend(t)),t.dataset.twind="claimed",t}function oT(e){let t=e?.cssRules?e:(e&&typeof e!="string"?e:Kf(e)).sheet;return{target:t,snapshot(){let n=Array.from(t.cssRules,r=>r.cssText);return()=>{this.clear(),n.forEach(this.insert)}},clear(){for(let n=t.cssRules.length;n--;)t.deleteRule(n)},destroy(){t.ownerNode?.remove()},insert(n,r){try{t.insertRule(n,r)}catch{t.insertRule(":root{}",r)}},resume:ms}}function iT(e){let t=e&&typeof e!="string"?e:Kf(e);return{target:t,snapshot(){let n=Array.from(t.childNodes,r=>r.textContent);return()=>{this.clear(),n.forEach(this.insert)}},clear(){t.textContent=""},destroy(){t.remove()},insert(n,r){t.insertBefore(document.createTextNode(n),t.childNodes[r]||null)},resume:ms}}function sT(e){let t=[];return{target:t,snapshot(){let n=[...t];return()=>{t.splice(0,t.length,...n)}},clear(){t.length=0},destroy(){this.clear()},insert(n,r,a){t.splice(r,0,e?`/*!${a.p.toString(36)},${(2*a.o).toString(36)}${a.n?","+a.n:""}*/${n}`:n)},resume:ms}}function Gf(e,t){let n=typeof document>"u"?sT(!t):e?iT():oT();return t||(n.resume=lT),n}function uT(e){return(e.ownerNode||e).textContent||(e.cssRules?Array.from(e.cssRules,t=>t.cssText):ct(e)).join("")}function lT(e,t){let n=uT(this.target),r=/\/\*!([\da-z]+),([\da-z]+)(?:,(.+?))?\*\//g;if(r.test(n)){var a;let o;if(r.lastIndex=0,this.clear(),typeof document<"u")for(let i of document.querySelectorAll("[class]"))e(i.getAttribute("class"));for(;a=r.exec(n),o&&t(n.slice(o.index+o[0].length,a?.index),{p:parseInt(o[1],36),o:parseInt(o[2],36)/2,n:o[3]}),o=a;);}}var ud=new Proxy(ms,{apply(e,t,n){return ds(n[0])},get(e,t){let n=ds[t];return typeof n=="function"?function(){return n.apply(ds,arguments)}:n}});function Yf(e={},t=Gf,n){return ds?.destroy(),ds=aT(tT(e,typeof t=="function"?t():t),n)}function ld(e,t=!0){let n=fs(e);return Yf({...n,hash:n.hash??t},()=>Gf(!t))}var nM=function e(t){return new Proxy(function(n,...r){return If(t,"",n,r)},{get(n,r){return r==="bind"?e:r in n?n[r]:function(a,...o){return If(t,r,a,o)}}})}();function If(e,t,n,r){return{toString(){let a=Jc(n,r),o=td(t+Jo(JSON.stringify([t,a])));return(typeof e=="function"?e:ud)(Wf({[`@keyframes ${o}`]:Jc(n,r)})),o}}}m();m();m();var cT=new Map([["align-self","-ms-grid-row-align"],["color-adjust","-webkit-print-color-adjust"],["column-gap","grid-column-gap"],["forced-color-adjust","-ms-high-contrast-adjust"],["gap","grid-gap"],["grid-template-columns","-ms-grid-columns"],["grid-template-rows","-ms-grid-rows"],["justify-self","-ms-grid-column-align"],["margin-inline-end","-webkit-margin-end"],["margin-inline-start","-webkit-margin-start"],["mask-border","-webkit-mask-box-image"],["mask-border-outset","-webkit-mask-box-image-outset"],["mask-border-slice","-webkit-mask-box-image-slice"],["mask-border-source","-webkit-mask-box-image-source"],["mask-border-repeat","-webkit-mask-box-image-repeat"],["mask-border-width","-webkit-mask-box-image-width"],["overflow-wrap","word-wrap"],["padding-inline-end","-webkit-padding-end"],["padding-inline-start","-webkit-padding-start"],["print-color-adjust","color-adjust"],["row-gap","grid-row-gap"],["scroll-margin-bottom","scroll-snap-margin-bottom"],["scroll-margin-left","scroll-snap-margin-left"],["scroll-margin-right","scroll-snap-margin-right"],["scroll-margin-top","scroll-snap-margin-top"],["scroll-margin","scroll-snap-margin"],["text-combine-upright","-ms-text-combine-horizontal"]]);function Jf(e){return cT.get(e)}function Qf(e){var t=/^(?:(text-(?:decoration$|e|or|si)|back(?:ground-cl|d|f)|box-d|mask(?:$|-[ispro]|-cl)|pr|hyphena|flex-d)|(tab-|column(?!-s)|text-align-l)|(ap)|u|hy)/i.exec(e);return t?t[1]?1:t[2]?2:t[3]?3:5:0}function Zf(e,t){var n=/^(?:(pos)|(cli)|(background-i)|(flex(?:$|-b)|(?:max-|min-)?(?:block-s|inl|he|widt))|dis)/i.exec(e);return n?n[1]?/^sti/i.test(t)?1:0:n[2]?/^pat/i.test(t)?1:0:n[3]?/^image-/i.test(t)?1:0:n[4]?t[3]==="-"?2:0:/^(?:inline-)?grid$/i.test(t)?4:0:0}var dT=[["-webkit-",1],["-moz-",2],["-ms-",4]];function Zu(){return({stringify:e})=>({stringify(t,n,r){let a="",o=Jf(t);o&&(a+=e(o,n,r)+";");let i=Qf(t),s=Zf(t,n);for(let u of dT)i&u[1]&&(a+=e(u[0]+t,n,r)+";"),s&u[1]&&(a+=e(t,u[0]+n,r)+";");return a+e(t,n,r)}})}m();m();var dd={screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},columns:{auto:"auto","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},spacing:{px:"1px",0:"0px",...jn(4,"rem",4,.5,.5),...jn(12,"rem",4,5),14:"3.5rem",...jn(64,"rem",4,16,4),72:"18rem",80:"20rem",96:"24rem"},durations:{75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0,0,0.2,1) infinite",pulse:"pulse 2s cubic-bezier(0.4,0,0.6,1) infinite",bounce:"bounce 1s infinite"},aspectRatio:{auto:"auto",square:"1/1",video:"16/9"},backdropBlur:Ge("blur"),backdropBrightness:Ge("brightness"),backdropContrast:Ge("contrast"),backdropGrayscale:Ge("grayscale"),backdropHueRotate:Ge("hueRotate"),backdropInvert:Ge("invert"),backdropOpacity:Ge("opacity"),backdropSaturate:Ge("saturate"),backdropSepia:Ge("sepia"),backgroundColor:Ge("colors"),backgroundImage:{none:"none"},backgroundOpacity:Ge("opacity"),backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{none:"none",0:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},brightness:{...jn(200,"",100,0,50),...jn(110,"",100,90,5),75:"0.75",125:"1.25"},borderColor:({theme:e})=>({DEFAULT:e("colors.gray.200","currentColor"),...e("colors")}),borderOpacity:Ge("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem","1/2":"50%",full:"9999px"},borderSpacing:Ge("spacing"),borderWidth:{DEFAULT:"1px",...Kn(8,"px")},boxShadow:{sm:"0 1px 2px 0 rgba(0,0,0,0.05)",DEFAULT:"0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)","2xl":"0 25px 50px -12px rgba(0,0,0,0.25)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.05)",none:"0 0 #0000"},boxShadowColor:Ge("colors"),caretColor:Ge("colors"),accentColor:({theme:e})=>({auto:"auto",...e("colors")}),contrast:{...jn(200,"",100,0,50),75:"0.75",125:"1.25"},content:{none:"none"},divideColor:Ge("borderColor"),divideOpacity:Ge("borderOpacity"),divideWidth:Ge("borderWidth"),dropShadow:{sm:"0 1px 1px rgba(0,0,0,0.05)",DEFAULT:["0 1px 2px rgba(0,0,0,0.1)","0 1px 1px rgba(0,0,0,0.06)"],md:["0 4px 3px rgba(0,0,0,0.07)","0 2px 2px rgba(0,0,0,0.06)"],lg:["0 10px 8px rgba(0,0,0,0.04)","0 4px 3px rgba(0,0,0,0.1)"],xl:["0 20px 13px rgba(0,0,0,0.03)","0 8px 5px rgba(0,0,0,0.08)"],"2xl":"0 25px 25px rgba(0,0,0,0.15)",none:"0 0 #0000"},fill:({theme:e})=>({...e("colors"),none:"none"}),grayscale:{DEFAULT:"100%",0:"0"},hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},invert:{DEFAULT:"100%",0:"0"},flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({...e("spacing"),...hs(2,6),...hs(12,12),auto:"auto",full:"100%"}),flexGrow:{DEFAULT:1,0:0},flexShrink:{DEFAULT:1,0:0},fontFamily:{sans:'ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"'.split(","),serif:'ui-serif,Georgia,Cambria,"Times New Roman",Times,serif'.split(","),mono:'ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'.split(",")},fontSize:{xs:["0.75rem","1rem"],sm:["0.875rem","1.25rem"],base:["1rem","1.5rem"],lg:["1.125rem","1.75rem"],xl:["1.25rem","1.75rem"],"2xl":["1.5rem","2rem"],"3xl":["1.875rem","2.25rem"],"4xl":["2.25rem","2.5rem"],"5xl":["3rem","1"],"6xl":["3.75rem","1"],"7xl":["4.5rem","1"],"8xl":["6rem","1"],"9xl":["8rem","1"]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:Ge("spacing"),gradientColorStops:Ge("colors"),gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0,1fr)"},gridColumn:{auto:"auto","span-full":"1 / -1"},gridRow:{auto:"auto","span-full":"1 / -1"},gridTemplateColumns:{none:"none"},gridTemplateRows:{none:"none"},height:({theme:e})=>({...e("spacing"),...hs(2,6),min:"min-content",max:"max-content",fit:"fit-content",auto:"auto",full:"100%",screen:"100vh"}),inset:({theme:e})=>({...e("spacing"),...hs(2,4),auto:"auto",full:"100%"}),keyframes:{spin:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}},ping:{"0%":{transform:"scale(1)",opacity:"1"},"75%,100%":{transform:"scale(2)",opacity:"0"}},pulse:{"0%,100%":{opacity:"1"},"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{...jn(10,"rem",4,3),none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),maxHeight:({theme:e})=>({full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh",...e("spacing")}),maxWidth:({theme:e,breakpoints:t})=>({...t(e("screens")),none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch"}),minHeight:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",screen:"100vh"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},opacity:{...jn(100,"",100,0,10),5:"0.05",25:"0.25",75:"0.75",95:"0.95"},order:{first:"-9999",last:"9999",none:"0"},padding:Ge("spacing"),placeholderColor:Ge("colors"),placeholderOpacity:Ge("opacity"),outlineColor:Ge("colors"),outlineOffset:Kn(8,"px"),outlineWidth:Kn(8,"px"),ringColor:({theme:e})=>({...e("colors"),DEFAULT:"#3b82f6"}),ringOffsetColor:Ge("colors"),ringOffsetWidth:Kn(8,"px"),ringOpacity:({theme:e})=>({...e("opacity"),DEFAULT:"0.5"}),ringWidth:{DEFAULT:"3px",...Kn(8,"px")},rotate:{...Kn(2,"deg"),...Kn(12,"deg",3),...Kn(180,"deg",45)},saturate:jn(200,"",100,0,50),scale:{...jn(150,"",100,0,50),...jn(110,"",100,90,5),75:"0.75",125:"1.25"},scrollMargin:Ge("spacing"),scrollPadding:Ge("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{...Kn(2,"deg"),...Kn(12,"deg",3)},space:Ge("spacing"),stroke:({theme:e})=>({...e("colors"),none:"none"}),strokeWidth:jn(2),textColor:Ge("colors"),textDecorationColor:Ge("colors"),textDecorationThickness:{"from-font":"from-font",auto:"auto",...Kn(8,"px")},textUnderlineOffset:{auto:"auto",...Kn(8,"px")},textIndent:Ge("spacing"),textOpacity:Ge("opacity"),transitionDuration:({theme:e})=>({...e("durations"),DEFAULT:"150ms"}),transitionDelay:Ge("durations"),transitionProperty:{none:"none",all:"all",DEFAULT:"color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",colors:"color,background-color,border-color,text-decoration-color,fill,stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4,0,0.2,1)",linear:"linear",in:"cubic-bezier(0.4,0,1,1)",out:"cubic-bezier(0,0,0.2,1)","in-out":"cubic-bezier(0.4,0,0.2,1)"},translate:({theme:e})=>({...e("spacing"),...hs(2,4),full:"100%"}),width:({theme:e})=>({min:"min-content",max:"max-content",fit:"fit-content",screen:"100vw",...e("flexBasis")}),willChange:{scroll:"scroll-position"},zIndex:{...jn(50,"",1,0,10),auto:"auto"}};function hs(e,t){let n={};do for(var r=1;rt(e)}var gT={"*,::before,::after":{boxSizing:"border-box",borderWidth:"0",borderStyle:"solid",borderColor:"theme(borderColor.DEFAULT, currentColor)"},"::before,::after":{"--tw-content":"''"},html:{lineHeight:1.5,WebkitTextSizeAdjust:"100%",MozTabSize:"4",tabSize:4,fontFamily:`theme(fontFamily.sans, ${dd.fontFamily.sans})`,fontFeatureSettings:"theme(fontFamily.sans[1].fontFeatureSettings, normal)"},body:{margin:"0",lineHeight:"inherit"},hr:{height:"0",color:"inherit",borderTopWidth:"1px"},"abbr:where([title])":{textDecoration:"underline dotted"},"h1,h2,h3,h4,h5,h6":{fontSize:"inherit",fontWeight:"inherit"},a:{color:"inherit",textDecoration:"inherit"},"b,strong":{fontWeight:"bolder"},"code,kbd,samp,pre":{fontFamily:`theme(fontFamily.mono, ${dd.fontFamily.mono})`,fontFeatureSettings:"theme(fontFamily.mono[1].fontFeatureSettings, normal)",fontSize:"1em"},small:{fontSize:"80%"},"sub,sup":{fontSize:"75%",lineHeight:0,position:"relative",verticalAlign:"baseline"},sub:{bottom:"-0.25em"},sup:{top:"-0.5em"},table:{textIndent:"0",borderColor:"inherit",borderCollapse:"collapse"},"button,input,optgroup,select,textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"inherit",color:"inherit",margin:"0",padding:"0"},"button,select":{textTransform:"none"},"button,[type='button'],[type='reset'],[type='submit']":{WebkitAppearance:"button",backgroundColor:"transparent",backgroundImage:"none"},":-moz-focusring":{outline:"auto"},":-moz-ui-invalid":{boxShadow:"none"},progress:{verticalAlign:"baseline"},"::-webkit-inner-spin-button,::-webkit-outer-spin-button":{height:"auto"},"[type='search']":{WebkitAppearance:"textfield",outlineOffset:"-2px"},"::-webkit-search-decoration":{WebkitAppearance:"none"},"::-webkit-file-upload-button":{WebkitAppearance:"button",font:"inherit"},summary:{display:"list-item"},"blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre":{margin:"0"},fieldset:{margin:"0",padding:"0"},legend:{padding:"0"},"ol,ul,menu":{listStyle:"none",margin:"0",padding:"0"},textarea:{resize:"vertical"},"input::placeholder,textarea::placeholder":{opacity:1,color:"theme(colors.gray.400, #9ca3af)"},'button,[role="button"]':{cursor:"pointer"},":disabled":{cursor:"default"},"img,svg,video,canvas,audio,iframe,embed,object":{display:"block",verticalAlign:"middle"},"img,video":{maxWidth:"100%",height:"auto"},"[hidden]":{display:"none"}},mT=[re("\\[([-\\w]+):(.+)]",({1:e,2:t},n)=>({"@layer overrides":{"&":{[e]:vr(`[${t}]`,"",n)}}})),re("(group|peer)([~/][^-[]+)?",({input:e},{h:t})=>[{c:t(e)}]),ie("aspect-","aspectRatio"),re("container",(e,{theme:t})=>{let{screens:n=t("screens"),center:r,padding:a}=t("container"),o={width:"100%",marginRight:r&&"auto",marginLeft:r&&"auto",...i("xs")};for(let s in n){let u=n[s];typeof u=="string"&&(o[Qu(u)]={"&":{maxWidth:u,...i(s)}})}return o;function i(s){let u=a&&(typeof a=="string"?a:a[s]||a.DEFAULT);if(u)return{paddingRight:u,paddingLeft:u}}}),ie("content-","content",({_:e})=>({"--tw-content":e,content:"var(--tw-content)"})),re("(?:box-)?decoration-(slice|clone)","boxDecorationBreak"),re("box-(border|content)","boxSizing",({1:e})=>e+"-box"),re("hidden",{display:"none"}),re("table-(auto|fixed)","tableLayout"),re(["(block|flex|table|grid|inline|contents|flow-root|list-item)","(inline-(block|flex|table|grid))","(table-(caption|cell|column|row|(column|row|footer|header)-group))"],"display"),"(float)-(left|right|none)","(clear)-(left|right|none|both)","(overflow(?:-[xy])?)-(auto|hidden|clip|visible|scroll)","(isolation)-(auto)",re("isolate","isolation"),re("object-(contain|cover|fill|none|scale-down)","objectFit"),ie("object-","objectPosition"),re("object-(top|bottom|center|(left|right)(-(top|bottom))?)","objectPosition",Xu),re("overscroll(-[xy])?-(auto|contain|none)",({1:e="",2:t})=>({["overscroll-behavior"+e]:t})),re("(static|fixed|absolute|relative|sticky)","position"),ie("-?inset(-[xy])?(?:$|-)","inset",({1:e,_:t})=>({top:e!="-x"&&t,right:e!="-y"&&t,bottom:e!="-x"&&t,left:e!="-y"&&t})),ie("-?(top|bottom|left|right)(?:$|-)","inset"),re("(visible|collapse)","visibility"),re("invisible",{visibility:"hidden"}),ie("-?z-","zIndex"),re("flex-((row|col)(-reverse)?)","flexDirection",Xf),re("flex-(wrap|wrap-reverse|nowrap)","flexWrap"),ie("(flex-(?:grow|shrink))(?:$|-)"),ie("(flex)-"),ie("grow(?:$|-)","flexGrow"),ie("shrink(?:$|-)","flexShrink"),ie("basis-","flexBasis"),ie("-?(order)-"),"-?(order)-(\\d+)",ie("grid-cols-","gridTemplateColumns"),re("grid-cols-(\\d+)","gridTemplateColumns",r3),ie("col-","gridColumn"),re("col-(span)-(\\d+)","gridColumn",n3),ie("col-start-","gridColumnStart"),re("col-start-(auto|\\d+)","gridColumnStart"),ie("col-end-","gridColumnEnd"),re("col-end-(auto|\\d+)","gridColumnEnd"),ie("grid-rows-","gridTemplateRows"),re("grid-rows-(\\d+)","gridTemplateRows",r3),ie("row-","gridRow"),re("row-(span)-(\\d+)","gridRow",n3),ie("row-start-","gridRowStart"),re("row-start-(auto|\\d+)","gridRowStart"),ie("row-end-","gridRowEnd"),re("row-end-(auto|\\d+)","gridRowEnd"),re("grid-flow-((row|col)(-dense)?)","gridAutoFlow",e=>Xu(Xf(e))),re("grid-flow-(dense)","gridAutoFlow"),ie("auto-cols-","gridAutoColumns"),ie("auto-rows-","gridAutoRows"),ie("gap-x(?:$|-)","gap","columnGap"),ie("gap-y(?:$|-)","gap","rowGap"),ie("gap(?:$|-)","gap"),"(justify-(?:items|self))-",re("justify-","justifyContent",e3),re("(content|items|self)-",e=>({["align-"+e[1]]:e3(e)})),re("(place-(content|items|self))-",({1:e,$$:t})=>({[e]:("wun".includes(t[3])?"space-":"")+t})),ie("p([xytrbl])?(?:$|-)","padding",Zo("padding")),ie("-?m([xytrbl])?(?:$|-)","margin",Zo("margin")),ie("-?space-(x|y)(?:$|-)","space",({1:e,_:t})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"0",["margin-"+{y:"top",x:"left"}[e]]:`calc(${t} * calc(1 - var(--tw-space-${e}-reverse)))`,["margin-"+{y:"bottom",x:"right"}[e]]:`calc(${t} * var(--tw-space-${e}-reverse))`}})),re("space-(x|y)-reverse",({1:e})=>({"&>:not([hidden])~:not([hidden])":{[`--tw-space-${e}-reverse`]:"1"}})),ie("w-","width"),ie("min-w-","minWidth"),ie("max-w-","maxWidth"),ie("h-","height"),ie("min-h-","minHeight"),ie("max-h-","maxHeight"),ie("font-","fontWeight"),ie("font-","fontFamily",({_:e})=>typeof(e=ct(e))[1]=="string"?{fontFamily:rr(e)}:{fontFamily:rr(e[0]),...e[1]}),re("antialiased",{WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}),re("subpixel-antialiased",{WebkitFontSmoothing:"auto",MozOsxFontSmoothing:"auto"}),re("italic","fontStyle"),re("not-italic",{fontStyle:"normal"}),re("(ordinal|slashed-zero|(normal|lining|oldstyle|proportional|tabular)-nums|(diagonal|stacked)-fractions)",({1:e,2:t="",3:n})=>t=="normal"?{fontVariantNumeric:"normal"}:{["--tw-"+(n?"numeric-fraction":"pt".includes(t[0])?"numeric-spacing":t?"numeric-figure":e)]:e,fontVariantNumeric:"var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)",...ca({"--tw-ordinal":"var(--tw-empty,/*!*/ /*!*/)","--tw-slashed-zero":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-figure":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-spacing":"var(--tw-empty,/*!*/ /*!*/)","--tw-numeric-fraction":"var(--tw-empty,/*!*/ /*!*/)"})}),ie("tracking-","letterSpacing"),ie("leading-","lineHeight"),re("list-(inside|outside)","listStylePosition"),ie("list-","listStyleType"),re("list-","listStyleType"),ie("placeholder-opacity-","placeholderOpacity",({_:e})=>({"&::placeholder":{"--tw-placeholder-opacity":e}})),Kt("placeholder-",{property:"color",selector:"&::placeholder"}),re("text-(left|center|right|justify|start|end)","textAlign"),re("text-(ellipsis|clip)","textOverflow"),ie("text-opacity-","textOpacity","--tw-text-opacity"),Kt("text-",{property:"color"}),ie("text-","fontSize",({_:e})=>typeof e=="string"?{fontSize:e}:{fontSize:e[0],...typeof e[1]=="string"?{lineHeight:e[1]}:e[1]}),ie("indent-","textIndent"),re("(overline|underline|line-through)","textDecorationLine"),re("no-underline",{textDecorationLine:"none"}),ie("underline-offset-","textUnderlineOffset"),Kt("decoration-",{section:"textDecorationColor",opacityVariable:!1,opacitySection:"opacity"}),ie("decoration-","textDecorationThickness"),re("decoration-","textDecorationStyle"),re("(uppercase|lowercase|capitalize)","textTransform"),re("normal-case",{textTransform:"none"}),re("truncate",{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),re("align-","verticalAlign"),re("whitespace-","whiteSpace"),re("break-normal",{wordBreak:"normal",overflowWrap:"normal"}),re("break-words",{overflowWrap:"break-word"}),re("break-all",{wordBreak:"break-all"}),re("break-keep",{wordBreak:"keep-all"}),Kt("caret-",{opacityVariable:!1,opacitySection:"opacity"}),Kt("accent-",{opacityVariable:!1,opacitySection:"opacity"}),re("bg-gradient-to-([trbl]|[tb][rl])","backgroundImage",({1:e})=>`linear-gradient(to ${ro(e," ")},var(--tw-gradient-stops))`),Kt("from-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-from":e.value,"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":"var(--tw-gradient-from),var(--tw-gradient-to)"})),Kt("via-",{section:"gradientColorStops",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-gradient-to":e.color({opacityValue:"0"}),"--tw-gradient-stops":`var(--tw-gradient-from),${e.value},var(--tw-gradient-to)`})),Kt("to-",{section:"gradientColorStops",property:"--tw-gradient-to",opacityVariable:!1,opacitySection:"opacity"}),re("bg-(fixed|local|scroll)","backgroundAttachment"),re("bg-origin-(border|padding|content)","backgroundOrigin",({1:e})=>e+"-box"),re(["bg-(no-repeat|repeat(-[xy])?)","bg-repeat-(round|space)"],"backgroundRepeat"),re("bg-blend-","backgroundBlendMode"),re("bg-clip-(border|padding|content|text)","backgroundClip",({1:e})=>e+(e=="text"?"":"-box")),ie("bg-opacity-","backgroundOpacity","--tw-bg-opacity"),Kt("bg-",{section:"backgroundColor"}),ie("bg-","backgroundImage"),ie("bg-","backgroundPosition"),re("bg-(top|bottom|center|(left|right)(-(top|bottom))?)","backgroundPosition",Xu),ie("bg-","backgroundSize"),ie("rounded(?:$|-)","borderRadius"),ie("rounded-([trbl]|[tb][rl])(?:$|-)","borderRadius",({1:e,_:t})=>{let n={t:["tl","tr"],r:["tr","br"],b:["bl","br"],l:["bl","tl"]}[e]||[e,e];return{[`border-${ro(n[0])}-radius`]:t,[`border-${ro(n[1])}-radius`]:t}}),re("border-(collapse|separate)","borderCollapse"),ie("border-opacity(?:$|-)","borderOpacity","--tw-border-opacity"),re("border-(solid|dashed|dotted|double|none)","borderStyle"),ie("border-spacing(-[xy])?(?:$|-)","borderSpacing",({1:e,_:t})=>({...ca({"--tw-border-spacing-x":"0","--tw-border-spacing-y":"0"}),["--tw-border-spacing"+(e||"-x")]:t,["--tw-border-spacing"+(e||"-y")]:t,"border-spacing":"var(--tw-border-spacing-x) var(--tw-border-spacing-y)"})),Kt("border-([xytrbl])-",{section:"borderColor"},Zo("border","Color")),Kt("border-"),ie("border-([xytrbl])(?:$|-)","borderWidth",Zo("border","Width")),ie("border(?:$|-)","borderWidth"),ie("divide-opacity(?:$|-)","divideOpacity",({_:e})=>({"&>:not([hidden])~:not([hidden])":{"--tw-divide-opacity":e}})),re("divide-(solid|dashed|dotted|double|none)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{borderStyle:e}})),re("divide-([xy]-reverse)",({1:e})=>({"&>:not([hidden])~:not([hidden])":{["--tw-divide-"+e]:"1"}})),ie("divide-([xy])(?:$|-)","divideWidth",({1:e,_:t})=>{let n={x:"lr",y:"tb"}[e];return{"&>:not([hidden])~:not([hidden])":{[`--tw-divide-${e}-reverse`]:"0",[`border-${ro(n[0])}Width`]:`calc(${t} * calc(1 - var(--tw-divide-${e}-reverse)))`,[`border-${ro(n[1])}Width`]:`calc(${t} * var(--tw-divide-${e}-reverse))`}}}),Kt("divide-",{property:"borderColor",selector:"&>:not([hidden])~:not([hidden])"}),ie("ring-opacity(?:$|-)","ringOpacity","--tw-ring-opacity"),Kt("ring-offset-",{property:"--tw-ring-offset-color",opacityVariable:!1}),ie("ring-offset(?:$|-)","ringOffsetWidth","--tw-ring-offset-width"),re("ring-inset",{"--tw-ring-inset":"inset"}),Kt("ring-",{property:"--tw-ring-color"}),ie("ring(?:$|-)","ringWidth",({_:e},{theme:t})=>({...ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000","&":{"--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":t("ringOffsetWidth","","0px"),"--tw-ring-offset-color":Nr(t("ringOffsetColor","","#fff")),"--tw-ring-color":Nr(t("ringColor","","#93c5fd"),{opacityVariable:"--tw-ring-opacity"}),"--tw-ring-opacity":t("ringOpacity","","0.5")}}),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":`var(--tw-ring-inset) 0 0 0 calc(${e} + var(--tw-ring-offset-width)) var(--tw-ring-color)`,boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),Kt("shadow-",{section:"boxShadowColor",opacityVariable:!1,opacitySection:"opacity"},({_:e})=>({"--tw-shadow-color":e.value,"--tw-shadow":"var(--tw-shadow-colored)"})),ie("shadow(?:$|-)","boxShadow",({_:e})=>({...ca({"--tw-ring-offset-shadow":"0 0 #0000","--tw-ring-shadow":"0 0 #0000","--tw-shadow":"0 0 #0000","--tw-shadow-colored":"0 0 #0000"}),"--tw-shadow":rr(e),"--tw-shadow-colored":rr(e).replace(/([^,]\s+)(?:#[a-f\d]+|(?:(?:hsl|rgb)a?|hwb|lab|lch|color|var)\(.+?\)|[a-z]+)(,|$)/g,"$1var(--tw-shadow-color)$2"),boxShadow:"var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)"})),ie("(opacity)-"),re("mix-blend-","mixBlendMode"),...t3(),...t3("backdrop-"),ie("transition(?:$|-)","transitionProperty",(e,{theme:t})=>({transitionProperty:rr(e),transitionTimingFunction:e._=="none"?void 0:rr(t("transitionTimingFunction","")),transitionDuration:e._=="none"?void 0:rr(t("transitionDuration",""))})),ie("duration(?:$|-)","transitionDuration","transitionDuration",rr),ie("ease(?:$|-)","transitionTimingFunction","transitionTimingFunction",rr),ie("delay(?:$|-)","transitionDelay","transitionDelay",rr),ie("animate(?:$|-)","animation",(e,{theme:t,h:n,e:r})=>{let a=rr(e),o=a.split(" "),i=t("keyframes",o[0]);return i?{["@keyframes "+(o[0]=r(n(o[0])))]:i,animation:o.join(" ")}:{animation:a}}),"(transform)-(none)",re("transform",gd),re("transform-(cpu|gpu)",({1:e})=>({"--tw-transform":a3(e=="gpu")})),ie("scale(-[xy])?-","scale",({1:e,_:t})=>({["--tw-scale"+(e||"-x")]:t,["--tw-scale"+(e||"-y")]:t,...gd()})),ie("-?(rotate)-","rotate",cd),ie("-?(translate-[xy])-","translate",cd),ie("-?(skew-[xy])-","skew",cd),re("origin-(center|((top|bottom)(-(left|right))?)|left|right)","transformOrigin",Xu),"(appearance)-",ie("(columns)-"),"(columns)-(\\d+)","(break-(?:before|after|inside))-",ie("(cursor)-"),"(cursor)-",re("snap-(none)","scroll-snap-type"),re("snap-(x|y|both)",({1:e})=>({...ca({"--tw-scroll-snap-strictness":"proximity"}),"scroll-snap-type":e+" var(--tw-scroll-snap-strictness)"})),re("snap-(mandatory|proximity)","--tw-scroll-snap-strictness"),re("snap-(?:(start|end|center)|align-(none))","scroll-snap-align"),re("snap-(normal|always)","scroll-snap-stop"),re("scroll-(auto|smooth)","scroll-behavior"),ie("scroll-p([xytrbl])?(?:$|-)","padding",Zo("scroll-padding")),ie("-?scroll-m([xytrbl])?(?:$|-)","scroll-margin",Zo("scroll-margin")),re("touch-(auto|none|manipulation)","touch-action"),re("touch-(pinch-zoom|pan-(?:(x|left|right)|(y|up|down)))",({1:e,2:t,3:n})=>({...ca({"--tw-pan-x":"var(--tw-empty,/*!*/ /*!*/)","--tw-pan-y":"var(--tw-empty,/*!*/ /*!*/)","--tw-pinch-zoom":"var(--tw-empty,/*!*/ /*!*/)","--tw-touch-action":"var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)"}),[`--tw-${t?"pan-x":n?"pan-y":e}`]:e,"touch-action":"var(--tw-touch-action)"})),re("outline-none",{outline:"2px solid transparent","outline-offset":"2px"}),re("outline",{outlineStyle:"solid"}),re("outline-(dashed|dotted|double)","outlineStyle"),ie("-?(outline-offset)-"),Kt("outline-",{opacityVariable:!1,opacitySection:"opacity"}),ie("outline-","outlineWidth"),"(pointer-events)-",ie("(will-change)-"),"(will-change)-",["resize(?:-(none|x|y))?","resize",({1:e})=>({x:"horizontal",y:"vertical"})[e]||e||"both"],re("select-(none|text|all|auto)","userSelect"),Kt("fill-",{section:"fill",opacityVariable:!1,opacitySection:"opacity"}),Kt("stroke-",{section:"stroke",opacityVariable:!1,opacitySection:"opacity"}),ie("stroke-","strokeWidth"),re("sr-only",{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0,0,0,0)",borderWidth:"0"}),re("not-sr-only",{position:"static",width:"auto",height:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal",clip:"auto"})];function Xu(e){return(typeof e=="string"?e:e[1]).replace(/-/g," ").trim()}function Xf(e){return(typeof e=="string"?e:e[1]).replace("col","column")}function ro(e,t="-"){let n=[];for(let r of e)n.push({t:"top",r:"right",b:"bottom",l:"left"}[r]);return n.join(t)}function rr(e){return e&&""+(e._||e)}function e3({$$:e}){return({r:"flex-","":"flex-",w:"space-",u:"space-",n:"space-"}[e[3]||""]||"")+e}function Zo(e,t=""){return({1:n,_:r})=>{let a={x:"lr",y:"tb"}[n]||n+n;return a?{...ps(e+"-"+ro(a[0])+t,r),...ps(e+"-"+ro(a[1])+t,r)}:ps(e+t,r)}}function t3(e=""){let t=["blur","brightness","contrast","grayscale","hue-rotate","invert",e&&"opacity","saturate","sepia",!e&&"drop-shadow"].filter(Boolean),n={};for(let r of t)n[`--tw-${e}${r}`]="var(--tw-empty,/*!*/ /*!*/)";return n={...ca(n),[`${e}filter`]:t.map(r=>`var(--tw-${e}${r})`).join(" ")},[`(${e}filter)-(none)`,re(`${e}filter`,n),...t.map(r=>ie(`${r[0]=="h"?"-?":""}(${e}${r})(?:$|-)`,r,({1:a,_:o})=>({[`--tw-${a}`]:ct(o).map(i=>`${r}(${i})`).join(" "),...n})))]}function cd({1:e,_:t}){return{["--tw-"+e]:t,...gd()}}function gd(){return{...ca({"--tw-translate-x":"0","--tw-translate-y":"0","--tw-rotate":"0","--tw-skew-x":"0","--tw-skew-y":"0","--tw-scale-x":"1","--tw-scale-y":"1","--tw-transform":a3()}),transform:"var(--tw-transform)"}}function a3(e){return[e?"translate3d(var(--tw-translate-x),var(--tw-translate-y),0)":"translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y))","rotate(var(--tw-rotate))","skewX(var(--tw-skew-x))","skewY(var(--tw-skew-y))","scaleX(var(--tw-scale-x))","scaleY(var(--tw-scale-y))"].join(" ")}function n3({1:e,2:t}){return`${e} ${t} / ${e} ${t}`}function r3({1:e}){return`repeat(${e},minmax(0,1fr))`}function ca(e){return{"@layer defaults":{"*,::before,::after":e,"::backdrop":e}}}var pT=[["sticky","@supports ((position: -webkit-sticky) or (position:sticky))"],["motion-reduce","@media (prefers-reduced-motion:reduce)"],["motion-safe","@media (prefers-reduced-motion:no-preference)"],["print","@media print"],["(portrait|landscape)",({1:e})=>`@media (orientation:${e})`],["contrast-(more|less)",({1:e})=>`@media (prefers-contrast:${e})`],["(first-(letter|line)|placeholder|backdrop|before|after)",({1:e})=>`&::${e}`],["(marker|selection)",({1:e})=>`& *::${e},&::${e}`],["file","&::file-selector-button"],["(first|last|only)",({1:e})=>`&:${e}-child`],["even","&:nth-child(2n)"],["odd","&:nth-child(odd)"],["open","&[open]"],["(aria|data)-",({1:e,$$:t},n)=>t&&`&[${e}-${n.theme(e,t)||vr(t,"",n)||`${t}="true"`}]`],["((group|peer)(~[^-[]+)?)(-\\[(.+)]|[-[].+?)(\\/.+)?",({2:e,3:t="",4:n,5:r="",6:a=t},{e:o,h:i,v:s})=>{let u=Qo(r)||(n[0]=="["?n:s(n.slice(1)));return`${(u.includes("&")?u:"&"+u).replace(/&/g,`:merge(.${o(i(e+a))})`)}${e[0]=="p"?"~":" "}&`}],["(ltr|rtl)",({1:e})=>`[dir="${e}"] &`],["supports-",({$$:e},t)=>{if(e&&=t.theme("supports",e)||vr(e,"",t),e)return e.includes(":")||(e+=":var(--tw)"),/^\w*\s*\(/.test(e)||(e=`(${e})`),`@supports ${e.replace(/\b(and|or|not)\b/g," $1 ").trim()}`}],["max-",({$$:e},t)=>{if(e&&=t.theme("screens",e)||vr(e,"",t),typeof e=="string")return`@media not all and (min-width:${e})`}],["min-",({$$:e},t)=>(e&&=vr(e,"",t))&&`@media (min-width:${e})`],[/^\[(.+)]$/,({1:e})=>/[&@]/.test(e)&&Qo(e).replace(/[}]+$/,"").split("{")]];function fT({colors:e,disablePreflight:t}={}){return{preflight:t?void 0:gT,theme:{...dd,colors:{inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",...e}},variants:pT,rules:mT,finalize(n){return n.n&&n.d&&n.r.some(r=>/^&::(before|after)$/.test(r))&&!/(^|;)content:/.test(n.d)?{...n,d:"content:var(--tw-content);"+n.d}:n}}}var hT={50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a"},bT={50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827"},yT={50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b"},CT={50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717"},TT={50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917"},vT={50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d"},xT={50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12"},ET={50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f"},ST={50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12"},wT={50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314"},DT={50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d"},kT={50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b"},AT={50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a"},LT={50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63"},_T={50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e"},MT={50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a"},PT={50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81"},FT={50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95"},BT={50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87"},RT={50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75"},IT={50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843"},OT={50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337"},NT={__proto__:null,slate:hT,gray:bT,zinc:yT,neutral:CT,stone:TT,red:vT,orange:xT,amber:ET,yellow:ST,lime:wT,green:DT,emerald:kT,teal:AT,cyan:LT,sky:_T,blue:MT,indigo:PT,violet:FT,purple:BT,fuchsia:RT,pink:IT,rose:OT};function el({disablePreflight:e}={}){return fT({colors:NT,disablePreflight:e})}m();m();var tl=globalThis||(typeof window<"u"?window:self),UT=Object.create,pd=Object.defineProperty,jT=Object.getOwnPropertyDescriptor,HT=Object.getOwnPropertyNames,zT=Object.getPrototypeOf,qT=Object.prototype.hasOwnProperty,WT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$T=(e,t)=>{for(var n in t)pd(e,n,{get:t[n],enumerable:!0})},md=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of HT(t))!qT.call(e,a)&&a!==n&&pd(e,a,{get:()=>t[a],enumerable:!(r=jT(t,a))||r.enumerable});return e},VT=(e,t,n)=>(md(e,t,"default"),n&&md(n,t,"default")),i3=(e,t,n)=>(n=e!=null?UT(zT(e)):{},md(t||!e||!e.__esModule?pd(n,"default",{value:e,enumerable:!0}):n,e)),s3=WT((e,t)=>{(function(n,r){typeof define=="function"&&define.amd?define([],r):typeof e<"u"?r():(r(),n.FileSaver={})})(e,function(){"use strict";function n(l,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function r(l,c,g){var p=new XMLHttpRequest;p.open("GET",l),p.responseType="blob",p.onload=function(){u(p.response,c,g)},p.onerror=function(){},p.send()}function a(l){var c=new XMLHttpRequest;c.open("HEAD",l,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof tl=="object"&&tl.global===tl?tl:void 0,s=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,c,g){var p=i.URL||i.webkitURL,f=document.createElement("a");c=c||l.name||"download",f.download=c,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?o(f):a(f.href)?r(l,c,g):o(f,f.target="_blank")):(f.href=p.createObjectURL(l),setTimeout(function(){p.revokeObjectURL(f.href)},4e4),setTimeout(function(){o(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,c,g){if(c=c||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(n(l,g),c);else if(a(l))r(l,c,g);else{var p=document.createElement("a");p.href=l,p.target="_blank",setTimeout(function(){o(p)})}}:function(l,c,g,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof l=="string")return r(l,c,g);var f=l.type==="application/octet-stream",h=/constructor/i.test(i.HTMLElement)||i.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||f&&h||s)&&typeof FileReader<"u"){var C=new FileReader;C.onloadend=function(){var S=C.result;S=y?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=S:location=S,p=null},C.readAsDataURL(l)}else{var b=i.URL||i.webkitURL,x=b.createObjectURL(l);p?p.location=x:location.href=x,p=null,setTimeout(function(){b.revokeObjectURL(x)},4e4)}});i.saveAs=u.saveAs=u,typeof t<"u"&&(t.exports=u)})}),u3={};$T(u3,{default:()=>ao});var KT=i3(s3());VT(u3,i3(s3()));var{default:o3,...GT}=KT,ao=o3!==void 0?o3:GT;m();m();m();m();m();m();m();function Xo(){let e,t="pending",n=new Promise((r,a)=>{e={async resolve(o){await o,t="fulfilled",r(o)},reject(o){t="rejected",a(o)}}});return Object.defineProperty(n,"state",{get:()=>t}),Object.assign(n,e)}m();var fd=class extends Error{constructor(){super("Deadline"),this.name="DeadlineError"}};function nl(e,t){let n=Xo(),r=setTimeout(()=>n.reject(new fd),t);return Promise.race([e,n]).finally(()=>clearTimeout(r))}m();m();function xn(e,t={}){let{signal:n,persistent:r}=t;return n?.aborted?Promise.reject(new DOMException("Delay was aborted.","AbortError")):new Promise((a,o)=>{let i=()=>{clearTimeout(u),o(new DOMException("Delay was aborted.","AbortError"))},u=setTimeout(()=>{n?.removeEventListener("abort",i),a()},e);if(n?.addEventListener("abort",i,{once:!0}),r===!1)try{Deno.unrefTimer(u)}catch(l){if(!(l instanceof ReferenceError))throw l}})}m();var l3=class{#e=0;#t=[];#n=[];#r=Xo();add(t){++this.#e,this.#a(t[Symbol.asyncIterator]())}async#a(t){try{let{value:n,done:r}=await t.next();r?--this.#e:this.#t.push({iterator:t,value:n})}catch(n){this.#n.push(n)}this.#r.resolve()}async*iterate(){for(;this.#e>0;){await this.#r;for(let t=0;tv8,bgBlue:()=>w8,bgBrightBlack:()=>L8,bgBrightBlue:()=>F8,bgBrightCyan:()=>R8,bgBrightGreen:()=>M8,bgBrightMagenta:()=>B8,bgBrightRed:()=>_8,bgBrightWhite:()=>I8,bgBrightYellow:()=>P8,bgCyan:()=>k8,bgGreen:()=>E8,bgMagenta:()=>D8,bgRed:()=>x8,bgRgb24:()=>j8,bgRgb8:()=>N8,bgWhite:()=>A8,bgYellow:()=>S8,black:()=>o8,blue:()=>l8,bold:()=>ZT,brightBlack:()=>g3,brightBlue:()=>b8,brightCyan:()=>C8,brightGreen:()=>f8,brightMagenta:()=>y8,brightRed:()=>p8,brightWhite:()=>T8,brightYellow:()=>h8,cyan:()=>d8,dim:()=>XT,getColorEnabled:()=>JT,gray:()=>m8,green:()=>s8,hidden:()=>r8,inverse:()=>n8,italic:()=>e8,magenta:()=>c8,red:()=>i8,reset:()=>QT,rgb24:()=>U8,rgb8:()=>O8,setColorEnabled:()=>YT,strikethrough:()=>a8,stripColor:()=>z8,underline:()=>t8,white:()=>g8,yellow:()=>u8});m();var{Deno:c3}=globalThis,d3=typeof c3?.noColor=="boolean"?c3.noColor:!0,hd=!d3;function YT(e){d3||(hd=e)}function JT(){return hd}function _e(e,t){return{open:`\x1B[${e.join(";")}m`,close:`\x1B[${t}m`,regexp:new RegExp(`\\x1b\\[${t}m`,"g")}}function Me(e,t){return hd?`${t.open}${e.replace(t.regexp,t.open)}${t.close}`:e}function QT(e){return Me(e,_e([0],0))}function ZT(e){return Me(e,_e([1],22))}function XT(e){return Me(e,_e([2],22))}function e8(e){return Me(e,_e([3],23))}function t8(e){return Me(e,_e([4],24))}function n8(e){return Me(e,_e([7],27))}function r8(e){return Me(e,_e([8],28))}function a8(e){return Me(e,_e([9],29))}function o8(e){return Me(e,_e([30],39))}function i8(e){return Me(e,_e([31],39))}function s8(e){return Me(e,_e([32],39))}function u8(e){return Me(e,_e([33],39))}function l8(e){return Me(e,_e([34],39))}function c8(e){return Me(e,_e([35],39))}function d8(e){return Me(e,_e([36],39))}function g8(e){return Me(e,_e([37],39))}function m8(e){return g3(e)}function g3(e){return Me(e,_e([90],39))}function p8(e){return Me(e,_e([91],39))}function f8(e){return Me(e,_e([92],39))}function h8(e){return Me(e,_e([93],39))}function b8(e){return Me(e,_e([94],39))}function y8(e){return Me(e,_e([95],39))}function C8(e){return Me(e,_e([96],39))}function T8(e){return Me(e,_e([97],39))}function v8(e){return Me(e,_e([40],49))}function x8(e){return Me(e,_e([41],49))}function E8(e){return Me(e,_e([42],49))}function S8(e){return Me(e,_e([43],49))}function w8(e){return Me(e,_e([44],49))}function D8(e){return Me(e,_e([45],49))}function k8(e){return Me(e,_e([46],49))}function A8(e){return Me(e,_e([47],49))}function L8(e){return Me(e,_e([100],49))}function _8(e){return Me(e,_e([101],49))}function M8(e){return Me(e,_e([102],49))}function P8(e){return Me(e,_e([103],49))}function F8(e){return Me(e,_e([104],49))}function B8(e){return Me(e,_e([105],49))}function R8(e){return Me(e,_e([106],49))}function I8(e){return Me(e,_e([107],49))}function da(e,t=255,n=0){return Math.trunc(Math.max(Math.min(e,t),n))}function O8(e,t){return Me(e,_e([38,5,da(t)],39))}function N8(e,t){return Me(e,_e([48,5,da(t)],49))}function U8(e,t){return typeof t=="number"?Me(e,_e([38,2,t>>16&255,t>>8&255,t&255],39)):Me(e,_e([38,2,da(t.r),da(t.g),da(t.b)],39))}function j8(e,t){return typeof t=="number"?Me(e,_e([48,2,t>>16&255,t>>8&255,t&255],49)):Me(e,_e([48,2,da(t.r),da(t.g),da(t.b)],49))}var H8=new RegExp(["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|"),"g");function z8(e){return e.replace(H8,"")}m();m();var bd=class extends Error{constructor(t,n){super(`Exceeded max retry count (${n})`),this.name="RetryError",this.cause=t}},q8={multiplier:2,maxTimeout:6e4,maxAttempts:5,minTimeout:1e3};async function yd(e,t){let n={...q8,...t};if(n.maxTimeout>=0&&n.minTimeout>n.maxTimeout)throw new RangeError("minTimeout is greater than maxTimeout");let r=n.minTimeout,a;for(let o=0;osetTimeout(s,r)),r*=n.multiplier,r=Math.max(r,n.minTimeout),n.maxTimeout>=0&&(r=Math.min(r,n.maxTimeout)),a=i}throw new bd(a,n.maxAttempts)}m();var Ur=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9","+","/"];function Cd(e){let t=typeof e=="string"?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n="",r,a=t.length;for(r=2;r>2],n+=Ur[(t[r-2]&3)<<4|t[r-1]>>4],n+=Ur[(t[r-1]&15)<<2|t[r]>>6],n+=Ur[t[r]&63];return r===a+1&&(n+=Ur[t[r-2]>>2],n+=Ur[(t[r-2]&3)<<4],n+="=="),r===a&&(n+=Ur[t[r-2]>>2],n+=Ur[(t[r-2]&3)<<4|t[r-1]>>4],n+=Ur[(t[r-1]&15)<<2],n+="="),n}m();m();var W8=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,$8=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,V8=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Td={Space_Separator:W8,ID_Start:$8,ID_Continue:V8},Rt={isSpaceSeparator(e){return typeof e=="string"&&Td.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Td.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e==="\u200C"||e==="\u200D"||Td.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}},xd,En,Hr,al,ga,ar,en,wd,ys,K8=function(e,t){xd=String(e),En="start",Hr=[],al=0,ga=1,ar=0,en=void 0,wd=void 0,ys=void 0;do en=G8(),Q8[En]();while(en.type!=="eof");return typeof t=="function"?Ed({"":ys},"",t):ys};function Ed(e,t,n){let r=e[t];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let a=0;a0;){let n=zr();if(!Rt.isHexDigit(n))throw Ct(G());e+=G()}return String.fromCodePoint(parseInt(e,16))}var Q8={start(){if(Xt.type==="eof")throw io();xd()},beforePropertyName(){switch(Xt.type){case"identifier":case"string":Dd=Xt.value,En="afterPropertyName";return;case"punctuator":rl();return;case"eof":throw io()}},afterPropertyName(){if(Xt.type==="eof")throw io();En="beforePropertyValue"},beforePropertyValue(){if(Xt.type==="eof")throw io();xd()},beforeArrayValue(){if(Xt.type==="eof")throw io();if(Xt.type==="punctuator"&&Xt.value==="]"){rl();return}xd()},afterPropertyValue(){if(Xt.type==="eof")throw io();switch(Xt.value){case",":En="beforePropertyName";return;case"}":rl()}},afterArrayValue(){if(Xt.type==="eof")throw io();switch(Xt.value){case",":En="beforeArrayValue";return;case"]":rl()}},end(){}};function xd(){let e;switch(Xt.type){case"punctuator":switch(Xt.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=Xt.value;break}if(bs===void 0)bs=e;else{let t=Hr[Hr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,Dd,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Hr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Hr[Hr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function rl(){Hr.pop();let e=Hr[Hr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function Ct(e){return kd(e===void 0?`JSON5: invalid end of input at ${ga}:${ar}`:`JSON5: invalid character '${Z8(e)}' at ${ga}:${ar}`)}function io(){return kd(`JSON5: invalid end of input at ${ga}:${ar}`)}function m3(){return ar-=5,kd(`JSON5: invalid identifier character at ${ga}:${ar}`)}function Z8(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function kd(e){let t=new SyntaxError(e);return t.lineNumber=ga,t.columnNumber=ar,t}var X8=function(e,t,n){let r=[],a="",o,i,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")i=t;else if(Array.isArray(t)){o=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&o.indexOf(y)<0&&o.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let C=y[h];switch(C!=null&&(typeof C.toJSON5=="function"?C=C.toJSON5(h):typeof C.toJSON=="function"&&(C=C.toJSON(h))),i&&(C=i.call(y,h,C)),C instanceof Number?C=Number(C):C instanceof String?C=String(C):C instanceof Boolean&&(C=C.valueOf()),C){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof C=="string")return c(C,!1);if(typeof C=="number")return String(C);if(typeof C=="object")return Array.isArray(C)?f(C):g(C)}function c(h){let y={"'":.1,'"':.2},C={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let S=0;Sy[S]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let C=o||Object.keys(h),b=[];for(let S of C){let A=l(S,h);if(A!==void 0){let P=p(S)+":";s!==""&&(P+=" "),P+=A,b.push(P)}}let x;if(b.length===0)x="{}";else{let S;if(s==="")S=b.join(","),x="{"+S+"}";else{let A=`, +`&&G(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw Ct(G());case void 0:throw Ct(G())}return G()}function J8(){let e="",t=zr();if(!Rt.isHexDigit(t)||(e+=G(),t=zr(),!Rt.isHexDigit(t)))throw Ct(G());return e+=G(),String.fromCodePoint(parseInt(e,16))}function Sd(){let e="",t=4;for(;t-- >0;){let n=zr();if(!Rt.isHexDigit(n))throw Ct(G());e+=G()}return String.fromCodePoint(parseInt(e,16))}var Q8={start(){if(en.type==="eof")throw io();vd()},beforePropertyName(){switch(en.type){case"identifier":case"string":wd=en.value,En="afterPropertyName";return;case"punctuator":rl();return;case"eof":throw io()}},afterPropertyName(){if(en.type==="eof")throw io();En="beforePropertyValue"},beforePropertyValue(){if(en.type==="eof")throw io();vd()},beforeArrayValue(){if(en.type==="eof")throw io();if(en.type==="punctuator"&&en.value==="]"){rl();return}vd()},afterPropertyValue(){if(en.type==="eof")throw io();switch(en.value){case",":En="beforePropertyName";return;case"}":rl()}},afterArrayValue(){if(en.type==="eof")throw io();switch(en.value){case",":En="beforeArrayValue";return;case"]":rl()}},end(){}};function vd(){let e;switch(en.type){case"punctuator":switch(en.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=en.value;break}if(ys===void 0)ys=e;else{let t=Hr[Hr.length-1];Array.isArray(t)?t.push(e):Object.defineProperty(t,wd,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")Hr.push(e),Array.isArray(e)?En="beforeArrayValue":En="beforePropertyName";else{let t=Hr[Hr.length-1];t==null?En="end":Array.isArray(t)?En="afterArrayValue":En="afterPropertyValue"}}function rl(){Hr.pop();let e=Hr[Hr.length-1];e==null?En="end":Array.isArray(e)?En="afterArrayValue":En="afterPropertyValue"}function Ct(e){return Dd(e===void 0?`JSON5: invalid end of input at ${ga}:${ar}`:`JSON5: invalid character '${Z8(e)}' at ${ga}:${ar}`)}function io(){return Dd(`JSON5: invalid end of input at ${ga}:${ar}`)}function m3(){return ar-=5,Dd(`JSON5: invalid identifier character at ${ga}:${ar}`)}function Z8(e){let t={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(t[e])return t[e];if(e<" "){let n=e.charCodeAt(0).toString(16);return"\\x"+("00"+n).substring(n.length)}return e}function Dd(e){let t=new SyntaxError(e);return t.lineNumber=ga,t.columnNumber=ar,t}var X8=function(e,t,n){let r=[],a="",o,i,s="",u;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(n=t.space,u=t.quote,t=t.replacer),typeof t=="function")i=t;else if(Array.isArray(t)){o=[];for(let h of t){let y;typeof h=="string"?y=h:(typeof h=="number"||h instanceof String||h instanceof Number)&&(y=String(h)),y!==void 0&&o.indexOf(y)<0&&o.push(y)}}return n instanceof Number?n=Number(n):n instanceof String&&(n=String(n)),typeof n=="number"?n>0&&(n=Math.min(10,Math.floor(n)),s=" ".substr(0,n)):typeof n=="string"&&(s=n.substr(0,10)),l("",{"":e});function l(h,y){let C=y[h];switch(C!=null&&(typeof C.toJSON5=="function"?C=C.toJSON5(h):typeof C.toJSON=="function"&&(C=C.toJSON(h))),i&&(C=i.call(y,h,C)),C instanceof Number?C=Number(C):C instanceof String?C=String(C):C instanceof Boolean&&(C=C.valueOf()),C){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof C=="string")return c(C,!1);if(typeof C=="number")return String(C);if(typeof C=="object")return Array.isArray(C)?f(C):g(C)}function c(h){let y={"'":.1,'"':.2},C={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"},b="";for(let S=0;Sy[S]=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let C=o||Object.keys(h),b=[];for(let S of C){let A=l(S,h);if(A!==void 0){let P=p(S)+":";s!==""&&(P+=" "),P+=A,b.push(P)}}let x;if(b.length===0)x="{}";else{let S;if(s==="")S=b.join(","),x="{"+S+"}";else{let A=`, `+a;S=b.join(A),x=`{ `+a+S+`, `+y+"}"}}return r.pop(),a=y,x}function p(h){if(h.length===0)return c(h,!0);let y=String.fromCodePoint(h.codePointAt(0));if(!Rt.isIdStartChar(y))return c(h,!0);for(let C=y.length;C=0)throw TypeError("Converting circular structure to JSON5");r.push(h);let y=a;a=a+s;let C=[];for(let x=0;x()=>(t||e((t={exports:{}}).exports,t),t.exports),lv=(e,t)=>{for(var n in t)Ld(e,n,{get:t[n],enumerable:!0})},Ad=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ov(t))!sv.call(e,a)&&a!==n&&Ld(e,a,{get:()=>t[a],enumerable:!(r=av(t,a))||r.enumerable});return e},cv=(e,t,n)=>(Ad(e,t,"default"),n&&Ad(n,t,"default")),h3=(e,t,n)=>(n=e!=null?rv(iv(e)):{},Ad(t||!e||!e.__esModule?Ld(n,"default",{value:e,enumerable:!0}):n,e)),b3=uv((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof il=="object"&&il&&il.Object===Object&&il,g=typeof self=="object"&&self&&self.Object===Object&&self,p=c||g||Function("return this")(),f=Object.prototype,h=f.toString,y=Math.max,C=Math.min,b=function(){return p.Date.now()};function x(L,D,T){var j,R,M,O,N,H,B=0,k=!1,_=!1,F=!0;if(typeof L!="function")throw new TypeError(n);D=v(D)||0,A(T)&&(k=!!T.leading,_="maxWait"in T,M=_?y(v(T.maxWait)||0,D):M,F="trailing"in T?!!T.trailing:F);function q(ae){var X=j,ve=R;return j=R=void 0,B=ae,O=L.apply(ve,X),O}function z(ae){return B=ae,N=setTimeout(oe,D),k?q(ae):O}function V(ae){var X=ae-H,ve=ae-B,se=D-X;return _?C(se,M-ve):se}function K(ae){var X=ae-H,ve=ae-B;return H===void 0||X>=D||X<0||_&&ve>=M}function oe(){var ae=b();if(K(ae))return te(ae);N=setTimeout(oe,V(ae))}function te(ae){return N=void 0,F&&j?q(ae):(j=R=void 0,O)}function Z(){N!==void 0&&clearTimeout(N),B=0,j=H=R=N=void 0}function ce(){return N===void 0?O:te(b())}function he(){var ae=b(),X=K(ae);if(j=arguments,R=this,H=ae,X){if(N===void 0)return z(H);if(_)return N=setTimeout(oe,D),q(H)}return N===void 0&&(N=setTimeout(oe,D)),O}return he.cancel=Z,he.flush=ce,he}function S(L,D,T){var j=!0,R=!0;if(typeof L!="function")throw new TypeError(n);return A(T)&&(j="leading"in T?!!T.leading:j,R="trailing"in T?!!T.trailing:R),x(L,D,{leading:j,maxWait:D,trailing:R})}function A(L){var D=typeof L;return!!L&&(D=="object"||D=="function")}function P(L){return!!L&&typeof L=="object"}function w(L){return typeof L=="symbol"||P(L)&&h.call(L)==a}function v(L){if(typeof L=="number")return L;if(w(L))return r;if(A(L)){var D=typeof L.valueOf=="function"?L.valueOf():L;L=A(D)?D+"":D}if(typeof L!="string")return L===0?L:+L;L=L.replace(o,"");var T=s.test(L);return T||u.test(L)?l(L.slice(2),T?2:8):i.test(L)?r:+L}t.exports=S}),y3={};lv(y3,{default:()=>or});var dv=h3(b3());cv(y3,h3(b3()));var{default:f3,...gv}=dv,or=f3!==void 0?f3:gv;m();m();var sl=globalThis||(typeof window<"u"?window:self),mv=Object.create,Md=Object.defineProperty,pv=Object.getOwnPropertyDescriptor,fv=Object.getOwnPropertyNames,hv=Object.getPrototypeOf,bv=Object.prototype.hasOwnProperty,yv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cv=(e,t)=>{for(var n in t)Md(e,n,{get:t[n],enumerable:!0})},_d=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fv(t))!bv.call(e,a)&&a!==n&&Md(e,a,{get:()=>t[a],enumerable:!(r=pv(t,a))||r.enumerable});return e},Tv=(e,t,n)=>(_d(e,t,"default"),n&&_d(n,t,"default")),T3=(e,t,n)=>(n=e!=null?mv(hv(e)):{},_d(t||!e||!e.__esModule?Md(n,"default",{value:e,enumerable:!0}):n,e)),v3=yv((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof sl=="object"&&sl&&sl.Object===Object&&sl,g=typeof self=="object"&&self&&self.Object===Object&&self,p=c||g||Function("return this")(),f=Object.prototype,h=f.toString,y=Math.max,C=Math.min,b=function(){return p.Date.now()};function x(v,L,D){var T,j,R,M,O,N,H=0,B=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);L=w(L)||0,S(D)&&(B=!!D.leading,k="maxWait"in D,R=k?y(w(D.maxWait)||0,L):R,_="trailing"in D?!!D.trailing:_);function F(he){var ae=T,X=j;return T=j=void 0,H=he,M=v.apply(X,ae),M}function q(he){return H=he,O=setTimeout(K,L),B?F(he):M}function z(he){var ae=he-N,X=he-H,ve=L-ae;return k?C(ve,R-X):ve}function V(he){var ae=he-N,X=he-H;return N===void 0||ae>=L||ae<0||k&&X>=R}function K(){var he=b();if(V(he))return oe(he);O=setTimeout(K,z(he))}function oe(he){return O=void 0,_&&T?F(he):(T=j=void 0,M)}function te(){O!==void 0&&clearTimeout(O),H=0,T=N=j=O=void 0}function Z(){return O===void 0?M:oe(b())}function ce(){var he=b(),ae=V(he);if(T=arguments,j=this,N=he,ae){if(O===void 0)return q(N);if(k)return O=setTimeout(K,L),F(N)}return O===void 0&&(O=setTimeout(K,L)),M}return ce.cancel=te,ce.flush=Z,ce}function S(v){var L=typeof v;return!!v&&(L=="object"||L=="function")}function A(v){return!!v&&typeof v=="object"}function P(v){return typeof v=="symbol"||A(v)&&h.call(v)==a}function w(v){if(typeof v=="number")return v;if(P(v))return r;if(S(v)){var L=typeof v.valueOf=="function"?v.valueOf():v;v=S(L)?L+"":L}if(typeof v!="string")return v===0?v:+v;v=v.replace(o,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):i.test(v)?r:+v}t.exports=x}),x3={};Cv(x3,{default:()=>ys});var vv=T3(v3());Tv(x3,T3(v3()));var{default:C3,...xv}=vv,ys=C3!==void 0?C3:xv;m();m();var Ev=Object.create,Fd=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,wv=Object.getOwnPropertyNames,Dv=Object.getPrototypeOf,kv=Object.prototype.hasOwnProperty,Av=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lv=(e,t)=>{for(var n in t)Fd(e,n,{get:t[n],enumerable:!0})},Pd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of wv(t))!kv.call(e,a)&&a!==n&&Fd(e,a,{get:()=>t[a],enumerable:!(r=Sv(t,a))||r.enumerable});return e},_v=(e,t,n)=>(Pd(e,t,"default"),n&&Pd(n,t,"default")),S3=(e,t,n)=>(n=e!=null?Ev(Dv(e)):{},Pd(t||!e||!e.__esModule?Fd(n,"default",{value:e,enumerable:!0}):n,e)),w3=Av((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(o){if(a[o])return a[o].exports;var i=a[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var a={};return r.m=n,r.c=a,r.i=function(o){return o},r.d=function(o,i,s){r.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:s})},r.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(i,"a",i),i},r.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(o){var i,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(o)==="object"?o.exports=g():(s=[],i=g,u=typeof i=="function"?i.apply(r,s):i,u!==void 0&&(o.exports=u))})(void 0,function(){return function(c){function g(f){if(p[f])return p[f].exports;var h=p[f]={i:f,l:!1,exports:{}};return c[f].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var p={};return g.m=c,g.c=p,g.i=function(f){return f},g.d=function(f,h,y){g.o(f,h)||Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(f){var h=f&&f.__esModule?function(){return f.default}:function(){return f};return g.d(h,"a",h),h},g.o=function(f,h){return Object.prototype.hasOwnProperty.call(f,h)},g.p="",g(g.s=0)}([function(c,g,p){function f(z,V){var K={};for(var oe in z)V.indexOf(oe)>=0||Object.prototype.hasOwnProperty.call(z,oe)&&(K[oe]=z[oe]);return K}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(z){return typeof z>"u"?"undefined":l(z)}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z>"u"?"undefined":l(z)},y=Object.assign||function(z){for(var V=1;V'+oe+"
",ve.onclick=function(){return R(se,X)},ve.listener=function(ue){(D(ue)||T(ue))&&N()},j(ve,X),Z&&Z<1&&(Z=1),!he&&Z&&A(Z).then(function(){return R(se,X)})},B=g.force=function(z,V){var K=z.type,oe=K===void 0?5:K,te=z.text,Z=z.buttonText,ce=Z===void 0?"OK":Z,he=z.callback,ae=z.position,X=ae===void 0?b.positions.force||X.top:ae;P(),N();var ve=document.createElement("div"),se=w();ve.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var De=document.createElement("div");De.classList.add(b.classes.button),De.classList.add(v[oe]),De.innerHTML=ce,De.onclick=function(){R(se,X),O(),he?he():V&&V()},ve.appendChild(ue),ve.appendChild(De),ve.listener=function(He){D(He)&&De.click()},j(ve,X),M()},k=g.confirm=function(z,V,K){var oe=z.text,te=z.submitText,Z=te===void 0?"Yes":te,ce=z.cancelText,he=ce===void 0?"Cancel":ce,ae=z.submitCallback,X=z.cancelCallback,ve=z.position,se=ve===void 0?b.positions.confirm||se.top:ve;P(),N();var ue=document.createElement("div"),De=w();ue.id=De;var He=document.createElement("div");He.classList.add(b.classes.textbox),He.classList.add(b.classes.backgroundInfo),He.innerHTML='
'+oe+"
";var Fe=document.createElement("div");Fe.classList.add(b.classes.button),Fe.classList.add(b.classes.elementHalf),Fe.classList.add(b.classes.backgroundSuccess),Fe.innerHTML=Z,Fe.onclick=function(){R(De,se),O(),ae?ae():V&&V()};var pe=document.createElement("div");pe.classList.add(b.classes.button),pe.classList.add(b.classes.elementHalf),pe.classList.add(b.classes.backgroundError),pe.innerHTML=he,pe.onclick=function(){R(De,se),O(),X?X():K&&K()},ue.appendChild(He),ue.appendChild(Fe),ue.appendChild(pe),ue.listener=function(Et){D(Et)?Fe.click():T(Et)&&pe.click()},j(ue,se),M(ue,se)},_=function(z,V,K){var oe=z.text,te=z.submitText,Z=te===void 0?"Submit":te,ce=z.cancelText,he=ce===void 0?"Cancel":ce,ae=z.submitCallback,X=z.cancelCallback,ve=z.position,se=ve===void 0?b.positions.input||se.top:ve,ue=f(z,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);P(),N();var De=document.createElement("div"),He=w();De.id=He;var Fe=document.createElement("div");Fe.classList.add(b.classes.textbox),Fe.classList.add(b.classes.backgroundInfo),Fe.innerHTML='
'+oe+"
";var pe=document.createElement("input");pe.classList.add(b.classes.inputField),pe.setAttribute("autocapitalize",ue.autocapitalize||"none"),pe.setAttribute("autocomplete",ue.autocomplete||"off"),pe.setAttribute("autocorrect",ue.autocorrect||"off"),pe.setAttribute("autofocus",ue.autofocus||"true"),pe.setAttribute("inputmode",ue.inputmode||"verbatim"),pe.setAttribute("max",ue.max||""),pe.setAttribute("maxlength",ue.maxlength||""),pe.setAttribute("min",ue.min||""),pe.setAttribute("minlength",ue.minlength||""),pe.setAttribute("placeholder",ue.placeholder||""),pe.setAttribute("spellcheck",ue.spellcheck||"default"),pe.setAttribute("step",ue.step||"any"),pe.setAttribute("type",ue.type||"text"),pe.value=ue.value||"",ue.allowed&&(pe.oninput=function(){var At=void 0;if(Array.isArray(ue.allowed)){for(var Ft="",Cn=ue.allowed,Vn=0;Vn'+K+"",X.appendChild(se),ce.forEach(function(De,He){var Fe=De.type,pe=Fe===void 0?1:Fe,Et=De.text,$t=De.handler,At=document.createElement("div");At.classList.add(v[pe]),At.classList.add(b.classes.button),At.classList.add(b.classes.selectChoice);var Ft=ce[He+1];Ft&&!Ft.type&&(Ft.type=1),Ft&&Ft.type===pe&&At.classList.add(b.classes.selectChoiceRepeated),At.innerHTML=Et,At.onclick=function(){R(ve,ae),O(),$t()},X.appendChild(At)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){R(ve,ae),O(),Z?Z():V&&V()},X.appendChild(ue),X.listener=function(De){T(De)&&ue.click()},j(X,ae),M(X,ae)},q=g.date=function(z,V,K){var oe=z.value,te=oe===void 0?new Date:oe,Z=z.submitText,ce=Z===void 0?"OK":Z,he=z.cancelText,ae=he===void 0?"Cancel":he,X=z.submitCallback,ve=z.cancelCallback,se=z.position,ue=se===void 0?b.positions.date||ue.top:se;P(),N();var De="▾",He=document.createElement("div"),Fe=document.createElement("div"),pe=document.createElement("div"),Et=function(St){He.innerHTML=b.dateMonths[St.getMonth()],Fe.innerHTML=St.getDate(),pe.innerHTML=St.getFullYear()},$t=function(St){var et=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),Un=St.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Un)>et&&(Un=et.toString()),St.target.textContent=Un,Number(Un)<1&&(Un="1"),te.setDate(Number(Un))},At=function(St){var et=St.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);St.target.textContent=et,te.setFullYear(Number(et))},Ft=function(St){Et(te)},Cn=function(St){var et=new Date(te.getFullYear(),te.getMonth()+St+1,0).getDate();te.getDate()>et&&te.setDate(et),te.setMonth(te.getMonth()+St),Et(te)},Vn=function(St){te.setDate(te.getDate()+St),Et(te)},os=function(St){var et=te.getFullYear()+St;et<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+St),Et(te)},Tr=document.createElement("div"),eo=w();Tr.id=eo;var $o=document.createElement("div");$o.classList.add(b.classes.backgroundInfo);var cn=document.createElement("div");cn.classList.add(b.classes.dateSelectorInner);var nr=document.createElement("div");nr.classList.add(b.classes.button),nr.classList.add(b.classes.elementThird),nr.classList.add(b.classes.dateSelectorUp),nr.innerHTML=De;var dn=document.createElement("div");dn.classList.add(b.classes.button),dn.classList.add(b.classes.elementThird),dn.classList.add(b.classes.dateSelectorUp),dn.innerHTML=De;var Nn=document.createElement("div");Nn.classList.add(b.classes.button),Nn.classList.add(b.classes.elementThird),Nn.classList.add(b.classes.dateSelectorUp),Nn.innerHTML=De,He.classList.add(b.classes.element),He.classList.add(b.classes.elementThird),He.innerHTML=b.dateMonths[te.getMonth()],Fe.classList.add(b.classes.element),Fe.classList.add(b.classes.elementThird),Fe.setAttribute("contentEditable",!0),Fe.addEventListener("input",$t),Fe.addEventListener("blur",Ft),Fe.innerHTML=te.getDate(),pe.classList.add(b.classes.element),pe.classList.add(b.classes.elementThird),pe.setAttribute("contentEditable",!0),pe.addEventListener("input",At),pe.addEventListener("blur",Ft),pe.innerHTML=te.getFullYear();var Br=document.createElement("div");Br.classList.add(b.classes.button),Br.classList.add(b.classes.elementThird),Br.innerHTML=De;var Rr=document.createElement("div");Rr.classList.add(b.classes.button),Rr.classList.add(b.classes.elementThird),Rr.innerHTML=De;var to=document.createElement("div");to.classList.add(b.classes.button),to.classList.add(b.classes.elementThird),to.innerHTML=De,nr.onclick=function(){return Cn(1)},dn.onclick=function(){return Vn(1)},Nn.onclick=function(){return os(1)},Br.onclick=function(){return Cn(-1)},Rr.onclick=function(){return Vn(-1)},to.onclick=function(){return os(-1)};var Tn=document.createElement("div");Tn.classList.add(b.classes.button),Tn.classList.add(b.classes.elementHalf),Tn.classList.add(b.classes.backgroundSuccess),Tn.innerHTML=ce,Tn.onclick=function(){R(eo,ue),O(),X?X(te):V&&V(te)};var Ir=document.createElement("div");Ir.classList.add(b.classes.button),Ir.classList.add(b.classes.elementHalf),Ir.classList.add(b.classes.backgroundError),Ir.innerHTML=ae,Ir.onclick=function(){R(eo,ue),O(),ve?ve(te):K&&K(te)},cn.appendChild(nr),cn.appendChild(dn),cn.appendChild(Nn),cn.appendChild(He),cn.appendChild(Fe),cn.appendChild(pe),cn.appendChild(Br),cn.appendChild(Rr),cn.appendChild(to),$o.appendChild(cn),Tr.appendChild($o),Tr.appendChild(Tn),Tr.appendChild(Ir),Tr.listener=function(St){D(St)?Tn.click():T(St)&&Ir.click()},j(Tr,ue),M(Tr,ue)};g.default={alert:H,force:B,confirm:k,input:_,select:F,date:q,setOptions:x,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),D3={};Lv(D3,{default:()=>ul});var Mv=S3(w3());_v(D3,S3(w3()));var{default:E3,...Pv}=Mv,ul=E3!==void 0?E3:Pv;m();m();var ll=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Cs(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function Bd(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function k3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let o=0;oei[e.toLowerCase()]||ir[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),Fv=e=>Object.keys(ei).find(t=>ei[t]===e),Bv=e=>Object.keys(ir).find(t=>ir[t]===e);function F3(e){M3=e||"all"}function Ts(){return M3||"all"}function Rv(){return ct.slice(0)}function Iv(){return ct.map(e=>Fv(e)||Bv(e)||String.fromCharCode(e))}function Ov(){let e=[];return Object.keys(wt).forEach(t=>{wt[t].forEach(({key:n,scope:r,mods:a,shortcut:o})=>{e.push({scope:r,shortcut:o,mods:a,keys:n.split("+").map(i=>vs(i))})})}),e}function Nv(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function Uv(e){return typeof e=="string"&&(e=vs(e)),ct.indexOf(e)!==-1}function jv(e,t){let n,r;e||(e=Ts());for(let a in wt)if(Object.prototype.hasOwnProperty.call(wt,a))for(n=wt[a],r=0;r=0&&ct.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&ct.splice(0,ct.length),(t===93||t===224)&&(t=91),t in en){en[t]=!1;for(let r in ir)ir[r]===t&&(qr[r]=!1)}}function B3(e,...t){if(typeof e>"u")Object.keys(wt).forEach(n=>delete wt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&Id(n)});else if(typeof e=="object")e.key&&Id(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),Id({key:e,scope:n,method:r,splitKey:"+"})}}var Id=({key:e,scope:t,method:n,splitKey:r="+"})=>{Rd(e).forEach(o=>{let i=o.split(r),s=i.length,u=i[s-1],l=u==="*"?"*":vs(u);if(!wt[l])return;t||(t=Ts());let c=s>1?Bd(ir,i):[];wt[l]=wt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&k3(g.mods,c)))})};function L3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let o in en)Object.prototype.hasOwnProperty.call(en,o)&&(!en[o]&&t.mods.indexOf(+o)>-1||en[o]&&t.mods.indexOf(+o)===-1)&&(a=!1);(t.mods.length===0&&!en[16]&&!en[18]&&!en[17]&&!en[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(ct),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function _3(e,t){let n=wt["*"],r=e.keyCode||e.which||e.charCode;if(!qr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),ct.indexOf(r)===-1&&r!==229&&ct.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(o=>{let i=cl[o];e[o]&&ct.indexOf(i)===-1?ct.push(i):!e[o]&&ct.indexOf(i)>-1?ct.splice(ct.indexOf(i),1):o==="metaKey"&&e[o]&&ct.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(ct=ct.slice(ct.indexOf(i))))}),r in en){en[r]=!0;for(let o in ir)ir[o]===r&&(qr[o]=!0);if(!n)return}for(let o in en)Object.prototype.hasOwnProperty.call(en,o)&&(en[o]=e[cl[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(ct.indexOf(17)===-1&&ct.push(17),ct.indexOf(18)===-1&&ct.push(18),en[17]=!0,en[18]=!0);let a=Ts();if(n)for(let o=0;o-1}function qr(e,t,n){ct=[];let r=Rd(e),a=[],o="all",i=document,s=0,u=!1,l=!0,c="+",g=!1,p=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(i=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(o=t),p&&B3(e,o);s1&&(a=Bd(ir,e)),e=e[e.length-1],e=e==="*"?"*":vs(e),e in wt||(wt[e]=[]),wt[e].push({keyup:u,keydown:l,scope:o,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:i});typeof i<"u"&&!zv(i)&&window&&(P3.push(i),Cs(i,"keydown",f=>{_3(f,i)},g),A3||(A3=!0,Cs(window,"focus",()=>{ct=[]},g),Cs(window,"click",()=>{ct=[]},!1)),Cs(i,"keyup",f=>{_3(f,i),Hv(f)},g))}function qv(e,t="all"){Object.keys(wt).forEach(n=>{wt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var Od={getPressedKeyString:Iv,setScope:F3,getScope:Ts,deleteScope:jv,getPressedKeyCodes:Rv,getAllKeyCodes:Ov,isPressed:Uv,filter:Nv,trigger:qv,unbind:B3,keyMap:ei,modifier:ir,modifierMap:cl};for(let e in Od)Object.prototype.hasOwnProperty.call(Od,e)&&(qr[e]=Od[e]);if(typeof window<"u"){let e=window.hotkeys;qr.noConflict=t=>(t&&window.hotkeys===qr&&(window.hotkeys=e),qr),window.hotkeys=qr}var Ut=qr;m();m();var Wv={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},It={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Sn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ma={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),o=Math.max(r,a),i=0,s=Y.map([e,t],u=>{let l=o-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(i=o-Math.min(r,a)),o-=1;o>=i;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===i)return 0;o-=1}else if(s[0][o]{n[i]=o[i]})}return e}static getBrowserAlias(e){return Wv[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},dt=/version\/(\d+(\.?_?\d+)+)/i,$v=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(dt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(dt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],Vv=$v,Kv=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Sn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Sn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:Sn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Sn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:Sn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Sn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:Sn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Sn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:Sn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Sn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Sn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Sn.Linux}}},{test:[/CrOS/],describe(){return{name:Sn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Sn.PlayStation4,version:t}}}],Gv=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:It.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:It.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:It.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:It.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:It.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:It.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:It.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:It.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:It.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:It.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:It.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:It.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:It.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:It.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:It.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:It.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:It.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:It.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:It.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:It.tv}}}],Yv=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ma.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ma.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:ma.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:ma.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:ma.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ma.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:ma.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Jv=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(Vv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Kv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Gv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(Yv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?(r[o]=i,a+=1):typeof i=="object"&&(t[o]=i,n+=1)}),n>0){let o=Object.keys(t),i=Y.find(o,u=>this.isOS(u));if(i){let u=this.satisfies(t[i]);if(u!==void 0)return u}let s=Y.find(o,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let o=Object.keys(r),i=Y.find(o,s=>this.isBrowser(s,!0));if(i!==void 0)return this.compareVersion(r[i])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},R3=Jv,Qv=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new R3(e,t)}static parse(e){return new R3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return ma}static get OS_MAP(){return Sn}static get PLATFORMS_MAP(){return It}},ti=Qv;m();m();var{entries:W3,setPrototypeOf:O3,isFrozen:Zv,getPrototypeOf:Xv,getOwnPropertyDescriptor:ex}=Object,{freeze:wn,seal:ur,create:tx}=Object,{apply:qd,construct:Wd}=typeof Reflect<"u"&&Reflect;qd||(qd=function(e,t,n){return e.apply(t,n)});wn||(wn=function(e){return e});ur||(ur=function(e){return e});Wd||(Wd=function(e,t){return new e(...t)});var nx=Yn(Array.prototype.forEach),N3=Yn(Array.prototype.pop),xs=Yn(Array.prototype.push),ml=Yn(String.prototype.toLowerCase),Nd=Yn(String.prototype.toString),rx=Yn(String.prototype.match),sr=Yn(String.prototype.replace),ax=Yn(String.prototype.indexOf),ox=Yn(String.prototype.trim),Hn=Yn(RegExp.prototype.test),Es=ix(TypeError);function Yn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),dx=ur(/\${[\w\W]*}/gm),gx=ur(/^data-[\-\w.\u00B7-\uFFFF]/),mx=ur(/^aria-[\-\w]+$/),$3=ur(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),px=ur(/^(?:\w+script|data):/i),fx=ur(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V3=ur(/^html$/i),q3=Object.freeze({__proto__:null,MUSTACHE_EXPR:lx,ERB_EXPR:cx,TMPLIT_EXPR:dx,DATA_ATTR:gx,ARIA_ATTR:mx,IS_ALLOWED_URI:$3,IS_SCRIPT_OR_DATA:px,ATTR_WHITESPACE:fx,DOCTYPE_NAME:V3}),hx=()=>typeof window>"u"?null:window,bx=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}};function K3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hx(),t=U=>K3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:f}=e,h=u.prototype,y=dl(h,"cloneNode"),C=dl(h,"nextSibling"),b=dl(h,"childNodes"),x=dl(h,"parentNode");if(typeof i=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let S,A="",{implementation:P,createNodeIterator:w,createDocumentFragment:v,getElementsByTagName:L}=a,{importNode:D}=n,T={};t.isSupported=typeof W3=="function"&&typeof x=="function"&&P&&P.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:j,ERB_EXPR:R,TMPLIT_EXPR:M,DATA_ATTR:O,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:B}=q3,{IS_ALLOWED_URI:k}=q3,_=null,F=je({},[...U3,...Ud,...jd,...Hd,...j3]),q=null,z=je({},[...H3,...zd,...z3,...gl]),V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,oe=null,te=!0,Z=!0,ce=!1,he=!0,ae=!1,X=!1,ve=!1,se=!1,ue=!1,De=!1,He=!1,Fe=!0,pe=!1,Et="user-content-",$t=!0,At=!1,Ft={},Cn=null,Vn=je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),os=null,Tr=je({},["audio","video","img","source","image","track"]),eo=null,$o=je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cn="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",dn="http://www.w3.org/1999/xhtml",Nn=dn,Br=!1,Rr=null,to=je({},[cn,nr,dn],Nd),Tn,Ir=["application/xhtml+xml","text/html"],St="text/html",et,Un=null,x5=a.createElement("form"),V4=function(U){return U instanceof RegExp||U instanceof Function},Rc=function(U){if(!(Un&&Un===U)){if((!U||typeof U!="object")&&(U={}),U=ni(U),Tn=Ir.indexOf(U.PARSER_MEDIA_TYPE)===-1?Tn=St:Tn=U.PARSER_MEDIA_TYPE,et=Tn==="application/xhtml+xml"?Nd:ml,_="ALLOWED_TAGS"in U?je({},U.ALLOWED_TAGS,et):F,q="ALLOWED_ATTR"in U?je({},U.ALLOWED_ATTR,et):z,Rr="ALLOWED_NAMESPACES"in U?je({},U.ALLOWED_NAMESPACES,Nd):to,eo="ADD_URI_SAFE_ATTR"in U?je(ni($o),U.ADD_URI_SAFE_ATTR,et):$o,os="ADD_DATA_URI_TAGS"in U?je(ni(Tr),U.ADD_DATA_URI_TAGS,et):Tr,Cn="FORBID_CONTENTS"in U?je({},U.FORBID_CONTENTS,et):Vn,K="FORBID_TAGS"in U?je({},U.FORBID_TAGS,et):{},oe="FORBID_ATTR"in U?je({},U.FORBID_ATTR,et):{},Ft="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,Z=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,De=U.RETURN_DOM_FRAGMENT||!1,He=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Fe=U.SANITIZE_DOM!==!1,pe=U.SANITIZE_NAMED_PROPS||!1,$t=U.KEEP_CONTENT!==!1,At=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||$3,Nn=U.NAMESPACE||dn,V=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&V4(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&V4(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(Z=!1),De&&(ue=!0),Ft&&(_=je({},[...j3]),q=[],Ft.html===!0&&(je(_,U3),je(q,H3)),Ft.svg===!0&&(je(_,Ud),je(q,zd),je(q,gl)),Ft.svgFilters===!0&&(je(_,jd),je(q,zd),je(q,gl)),Ft.mathMl===!0&&(je(_,Hd),je(q,z3),je(q,gl))),U.ADD_TAGS&&(_===F&&(_=ni(_)),je(_,U.ADD_TAGS,et)),U.ADD_ATTR&&(q===z&&(q=ni(q)),je(q,U.ADD_ATTR,et)),U.ADD_URI_SAFE_ATTR&&je(eo,U.ADD_URI_SAFE_ATTR,et),U.FORBID_CONTENTS&&(Cn===Vn&&(Cn=ni(Cn)),je(Cn,U.FORBID_CONTENTS,et)),$t&&(_["#text"]=!0),X&&je(_,["html","head","body"]),_.table&&(je(_,["tbody"]),delete K.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Es('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Es('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=U.TRUSTED_TYPES_POLICY,A=S.createHTML("")}else S===void 0&&(S=bx(f,r)),S!==null&&typeof A=="string"&&(A=S.createHTML(""));wn&&wn(U),Un=U}},K4=je({},["mi","mo","mn","ms","mtext"]),G4=je({},["foreignobject","desc","title","annotation-xml"]),E5=je({},["title","style","font","a","script"]),ju=je({},Ud);je(ju,jd),je(ju,sx);let Ic=je({},Hd);je(Ic,ux);let S5=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:Nn,tagName:"template"});let ne=ml(U.tagName),Je=ml(ge.tagName);return Rr[U.namespaceURI]?U.namespaceURI===nr?ge.namespaceURI===dn?ne==="svg":ge.namespaceURI===cn?ne==="svg"&&(Je==="annotation-xml"||K4[Je]):!!ju[ne]:U.namespaceURI===cn?ge.namespaceURI===dn?ne==="math":ge.namespaceURI===nr?ne==="math"&&G4[Je]:!!Ic[ne]:U.namespaceURI===dn?ge.namespaceURI===nr&&!G4[Je]||ge.namespaceURI===cn&&!K4[Je]?!1:!Ic[ne]&&(E5[ne]||!ju[ne]):!!(Tn==="application/xhtml+xml"&&Rr[U.namespaceURI]):!1},Vo=function(U){xs(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},Oc=function(U,ge){try{xs(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{xs(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!q[U])if(ue||De)try{Vo(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Y4=function(U){let ge,ne;if(se)U=""+U;else{let vn=rx(U,/^[\r\n\t ]+/);ne=vn&&vn[0]}Tn==="application/xhtml+xml"&&Nn===dn&&(U=''+U+"");let Je=S?S.createHTML(U):U;if(Nn===dn)try{ge=new p().parseFromString(Je,Tn)}catch{}if(!ge||!ge.documentElement){ge=P.createDocument(Nn,"template",null);try{ge.documentElement.innerHTML=Br?A:Je}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),Nn===dn?L.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},J4=function(U){return w.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},w5=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},Hu=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Or=function(U,ge,ne){T[U]&&nx(T[U],Je=>{Je.call(t,ge,ne,Un)})},Q4=function(U){let ge;if(Or("beforeSanitizeElements",U,null),w5(U))return Vo(U),!0;let ne=et(U.nodeName);if(Or("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!Hu(U.firstElementChild)&&(!Hu(U.content)||!Hu(U.content.firstElementChild))&&Hn(/<[/\w]/g,U.innerHTML)&&Hn(/<[/\w]/g,U.textContent))return Vo(U),!0;if(!_[ne]||K[ne]){if(!K[ne]&&X4(ne)&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,ne)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ne)))return!1;if($t&&!Cn[ne]){let Je=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Je){let vn=Vt.length;for(let Pn=vn-1;Pn>=0;--Pn)Je.insertBefore(y(Vt[Pn],!0),C(U))}}return Vo(U),!0}return U instanceof u&&!S5(U)||(ne==="noscript"||ne==="noembed")&&Hn(/<\/no(script|embed)/i,U.innerHTML)?(Vo(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=sr(ge,j," "),ge=sr(ge,R," "),ge=sr(ge,M," "),U.textContent!==ge&&(xs(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Or("afterSanitizeElements",U,null),!1)},Z4=function(U,ge,ne){if(Fe&&(ge==="id"||ge==="name")&&(ne in a||ne in x5))return!1;if(!(Z&&!oe[ge]&&Hn(O,ge))&&!(te&&Hn(N,ge))){if(!q[ge]||oe[ge]){if(!(X4(U)&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,U)||V.tagNameCheck instanceof Function&&V.tagNameCheck(U))&&(V.attributeNameCheck instanceof RegExp&&Hn(V.attributeNameCheck,ge)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(ge))||ge==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,ne)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ne))))return!1}else if(!eo[ge]&&!Hn(k,sr(ne,B,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&ax(ne,"data:")===0&&os[U])&&!(ce&&!Hn(H,sr(ne,B,"")))&&ne)return!1}return!0},X4=function(U){return U.indexOf("-")>0},ef=function(U){let ge,ne,Je,Vt;Or("beforeSanitizeAttributes",U,null);let{attributes:vn}=U;if(!vn)return;let Pn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q};for(Vt=vn.length;Vt--;){ge=vn[Vt];let{name:Zt,namespaceURI:Ko}=ge;if(ne=Zt==="value"?ge.value:ox(ge.value),Je=et(Zt),Pn.attrName=Je,Pn.attrValue=ne,Pn.keepAttr=!0,Pn.forceKeepAttr=void 0,Or("uponSanitizeAttribute",U,Pn),ne=Pn.attrValue,Pn.forceKeepAttr||(Oc(Zt,U),!Pn.keepAttr))continue;if(!he&&Hn(/\/>/i,ne)){Oc(Zt,U);continue}ae&&(ne=sr(ne,j," "),ne=sr(ne,R," "),ne=sr(ne,M," "));let tf=et(U.nodeName);if(Z4(tf,Je,ne)){if(pe&&(Je==="id"||Je==="name")&&(Oc(Zt,U),ne=Et+ne),S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ko)switch(f.getAttributeType(tf,Je)){case"TrustedHTML":{ne=S.createHTML(ne);break}case"TrustedScriptURL":{ne=S.createScriptURL(ne);break}}try{Ko?U.setAttributeNS(Ko,Zt,ne):U.setAttribute(Zt,ne),N3(t.removed)}catch{}}}Or("afterSanitizeAttributes",U,null)},D5=function U(ge){let ne,Je=J4(ge);for(Or("beforeSanitizeShadowDOM",ge,null);ne=Je.nextNode();)Or("uponSanitizeShadowNode",ne,null),!Q4(ne)&&(ne.content instanceof o&&U(ne.content),ef(ne));Or("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Je,Vt,vn;if(Br=!U,Br&&(U=""),typeof U!="string"&&!Hu(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw Es("dirty is not a string, aborting")}else throw Es("toString is not a function");if(!t.isSupported)return U;if(ve||Rc(ge),t.removed=[],typeof U=="string"&&(At=!1),At){if(U.nodeName){let Ko=et(U.nodeName);if(!_[Ko]||K[Ko])throw Es("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Y4(""),Je=ne.ownerDocument.importNode(U,!0),Je.nodeType===1&&Je.nodeName==="BODY"||Je.nodeName==="HTML"?ne=Je:ne.appendChild(Je);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return S&&He?S.createHTML(U):U;if(ne=Y4(U),!ne)return ue?null:He?A:""}ne&&se&&Vo(ne.firstChild);let Pn=J4(At?U:ne);for(;Vt=Pn.nextNode();)Q4(Vt)||(Vt.content instanceof o&&D5(Vt.content),ef(Vt));if(At)return U;if(ue){if(De)for(vn=v.call(ne.ownerDocument);ne.firstChild;)vn.appendChild(ne.firstChild);else vn=ne;return(q.shadowroot||q.shadowrootmod)&&(vn=D.call(n,vn,!0)),vn}let Zt=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Hn(V3,ne.ownerDocument.doctype.name)&&(Zt=" -`+Zt),ae&&(Zt=sr(Zt,j," "),Zt=sr(Zt,R," "),Zt=sr(Zt,M," ")),S&&He?S.createHTML(Zt):Zt},t.setConfig=function(U){Rc(U),ve=!0},t.clearConfig=function(){Un=null,ve=!1},t.isValidAttribute=function(U,ge,ne){Un||Rc({});let Je=et(U),Vt=et(ge);return Z4(Je,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(T[U]=T[U]||[],xs(T[U],ge))},t.removeHook=function(U){if(T[U])return N3(T[U])},t.removeHooks=function(U){T[U]&&(T[U]=[])},t.removeAllHooks=function(){T={}},t}var tt=K3();m();m();var yx=Object.create,Vd=Object.defineProperty,Cx=Object.getOwnPropertyDescriptor,Tx=Object.getOwnPropertyNames,vx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Kd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ex=(e,t)=>{for(var n in t)Vd(e,n,{get:t[n],enumerable:!0})},$d=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Tx(t))!xx.call(e,a)&&a!==n&&Vd(e,a,{get:()=>t[a],enumerable:!(r=Cx(t,a))||r.enumerable});return e},Sx=(e,t,n)=>($d(e,t,"default"),n&&$d(n,t,"default")),Y3=(e,t,n)=>(n=e!=null?yx(vx(e)):{},$d(t||!e||!e.__esModule?Vd(n,"default",{value:e,enumerable:!0}):n,e)),wx=Kd((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(o){return o.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let o=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let s=Array.from(i.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${i.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?o(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?o(s):s}).join(" ");dump("Reader: (Readability) "+i+` -`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var o=r.length-1;o>=0;o--){var i=r[o],s=i.parentNode;s&&(!a||a.call(this,i,o,r))&&s.removeChild(i)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let o of r)this._setNodeTag(o,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),o=a.map(function(i){return r.call(i)});return Array.prototype.concat.apply([],o)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(o){var i=r.getElementsByTagName(o);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(r){var a=this._classesToPreserve,o=(r.getAttribute("class")||"").split(/\s+/).filter(function(i){return a.indexOf(i)!=-1}).join(" ");for(o?r.setAttribute("class",o):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,o=this._doc.documentURI;function i(l){if(a==o&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var p=this._doc.createElement("span");l.firstChild;)p.appendChild(l.firstChild);l.parentNode.replaceChild(p,l)}else l.setAttribute("href",i(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),p=l.getAttribute("srcset");if(c&&l.setAttribute("src",i(c)),g&&l.setAttribute("poster",i(g)),p){var f=p.replace(this.REGEXPS.srcsetUrl,function(h,y,C,b){return i(y)+(C||"")+b});l.setAttribute("srcset",f)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var o=a.children[0],i=0;i»] /.test(a))i=/ [\\\/>»] /.test(a),a=o.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=o.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(f){return f.textContent.trim()===l});c||(a=o.substring(o.lastIndexOf(":")+1),s(a)<3?a=o.substring(o.indexOf(":")+1):s(o.substr(0,o.indexOf(":")))>5&&(a=o))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var p=s(a);return p<=4&&(!i||p!=s(o.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=o),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var o=a.nextSibling,i=!1;(o=this._nextNode(o))&&o.tagName=="BR";){i=!0;var s=o.nextSibling;o.parentNode.removeChild(o),o=s}if(i){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),o=u.nextSibling;o;){if(o.tagName=="BR"){var l=this._nextNode(o.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(o))break;var c=o.nextSibling;u.appendChild(o),o=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var o=r.ownerDocument.createElement(a);r.firstChild;)o.appendChild(r.firstChild);r.parentNode.replaceChild(o,r),r.readability&&(o.readability=r.readability);for(var i=0;i!o.includes(l)),u=s.join(" ").length/i.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var o=r.getAttribute("rel"),i=r.getAttribute("itemprop");return(o==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var o=0,i=[];r.parentNode&&(i.push(r.parentNode),!(a&&++o===a));)r=r.parentNode;return i},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,o=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var i=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,p=l.firstChild;p;){var f=p.nextSibling;if(this._isPhrasingContent(p))g!==null?g.appendChild(p):this._isWhitespace(p)||(g=a.createElement("p"),l.replaceChild(g,p),g.appendChild(p));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}p=f}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var De=this._getInnerText(ue);if(!(De.length<25)){var He=this._getNodeAncestors(ue,5);if(He.length!==0){var Fe=0;Fe+=1,Fe+=De.split(",").length,Fe+=Math.min(Math.floor(De.length/100),3),this._forEachNode(He,function(pe,Et){if(!(!pe.tagName||!pe.parentNode||typeof pe.parentNode.tagName>"u")){if(typeof pe.readability>"u"&&(this._initializeNode(pe),y.push(pe)),Et===0)var $t=1;else Et===1?$t=2:$t=Et*3;pe.readability.contentScore+=Fe/$t}})}}}});for(var C=[],b=0,x=y.length;bw.readability.contentScore){C.splice(P,0,S),C.length>this._nbTopCandidates&&C.pop();break}}}var v=C[0]||null,L=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var T=[],j=1;j=.75&&T.push(this._getNodeAncestors(C[j]));var R=3;if(T.length>=R)for(D=v.parentNode;D.tagName!=="BODY";){for(var M=0,O=0;O=R){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var N=v.readability.contentScore,H=N/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var B=D.readability.contentScore;if(BN){v=D;break}N=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");o&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var F=D.children,q=0,z=F.length;q=_)K=!0;else if(V.nodeName==="P"){var te=this._getLinkDensity(V),Z=this._getInnerText(V),ce=Z.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&Z.search(/\.( |$)/)!==-1)&&(K=!0)}}K&&(this.log("Appending node:",V),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(V.nodeName)===-1&&(this.log("Altering sibling:",V,"to div."),V=this._setNodeTag(V,"DIV")),k.appendChild(V),F=D.children,q-=1,z-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),L)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(o,i){return a[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(o,i,s){var u=parseInt(i||s,i?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),o;return this._forEachNode(a,function(i){if(!o&&i.getAttribute("type")==="application/ld+json")try{var s=i.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(p){return(p["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(o={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?o.title=u.headline:o.title=u.name}else typeof u.name=="string"?o.title=u.name.trim():typeof u.headline=="string"&&(o.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?o.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(o.byline=u.author.filter(function(p){return p&&typeof p.name=="string"}).map(function(p){return p.name.trim()}).join(", "))),typeof u.description=="string"&&(o.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(o.siteName=u.publisher.name.trim());return}catch(p){this.log(p.message)}}),o||{}},_getArticleMetadata:function(r){var a={},o={},i=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),p=l.getAttribute("content");if(p){var f=null,h=null;g&&(f=g.match(s),f&&(h=f[0].toLowerCase().replace(/\s/g,""),o[h]=p.trim())),!f&&c&&u.test(c)&&(h=c,p&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),o[h]=p.trim()))}}),a.title=r.title||o["dc:title"]||o["dcterm:title"]||o["og:title"]||o["weibo:article:title"]||o["weibo:webpage:title"]||o.title||o["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||o["dc:creator"]||o["dcterm:creator"]||o.author,a.excerpt=r.excerpt||o["dc:description"]||o["dcterm:description"]||o["og:description"]||o["weibo:article:description"]||o["weibo:webpage:description"]||o.description||o["twitter:description"],a.siteName=r.siteName||o["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(i){for(var s=0;s"u"?!0:a;var o=r.textContent.trim();return a?o.replace(this.REGEXPS.normalize," "):o},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>o)return!1;if(r.parentNode.tagName===a&&(!i||i(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,o=0,i=r.getElementsByTagName("tr"),s=0;s0){i._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],p=function(h){return!!i.getElementsByTagName(h)[0]};if(g.some(p)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var f=this._getRowAndColumnCount(i);if(f.rows>=10||f.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=f.rows*f.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var o=this.REGEXPS.b64DataUrl.exec(a.src);if(o[1]==="image/svg+xml")return;for(var i=!1,s=0;si+=this._getInnerText(u,!0).length),i/o},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(o){var i=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(o,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(o).length>.9}if(a==="table"&&i(o)||this._hasAncestorTag(o,"table",-1,i)||this._hasAncestorTag(o,"code"))return!1;var c=this._getClassWeight(o);this.log("Cleaning Conditionally",o);var g=0;if(c+g<0)return!0;if(this._getCharCount(o,",")<10){for(var p=o.getElementsByTagName("p").length,f=o.getElementsByTagName("img").length,h=o.getElementsByTagName("li").length-100,y=o.getElementsByTagName("input").length,C=this._getTextDensity(o,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(o,["object","embed","iframe"]),S=0;S1&&p/f<.5&&!this._hasAncestorTag(o,"figure")||!s&&h>p||y>Math.floor(p/3)||!s&&C<.9&&w<25&&(f===0||f>2)&&!this._hasAncestorTag(o,"figure")||!s&&c<25&&P>.2||c>=25&&P>.5||b===1&&w<75||b>1;if(s&&v){for(var L=0;L1)return v;let D=o.getElementsByTagName("li").length;if(f==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var o=this._getNextNode(r,!0),i=this._getNextNode(r);i&&i!=o;)a.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(o){let i=this._getClassWeight(o)<0;return i&&this.log("Removing header with low class weight:",o),i})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var o=this._getArticleMetadata(a);this._articleTitle=o.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!o.excerpt){var s=i.getElementsByTagName("p");s.length>0&&(o.excerpt=s[0].textContent.trim())}var u=i.textContent;return{title:this._articleTitle,byline:o.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:u,length:u.length,excerpt:o.excerpt,siteName:o.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),Dx=Kd((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(o){return(!o.style||o.style.display!="none")&&!o.hasAttribute("hidden")&&(!o.hasAttribute("aria-hidden")||o.getAttribute("aria-hidden")!="true"||o.className&&o.className.indexOf&&o.className.indexOf("fallback-image")!==-1)}function a(o,i={}){typeof i=="function"&&(i={visibilityChecker:i});var s={minScore:20,minContentLength:140,visibilityChecker:r};i=Object.assign(s,i);var u=o.querySelectorAll("p, pre, article"),l=o.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(p){c.add(p.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(p){if(!i.visibilityChecker(p))return!1;var f=p.className+" "+p.id;if(n.unlikelyCandidates.test(f)&&!n.okMaybeItsACandidate.test(f)||p.matches("li p"))return!1;var h=p.textContent.trim().length;return hi.minScore)})}typeof t=="object"&&(t.exports=a)}),J3=Kd((e,t)=>{var n=wx(),r=Dx();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Ex(Q3,{Readability:()=>pl,default:()=>eh,isProbablyReaderable:()=>X3});var Z3=Y3(J3());Sx(Q3,Y3(J3()));var{Readability:pl,isProbablyReaderable:X3}=Z3,{default:G3,...kx}=Z3,eh=G3!==void 0?G3:kx;m();m();m();m();m();m();m();m();m();var th=Object.prototype.toString;function fl(e){switch(th.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return xr(e,Error)}}function Ss(e,t){return th.call(e)===`[object ${t}]`}function hl(e){return Ss(e,"ErrorEvent")}function nh(e){return Ss(e,"DOMException")}function Wr(e){return Ss(e,"String")}function bl(e){return e===null||typeof e!="object"&&typeof e!="function"}function $r(e){return Ss(e,"Object")}function ws(e){return typeof Event<"u"&&xr(e,Event)}function rh(e){return!1}function ah(e){return Ss(e,"RegExp")}function Ds(e){return!!(e&&e.then&&typeof e.then=="function")}function oh(e){return $r(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ih(e){return typeof e=="number"&&e!==e}function xr(e,t){try{return e instanceof t}catch{return!1}}function ks(e,t){try{let n=e,r=5,a=80,o=[],i=0,s=0,u=" > ",l=u.length,c;for(;n&&i++1&&s+o.length*l+c.length>=a));)o.push(c),s+=c.length,n=n.parentNode;return o.reverse().join(u)}catch{return""}}function Ax(e,t){let n=e,r=[],a,o,i,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Wr(a))for(o=a.split(/\s+/),u=0;u{let o=n[a]&&n[a].__sentry_original__;a in console&&o&&(r[a]=n[a],n[a]=o)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function uh(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?As.forEach(n=>{t[n]=(...r)=>{e&&Yd(()=>{})}}):As.forEach(n=>{t[n]=()=>{}}),t}var nt;!1?nt=ri("logger",uh):nt=uh();m();m();function yl(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Jd(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r"}}function ch(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dh(e,t=40){let n=Object.keys(Xd(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return yl(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:yl(a,t)}return""}function Ls(e){return Qd(e,new Map)}function Qd(e,t){if($r(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=Qd(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(Qd(a,t))}),r}return e}m();var _x=50;function gh(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let o of n.split(` -`).slice(r))for(let i of t){let s=i(o);if(s){a.push(s);break}}return Mx(a)}}function Mx(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,_x).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var eg="";function cr(e){try{return!e||typeof e!="function"?eg:e.name||eg}catch{return eg}}m();function mh(){return!0}var Vr=Dt(),_s={},ph={};function Px(e){if(!ph[e])switch(ph[e]=!0,e){case"console":Fx();break;case"fetch":Bx();break;case"error":Ox();break;case"unhandledrejection":Nx();break;default:!1&&nt.warn("unknown instrumentation type:",e);return}}function Er(e,t){_s[e]=_s[e]||[],_s[e].push(t),Px(e)}function oi(e,t){if(!(!e||!_s[e]))for(let n of _s[e]||[])try{n(t)}catch(r){!1&&nt.error(`Error while triggering instrumentation handler. +`+y+"]"}return r.pop(),a=y,b}},ev={parse:K8,stringify:X8},tv=ev,ol=tv;m();m();var FP=Number.isNaN||function(e){return typeof e=="number"&&e!==e};m();m();var il=globalThis||(typeof window<"u"?window:self),rv=Object.create,Ad=Object.defineProperty,av=Object.getOwnPropertyDescriptor,ov=Object.getOwnPropertyNames,iv=Object.getPrototypeOf,sv=Object.prototype.hasOwnProperty,uv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lv=(e,t)=>{for(var n in t)Ad(e,n,{get:t[n],enumerable:!0})},kd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of ov(t))!sv.call(e,a)&&a!==n&&Ad(e,a,{get:()=>t[a],enumerable:!(r=av(t,a))||r.enumerable});return e},cv=(e,t,n)=>(kd(e,t,"default"),n&&kd(n,t,"default")),h3=(e,t,n)=>(n=e!=null?rv(iv(e)):{},kd(t||!e||!e.__esModule?Ad(n,"default",{value:e,enumerable:!0}):n,e)),b3=uv((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof il=="object"&&il&&il.Object===Object&&il,g=typeof self=="object"&&self&&self.Object===Object&&self,p=c||g||Function("return this")(),f=Object.prototype,h=f.toString,y=Math.max,C=Math.min,b=function(){return p.Date.now()};function x(L,D,T){var j,R,M,O,N,H,B=0,k=!1,_=!1,F=!0;if(typeof L!="function")throw new TypeError(n);D=v(D)||0,A(T)&&(k=!!T.leading,_="maxWait"in T,M=_?y(v(T.maxWait)||0,D):M,F="trailing"in T?!!T.trailing:F);function q(ae){var X=j,ve=R;return j=R=void 0,B=ae,O=L.apply(ve,X),O}function z(ae){return B=ae,N=setTimeout(oe,D),k?q(ae):O}function V(ae){var X=ae-H,ve=ae-B,se=D-X;return _?C(se,M-ve):se}function K(ae){var X=ae-H,ve=ae-B;return H===void 0||X>=D||X<0||_&&ve>=M}function oe(){var ae=b();if(K(ae))return te(ae);N=setTimeout(oe,V(ae))}function te(ae){return N=void 0,F&&j?q(ae):(j=R=void 0,O)}function Z(){N!==void 0&&clearTimeout(N),B=0,j=H=R=N=void 0}function ce(){return N===void 0?O:te(b())}function he(){var ae=b(),X=K(ae);if(j=arguments,R=this,H=ae,X){if(N===void 0)return z(H);if(_)return N=setTimeout(oe,D),q(H)}return N===void 0&&(N=setTimeout(oe,D)),O}return he.cancel=Z,he.flush=ce,he}function S(L,D,T){var j=!0,R=!0;if(typeof L!="function")throw new TypeError(n);return A(T)&&(j="leading"in T?!!T.leading:j,R="trailing"in T?!!T.trailing:R),x(L,D,{leading:j,maxWait:D,trailing:R})}function A(L){var D=typeof L;return!!L&&(D=="object"||D=="function")}function P(L){return!!L&&typeof L=="object"}function w(L){return typeof L=="symbol"||P(L)&&h.call(L)==a}function v(L){if(typeof L=="number")return L;if(w(L))return r;if(A(L)){var D=typeof L.valueOf=="function"?L.valueOf():L;L=A(D)?D+"":D}if(typeof L!="string")return L===0?L:+L;L=L.replace(o,"");var T=s.test(L);return T||u.test(L)?l(L.slice(2),T?2:8):i.test(L)?r:+L}t.exports=S}),y3={};lv(y3,{default:()=>or});var dv=h3(b3());cv(y3,h3(b3()));var{default:f3,...gv}=dv,or=f3!==void 0?f3:gv;m();m();var sl=globalThis||(typeof window<"u"?window:self),mv=Object.create,_d=Object.defineProperty,pv=Object.getOwnPropertyDescriptor,fv=Object.getOwnPropertyNames,hv=Object.getPrototypeOf,bv=Object.prototype.hasOwnProperty,yv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Cv=(e,t)=>{for(var n in t)_d(e,n,{get:t[n],enumerable:!0})},Ld=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of fv(t))!bv.call(e,a)&&a!==n&&_d(e,a,{get:()=>t[a],enumerable:!(r=pv(t,a))||r.enumerable});return e},Tv=(e,t,n)=>(Ld(e,t,"default"),n&&Ld(n,t,"default")),T3=(e,t,n)=>(n=e!=null?mv(hv(e)):{},Ld(t||!e||!e.__esModule?_d(n,"default",{value:e,enumerable:!0}):n,e)),v3=yv((e,t)=>{var n="Expected a function",r=NaN,a="[object Symbol]",o=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt,c=typeof sl=="object"&&sl&&sl.Object===Object&&sl,g=typeof self=="object"&&self&&self.Object===Object&&self,p=c||g||Function("return this")(),f=Object.prototype,h=f.toString,y=Math.max,C=Math.min,b=function(){return p.Date.now()};function x(v,L,D){var T,j,R,M,O,N,H=0,B=!1,k=!1,_=!0;if(typeof v!="function")throw new TypeError(n);L=w(L)||0,S(D)&&(B=!!D.leading,k="maxWait"in D,R=k?y(w(D.maxWait)||0,L):R,_="trailing"in D?!!D.trailing:_);function F(he){var ae=T,X=j;return T=j=void 0,H=he,M=v.apply(X,ae),M}function q(he){return H=he,O=setTimeout(K,L),B?F(he):M}function z(he){var ae=he-N,X=he-H,ve=L-ae;return k?C(ve,R-X):ve}function V(he){var ae=he-N,X=he-H;return N===void 0||ae>=L||ae<0||k&&X>=R}function K(){var he=b();if(V(he))return oe(he);O=setTimeout(K,z(he))}function oe(he){return O=void 0,_&&T?F(he):(T=j=void 0,M)}function te(){O!==void 0&&clearTimeout(O),H=0,T=N=j=O=void 0}function Z(){return O===void 0?M:oe(b())}function ce(){var he=b(),ae=V(he);if(T=arguments,j=this,N=he,ae){if(O===void 0)return q(N);if(k)return O=setTimeout(K,L),F(N)}return O===void 0&&(O=setTimeout(K,L)),M}return ce.cancel=te,ce.flush=Z,ce}function S(v){var L=typeof v;return!!v&&(L=="object"||L=="function")}function A(v){return!!v&&typeof v=="object"}function P(v){return typeof v=="symbol"||A(v)&&h.call(v)==a}function w(v){if(typeof v=="number")return v;if(P(v))return r;if(S(v)){var L=typeof v.valueOf=="function"?v.valueOf():v;v=S(L)?L+"":L}if(typeof v!="string")return v===0?v:+v;v=v.replace(o,"");var D=s.test(v);return D||u.test(v)?l(v.slice(2),D?2:8):i.test(v)?r:+v}t.exports=x}),x3={};Cv(x3,{default:()=>Cs});var vv=T3(v3());Tv(x3,T3(v3()));var{default:C3,...xv}=vv,Cs=C3!==void 0?C3:xv;m();m();var Ev=Object.create,Pd=Object.defineProperty,Sv=Object.getOwnPropertyDescriptor,wv=Object.getOwnPropertyNames,Dv=Object.getPrototypeOf,kv=Object.prototype.hasOwnProperty,Av=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lv=(e,t)=>{for(var n in t)Pd(e,n,{get:t[n],enumerable:!0})},Md=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of wv(t))!kv.call(e,a)&&a!==n&&Pd(e,a,{get:()=>t[a],enumerable:!(r=Sv(t,a))||r.enumerable});return e},_v=(e,t,n)=>(Md(e,t,"default"),n&&Md(n,t,"default")),S3=(e,t,n)=>(n=e!=null?Ev(Dv(e)):{},Md(t||!e||!e.__esModule?Pd(n,"default",{value:e,enumerable:!0}):n,e)),w3=Av((e,t)=>{(function(n,r){typeof e=="object"&&typeof t=="object"?t.exports=r():typeof define=="function"&&define.amd?define([],r):typeof e=="object"?e.notie=r():n.notie=r()})(e,function(){return function(n){function r(o){if(a[o])return a[o].exports;var i=a[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,r),i.l=!0,i.exports}var a={};return r.m=n,r.c=a,r.i=function(o){return o},r.d=function(o,i,s){r.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:s})},r.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return r.d(i,"a",i),i},r.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},r.p="",r(r.s=1)}([function(n,r){n.exports=function(a){return a.webpackPolyfill||(a.deprecate=function(){},a.paths=[],a.children||(a.children=[]),Object.defineProperty(a,"loaded",{enumerable:!0,get:function(){return a.l}}),Object.defineProperty(a,"id",{enumerable:!0,get:function(){return a.i}}),a.webpackPolyfill=1),a}},function(n,r,a){"use strict";(function(o){var i,s,u,l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c};(function(c,g){l(r)==="object"&&l(o)==="object"?o.exports=g():(s=[],i=g,u=typeof i=="function"?i.apply(r,s):i,u!==void 0&&(o.exports=u))})(void 0,function(){return function(c){function g(f){if(p[f])return p[f].exports;var h=p[f]={i:f,l:!1,exports:{}};return c[f].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var p={};return g.m=c,g.c=p,g.i=function(f){return f},g.d=function(f,h,y){g.o(f,h)||Object.defineProperty(f,h,{configurable:!1,enumerable:!0,get:y})},g.n=function(f){var h=f&&f.__esModule?function(){return f.default}:function(){return f};return g.d(h,"a",h),h},g.o=function(f,h){return Object.prototype.hasOwnProperty.call(f,h)},g.p="",g(g.s=0)}([function(c,g,p){function f(z,V){var K={};for(var oe in z)V.indexOf(oe)>=0||Object.prototype.hasOwnProperty.call(z,oe)&&(K[oe]=z[oe]);return K}Object.defineProperty(g,"__esModule",{value:!0});var h=typeof Symbol=="function"&&l(Symbol.iterator)==="symbol"?function(z){return typeof z>"u"?"undefined":l(z)}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z>"u"?"undefined":l(z)},y=Object.assign||function(z){for(var V=1;V'+oe+"",ve.onclick=function(){return R(se,X)},ve.listener=function(ue){(D(ue)||T(ue))&&N()},j(ve,X),Z&&Z<1&&(Z=1),!he&&Z&&A(Z).then(function(){return R(se,X)})},B=g.force=function(z,V){var K=z.type,oe=K===void 0?5:K,te=z.text,Z=z.buttonText,ce=Z===void 0?"OK":Z,he=z.callback,ae=z.position,X=ae===void 0?b.positions.force||X.top:ae;P(),N();var ve=document.createElement("div"),se=w();ve.id=se;var ue=document.createElement("div");ue.classList.add(b.classes.textbox),ue.classList.add(b.classes.backgroundInfo),ue.innerHTML='
'+te+"
";var De=document.createElement("div");De.classList.add(b.classes.button),De.classList.add(v[oe]),De.innerHTML=ce,De.onclick=function(){R(se,X),O(),he?he():V&&V()},ve.appendChild(ue),ve.appendChild(De),ve.listener=function(He){D(He)&&De.click()},j(ve,X),M()},k=g.confirm=function(z,V,K){var oe=z.text,te=z.submitText,Z=te===void 0?"Yes":te,ce=z.cancelText,he=ce===void 0?"Cancel":ce,ae=z.submitCallback,X=z.cancelCallback,ve=z.position,se=ve===void 0?b.positions.confirm||se.top:ve;P(),N();var ue=document.createElement("div"),De=w();ue.id=De;var He=document.createElement("div");He.classList.add(b.classes.textbox),He.classList.add(b.classes.backgroundInfo),He.innerHTML='
'+oe+"
";var Fe=document.createElement("div");Fe.classList.add(b.classes.button),Fe.classList.add(b.classes.elementHalf),Fe.classList.add(b.classes.backgroundSuccess),Fe.innerHTML=Z,Fe.onclick=function(){R(De,se),O(),ae?ae():V&&V()};var pe=document.createElement("div");pe.classList.add(b.classes.button),pe.classList.add(b.classes.elementHalf),pe.classList.add(b.classes.backgroundError),pe.innerHTML=he,pe.onclick=function(){R(De,se),O(),X?X():K&&K()},ue.appendChild(He),ue.appendChild(Fe),ue.appendChild(pe),ue.listener=function(Et){D(Et)?Fe.click():T(Et)&&pe.click()},j(ue,se),M(ue,se)},_=function(z,V,K){var oe=z.text,te=z.submitText,Z=te===void 0?"Submit":te,ce=z.cancelText,he=ce===void 0?"Cancel":ce,ae=z.submitCallback,X=z.cancelCallback,ve=z.position,se=ve===void 0?b.positions.input||se.top:ve,ue=f(z,["text","submitText","cancelText","submitCallback","cancelCallback","position"]);P(),N();var De=document.createElement("div"),He=w();De.id=He;var Fe=document.createElement("div");Fe.classList.add(b.classes.textbox),Fe.classList.add(b.classes.backgroundInfo),Fe.innerHTML='
'+oe+"
";var pe=document.createElement("input");pe.classList.add(b.classes.inputField),pe.setAttribute("autocapitalize",ue.autocapitalize||"none"),pe.setAttribute("autocomplete",ue.autocomplete||"off"),pe.setAttribute("autocorrect",ue.autocorrect||"off"),pe.setAttribute("autofocus",ue.autofocus||"true"),pe.setAttribute("inputmode",ue.inputmode||"verbatim"),pe.setAttribute("max",ue.max||""),pe.setAttribute("maxlength",ue.maxlength||""),pe.setAttribute("min",ue.min||""),pe.setAttribute("minlength",ue.minlength||""),pe.setAttribute("placeholder",ue.placeholder||""),pe.setAttribute("spellcheck",ue.spellcheck||"default"),pe.setAttribute("step",ue.step||"any"),pe.setAttribute("type",ue.type||"text"),pe.value=ue.value||"",ue.allowed&&(pe.oninput=function(){var At=void 0;if(Array.isArray(ue.allowed)){for(var Ft="",Cn=ue.allowed,Vn=0;Vn'+K+"",X.appendChild(se),ce.forEach(function(De,He){var Fe=De.type,pe=Fe===void 0?1:Fe,Et=De.text,$t=De.handler,At=document.createElement("div");At.classList.add(v[pe]),At.classList.add(b.classes.button),At.classList.add(b.classes.selectChoice);var Ft=ce[He+1];Ft&&!Ft.type&&(Ft.type=1),Ft&&Ft.type===pe&&At.classList.add(b.classes.selectChoiceRepeated),At.innerHTML=Et,At.onclick=function(){R(ve,ae),O(),$t()},X.appendChild(At)});var ue=document.createElement("div");ue.classList.add(b.classes.backgroundNeutral),ue.classList.add(b.classes.button),ue.innerHTML=te,ue.onclick=function(){R(ve,ae),O(),Z?Z():V&&V()},X.appendChild(ue),X.listener=function(De){T(De)&&ue.click()},j(X,ae),M(X,ae)},q=g.date=function(z,V,K){var oe=z.value,te=oe===void 0?new Date:oe,Z=z.submitText,ce=Z===void 0?"OK":Z,he=z.cancelText,ae=he===void 0?"Cancel":he,X=z.submitCallback,ve=z.cancelCallback,se=z.position,ue=se===void 0?b.positions.date||ue.top:se;P(),N();var De="▾",He=document.createElement("div"),Fe=document.createElement("div"),pe=document.createElement("div"),Et=function(St){He.innerHTML=b.dateMonths[St.getMonth()],Fe.innerHTML=St.getDate(),pe.innerHTML=St.getFullYear()},$t=function(St){var tt=new Date(te.getFullYear(),te.getMonth()+1,0).getDate(),Un=St.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,2);Number(Un)>tt&&(Un=tt.toString()),St.target.textContent=Un,Number(Un)<1&&(Un="1"),te.setDate(Number(Un))},At=function(St){var tt=St.target.textContent.replace(/^0+/,"").replace(/[^\d]/g,"").slice(0,4);St.target.textContent=tt,te.setFullYear(Number(tt))},Ft=function(St){Et(te)},Cn=function(St){var tt=new Date(te.getFullYear(),te.getMonth()+St+1,0).getDate();te.getDate()>tt&&te.setDate(tt),te.setMonth(te.getMonth()+St),Et(te)},Vn=function(St){te.setDate(te.getDate()+St),Et(te)},is=function(St){var tt=te.getFullYear()+St;tt<0?te.setFullYear(0):te.setFullYear(te.getFullYear()+St),Et(te)},Tr=document.createElement("div"),eo=w();Tr.id=eo;var $o=document.createElement("div");$o.classList.add(b.classes.backgroundInfo);var cn=document.createElement("div");cn.classList.add(b.classes.dateSelectorInner);var nr=document.createElement("div");nr.classList.add(b.classes.button),nr.classList.add(b.classes.elementThird),nr.classList.add(b.classes.dateSelectorUp),nr.innerHTML=De;var dn=document.createElement("div");dn.classList.add(b.classes.button),dn.classList.add(b.classes.elementThird),dn.classList.add(b.classes.dateSelectorUp),dn.innerHTML=De;var Nn=document.createElement("div");Nn.classList.add(b.classes.button),Nn.classList.add(b.classes.elementThird),Nn.classList.add(b.classes.dateSelectorUp),Nn.innerHTML=De,He.classList.add(b.classes.element),He.classList.add(b.classes.elementThird),He.innerHTML=b.dateMonths[te.getMonth()],Fe.classList.add(b.classes.element),Fe.classList.add(b.classes.elementThird),Fe.setAttribute("contentEditable",!0),Fe.addEventListener("input",$t),Fe.addEventListener("blur",Ft),Fe.innerHTML=te.getDate(),pe.classList.add(b.classes.element),pe.classList.add(b.classes.elementThird),pe.setAttribute("contentEditable",!0),pe.addEventListener("input",At),pe.addEventListener("blur",Ft),pe.innerHTML=te.getFullYear();var Br=document.createElement("div");Br.classList.add(b.classes.button),Br.classList.add(b.classes.elementThird),Br.innerHTML=De;var Rr=document.createElement("div");Rr.classList.add(b.classes.button),Rr.classList.add(b.classes.elementThird),Rr.innerHTML=De;var to=document.createElement("div");to.classList.add(b.classes.button),to.classList.add(b.classes.elementThird),to.innerHTML=De,nr.onclick=function(){return Cn(1)},dn.onclick=function(){return Vn(1)},Nn.onclick=function(){return is(1)},Br.onclick=function(){return Cn(-1)},Rr.onclick=function(){return Vn(-1)},to.onclick=function(){return is(-1)};var Tn=document.createElement("div");Tn.classList.add(b.classes.button),Tn.classList.add(b.classes.elementHalf),Tn.classList.add(b.classes.backgroundSuccess),Tn.innerHTML=ce,Tn.onclick=function(){R(eo,ue),O(),X?X(te):V&&V(te)};var Ir=document.createElement("div");Ir.classList.add(b.classes.button),Ir.classList.add(b.classes.elementHalf),Ir.classList.add(b.classes.backgroundError),Ir.innerHTML=ae,Ir.onclick=function(){R(eo,ue),O(),ve?ve(te):K&&K(te)},cn.appendChild(nr),cn.appendChild(dn),cn.appendChild(Nn),cn.appendChild(He),cn.appendChild(Fe),cn.appendChild(pe),cn.appendChild(Br),cn.appendChild(Rr),cn.appendChild(to),$o.appendChild(cn),Tr.appendChild($o),Tr.appendChild(Tn),Tr.appendChild(Ir),Tr.listener=function(St){D(St)?Tn.click():T(St)&&Ir.click()},j(Tr,ue),M(Tr,ue)};g.default={alert:H,force:B,confirm:k,input:_,select:F,date:q,setOptions:x,hideAlerts:N}}])})}).call(r,a(0)(n))}])})}),D3={};Lv(D3,{default:()=>ul});var Mv=S3(w3());_v(D3,S3(w3()));var{default:E3,...Pv}=Mv,ul=E3!==void 0?E3:Pv;m();m();var ll=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ts(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent(`on${t}`,()=>{n(window.event)})}function Fd(e,t){let n=t.slice(0,t.length-1);for(let r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function k3(e,t){let n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,a=!0;for(let o=0;oei[e.toLowerCase()]||ir[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),Fv=e=>Object.keys(ei).find(t=>ei[t]===e),Bv=e=>Object.keys(ir).find(t=>ir[t]===e);function F3(e){M3=e||"all"}function vs(){return M3||"all"}function Rv(){return dt.slice(0)}function Iv(){return dt.map(e=>Fv(e)||Bv(e)||String.fromCharCode(e))}function Ov(){let e=[];return Object.keys(wt).forEach(t=>{wt[t].forEach(({key:n,scope:r,mods:a,shortcut:o})=>{e.push({scope:r,shortcut:o,mods:a,keys:n.split("+").map(i=>xs(i))})})}),e}function Nv(e){let t=e.target||e.srcElement,{tagName:n}=t,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function Uv(e){return typeof e=="string"&&(e=xs(e)),dt.indexOf(e)!==-1}function jv(e,t){let n,r;e||(e=vs());for(let a in wt)if(Object.prototype.hasOwnProperty.call(wt,a))for(n=wt[a],r=0;r=0&&dt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&dt.splice(0,dt.length),(t===93||t===224)&&(t=91),t in tn){tn[t]=!1;for(let r in ir)ir[r]===t&&(qr[r]=!1)}}function B3(e,...t){if(typeof e>"u")Object.keys(wt).forEach(n=>delete wt[n]);else if(Array.isArray(e))e.forEach(n=>{n.key&&Rd(n)});else if(typeof e=="object")e.key&&Rd(e);else if(typeof e=="string"){let[n,r]=t;typeof n=="function"&&(r=n,n=""),Rd({key:e,scope:n,method:r,splitKey:"+"})}}var Rd=({key:e,scope:t,method:n,splitKey:r="+"})=>{Bd(e).forEach(o=>{let i=o.split(r),s=i.length,u=i[s-1],l=u==="*"?"*":xs(u);if(!wt[l])return;t||(t=vs());let c=s>1?Fd(ir,i):[];wt[l]=wt[l].filter(g=>!((n?g.method===n:!0)&&g.scope===t&&k3(g.mods,c)))})};function L3(e,t,n,r){if(t.element!==r)return;let a;if(t.scope===n||t.scope==="all"){a=t.mods.length>0;for(let o in tn)Object.prototype.hasOwnProperty.call(tn,o)&&(!tn[o]&&t.mods.indexOf(+o)>-1||tn[o]&&t.mods.indexOf(+o)===-1)&&(a=!1);(t.mods.length===0&&!tn[16]&&!tn[18]&&!tn[17]&&!tn[91]||a||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(dt),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function _3(e,t){let n=wt["*"],r=e.keyCode||e.which||e.charCode;if(!qr.filter.call(this,e))return;if((r===93||r===224)&&(r=91),dt.indexOf(r)===-1&&r!==229&&dt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(o=>{let i=cl[o];e[o]&&dt.indexOf(i)===-1?dt.push(i):!e[o]&&dt.indexOf(i)>-1?dt.splice(dt.indexOf(i),1):o==="metaKey"&&e[o]&&dt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(dt=dt.slice(dt.indexOf(i))))}),r in tn){tn[r]=!0;for(let o in ir)ir[o]===r&&(qr[o]=!0);if(!n)return}for(let o in tn)Object.prototype.hasOwnProperty.call(tn,o)&&(tn[o]=e[cl[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(dt.indexOf(17)===-1&&dt.push(17),dt.indexOf(18)===-1&&dt.push(18),tn[17]=!0,tn[18]=!0);let a=vs();if(n)for(let o=0;o-1}function qr(e,t,n){dt=[];let r=Bd(e),a=[],o="all",i=document,s=0,u=!1,l=!0,c="+",g=!1,p=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(i=t.element),t.keyup&&(u=t.keyup),t.keydown!==void 0&&(l=t.keydown),t.capture!==void 0&&(g=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey),t.single===!0&&(p=!0)),typeof t=="string"&&(o=t),p&&B3(e,o);s1&&(a=Fd(ir,e)),e=e[e.length-1],e=e==="*"?"*":xs(e),e in wt||(wt[e]=[]),wt[e].push({keyup:u,keydown:l,scope:o,mods:a,shortcut:r[s],method:n,key:r[s],splitKey:c,element:i});typeof i<"u"&&!zv(i)&&window&&(P3.push(i),Ts(i,"keydown",f=>{_3(f,i)},g),A3||(A3=!0,Ts(window,"focus",()=>{dt=[]},g),Ts(window,"click",()=>{dt=[]},!1)),Ts(i,"keyup",f=>{_3(f,i),Hv(f)},g))}function qv(e,t="all"){Object.keys(wt).forEach(n=>{wt[n].filter(a=>a.scope===t&&a.shortcut===e).forEach(a=>{a&&a.method&&a.method()})})}var Id={getPressedKeyString:Iv,setScope:F3,getScope:vs,deleteScope:jv,getPressedKeyCodes:Rv,getAllKeyCodes:Ov,isPressed:Uv,filter:Nv,trigger:qv,unbind:B3,keyMap:ei,modifier:ir,modifierMap:cl};for(let e in Id)Object.prototype.hasOwnProperty.call(Id,e)&&(qr[e]=Id[e]);if(typeof window<"u"){let e=window.hotkeys;qr.noConflict=t=>(t&&window.hotkeys===qr&&(window.hotkeys=e),qr),window.hotkeys=qr}var Ut=qr;m();m();var Wv={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},I3={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},It={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},Sn={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ma={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"},Y=class{static getFirstMatch(e,t){let n=t.match(e);return n&&n.length>0&&n[1]||""}static getSecondMatch(e,t){let n=t.match(e);return n&&n.length>1&&n[2]||""}static matchAndReturnConst(e,t,n){if(e.test(t))return n}static getWindowsVersionName(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}static getMacOSVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),t[0]===10)switch(t[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(e){let t=e.split(".").splice(0,2).map(n=>parseInt(n,10)||0);if(t.push(0),!(t[0]===1&&t[1]<5)){if(t[0]===1&&t[1]<6)return"Cupcake";if(t[0]===1&&t[1]>=6)return"Donut";if(t[0]===2&&t[1]<2)return"Eclair";if(t[0]===2&&t[1]===2)return"Froyo";if(t[0]===2&&t[1]>2)return"Gingerbread";if(t[0]===3)return"Honeycomb";if(t[0]===4&&t[1]<1)return"Ice Cream Sandwich";if(t[0]===4&&t[1]<4)return"Jelly Bean";if(t[0]===4&&t[1]>=4)return"KitKat";if(t[0]===5)return"Lollipop";if(t[0]===6)return"Marshmallow";if(t[0]===7)return"Nougat";if(t[0]===8)return"Oreo";if(t[0]===9)return"Pie"}}static getVersionPrecision(e){return e.split(".").length}static compareVersions(e,t,n=!1){let r=Y.getVersionPrecision(e),a=Y.getVersionPrecision(t),o=Math.max(r,a),i=0,s=Y.map([e,t],u=>{let l=o-Y.getVersionPrecision(u),c=u+new Array(l+1).join(".0");return Y.map(c.split("."),g=>new Array(20-g.length).join("0")+g).reverse()});for(n&&(i=o-Math.min(r,a)),o-=1;o>=i;){if(s[0][o]>s[1][o])return 1;if(s[0][o]===s[1][o]){if(o===i)return 0;o-=1}else if(s[0][o]{n[i]=o[i]})}return e}static getBrowserAlias(e){return Wv[e]}static getBrowserTypeByAlias(e){return I3[e]||""}},gt=/version\/(\d+(\.?_?\d+)+)/i,$v=[{test:[/googlebot/i],describe(e){let t={name:"Googlebot"},n=Y.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/opera/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opr\/|opios/i],describe(e){let t={name:"Opera"},n=Y.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/SamsungBrowser/i],describe(e){let t={name:"Samsung Internet for Android"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Whale/i],describe(e){let t={name:"NAVER Whale Browser"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MZBrowser/i],describe(e){let t={name:"MZ Browser"},n=Y.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/focus/i],describe(e){let t={name:"Focus"},n=Y.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/swing/i],describe(e){let t={name:"Swing"},n=Y.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/coast/i],describe(e){let t={name:"Opera Coast"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(e){let t={name:"Opera Touch"},n=Y.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/yabrowser/i],describe(e){let t={name:"Yandex Browser"},n=Y.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/ucbrowser/i],describe(e){let t={name:"UC Browser"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/Maxthon|mxios/i],describe(e){let t={name:"Maxthon"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/epiphany/i],describe(e){let t={name:"Epiphany"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/puffin/i],describe(e){let t={name:"Puffin"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sleipnir/i],describe(e){let t={name:"Sleipnir"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/k-meleon/i],describe(e){let t={name:"K-Meleon"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/micromessenger/i],describe(e){let t={name:"WeChat"},n=Y.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qqbrowser/i],describe(e){let t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},n=Y.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/msie|trident/i],describe(e){let t={name:"Internet Explorer"},n=Y.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/\sedg\//i],describe(e){let t={name:"Microsoft Edge"},n=Y.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/edg([ea]|ios)/i],describe(e){let t={name:"Microsoft Edge"},n=Y.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/vivaldi/i],describe(e){let t={name:"Vivaldi"},n=Y.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/seamonkey/i],describe(e){let t={name:"SeaMonkey"},n=Y.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/sailfish/i],describe(e){let t={name:"Sailfish"},n=Y.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return n&&(t.version=n),t}},{test:[/silk/i],describe(e){let t={name:"Amazon Silk"},n=Y.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/phantom/i],describe(e){let t={name:"PhantomJS"},n=Y.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/slimerjs/i],describe(e){let t={name:"SlimerJS"},n=Y.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t={name:"BlackBerry"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(web|hpw)[o0]s/i],describe(e){let t={name:"WebOS Browser"},n=Y.getFirstMatch(gt,e)||Y.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/bada/i],describe(e){let t={name:"Bada"},n=Y.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/tizen/i],describe(e){let t={name:"Tizen"},n=Y.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/qupzilla/i],describe(e){let t={name:"QupZilla"},n=Y.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/firefox|iceweasel|fxios/i],describe(e){let t={name:"Firefox"},n=Y.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/electron/i],describe(e){let t={name:"Electron"},n=Y.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/MiuiBrowser/i],describe(e){let t={name:"Miui"},n=Y.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/chromium/i],describe(e){let t={name:"Chromium"},n=Y.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/chrome|crios|crmo/i],describe(e){let t={name:"Chrome"},n=Y.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/GSA/i],describe(e){let t={name:"Google Search"},n=Y.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t={name:"Android Browser"},n=Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/playstation 4/i],describe(e){let t={name:"PlayStation 4"},n=Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/safari|applewebkit/i],describe(e){let t={name:"Safari"},n=Y.getFirstMatch(gt,e);return n&&(t.version=n),t}},{test:[/.*/i],describe(e){let t=/^(.*)\/(.*) /,n=/^(.*)\/(.*)[ \t]\((.*)/,r=e.search("\\(")!==-1?n:t;return{name:Y.getFirstMatch(r,e),version:Y.getSecondMatch(r,e)}}}],Vv=$v,Kv=[{test:[/Roku\/DVP/],describe(e){let t=Y.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:Sn.Roku,version:t}}},{test:[/windows phone/i],describe(e){let t=Y.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:Sn.WindowsPhone,version:t}}},{test:[/windows /i],describe(e){let t=Y.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),n=Y.getWindowsVersionName(t);return{name:Sn.Windows,version:t,versionName:n}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(e){let t={name:Sn.iOS},n=Y.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return n&&(t.version=n),t}},{test:[/macintosh/i],describe(e){let t=Y.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),n=Y.getMacOSVersionName(t),r={name:Sn.MacOS,version:t};return n&&(r.versionName=n),r}},{test:[/(ipod|iphone|ipad)/i],describe(e){let t=Y.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:Sn.iOS,version:t}}},{test(e){let t=!e.test(/like android/i),n=e.test(/android/i);return t&&n},describe(e){let t=Y.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),n=Y.getAndroidVersionName(t),r={name:Sn.Android,version:t};return n&&(r.versionName=n),r}},{test:[/(web|hpw)[o0]s/i],describe(e){let t=Y.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),n={name:Sn.WebOS};return t&&t.length&&(n.version=t),n}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(e){let t=Y.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||Y.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||Y.getFirstMatch(/\bbb(\d+)/i,e);return{name:Sn.BlackBerry,version:t}}},{test:[/bada/i],describe(e){let t=Y.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:Sn.Bada,version:t}}},{test:[/tizen/i],describe(e){let t=Y.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:Sn.Tizen,version:t}}},{test:[/linux/i],describe(){return{name:Sn.Linux}}},{test:[/CrOS/],describe(){return{name:Sn.ChromeOS}}},{test:[/PlayStation 4/],describe(e){let t=Y.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:Sn.PlayStation4,version:t}}}],Gv=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(e){let t=Y.getFirstMatch(/(can-l01)/i,e)&&"Nova",n={type:It.mobile,vendor:"Huawei"};return t&&(n.model=t),n}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:It.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:It.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:It.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:It.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:It.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:It.tablet}}},{test(e){let t=e.test(/ipod|iphone/i),n=e.test(/like (ipod|iphone)/i);return t&&!n},describe(e){let t=Y.getFirstMatch(/(ipod|iphone)/i,e);return{type:It.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:It.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:It.mobile}}},{test(e){return e.getBrowserName(!0)==="blackberry"},describe(){return{type:It.mobile,vendor:"BlackBerry"}}},{test(e){return e.getBrowserName(!0)==="bada"},describe(){return{type:It.mobile}}},{test(e){return e.getBrowserName()==="windows phone"},describe(){return{type:It.mobile,vendor:"Microsoft"}}},{test(e){let t=Number(String(e.getOSVersion()).split(".")[0]);return e.getOSName(!0)==="android"&&t>=3},describe(){return{type:It.tablet}}},{test(e){return e.getOSName(!0)==="android"},describe(){return{type:It.mobile}}},{test(e){return e.getOSName(!0)==="macos"},describe(){return{type:It.desktop,vendor:"Apple"}}},{test(e){return e.getOSName(!0)==="windows"},describe(){return{type:It.desktop}}},{test(e){return e.getOSName(!0)==="linux"},describe(){return{type:It.desktop}}},{test(e){return e.getOSName(!0)==="playstation 4"},describe(){return{type:It.tv}}},{test(e){return e.getOSName(!0)==="roku"},describe(){return{type:It.tv}}}],Yv=[{test(e){return e.getBrowserName(!0)==="microsoft edge"},describe(e){if(/\sedg\//i.test(e))return{name:ma.Blink};let t=Y.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:ma.EdgeHTML,version:t}}},{test:[/trident/i],describe(e){let t={name:ma.Trident},n=Y.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){return e.test(/presto/i)},describe(e){let t={name:ma.Presto},n=Y.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test(e){let t=e.test(/gecko/i),n=e.test(/like gecko/i);return t&&!n},describe(e){let t={name:ma.Gecko},n=Y.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ma.Blink}}},{test:[/(apple)?webkit/i],describe(e){let t={name:ma.WebKit},n=Y.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return n&&(t.version=n),t}}],Jv=class{constructor(e,t=!1){if(e==null||e==="")throw new Error("UserAgent parameter can't be empty");this._ua=e,this.parsedResult={},t!==!0&&this.parse()}getUA(){return this._ua}test(e){return e.test(this._ua)}parseBrowser(){this.parsedResult.browser={};let e=Y.find(Vv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.browser=e.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(e){return e?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};let e=Y.find(Kv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.os=e.describe(this.getUA())),this.parsedResult.os}getOSName(e){let{name:t}=this.getOS();return e?String(t).toLowerCase()||"":t||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(e=!1){let{type:t}=this.getPlatform();return e?String(t).toLowerCase()||"":t||""}parsePlatform(){this.parsedResult.platform={};let e=Y.find(Gv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.platform=e.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(e){return e?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};let e=Y.find(Yv,t=>{if(typeof t.test=="function")return t.test(this);if(t.test instanceof Array)return t.test.some(n=>this.test(n));throw new Error("Browser's test function is not valid")});return e&&(this.parsedResult.engine=e.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Y.assign({},this.parsedResult)}satisfies(e){let t={},n=0,r={},a=0;if(Object.keys(e).forEach(o=>{let i=e[o];typeof i=="string"?(r[o]=i,a+=1):typeof i=="object"&&(t[o]=i,n+=1)}),n>0){let o=Object.keys(t),i=Y.find(o,u=>this.isOS(u));if(i){let u=this.satisfies(t[i]);if(u!==void 0)return u}let s=Y.find(o,u=>this.isPlatform(u));if(s){let u=this.satisfies(t[s]);if(u!==void 0)return u}}if(a>0){let o=Object.keys(r),i=Y.find(o,s=>this.isBrowser(s,!0));if(i!==void 0)return this.compareVersion(r[i])}}isBrowser(e,t=!1){let n=this.getBrowserName().toLowerCase(),r=e.toLowerCase(),a=Y.getBrowserTypeByAlias(r);return t&&a&&(r=a.toLowerCase()),r===n}compareVersion(e){let t=[0],n=e,r=!1,a=this.getBrowserVersion();if(typeof a=="string")return e[0]===">"||e[0]==="<"?(n=e.substr(1),e[1]==="="?(r=!0,n=e.substr(2)):t=[],e[0]===">"?t.push(1):t.push(-1)):e[0]==="="?n=e.substr(1):e[0]==="~"&&(r=!0,n=e.substr(1)),t.indexOf(Y.compareVersions(a,n,r))>-1}isOS(e){return this.getOSName(!0)===String(e).toLowerCase()}isPlatform(e){return this.getPlatformType(!0)===String(e).toLowerCase()}isEngine(e){return this.getEngineName(!0)===String(e).toLowerCase()}is(e,t=!1){return this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)}some(e=[]){return e.some(t=>this.is(t))}},R3=Jv,Qv=class{static getParser(e,t=!1){if(typeof e!="string")throw new Error("UserAgent should be a string");return new R3(e,t)}static parse(e){return new R3(e).getResult()}static get BROWSER_MAP(){return I3}static get ENGINE_MAP(){return ma}static get OS_MAP(){return Sn}static get PLATFORMS_MAP(){return It}},ti=Qv;m();m();var{entries:W3,setPrototypeOf:O3,isFrozen:Zv,getPrototypeOf:Xv,getOwnPropertyDescriptor:ex}=Object,{freeze:wn,seal:ur,create:tx}=Object,{apply:zd,construct:qd}=typeof Reflect<"u"&&Reflect;zd||(zd=function(e,t,n){return e.apply(t,n)});wn||(wn=function(e){return e});ur||(ur=function(e){return e});qd||(qd=function(e,t){return new e(...t)});var nx=Yn(Array.prototype.forEach),N3=Yn(Array.prototype.pop),Es=Yn(Array.prototype.push),ml=Yn(String.prototype.toLowerCase),Od=Yn(String.prototype.toString),rx=Yn(String.prototype.match),sr=Yn(String.prototype.replace),ax=Yn(String.prototype.indexOf),ox=Yn(String.prototype.trim),Hn=Yn(RegExp.prototype.test),Ss=ix(TypeError);function Yn(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a/gm),dx=ur(/\${[\w\W]*}/gm),gx=ur(/^data-[\-\w.\u00B7-\uFFFF]/),mx=ur(/^aria-[\-\w]+$/),$3=ur(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),px=ur(/^(?:\w+script|data):/i),fx=ur(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),V3=ur(/^html$/i),q3=Object.freeze({__proto__:null,MUSTACHE_EXPR:lx,ERB_EXPR:cx,TMPLIT_EXPR:dx,DATA_ATTR:gx,ARIA_ATTR:mx,IS_ALLOWED_URI:$3,IS_SCRIPT_OR_DATA:px,ATTR_WHITESPACE:fx,DOCTYPE_NAME:V3}),hx=()=>typeof window>"u"?null:window,bx=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}};function K3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:hx(),t=U=>K3(U);if(t.version="3.0.3",t.removed=[],!e||!e.document||e.document.nodeType!==9)return t.isSupported=!1,t;let n=e.document,r=n.currentScript,{document:a}=e,{DocumentFragment:o,HTMLTemplateElement:i,Node:s,Element:u,NodeFilter:l,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:p,trustedTypes:f}=e,h=u.prototype,y=dl(h,"cloneNode"),C=dl(h,"nextSibling"),b=dl(h,"childNodes"),x=dl(h,"parentNode");if(typeof i=="function"){let U=a.createElement("template");U.content&&U.content.ownerDocument&&(a=U.content.ownerDocument)}let S,A="",{implementation:P,createNodeIterator:w,createDocumentFragment:v,getElementsByTagName:L}=a,{importNode:D}=n,T={};t.isSupported=typeof W3=="function"&&typeof x=="function"&&P&&P.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:j,ERB_EXPR:R,TMPLIT_EXPR:M,DATA_ATTR:O,ARIA_ATTR:N,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:B}=q3,{IS_ALLOWED_URI:k}=q3,_=null,F=je({},[...U3,...Nd,...Ud,...jd,...j3]),q=null,z=je({},[...H3,...Hd,...z3,...gl]),V=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,oe=null,te=!0,Z=!0,ce=!1,he=!0,ae=!1,X=!1,ve=!1,se=!1,ue=!1,De=!1,He=!1,Fe=!0,pe=!1,Et="user-content-",$t=!0,At=!1,Ft={},Cn=null,Vn=je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),is=null,Tr=je({},["audio","video","img","source","image","track"]),eo=null,$o=je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cn="http://www.w3.org/1998/Math/MathML",nr="http://www.w3.org/2000/svg",dn="http://www.w3.org/1999/xhtml",Nn=dn,Br=!1,Rr=null,to=je({},[cn,nr,dn],Od),Tn,Ir=["application/xhtml+xml","text/html"],St="text/html",tt,Un=null,x5=a.createElement("form"),V4=function(U){return U instanceof RegExp||U instanceof Function},Bc=function(U){if(!(Un&&Un===U)){if((!U||typeof U!="object")&&(U={}),U=ni(U),Tn=Ir.indexOf(U.PARSER_MEDIA_TYPE)===-1?Tn=St:Tn=U.PARSER_MEDIA_TYPE,tt=Tn==="application/xhtml+xml"?Od:ml,_="ALLOWED_TAGS"in U?je({},U.ALLOWED_TAGS,tt):F,q="ALLOWED_ATTR"in U?je({},U.ALLOWED_ATTR,tt):z,Rr="ALLOWED_NAMESPACES"in U?je({},U.ALLOWED_NAMESPACES,Od):to,eo="ADD_URI_SAFE_ATTR"in U?je(ni($o),U.ADD_URI_SAFE_ATTR,tt):$o,is="ADD_DATA_URI_TAGS"in U?je(ni(Tr),U.ADD_DATA_URI_TAGS,tt):Tr,Cn="FORBID_CONTENTS"in U?je({},U.FORBID_CONTENTS,tt):Vn,K="FORBID_TAGS"in U?je({},U.FORBID_TAGS,tt):{},oe="FORBID_ATTR"in U?je({},U.FORBID_ATTR,tt):{},Ft="USE_PROFILES"in U?U.USE_PROFILES:!1,te=U.ALLOW_ARIA_ATTR!==!1,Z=U.ALLOW_DATA_ATTR!==!1,ce=U.ALLOW_UNKNOWN_PROTOCOLS||!1,he=U.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=U.SAFE_FOR_TEMPLATES||!1,X=U.WHOLE_DOCUMENT||!1,ue=U.RETURN_DOM||!1,De=U.RETURN_DOM_FRAGMENT||!1,He=U.RETURN_TRUSTED_TYPE||!1,se=U.FORCE_BODY||!1,Fe=U.SANITIZE_DOM!==!1,pe=U.SANITIZE_NAMED_PROPS||!1,$t=U.KEEP_CONTENT!==!1,At=U.IN_PLACE||!1,k=U.ALLOWED_URI_REGEXP||$3,Nn=U.NAMESPACE||dn,V=U.CUSTOM_ELEMENT_HANDLING||{},U.CUSTOM_ELEMENT_HANDLING&&V4(U.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=U.CUSTOM_ELEMENT_HANDLING.tagNameCheck),U.CUSTOM_ELEMENT_HANDLING&&V4(U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=U.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),U.CUSTOM_ELEMENT_HANDLING&&typeof U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=U.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(Z=!1),De&&(ue=!0),Ft&&(_=je({},[...j3]),q=[],Ft.html===!0&&(je(_,U3),je(q,H3)),Ft.svg===!0&&(je(_,Nd),je(q,Hd),je(q,gl)),Ft.svgFilters===!0&&(je(_,Ud),je(q,Hd),je(q,gl)),Ft.mathMl===!0&&(je(_,jd),je(q,z3),je(q,gl))),U.ADD_TAGS&&(_===F&&(_=ni(_)),je(_,U.ADD_TAGS,tt)),U.ADD_ATTR&&(q===z&&(q=ni(q)),je(q,U.ADD_ATTR,tt)),U.ADD_URI_SAFE_ATTR&&je(eo,U.ADD_URI_SAFE_ATTR,tt),U.FORBID_CONTENTS&&(Cn===Vn&&(Cn=ni(Cn)),je(Cn,U.FORBID_CONTENTS,tt)),$t&&(_["#text"]=!0),X&&je(_,["html","head","body"]),_.table&&(je(_,["tbody"]),delete K.tbody),U.TRUSTED_TYPES_POLICY){if(typeof U.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ss('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof U.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ss('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=U.TRUSTED_TYPES_POLICY,A=S.createHTML("")}else S===void 0&&(S=bx(f,r)),S!==null&&typeof A=="string"&&(A=S.createHTML(""));wn&&wn(U),Un=U}},K4=je({},["mi","mo","mn","ms","mtext"]),G4=je({},["foreignobject","desc","title","annotation-xml"]),E5=je({},["title","style","font","a","script"]),ju=je({},Nd);je(ju,Ud),je(ju,sx);let Rc=je({},jd);je(Rc,ux);let S5=function(U){let ge=x(U);(!ge||!ge.tagName)&&(ge={namespaceURI:Nn,tagName:"template"});let ne=ml(U.tagName),Je=ml(ge.tagName);return Rr[U.namespaceURI]?U.namespaceURI===nr?ge.namespaceURI===dn?ne==="svg":ge.namespaceURI===cn?ne==="svg"&&(Je==="annotation-xml"||K4[Je]):!!ju[ne]:U.namespaceURI===cn?ge.namespaceURI===dn?ne==="math":ge.namespaceURI===nr?ne==="math"&&G4[Je]:!!Rc[ne]:U.namespaceURI===dn?ge.namespaceURI===nr&&!G4[Je]||ge.namespaceURI===cn&&!K4[Je]?!1:!Rc[ne]&&(E5[ne]||!ju[ne]):!!(Tn==="application/xhtml+xml"&&Rr[U.namespaceURI]):!1},Vo=function(U){Es(t.removed,{element:U});try{U.parentNode.removeChild(U)}catch{U.remove()}},Ic=function(U,ge){try{Es(t.removed,{attribute:ge.getAttributeNode(U),from:ge})}catch{Es(t.removed,{attribute:null,from:ge})}if(ge.removeAttribute(U),U==="is"&&!q[U])if(ue||De)try{Vo(ge)}catch{}else try{ge.setAttribute(U,"")}catch{}},Y4=function(U){let ge,ne;if(se)U=""+U;else{let vn=rx(U,/^[\r\n\t ]+/);ne=vn&&vn[0]}Tn==="application/xhtml+xml"&&Nn===dn&&(U=''+U+"");let Je=S?S.createHTML(U):U;if(Nn===dn)try{ge=new p().parseFromString(Je,Tn)}catch{}if(!ge||!ge.documentElement){ge=P.createDocument(Nn,"template",null);try{ge.documentElement.innerHTML=Br?A:Je}catch{}}let Vt=ge.body||ge.documentElement;return U&&ne&&Vt.insertBefore(a.createTextNode(ne),Vt.childNodes[0]||null),Nn===dn?L.call(ge,X?"html":"body")[0]:X?ge.documentElement:Vt},J4=function(U){return w.call(U.ownerDocument||U,U,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},w5=function(U){return U instanceof g&&(typeof U.nodeName!="string"||typeof U.textContent!="string"||typeof U.removeChild!="function"||!(U.attributes instanceof c)||typeof U.removeAttribute!="function"||typeof U.setAttribute!="function"||typeof U.namespaceURI!="string"||typeof U.insertBefore!="function"||typeof U.hasChildNodes!="function")},Hu=function(U){return typeof s=="object"?U instanceof s:U&&typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.nodeName=="string"},Or=function(U,ge,ne){T[U]&&nx(T[U],Je=>{Je.call(t,ge,ne,Un)})},Q4=function(U){let ge;if(Or("beforeSanitizeElements",U,null),w5(U))return Vo(U),!0;let ne=tt(U.nodeName);if(Or("uponSanitizeElement",U,{tagName:ne,allowedTags:_}),U.hasChildNodes()&&!Hu(U.firstElementChild)&&(!Hu(U.content)||!Hu(U.content.firstElementChild))&&Hn(/<[/\w]/g,U.innerHTML)&&Hn(/<[/\w]/g,U.textContent))return Vo(U),!0;if(!_[ne]||K[ne]){if(!K[ne]&&X4(ne)&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,ne)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ne)))return!1;if($t&&!Cn[ne]){let Je=x(U)||U.parentNode,Vt=b(U)||U.childNodes;if(Vt&&Je){let vn=Vt.length;for(let Pn=vn-1;Pn>=0;--Pn)Je.insertBefore(y(Vt[Pn],!0),C(U))}}return Vo(U),!0}return U instanceof u&&!S5(U)||(ne==="noscript"||ne==="noembed")&&Hn(/<\/no(script|embed)/i,U.innerHTML)?(Vo(U),!0):(ae&&U.nodeType===3&&(ge=U.textContent,ge=sr(ge,j," "),ge=sr(ge,R," "),ge=sr(ge,M," "),U.textContent!==ge&&(Es(t.removed,{element:U.cloneNode()}),U.textContent=ge)),Or("afterSanitizeElements",U,null),!1)},Z4=function(U,ge,ne){if(Fe&&(ge==="id"||ge==="name")&&(ne in a||ne in x5))return!1;if(!(Z&&!oe[ge]&&Hn(O,ge))&&!(te&&Hn(N,ge))){if(!q[ge]||oe[ge]){if(!(X4(U)&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,U)||V.tagNameCheck instanceof Function&&V.tagNameCheck(U))&&(V.attributeNameCheck instanceof RegExp&&Hn(V.attributeNameCheck,ge)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(ge))||ge==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&Hn(V.tagNameCheck,ne)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ne))))return!1}else if(!eo[ge]&&!Hn(k,sr(ne,B,""))&&!((ge==="src"||ge==="xlink:href"||ge==="href")&&U!=="script"&&ax(ne,"data:")===0&&is[U])&&!(ce&&!Hn(H,sr(ne,B,"")))&&ne)return!1}return!0},X4=function(U){return U.indexOf("-")>0},ef=function(U){let ge,ne,Je,Vt;Or("beforeSanitizeAttributes",U,null);let{attributes:vn}=U;if(!vn)return;let Pn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q};for(Vt=vn.length;Vt--;){ge=vn[Vt];let{name:Xt,namespaceURI:Ko}=ge;if(ne=Xt==="value"?ge.value:ox(ge.value),Je=tt(Xt),Pn.attrName=Je,Pn.attrValue=ne,Pn.keepAttr=!0,Pn.forceKeepAttr=void 0,Or("uponSanitizeAttribute",U,Pn),ne=Pn.attrValue,Pn.forceKeepAttr||(Ic(Xt,U),!Pn.keepAttr))continue;if(!he&&Hn(/\/>/i,ne)){Ic(Xt,U);continue}ae&&(ne=sr(ne,j," "),ne=sr(ne,R," "),ne=sr(ne,M," "));let tf=tt(U.nodeName);if(Z4(tf,Je,ne)){if(pe&&(Je==="id"||Je==="name")&&(Ic(Xt,U),ne=Et+ne),S&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ko)switch(f.getAttributeType(tf,Je)){case"TrustedHTML":{ne=S.createHTML(ne);break}case"TrustedScriptURL":{ne=S.createScriptURL(ne);break}}try{Ko?U.setAttributeNS(Ko,Xt,ne):U.setAttribute(Xt,ne),N3(t.removed)}catch{}}}Or("afterSanitizeAttributes",U,null)},D5=function U(ge){let ne,Je=J4(ge);for(Or("beforeSanitizeShadowDOM",ge,null);ne=Je.nextNode();)Or("uponSanitizeShadowNode",ne,null),!Q4(ne)&&(ne.content instanceof o&&U(ne.content),ef(ne));Or("afterSanitizeShadowDOM",ge,null)};return t.sanitize=function(U){let ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ne,Je,Vt,vn;if(Br=!U,Br&&(U=""),typeof U!="string"&&!Hu(U))if(typeof U.toString=="function"){if(U=U.toString(),typeof U!="string")throw Ss("dirty is not a string, aborting")}else throw Ss("toString is not a function");if(!t.isSupported)return U;if(ve||Bc(ge),t.removed=[],typeof U=="string"&&(At=!1),At){if(U.nodeName){let Ko=tt(U.nodeName);if(!_[Ko]||K[Ko])throw Ss("root node is forbidden and cannot be sanitized in-place")}}else if(U instanceof s)ne=Y4(""),Je=ne.ownerDocument.importNode(U,!0),Je.nodeType===1&&Je.nodeName==="BODY"||Je.nodeName==="HTML"?ne=Je:ne.appendChild(Je);else{if(!ue&&!ae&&!X&&U.indexOf("<")===-1)return S&&He?S.createHTML(U):U;if(ne=Y4(U),!ne)return ue?null:He?A:""}ne&&se&&Vo(ne.firstChild);let Pn=J4(At?U:ne);for(;Vt=Pn.nextNode();)Q4(Vt)||(Vt.content instanceof o&&D5(Vt.content),ef(Vt));if(At)return U;if(ue){if(De)for(vn=v.call(ne.ownerDocument);ne.firstChild;)vn.appendChild(ne.firstChild);else vn=ne;return(q.shadowroot||q.shadowrootmod)&&(vn=D.call(n,vn,!0)),vn}let Xt=X?ne.outerHTML:ne.innerHTML;return X&&_["!doctype"]&&ne.ownerDocument&&ne.ownerDocument.doctype&&ne.ownerDocument.doctype.name&&Hn(V3,ne.ownerDocument.doctype.name)&&(Xt=" +`+Xt),ae&&(Xt=sr(Xt,j," "),Xt=sr(Xt,R," "),Xt=sr(Xt,M," ")),S&&He?S.createHTML(Xt):Xt},t.setConfig=function(U){Bc(U),ve=!0},t.clearConfig=function(){Un=null,ve=!1},t.isValidAttribute=function(U,ge,ne){Un||Bc({});let Je=tt(U),Vt=tt(ge);return Z4(Je,Vt,ne)},t.addHook=function(U,ge){typeof ge=="function"&&(T[U]=T[U]||[],Es(T[U],ge))},t.removeHook=function(U){if(T[U])return N3(T[U])},t.removeHooks=function(U){T[U]&&(T[U]=[])},t.removeAllHooks=function(){T={}},t}var nt=K3();m();m();var yx=Object.create,$d=Object.defineProperty,Cx=Object.getOwnPropertyDescriptor,Tx=Object.getOwnPropertyNames,vx=Object.getPrototypeOf,xx=Object.prototype.hasOwnProperty,Vd=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ex=(e,t)=>{for(var n in t)$d(e,n,{get:t[n],enumerable:!0})},Wd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Tx(t))!xx.call(e,a)&&a!==n&&$d(e,a,{get:()=>t[a],enumerable:!(r=Cx(t,a))||r.enumerable});return e},Sx=(e,t,n)=>(Wd(e,t,"default"),n&&Wd(n,t,"default")),Y3=(e,t,n)=>(n=e!=null?yx(vx(e)):{},Wd(t||!e||!e.__esModule?$d(n,"default",{value:e,enumerable:!0}):n,e)),wx=Vd((e,t)=>{function n(r,a){if(a&&a.documentElement)r=a,a=arguments[2];else if(!r||!r.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(a=a||{},this._doc=r,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!a.debug,this._maxElemsToParse=a.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=a.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=a.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(a.classesToPreserve||[]),this._keepClasses=!!a.keepClasses,this._serializer=a.serializer||function(o){return o.innerHTML},this._disableJSONLD=!!a.disableJSONLD,this._allowedVideoRegex=a.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let o=function(i){if(i.nodeType==i.TEXT_NODE)return`${i.nodeName} ("${i.textContent}")`;let s=Array.from(i.attributes||[],function(u){return`${u.name}="${u.value}"`}).join(" ");return`<${i.localName} ${s}>`};this.log=function(){if(typeof console<"u")Array.from(arguments,u=>u&&u.nodeType==this.ELEMENT_NODE?o(u):u).unshift("Reader: (Readability)");else if(typeof dump<"u"){var i=Array.prototype.map.call(arguments,function(s){return s&&s.nodeName?o(s):s}).join(" ");dump("Reader: (Readability) "+i+` +`)}}}else this.log=function(){}}n.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(r){this._fixRelativeUris(r),this._simplifyNestedElements(r),this._keepClasses||this._cleanClasses(r)},_removeNodes:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var o=r.length-1;o>=0;o--){var i=r[o],s=i.parentNode;s&&(!a||a.call(this,i,o,r))&&s.removeChild(i)}},_replaceNodeTags:function(r,a){if(this._docJSDOMParser&&r._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let o of r)this._setNodeTag(o,a)},_forEachNode:function(r,a){Array.prototype.forEach.call(r,a,this)},_findNode:function(r,a){return Array.prototype.find.call(r,a,this)},_someNode:function(r,a){return Array.prototype.some.call(r,a,this)},_everyNode:function(r,a){return Array.prototype.every.call(r,a,this)},_concatNodeLists:function(){var r=Array.prototype.slice,a=r.call(arguments),o=a.map(function(i){return r.call(i)});return Array.prototype.concat.apply([],o)},_getAllNodesWithTag:function(r,a){return r.querySelectorAll?r.querySelectorAll(a.join(",")):[].concat.apply([],a.map(function(o){var i=r.getElementsByTagName(o);return Array.isArray(i)?i:Array.from(i)}))},_cleanClasses:function(r){var a=this._classesToPreserve,o=(r.getAttribute("class")||"").split(/\s+/).filter(function(i){return a.indexOf(i)!=-1}).join(" ");for(o?r.setAttribute("class",o):r.removeAttribute("class"),r=r.firstElementChild;r;r=r.nextElementSibling)this._cleanClasses(r)},_fixRelativeUris:function(r){var a=this._doc.baseURI,o=this._doc.documentURI;function i(l){if(a==o&&l.charAt(0)=="#")return l;try{return new URL(l,a).href}catch{}return l}var s=this._getAllNodesWithTag(r,["a"]);this._forEachNode(s,function(l){var c=l.getAttribute("href");if(c)if(c.indexOf("javascript:")===0)if(l.childNodes.length===1&&l.childNodes[0].nodeType===this.TEXT_NODE){var g=this._doc.createTextNode(l.textContent);l.parentNode.replaceChild(g,l)}else{for(var p=this._doc.createElement("span");l.firstChild;)p.appendChild(l.firstChild);l.parentNode.replaceChild(p,l)}else l.setAttribute("href",i(c))});var u=this._getAllNodesWithTag(r,["img","picture","figure","video","audio","source"]);this._forEachNode(u,function(l){var c=l.getAttribute("src"),g=l.getAttribute("poster"),p=l.getAttribute("srcset");if(c&&l.setAttribute("src",i(c)),g&&l.setAttribute("poster",i(g)),p){var f=p.replace(this.REGEXPS.srcsetUrl,function(h,y,C,b){return i(y)+(C||"")+b});l.setAttribute("srcset",f)}})},_simplifyNestedElements:function(r){for(var a=r;a;){if(a.parentNode&&["DIV","SECTION"].includes(a.tagName)&&!(a.id&&a.id.startsWith("readability"))){if(this._isElementWithoutContent(a)){a=this._removeAndGetNext(a);continue}else if(this._hasSingleTagInsideElement(a,"DIV")||this._hasSingleTagInsideElement(a,"SECTION")){for(var o=a.children[0],i=0;i»] /.test(a))i=/ [\\\/>»] /.test(a),a=o.replace(/(.*)[\|\-\\\/>»] .*/gi,"$1"),s(a)<3&&(a=o.replace(/[^\|\-\\\/>»]*[\|\-\\\/>»](.*)/gi,"$1"));else if(a.indexOf(": ")!==-1){var u=this._concatNodeLists(r.getElementsByTagName("h1"),r.getElementsByTagName("h2")),l=a.trim(),c=this._someNode(u,function(f){return f.textContent.trim()===l});c||(a=o.substring(o.lastIndexOf(":")+1),s(a)<3?a=o.substring(o.indexOf(":")+1):s(o.substr(0,o.indexOf(":")))>5&&(a=o))}else if(a.length>150||a.length<15){var g=r.getElementsByTagName("h1");g.length===1&&(a=this._getInnerText(g[0]))}a=a.trim().replace(this.REGEXPS.normalize," ");var p=s(a);return p<=4&&(!i||p!=s(o.replace(/[\|\-\\\/>»]+/g,""))-1)&&(a=o),a},_prepDocument:function(){var r=this._doc;this._removeNodes(this._getAllNodesWithTag(r,["style"])),r.body&&this._replaceBrs(r.body),this._replaceNodeTags(this._getAllNodesWithTag(r,["font"]),"SPAN")},_nextNode:function(r){for(var a=r;a&&a.nodeType!=this.ELEMENT_NODE&&this.REGEXPS.whitespace.test(a.textContent);)a=a.nextSibling;return a},_replaceBrs:function(r){this._forEachNode(this._getAllNodesWithTag(r,["br"]),function(a){for(var o=a.nextSibling,i=!1;(o=this._nextNode(o))&&o.tagName=="BR";){i=!0;var s=o.nextSibling;o.parentNode.removeChild(o),o=s}if(i){var u=this._doc.createElement("p");for(a.parentNode.replaceChild(u,a),o=u.nextSibling;o;){if(o.tagName=="BR"){var l=this._nextNode(o.nextSibling);if(l&&l.tagName=="BR")break}if(!this._isPhrasingContent(o))break;var c=o.nextSibling;u.appendChild(o),o=c}for(;u.lastChild&&this._isWhitespace(u.lastChild);)u.removeChild(u.lastChild);u.parentNode.tagName==="P"&&this._setNodeTag(u.parentNode,"DIV")}})},_setNodeTag:function(r,a){if(this.log("_setNodeTag",r,a),this._docJSDOMParser)return r.localName=a.toLowerCase(),r.tagName=a.toUpperCase(),r;for(var o=r.ownerDocument.createElement(a);r.firstChild;)o.appendChild(r.firstChild);r.parentNode.replaceChild(o,r),r.readability&&(o.readability=r.readability);for(var i=0;i!o.includes(l)),u=s.join(" ").length/i.join(" ").length;return 1-u},_checkByline:function(r,a){if(this._articleByline)return!1;if(r.getAttribute!==void 0)var o=r.getAttribute("rel"),i=r.getAttribute("itemprop");return(o==="author"||i&&i.indexOf("author")!==-1||this.REGEXPS.byline.test(a))&&this._isValidByline(r.textContent)?(this._articleByline=r.textContent.trim(),!0):!1},_getNodeAncestors:function(r,a){a=a||0;for(var o=0,i=[];r.parentNode&&(i.push(r.parentNode),!(a&&++o===a));)r=r.parentNode;return i},_grabArticle:function(r){this.log("**** grabArticle ****");var a=this._doc,o=r!==null;if(r=r||this._doc.body,!r)return this.log("No body found in document. Abort."),null;for(var i=r.innerHTML;;){this.log("Starting grabArticle loop");var s=this._flagIsActive(this.FLAG_STRIP_UNLIKELYS),u=[],l=this._doc.documentElement;let se=!0;for(;l;){l.tagName==="HTML"&&(this._articleLang=l.getAttribute("lang"));var c=l.className+" "+l.id;if(!this._isProbablyVisible(l)){this.log("Removing hidden node - "+c),l=this._removeAndGetNext(l);continue}if(l.getAttribute("aria-modal")=="true"&&l.getAttribute("role")=="dialog"){l=this._removeAndGetNext(l);continue}if(this._checkByline(l,c)){l=this._removeAndGetNext(l);continue}if(se&&this._headerDuplicatesTitle(l)){this.log("Removing header: ",l.textContent.trim(),this._articleTitle.trim()),se=!1,l=this._removeAndGetNext(l);continue}if(s){if(this.REGEXPS.unlikelyCandidates.test(c)&&!this.REGEXPS.okMaybeItsACandidate.test(c)&&!this._hasAncestorTag(l,"table")&&!this._hasAncestorTag(l,"code")&&l.tagName!=="BODY"&&l.tagName!=="A"){this.log("Removing unlikely candidate - "+c),l=this._removeAndGetNext(l);continue}if(this.UNLIKELY_ROLES.includes(l.getAttribute("role"))){this.log("Removing content with role "+l.getAttribute("role")+" - "+c),l=this._removeAndGetNext(l);continue}}if((l.tagName==="DIV"||l.tagName==="SECTION"||l.tagName==="HEADER"||l.tagName==="H1"||l.tagName==="H2"||l.tagName==="H3"||l.tagName==="H4"||l.tagName==="H5"||l.tagName==="H6")&&this._isElementWithoutContent(l)){l=this._removeAndGetNext(l);continue}if(this.DEFAULT_TAGS_TO_SCORE.indexOf(l.tagName)!==-1&&u.push(l),l.tagName==="DIV"){for(var g=null,p=l.firstChild;p;){var f=p.nextSibling;if(this._isPhrasingContent(p))g!==null?g.appendChild(p):this._isWhitespace(p)||(g=a.createElement("p"),l.replaceChild(g,p),g.appendChild(p));else if(g!==null){for(;g.lastChild&&this._isWhitespace(g.lastChild);)g.removeChild(g.lastChild);g=null}p=f}if(this._hasSingleTagInsideElement(l,"P")&&this._getLinkDensity(l)<.25){var h=l.children[0];l.parentNode.replaceChild(h,l),l=h,u.push(l)}else this._hasChildBlockElement(l)||(l=this._setNodeTag(l,"P"),u.push(l))}l=this._getNextNode(l)}var y=[];this._forEachNode(u,function(ue){if(!(!ue.parentNode||typeof ue.parentNode.tagName>"u")){var De=this._getInnerText(ue);if(!(De.length<25)){var He=this._getNodeAncestors(ue,5);if(He.length!==0){var Fe=0;Fe+=1,Fe+=De.split(",").length,Fe+=Math.min(Math.floor(De.length/100),3),this._forEachNode(He,function(pe,Et){if(!(!pe.tagName||!pe.parentNode||typeof pe.parentNode.tagName>"u")){if(typeof pe.readability>"u"&&(this._initializeNode(pe),y.push(pe)),Et===0)var $t=1;else Et===1?$t=2:$t=Et*3;pe.readability.contentScore+=Fe/$t}})}}}});for(var C=[],b=0,x=y.length;bw.readability.contentScore){C.splice(P,0,S),C.length>this._nbTopCandidates&&C.pop();break}}}var v=C[0]||null,L=!1,D;if(v===null||v.tagName==="BODY"){for(v=a.createElement("DIV"),L=!0;r.firstChild;)this.log("Moving child out:",r.firstChild),v.appendChild(r.firstChild);r.appendChild(v),this._initializeNode(v)}else if(v){for(var T=[],j=1;j=.75&&T.push(this._getNodeAncestors(C[j]));var R=3;if(T.length>=R)for(D=v.parentNode;D.tagName!=="BODY";){for(var M=0,O=0;O=R){v=D;break}D=D.parentNode}v.readability||this._initializeNode(v),D=v.parentNode;for(var N=v.readability.contentScore,H=N/3;D.tagName!=="BODY";){if(!D.readability){D=D.parentNode;continue}var B=D.readability.contentScore;if(BN){v=D;break}N=D.readability.contentScore,D=D.parentNode}for(D=v.parentNode;D.tagName!="BODY"&&D.children.length==1;)v=D,D=v.parentNode;v.readability||this._initializeNode(v)}var k=a.createElement("DIV");o&&(k.id="readability-content");var _=Math.max(10,v.readability.contentScore*.2);D=v.parentNode;for(var F=D.children,q=0,z=F.length;q=_)K=!0;else if(V.nodeName==="P"){var te=this._getLinkDensity(V),Z=this._getInnerText(V),ce=Z.length;(ce>80&&te<.25||ce<80&&ce>0&&te===0&&Z.search(/\.( |$)/)!==-1)&&(K=!0)}}K&&(this.log("Appending node:",V),this.ALTER_TO_DIV_EXCEPTIONS.indexOf(V.nodeName)===-1&&(this.log("Altering sibling:",V,"to div."),V=this._setNodeTag(V,"DIV")),k.appendChild(V),F=D.children,q-=1,z-=1)}if(this._debug&&this.log("Article content pre-prep: "+k.innerHTML),this._prepArticle(k),this._debug&&this.log("Article content post-prep: "+k.innerHTML),L)v.id="readability-page-1",v.className="page";else{var he=a.createElement("DIV");for(he.id="readability-page-1",he.className="page";k.firstChild;)he.appendChild(k.firstChild);k.appendChild(he)}this._debug&&this.log("Article content after paging: "+k.innerHTML);var ae=!0,X=this._getInnerText(k,!0).length;if(X0&&r.length<100):!1},_unescapeHtmlEntities:function(r){if(!r)return r;var a=this.HTML_ESCAPE_MAP;return r.replace(/&(quot|amp|apos|lt|gt);/g,function(o,i){return a[i]}).replace(/&#(?:x([0-9a-z]{1,4})|([0-9]{1,4}));/gi,function(o,i,s){var u=parseInt(i||s,i?16:10);return String.fromCharCode(u)})},_getJSONLD:function(r){var a=this._getAllNodesWithTag(r,["script"]),o;return this._forEachNode(a,function(i){if(!o&&i.getAttribute("type")==="application/ld+json")try{var s=i.textContent.replace(/^\s*\s*$/g,""),u=JSON.parse(s);if(!u["@context"]||!u["@context"].match(/^https?\:\/\/schema\.org$/)||(!u["@type"]&&Array.isArray(u["@graph"])&&(u=u["@graph"].find(function(p){return(p["@type"]||"").match(this.REGEXPS.jsonLdArticleTypes)})),!u||!u["@type"]||!u["@type"].match(this.REGEXPS.jsonLdArticleTypes)))return;if(o={},typeof u.name=="string"&&typeof u.headline=="string"&&u.name!==u.headline){var l=this._getArticleTitle(),c=this._textSimilarity(u.name,l)>.75,g=this._textSimilarity(u.headline,l)>.75;g&&!c?o.title=u.headline:o.title=u.name}else typeof u.name=="string"?o.title=u.name.trim():typeof u.headline=="string"&&(o.title=u.headline.trim());u.author&&(typeof u.author.name=="string"?o.byline=u.author.name.trim():Array.isArray(u.author)&&u.author[0]&&typeof u.author[0].name=="string"&&(o.byline=u.author.filter(function(p){return p&&typeof p.name=="string"}).map(function(p){return p.name.trim()}).join(", "))),typeof u.description=="string"&&(o.excerpt=u.description.trim()),u.publisher&&typeof u.publisher.name=="string"&&(o.siteName=u.publisher.name.trim());return}catch(p){this.log(p.message)}}),o||{}},_getArticleMetadata:function(r){var a={},o={},i=this._doc.getElementsByTagName("meta"),s=/\s*(dc|dcterm|og|twitter)\s*:\s*(author|creator|description|title|site_name)\s*/gi,u=/^\s*(?:(dc|dcterm|og|twitter|weibo:(article|webpage))\s*[\.:]\s*)?(author|creator|description|title|site_name)\s*$/i;return this._forEachNode(i,function(l){var c=l.getAttribute("name"),g=l.getAttribute("property"),p=l.getAttribute("content");if(p){var f=null,h=null;g&&(f=g.match(s),f&&(h=f[0].toLowerCase().replace(/\s/g,""),o[h]=p.trim())),!f&&c&&u.test(c)&&(h=c,p&&(h=h.toLowerCase().replace(/\s/g,"").replace(/\./g,":"),o[h]=p.trim()))}}),a.title=r.title||o["dc:title"]||o["dcterm:title"]||o["og:title"]||o["weibo:article:title"]||o["weibo:webpage:title"]||o.title||o["twitter:title"],a.title||(a.title=this._getArticleTitle()),a.byline=r.byline||o["dc:creator"]||o["dcterm:creator"]||o.author,a.excerpt=r.excerpt||o["dc:description"]||o["dcterm:description"]||o["og:description"]||o["weibo:article:description"]||o["weibo:webpage:description"]||o.description||o["twitter:description"],a.siteName=r.siteName||o["og:site_name"],a.title=this._unescapeHtmlEntities(a.title),a.byline=this._unescapeHtmlEntities(a.byline),a.excerpt=this._unescapeHtmlEntities(a.excerpt),a.siteName=this._unescapeHtmlEntities(a.siteName),a},_isSingleImage:function(r){return r.tagName==="IMG"?!0:r.children.length!==1||r.textContent.trim()!==""?!1:this._isSingleImage(r.children[0])},_unwrapNoscriptImages:function(r){var a=Array.from(r.getElementsByTagName("img"));this._forEachNode(a,function(i){for(var s=0;s"u"?!0:a;var o=r.textContent.trim();return a?o.replace(this.REGEXPS.normalize," "):o},_getCharCount:function(r,a){return a=a||",",this._getInnerText(r).split(a).length-1},_cleanStyles:function(r){if(!(!r||r.tagName.toLowerCase()==="svg")){for(var a=0;a0&&s>o)return!1;if(r.parentNode.tagName===a&&(!i||i(r.parentNode)))return!0;r=r.parentNode,s++}return!1},_getRowAndColumnCount:function(r){for(var a=0,o=0,i=r.getElementsByTagName("tr"),s=0;s0){i._readabilityDataTable=!0;continue}var g=["col","colgroup","tfoot","thead","th"],p=function(h){return!!i.getElementsByTagName(h)[0]};if(g.some(p)){this.log("Data table because found data-y descendant"),i._readabilityDataTable=!0;continue}if(i.getElementsByTagName("table")[0]){i._readabilityDataTable=!1;continue}var f=this._getRowAndColumnCount(i);if(f.rows>=10||f.columns>4){i._readabilityDataTable=!0;continue}i._readabilityDataTable=f.rows*f.columns>10}},_fixLazyImages:function(r){this._forEachNode(this._getAllNodesWithTag(r,["img","picture","figure"]),function(a){if(a.src&&this.REGEXPS.b64DataUrl.test(a.src)){var o=this.REGEXPS.b64DataUrl.exec(a.src);if(o[1]==="image/svg+xml")return;for(var i=!1,s=0;si+=this._getInnerText(u,!0).length),i/o},_cleanConditionally:function(r,a){this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)&&this._removeNodes(this._getAllNodesWithTag(r,[a]),function(o){var i=function(D){return D._readabilityDataTable},s=a==="ul"||a==="ol";if(!s){var u=0,l=this._getAllNodesWithTag(o,["ul","ol"]);this._forEachNode(l,D=>u+=this._getInnerText(D).length),s=u/this._getInnerText(o).length>.9}if(a==="table"&&i(o)||this._hasAncestorTag(o,"table",-1,i)||this._hasAncestorTag(o,"code"))return!1;var c=this._getClassWeight(o);this.log("Cleaning Conditionally",o);var g=0;if(c+g<0)return!0;if(this._getCharCount(o,",")<10){for(var p=o.getElementsByTagName("p").length,f=o.getElementsByTagName("img").length,h=o.getElementsByTagName("li").length-100,y=o.getElementsByTagName("input").length,C=this._getTextDensity(o,["h1","h2","h3","h4","h5","h6"]),b=0,x=this._getAllNodesWithTag(o,["object","embed","iframe"]),S=0;S1&&p/f<.5&&!this._hasAncestorTag(o,"figure")||!s&&h>p||y>Math.floor(p/3)||!s&&C<.9&&w<25&&(f===0||f>2)&&!this._hasAncestorTag(o,"figure")||!s&&c<25&&P>.2||c>=25&&P>.5||b===1&&w<75||b>1;if(s&&v){for(var L=0;L1)return v;let D=o.getElementsByTagName("li").length;if(f==D)return!1}return v}return!1})},_cleanMatchedNodes:function(r,a){for(var o=this._getNextNode(r,!0),i=this._getNextNode(r);i&&i!=o;)a.call(this,i,i.className+" "+i.id)?i=this._removeAndGetNext(i):i=this._getNextNode(i)},_cleanHeaders:function(r){let a=this._getAllNodesWithTag(r,["h1","h2"]);this._removeNodes(a,function(o){let i=this._getClassWeight(o)<0;return i&&this.log("Removing header with low class weight:",o),i})},_headerDuplicatesTitle:function(r){if(r.tagName!="H1"&&r.tagName!="H2")return!1;var a=this._getInnerText(r,!1);return this.log("Evaluating similarity of header:",a,this._articleTitle),this._textSimilarity(this._articleTitle,a)>.75},_flagIsActive:function(r){return(this._flags&r)>0},_removeFlag:function(r){this._flags=this._flags&~r},_isProbablyVisible:function(r){return(!r.style||r.style.display!="none")&&!r.hasAttribute("hidden")&&(!r.hasAttribute("aria-hidden")||r.getAttribute("aria-hidden")!="true"||r.className&&r.className.indexOf&&r.className.indexOf("fallback-image")!==-1)},parse:function(){if(this._maxElemsToParse>0){var r=this._doc.getElementsByTagName("*").length;if(r>this._maxElemsToParse)throw new Error("Aborting parsing document; "+r+" elements found")}this._unwrapNoscriptImages(this._doc);var a=this._disableJSONLD?{}:this._getJSONLD(this._doc);this._removeScripts(this._doc),this._prepDocument();var o=this._getArticleMetadata(a);this._articleTitle=o.title;var i=this._grabArticle();if(!i)return null;if(this.log("Grabbed: "+i.innerHTML),this._postProcessContent(i),!o.excerpt){var s=i.getElementsByTagName("p");s.length>0&&(o.excerpt=s[0].textContent.trim())}var u=i.textContent;return{title:this._articleTitle,byline:o.byline||this._articleByline,dir:this._articleDir,lang:this._articleLang,content:this._serializer(i),textContent:u,length:u.length,excerpt:o.excerpt,siteName:o.siteName||this._articleSiteName}}},typeof t=="object"&&(t.exports=n)}),Dx=Vd((e,t)=>{var n={unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i};function r(o){return(!o.style||o.style.display!="none")&&!o.hasAttribute("hidden")&&(!o.hasAttribute("aria-hidden")||o.getAttribute("aria-hidden")!="true"||o.className&&o.className.indexOf&&o.className.indexOf("fallback-image")!==-1)}function a(o,i={}){typeof i=="function"&&(i={visibilityChecker:i});var s={minScore:20,minContentLength:140,visibilityChecker:r};i=Object.assign(s,i);var u=o.querySelectorAll("p, pre, article"),l=o.querySelectorAll("div > br");if(l.length){var c=new Set(u);[].forEach.call(l,function(p){c.add(p.parentNode)}),u=Array.from(c)}var g=0;return[].some.call(u,function(p){if(!i.visibilityChecker(p))return!1;var f=p.className+" "+p.id;if(n.unlikelyCandidates.test(f)&&!n.okMaybeItsACandidate.test(f)||p.matches("li p"))return!1;var h=p.textContent.trim().length;return hi.minScore)})}typeof t=="object"&&(t.exports=a)}),J3=Vd((e,t)=>{var n=wx(),r=Dx();t.exports={Readability:n,isProbablyReaderable:r}}),Q3={};Ex(Q3,{Readability:()=>pl,default:()=>eh,isProbablyReaderable:()=>X3});var Z3=Y3(J3());Sx(Q3,Y3(J3()));var{Readability:pl,isProbablyReaderable:X3}=Z3,{default:G3,...kx}=Z3,eh=G3!==void 0?G3:kx;m();m();m();m();m();m();m();m();m();var th=Object.prototype.toString;function fl(e){switch(th.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return xr(e,Error)}}function ws(e,t){return th.call(e)===`[object ${t}]`}function hl(e){return ws(e,"ErrorEvent")}function nh(e){return ws(e,"DOMException")}function Wr(e){return ws(e,"String")}function bl(e){return e===null||typeof e!="object"&&typeof e!="function"}function $r(e){return ws(e,"Object")}function Ds(e){return typeof Event<"u"&&xr(e,Event)}function rh(e){return!1}function ah(e){return ws(e,"RegExp")}function ks(e){return!!(e&&e.then&&typeof e.then=="function")}function oh(e){return $r(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ih(e){return typeof e=="number"&&e!==e}function xr(e,t){try{return e instanceof t}catch{return!1}}function As(e,t){try{let n=e,r=5,a=80,o=[],i=0,s=0,u=" > ",l=u.length,c;for(;n&&i++1&&s+o.length*l+c.length>=a));)o.push(c),s+=c.length,n=n.parentNode;return o.reverse().join(u)}catch{return""}}function Ax(e,t){let n=e,r=[],a,o,i,s,u;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());let l=t&&t.length?t.filter(g=>n.getAttribute(g)).map(g=>[g,n.getAttribute(g)]):null;if(l&&l.length)l.forEach(g=>{r.push(`[${g[0]}="${g[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),a=n.className,a&&Wr(a))for(o=a.split(/\s+/),u=0;u{let o=n[a]&&n[a].__sentry_original__;a in console&&o&&(r[a]=n[a],n[a]=o)});try{return e()}finally{Object.keys(r).forEach(a=>{n[a]=r[a]})}}function uh(){let e=!1,t={enable:()=>{e=!0},disable:()=>{e=!1}};return!1?Ls.forEach(n=>{t[n]=(...r)=>{e&&Gd(()=>{})}}):Ls.forEach(n=>{t[n]=()=>{}}),t}var rt;!1?rt=ri("logger",uh):rt=uh();m();m();function yl(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.substr(0,t)}...`}function Yd(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r"}}function ch(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function dh(e,t=40){let n=Object.keys(Zd(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return yl(n[0],t);for(let r=n.length;r>0;r--){let a=n.slice(0,r).join(", ");if(!(a.length>t))return r===n.length?a:yl(a,t)}return""}function _s(e){return Jd(e,new Map)}function Jd(e,t){if($r(e)){let n=t.get(e);if(n!==void 0)return n;let r={};t.set(e,r);for(let a of Object.keys(e))typeof e[a]<"u"&&(r[a]=Jd(e[a],t));return r}if(Array.isArray(e)){let n=t.get(e);if(n!==void 0)return n;let r=[];return t.set(e,r),e.forEach(a=>{r.push(Jd(a,t))}),r}return e}m();var _x=50;function gh(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{let a=[];for(let o of n.split(` +`).slice(r))for(let i of t){let s=i(o);if(s){a.push(s);break}}return Mx(a)}}function Mx(e){if(!e.length)return[];let t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,_x).map(a=>({...a,filename:a.filename||t[0].filename,function:a.function||"?"})).reverse()}var Xd="";function cr(e){try{return!e||typeof e!="function"?Xd:e.name||Xd}catch{return Xd}}m();function mh(){return!0}var Vr=Dt(),Ms={},ph={};function Px(e){if(!ph[e])switch(ph[e]=!0,e){case"console":Fx();break;case"fetch":Bx();break;case"error":Ox();break;case"unhandledrejection":Nx();break;default:!1&&rt.warn("unknown instrumentation type:",e);return}}function Er(e,t){Ms[e]=Ms[e]||[],Ms[e].push(t),Px(e)}function oi(e,t){if(!(!e||!Ms[e]))for(let n of Ms[e]||[])try{n(t)}catch(r){!1&&rt.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${cr(n)} -Error:`,r)}}function Fx(){"console"in Vr&&As.forEach(function(e){e in console&&lr(console,e,function(t){return function(...n){oi("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function Bx(){mh()&&lr(Vr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:Rx(t),url:Ix(t)},startTimestamp:Date.now()};return oi("fetch",{...n}),e.apply(Vr,t).then(r=>(oi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw oi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function Rx(e=[]){return"Request"in Vr&&xr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ix(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Vr&&xr(e[0],Request)?e[0].url:String(e[0])}var tg=null;function Ox(){tg=Vr.onerror,Vr.onerror=function(e,t,n,r,a){return oi("error",{column:r,error:a,line:n,msg:e,url:t}),tg?tg.apply(this,arguments):!1}}var ng=null;function Nx(){ng=Vr.onunhandledrejection,Vr.onunhandledrejection=function(e){return oi("unhandledrejection",e),ng?ng.apply(this,arguments):!0}}m();function fh(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;ocrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function vl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function hh(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function fa(e){let{message:t,event_id:n}=e;if(t)return t;let r=hh(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Ms(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function so(e,t){let n=hh(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let o={...a&&a.data,...t.data};n.mechanism.data=o}}m();function bh(){return!1}m();function ag(e,t=1/0,n=1/0){try{return rg("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function og(e,t=3,n=100*1024){let r=ag(e,t);return Hx(r)>n?og(e,t-1,n):r}function rg(e,t,n=1/0,r=1/0,a=fh()){let[o,i]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!ih(t))return t;let s=Ux(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let p=u.toJSON();return rg("",p,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Xd(t);for(let p in g){if(!Object.prototype.hasOwnProperty.call(g,p))continue;if(c>=r){l[p]="[MaxProperties ~]";break}let f=g[p];l[p]=rg(p,f,n-1,r,a),c+=1}return i(t),l}function Ux(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":oh(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${cr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function jx(e){return~-encodeURI(e).split(/%..|./).length}function Hx(e){return jx(JSON.stringify(e))}m();m();m();var ii=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){a(i)}},o=>{if(!n)a(o);else try{r(n(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(Ds(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};m();m();var qx=["fatal","error","warning","log","info","debug"];function yh(e){return e==="warn"?"warning":qx.includes(e)?e:"log"}m();var sg={nowSeconds:()=>Date.now()/1e3};function Wx(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var ig=Wx(),Ch=ig===void 0?sg:{nowSeconds:()=>(ig.timeOrigin+ig.now())/1e3},si=sg.nowSeconds.bind(sg),ug=Ch.nowSeconds.bind(Ch);var El,eR=(()=>{if(!performance||!performance.now){El="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r$x(n)};return e&&ha(n,e),n}function ha(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||ug(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:pa()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function cg(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ha(e,n)}function $x(e){return Ls({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var vh=100,Sr=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&ha(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):$r(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,vh):vh;if(r<=0)return this;let a={timestamp:si(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...xh(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new ii((o,i)=>{let s=t[a];if(n===null||typeof s!="function")o(n);else{let u=s({...n},r);!1&&s.id&&u===null&&nt.log(`Event processor "${s.id}" dropped event`),Ds(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(o)).then(null,i):this._notifyEventProcessors(t,u,r,a+1).then(o).then(null,i)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function xh(){return ri("globalEventProcessors",()=>[])}function ba(e){xh().push(e)}m();m();var dg=4,Vx=100,ya=class{constructor(t,n=new Sr,r=dg){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{o.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},i)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:pa(),o=new Error(t);return this._withClient((i,s)=>{i.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:pa();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,o)=>{a.captureEvent(t,{...n,event_id:r},o)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Vx}=a.getOptions&&a.getOptions()||{};if(i<=0)return;let u={timestamp:si(),...t},l=o?Yd(()=>o(u,n)):u;l!==null&&r.addBreadcrumb(l,i)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=Ps(this);try{t(this)}finally{Ps(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&nt.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&cg(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:o}=r&&r.getOptions()||{},i=Dt(),{userAgent:s}=i.navigator||{},u=lg({release:a,environment:o,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ha(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Fs().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&nt.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Fs(){let e=Dt();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Ps(e){let t=Fs(),n=dr(t);return Sl(t,e),n}function bt(){let e=Fs();return(!Eh(e)||dr(e).isOlderThan(dg))&&Sl(e,new ya),bh()?Kx(e):dr(e)}function Kx(e){try{let t=Fs().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return dr(e);if(!Eh(n)||dr(n).isOlderThan(dg)){let r=dr(e).getStackTop();Sl(n,new ya(r.client,Sr.clone(r.scope)))}return dr(n)}catch{return dr(e)}}function Eh(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function dr(e){return ri("hub",()=>new ya,e)}function Sl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}m();function Bs(e,t){return bt().captureException(e,{captureContext:t})}function Rs(e){bt().withScope(e)}m();m();m();m();m();m();m();var uo={};Uc(uo,{FunctionToString:()=>ui,InboundFilters:()=>li});m();m();var Oh,ui=class e{static id="FunctionToString";name=e.id;setupOnce(){Oh=Function.prototype.toString,Function.prototype.toString=function(...t){let n=ai(this)||this;return Oh.apply(n,t)}}};m();var Jx=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],li=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let o=n();if(o){let i=o.getIntegration(e);if(i){let s=o.getClient(),u=s?s.getOptions():{},l=Qx(i._options,u);return Zx(a,l)?null:a}}return a};r.id=this.name,t(r)}};function Qx(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...Jx],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Zx(e,t){return t.ignoreInternal&&rE(e)?(!1&&nt.warn(`Event dropped due to being internal Sentry Error. -Event: ${fa(e)}`),!0):Xx(e,t.ignoreErrors)?(!1&&nt.warn(`Event dropped due to being matched by \`ignoreErrors\` option. -Event: ${fa(e)}`),!0):eE(e,t.denyUrls)?(!1&&nt.warn(`Event dropped due to being matched by \`denyUrls\` option. +Error:`,r)}}function Fx(){"console"in Vr&&Ls.forEach(function(e){e in console&&lr(console,e,function(t){return function(...n){oi("console",{args:n,level:e}),t&&t.apply(console,n)}})})}function Bx(){mh()&&lr(Vr,"fetch",function(e){return function(...t){let n={args:t,fetchData:{method:Rx(t),url:Ix(t)},startTimestamp:Date.now()};return oi("fetch",{...n}),e.apply(Vr,t).then(r=>(oi("fetch",{...n,endTimestamp:Date.now(),response:r}),r),r=>{throw oi("fetch",{...n,endTimestamp:Date.now(),error:r}),r})}})}function Rx(e=[]){return"Request"in Vr&&xr(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function Ix(e=[]){return typeof e[0]=="string"?e[0]:"Request"in Vr&&xr(e[0],Request)?e[0].url:String(e[0])}var eg=null;function Ox(){eg=Vr.onerror,Vr.onerror=function(e,t,n,r,a){return oi("error",{column:r,error:a,line:n,msg:e,url:t}),eg?eg.apply(this,arguments):!1}}var tg=null;function Nx(){tg=Vr.onunhandledrejection,Vr.onunhandledrejection=function(e){return oi("unhandledrejection",e),tg?tg.apply(this,arguments):!0}}m();function fh(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let o=0;ocrypto.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(e()&15)>>t/4).toString(16))}function vl(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function hh(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function fa(e){let{message:t,event_id:n}=e;if(t)return t;let r=hh(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Ps(e,t,n){let r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function so(e,t){let n=hh(e);if(!n)return;let r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){let o={...a&&a.data,...t.data};n.mechanism.data=o}}m();function bh(){return!1}m();function rg(e,t=1/0,n=1/0){try{return ng("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function ag(e,t=3,n=100*1024){let r=rg(e,t);return Hx(r)>n?ag(e,t-1,n):r}function ng(e,t,n=1/0,r=1/0,a=fh()){let[o,i]=a;if(t===null||["number","boolean","string"].includes(typeof t)&&!ih(t))return t;let s=Ux(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;if(n===0)return s.replace("object ","");if(o(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let p=u.toJSON();return ng("",p,n-1,r,a)}catch{}let l=Array.isArray(t)?[]:{},c=0,g=Zd(t);for(let p in g){if(!Object.prototype.hasOwnProperty.call(g,p))continue;if(c>=r){l[p]="[MaxProperties ~]";break}let f=g[p];l[p]=ng(p,f,n-1,r,a),c+=1}return i(t),l}function Ux(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof window<"u"&&t===window?"[Window]":oh(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?`[Function: ${cr(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Object.getPrototypeOf(t).constructor.name}]`}catch(n){return`**non-serializable** (${n})`}}function jx(e){return~-encodeURI(e).split(/%..|./).length}function Hx(e){return jx(JSON.stringify(e))}m();m();m();var ii=class e{_state=0;_handlers=[];_value;constructor(t){try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,a)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){a(i)}},o=>{if(!n)a(o);else try{r(n(o))}catch(i){a(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let a,o;return this.then(i=>{o=!1,a=i,t&&t()},i=>{o=!0,a=i,t&&t()}).then(()=>{if(o){r(a);return}n(a)})})}_resolve=t=>{this._setResult(1,t)};_reject=t=>{this._setResult(2,t)};_setResult=(t,n)=>{if(this._state===0){if(ks(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}};_executeHandlers=()=>{if(this._state===0)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===1&&n[1](this._value),this._state===2&&n[2](this._value),n[0]=!0)})}};m();m();var qx=["fatal","error","warning","log","info","debug"];function yh(e){return e==="warn"?"warning":qx.includes(e)?e:"log"}m();var ig={nowSeconds:()=>Date.now()/1e3};function Wx(){if(!performance||!performance.now)return;let e=Date.now()-performance.now();return{now:()=>performance.now(),timeOrigin:e}}var og=Wx(),Ch=og===void 0?ig:{nowSeconds:()=>(og.timeOrigin+og.now())/1e3},si=ig.nowSeconds.bind(ig),sg=Ch.nowSeconds.bind(Ch);var El,eR=(()=>{if(!performance||!performance.now){El="none";return}let e=3600*1e3,t=performance.now(),n=Date.now(),r=performance.timeOrigin?Math.abs(performance.timeOrigin+t-n):e,a=r$x(n)};return e&&ha(n,e),n}function ha(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||sg(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:pa()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function lg(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ha(e,n)}function $x(e){return _s({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}var vh=100,Sr=class e{_notifyingListeners;_scopeListeners;_eventProcessors;_breadcrumbs;_user;_tags;_extra;_contexts;_attachments;_sdkProcessingMetadata;_fingerprint;_level;_transactionName;_span;_session;_requestSession;constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){let n=new e;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments]),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&ha(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts={...this._contexts,[t]:n},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){let n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):$r(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,n){let r=typeof n=="number"?Math.min(n,vh):vh;if(r<=0)return this;let a={timestamp:si(),...t};return this._breadcrumbs=[...this._breadcrumbs,a].slice(-r),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};let r=this._span.transaction&&this._span.transaction.name;r&&(t.tags={transaction:r,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...xh(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,n,r,a=0){return new ii((o,i)=>{let s=t[a];if(n===null||typeof s!="function")o(n);else{let u=s({...n},r);!1&&s.id&&u===null&&rt.log(`Event processor "${s.id}" dropped event`),ks(u)?u.then(l=>this._notifyEventProcessors(t,l,r,a+1).then(o)).then(null,i):this._notifyEventProcessors(t,u,r,a+1).then(o).then(null,i)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}};function xh(){return ri("globalEventProcessors",()=>[])}function ba(e){xh().push(e)}m();m();var cg=4,Vx=100,ya=class{constructor(t,n=new Sr,r=cg){this._version=r;this.getStackTop().scope=n,t&&this.bindClient(t)}_stack=[{}];_lastEventId;isOlderThan(t){return this._version{o.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},i)}),r}captureMessage(t,n,r){let a=this._lastEventId=r&&r.event_id?r.event_id:pa(),o=new Error(t);return this._withClient((i,s)=>{i.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:a},s)}),a}captureEvent(t,n){let r=n&&n.event_id?n.event_id:pa();return t.type!=="transaction"&&(this._lastEventId=r),this._withClient((a,o)=>{a.captureEvent(t,{...n,event_id:r},o)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:a}=this.getStackTop();if(!r||!a)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Vx}=a.getOptions&&a.getOptions()||{};if(i<=0)return;let u={timestamp:si(),...t},l=o?Gd(()=>o(u,n)):u;l!==null&&r.addBreadcrumb(l,i)}setUser(t){let n=this.getScope();n&&n.setUser(t)}setTags(t){let n=this.getScope();n&&n.setTags(t)}setExtras(t){let n=this.getScope();n&&n.setExtras(t)}setTag(t,n){let r=this.getScope();r&&r.setTag(t,n)}setExtra(t,n){let r=this.getScope();r&&r.setExtra(t,n)}setContext(t,n){let r=this.getScope();r&&r.setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();n&&r&&t(n)}run(t){let n=Fs(this);try{t(this)}finally{Fs(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return!1&&rt.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&lg(r),this._sendSessionUpdate(),n&&n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:a,environment:o}=r&&r.getOptions()||{},i=Dt(),{userAgent:s}=i.navigator||{},u=ug({release:a,environment:o,...n&&{user:n.getUser()},...s&&{userAgent:s},...t});if(n){let l=n.getSession&&n.getSession();l&&l.status==="ok"&&ha(l,{status:"exited"}),this.endSession(),n.setSession(u)}return u}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop();if(!t)return;let r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){let{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){let a=Bs().__SENTRY__;if(a&&a.extensions&&typeof a.extensions[t]=="function")return a.extensions[t].apply(this,n);!1&&rt.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Bs(){let e=Dt();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function Fs(e){let t=Bs(),n=dr(t);return Sl(t,e),n}function bt(){let e=Bs();return(!Eh(e)||dr(e).isOlderThan(cg))&&Sl(e,new ya),bh()?Kx(e):dr(e)}function Kx(e){try{let t=Bs().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return dr(e);if(!Eh(n)||dr(n).isOlderThan(cg)){let r=dr(e).getStackTop();Sl(n,new ya(r.client,Sr.clone(r.scope)))}return dr(n)}catch{return dr(e)}}function Eh(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function dr(e){return ri("hub",()=>new ya,e)}function Sl(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}m();function Rs(e,t){return bt().captureException(e,{captureContext:t})}function Is(e){bt().withScope(e)}m();m();m();m();m();m();m();var uo={};Nc(uo,{FunctionToString:()=>ui,InboundFilters:()=>li});m();m();var Oh,ui=class e{static id="FunctionToString";name=e.id;setupOnce(){Oh=Function.prototype.toString,Function.prototype.toString=function(...t){let n=ai(this)||this;return Oh.apply(n,t)}}};m();var Jx=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],li=class e{constructor(t={}){this._options=t}static id="InboundFilters";name=e.id;setupOnce(t,n){let r=a=>{let o=n();if(o){let i=o.getIntegration(e);if(i){let s=o.getClient(),u=s?s.getOptions():{},l=Qx(i._options,u);return Zx(a,l)?null:a}}return a};r.id=this.name,t(r)}};function Qx(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...Jx],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Zx(e,t){return t.ignoreInternal&&rE(e)?(!1&&rt.warn(`Event dropped due to being internal Sentry Error. +Event: ${fa(e)}`),!0):Xx(e,t.ignoreErrors)?(!1&&rt.warn(`Event dropped due to being matched by \`ignoreErrors\` option. +Event: ${fa(e)}`),!0):eE(e,t.denyUrls)?(!1&&rt.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${fa(e)}. -Url: ${wl(e)}`),!0):tE(e,t.allowUrls)?!1:(!1&&nt.warn(`Event dropped due to not being matched by \`allowUrls\` option. +Url: ${wl(e)}`),!0):tE(e,t.allowUrls)?!1:(!1&&rt.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${fa(e)}. -Url: ${wl(e)}`),!0)}function Xx(e,t){return!t||!t.length?!1:nE(e).some(n=>t.some(r=>Cl(n,r)))}function eE(e,t){if(!t||!t.length)return!1;let n=wl(e);return n?t.some(r=>Cl(n,r)):!1}function tE(e,t){if(!t||!t.length)return!0;let n=wl(e);return n?t.some(r=>Cl(n,r)):!0}function nE(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&nt.error(`Cannot extract message for event ${fa(e)}`),[]}return[]}function rE(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function aE(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function wl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?aE(t):null}catch{return!1&&nt.error(`Cannot extract url for event ${fa(e)}`),null}}m();m();function mg(e,t){let n=pg(e,t),r={type:t&&t.name,value:gE(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function lE(e,t,n,r){let a={exception:{values:[{type:ws(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${dh(t)}`}]},extra:{__serialized__:og(t)}};if(n){let o=pg(e,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function gg(e,t){return{exception:{values:[mg(e,t)]}}}function pg(e,t){let n=t.stacktrace||t.stack||"",r=dE(t);try{return e(n,r)}catch{}return[]}var cE=/Minified React error #\d+;/i;function dE(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(cE.test(e.message))return 1}return 0}function gE(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function fg(e,t,n,r,a){let o;if(hl(t)&&t.error)return gg(e,t.error);if(nh(t)){let i=t;if("stack"in t)o=gg(e,t);else{let s=i.name||"DOMException",u=i.message?`${s}: ${i.message}`:s;o=jh(e,u,n,r),Ms(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return fl(t)?gg(e,t):$r(t)||ws(t)?(o=lE(e,t,n,a),so(o,{synthetic:!0}),o):(o=jh(e,t,n,r),Ms(o,`${t}`,void 0),so(o,{synthetic:!0}),o)}function jh(e,t,n,r){let a={message:t};if(r&&n){let o=pg(e,n);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]})}return a}m();var Hh="Breadcrumbs",lo=class e{static id=Hh;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&Er("console",pE),this.options.dom&&Er("dom",mE(this.options.dom)),this.options.xhr&&Er("xhr",fE),this.options.fetch&&Er("fetch",hE),this.options.history&&Er("history",bE)}};function mE(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?ks(n.event.target,a):ks(n.event,a)}catch{r=""}r.length!==0&&bt().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function pE(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:yh(e.level),message:Jd(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Jd(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;bt().addBreadcrumb(t,{input:e.args,level:e.level})}function fE(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};bt().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function hE(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?bt().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):bt().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function bE(e){let t=Dt(),n=e.from,r=e.to,a=vl(t.location.href),o=vl(n),i=vl(r);o.path||(o=a),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),a.protocol===o.protocol&&a.host===o.host&&(n=o.relative),bt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}m();var QO=Dt();var dN=Dt();m();m();m();var Dl="?";var yE=30,CE=40,TE=50;function hg(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var vE=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xE=/\((\S*)(?::(\d+))(?::(\d+))\)/,EE=e=>{let t=vE.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=xE.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,a]=Gh(t[1]||Dl,t[2]);return hg(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},qh=[yE,EE],SE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,DE=e=>{let t=SE.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=wE.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],a=t[1]||Dl;return[a,r]=Gh(a,r),hg(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Wh=[TE,DE],kE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,AE=e=>{let t=kE.exec(e);return t?hg(t[2],t[1]||Dl,+t[3],t[4]?+t[4]:void 0):void 0},$h=[CE,AE];var Vh=[qh,Wh,$h],Kh=gh(...Vh),Gh=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Dl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};m();m();var bg=0;function yg(){return bg>0}function LE(){bg+=1,setTimeout(()=>{bg-=1})}function Ca(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(ai(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=a.map(i=>Ca(i,t));return e.apply(this,o)}catch(o){throw LE(),Rs(i=>{i.addEventProcessor(s=>(t.mechanism&&(Ms(s,void 0,void 0),so(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),Bs(o)}),o}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Zd(r,e),Tl(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var Cg={};Uc(Cg,{Breadcrumbs:()=>lo,Dedupe:()=>po,GlobalHandlers:()=>Kr,HttpContext:()=>mo,LinkedErrors:()=>go,TryCatch:()=>co});m();m();var Kr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:_E,onunhandledrejection:ME};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(BE(n),r(),this._installFunc[n]=void 0)}}};function _E(){Er("error",e=>{let[t,n,r]=Qh();if(!t.getIntegration(Kr))return;let{msg:a,url:o,line:i,column:s,error:u}=e;if(yg()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Wr(a)?FE(a,o,i,s):Yh(fg(n,u||a,void 0,r,!1),o,i,s);l.level="error",Jh(t,u,l,"onerror")})}function ME(){Er("unhandledrejection",e=>{let[t,n,r]=Qh();if(!t.getIntegration(Kr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(yg()||a&&a.__sentry_own_request__)return!0;let o=bl(a)?PE(a):fg(n,a,void 0,r,!0);o.level="error",Jh(t,a,o,"onunhandledrejection")})}function PE(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function FE(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=hl(e)?e.message:e,i="Error",s=o.match(a);return s&&(i=s[1],o=s[2]),Yh({exception:{values:[{type:i,value:o}]}},t,n,r)}function Yh(e,t,n,r){let a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Wr(t)&&t.length>0?t:sh();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function BE(e){!1&&nt.log(`Global Handler attached: ${e}`)}function Jh(e,t,n,r){so(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Qh(){let e=bt(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}m();var RE=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],co=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=Dt();this._options.setTimeout&&lr(t,"setTimeout",Zh),this._options.setInterval&&lr(t,"setInterval",Zh),this._options.requestAnimationFrame&&lr(t,"requestAnimationFrame",IE),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&lr(XMLHttpRequest.prototype,"send",OE);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:RE).forEach(NE)}};function Zh(e){return function(...t){let n=t[0];return t[0]=Ca(n,{mechanism:{data:{function:cr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function IE(e){return function(t){return e.apply(this,[Ca(t,{mechanism:{data:{function:"requestAnimationFrame",handler:cr(e)},handled:!0,type:"instrument"}})])}}function OE(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&lr(n,a,function(o){let i={mechanism:{data:{function:a,handler:cr(o)},handled:!0,type:"instrument"}},s=ai(o);return s&&(i.mechanism.data.handler=cr(s)),Ca(o,i)})}),e.apply(this,t)}}function NE(e){let t=Dt(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(lr(n,"addEventListener",function(r){return function(a,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ca(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:cr(o),target:e},handled:!0,type:"instrument"}}))}catch{}let s=Ca(o,{mechanism:{data:{function:"addEventListener",handler:cr(o),target:e},handled:!0,type:"instrument"}}),u=[a,s,i];return r.apply(this,u)}}),lr(n,"removeEventListener",function(r){return function(a,o,i){let s=o;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,i)}catch{}return r.call(this,a,s,i)}}))}m();var UE="cause",jE=5,go=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||UE,this._limit=t.limit||jE}setupOnce(){let t=bt().getClient();t&&ba((n,r)=>{let a=bt().getIntegration(e);return a?HE(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function HE(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!xr(a.originalException,Error))return r;let o=Xh(e,n,a.originalException,t);return r.exception.values=[...o,...r.exception.values],r}function Xh(e,t,n,r,a=[]){if(!xr(n[r],Error)||a.length+1>=t)return a;let o=mg(e,n[r]);return Xh(e,t,n[r],r,[o,...a])}m();var e2=Dt(),mo=class e{static id="HttpContext";name=e.id;setupOnce(){ba(t=>{if(bt().getIntegration(e)){if(!navigator&&!location&&!e2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=e2.document||{},{userAgent:a}=navigator||{},o={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},i={...n&&{url:n},headers:o};return{...t,request:i}}return t})}};m();var po=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let o=n().getIntegration(e);if(o){try{if(zE(a,o._previousEvent))return!1&&nt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=a}return o._previousEvent=a}return a};r.id=this.name,t(r)}};function zE(e,t){return t?!!(qE(e,t)||WE(e,t)):!1}function qE(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!a2(e,t)||!r2(e,t))}function WE(e,t){let n=t2(t),r=t2(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!a2(e,t)||!r2(e,t))}function r2(e,t){let n=n2(e),r=n2(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"&&typeof Deno<"u"?Deno.env.toObject():E}var Se=Pe();function me(){return Se.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function i2(){return Se.BETA==="1"}function gn(){return Se.PROD==="1"}function Jn(){return Se.PROD_API==="1"}function s2(){return Se.HAS_CSP_ERROR=="1"}function We(){if(Se.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function ci(){return Se.IMMERSIVE_TRANSLATE_SAFARI==="1"}function kl(){return typeof Deno<"u"}var cj=Pe().PROD==="1",di=Pe().PROD!=="1";function Al(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function Is(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}m();var u2={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 +Url: ${wl(e)}`),!0)}function Xx(e,t){return!t||!t.length?!1:nE(e).some(n=>t.some(r=>Cl(n,r)))}function eE(e,t){if(!t||!t.length)return!1;let n=wl(e);return n?t.some(r=>Cl(n,r)):!1}function tE(e,t){if(!t||!t.length)return!0;let n=wl(e);return n?t.some(r=>Cl(n,r)):!0}function nE(e){if(e.message)return[e.message];if(e.exception)try{let{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[`${n}`,`${t}: ${n}`]}catch{return!1&&rt.error(`Cannot extract message for event ${fa(e)}`),[]}return[]}function rE(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function aE(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function wl(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?aE(t):null}catch{return!1&&rt.error(`Cannot extract url for event ${fa(e)}`),null}}m();m();function gg(e,t){let n=mg(e,t),r={type:t&&t.name,value:gE(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function lE(e,t,n,r){let a={exception:{values:[{type:Ds(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${dh(t)}`}]},extra:{__serialized__:ag(t)}};if(n){let o=mg(e,n);o.length&&(a.exception.values[0].stacktrace={frames:o})}return a}function dg(e,t){return{exception:{values:[gg(e,t)]}}}function mg(e,t){let n=t.stacktrace||t.stack||"",r=dE(t);try{return e(n,r)}catch{}return[]}var cE=/Minified React error #\d+;/i;function dE(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(cE.test(e.message))return 1}return 0}function gE(e){let t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function pg(e,t,n,r,a){let o;if(hl(t)&&t.error)return dg(e,t.error);if(nh(t)){let i=t;if("stack"in t)o=dg(e,t);else{let s=i.name||"DOMException",u=i.message?`${s}: ${i.message}`:s;o=jh(e,u,n,r),Ps(o,u)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return fl(t)?dg(e,t):$r(t)||Ds(t)?(o=lE(e,t,n,a),so(o,{synthetic:!0}),o):(o=jh(e,t,n,r),Ps(o,`${t}`,void 0),so(o,{synthetic:!0}),o)}function jh(e,t,n,r){let a={message:t};if(r&&n){let o=mg(e,n);o.length&&(a.exception={values:[{value:t,stacktrace:{frames:o}}]})}return a}m();var Hh="Breadcrumbs",lo=class e{static id=Hh;name=e.id;options;constructor(t){this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&Er("console",pE),this.options.dom&&Er("dom",mE(this.options.dom)),this.options.xhr&&Er("xhr",fE),this.options.fetch&&Er("fetch",hE),this.options.history&&Er("history",bE)}};function mE(e){function t(n){let r,a=typeof e=="object"?e.serializeAttribute:void 0;typeof a=="string"&&(a=[a]);try{r=n.event.target?As(n.event.target,a):As(n.event,a)}catch{r=""}r.length!==0&&bt().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function pE(e){let t={category:"console",data:{arguments:e.args,logger:"console"},level:yh(e.level),message:Yd(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Yd(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;bt().addBreadcrumb(t,{input:e.args,level:e.level})}function fE(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;let{method:t,url:n,status_code:r,body:a}=e.xhr.__sentry_xhr__||{};bt().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:a});return}}function hE(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?bt().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):bt().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function bE(e){let t=Dt(),n=e.from,r=e.to,a=vl(t.location.href),o=vl(n),i=vl(r);o.path||(o=a),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),a.protocol===o.protocol&&a.host===o.host&&(n=o.relative),bt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}m();var QO=Dt();var dN=Dt();m();m();m();var Dl="?";var yE=30,CE=40,TE=50;function fg(e,t,n,r){let a={filename:e,function:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}var vE=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xE=/\((\S*)(?::(\d+))(?::(\d+))\)/,EE=e=>{let t=vE.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){let o=xE.exec(t[2]);o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3])}let[r,a]=Gh(t[1]||Dl,t[2]);return fg(a,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},qh=[yE,EE],SE=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,wE=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,DE=e=>{let t=SE.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){let o=wE.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],a=t[1]||Dl;return[a,r]=Gh(a,r),fg(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Wh=[TE,DE],kE=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,AE=e=>{let t=kE.exec(e);return t?fg(t[2],t[1]||Dl,+t[3],t[4]?+t[4]:void 0):void 0},$h=[CE,AE];var Vh=[qh,Wh,$h],Kh=gh(...Vh),Gh=(e,t)=>{let n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Dl,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};m();m();var hg=0;function bg(){return hg>0}function LE(){hg+=1,setTimeout(()=>{hg-=1})}function Ca(e,t={},n){if(typeof e!="function")return e;try{let a=e.__sentry_wrapped__;if(a)return a;if(ai(e))return e}catch{return e}let r=function(){let a=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let o=a.map(i=>Ca(i,t));return e.apply(this,o)}catch(o){throw LE(),Is(i=>{i.addEventProcessor(s=>(t.mechanism&&(Ps(s,void 0,void 0),so(s,t.mechanism)),s.extra={...s.extra,arguments:a},s)),Rs(o)}),o}};try{for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}Qd(r,e),Tl(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}var yg={};Nc(yg,{Breadcrumbs:()=>lo,Dedupe:()=>po,GlobalHandlers:()=>Kr,HttpContext:()=>mo,LinkedErrors:()=>go,TryCatch:()=>co});m();m();var Kr=class e{static id="GlobalHandlers";name=e.id;_options;_installFunc={onerror:_E,onunhandledrejection:ME};constructor(t){this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){let t=this._options;for(let n in t){let r=this._installFunc[n];r&&t[n]&&(BE(n),r(),this._installFunc[n]=void 0)}}};function _E(){Er("error",e=>{let[t,n,r]=Qh();if(!t.getIntegration(Kr))return;let{msg:a,url:o,line:i,column:s,error:u}=e;if(bg()||u&&u.__sentry_own_request__)return;let l=u===void 0&&Wr(a)?FE(a,o,i,s):Yh(pg(n,u||a,void 0,r,!1),o,i,s);l.level="error",Jh(t,u,l,"onerror")})}function ME(){Er("unhandledrejection",e=>{let[t,n,r]=Qh();if(!t.getIntegration(Kr))return;let a=e;try{"reason"in e?a=e.reason:"detail"in e&&"reason"in e.detail&&(a=e.detail.reason)}catch{}if(bg()||a&&a.__sentry_own_request__)return!0;let o=bl(a)?PE(a):pg(n,a,void 0,r,!0);o.level="error",Jh(t,a,o,"onunhandledrejection")})}function PE(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function FE(e,t,n,r){let a=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=hl(e)?e.message:e,i="Error",s=o.match(a);return s&&(i=s[1],o=s[2]),Yh({exception:{values:[{type:i,value:o}]}},t,n,r)}function Yh(e,t,n,r){let a=e.exception=e.exception||{},o=a.values=a.values||[],i=o[0]=o[0]||{},s=i.stacktrace=i.stacktrace||{},u=s.frames=s.frames||[],l=isNaN(parseInt(r,10))?void 0:r,c=isNaN(parseInt(n,10))?void 0:n,g=Wr(t)&&t.length>0?t:sh();return u.length===0&&u.push({colno:l,filename:g,function:"?",in_app:!0,lineno:c}),e}function BE(e){!1&&rt.log(`Global Handler attached: ${e}`)}function Jh(e,t,n,r){so(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Qh(){let e=bt(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}m();var RE=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],co=class e{static id="TryCatch";name=e.id;_options;constructor(t){this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){let t=Dt();this._options.setTimeout&&lr(t,"setTimeout",Zh),this._options.setInterval&&lr(t,"setInterval",Zh),this._options.requestAnimationFrame&&lr(t,"requestAnimationFrame",IE),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&lr(XMLHttpRequest.prototype,"send",OE);let n=this._options.eventTarget;n&&(Array.isArray(n)?n:RE).forEach(NE)}};function Zh(e){return function(...t){let n=t[0];return t[0]=Ca(n,{mechanism:{data:{function:cr(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function IE(e){return function(t){return e.apply(this,[Ca(t,{mechanism:{data:{function:"requestAnimationFrame",handler:cr(e)},handled:!0,type:"instrument"}})])}}function OE(e){return function(...t){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&lr(n,a,function(o){let i={mechanism:{data:{function:a,handler:cr(o)},handled:!0,type:"instrument"}},s=ai(o);return s&&(i.mechanism.data.handler=cr(s)),Ca(o,i)})}),e.apply(this,t)}}function NE(e){let t=Dt(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(lr(n,"addEventListener",function(r){return function(a,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ca(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:cr(o),target:e},handled:!0,type:"instrument"}}))}catch{}let s=Ca(o,{mechanism:{data:{function:"addEventListener",handler:cr(o),target:e},handled:!0,type:"instrument"}}),u=[a,s,i];return r.apply(this,u)}}),lr(n,"removeEventListener",function(r){return function(a,o,i){let s=o;try{let u=s&&s.__sentry_wrapped__;u&&r.call(this,a,u,i)}catch{}return r.call(this,a,s,i)}}))}m();var UE="cause",jE=5,go=class e{static id="LinkedErrors";name=e.id;_key;_limit;constructor(t={}){this._key=t.key||UE,this._limit=t.limit||jE}setupOnce(){let t=bt().getClient();t&&ba((n,r)=>{let a=bt().getIntegration(e);return a?HE(t.getOptions().stackParser,a._key,a._limit,n,r):n})}};function HE(e,t,n,r,a){if(!r.exception||!r.exception.values||!a||!xr(a.originalException,Error))return r;let o=Xh(e,n,a.originalException,t);return r.exception.values=[...o,...r.exception.values],r}function Xh(e,t,n,r,a=[]){if(!xr(n[r],Error)||a.length+1>=t)return a;let o=gg(e,n[r]);return Xh(e,t,n[r],r,[o,...a])}m();var e2=Dt(),mo=class e{static id="HttpContext";name=e.id;setupOnce(){ba(t=>{if(bt().getIntegration(e)){if(!navigator&&!location&&!e2.document)return t;let n=t.request&&t.request.url||location&&location.href,{referrer:r}=e2.document||{},{userAgent:a}=navigator||{},o={...t.request&&t.request.headers,...r&&{Referer:r},...a&&{"User-Agent":a}},i={...n&&{url:n},headers:o};return{...t,request:i}}return t})}};m();var po=class e{static id="Dedupe";name=e.id;_previousEvent;setupOnce(t,n){let r=a=>{let o=n().getIntegration(e);if(o){try{if(zE(a,o._previousEvent))return!1&&rt.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return o._previousEvent=a}return o._previousEvent=a}return a};r.id=this.name,t(r)}};function zE(e,t){return t?!!(qE(e,t)||WE(e,t)):!1}function qE(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!a2(e,t)||!r2(e,t))}function WE(e,t){let n=t2(t),r=t2(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!a2(e,t)||!r2(e,t))}function r2(e,t){let n=n2(e),r=n2(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a"u"&&typeof Deno<"u"?Deno.env.toObject():E}var Se=Pe();function me(){return Se.IMMERSIVE_TRANSLATE_USERSCRIPT==="1"}function i2(){return Se.BETA==="1"}function gn(){return Se.PROD==="1"}function Jn(){return Se.PROD_API==="1"}function s2(){return Se.HAS_CSP_ERROR=="1"}function $e(){if(Se.IMMERSIVE_TRANSLATE_SAFARI==="1")return!0;if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let t=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(t&&t._isSafari)}else return!1}function ci(){return Se.IMMERSIVE_TRANSLATE_SAFARI==="1"}function kl(){return typeof Deno<"u"}var cj=Pe().PROD==="1",di=Pe().PROD!=="1";function Al(){return typeof globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__<"u"}function Os(){if(typeof globalThis.immersiveTranslateBrowserAPI<"u"&&globalThis.immersiveTranslateBrowserAPI.runtime&&globalThis.immersiveTranslateBrowserAPI.runtime.getManifest){let e=globalThis.immersiveTranslateBrowserAPI.runtime.getManifest();return!!(e&&(e._isUserscript||e._isSafari))}else return!1}m();var u2={nologin:"\u672A\u767B\u5F55",loginForSafari:"\u767B\u5F55\u6216\u6CE8\u518C",login:"\u767B\u5F55\u540E\u53EF\u5F00\u901A\u4F1A\u5458",goLogin:"\u53BB\u767B\u5F55",manageAccount:"\u7BA1\u7406\u8D26\u6237",openPremium:"\u5F00\u901A\u4F1A\u5458",logout:"\u9000\u51FA",curentPlan:"\u5F53\u524D\u5957\u9910",endAt:"\u5230\u671F",endAuto:"\u81EA\u52A8\u7EED\u671F",lineBreakMaxTextCount:"\u6362\u884C\u540E\uFF0C\u6BCF\u53E5\u8BDD\u5141\u8BB8\u7684\u6700\u5927\u5B57\u7B26\u6570\u91CF","translate-pdf":"\u70B9\u51FB\u7FFB\u8BD1 PDF","noSupportTranslate-pdf":"\u811A\u672C\u4E0D\u652F\u6301\u8BF7\u4F7F\u7528\u63D2\u4EF6","translate-firefox-local-pdf":"\u70B9\u51FB\u53BB\u5BFC\u5165PDF",enableLineBreak:"\u5F00\u542F\u957F\u6BB5\u843D\u81EA\u52A8\u6362\u884C",sponsorLabel:"$1 \u8D77\u8D5E\u52A9\u5F00\u53D1\u8005",help:"\u5E2E\u52A9",enableLineBreakDescription:"\u5F00\u542F\u540E\uFF0C\u5C06\u4F1A\u5728\u957F\u6BB5\u843D\u4E2D\u6BCF\u53E5\u8BDD\u7ED3\u675F\u63D2\u5165\u6362\u884C\u7B26\uFF0C\u4EE5\u4FBF\u4E8E\u9605\u8BFB","browser.shortBrandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1","browser.brandName":"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 - \u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6 | PDF\u7FFB\u8BD1 | \u514D\u8D39","browser.brandDescription":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\uFF08\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF09\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF08Youtube, Netflix\u7B49\uFF09\uFF0CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u7B49\uFF1B\u652F\u6301\u8C03\u7528\u4EBA\u5DE5\u667A\u80FDAI\u7FFB\u8BD1\u5927\u6A21\u578B\uFF08OpenAI (ChatGPT)\u3001DeepL\u3001Gemini(Bard) \u7B49 \uFF09\u5BF9\u4EE5\u4E0A\u5185\u5BB9\u8FDB\u884C\u66F4\u51C6\u786E\u7684\u7FFB\u8BD1\uFF1B","browser.brandDescriptionForSafari":"\u3010\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u3011\u4E00\u6B3E\u514D\u8D39\u7684\uFF08\u539F\u6587/\u8BD1\u6587\uFF09\u53CC\u8BED\u5BF9\u7167\u7F51\u9875\u7FFB\u8BD1\u63D2\u4EF6\uFF0C\u540C\u65F6\u652F\u6301PDF\u7FFB\u8BD1\u548CEPUB\u7535\u5B50\u4E66\u7FFB\u8BD1\u4E14\u4FDD\u7559\u539F\u6587\u6863\u6392\u7248\uFF0CYoutube/Netflix\u7B49\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u7FFB\u8BD1\uFF0C\u652F\u6301Deepl/Google\u7B49\u4E3B\u6D41\u7FFB\u8BD1\u670D\u52A1;","browser.toggleTranslatePage":"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.toggleTranslateToThePageEndImmediately":"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8/\u663E\u793A\u539F\u6587","browser.toggleTranslateTheMainPage":"\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF/\u663E\u793A\u539F\u6587","browser.shareToDraft":"\u751F\u6210\u7F51\u9875\u5FEB\u7167","browser.openOptionsPage":"\u6253\u5F00\u8BBE\u7F6E\u9875","browser.translateLocalPdfFile":"\u7FFB\u8BD1\u672C\u5730 PDF \u6587\u4EF6","browser.openEbookViewer":"\u9605\u8BFB\u672C\u5730\u7535\u5B50\u4E66","browser.openEbookBuilder":"\u5236\u4F5C\u53CC\u8BED EPUB \u7535\u5B50\u4E66","browser.translateLocalHtmlFile":"\u7FFB\u8BD1 HTML/txt \u6587\u4EF6","browser.donateContext":"\u4E86\u89E3\u8D5E\u52A9\u798F\u5229","browser.translateLocalSubtitleFile":"\u7FFB\u8BD1\u672C\u5730\u5B57\u5E55\u6587\u4EF6",confirmResetConfig:"\u4F60\u786E\u5B9A\u8981\u91CD\u7F6E\u8BBE\u7F6E\u5417\uFF1F",translationLineBreakSettingTitle:"\u8BD1\u6587\u6362\u884C\u8BBE\u7F6E",smartLineBreak:"\u667A\u80FD\u6362\u884C",alwaysLineBreak:"\u603B\u662F\u6362\u884C",isShowContextMenu:"\u5C06\u7FFB\u8BD1\u7F51\u9875\u52A0\u5165\u53F3\u952E\u83DC\u5355\u9879",toggleBeta:"\u5F00\u542F Beta \u6D4B\u8BD5\u7279\u6027",betaDescription:"\u542F\u7528\u4ECD\u5728\u5B9E\u9A8C\u6027\u7684\u529F\u80FD\uFF0C\u4EE5\u53CA\u6D4B\u8BD5\u4E2D\u7684\u7FFB\u8BD1\u670D\u52A1\u3002\u52A0\u5165 <1>Telegram \u7FA4\u7EC4\u4E86\u89E3\u66F4\u591A\u3002",translationLineBreakSettingDescription:"\u603B\u662F\u6362\u884C\u9002\u7528\u4E8E\u8F83\u5C11\u5185\u5BB9\u7684\u7248\u9762\uFF0C\u66F4\u6574\u9F50\u3002\uFF08\u5728\u5185\u5BB9\u8F83\u591A\u7684\u957F\u6BB5\u843D(\u8D85\u8FC7{count}\u4E2A\u5B57\u7B26) \u4F7F\u7528\u667A\u80FD\u6362\u884C\uFF0C\u66F4\u7701\u7A7A\u95F4\uFF09",tempTranslateDomainTitle:"\u4E34\u65F6\u5F00\u542F\u7F51\u7AD9\u7FFB\u8BD1\u7684\u65F6\u957F",tempTranslateDomainDescription:"\u5F53\u624B\u52A8\u7FFB\u8BD1\u67D0\u4E2A\u7F51\u9875\u7684\u65F6\u5019\uFF0C\u4E34\u65F6\u5F00\u542F\u8BE5\u7F51\u7AD9\u4E3A\u81EA\u52A8\u7FFB\u8BD1\uFF0C\u53EF\u8BBE\u7F6E\u4E34\u65F6\u65F6\u957F",xMinutes:"{count} \u5206\u949F",disabled:"\u7981\u7528",changelog:"\u66F4\u65B0\u65E5\u5FD7",toggleTranslatePageWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5C4F\u5E55\u5219\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",toggleTranslationMaskWhenThreeFingersOnTheScreen:"\u591A\u6307\u540C\u65F6\u89E6\u6478\u5219\u663E\u793A/\u9690\u85CF\u8BD1\u6587\u6A21\u7CCA\u6548\u679C",addUrlDescription:"\u53EF\u4EE5\u4E3A\u57DF\u540D\uFF0C\u540C\u65F6\u652F\u6301\u901A\u914D\u7B26\uFF0C\u5982\uFF1A*.google.com, google.com/mail/*, https://www.google.com/*",general:"\u57FA\u672C\u8BBE\u7F6E",clickToExpandConfig:"\u5C55\u5F00\u5F53\u524D\u914D\u7F6E",import:"\u4ECE\u6587\u4EF6\u5BFC\u5165",export:"\u5BFC\u51FA\u5230\u6587\u4EF6",toggleDebug:"\u5728\u63A7\u5236\u53F0\u6253\u5370\u8C03\u8BD5\u65E5\u5FD7",mouseHoldKey:"+ {key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5",mouseHoldKeyAuto:"\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5",mouseHoldKeyOff:"\u4E0D\u505A\u4EFB\u4F55\u4E8B\u60C5",mouseHoldKeyOther:"\u81EA\u5B9A\u4E49\u5FEB\u6377\u952E(\u6253\u5F00\u8BBE\u7F6E)",mouseHoldKeyCustomKey:"{key} \u7FFB\u8BD1/\u8FD8\u539F\u8BE5\u6BB5","mouse-translate":"\u9F20\u6807\u60AC\u505C",document:"\u4F7F\u7528\u6559\u7A0B",resetSuccess:"\u91CD\u7F6E\u6240\u6709\u8BBE\u7F6E\u6210\u529F",resetThisSuccess:"\u91CD\u7F6E\u6210\u529F",saved:"\u4FDD\u5B58\u6210\u529F",successImportConfig:"\u6210\u529F\u5BFC\u5165\u914D\u7F6E",goAdvancedSettings:"\u53BB\u8FDB\u9636\u8BBE\u7F6E\u9875",goAdvancedInterfaceSettings:"\u53BB\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u8BBE\u7F6E\u9875\u9762",advanced:"\u8FDB\u9636\u8BBE\u7F6E",advancedDescription:"\u4E00\u822C\u65E0\u9700\u8BBE\u7F6E\uFF0C\u4FDD\u6301\u9ED8\u8BA4\u5373\u53EF\u3002\u4EC5\u5BF9\u4E8E\u66F4\u4E13\u4E1A\u7684\u7528\u6237\uFF0C\u63D0\u4F9B\u66F4\u4E2A\u6027\u5316\u7684\u8BBE\u7F6E\u9879\u3002",developer:"\u5F00\u53D1\u8005\u8BBE\u7F6E",donateCafe:"\u4EF7\u683C","translate to the bottom of the page":"\u8FDB\u5165\u7F51\u9875\u540E\uFF0C\u662F\u5426\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8\uFF1F",feedback:"\u95EE\u9898\u53CD\u9988",toggleTranslatePage:"\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",translateToThePageEndImmediatelyDescription:"\u5F00\u542F\u540E\uFF0C\u8FDB\u5165\u7F51\u9875\u5C06\u7ACB\u5373\u7FFB\u8BD1\u4ECE\u9876\u90E8\u5230\u5E95\u90E8\u7684\u5185\u5BB9\u3002\u5173\u95ED\u5219\u8FB9\u770B\u8FB9\u8BD1\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","translate all areas of the page":"\u662F\u5426\u7FFB\u8BD1\u7F51\u9875\u6240\u6709\u533A\u57DF",translationAreaDescription:"\u5F00\u542F\u540E\uFF0C\u6574\u4E2A\u7F51\u9875\u7684\u6240\u6709\u533A\u57DF\u90FD\u4F1A\u88AB\u7FFB\u8BD1\u3002\u5173\u95ED\u5219\u4F7F\u7528\u9ED8\u8BA4\u7684\u667A\u80FD\u8BC6\u522B\uFF0C\u4EC5\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF\u3002\uFF08\u4E0D\u63A8\u8350\u5F00\u542F\uFF09","the number of characters to be translated first":"\u76F4\u63A5\u7FFB\u8BD1\u9875\u9762\u524D\u591A\u5C11\u4E2A\u5B57\u7B26\uFF0C\u800C\u65E0\u9700\u7B49\u5F85\u6EDA\u52A8\u5230\u53EF\u89C6\u533A\u57DF","interface language":"\u754C\u9762\u8BED\u8A00","display both the original text and the translation":"\u540C\u65F6\u663E\u793A\u539F\u6587\u548C\u8BD1\u6587","keyboard shortcuts":"\u952E\u76D8\u5FEB\u6377\u952E",modify:"\u4FEE\u6539\u5FEB\u6377\u952E",reset:"\u91CD\u7F6E",close:"\u5173\u95ED",homepage:"\u4E3B\u9875",more:"\u66F4\u591A",moreOptions:"\u5C55\u5F00\u66F4\u591A\u81EA\u5B9A\u4E49\u9009\u9879",translateTheWholePage:"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF08\u533A\u522B\u4E8E\u667A\u80FD\u8BC6\u522B\u4E3B\u8981\u533A\u57DF\uFF09",changeToTranslateTheWholePage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u6240\u6709\u533A\u57DF",changeToTranslateTheMainPage:"\u5207\u6362\u4E3A\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF",translateToThePageEndImmediately:"\u7ACB\u5373\u7FFB\u8BD1\u5230\u9875\u9762\u5E95\u90E8",translateTheMainPage:"\u667A\u80FD\u7FFB\u8BD1\u4E3B\u8981\u533A\u57DF","The local rules are up to date":"\u672C\u5730\u9002\u914D\u89C4\u5219\u5DF2\u662F\u6700\u65B0:","Successfully synchronized with the latest official rules:":"\u6210\u529F\u540C\u6B65\u6700\u65B0\u5B98\u65B9\u9002\u914D\u89C4\u5219:","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Rules are being synchronized":"\u6B63\u5728\u540C\u6B65\u9002\u914D\u89C4\u5219",localVersionIsTooOld:"\u672C\u5730\u6269\u5C55\u7248\u672C\u8FC7\u65E7\uFF0C\u8BF7\u5347\u7EA7\u6269\u5C55\u5230 {minVersion} \u6216\u66F4\u65B0\u7684\u7248\u672C\u518D\u5C1D\u8BD5\u540C\u6B65",badUserscriptBrowser:"\u5F53\u524D\u6D4F\u89C8\u5668\u6CA1\u6709\u6B63\u786E\u5B9E\u73B0\u6CB9\u7334\u6269\u5C55\u7684\u63A5\u53E3\uFF08\u6BD4\u5982\u83B7\u53D6\u6CB9\u7334\u811A\u672C\u81EA\u8EAB\u7684\u7248\u672C\u53F7\u4FE1\u606F\uFF09\uFF0C\u8BF7\u4F7F\u7528\u5176\u4ED6<1>\u652F\u6301\u6CB9\u7334\u6269\u5C55\u7684\u6D4F\u89C8\u5668\u5982 Firefox",foundNewVersion:"\u53D1\u73B0\u65B0\u7248\u672C",theLocalExtensionIsUpToUpdate:"\u5F53\u524D\u6269\u5C55\u5DF2\u662F\u6700\u65B0\u7248\u672C\u3002",failToSyncRules:"\u540C\u6B65\u6700\u65B0\u9002\u914D\u89C4\u5219\u5931\u8D25",retry:"\u70B9\u6B64\u91CD\u8BD5",failedReason:"\u5931\u8D25\u539F\u56E0",currentRuleVersion:"\u5F53\u524D\u89C4\u5219\u7248\u672C",calculating:"\u8BA1\u7B97\u4E2D",unknownError:'\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684\u7FFB\u8BD1\u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662FPro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684DeepL\u6216OpenAI\u7FFB\u8BD1\u670D\u52A1\u3002\u540C\u65F6\uFF0C\u60A8\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u540E\u91CD\u65B0\u5C1D\u8BD5\u3002',canNotFetchRemoteRule:"\u65E0\u6CD5\u83B7\u53D6\u8FDC\u7A0B\u89C4\u5219",enableAlphaSuccess:"\u5DF2\u5F00\u542FAlpha\u529F\u80FD",disableAlphaSuccess:"\u5DF2\u5173\u95EDAlpha\u529F\u80FD",cacheSize:"\u7F13\u5B58\u5927\u5C0F\uFF1A",cleaning:"\u6E05\u7406\u4E2D",cleanCache:"\u6E05\u9664\u7F13\u5B58",options:"\u8BBE\u7F6E",about:"\u5173\u4E8E",service:"\u7FFB\u8BD1\u670D\u52A1",needAction:"(\u53BB\u8BBE\u7F6E)",goSettings:"\u53BB\u8BBE\u7F6E",needActionForOptions:"(\u9700\u8BBE\u7F6E)",translationEngine:"\u5F15\u64CE\u9009\u9879",sourceLanguage:"\u539F\u6587\u8BED\u8A00",target:"\u76EE\u6807\u8BED\u8A00",popupSourceLanguage:"\u539F\u6587\u8BED\u8A00",popupTarget:"\u76EE\u6807\u8BED\u8A00",popupService:"\u7FFB\u8BD1\u670D\u52A1",forThisSite:"\u5F53\u524D\u7F51\u7AD9",autoEnableSubtitle:"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55",alwaysTranslate:"\u603B\u662F\u7FFB\u8BD1",neverTranslate:"\u6C38\u4E0D\u7FFB\u8BD1",neverTranslateSomeLanguage:"\u6C38\u4E0D\u7FFB\u8BD1 {language}",alwaysTranslateSomeSite:"\u603B\u662F\u7FFB\u8BD1 {hostname}",neverTranslateSomeSite:"\u6C38\u4E0D\u7FFB\u8BD1 {hostname}",alwaysTranslateSomeSiteOrWildSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",alwaysTranslateSomePage:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u9875",add:"\u6DFB\u52A0",default:"\u9ED8\u8BA4",forThisLanguage:"\u9488\u5BF9\u8BE5\u8BED\u8A00\uFF1A","add url":"\u8F93\u5165URL",edit:"\u7F16\u8F91",pickAll:"\u5168\u9009","translate other languages into specific language":"\u5C06\u5176\u4ED6\u8BED\u8A00\u7FFB\u8BD1\u4E3A\u4F60\u8BBE\u7F6E\u7684\u8BED\u8A00","select translation service":"\u9009\u62E9\u4E00\u9879\u7FFB\u8BD1\u670D\u52A1",language:"\u8BED\u8A00","show-original":"\u663E\u793A\u539F\u6587",translate:"\u7FFB\u8BD1",Translated:"\u5DF2\u7FFB\u8BD1",Translating:"\u7FFB\u8BD1\u4E2D",Error:"\u9519\u8BEF",allowCacheTranslations:"\u5F00\u542F\u672C\u5730\u7FFB\u8BD1\u7F13\u5B58\uFF08\u51CF\u5C11\u91CD\u590D\u6BB5\u843D\u7684\u7FFB\u8BD1\u8BF7\u6C42\uFF09","translation display":"\u8BD1\u6587\u663E\u793A\u6837\u5F0F","select diplay style":"\u533A\u5206\u8BD1\u6587\u7684\u6837\u5F0F\uFF0C\u5177\u4F53\u53EF\u53C2\u8003\u4E0B\u5217\u793A\u4F8B",interface:"\u754C\u9762\u8BBE\u7F6E",import_export:"\u5BFC\u5165/\u5BFC\u51FA",import_export_title:"\u5BFC\u5165/\u5BFC\u51FA\u914D\u7F6E",syncToGoogleDrive:"\u7ACB\u5373\u4E0E Google Drive \u540C\u6B65","floatBallOptions.enable":"\u542F\u7528\u60AC\u6D6E\u7403","floatBallOptions.blockUrls":"\u7981\u7528\u7F51\u7AD9","floatBallOptions.add":"\u6DFB\u52A0","floatBallOptions.blockUrlDesc":"\u5F53\u9047\u4E0B\u5217\u7F51\u7AD9\u65F6\u4E0D\u663E\u793A\u60AC\u6D6E\u7403","floatBallOptions.clickType":"\u70B9\u51FB\u884C\u4E3A","floatBallOptions.clickTypeDesc":"\u60AC\u6D6E\u7403\u56FE\u6807\u70B9\u51FB\u65F6\u7684\u884C\u4E3A","floatBallOptions.clickPopup":"\u663E\u793A\u7FFB\u8BD1\u9762\u677F","floatBallOptions.clickTranslate":"\u7FFB\u8BD1/\u663E\u793A\u539F\u6587","floatBallOptions.fixedPosition":"\u56FA\u5B9A\u4F4D\u7F6E","floatBallOptions.fixedPositionDesc":"\u60AC\u6D6E\u7403\u5728\u7A97\u53E3\u5DE6\u4FA7\u8FD8\u662F\u53F3\u4FA7","floatBallOptions.fixedPositionLeft":"\u5DE6\u4FA7","floatBallOptions.fixedPositionRight":"\u53F3\u4FA7",previewAllThemes:"\u9884\u89C8\u5168\u90E8\u6837\u5F0F","translationTheme.none":"\u65E0","translationTheme.grey":"\u9ED1\u7070\u8272","translationTheme.dashed":"\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.dotted":"\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.dashedBorder":"\u865A\u7EBF\u8FB9\u6846","translationTheme.solidBorder":"\u5B9E\u7EBF\u8FB9\u6846","translationTheme.underline":"\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.mask":"\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","translationTheme.opacity":"\u900F\u660E\u6548\u679C","translationTheme.paper":"\u767D\u7EB8\u9634\u5F71\u6548\u679C","translationTheme.dividingLine":"\u5206\u5272\u7EBF","translationTheme.highlight":"\u9AD8\u4EAE","translationTheme.marker":"\u9A6C\u514B\u7B14","translationTheme.marker2":"\u9A6C\u514B\u7B142","translationTheme.blockquote":"\u5F15\u7528\u6837\u5F0F","translationTheme.weakening":"\u5F31\u5316","translationTheme.italic":"\u659C\u4F53","translationTheme.bold":"\u52A0\u7C97","translationTheme.thinDashed":"\u7EC6\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDashed":"\u7CFB\u7EDF\u81EA\u5E26\u865A\u7EBF\u4E0B\u5212\u7EBF","translationTheme.nativeDotted":"\u7CFB\u7EDF\u81EA\u5E26\u70B9\u72B6\u4E0B\u5212\u7EBF","translationTheme.nativeUnderline":"\u7CFB\u7EDF\u81EA\u5E26\u76F4\u7EBF\u4E0B\u5212\u7EBF","translationTheme.wavy":"\u6CE2\u6D6A\u7EBF","translationServices.custom":"\u81EA\u5B9A\u4E49API","translationServices.tencent":"\u817E\u8BAF\u7FFB\u8BD1\u541B","translationServices.tenAlpha":"\u817E\u8BAF\u7FFB\u8BD1\u541B(Alpha)","translationServices.google":"\u8C37\u6B4C\u7FFB\u8BD1","translationServices.bai":"\u767E\u5EA6(Alpha)","translationServices.baidu":"\u767E\u5EA6\u7FFB\u8BD1","translationServices.aliyun":"\u963F\u91CC\u4E91\u7FFB\u8BD1","translationServices.volc":"\u706B\u5C71\u7FFB\u8BD1","translationServices.deeplx":"DeepLX(Beta)","translationServices.bing":"\u5FAE\u8F6F\u7FFB\u8BD1","translationServices.deepl":"DeepL","translationServices.wechat":"\u5FAE\u4FE1\u7FFB\u8BD1","translationServices.azure":"Azure \u7FFB\u8BD1","translationServices.ibm":"IBM Watson","translationServices.aws":"\u4E9A\u9A6C\u900A\u7FFB\u8BD1","translationServices.mock":"\u6A21\u62DF\u7FFB\u8BD1","translationServices.mock2":"\u6A21\u62DF\u7FFB\u8BD12","translationServices.caiyun":"\u5F69\u4E91\u5C0F\u8BD1","translationServices.cai":"\u5F69\u4E91\u5C0F\u8BD1 (Alpha)","translationServices.volcAlpha":"\u706B\u5C71 (Alpha)","translationServices.openl":"OpenL","translationServices.youdao":"\u6709\u9053\u7FFB\u8BD1","translationServices.you":"\u6709\u9053\u7FFB\u8BD1 (Alpha)","translationServices.transmart":"\u817E\u8BAF\u4EA4\u4E92\u7FFB\u8BD1","translationServices.niu":"\u5C0F\u725B\u7FFB\u8BD1","translationServices.papago":"Papago \u7FFB\u8BD1","translationServices.d":"D (Alpha)","translationServices.dpro":"D Pro (Canary)","translationServices.openai":"OpenAI","translationServices.yandex":"Yandex","translationServices.gemini":"Gemini","translationServices.claude":"Claude","translationServices.chatgpt":"ChatGPT Web(3.5 mobile)","translate title":"\u7FFB\u8BD1\u9875\u9762\u6807\u9898","always languages":"\u603B\u662F\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateLanguagesLabel:"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u8BED\u8A00",neverTranslateTheFollowingLanguagesDescription:"\u5F53\u9875\u9762\u4E2D\u67D0\u4E00\u6BB5\u843D\u7684\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u5C06\u8DF3\u8FC7\u7FFB\u8BD1",enableUserscriptPagePopup:"\u5728\u9875\u9762\u4E0A\u663E\u793A\u60AC\u6D6E\u7403",enableUserscriptPagePopupDescription:"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528\u5FEB\u6377\u952E/{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","always translate the following languages":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","always sites":"\u603B\u662F\u7FFB\u8BD1\u7684\u7F51\u5740","always translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u4E3A\u76EE\u6807\u8BED\u8A00","never sites":"\u6C38\u4E0D\u7FFB\u8BD1\u7684\u7F51\u5740","never translate the following sites":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u5C06\u4E0D\u4F1A\u8FDB\u884C\u7FFB\u8BD1","please refer to":"\u9700\u8981\u586B\u5199\u5BC6\u94A5\u540E\u624D\u53EF\u7528\uFF0C\u8BE6\u60C5\u53C2\u8003",KeyAndConfigurationTutorial:"\u300A\u5BC6\u94A5\u7533\u8BF7\u548C\u914D\u7F6E\u6559\u7A0B\u300B",useAboveStyleForTheseSites:"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u603B\u662F\u4F7F\u7528 \u2308{theme}\u230B \u8BD1\u6587\u6837\u5F0F",currentUrl:"\u5F53\u524D\u7F51\u5740",confirm:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",syncToCloud:"\u540C\u6B65\u5230 Google Drive",syncToCloudDescription:"\u4E0A\u4F20\u5230\u4E91\u7AEF\uFF0C\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u6D4F\u89C8\u5668/\u6CB9\u7334\u811A\u672C\u4E4B\u95F4\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",syncToAccount:"\u540C\u6B65\u5230\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u4E91\u7AEF",syncToAccountButton:"\u7ACB\u5373\u4E0E\u4E91\u7AEF\u540C\u6B65",syncToAccountDescription:"\u5728\u4E0D\u540C\u7684\u8BBE\u5907\u4E4B\u95F4\u81EA\u52A8\u540C\u6B65\u914D\u7F6E\uFF0C\u4EE5\u6700\u540E\u4FEE\u6539\u65F6\u95F4\u4E3A\u51C6\u3002",successSyncConfigInAccount:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",successSyncConfigToAccount:"\u6210\u529F\u540C\u6B65\u5230\u4E91\u7AEF",syncConfigNoUpdate:"\u5DF2\u7ECF\u662F\u6700\u65B0\u7684\u4E86",authFail:"\u6388\u6743\u5931\u8D25",syncTitle:"\u624B\u52A8\u5907\u4EFD\u7BA1\u7406",import_hint:"\u5BFC\u5165",upload:"\u4E0A\u4F20",revokeAuth:"\u64A4\u9500\u6388\u6743",uploadFail:"\u4E0A\u4F20\u5931\u8D25",download:"\u4E0B\u8F7D",importSuccess:"\u5BFC\u5165\u6210\u529F",importFail:"\u5BFC\u5165\u5931\u8D25",deleteFail:"\u5220\u9664\u5931\u8D25",backupToCloud:"\u624B\u52A8\u7BA1\u7406\u5907\u4EFD\u6587\u4EF6",create_new_backup:"\u65B0\u589E\u5907\u4EFD\u8282\u70B9",maxBackupFiles:"\u6700\u591A\u53EF\u4EE5\u5907\u4EFD{count}\u4E2A\u4E0D\u540C\u7684\u8282\u70B9, \u8BF7\u5220\u9664\u4E0D\u9700\u8981\u7684\u8282\u70B9",backupToCloudDescription:"\u624B\u52A8\u4E0A\u4F20\u6216\u6062\u590D\u5907\u4EFD\u6587\u4EF6\uFF0C\u6700\u591A\u5141\u8BB83\u4E2A\u4E0D\u540C\u7684\u5907\u4EFD",successSyncConfig:"\u6210\u529F\u4E0E\u4E91\u7AEF\u4FDD\u6301\u540C\u6B65",syncFail:"\u540C\u6B65\u5931\u8D25",updatedAt:"\u66F4\u65B0\u4E8E {date}",lastSyncedAt:"\u4E0A\u6B21\u68C0\u67E5\u4E8E {date}",downloadFail:"\u4E0B\u8F7D\u5931\u8D25",clickToDownload:"\u70B9\u51FB\u4E0B\u8F7D",aboutLabel:"\u5173\u4E8E - \u53CD\u9988","browser.openAboutPage":"\u5173\u4E8E/\u53CD\u9988",aboutLabelWithoutSponsor:"\u5173\u4E8E - \u53CD\u9988",aboutIntro:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F \u4F60\u53EF\u9009\u62E9\u5F00\u901A <6>Pro\u4F1A\u5458 \u6765\u4F7F\u7528\u5F00\u7BB1\u5373\u7528\u7684 DeepL \u548C OpenAI \u7FFB\u8BD1\u3002

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002
<7>Pro \u4F1A\u5458 \u53EF\u4EE5\u901A\u8FC7\u5FEB\u901F\u5BA2\u670D\u90AE\u7BB1 <8>support@immersivetranslate.com \u548C\u6211\u4EEC\u53D6\u5F97\u8054\u7CFB\u3002",aboutIntroWithoutSponsor:"\u5E0C\u671B\u6211\u4EEC\u90FD\u80FD\u66F4\u52A0\u5BB9\u6613\u4E14\u6109\u60A6\u5730\u83B7\u53D6\u4E92\u8054\u7F51\u4E0A\u5DE8\u5927\u7684\u5916\u8BED\u4FE1\u606F \u2764\uFE0F

\u4F60\u53EF\u4EE5\u5173\u6CE8\u6211\u4EEC\u7684<3>\u63A8\u7279\uFF0C<4>Telegram \u9891\u9053\uFF0C\u5FAE\u4FE1\u516C\u4F17\u53F7\uFF0C\u5FAE\u4FE1\u4EA4\u6D41\u7FA4\uFF0C\u6216\u8005\u4E0B\u65B9\u7684<5>\u90AE\u4EF6\u8BA2\u9605\u8FFD\u8E2A\u66F4\u65B0\u3002",projectHomepage:"\u9879\u76EE\u4E3B\u9875",joinTelegramGroup:"\u52A0\u5165\u7528\u6237\u4EA4\u6D41\u7FA4\u53C2\u4E0E\u529F\u80FD\u8BA8\u8BBA",wechatPublicAccount:"\u5FAE\u4FE1\u516C\u4F17\u53F7",wechatCommunities:"\u5FAE\u4FE1\u4EA4\u6D41\u7FA4",qqCommunities:"QQ \u4EA4\u6D41\u9891\u9053",joinTelegramChannel:"\u5173\u6CE8 Telegram \u9891\u9053\u83B7\u53D6\u6700\u65B0\u66F4\u65B0",feedbackAndJoin:"\u95EE\u9898\u53CD\u9988/\u52A0\u7FA4",autoSync:"\u81EA\u52A8\u5B9A\u65F6\u540C\u6B65",loadingThemeTitle:"Loading \u6837\u5F0F",loadingThemeDescription:"\u8BBE\u7F6E\u7B49\u5F85\u8BD1\u6587\u52A0\u8F7D\u65F6\u7684\u6837\u5F0F","loadingTheme.spinner":"\u8F6C\u5708\u52A8\u753B","loadingTheme.text":"\u9759\u6001\u6587\u5B57 ... ","loadingTheme.none":"\u4E0D\u663E\u793A",developerDescription:"\u53EF\u4EE5\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u9AD8\u7EA7\u81EA\u5B9A\u4E49\u76F8\u5173\u7684\u6587\u6863","edit border color":"\u4FEE\u6539\u8FB9\u6846\u989C\u8272",successSyncButNoChange:"\u5F53\u524D\u914D\u7F6E\u4E0E\u4E91\u7AEF\u4E00\u81F4",customTheme:"\u81EA\u5B9A\u4E49\u989C\u8272\u548C\u5927\u5C0F","customThemeLabel.borderColor":"\u8FB9\u6846\u989C\u8272","customThemeLabel.borderRadius":"\u8FB9\u6846\u5706\u89D2","customThemeLabel.textColor":"\u6587\u5B57\u989C\u8272","customThemeLabel.backgroundColor":"\u80CC\u666F\u989C\u8272","customThemeLabel.zoom":"\u5B57\u4F53\u7F29\u653E\u6BD4\u4F8B (%)","customThemeLabel.opacity":"\u6587\u5B57\u4E0D\u900F\u660E\u5EA6 (%)",resetToDefaultColor:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u989C\u8272",resetToDefaultSettings:"\u6062\u590D\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E",isTranslateTitle:"\u5F00\u542F\u7FFB\u8BD1\u7F51\u9875\u6807\u9898",isTranslateTitleDescription:"\u5F00\u542F\u540E\uFF0C\u7F51\u9875\u6807\u9898\u4F1A\u88AB\u7FFB\u8BD1",enableSearchEnhancement:"\u542F\u7528\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A",enableSearchEnhancementDescription:"\u5F00\u542F\u540E\uFF0C\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\u793E\u533A\uFF09\u53F3\u8FB9\u680F\u81EA\u52A8\u663E\u793A\u5BF9\u5E94\u82F1\u6587\u5173\u952E\u8BCD\u7684\u201C\u8C37\u6B4C\u65B0\u95FB\u201D\u641C\u7D22\u7ED3\u679C\u3002",verifyService:"\u70B9\u6B64\u6D4B\u8BD5\u670D\u52A1",verified:"\u9A8C\u8BC1\u6210\u529F","field.langs":"\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801","field.model":"\u6A21\u578B","field.translationEngine":"\u7FFB\u8BD1\u5F15\u64CE","field.limitPerMinute":"\u6BCF\u5206\u949F\u6700\u5927\u8BF7\u6C42\u6570","field.limitPerSecond":"\u6BCF\u79D2\u6700\u5927\u8BF7\u6C42\u6570","field.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6587\u672C\u957F\u5EA6","field.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u6BB5\u843D\u6570","field.apiUrl":"\u81EA\u5B9A\u4E49 API \u63A5\u53E3\u5730\u5740","field.placeholderDelimiters":"\u4FDD\u7559\u7684\u5360\u4F4D\u7B26","description.custom":"\u81EA\u5B9A\u4E49\u63A5\u53E3\u63A5\u5165 \u9700\u8981\u53C2\u8003\u6587\u6863","description.limitPerMinute":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u5206\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.limitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002\u7531\u4E8EOpenAI\u76EE\u524D\u670D\u52A1\u7684\u5404\u79CD\u9650\u5236\uFF0C\u8BF7\u70B9\u51FB<1>\u8FD9\u91CC\u67E5\u770B\u6700\u65B0\u5EFA\u8BAE\u7684\u6570\u503C","description.generalLimitPerSecond":"\u8BF7\u6C42\u6570\u8D85\u8FC7\u8BE5\u9650\u5236\u65F6\u4F1A\u8FDB\u5165\u6392\u961F\u72B6\u6001\uFF0C\u76F4\u5230\u4E0B\u4E00\u79D2\u949F\u5F00\u59CB\u3002","description.maxTextLengthPerRequest":"\u6BCF\u6B21\u8BF7\u6C42\u6700\u5927\u5B57\u7B26\u6570\uFF0C\u592A\u5927\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162\uFF0C\u56E0\u6B64\u53EF\u4EE5\u5C1D\u8BD5\u8C03\u6574\u8BE5\u9009\u9879\u6765\u4F18\u5316\u901F\u5EA6","description.systemPrompt":"\u4EE5\u7CFB\u7EDF\u8EAB\u4EFD\u53D1\u9001\u7ED9 {service} \u7684\u5BF9\u8BDD\uFF0C\u5176\u4E2D {{text}} \u8868\u793A\u6BB5\u843D\u7684\u6587\u672C\u5185\u5BB9\uFF0C{{from}} \u8868\u793A\u6BB5\u843D\u7684\u8BED\u8A00\uFF0C{{to}} \u8868\u793A\u76EE\u6807\u8BED\u8A00","field.domain":"\u9886\u57DF","description.domain":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u6709\u9053API\u63A7\u5236\u53F0\u5F00\u901A\u9886\u57DF\u5316\u7FFB\u8BD1\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u9886\u57DF\u89C1<1>\u8FD9\u91CC","field.scene":"\u573A\u666F","description.scene":"\u9ED8\u8BA4\u4E3A\uFF1Ageneral\u3002\u4EC5\u5728\u963F\u91CC\u4E91API\u63A7\u5236\u53F0\u5F00\u901A\u673A\u5668\u7FFB\u8BD1\u4E13\u4E1A\u7248\u7684\u60C5\u51B5\u4E0B\u53EF\u8BBE\u7F6E\uFF0C\u652F\u6301\u573A\u666F\u89C1<1>\u8FD9\u91CC","field.vocabId":"\u7528\u6237\u8BCD\u5178 ID","description.vocabId":"\u6307\u5B9A\u7684\u8BCD\u5178 out_id\uFF0C\u76EE\u524D\u652F\u6301\u82F1\u8BD1\u4E2D","description.model":"OpenAI \u7684\u6A21\u578B\uFF0C\u53EF\u4EE5\u4E3A gpt-3.5-turbo, gpt-4 \u7B49","description.maxTextGroupLengthPerRequest":"\u6BCF\u6B21\u53D1\u9001\u7ED9\u7FFB\u8BD1\u670D\u52A1\u7684\u6BB5\u843D\u6570\u91CF\uFF0C\u5982\u679C\u6BB5\u843D\u6570\u91CF\u8FC7\u591A\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u63A5\u53E3\u7684\u54CD\u5E94\u53D8\u6162","description.apiUrl":"\u8BF7\u6DFB\u52A0\u5177\u4F53\u5E26\u6709\u8DEF\u5F84\u7684\u7F51\u5740\uFF0C<1>\u66F4\u591A\u8BF4\u660E",enabledExtension:"\u542F\u7528\u6269\u5C55",clickToDisableExtension:"\u70B9\u51FB\u7981\u7528\u6269\u5C55",clickToEnableExtension:"\u70B9\u51FB\u542F\u7528\u6269\u5C55",hasBeenDisabled:"\u5DF2\u7981\u7528","show password":"\u663E\u793A\u5BC6\u7801",customContent:"\u8F93\u5165\u81EA\u5B9A\u4E49\u6A21\u578B\u540D\u79F0",inputOptions:"\u8F93\u5165\u6846\u589E\u5F3A",mouseHoverOptions:"\u9F20\u6807\u60AC\u505C",modifyMouseHoverKey:"\u4FEE\u6539\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",enableInputTranslation:"\u662F\u5426\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",enableInputTranslationDescription:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165 {startingKey}{startingKey} \u4F60\u597D\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A {inputTargetLanguage}",enableInputTranslationDescriptionForNoneKey:"\u542F\u7528\u540E\uFF0C\u5728\u8F93\u5165\u6846\u76F4\u63A5\u8F93\u5165\uFF1A\u4F60\u597D\u4E16\u754C\uFF0C\u7136\u540E\u5FEB\u901F\u8FDE\u51FB{inputTrailingTriggerKeyRepeatTimes}\u6B21{trailingKey}\uFF0C\u5373\u53EF\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguage:"\u8BBE\u7F6E\u8F93\u5165\u6846\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputTargetLanguageDescription:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00\uFF0C\u4E5F\u5C31\u662F {startingKey}{startingKey} \u4F5C\u4E3A\u89E6\u53D1\u8BCD\u7684\u9ED8\u8BA4\u8BED\u8A00",inputTargetLanguageDescriptionForNoneKey:"\u8F93\u5165\u6846\u7FFB\u8BD1\u7684\u9ED8\u8BA4\u76EE\u6807\u8BED\u8A00",inputStartingTriggerKeyTitle:"\u8BBE\u7F6E\u8F93\u5165\u6846\u90E8\u5206\u7FFB\u8BD1\u7684\u5206\u5272\u5B57\u7B26",inputStartingTriggerKeyDescription:"\u5F53\u4F60\u4E0D\u9700\u8981\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u7684\u65F6\u5019\uFF0C\u5206\u5272\u7B26\u5141\u8BB8\u4F60\u53EA\u7FFB\u8BD1 {startingKey}{startingKey} \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206\uFF0C\u4E5F\u53EF\u4EE5\u6307\u5B9A\u8BED\u8A00\u4EE3\u7801\uFF0C\u6BD4\u5982\uFF1A{startingKey}ja \u8868\u793A\u53EA\u7FFB\u8BD1 {startingKey}ja \u5230\u8F93\u5165\u6846\u672B\u5C3E\u7684\u90E8\u5206",inputStartingTriggerKeyDescriptionForNoneKey:"\u5F53\u524D\u8BBE\u7F6E\u4E3A\u65E0\u9700\u524D\u7F00\uFF0C\u6682\u65E0\u6CD5\u4F7F\u7528\u8F93\u5165\u6846\u7684\u90E8\u5206\u6587\u672C\u7FFB\u8BD1\u529F\u80FD",inputTrailingTriggerKeyTitle:"\u9009\u62E9\u4E00\u4E2A\u8F93\u5165\u7ED3\u675F\u7684\u89E6\u53D1\u5B57\u7B26",inputTrailingTriggerKeyDescription:"\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey} \u5C06\u4F1A\u5F00\u59CB\u7FFB\u8BD1",inputTrailingTriggerKeyTimeout:"\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4",inputTrailingTriggerKeyTimeoutDescription:"\u8BBE\u7F6E\u8F93\u5165\u7ED3\u675F\u8FDE\u51FB\u89E6\u53D1\u7684\u95F4\u9694\u65F6\u95F4\uFF08\u6BEB\u79D2\uFF09",spaceKey:"<\u7A7A\u683C\u952E>",noneKey:"\u65E0\u9700\u524D\u7F00\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u6587\u672C\u6846",inputTranslationBlockUrlsTitle:"\u5207\u52FF\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\u542F\u7528\u8F93\u5165\u6846\u589E\u5F3A",inputTranslationBlockUrlsDescription:"\u5728\u4EE5\u4E0B\u7F51\u5740\u4E2D\uFF0C\u8F93\u5165\u6846\u589E\u5F3A\u5C06\u4E0D\u4F1A\u751F\u6548",inputHelperInfo:"\u8BF4\u660E\uFF1A\u6211\u4EEC\u7279\u522B\u9488\u5BF9\u5728\u4E2D\u6587\u8F93\u5165\u6CD5\u4E0B\u90E8\u5206\u89E6\u53D1\u5B57\u7B26\u4F1A\u53D8\u6210\u4E2D\u6587\u6807\u70B9\u7B26\u53F7\u8FD9\u4EF6\u4E8B\u505A\u4E86\u4F18\u5316\uFF0C\u6BD4\u5982\u641C\u72D7\u8F93\u5165\u6CD5\u4E0B / \u4F1A\u53D8\u6210\u987F\u53F7 \u3001\uFF0C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u652F\u6301\u6240\u6709\u89E6\u53D1\u7B26\u5BF9\u5E94\u7684\u4E2D\u6587\u7B26\u53F7\uFF0C\u4E5F\u5C31\u662F\u8BF4 // \u3001\u3001 \u90FD\u4F1A\u88AB\u8BC6\u522B\u4E3A\u89E6\u53D1\u5B57\u7B26\u3002

\u540C\u65F6\u6211\u4EEC\u4E5F\u652F\u6301\u8BED\u8A00\u4EE3\u7801\u7684\u4E2D\u6587\u522B\u540D\u4F5C\u4E3A\u547D\u4EE4\uFF0C\u6BD4\u5982 /\u65E5\u6587 \u4F60\u597D\u4E16\u754C \u4F1A\u88AB\u7FFB\u8BD1\u4E3A\u65E5\u6587\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6240\u6709\u652F\u6301\u7684\u8BED\u8A00\u4EE3\u7801\u3002",reloadCurrentPage:"\u8BF7\u5148\u5237\u65B0\u5F53\u524D\u9875\u9762\uFF0C\u518D\u5F00\u59CB\u7FFB\u8BD1",noLocalFilePermissionForPDF:"\u6682\u65E0\u6743\u9650\u8BFB\u53D6\u672C\u5730\u6587\u4EF6\uFF0C\u8BF7\u70B9\u51FB\u4E0A\u65B9\u6309\u94AE\uFF0C\u7136\u540E\u5BFC\u5165\u672C\u5730\u6587\u4EF6",noPermissionForThisPage:"\u26A0\uFE0F \u6682\u65E0\u6743\u9650\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","error.retry":"\u91CD\u8BD5","error.reason":"\u9519\u8BEF\u539F\u56E0",retryAllParagraphs:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",retryAllButton:"\u91CD\u8BD5\u5168\u90E8\u9519\u8BEF\u6BB5\u843D",errorTooltipTitle:"\u70B9\u51FB\u67E5\u770B\u9519\u8BEF\u539F\u56E0",errorModalTitle:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u4F3C\u4E4E\u51FA\u4E86\u70B9\u95EE\u9898...",disableConfirm:"\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u8BBE\u7F6E",disableOnce:"\u672C\u6B21\u7981\u7528",disableGlobal:"\u6C38\u4E45\u7981\u7528",disableTint:"* \u4F60\u53EF\u4EE5\u5728 {option} \u4E2D\u91CD\u65B0\u542F\u7528\u3002",searchEnhancementNotes:"\u6211\u4EEC\u53D1\u73B0\uFF0C\u4E2D\u6587\u5173\u952E\u8BCD\u548C\u82F1\u6587\u5173\u952E\u8BCD\u7684\u65B0\u95FB\u7ED3\u679C\u6709\u975E\u5E38\u5927\u7684\u4E0D\u540C\uFF0C\u5728\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u53CC\u8BED\u4FE1\u606F\u589E\u5F3A\u529F\u80FD\u540E\uFF0C\u6211\u4EEC\u4F1A\u5728\u652F\u6301\u7684\u7F51\u7AD9\uFF08\u8C37\u6B4C\u65B0\u95FB\uFF0C\u8C37\u6B4C\u641C\u7D22\uFF08\u90E8\u5206\u5173\u952E\u8BCD\uFF09\uFF0C\u96EA\u7403\uFF0C\u4E1C\u65B9\u8D22\u5BCC\u7F51\uFF0C\u5BCC\u9014\uFF0C\u8001\u864E\uFF09\u81EA\u52A8\u7528\u82F1\u6587\u4E3A\u4F60\u641C\u7D22\u540C\u6837\u7684\u5173\u952E\u8BCD\u5E76\u5C55\u793A\u5728\u53F3\u4FA7\u3002\u5982\u679C\u4F60\u4E0D\u9700\u8981\u8BE5\u529F\u80FD\u7684\u8BDD\uFF0C\u53EF\u4EE5\u9009\u62E9\u7981\u7528\u5B83\u3002",option:"\u8BBE\u7F6E",saveSettings:"\u4FDD\u5B58\u8BBE\u7F6E",closeModal:"\u5173\u95ED\u7A97\u53E3",enableInputTranslationWithoutTriggerKeyTitle:"\u542F\u7528\u5FEB\u901F\u8FDE\u51FB 3 \u6B21{trailingKey}\uFF0C\u76F4\u63A5\u7FFB\u8BD1\u6574\u4E2A\u8F93\u5165\u6846\u4E3A{inputTargetLanguage}",enableInputTranslationWithoutTriggerKeyDescription:"\u5982\u9700\u6307\u5B9A\u76EE\u6807\u8BED\u8A00\uFF0C\u8BF7\u5728\u524D\u9762\u52A0\u4E0A\u8BED\u8A00\u4EE3\u7801\uFF0C\u5982\uFF1Aja \u4F60\u597D\u4E16\u754C",deepLProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",deepLProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",deeplProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",deepLCustomDescription:"\u9700\u8981\u56FD\u5916\u4FE1\u7528\u5361\uFF0C\u5728 <1>DeepL \u5B98\u65B9\u5F00\u901A\uFF0C\u70B9\u51FB\u67E5\u770B<2>\u6587\u6863",deepLCustomName:"\u81EA\u5B9A\u4E49 Auth Key",chooseProviderLabel:"\u9009\u62E9\u4E00\u4E2A\u670D\u52A1\u63D0\u4F9B\u5546",openaiProName:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1 Pro \u4F1A\u5458 (\u63A8\u8350)",openaiProDescription:"\u5F53\u524D\u5957\u9910\u53EF\u4EE5\u76F4\u63A5\u4F7F\u7528",openaiProDescriptionForNormal:"\u65E0\u9700\u4EFB\u4F55\u8BBE\u7F6E\uFF0C\u4F1A\u5458\u767B\u5F55\u540E\u5373\u53EF\u4F7F\u7528\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u4F1A\u5458",openaiCustomDescription:"\u53EF\u5728 OpenAI, Azure OpenAI, \u6216\u5176\u4ED6\u7B2C\u4E09\u65B9\u670D\u52A1\u83B7\u53D6\uFF0C<1>\u70B9\u6B64\u67E5\u770B\u6587\u6863",openaiCustomName:"\u81EA\u5B9A\u4E49 API Key",needLoginAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u81EA\u5B9A\u4E49)",goLoginOrAction:"(\u5F00\u901A\u4F1A\u5458\u6216\u53BB\u8BBE\u7F6E)",yearly:"\u8FDE\u7EED\u5305\u5E74",quarterly:"\u8FDE\u7EED\u5305\u5B63",monthly:"\u8FDE\u7EED\u5305\u6708",yearlyForOnce:"\u4E00\u6B21\u6027\u5E74\u5EA6\u5957\u9910",monthlyForOnce:"\u4E00\u6B21\u6027\u6708\u5EA6\u5957\u9910",daily:"\u8FDE\u7EED\u5305\u65E5",year:"\u8FDE\u7EED\u5305\u5E74",quarter:"\u8FDE\u7EED\u5305\u5B63",month:"\u8FDE\u7EED\u5305\u6708",day:"\u8FDE\u7EED\u5305\u65E5",onetime_7day:"7 \u5929\u4F53\u9A8C\u5305",currentPlanDescriptionForFree:"\u5F53\u524D\u5957\u9910\uFF1A\u514D\u8D39",currentPlanDescriptionForContinuous:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u81EA\u52A8\u7EED\u8D39",currentPlanDescriptionForAutoRenewCaceling:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F",currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u7BA1\u7406\u7EED\u8D39\u65B9\u6848",currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C\u5230\u671F\u540E\u5C06\u4E0D\u4F1A\u81EA\u52A8\u7EED\u671F\u3002
<1>\u70B9\u6B64\u542F\u7528\u8FDE\u7EED\u5305\u5E74",currentPlanDescriptionForOneTime:"\u5F53\u524D\u5957\u9910\uFF1A{plan}\uFF0C\u5C06\u4E8E {endAt} \u5230\u671F\uFF0C<1>\u70B9\u6B64\u5347\u7EA7\u4E3A\u5E74\u8D39\u6216<2>\u6708\u8D39\u4F1A\u5458",upgradePlan:"\u70B9\u6B64\u5347\u7EA7\u4E3A Pro \u4F1A\u5458",upgradeToPro:"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458","popup.openPro":"\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u540E\u53EF\u4EE5\u7545\u4EAB DeepL \u548C OpenAI \u7FFB\u8BD1\uFF0C\u70B9\u6B64\u5347\u7EA7","popup.openProForPro":"\u60A8\u662F Pro \u4F1A\u5458\uFF0C\u53EF\u76F4\u63A5\u4F7F\u7528 DeepL \u548C OpenAI \u7FFB\u8BD1",currentAccount:"\u5F53\u524D\u8D26\u6237",enableAutoSyncUserSettings:"\u542F\u7528\u591A\u8BBE\u5907\u81EA\u52A8\u4E91\u540C\u6B65",modalEnableInputTranslationTitle:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8F93\u5165\u6846\u7FFB\u8BD1\u63D0\u793A",modalEnableInputTranslationDesc:"\u60A8\u521A\u521A\u901A\u8FC7\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u89E6\u53D1\u4E86\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8F93\u5165\u6846\u7FFB\u8BD1\uFF0C\u8F93\u5165\u6846\u7684\u5185\u5BB9\u5C06\u88AB\u7FFB\u8BD1\u4E3A\u9ED8\u8BA4\u7684\u76EE\u6807\u8BED\u8A00\u3002\u901A\u8FC7 Ctrl+Z \u53EF\u4EE5\u64A4\u9500\u7FFB\u8BD1\u3002

\u5982\u679C\u8FD9\u662F\u4E00\u4E2A\u5931\u8BEF\uFF0C\u4E0D\u7528\u62C5\u5FC3\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u672C\u6B21\u7981\u7528\uFF0C\u6216\u8005\u6C38\u4E45\u7981\u7528\u8F93\u5165\u6846\u7FFB\u8BD1\u3002",saveAndNotShowAgain:"\u4FDD\u5B58\u4E14\u4E0D\u518D\u63D0\u793A",disableInputTranslationTips:"* \u4F60\u4E5F\u53EF\u4EE5\u5728 {option} \u4E2D\u8BBE\u7F6E\u5176\u4ED6\u5FEB\u6377\u952E\u6765\u89E6\u53D1\uFF0C{learnMore}\u3002",learnMore:"\u70B9\u6B64\u4E86\u89E3\u66F4\u591A",continueEnalbeInputTranslation:"\u7EE7\u7EED\u542F\u7528\u8F93\u5165\u6846\u7FFB\u8BD1",autoRenewTrialSuffix:'\uFF08\u8BD5\u7528\u4E2D\uFF0C\u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458\uFF09',upgradeFromTrialTitle:"\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458",subtitle:"\u89C6\u9891\u5B57\u5E55",youtubeService:"\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u89C6\u9891\u5B57\u5E55\u7FFB\u8BD1\u670D\u52A1","subtitle.disabledSubtitle":"\u6C38\u4E45\u7981\u7528\u89C6\u9891\u5B57\u5E55\u529F\u80FD","subtitle.disabledSubtitleDescription":"\u5982\u679C\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u548C\u5176\u4ED6\u6269\u5C55\u6709\u51B2\u7A81\uFF0C\u4F60\u53EF\u4EE5\u9009\u62E9\u6C38\u4E45\u7981\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u89C6\u9891\u5B57\u5E55\u529F\u80FD\u6216\u8005\u5378\u8F7D\u5176\u4ED6\u51B2\u7A81\u7684\u6269\u5C55","subtitle.autoEnableSubtitleDescription":"\u542F\u7528\u540E\uFF0C\u5F53\u89C6\u9891\u64AD\u653E\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF0C\u5426\u5219\u9700\u8981\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u624D\u4F1A\u663E\u793A\u3002","subtitle.preTranslation":"\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6765\u7FFB\u8BD1\u5B57\u5E55","subtitle.preTranslationDescription":"\u542F\u7528\u540E\u4F1A\u4F18\u5148\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u63D0\u524D\u7FFB\u8BD1\u6574\u4E2A\u5B57\u5E55\uFF0C1 \u5C0F\u65F6\u7684\u89C6\u9891\u5927\u6982\u6D88\u8017 5\u4E07 Tokens \u6216 \u5B57\u7B26\uFF0C\u8BF7\u914C\u60C5\u4F7F\u7528\uFF1B\u5173\u95ED\u540E\u5219\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF1B\u8BF7\u6CE8\u610F\uFF0C\u5F53\u539F\u89C6\u9891\u6CA1\u6709\u5BF9\u5E94\u7684\u8BD1\u6587\u5B57\u5E55\u65F6\uFF0C\u5219\u65E0\u8BBA\u662F\u5426\u542F\u7528\u8FD9\u4E2A\u9009\u9879\uFF0C\u90FD\u4F1A\u4F7F\u7528\u4E0B\u9762\u6307\u5B9A\u7684\u7FFB\u8BD1\u670D\u52A1\u6765\u7FFB\u8BD1\u5B57\u5E55\u3002","subtitle.humanSubtitlesPreferred":"\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55","subtitle.humanSubtitlesPreferredDescription":"\u5F53\u89C6\u9891\u6709\u76EE\u6807\u8BED\u8A00\u4EBA\u5DE5\u5B57\u5E55\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528\u4EBA\u5DE5\u5B57\u5E55\uFF08\u63A8\u8350\uFF09","subtitle.bilingual":"\u53CC\u8BED\u5B57\u5E55","subtitle.autoDisableSubtitle":"\u4E0D\u81EA\u52A8\u542F\u7528\u53CC\u8BED\u5B57\u5E55","subtitle.hideQuickButton":"\u4E0D\u518D\u663E\u793A\u8BE5\u5FEB\u6377\u65B9\u5F0F","subtitle.showQuickButton":"\u5728\u64AD\u653E\u5668\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u5FEB\u6377\u65B9\u5F0F",videoSubtitleTranslationDescription:"\u4E3A\u89C6\u9891\u5B57\u5E55\u5355\u72EC\u6307\u5B9A\u4E00\u4E2A\u7FFB\u8BD1\u670D\u52A1",subtitleTranslating:"\u6B63\u5728\u4F7F\u7528 {service} \u670D\u52A1\u7FFB\u8BD1\u5B57\u5E55\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...\uFF08\u6C89\u6D78\u5F0F\u7FFB\u8BD1\uFF09",subtitleLoading:"\u6B63\u5728\u52A0\u8F7D\u5B57\u5E55...",bilingual:"\u53CC\u8BED","field.action":"\u662F\u5426\u542F\u7528\u767E\u5EA6\u672F\u8BED","description.action":"\u542F\u7528\u540E\u4F1A\u5728\u8BF7\u6C42\u4E2D\u52A0\u5165 action=1 \u7684\u53C2\u6570\uFF0C\u4EE5\u4FBF\u544A\u77E5\u767E\u5EA6\u542F\u7528\u672F\u8BED\uFF0C<1>\u66F4\u591A\u8BF4\u660E\u8BF7\u53C2\u8003\u5B98\u65B9\u6587\u6863",closeQuickTranslation:"\u5173\u95ED\u60AC\u6D6E\u7403","closeQuickTranslation.untilNext":"\u672C\u6B21\u5173\u95ED\u76F4\u5230\u4E0B\u6B21\u8BBF\u95EE","closeQuickTranslation.currentWebsite":"\u5F53\u524D\u7F51\u7AD9\u7981\u7528","closeQuickTranslation.alwaysClose":"\u6C38\u4E45\u7981\u7528","closeQuickTranslation.settingOpen":"\uFF08\u53EF\u5728<1>\u8BBE\u7F6E\u9875\u5F00\u542F\uFF09","closeQuickTranslation.cancel":"\u53D6\u6D88","closeQuickTranslation.confirm":"\u786E\u5B9A","floatBall.translate":"\u70B9\u51FB\u7FFB\u8BD1\u8BE5\u9875\u9762","floatBall.showOriginal":"\u70B9\u51FB\u5207\u6362\u56DE\u539F\u6587","floatBall.close":"\u5173\u95ED\u60AC\u6D6E\u7403","floatBallOptions.enableDescPc":"\u542F\u7528\u9875\u9762\u60AC\u6D6E\u7403\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1","floatBallOptions.enableDesc":"\u5173\u95ED\u60AC\u6D6E\u7403\u540E\uFF0C\u53EF\u4EE5\u7528{touch}\u5524\u8D77\u3002\u4E3A\u9632\u6B62\u4E0D\u614E\u5173\u95ED\u8BE5\u9009\u9879\u540E\u627E\u4E0D\u5230\u60AC\u6D6E\u7403\uFF0C\u5F3A\u70C8\u5EFA\u8BAE\u6536\u85CF\u672C\u8BBE\u7F6E\u9875","description.azureApiUrl":"\u586B\u5199\u81EA\u5B9A\u4E49\u7684API\u63A5\u53E3\u5730\u5740","floatBall.guideClickToTranslate":`\u70B9\u51FB\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u60AC\u6D6E\u7403 \u5373\u53EF\u5FEB\u901F\u7FFB\u8BD1`,"floatBall.iKnow":"\u6211\u77E5\u9053\u4E86",confirmSupportMouse:"\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301",confirmSupportMouseDescription:"\u68C0\u6D4B\u5230\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u9F20\u6807\u529F\u80FD\uFF0C\u662F\u5426\u5F3A\u5236\u542F\u7528\u9F20\u6807\u652F\u6301\uFF1F",sampleTargetText:"\u957F\u591C\u5C06\u81F3\uFF0C\u6211\u4ECE\u4ECA\u5F00\u59CB\u5B88\u671B\uFF0C\u81F3\u6B7B\u65B9\u4F11\u3002\u6211\u5C06\u4E0D\u5A36\u59BB\u3001\u4E0D\u5C01\u5730\u3001\u4E0D\u751F\u5B50\u3002\u6211\u5C06\u4E0D\u6234\u5B9D\u51A0\uFF0C\u4E0D\u4E89\u8363\u5BA0\u3002\u6211\u5C06\u5C3D\u5FE0\u804C\u5B88\uFF0C\u751F\u6B7B\u4E8E\u65AF\u3002",sampleSourceText:"Night gathers, and now my watch begins. It shall not end until my death. I shall take no wife, hold no lands, father no children. I shall wear no crowns and win no glory. I shall live and die at my post.","subtitle.supportedSites":"\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF08\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u90E8\u5206\u7F51\u7AD9\u5728\u9996\u6B21\u5F00\u542F\u5B57\u5E55\u540E\u9700\u8981\u91CD\u65B0\u5237\u65B0\u9875\u9762\uFF0C\u6216\u8005\u9700\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u4EE5\u663E\u793A\u53CC\u8BED\u5B57\u5E55\uFF09\uFF1A",viewWithImmersiveTranslate:"\u53CC\u8BED\u7248\u672C(\u6C89\u6D78\u5F0F\u7FFB\u8BD1)",errorReason:"\u9519\u8BEF\u539F\u56E0\uFF1A{message}","proQuotaExceededError.onetime7day":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u5347\u7EA7\u4E3A\u6708\u5EA6/\u5E74\u5EA6\u4F1A\u5458',"proQuotaExceededError.trial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u7ACB\u523B\u5347\u7EA7\u4E3A\u6B63\u5F0F\u4F1A\u5458',"proQuotaExceededError.nonTrial":'\uFF0C\u60A8\u53EF\u4EE5\u9009\u62E9\u4EE5\u4E0B\u65B9\u5F0F\u89E3\u51B3\uFF1A

1. \u5207\u6362\u5230 {anotherService} \u6216\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1
2. \u8D2D\u4E70 {translationService} \u989D\u5916\u6D41\u91CF\u5305',"proQuotaExceededError.resetTime":"
3. \u989D\u5EA6\u91CD\u7F6E\u65F6\u95F4\uFF1A{resetTime}",paragraphMinTextCountField:"\u7FFB\u8BD1\u6BB5\u843D\u6240\u9700\u7684\u6700\u5C11\u5B57\u7B26\u6570",paragraphMinTextCountDesc:"\u6CE8\u610F\uFF0C\u8FD9\u91CC\u6307\u7684\u5B57\u7B26\u957F\u5EA6\uFF0C\u6BD4\u5982: hello \u662F 5 \u4E2A\u5B57\u7B26, \u8BBE\u7F6E\u4E3A\u66F4\u5927\u7684\u503C\u53EF\u4EE5\u51CF\u5C11\u4E0D\u5FC5\u8981\u7684\u5C0F\u6BB5\u843D\u7FFB\u8BD1",networkError:"\u7FFB\u8BD1\u670D\u52A1\u6216\u7F51\u7EDC\u51FA\u73B0\u95EE\u9898",notLogin:"\u672A\u767B\u5F55","browser.toggleMouseHoverTranslateDirectly":"\u5728\u9875\u9762\u4E0A\u4E34\u65F6\u542F\u7528\u6216\u5173\u95ED\u9F20\u6807\u60AC\u505C\u76F4\u63A5\u7FFB\u8BD1","browser.translateWithOpenAI":"\u4E34\u65F6\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithDeepL":"\u4E34\u65F6\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGoogle":"\u4E34\u65F6\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithBing":"\u4E34\u65F6\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithGemini":"\u4E34\u65F6\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateWithTransmart":"\u4E34\u65F6\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762","browser.translateInputBox":"\u7FFB\u8BD1\u5F53\u524D\u8F93\u5165\u6846\u5185\u5BB9",shortcutSettings:"\u5FEB\u6377\u952E",shortcutSettingsTitle:"\u5FEB\u6377\u952E\u8BBE\u7F6E",confirmResetToDefaultSettings:"\u786E\u8BA4\u8981\u6062\u590D\u8BE5\u7FFB\u8BD1\u670D\u52A1\u4E3A\u9ED8\u8BA4\u8BBE\u7F6E\u5417\uFF1F\uFF08\u4EC5\u91CD\u7F6E\u5F53\u524D\u7FFB\u8BD1\u670D\u52A1\u7684\u8BBE\u7F6E\uFF09","intro.hoverTitle":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D","intro.hoverDescription":"\u9F20\u6807\u60AC\u505C\u7FFB\u8BD1\u662F\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u91CC\u975E\u5E38\u91CD\u8981\u7684\u529F\u80FD\uFF0C\u53EA\u9700\u5C06\u9F20\u6807\u653E\u5728\u6BB5\u843D\u4E0A\uFF0C\u540C\u65F6\u6309\u4E0B\u8BBE\u5B9A\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u81EA\u52A8\u7FFB\u8BD1\u5F53\u524D\u6BB5\u843D\uFF08\u6CE8\u610F\uFF1A\u9ED8\u8BA4\u6CA1\u6709\u542F\u7528\u54E6\uFF0C\u8BF7\u5728\u4E0B\u65B9\u8BBE\u7F6E\uFF09\uFF0C\u8BE5\u4EA4\u4E92\u7528\u4E8E\u66F4\u597D\u7684\u66FF\u4EE3\u5212\u8BCD\u7FFB\u8BD1\uFF0C\u53E6\u5916\uFF0C\u6B64\u529F\u80FD\u8FD8\u5E7F\u6CDB\u5E94\u7528\u4E8E\u90A3\u4E9B\u65E0\u6CD5\u88AB\u8BC6\u522B\u7684\u7FFB\u8BD1\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u5229\u7528\u8BE5\u529F\u80FD\uFF0C\u5F3A\u5236\u7FFB\u8BD1\u4EFB\u4F55\u6BB5\u843D\u3002","intro.floatBallTitle":"\u5FEB\u6377\u7FFB\u8BD1\u60AC\u6D6E\u7403","intro.floatBallDescription":"\u542F\u7528\u540E\uFF0C\u4F1A\u5728\u9875\u9762\u53F3\u4FA7\u663E\u793A\u4E00\u4E2A\u5FEB\u6377\u7FFB\u8BD1\u6309\u94AE\uFF0C\u70B9\u51FB\u5373\u53EF\u7FFB\u8BD1\uFF0C\u518D\u6B21\u70B9\u51FB\u5373\u53EF\u5207\u6362\u56DE\u539F\u6587\u3002\u5728\u79FB\u52A8\u7AEF\uFF0C\u957F\u6309\u60AC\u6D6E\u7403\uFF0C\u53EF\u4EE5\u6253\u5F00\u5FEB\u6377\u8BBE\u7F6E\u9762\u677F\u3002","intro.subtitleTitle":"\u5728\u7EBF\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u663E\u793A","intro.subtitleDescription":"\u5F00\u542F\u6B64\u529F\u80FD\u540E\uFF0C\u89C6\u9891\u64AD\u653E\u65F6\u5C06\u81EA\u52A8\u5C55\u793A\u53CC\u8BED\u5B57\u5E55\u3002\u5982\u679C\u672A\u542F\u7528\uFF0C\u60A8\u9700\u5728\u9875\u9762\u4E0A\u624B\u52A8\u70B9\u51FB\u7FFB\u8BD1\u6309\u94AE\u4EE5\u663E\u793A\u5B57\u5E55\u3002\u8BF7\u6CE8\u610F\uFF0C\u7531\u4E8E\u6280\u672F\u9650\u5236\uFF0C\u67D0\u4E9B\u7F51\u7AD9\u5728\u9996\u6B21\u6FC0\u6D3B\u5B57\u5E55\u65F6\u53EF\u80FD\u9700\u8981\u5237\u65B0\u9875\u9762\u6216\u7B49\u5F85\u7FFB\u8BD1\u5B8C\u6210\u540E\uFF0C\u624D\u80FD\u663E\u793A\u53CC\u8BED\u5B57\u5E55\u3002\uFF08\u6B64\u5916\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u6253\u5F00\u89C6\u9891\u7F51\u7AD9\u540E\uFF0C\u53F3\u4E0A\u89D2\u6253\u5F00\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u5FEB\u6377\u9762\u677F\u542F\u7528/\u5173\u95ED\uFF09

\u5F53\u524D\u5DF2\u652F\u6301\u5728\u8FD9\u4E9B\u7F51\u7AD9\u4F7F\u7528\u53CC\u8BED\u5B57\u5E55\uFF1A","desc.toggleMouseHoverTranslateDirectly":"\u6309\u4E0B\u8FD9\u4E2A\u5FEB\u6377\u952E\u540E\uFF0C\u5728\u9875\u9762\u4E0A\uFF0C\u53EA\u8981\u9F20\u6807\u6307\u5411\u4EFB\u4F55\u4E00\u6BB5\u6587\u5B57\uFF0C\u5C31\u4F1A\u81EA\u52A8\u7FFB\u8BD1\u8FD9\u6BB5\u6587\u5B57\u3002\u518D\u6309\u4E00\u6B21\u5FEB\u6377\u952E\uFF0C\u5C31\u53EF\u4EE5\u5173\u95ED\u8FD9\u4E2A\u81EA\u52A8\u7FFB\u8BD1\u529F\u80FD\u3002","shortcutGroup.main":"\u5E38\u7528\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.others":"\u66F4\u591A\u81EA\u5B9A\u4E49\u529F\u80FD\u5FEB\u6377\u952E","shortcutGroup.shortcutsForTranslationServices":"\u7FFB\u8BD1\u670D\u52A1\u76F8\u5173\u5FEB\u6377\u952E",browserShortcutsSucks:"\u7531\u4E8E\u6D4F\u89C8\u5668\u5BF9\u8F93\u5165\u6846\u7684\u5FEB\u6377\u952E\u8BC6\u522B\u4E0D\u51C6\u786E\uFF0C\u6240\u4EE5\u8BF7\u624B\u52A8\u8F93\u5165\u5FEB\u6377\u952E\u7684\u540D\u5B57\uFF0C\u8F93\u5165\u540E\uFF0C\u70B9\u51FB\u7A7A\u767D\u5904\u5373\u53EF\u81EA\u52A8\u4FDD\u5B58\u3002\uFF08macOS \u91CC\u9762 Alt \u548C Option \u662F\u540C\u6837\u7684\u952E\uFF0C\u5EFA\u8BAE\u7EDF\u4E00\u8F93\u5165 Alt\uFF09\u3002\u6BD4\u5982\uFF1A","shortcutGroup.touch":"\u89E6\u5C4F\u4E13\u7528\u624B\u52BF","shortcutGroup.mouse":"\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E\u914D\u7F6E","neverTranslateText.title":"\u4EE5\u4E0B\u5355\u8BCD\u4FDD\u6301\u539F\u6587\uFF0C\u4E0D\u8981\u7FFB\u8BD1","neverTranslateText.description":"\u7531\u4E8E\u67D0\u4E9B\u7FFB\u8BD1\u5F15\u64CE\u5BF9\u4E13\u6709\u540D\u8BCD\u8BC6\u522B\u4E0D\u7406\u60F3\uFF0C\u4F60\u53EF\u4EE5\u5728\u6B64\u5904\u6DFB\u52A0\u5355\u8BCD\uFF0C\u786E\u4FDD\u5B83\u4EEC\u5728\u7FFB\u8BD1\u8FC7\u7A0B\u4E2D\u4E0D\u88AB\u8F6C\u6362\u3002\u8BF7\u6CE8\u610F\uFF0C\u6B64\u529F\u80FD\u533A\u5206\u5927\u5C0F\u5199\uFF0C\u5E76\u4EC5\u652F\u6301\u4EE5\u7A7A\u683C\u5206\u9694\u7684\u5355\u8BCD\u8BED\u8A00\uFF08\u5982\u82F1\u8BED\u3001\u6CD5\u8BED\uFF09\uFF0C\u4E0D\u9002\u7528\u4E8E\u65E5\u8BED\u3001\u97E9\u8BED\u7B49\u8BED\u8A00","tagsInput.add":"+ \u6DFB\u52A0","desc.mouseHoverHoldKey":"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u67D0\u4E2A\u6BB5\u843D\u4E0A\u65F6\uFF0C\u540C\u65F6\u6309\u4E0B\u53F3\u4FA7\u7684\u5FEB\u6377\u952E\uFF0C\u5373\u53EF\u76F4\u63A5\u7FFB\u8BD1\u8BE5\u6BB5\u843D",mouseHoverCustomKeyTitle:"\u81EA\u5B9A\u4E49\u9F20\u6807\u60AC\u505C\u5FEB\u6377\u952E",mouseHoverCustomKeyDescription:"\u4F60\u53EF\u4EE5\u81EA\u5B9A\u4E49\u4E00\u4E2A\u9F20\u6807\u60AC\u505C\u7684\u7EC4\u5408\u5FEB\u6377\u952E\uFF0C\u6BD4\u5982\uFF1A Alt+Z, Ctrl+E, Cmd+Alt+E \u6216\u8005\u76F4\u63A5 Cmd\uFF0C \u8BF7\u624B\u52A8\u8F93\u5165",mouseHoverShortcutPlaceholder:"\u8BF7\u624B\u52A8\u8F93\u5165",browserShortcutsNoteForFirefox:"Firefox \u6D4F\u89C8\u5668\u4FEE\u6539\u5FEB\u6377\u952E\u9700\u8981\u6253\u5F00\u6269\u5C55\u7BA1\u7406\u9875\u9762 `about:addons`\uFF0C\u7136\u540E\u70B9\u51FB\u300C\u8BBE\u7F6E\u300D-> \u300C\u7BA1\u7406\u5FEB\u6377\u952E\u300D",browserShortcutsNoteForChrome:"\u8BF7\u6CE8\u610F\uFF1A\u8981\u5728\u57FA\u4E8EChrome\u5185\u6838\u7684\u6D4F\u89C8\u5668\u4E2D\u4FEE\u6539\u5FEB\u6377\u952E\uFF0C\u8BF7\u8BBF\u95EE[\u6269\u5C55\u7BA1\u7406\u9875\u9762] -> [\u7BA1\u7406\u5FEB\u6377\u952E] ","desc.toggleTranslateTheMainPage":"\u4EC5\u7FFB\u8BD1\u9875\u9762\u4E3B\u8981\u533A\u57DF\uFF0C\u5F53\u4F60\u5728\u8FDB\u9636\u8BBE\u7F6E\u91CC\u542F\u7528\u4E86\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\u540E\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF","desc.toggleTranslateTheWholePage":"\u7FFB\u8BD1\u9875\u9762\u5168\u90E8\u533A\u57DF\uFF0C\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u4F1A\u7FFB\u8BD1\u9875\u9762\u7684\u4E3B\u8981\u533A\u57DF\uFF0C\u4F60\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u5FEB\u6377\u952E\u6765\u4E13\u95E8\u7FFB\u8BD1\u9875\u9762\u7684\u5168\u90E8\u533A\u57DF","browser.toggleTranslationMask":"\u5207\u6362\u5F53\u524D\u9875\u9762\u8BD1\u6587\u4E3A\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09","desc.interfaceLanguage":"\u754C\u9762\u8BED\u8A00\u8BBE\u7F6E\u5F71\u54CD\u63A7\u5236\u9762\u677F\u7684\u663E\u793A\u8BED\u8A00\uFF0C\u548C\u7FFB\u8BD1\u7684\u76EE\u6807\u8BED\u8A00\u65E0\u5173",mouseHoverHoldKey:"\u60AC\u505C\u7FFB\u8BD1\u89E6\u53D1\u952E",clickToSeeQuickDemo:"30 \u79D2\u5FEB\u901F\u6559\u5B66\u89C6\u9891",shortcutDisableTooltip:"\u8BF7\u5728\u6D4F\u89C8\u5668\u63D0\u4F9B\u7684\u6269\u5C55\u5FEB\u6377\u952E\u7BA1\u7406\u9875\u9762\u8FDB\u884C\u8BBE\u7F6E\uFF0C\u66F4\u591A\u6307\u5F15\u8BF7\u67E5\u770B\u672C\u9875\u9762\u6700\u4E0A\u65B9\u7684\u8BF4\u660E",floatBallOptions:"\u60AC\u6D6E\u7403","subtitle.autoEnableSubtitle":"\u81EA\u52A8\u5F00\u542F\u53CC\u8BED\u5B57\u5E55","floatBall.longPress":"\u957F\u6309\u53EF\u5FEB\u901F\u6253\u5F00\u8BBE\u7F6E\u9762\u677F\u54E6",notLoginPro:"\u60A8\u8FD8\u672A\u767B\u5F55\u60A8\u7684\u4F1A\u5458\u8D26\u6237",upgradeToProErrorTitle:"\u8BF7\u5347\u7EA7\u4E3A Pro \u4F1A\u5458\u518D\u4F7F\u7528\u8BE5\u7FFB\u8BD1\u670D\u52A1",loggedIn:"\u5DF2\u767B\u5F55",translationOnlyMode:"\u4EC5\u8BD1\u6587\u6A21\u5F0F",translationOnlyModeDescription:"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u800C\u4E0D\u662F\u9ED8\u8BA4\u7684\u53CC\u8BED\u6A21\u5F0F\u3002\u6CE8\u610F\uFF1A\u7531\u4E8E\u6280\u672F\u7684\u9650\u5236\u95EE\u9898\uFF0C\u5728\u4EC5\u8BD1\u6587\u6A21\u5F0F\u4E0B\uFF0C\u539F\u6587\u7684\u8D85\u94FE\u63A5\u5C06\u4F1A\u5931\u6548","description.baiduField":"\u652F\u6301\u7684\u9886\u57DF\u89C1<1>\u8FD9\u91CC\uFF0C\u4E3A\u7A7A\u5219\u8868\u793A\u4E0D\u6307\u5B9A\u9886\u57DF",temprarilyChangeTranslationTo_openai:"\u6B63\u5728\u4F7F\u7528 OpenAI \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_google:"\u6B63\u5728\u4F7F\u7528 Google \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_bing:"\u6B63\u5728\u4F7F\u7528\u5FAE\u8F6F\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_gemini:"\u6B63\u5728\u4F7F\u7528 Gemini \u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_transmart:"\u6B63\u5728\u4F7F\u7528\u817E\u8BAF\u7FFB\u8BD1\u5F53\u524D\u9875\u9762",temprarilyChangeTranslationTo_deepl:"\u6B63\u5728\u4F7F\u7528 DeepL \u7FFB\u8BD1\u5F53\u524D\u9875\u9762","widget.translateFile":"PDF/ePub","widget.videoSubtitle":"\u89C6\u9891\u5B57\u5E55","widget.instruction":"\u4F7F\u7528\u8BF4\u660E",buildSnapshots:"\u751F\u6210\u7F51\u9875\u5FEB\u7167","widget.videoSubtitleTooltip":"\u652F\u6301 Youtube \u7B49 {count}+ \u89C6\u9891\u7F51\u7AD9","widget.instructionTooltip":"\u67E5\u770B\u4F7F\u7528\u8BF4\u660E",alwaysTranslateSomeLanguage:"\u603B\u662F\u7FFB\u8BD1{language}\u9875\u9762",alwaysTranslateThisSite:"\u603B\u662F\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",neverTranslateThisSite:"\u6C38\u4E0D\u7FFB\u8BD1\u8BE5\u7F51\u7AD9",touchShortcutsToggleTranslatePage:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u6765\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslatePage":"\u8BBE\u7F6E\u540E\uFF0C\u5728\u79FB\u52A8\u8BBE\u5907\u65F6\uFF0C\u53EF\u4EE5\u540C\u65F6\u7528 X \u4E2A\u624B\u6307\u89E6\u6478\u5C4F\u5E55\u3001\u5DE6\u53F3\u6ED1\u52A8\u6216\u8FDE\u7EED\u70B9\u51FB\uFF0C\u89E6\u53D1\u7FFB\u8BD1\u7F51\u9875/\u663E\u793A\u539F\u6587",touchShortcutsToggleTranslationMask:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u663E\u793A\u7FFB\u8BD1\u906E\u7F69/\u663E\u793A\u539F\u6587","desc.touchShortcutsToggleTranslationMask":"\u7FFB\u8BD1\u906E\u7F69\u662F\u6307\u8BD1\u6587\u6837\u5F0F\u91CC\u7684\u6A21\u7CCA\u6548\u679C\uFF08\u5B66\u4E60\u6A21\u5F0F\uFF09\uFF0C\u5F00\u542F\u540E\u4E34\u65F6\u5BF9\u8BD1\u6587\u4F7F\u7528\u6A21\u7CCA\u6548\u679C\uFF0C\u65B9\u4FBF\u5B66\u4E60",touchShortcutsToggleTranslateTouchElement:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","desc.touchShortcutsToggleTranslateTouchElement":"\u81EA\u5B9A\u4E49\u4E00\u4E2A\u624B\u52BF\uFF0C\u5373\u53EF\u7FFB\u8BD1\u60A8\u6240\u5728\u7684\u4EFB\u4F55\u6BB5\u843D",touchShortcutsOff:"\u5173\u95ED","fingers.2":"\u53CC\u6307\u89E6\u6478","fingers.3":"\u4E09\u6307\u89E6\u6478","fingers.4":"\u56DB\u6307\u89E6\u6478","fingers.5":"\u4E94\u6307\u89E6\u6478","multipleClick.2":"\u53CC\u51FB","multipleClick.3":"\u4E09\u8FDE\u51FB","multipleClick.4":"\u56DB\u8FDE\u51FB","slide.left":"\u5411\u53F3\u6ED1\u52A8","slide.right":"\u5411\u5DE6\u6ED1\u52A8",contact:"\u8054\u7CFB\u6211\u4EEC","contact.description":"\u5982\u679C\u60A8\u6709\u4EFB\u4F55\u95EE\u9898\u6216\u5EFA\u8BAE\uFF0C\u6B22\u8FCE\u586B\u5199\u4E0B\u65B9\u8868\u5355\u8054\u7CFB\u6211\u4EEC\uFF0C\u6216\u8005\u53D1\u9001\u90AE\u4EF6\u81F3 {email}\uFF0C\u6211\u4EEC\u4F1A\u5C3D\u5FEB\u56DE\u590D\u60A8\u3002","font.none":"\u65E0","font.Microsoft YaHei":"\u5FAE\u8F6F\u96C5\u9ED1","font.SimSun":"\u5B8B\u4F53","font.NSimSun":"\u65B0\u5B8B\u4F53","font.Microsoft JhengHei":"\u5FAE\u8F6F\u6B63\u9ED1\u4F53","font.KaiTi":"\u6977\u4F53","font.FangSong":"\u4EFF\u5B8B","font.PingFang SC":"\u82F9\u65B9","font.STHeiti":"\u534E\u6587\u9ED1\u4F53","font.STKaiti":"\u534E\u6587\u6977\u4F53","font.STSong":"\u534E\u6587\u5B8B\u4F53","font.STFangsong":"\u534E\u6587\u4EFF\u5B8B","font.STZhongsong":"\u534E\u6587\u4E2D\u5B8B","font.STHupo":"\u534E\u6587\u7425\u73C0","font.STXinwei":"\u534E\u6587\u65B0\u9B4F","font.STLiti":"\u534E\u6587\u96B6\u4E66","font.STXingkai":"\u534E\u6587\u884C\u6977","font.Hiragino Sans GB":"\u51AC\u9752\u9ED1\u4F53","font.Lantinghei SC":"\u5170\u4EAD\u9ED1","font.Hanzipen SC":"\u6C49\u4EEA\u7FE9\u7FE9\u4F53","font.Hannotate SC":"\u6C49\u4EEA\u6CE8\u9ED1","font.Songti SC":"\u5B8B\u4F53","font.Wawati SC":"\u5A03\u5A03\u4F53","font.Weibei SC":"\u9B4F\u7891","font.Xingkai SC":"\u884C\u6977","font.Yapi SC":"\u96C5\u75DE","font.Yuanti SC":"\u5706\u4F53","browser.toggleVideoSubtitlePreTranslation":"\u5207\u6362\u53CC\u8BED\u5B57\u5E55\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBE\u7F6E","desc.toggleVideoSubtitlePreTranslation":"\u6309\u4E0B\u540E\uFF0C\u89C6\u9891\u53CC\u8BED\u5B57\u5E55\u4F1A\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u7684\u8BBE\u7F6E\uFF0C\u518D\u6B21\u6309\u4E0B\u4F1A\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55\uFF0C\u6CE8\u610F\uFF1A\u8BE5\u5FEB\u6377\u65B9\u5F0F\u4FEE\u6539\u7684\u662F\u5168\u5C40\u8BBE\u7F6E",videoSubtitlePreTranslationOn:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1",videoSubtitlePreTranslationOff:"\u89C6\u9891\u5B57\u5E55\u5C06\u4F18\u5148\u4F7F\u7528\u539F\u89C6\u9891\u81EA\u5E26\u7684\u673A\u7FFB\u5B57\u5E55",translationFont:"\u8BBE\u7F6E\u5B57\u4F53","translationFont.custom":"\u8F93\u5165\u81EA\u5B9A\u4E49\u5B57\u4F53","translationFont.customPlaceholder":"\u5B57\u4F53","translationFont.notSupportErrorMessage":"\u8BF7\u68C0\u67E5\u60A8\u8F93\u5165\u7684\u5B57\u4F53\u540D\u79F0\u662F\u5426\u6B63\u786E\uFF0C\u6216\u786E\u8BA4\u8BE5\u5B57\u4F53\u5DF2\u5728\u60A8\u7684\u8BBE\u5907\u4E0A\u5B89\u88C5\u3002","touch.mouse-translate":"\u7FFB\u8BD1\u6307\u5B9A\u6BB5\u843D","translationServices.inherit":"\u8DDF\u968F\u4E3B\u7FFB\u8BD1\u670D\u52A1","error.serveConfigError":"\u670D\u52A1\u914D\u7F6E\u9519\u8BEF","error.reloadPageOfSetting":"\u914D\u7F6E\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.googleLimitIp":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8C37\u6B4C\u670D\u52A1\u5DF2\u5BF9\u8BE5IP\u5730\u5740\u8FDB\u884C\u9650\u6D41\uFF0C\u5EFA\u8BAE\u60A8\u66F4\u6362\u7F51\u7EDC\u8282\u70B9\u3002","error.openAIFreeLimit":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u5F53\u524D\u7684\u7FFB\u8BD1\u8BF7\u6C42\u9891\u7387\u5DF2\u8FBE\u5230\u6BCF\u5206\u949F\u6700\u591A 3 \u6B21\u7684\u4E0A\u9650\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002\uFF08\u8FD9\u662F OpenAI \u5B98\u65B9\u5BF9\u514D\u8D39 API Key \u7684\u9650\u5236\uFF0C\u82E5\u8981\u89E3\u9664\u6B64\u9650\u5236\uFF0C\u8BF7\u5728 OpenAI \u540E\u53F0\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002\uFF09","error.openAIExceededQuota":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF1A\u4F60\u5F53\u524D\u7684 OpenAI \u8D26\u6237\u4F59\u989D\u4E0D\u8DB3\uFF0C\u8BF7\u5728 OpenAI \u5B98\u65B9\u540E\u53F0\u8FDB\u884C\u5145\u503C\u6216\u8005\u7ED1\u5B9A\u4FE1\u7528\u5361\u3002","error.429":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C\u8BF4\u660E\u8BF7\u6C42\u8FC7\u4E8E\u9891\u7E41\u6216\u8D85\u51FA\u989D\u5EA6\u9650\u5236\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002","error.403":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u6682\u65F6\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u670D\u52A1\u3002 ","error.400":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u8BF7\u6C42\u53C2\u6570\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u76F8\u5E94\u914D\u7F6E\u3002","error.502":"\u670D\u52A1\u8FD4\u56DE\u9519\u8BEF\uFF0C \u670D\u52A1\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5\u3002 ","error.proTokenInvalid":"\u82E5\u60A8\u662FPro\u7528\u6237\uFF0C\u8BF7\u767B\u9646\u540E\u518D\u4F7F\u7528Pro\u7FFB\u8BD1\u670D\u52A1 ","error.proUpgrade":"\u5347\u7EA7\u540E\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u518D\u6B21\u7FFB\u8BD1\u3002","error.configError":"\u914D\u7F6E\u6570\u636E\u5F02\u5E38","error.goReset":"\u53BB\u91CD\u7F6E",batchEdit:"\u6279\u91CF\u64CD\u4F5C","translationModeLang.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u8BED\u8A00","translationModeLang.translation.description":"\u5F53\u9875\u9762\u8BED\u8A00\u4E3A\u4E0B\u5217\u8BED\u8A00\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","translationModeUrl.translation.title":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u7684\u7F51\u5740","translationModeUrl.translation.description":"\u5F53\u7F51\u7AD9\u4E3A\u4E0B\u5217\u57DF\u540D\u65F6\uFF0C\u4F1A\u81EA\u52A8\u4F7F\u7528\u4EC5\u8BD1\u6587\u6A21\u5F0F","browser.toggleOnlyTransation":"\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.toggleOnlyTransation":"\u4EC5\u8BD1\u6587\u6A21\u5F0F\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",touchShortcutsToggleTranslatePageOnlyTranslation:"\u8BBE\u7F6E\u89E6\u5C4F\u624B\u52BF\u5207\u6362\u53CC\u8BED/\u4EC5\u8BD1\u6587\u6A21\u5F0F","desc.touchShortcutsToggleTranslatePageOnlyTranslation":"\u4EC5\u8BD1\u6587\u6307\u7684\u662F\u53EA\u663E\u793A\u8BD1\u6587\uFF0C\u5982\u679C\u7F51\u9875\u8FD8\u6CA1\u6709\u7FFB\u8BD1\u7684\u8BDD\uFF0C\u5C06\u4F1A\u5207\u6362\u6A21\u5F0F\u5E76\u7FFB\u8BD1",download_started:"\u4E0B\u8F7D\u5DF2\u7ECF\u5F00\u59CB\uFF0C\u5982\u679C\u6CA1\u6709\u81EA\u52A8\u4E0B\u8F7D\uFF0C\u8BF7\u624B\u52A8\u70B9\u51FB",here:"\u8FD9\u91CC",detectServiceLoading:"\u6B63\u5728\u68C0\u6D4B\u53EF\u7528\u7684\u7FFB\u8BD1\u670D\u52A1...",toggleToService:"\u5207\u6362\u5230{service}\u5E76\u91CD\u8BD5","error.gemini.429":"\u5F53\u524D Gemini \u670D\u52A1\u5F53\u524D\u627F\u8F7D\u80FD\u529B\u5DF2\u8FBE\u4E0A\u9650\uFF0C\u8BF7\u60A8\u7A0D\u540E\u518D\u8BD5\uFF0C\u6216\u8005\u5207\u6362\u5230\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002",enableSentryReport:"\u5F53\u6269\u5C55\u53D1\u751F\u9519\u8BEF\u65F6\uFF0C\u4F7F\u7528 Sentry \u63D0\u4EA4\u53CD\u9988","error.subscriptionExpired":"\u60A8\u7684\u4F1A\u5458\u53EF\u80FD\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u68C0\u67E5\u60A8\u7684\u4F1A\u5458\u72B6\u6001","error.subscriptionExpiredTitle":"\u4F1A\u5458\u5DF2\u8FC7\u671F","languages.auto":"\u81EA\u52A8\u68C0\u6D4B","error.serveUnavailable":"\u60A8\u5F53\u524D\u6240\u4F7F\u7528\u7684 [{serverName}] \u670D\u52A1\u56E0\u7F51\u7EDC\u8FDE\u63A5\u6216\u670D\u52A1\u63D0\u4F9B\u5546\u7684\u95EE\u9898\u6682\u65F6\u65E0\u6CD5\u8BBF\u95EE\u3002\u5EFA\u8BAE\u60A8\u5C1D\u8BD5\u5237\u65B0\u9875\u9762\u6216\u901A\u8FC7<1>\u8BBE\u7F6E\u66F4\u6362\u5176\u4ED6\u7FFB\u8BD1\u670D\u52A1\u3002\u82E5\u60A8\u662F<2>Pro\u4F1A\u5458\uFF0C\u53EF\u4EE5\u9009\u62E9\u4F7F\u7528\u66F4\u4E3A\u7A33\u5B9A\u7684 DeepL \u6216 OpenAI \u7FFB\u8BD1\u670D\u52A1\uFF08<3>\u70B9\u6B64\u514D\u8D39\u4F53\u9A8C\uFF09\u3002 \u53E6\u5916\uFF0C\u60A8\u4E5F\u53EF\u80FD\u9700\u8981\u68C0\u67E5\u60A8\u7684\u7F51\u7EDC\u6216\u4EE3\u7406\u8BBE\u7F6E\u3002","floatBall.setting":"\u8BBE\u7F6E","floatBall.translateToLanguage":"\u70B9\u51FB\u7FFB\u8BD1\u4E3A{language}",changeToOnlyTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u4EC5\u663E\u793A\u8BD1\u6587",changeToDualTranslationMode:"\u5207\u6362\u9ED8\u8BA4\u8BD1\u6587\u6A21\u5F0F\u4E3A\u53CC\u8BED\u5BF9\u7167",changeToOnlyTempTranslationMode:`\u5F53\u524D\u4E3A\u53CC\u8BED\u5BF9\u7167 \u70B9\u51FB\u5207\u6362\u4E3A\u4EC5\u8BD1\u6587`,changeToDualTempTranslationMode:`\u5F53\u524D\u4E3A\u4EC5\u8BD1\u6587 \u70B9\u51FB\u5207\u6362\u4E3A\u53CC\u8BED\u5BF9\u7167`,"subtitle.transitionMode":"\u89C6\u9891\u5B57\u5E55\u53CC\u8BED/\u4EC5\u8BD1\u6587\u8BBE\u7F6E","subtitle.transitionModeDescription":"\u8BBE\u7F6E\u89C6\u9891\u5B57\u5E55\u4E3A\u53CC\u8BED\u5BF9\u7167\u6216\u4EC5\u8BD1\u6587\u6A21\u5F0F","transitionMode.inherit":"\u548C\u7CFB\u7EDF\u7684\u9ED8\u8BA4\u8BD1\u6587\u663E\u793A\u6A21\u5F0F\u4FDD\u6301\u4E00\u81F4","transitionMode.translation":"\u4EC5\u8BD1\u6587","transitionMode.dual":"\u53CC\u8BED\u5BF9\u7167","options.navbar.translateFile":"\u7FFB\u8BD1\u6587\u6863","options.navbar.installApp":"\u5B89\u88C5\u624B\u673A APP","subtitle.showQuickButtonDescription":"\u5728\u89C6\u9891\u64AD\u653E\u5668\u53F3\u4E0B\u89D2\u63D0\u4F9B\u542F\u7528\u53CC\u8BED\u5B57\u5E55\u7684\u5FEB\u6377\u65B9\u5F0F",translateFileTooltip:`\u7FFB\u8BD1 PDF\u3001ePub\u3001srt\u3001 @@ -5010,16 +5010,16 @@ ass, HTML, TXT files.`,"description.multiplePrompt":`When the number of paragrap {env.imt_sub_trans_field}: Translation - id: 2 {env.imt_sub_source_field}: Source - {env.imt_sub_trans_field}: Translation`,"subtitle.quickButton.black":"Black","subtitle.quickButton.cyan":"Blue","translationServices.claude":"Claude","subtitle.quickButton.backgroundColor":"Background color","subtitle.quickButton.green":"Green","subtitle.quickButton.blue":"Blue","subtitle.quickButton.white":"White","subtitle.quickButton.setting":"Settings","subtitle.quickButton.translationPosition":"Translation location","subtitle.quickButton.backgroundOpacity":"Background Opacity","subtitle.quickButton.sourceFontSize":"Original font size","subtitle.quickButton.sourceTextColor":"Original font color","subtitle.quickButton.yellow":"Yellow","subtitle.quickButton.translationFontSize":"Translation font size","subtitle.quickButton.translationPositionBottom":"Below the original text","subtitle.quickButton.red":"Red","subtitle.quickButton.translationPositionTop":"Above the original text","subtitle.quickButton.translationTextColor":"Translation font color","subtitle.quickButton.magenta":"Magenta",attachSubtitleTranslating:"Translating using {service}...","error.claude.403":"Access to the service is temporarily unavailable, possibly due to regional restrictions related to Claude. You can try changing your IP address, or use other translation services.","browser.brandDescriptionForSafari":"Free Translate Website, Translate PDF & Epub eBook, Translate Video Subtitles in Bilingual","browser.PdfProFile":"AI-Driven PDF Pro Translation","browser.textTranslate":"Text Translation"};var d2=[{code:"zh-CN",messages:u2},{code:"zh-TW",messages:l2},{code:"en",messages:c2}];var m2="immersiveTranslateDeeplGlobalState",xg="immersiveTranslateBingGlobalState",Eg="immersiveTranslateYandexGlobalState",tn={};for(let e of d2)tn[e.code]=e.messages;var fo="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",Ll="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",Ta=be+"GoogleAccessToken",Os=be+"AuthFlow",_l="immersive-translate-config-latest.json",Sg=be+"AuthState",Ml=be+"IframeMessage",Ej=be+"WaitForRateLimit",p2=be+"DocumentMessageAsk",Gt=be+"DocumentMessageTellThirdParty",ho=be+"showError",f2=be+"DocumentMessageThirdPartyTell",h2=be+"DocumentMessageEventUpload",b2=be+"DocumentMessageHandler",Pl=`${be}Share`,Ns=`${be}ToggleMouseHoverTranslateDirectly`,y2=`${be}ReqDraft`,C2=`${be}ResDraft`,QE=`${be}Container`,T2=`${be}SpecifiedContainer`,Gr="buildinConfig",gi="localConfig",Us="openOptionsPage",wg="openAboutPage",v2="translateLocalPdfFile";var js="openEbookViewer",Hs="openEbookBuilder";var bo=`${be}PageTranslatedStatus`,Sj=`${be}PageUrlChanged`,Yr=`${be}ReceiveCommand`,x2=be+"LastUseMouseHoverTime",Fl=be+"LastUseInputTime",gr=be+"LastUseManualTranslatePageTime",wj=`${be}PopupReceiveMessage`,ZE="immersivetranslate.com",XE="config.immersivetranslate.com",Dj=`https://${ZE}/`,va=`https://${XE}/default_config.json`,kj=`${be}Mark`,Fn=`${be}Root`,E2=`${be}Walked`,Aj=`data-${ee}-walked`,S2=`${be}Paragraph`,w2=`data-${ee}-paragraph`,wr=`data-${ee}-translation-element-mark`,D2=`${be}TranslationElementMark`,Lj=`${be}TranslatedMark`,k2=`${be}LoadingId`,Dg=`data-${ee}-loading-id`,A2=`${be}ErrorId`,Bl=`data-${ee}-error-id`,eS=`${be}AtomicBlockMark`,L2=`${be}ExcludeMark`,_j=`data-${ee}-exclude-mark`,tS=`${be}StayOriginalMark`,Mj=`${be}PreWhitespaceMark`,Rl=`${be}InlineMark`,_2=`${be}BlockMark`,Pj=`${be}Left`,Fj=`${be}Right`,Bj=`${be}Width`,Rj=`${be}Height`,Ij=`${be}Top`,Oj=`${be}FontSize`,M2="lastRunTime",Nj=`${be}GlobalStyleMark`,zs=["@","#"],Il=" --- ",P2=` -`,Lt=`${ee}-target-wrapper`,Uj=`${ee}-pdf-target-container`,Ol=`${ee}-target-inner`,jj=`${ee}-source-wrapper`,kg=`${ee}-target-translation-block-wrapper`,Hj=`${ee}-root-translation-theme`,mi=`${be}RootTranslationTheme`,F2=`${ee}-target-translation-vertical-block-wrapper`,zj=`${ee}-target-translation-pdf-block-wrapper`,B2=`${ee}-target-translation-pre-whitespace`,Ag=`${ee}-target-translation-inline-wrapper`,Lg=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],qs={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Bn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],R2={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},I2={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},O2={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Nl=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],N2=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Dr="zh-CN",Ul="https://immersivetranslate.com/docs/communities/",g2=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],jl=["caiyun","cai"],Qn={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: + {env.imt_sub_trans_field}: Translation`,"subtitle.quickButton.black":"Black","subtitle.quickButton.cyan":"Blue","translationServices.claude":"Claude","subtitle.quickButton.backgroundColor":"Background color","subtitle.quickButton.green":"Green","subtitle.quickButton.blue":"Blue","subtitle.quickButton.white":"White","subtitle.quickButton.setting":"Settings","subtitle.quickButton.translationPosition":"Translation location","subtitle.quickButton.backgroundOpacity":"Background Opacity","subtitle.quickButton.sourceFontSize":"Original font size","subtitle.quickButton.sourceTextColor":"Original font color","subtitle.quickButton.yellow":"Yellow","subtitle.quickButton.translationFontSize":"Translation font size","subtitle.quickButton.translationPositionBottom":"Below the original text","subtitle.quickButton.red":"Red","subtitle.quickButton.translationPositionTop":"Above the original text","subtitle.quickButton.translationTextColor":"Translation font color","subtitle.quickButton.magenta":"Magenta",attachSubtitleTranslating:"Translating using {service}...","error.claude.403":"Access to the service is temporarily unavailable, possibly due to regional restrictions related to Claude. You can try changing your IP address, or use other translation services.","browser.brandDescriptionForSafari":"Free Translate Website, Translate PDF & Epub eBook, Translate Video Subtitles in Bilingual","browser.PdfProFile":"AI-Driven PDF Pro Translation","browser.textTranslate":"Text Translation"};var d2=[{code:"zh-CN",messages:u2},{code:"zh-TW",messages:l2},{code:"en",messages:c2}];var m2="immersiveTranslateDeeplGlobalState",vg="immersiveTranslateBingGlobalState",xg="immersiveTranslateYandexGlobalState",nn={};for(let e of d2)nn[e.code]=e.messages;var fo="Immersive Translate",ee="immersive-translate";var be="immersiveTranslate",Ll="759003177173-mfm15s5nd77vfmo6e7lanof1emnanf0e.apps.googleusercontent.com",Ta=be+"GoogleAccessToken",Ns=be+"AuthFlow",_l="immersive-translate-config-latest.json",Eg=be+"AuthState",Ml=be+"IframeMessage",Ej=be+"WaitForRateLimit",p2=be+"DocumentMessageAsk",Gt=be+"DocumentMessageTellThirdParty",ho=be+"showError",f2=be+"DocumentMessageThirdPartyTell",h2=be+"DocumentMessageEventUpload",b2=be+"DocumentMessageHandler",Pl=`${be}Share`,Us=`${be}ToggleMouseHoverTranslateDirectly`,y2=`${be}ReqDraft`,C2=`${be}ResDraft`,QE=`${be}Container`,T2=`${be}SpecifiedContainer`,Gr="buildinConfig",gi="localConfig",js="openOptionsPage",Sg="openAboutPage",v2="translateLocalPdfFile";var Hs="openEbookViewer",zs="openEbookBuilder";var bo=`${be}PageTranslatedStatus`,Sj=`${be}PageUrlChanged`,Yr=`${be}ReceiveCommand`,x2=be+"LastUseMouseHoverTime",Fl=be+"LastUseInputTime",gr=be+"LastUseManualTranslatePageTime",wj=`${be}PopupReceiveMessage`,ZE="immersivetranslate.com",XE="config.immersivetranslate.com",Dj=`https://${ZE}/`,va=`https://${XE}/default_config.json`,kj=`${be}Mark`,Fn=`${be}Root`,E2=`${be}Walked`,Aj=`data-${ee}-walked`,S2=`${be}Paragraph`,w2=`data-${ee}-paragraph`,wr=`data-${ee}-translation-element-mark`,D2=`${be}TranslationElementMark`,Lj=`${be}TranslatedMark`,k2=`${be}LoadingId`,wg=`data-${ee}-loading-id`,A2=`${be}ErrorId`,Bl=`data-${ee}-error-id`,eS=`${be}AtomicBlockMark`,L2=`${be}ExcludeMark`,_j=`data-${ee}-exclude-mark`,tS=`${be}StayOriginalMark`,Mj=`${be}PreWhitespaceMark`,Rl=`${be}InlineMark`,_2=`${be}BlockMark`,Pj=`${be}Left`,Fj=`${be}Right`,Bj=`${be}Width`,Rj=`${be}Height`,Ij=`${be}Top`,Oj=`${be}FontSize`,M2="lastRunTime",Nj=`${be}GlobalStyleMark`,qs=["@","#"],Il=" --- ",P2=` +`,Lt=`${ee}-target-wrapper`,Uj=`${ee}-pdf-target-container`,Ol=`${ee}-target-inner`,jj=`${ee}-source-wrapper`,Dg=`${ee}-target-translation-block-wrapper`,Hj=`${ee}-root-translation-theme`,mi=`${be}RootTranslationTheme`,F2=`${ee}-target-translation-vertical-block-wrapper`,zj=`${ee}-target-translation-pdf-block-wrapper`,B2=`${ee}-target-translation-pre-whitespace`,kg=`${ee}-target-translation-inline-wrapper`,Ag=["none","dashed","underline","dashedBorder","solidBorder","mask","opacity","dotted","dividingLine","highlight","marker","marker2","blockquote","weakening","grey","paper","italic","bold","thinDashed","wavy","nativeDotted","nativeDashed","nativeUnderline"],Ws={underline:[{name:"borderColor",required:!1,type:"color"}],nativeUnderline:[{name:"borderColor",required:!1,type:"color"}],nativeDashed:[{name:"borderColor",required:!1,type:"color"}],nativeDotted:[{name:"borderColor",required:!1,type:"color"}],dotted:[{name:"borderColor",required:!1,type:"color"}],dividingLine:[{name:"borderColor",required:!1,type:"color"}],highlight:[{name:"backgroundColor",required:!1,type:"color"}],marker:[{name:"backgroundColor",required:!1,type:"color"}],dashed:[{name:"borderColor",required:!1,type:"color"}],blockquote:[{name:"borderColor",required:!1,type:"color"}],thinDashed:[{name:"borderColor",required:!1,type:"color"}],dashedBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],solidBorder:[{name:"borderRadius",required:!1,type:"number",default:"0"},{name:"borderColor",required:!1,type:"color"}],marker2:[{name:"backgroundColor",required:!1,type:"color"}],wavy:[{name:"borderColor",required:!1,type:"color"}],opacity:[{name:"opacity",required:!1,type:"number",default:10}]},Bn=["auto","zh-CN","zh-TW","en","ja","ko","es","de","fr","pt","pt-br","ru","ar","it","ms","id","vi","af","th","ur","yue","zh-CN-NE","bo","wyw","am","az","be","bg","bn","bs","ca","ceb","co","cs","cy","da","el","eo","et","eu","fa","fi","fil","fj","fy","ga","gd","gl","gu","ha","haw","he","hi","hmn","hr","ht","hu","hy","ig","is","jw","ka","kk","km","kn","ku","ky","la","lb","lo","lt","lv","mg","mi","mk","ml","mn","mr","mt","mww","my","ne","nl","no","ny","otq","pa","pl","ps","ro","sa","sd","si","sk","sl","sm","sn","so","sq","sr","sr-Cyrl","sr-Latn","st","su","sv","sw","ta","te","tg","tlh","tlh-Qaak","to","tr","ty","ug","uk","uz","xh","yi","yo","yua","zu"],R2={af:"Afrikaans",am:"Amharic",ar:"Arabic",auto:"Auto Detect",az:"Azerbaijani",be:"Belarusian",bg:"Bulgarian",tn:"Zana",bn:"Bengali",bs:"Bosnian",bo:"Tibetan",ca:"Catalan",ceb:"Cebuano",co:"Corsican",cs:"Czech",cy:"Welsh",da:"Danish",de:"German",el:"Greek",en:"English",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",sa:"Sanskrit",fa:"Persian",fi:"Finnish",fil:"Filipino",fj:"Fijian",fr:"French",fy:"Frisian",ga:"Irish",gd:"Scottish Gaelic",gl:"Galician",gu:"Gujarati",ha:"Hausa",haw:"Hawaiian",he:"Hebrew",hi:"Hindi",hmn:"Hmong",hr:"Croatian",ht:"Haitian Creole",hu:"Hungarian",hy:"Armenian",id:"Indonesian",ig:"Igbo",is:"Icelandic",it:"Italian",ja:"Japanese",jw:"Javanese",ka:"Georgian",kk:"Kazakh",km:"Khmer",kn:"Kannada",ko:"Korean",ku:"Kurdish",ky:"Kyrgyz",la:"Latin",lb:"Luxembourgish",lo:"Lao",lt:"Lithuanian",lv:"Latvian",mg:"Malagasy",mi:"Maori",mk:"Macedonian",ml:"Malayalam",mn:"Mongolian",mr:"Marathi",ms:"Malay",mt:"Maltese",mww:"Hmong Daw",my:"Burmese",ne:"Nepali",nl:"Dutch",no:"Norwegian",ny:"Chichewa",otq:"Quer\xE9taro Otomi",pa:"Punjabi",pl:"Polish",ps:"Pashto",pt:"Portuguese","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",sm:"Samoan",sn:"Shona",so:"Somali",sq:"Albanian",sr:"Serbian","sr-Cyrl":"Serbian (Cyrillic)","sr-Latn":"Serbian (Latin)",st:"Sesotho",su:"Sundanese",sv:"Swedish",sw:"Swahili",ta:"Tamil",te:"Telugu",tg:"Tajik",th:"Thai",tlh:"Klingon","tlh-Qaak":"Klingon (piqaD)",to:"Tongan",tr:"Turkish",ty:"Tahitian",ug:"Uyghur",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",wyw:"Classical Chinese",xh:"Xhosa",placeholder:"Please Select",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",yue:"Cantonese (Traditional)","zh-CN":"Simplified Chinese","zh-TW":"Traditional Chinese","zh-CN-NE":"Northeastern Chinese",zu:"Zulu","":"All Languages"},I2={placeholder:"\u8BF7\u9009\u62E9",af:"\u5357\u975E\u8377\u5170\u8BED",am:"\u963F\u59C6\u54C8\u62C9\u8BED",ar:"\u963F\u62C9\u4F2F\u8BED",auto:"\u81EA\u52A8\u68C0\u6D4B",az:"\u963F\u585E\u62DC\u7586\u8BED",be:"\u767D\u4FC4\u7F57\u65AF\u8BED",bg:"\u4FDD\u52A0\u5229\u4E9A\u8BED",tn:"\u8D5E\u7EB3\u8BED",bn:"\u5B5F\u52A0\u62C9\u8BED",bs:"\u6CE2\u65AF\u5C3C\u4E9A\u8BED",bo:"\u85CF\u8BED",ca:"\u52A0\u6CF0\u7F57\u5C3C\u4E9A\u8BED",ceb:"\u5BBF\u52A1\u8BED",co:"\u79D1\u897F\u5609\u8BED",cs:"\u6377\u514B\u8BED",cy:"\u5A01\u5C14\u58EB\u8BED",da:"\u4E39\u9EA6\u8BED",de:"\u5FB7\u8BED",el:"\u5E0C\u814A\u8BED",en:"\u82F1\u8BED",eo:"\u4E16\u754C\u8BED",es:"\u897F\u73ED\u7259\u8BED",et:"\u7231\u6C99\u5C3C\u4E9A\u8BED",eu:"\u5DF4\u65AF\u514B\u8BED",sa:"\u68B5\u8BED",fa:"\u6CE2\u65AF\u8BED",fi:"\u82AC\u5170\u8BED",fil:"\u83F2\u5F8B\u5BBE\u8BED",fj:"\u6590\u6D4E\u8BED",fr:"\u6CD5\u8BED",fy:"\u5F17\u91CC\u65AF\u5170\u8BED",ga:"\u7231\u5C14\u5170\u8BED",gd:"\u82CF\u683C\u5170\u76D6\u5C14\u8BED",gl:"\u52A0\u5229\u897F\u4E9A\u8BED",gu:"\u53E4\u5409\u62C9\u7279\u8BED",ha:"\u8C6A\u8428\u8BED",haw:"\u590F\u5A01\u5937\u8BED",he:"\u5E0C\u4F2F\u6765\u8BED",hi:"\u5370\u5730\u8BED",hmn:"\u82D7\u8BED",hr:"\u514B\u7F57\u5730\u4E9A\u8BED",ht:"\u6D77\u5730\u514B\u91CC\u5965\u5C14\u8BED",hu:"\u5308\u7259\u5229\u8BED",hy:"\u4E9A\u7F8E\u5C3C\u4E9A\u8BED",id:"\u5370\u5EA6\u5C3C\u897F\u4E9A\u8BED",ig:"\u4F0A\u535A\u8BED",is:"\u51B0\u5C9B\u8BED",it:"\u610F\u5927\u5229\u8BED",ja:"\u65E5\u672C\u8BED",jw:"\u722A\u54C7\u8BED",ka:"\u683C\u9C81\u5409\u4E9A\u8BED",kk:"\u54C8\u8428\u514B\u8BED",km:"\u9AD8\u68C9\u8BED",kn:"\u5361\u7EB3\u8FBE\u8BED",ko:"\u97E9\u8BED",ku:"\u5E93\u5C14\u5FB7\u8BED",ky:"\u5409\u5C14\u5409\u65AF\u8BED",la:"\u62C9\u4E01\u8BED",lb:"\u5362\u68EE\u5821\u8BED",lo:"\u8001\u631D\u8BED",lt:"\u7ACB\u9676\u5B9B\u8BED",lv:"\u62C9\u8131\u7EF4\u4E9A\u8BED",mg:"\u9A6C\u62C9\u52A0\u65AF\u8BED",mi:"\u6BDB\u5229\u8BED",mk:"\u9A6C\u5176\u987F\u8BED",ml:"\u9A6C\u62C9\u96C5\u62C9\u59C6\u8BED",mn:"\u8499\u53E4\u8BED",mr:"\u9A6C\u62C9\u5730\u8BED",ms:"\u9A6C\u6765\u8BED",mt:"\u9A6C\u8033\u4ED6\u8BED",mww:"\u767D\u82D7\u8BED",my:"\u7F05\u7538\u8BED",ne:"\u5C3C\u6CCA\u5C14\u8BED",nl:"\u8377\u5170\u8BED",no:"\u632A\u5A01\u8BED",ny:"\u9F50\u5207\u74E6\u8BED\uFF08\u5C3C\u626C\u8D3E\u8BED\uFF09",otq:"\u514B\u96F7\u5854\u7F57\u5965\u6258\u7C73\u8BED",pa:"\u65C1\u906E\u666E\u8BED",pl:"\u6CE2\u5170\u8BED",ps:"\u666E\u4EC0\u56FE\u8BED",pt:"\u8461\u8404\u7259\u8BED","pt-br":"\u8461\u8404\u7259\u8BED\uFF08\u5DF4\u897F\uFF09",ro:"\u7F57\u9A6C\u5C3C\u4E9A\u8BED",ru:"\u4FC4\u8BED",sd:"\u4FE1\u5FB7\u8BED",si:"\u50E7\u4F3D\u7F57\u8BED",sk:"\u65AF\u6D1B\u4F10\u514B\u8BED",sl:"\u65AF\u6D1B\u6587\u5C3C\u4E9A\u8BED",sm:"\u8428\u6469\u4E9A\u8BED",sn:"\u4FEE\u7EB3\u8BED",so:"\u7D22\u9A6C\u91CC\u8BED",sq:"\u963F\u5C14\u5DF4\u5C3C\u4E9A\u8BED",sr:"\u585E\u5C14\u7EF4\u4E9A\u8BED","sr-Cyrl":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u897F\u91CC\u5C14\u6587\uFF09","sr-Latn":"\u585E\u5C14\u7EF4\u4E9A\u8BED\uFF08\u62C9\u4E01\u6587\uFF09",st:"\u585E\u7D22\u6258\u8BED",su:"\u5DFD\u4ED6\u8BED",sv:"\u745E\u5178\u8BED",sw:"\u65AF\u74E6\u5E0C\u91CC\u8BED",ta:"\u6CF0\u7C73\u5C14\u8BED",te:"\u6CF0\u5362\u56FA\u8BED",tg:"\u5854\u5409\u514B\u8BED",th:"\u6CF0\u8BED",tlh:"\u514B\u6797\u8D21\u8BED","tlh-Qaak":"\u514B\u6797\u8D21\u8BED\uFF08piqaD\uFF09",to:"\u6C64\u52A0\u8BED",tr:"\u571F\u8033\u5176\u8BED",ty:"\u5854\u5E0C\u63D0\u8BED",ug:"\u7EF4\u543E\u5C14\u8BED",uk:"\u4E4C\u514B\u5170\u8BED",ur:"\u4E4C\u5C14\u90FD\u8BED",uz:"\u4E4C\u5179\u522B\u514B\u8BED",vi:"\u8D8A\u5357\u8BED",wyw:"\u6587\u8A00\u6587",xh:"\u73ED\u56FE\u8BED",yi:"\u610F\u7B2C\u7EEA\u8BED",yo:"\u7EA6\u9C81\u5DF4\u8BED",yua:"\u5C24\u5361\u5766\u739B\u96C5\u8BED",yue:"\u7CA4\u8BED","zh-CN":"\u7B80\u4F53\u4E2D\u6587","zh-TW":"\u7E41\u4F53\u4E2D\u6587","zh-CN-NE":"\u4E1C\u5317\u8BDD",zu:"\u7956\u9C81\u8BED","":"\u6240\u6709\u8BED\u8A00"},O2={placeholder:"\u8ACB\u9078\u64C7",af:"\u963F\u975E\u5229\u5361\u8A9E",am:"\u963F\u59C6\u54C8\u62C9\u8A9E",ar:"\u963F\u62C9\u4F2F\u8A9E",auto:"\u81EA\u52D5\u6AA2\u6E2C",az:"\u963F\u585E\u62DC\u7586\u8A9E",be:"\u767D\u4FC4\u7F85\u65AF\u8A9E",bg:"\u4FDD\u52A0\u5229\u4E9E\u8A9E",tn:"\u8D0A\u7D0D\u8A9E",bn:"\u5B5F\u52A0\u62C9\u8A9E",bs:"\u6CE2\u65AF\u5C3C\u4E9E\u8A9E",bo:"\u85CF\u8A9E",ca:"\u52A0\u6CF0\u862D\u8A9E",ceb:"\u5BBF\u9727\u8A9E",co:"\u79D1\u897F\u5609\u8A9E",cs:"\u6377\u514B\u8A9E",cy:"\u5A01\u723E\u65AF\u8A9E",da:"\u4E39\u9EA5\u8A9E",de:"\u5FB7\u8A9E",el:"\u5E0C\u81D8\u8A9E",en:"\u82F1\u8A9E",eo:"\u4E16\u754C\u8A9E",es:"\u897F\u73ED\u7259\u8A9E",et:"\u611B\u6C99\u5C3C\u4E9E\u8A9E",eu:"\u5DF4\u65AF\u514B\u8A9E",sa:"\u68B5\u8A9E",fa:"\u6CE2\u65AF\u8A9E",fi:"\u82AC\u862D\u8A9E",fil:"\u83F2\u5F8B\u8CD3\u8A9E",fj:"\u6590\u6FDF\u8A9E",fr:"\u6CD5\u8A9E",fy:"\u5F17\u91CC\u897F\u8A9E",ga:"\u611B\u723E\u862D\u8A9E",gd:"\u8607\u683C\u862D\u84CB\u723E\u8A9E",gl:"\u52A0\u5229\u897F\u4E9E\u8A9E",gu:"\u53E4\u5409\u62C9\u7279\u8A9E",ha:"\u8C6A\u6492\u8A9E",haw:"\u590F\u5A01\u5937\u8A9E",he:"\u5E0C\u4F2F\u4F86\u8A9E",hi:"\u5370\u5730\u8A9E",hmn:"\u82D7\u8A9E",hr:"\u514B\u7F85\u5730\u4E9E\u8A9E",ht:"\u6D77\u5730\u514B\u91CC\u5967\u723E\u8A9E",hu:"\u5308\u7259\u5229\u8A9E",hy:"\u4E9E\u7F8E\u5C3C\u4E9E\u8A9E",id:"\u5370\u5C3C\u8A9E",ig:"\u4F0A\u535A\u8A9E",is:"\u51B0\u5CF6\u8A9E",it:"\u610F\u5927\u5229\u8A9E",ja:"\u65E5\u8A9E",jw:"\u722A\u54C7\u8A9E",ka:"\u55AC\u6CBB\u4E9E\u8A9E",kk:"\u54C8\u85A9\u514B\u8A9E",km:"\u9AD8\u68C9\u8A9E",kn:"\u574E\u7D0D\u9054\u8A9E",ko:"\u97D3\u8A9E",ku:"\u5EAB\u723E\u5FB7\u8A9E",ky:"\u5409\u723E\u5409\u65AF\u8A9E",la:"\u62C9\u4E01\u8A9E",lb:"\u76E7\u68EE\u5821\u8A9E",lo:"\u8001\u64BE\u8A9E",lt:"\u7ACB\u9676\u5B9B\u8A9E",lv:"\u62C9\u812B\u7DAD\u4E9E\u8A9E",mg:"\u99AC\u62C9\u52A0\u65AF\u8A9E",mi:"\u6BDB\u5229\u8A9E",mk:"\u99AC\u5176\u9813\u8A9E",ml:"\u99AC\u62C9\u96C5\u62C9\u59C6\u8A9E",mn:"\u8499\u53E4\u8A9E",mr:"\u99AC\u62C9\u5730\u8A9E",ms:"\u99AC\u4F86\u8A9E",mt:"\u99AC\u723E\u4ED6\u8A9E",mww:"\u767D\u82D7\u8A9E",my:"\u7DEC\u7538\u8A9E",ne:"\u5C3C\u6CCA\u723E\u8A9E",nl:"\u8377\u862D\u8A9E",no:"\u632A\u5A01\u8A9E",ny:"\u9F4A\u5207\u74E6\u8A9E",otq:"\u594E\u96F7\u5854\u7F85\u5967\u6258\u7C73\u8A9E",pa:"\u65C1\u906E\u666E\u8A9E",pl:"\u6CE2\u862D\u8A9E",ps:"\u666E\u4EC0\u5716\u8A9E",pt:"\u8461\u8404\u7259\u8A9E","pt-br":"\u8461\u8404\u7259\u8A9E\uFF08\u5DF4\u897F\uFF09",ro:"\u7F85\u99AC\u5C3C\u4E9E\u8A9E",ru:"\u4FC4\u8A9E",sd:"\u4FE1\u5FB7\u8A9E",si:"\u50E7\u4F3D\u7F85\u8A9E",sk:"\u65AF\u6D1B\u4F10\u514B\u8A9E",sl:"\u65AF\u6D1B\u7DAD\u5C3C\u4E9E\u8A9E",sm:"\u85A9\u6469\u4E9E\u8A9E",sn:"\u7D39\u7D0D\u8A9E",so:"\u7D22\u99AC\u91CC\u8A9E",sq:"\u963F\u723E\u5DF4\u5C3C\u4E9E\u8A9E",sr:"\u585E\u723E\u7DAD\u4E9E\u8A9E","sr-Cyrl":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u897F\u91CC\u723E\u6587)","sr-Latn":"\u585E\u723E\u7DAD\u4E9E\u8A9E (\u62C9\u4E01\u6587)",st:"\u585E\u7D22\u6258\u8A9E",su:"\u5DFD\u4ED6\u8A9E",sv:"\u745E\u5178\u8A9E",sw:"\u65AF\u74E6\u5E0C\u91CC\u8A9E",ta:"\u6CF0\u7C73\u723E\u8A9E",te:"\u6CF0\u76E7\u56FA\u8A9E",tg:"\u5854\u5409\u514B\u8A9E",th:"\u6CF0\u8A9E",tlh:"\u514B\u6797\u8CA2\u8A9E","tlh-Qaak":"\u514B\u6797\u8CA2\u8A9E (piqaD)",to:"\u6771\u52A0\u8A9E",tr:"\u571F\u8033\u5176\u8A9E",ty:"\u5854\u5E0C\u63D0\u8A9E",ug:"\u7DAD\u543E\u723E\u8A9E",uk:"\u70CF\u514B\u862D\u8A9E",ur:"\u70CF\u723E\u90FD\u8A9E",uz:"\u70CF\u8332\u5225\u514B\u8A9E",vi:"\u8D8A\u5357\u8A9E",wyw:"\u6587\u8A00\u6587",xh:"\u79D1\u85A9\u8A9E",yi:"\u610F\u7B2C\u7DD2\u8A9E",yo:"\u7D04\u9B6F\u5DF4\u8A9E",yua:"\u5C24\u52A0\u6566\u99AC\u96C5\u8A9E",yue:"\u5EE3\u6771\u8A71 (\u50B3\u7D71)","zh-CN":"\u7C21\u9AD4\u4E2D\u6587","zh-TW":"\u7E41\u9AD4\u4E2D\u6587","zh-CN-NE":"\u6771\u5317\u8A71",zu:"\u7956\u9B6F\u8A9E","":"\u6240\u6709\u8A9E\u8A00"};var Nl=[{name:"touch",shortcuts:[{command:"touchShortcutsToggleTranslatePage",type:"finger"},{command:"touchShortcutsToggleTranslationMask",type:"finger"},{command:"touchShortcutsToggleTranslatePageOnlyTranslation",type:"finger"},{command:"touchShortcutsToggleTranslateTouchElement",type:"finger"}]},{name:"main",shortcuts:["toggleTranslatePage","shareToDraft","translateInputBox"]},{name:"mouse",shortcuts:[{command:"mouseHoverHoldKey",type:"mouseHoverHoldKey"},"toggleMouseHoverTranslateDirectly"]},{name:"others",shortcuts:["toggleTranslationMask","toggleTranslateToThePageEndImmediately","toggleTranslateTheMainPage","toggleOnlyTransation","toggleTranslateTheWholePage","toggleVideoSubtitlePreTranslation"]},{name:"shortcutsForTranslationServices",shortcuts:["translateWithDeepL","translateWithGoogle","translateWithOpenAI","translateWithBing","translateWithTransmart","translateWithGemini"]}],N2=["https://immersive-translate.owenyoung.com/options/","https://immersive-translate.owenyoung.com/auth-done/","https://dash.immersivetranslate.com/","https://dash.immersivetranslate.com/auth-done/","http://localhost:8000/dist/userscript/options/","http://localhost:8000/auth-done/","http://192.168.50.9:8000/dist/userscript/options/","http://192.168.31.51:8000/dist/userscript/options/","http://192.168.1.72:8000/dist/userscript/options/","https://www.deepl.com/translator","translate.google.com","http://localhost:8000/options/","http://192.168.50.9:8000/options/","http://192.168.31.51:8000/options/","http://192.168.1.72:8000/options/"],Dr="zh-CN",Ul="https://immersivetranslate.com/docs/communities/",g2=[{type:"select",name:"codename",labelKey:"field.translationEngine",default:"youdao",required:!1,options:[{label:"translationServices.google",value:"google"},{label:"translationServices.deepl",value:"deepl"},{label:"translationServices.youdao",value:"youdao"},{label:"translationServices.tencent",value:"tencent"},{label:"translationServices.aliyun",value:"aliyun"},{label:"translationServices.baidu",value:"baidu"},{label:"translationServices.caiyun",value:"caiyun"},{label:"translationServices.wechat",value:"wechat"},{label:"translationServices.ibm",value:"ibm"},{label:"translationServices.azure",value:"azure"},{label:"translationServices.aws",value:"aws"}]}],jl=["caiyun","cai"],Qn={bing:{name:"\u5FAE\u8F6F\u7FFB\u8BD1",homepage:"https://www.bing.com/translator"},google:{name:"Google",homepage:"https://translate.google.com/"},deepl:{name:"DeepL",homepage:"https://www.deepl.com/translator",docUrl:"https://immersivetranslate.com/docs/services/deepL/",providers:[{name:"pro",nameKey:"deepLProName",descriptionKey:"deepLProDescription",descriptionKeyForNormal:"deeplProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"deepLCustomName",descriptionKey:"deepLCustomDescription",descriptionLink1:"https://www.deepl.com/translator",descriptionLink2:"https://immersivetranslate.com/docs/services/deepL/"}],allProps:[{name:"authKey",providers:["custom"],label:"Auth Key",required:!0,type:"password"}]},openai:{name:"Open AI",homepage:"https://openai.com/api/",docUrl:"https://immersivetranslate.com/docs/services/openai/",providers:[{name:"pro",nameKey:"openaiProName",descriptionKey:"openaiProDescription",descriptionKeyForNormal:"openaiProDescriptionForNormal",descriptionLink1:"https://immersivetranslate.com/pricing"},{name:"custom",nameKey:"openaiCustomName",descriptionKey:"openaiCustomDescription",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/"}],allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",required:!1,type:"model-select",default:"gpt-3.5-turbo-1106",providers:["custom"],options:[{providers:["custom","pro"],label:"gpt-3.5-turbo",value:"gpt-3.5-turbo"},{providers:["custom"],label:"gpt-3.5-turbo-0125",value:"gpt-3.5-turbo-0125"},{providers:["custom","pro"],label:"gpt-3.5-turbo-1106",value:"gpt-3.5-turbo-1106"},{providers:["custom","pro"],label:"gpt-3.5-turbo-0613",value:"gpt-3.5-turbo-0613"},{providers:["custom"],label:"gpt-4-1106-preview",value:"gpt-4-1106-preview"},{providers:["custom"],label:"gpt-4-0125-preview",value:"gpt-4-0125-preview"},{providers:["custom"],label:"gpt-4",value:"gpt-4"}]},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.limitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:10,providers:["custom"]},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.openai.com/v1/chat/completions",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",optional:!0,providers:["custom"]},{name:"systemPrompt",label:"System Prompt",required:!1,descriptionKey:"description.systemPrompt",type:"textarea",optional:!0,default:"You are a translation engine, you can only translate text and cannot interpret it, and do not explain."},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:`Translate the text to {{to}}, please do not explain any sentences, just translate or leave them as they are.: -{{text}}`,optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},yandex:{name:"Yandex",homepage:"https://translate.yandex.com/"},gemini:{name:"Gemini",homepage:"https://makersuite.google.com/",docUrl:"https://immersivetranslate.com/docs/services/gemini/",beta:!0,allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",options:[{label:"gemini-1.0-pro-latest",value:"gemini-1.0-pro-latest"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:3,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/gemini/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},claude:{name:"Claude",homepage:"https://www.anthropic.com/",docUrl:"https://immersivetranslate.com/docs/services/claude/",allProps:[{name:"APIKEY",providers:["custom"],required:!0,type:"password"},{name:"model",labelKey:"field.model",descriptionKey:"description.model",optional:!0,required:!1,type:"model-select",default:"claude-3-haiku-20240307",options:[{label:"claude-3-haiku-20240307",value:"claude-3-haiku-20240307"},{label:"claude-3-sonnet-20240229",value:"claude-3-sonnet-20240229"},{label:"claude-3-opus-20240229",value:"claude-3-opus-20240229"},{label:"claude-2.1",value:"claude-2.1"}]},{name:"limit",required:!1,optional:!0,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",descriptionLink1:"https://immersivetranslate.com/docs/services/openai/",type:"number",default:1},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:10,optional:!0},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.anthropic.com/v1/messages",descriptionKey:"description.apiUrl",descriptionLink1:"https://immersivetranslate.com/docs/services/claude/",optional:!0},{name:"prompt",label:"Prompt",required:!1,descriptionKey:"description.prompt",type:"textarea",default:"",optional:!0},{name:"multiplePrompt",label:"Multiple Prompt",required:!1,descriptionKey:"description.multiplePrompt",type:"textarea",default:"",optional:!0},{name:"subtitlePrompt",label:"Subtitle Prompt",required:!1,descriptionKey:"description.subtitlePrompt",type:"textarea",default:"",optional:!0}]},transmart:{name:"Transmart",homepage:"https://transmart.qq.com/"},youdao:{name:"Youdao",homepage:"https://youdao.com/",docUrl:"https://immersivetranslate.com/docs/services/youdao/",allProps:[{name:"appId",required:!0,type:"text"},{name:"appSecret",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:200,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.domain",descriptionLink1:"https://fanyi.youdao.com/openapi/",type:"text",default:"general",optional:!0},{name:"vocabId",required:!1,labelKey:"field.vocabId",descriptionKey:"description.vocabId",type:"text",default:"",optional:!0}]},tencent:{name:"Tencent",homepage:"https://fanyi.qq.com/",docUrl:"https://immersivetranslate.com/docs/services/tencent/",allProps:[{name:"secretId",required:!0,type:"text"},{name:"secretKey",required:!0,type:"password"}]},aliyun:{name:"Aliyun",homepage:"https://translate.alibaba.com/",docUrl:"https://immersivetranslate.com/docs/services/aliyun/",allProps:[{name:"AccessKeyID",required:!0,type:"text"},{name:"AccessKeySecret",required:!0,type:"password"},{name:"scene",labelKey:"field.scene",descriptionKey:"description.scene",descriptionLink1:"https://help.aliyun.com/document_detail/158267.html",required:!1,optional:!0,type:"text",default:"general"}]},azure:{name:"azure",homepage:"https://learn.microsoft.com/en-us/azure/cognitive-services/translator/text-translation-overview",docUrl:"https://immersivetranslate.com/docs/services/azure/",allProps:[{name:"region",required:!1,default:"eastasia",type:"text"},{name:"APIKEY",required:!0,type:"password"},{name:"apiUrl",labelKey:"field.apiUrl",required:!1,type:"text",default:"https://api.cognitive.microsofttranslator.com/",descriptionKey:"description.azureApiUrl",optional:!0}]},papago:{name:"Papago",homepage:"https://translate.google.com/",canary:!0},baidu:{name:"Baidu",homepage:"https://fanyi.baidu.com/",docUrl:"https://immersivetranslate.com/docs/services/baidu/",allProps:[{name:"appid",required:!0,type:"text"},{name:"key",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:1,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0},{name:"action",required:!1,labelKey:"field.action",descriptionKey:"description.action",descriptionLink1:"https://fanyi-api.baidu.com/doc/21",type:"boolean",default:!1,optional:!0},{name:"domain",required:!1,labelKey:"field.domain",descriptionKey:"description.baiduField",descriptionLink1:"https://fanyi-api.baidu.com/doc/22",type:"text",default:"",optional:!0}]},volc:{name:"Volc",homepage:"https://www.volcengine.com/",docUrl:"https://immersivetranslate.com/docs/services/volcano/",allProps:[{name:"accessKeyId",required:!0,type:"text"},{name:"secretAccessKey",required:!0,type:"password"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1800,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:8,optional:!0}]},caiyun:{name:"Caiyun",homepage:"https://fanyi.caiyunapp.com/",docUrl:"https://immersivetranslate.com/docs/services/caiyun/",allProps:[{name:"token",required:!0,type:"password"}]},cai:{name:"Cai",homepage:"https://fanyi.caiyunapp.com/",alpha:!0},custom:{name:"Custom",beta:!0,homepage:"https://immersivetranslate.com/docs/services/custom/",titleKey:"description.custom",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"langs",required:!1,labelKey:"field.langs",type:"textarea",default:"zh-CN,en",optional:!0},{name:"placeholderDelimiters",required:!1,labelKey:"field.placeholderDelimiters",type:"text",default:zs,optional:!0},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},mock:{name:"Mock",homepage:"https://www.google.com"},mock2:{name:"Mock2",homepage:"https://www.google.com"},tenAlpha:{name:"TenAlpha",homepage:"https://fanyi.qq.com/",alpha:!0},you:{name:"You",alpha:!0,homepage:"https://youdao.com/"},openl:{name:"Openl",homepage:"https://openl.club/",docUrl:"https://immersivetranslate.com/docs/services/openL/",allProps:[...g2,{type:"password",name:"apikey",required:!0}],props:g2},volcAlpha:{name:"Volc Alpha",alpha:!0,homepage:"https://www.volcengine.com/"},d:{name:"D () ",canary:!0,homepage:"https://www.deepl.com/translator"},dpro:{name:"DPro (Canary) ",canary:!0,homepage:"https://www.deepl.com/translator"},deeplx:{name:"DeepLX (Beta)",beta:!0,homepage:"https://www.deepl.com/translator",allProps:[{name:"url",label:"API URL",required:!0,type:"text"},{name:"limit",required:!1,labelKey:"field.limitPerSecond",descriptionKey:"description.generalLimitPerSecond",type:"number",default:5,optional:!0},{name:"maxTextLengthPerRequest",required:!1,labelKey:"field.maxTextLengthPerRequest",descriptionKey:"description.maxTextLengthPerRequest",type:"number",default:1200,optional:!0},{name:"maxTextGroupLengthPerRequest",required:!1,labelKey:"field.maxTextGroupLengthPerRequest",descriptionKey:"description.maxTextGroupLengthPerRequest",type:"number",default:1,optional:!0}]},niu:{name:"niutrans",homepage:"https://niutrans.com/",docUrl:"https://immersivetranslate.com/docs/services/niu",allProps:[{name:"APIKEY",required:!0,type:"password"}]}},Hl={type:be+"ChildFrameToRootFrameIdentifier"},_g=["youtube","netflix","webvtt","khanacademy","bilibili","udemy","hulu","text_track","text_track_dynamic","general","live","ebutt","disneyplus","fmp4.xml","multi_attach_vtt","twitter","subsrt","xml","av"],Jr=["Ctrl","Shift","Alt","Auto","Off","OtherCustom","Other"],U2=["ctrl","alt","shift","cmd","command","option","control"],zl=[{key:"/"},{key:"="},{key:";"},{key:","},{key:"."},{key:":"},{key:"space",labelKey:"spaceKey",skipForStarting:!0},{key:"none",labelKey:"noneKey",skipForTrailing:!0}],qj=gn()?"https://dash.immersivetranslate.com/#general":"http://localhost:8000/dist/userscript/options/#general",Ws="user_from_plugin",Tt="user_info",yo=gn()||Jn()?"https://api2.immersivetranslate.com":"https://test-api2.immersivetranslate.com",ql=gn()||Jn()?"https://immersivetranslate.com/accounts/login?from=plugin":"https://test.immersivetranslate.com/accounts/login?from=plugin",j2=ql+"&utm_source=extension&utm_medium=extension&utm_campaign=error_modal",H2=ql+"&utm_source=extension&utm_medium=extension&utm_campaign=popup_more",Co=gn()||Jn()?"https://immersivetranslate.com/profile":"https://test.immersivetranslate.com/profile",xa=gn()||Jn()?"https://immersivetranslate.com/pricing":"https://test.immersivetranslate.com/pricing",nS=gn()||Jn()?"https://immersivetranslate.com/download/":"https://test.immersivetranslate.com/download/",rS=gn()||Jn()?"https://immersivetranslate.com/topup?type=open_ai&":"https://test.immersivetranslate.com/topup?type=open_ai&",aS=gn()||Jn()?"https://immersivetranslate.com/topup?type=deepl&":"https://test.immersivetranslate.com/topup?type=deepl&",Wj=xa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_more",z2=nS+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",q2=xa+"?utm_source=extension&utm_medium=extension&utm_campaign=popup_footer",Wl=xa+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal",W2=rS+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",$2=aS+"utm_source=extension&utm_medium=extension&utm_campaign=error_modal",V2=Co+"?utm_source=extension&utm_medium=extension&utm_campaign=error_modal&upgradeFromTrial=true",$l="https://immersivetranslate.com/docs/usage/",K2="https://immersivetranslate.com/docs/communities/",G2=Pe().TRANSLATE_FILE_URL,Y2=G2+"?utm_source=extension&utm_medium=extension&utm_campaign=options_nav",J2=G2+"?utm_source=extension&utm_medium=extension&utm_campaign=float_ball";var pi=console,Mg=class{#e=performance.now();reset(){this.#e=performance.now()}stop(t){let n=performance.now(),r=Math.round(n-this.#e),a=Gn.green;r>1e4?a=Gn.red:r>1e3&&(a=Gn.yellow),pi.debug(Gn.dim(fo+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},$s=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&pi.log(Gn.dim(fo+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&pi.log(Gn.green(fo+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&pi.warn(Gn.yellow(fo+" WARN:"),...t)}error(...t){this.#e<=3&&pi.error(Gn.red(fo+" ERROR:"),...t)}fatal(...t){this.#e<=4&&pi.error(Gn.red(fo+" FATAL:"),...t)}timing(){return this.level===0?new Mg:{reset:()=>{},stop:()=>{}}}},I=new $s;m();function at(){try{let e=[Pe().EBOOK_BUILDER_URL,Pe().EBOOK_VIEWER_URL,Pe().SUBTITLE_BUILDER_URL,Pe().HTML_VIEWER_URL,Pe().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];gn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let o=new URL(a);return n.startsWith(o.pathname)&&t.includes(o.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}m();m();var Vl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.4",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};m();m();m();var Pg=/iPhone/i,Q2=/iPod/i,Z2=/iPad/i,X2=/\biOS-universal(?:.+)Mac\b/i,Fg=/\bAndroid(?:.+)Mobile\b/i,e1=/Android/i,fi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Kl=/Silk/i,Qr=/Windows Phone/i,t1=/\bWindows(?:.+)ARM\b/i,n1=/BlackBerry/i,r1=/BB10/i,a1=/Opera Mini/i,o1=/\b(CriOS|Chrome)(?:.+)Mobile/i,i1=/Mobile(?:.+)Firefox\b/i,s1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function iS(e){return t=>t.test(e)}function ot(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=iS(n),o={apple:{phone:a(Pg)&&!a(Qr),ipod:a(Q2),tablet:!a(Pg)&&(a(Z2)||s1(t))&&!a(Qr),universal:a(X2),device:(a(Pg)||a(Q2)||a(Z2)||a(X2)||s1(t))&&!a(Qr)},amazon:{phone:a(fi),tablet:!a(fi)&&a(Kl),device:a(fi)||a(Kl)},android:{phone:!a(Qr)&&a(fi)||!a(Qr)&&a(Fg),tablet:!a(Qr)&&!a(fi)&&!a(Fg)&&(a(Kl)||a(e1)),device:!a(Qr)&&(a(fi)||a(Kl)||a(Fg)||a(e1))||a(/\bokhttp\b/i)},windows:{phone:a(Qr),tablet:a(t1),device:a(Qr)||a(t1)},other:{blackberry:a(n1),blackberry10:a(r1),opera:a(a1),firefox:a(i1),chrome:a(o1),device:a(n1)||a(r1)||a(a1)||a(i1)||a(o1)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var Bg="DENO",Gl="CHROME",Yl="FIREFOX";function u1(e){let t=Gl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Yl:/deno/i.test(n)&&(t=Bg)}catch{}return e===Gl&&t===Gl||e===Yl&&t===Yl||e===Bg&&t===Bg}function l1(){return u1(Gl)}function c1(){return typeof Deno<"u"}function Zr(){return u1(Yl)}function Ea(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function d1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function To(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}m();var g1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},m1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:g1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:g1,query:()=>{},sendMessage:()=>{}}};var Q;c1()?Q=m1:Q=globalThis.immersiveTranslateBrowserAPI;var sS="";function Zn(){return sS||Vl.version}function kr(){return Q.runtime.getManifest().version}m();function p1(e){return e.replace(//g,">")}m();function Yt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function f1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function h1(e){if(e){let t=new Date(e.createTime),n=uS(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function uS(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,o]=n.split("/");return n=`${o}-${r}-${a}`,n}catch{return"unknown"}}m();m();function Te(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Bn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Bn[a]}else return"auto";else return Bn[r]}function kt(){return Te(document?.documentElement?.lang||"en")}function Vs(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+i.text.length>t||o.tempSentences.length>=n)&&(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}),(o.from!==i.from||o.to!==i.to)&&(o.tempSentences.length>0?(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}):(o.from=i.from,o.to=i.to)),o.tempSentences.push(i);return o.tempSentences.length>0&&a.push(o),a}function lS(e,t){let n=[],r=[];for(let a=0;a0?y1e4?a=Gn.red:r>1e3&&(a=Gn.yellow),pi.debug(Gn.dim(fo+" TIMING:"),t,"in",a(r+"ms")),this.#e=n}},Vs=class{#e=1;get level(){return this.#e}setLevel(t){switch(t){case"debug":this.#e=0;break;case"info":this.#e=1;break;case"warn":this.#e=2;break;case"error":this.#e=3;break;case"fatal":this.#e=4;break}}debug(...t){this.#e<=0&&pi.log(Gn.dim(fo+" DEBUG:"),...t)}v(...t){this.#e<=0}info(...t){this.#e<=1&&pi.log(Gn.green(fo+" INFO:"),...t)}l(...t){this.#e<=1}warn(...t){this.#e<=2&&pi.warn(Gn.yellow(fo+" WARN:"),...t)}error(...t){this.#e<=3&&pi.error(Gn.red(fo+" ERROR:"),...t)}fatal(...t){this.#e<=4&&pi.error(Gn.red(fo+" FATAL:"),...t)}timing(){return this.level===0?new _g:{reset:()=>{},stop:()=>{}}}},I=new Vs;m();function ot(){try{let e=[Pe().EBOOK_BUILDER_URL,Pe().EBOOK_VIEWER_URL,Pe().SUBTITLE_BUILDER_URL,Pe().HTML_VIEWER_URL,Pe().PDF_VIEWER_URL].filter(a=>!!a),t=["app.immersivetranslate.com"];gn()||t.push("localhost:38001");let n=globalThis.location.pathname;return e.find(a=>{let o=new URL(a);return n.startsWith(o.pathname)&&t.includes(o.host)})?!1:globalThis.self!==globalThis.top}catch{return!0}}m();m();var Vl={manifest_version:3,name:"__MSG_brandName__",description:"__MSG_brandDescription__",version:"1.4.5",default_locale:"en",background:{service_worker:"background.js"},web_accessible_resources:["styles/inject.css","pdf/index.html","video-subtitle/inject.js"],content_scripts:[{matches:["","file:///*","*://*/*"],js:["content_script.js"],run_at:"document_end",all_frames:!0},{matches:["","file:///*","*://*/*"],js:["content_start.js"],run_at:"document_start",all_frames:!0}],commands:{toggleTranslatePage:{suggested_key:{default:"Alt+A"},description:"__MSG_toggleTranslatePage__"},toggleTranslateTheWholePage:{suggested_key:{default:"Alt+W"},description:"__MSG_toggleTranslateTheWholePage__"},toggleOnlyTransation:{description:"__MSG_toggleOnlyTransation__"},toggleTranslateToThePageEndImmediately:{description:"__MSG_toggleTranslateToThePageEndImmediately__"},toggleTranslateTheMainPage:{description:"__MSG_toggleTranslateTheMainPage__"},toggleTranslationMask:{description:"__MSG_toggleTranslationMask__"},shareToDraft:{description:"__MSG_shareToDraft__"},toggleMouseHoverTranslateDirectly:{description:"__MSG_toggleMouseHoverTranslateDirectly__"},translateWithOpenAI:{description:"__MSG_translateWithOpenAI__"},translateWithDeepL:{description:"__MSG_translateWithDeepL__"},translateWithGoogle:{description:"__MSG_translateWithGoogle__"},translateWithTransmart:{description:"__MSG_translateWithTransmart__"},translateWithGemini:{description:"__MSG_translateWithGemini__"},translateWithBing:{description:"__MSG_translateWithBing__"},translateInputBox:{description:"__MSG_translateInputBox__"},toggleVideoSubtitlePreTranslation:{description:"__MSG_toggleVideoSubtitlePreTranslation__"}},options_page:"options.html",options_ui:{page:"options.html",open_in_tab:!0,browser_style:!1},permissions:["storage","activeTab","contextMenus","webRequest","webRequestBlocking","declarativeNetRequestWithHostAccess","declarativeNetRequestFeedback","declarativeNetRequest"],host_permissions:[""],declarative_net_request:{rule_resources:[{id:"ruleset_1",enabled:!0,path:"rules/request_modifier_rule.json"}]},action:{default_popup:"popup.html",default_icon:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"}},browser_action:{default_icon:"icons/32.png",default_popup:"popup.html",theme_icons:[{dark:"icons/32.png",light:"icons/dark-32.png",size:32},{dark:"icons/48.png",light:"icons/dark-48.png",size:48},{dark:"icons/64.png",light:"icons/dark-64.png",size:64},{dark:"icons/128.png",light:"icons/dark-128.png",size:128},{dark:"icons/256.png",light:"icons/dark-256.png",size:256}]},icons:{"32":"icons/32.png","48":"icons/48.png","64":"icons/64.png","128":"icons/128.png","256":"icons/256.png"},browser_specific_settings:{gecko:{id:"{5efceaa7-f3a2-4e59-a54b-85319448e305}",strict_min_version:"63.0"},gecko_android:{strict_min_version:"113.0"}},key:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JPn78UfqI3xIIOPPLPS74UTzLfJL1gQM8hlk/deKWvFP/WqUBnPJPdhQeF45sFpI1OjO70nFqdATT4/RwYAiZK7G/E6m27MDVnhHjszfzReOuoAEn9J3RnE2xEx5pFhRFcelhnwTTLrrn90aaPcaMtNsgXtZA1Ggz/SnX9I4ZygqpJYjx3Ql2t6SyNK222oRQiKMT93Rrjgyc8RFA7FKXsWglG0TvseRjbmG5Jk5gDx+2/YTcWGqCDotQnWnkPj/dBO23UAX7IpyJK3FGYdkvWFih6OVClHIIWY8mfCjjwSGbXNQNesaa9F2hrzBZ5MRTj4m7yj76mGxuPHPIE8mwIDAQAB"};m();m();m();var Mg=/iPhone/i,Q2=/iPod/i,Z2=/iPad/i,X2=/\biOS-universal(?:.+)Mac\b/i,Pg=/\bAndroid(?:.+)Mobile\b/i,e1=/Android/i,fi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Kl=/Silk/i,Qr=/Windows Phone/i,t1=/\bWindows(?:.+)ARM\b/i,n1=/BlackBerry/i,r1=/BB10/i,a1=/Opera Mini/i,o1=/\b(CriOS|Chrome)(?:.+)Mobile/i,i1=/Mobile(?:.+)Firefox\b/i,s1=e=>typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof globalThis.MSStream>"u";function iS(e){return t=>t.test(e)}function it(e){let t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});let n=t.userAgent,r=n.split("[FBAN");typeof r[1]<"u"&&(n=r[0]),r=n.split("Twitter"),typeof r[1]<"u"&&(n=r[0]);let a=iS(n),o={apple:{phone:a(Mg)&&!a(Qr),ipod:a(Q2),tablet:!a(Mg)&&(a(Z2)||s1(t))&&!a(Qr),universal:a(X2),device:(a(Mg)||a(Q2)||a(Z2)||a(X2)||s1(t))&&!a(Qr)},amazon:{phone:a(fi),tablet:!a(fi)&&a(Kl),device:a(fi)||a(Kl)},android:{phone:!a(Qr)&&a(fi)||!a(Qr)&&a(Pg),tablet:!a(Qr)&&!a(fi)&&!a(Pg)&&(a(Kl)||a(e1)),device:!a(Qr)&&(a(fi)||a(Kl)||a(Pg)||a(e1))||a(/\bokhttp\b/i)},windows:{phone:a(Qr),tablet:a(t1),device:a(Qr)||a(t1)},other:{blackberry:a(n1),blackberry10:a(r1),opera:a(a1),firefox:a(i1),chrome:a(o1),device:a(n1)||a(r1)||a(a1)||a(i1)||a(o1)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}var Fg="DENO",Gl="CHROME",Yl="FIREFOX";function u1(e){let t=Gl;try{let n=navigator?.userAgent||"";/firefox/i.test(n)||typeof InstallTrigger<"u"?t=Yl:/deno/i.test(n)&&(t=Fg)}catch{}return e===Gl&&t===Gl||e===Yl&&t===Yl||e===Fg&&t===Fg}function l1(){return u1(Gl)}function c1(){return typeof Deno<"u"}function Zr(){return u1(Yl)}function Ea(){return!!navigator.maxTouchPoints||"ontouchstart"in document.documentElement}function d1(){return!!globalThis.matchMedia("(pointer:fine)").matches}function To(e){return!!(e?.confirmSupportMouse||globalThis.matchMedia("(pointer:fine)").matches)}m();var g1={addListener:()=>{},removeListener:()=>{},hasListener:()=>{}},m1={permissions:{contains:()=>{},request:()=>{}},runtime:{onMessage:g1,openOptionsPage:()=>{},lastError:{message:""}},storage:{sync:{get:()=>{},set:()=>{}}},tabs:{onUpdated:g1,query:()=>{},sendMessage:()=>{}}};var Q;c1()?Q=m1:Q=globalThis.immersiveTranslateBrowserAPI;var sS="";function Zn(){return sS||Vl.version}function kr(){return Q.runtime.getManifest().version}m();function p1(e){return e.replace(//g,">")}m();function Yt(e){return!!(e&&e.subscription&&e.subscription.subscriptionStatus==="active")}function f1(e){if(e){let t="unknown";if(e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?t="stripe":t="admin"),t==="stripe")return!0}return!1}function h1(e){if(e){let t=new Date(e.createTime),n=uS(t),r="free",a="unknown";return e.subscription&&e.subscription.subscriptionStatus==="active"&&(r=e.subscription.subscriptionType),e.subscription&&e.subscription.subscriptionId&&(e.subscription.subscriptionId.startsWith("sub_")?a="stripe":a="admin"),{user_type:r,user_register_day:n,subscription_from:a}}else return null}function uS(e){try{let n=e.toLocaleString("en-US",{timeZone:"Asia/Shanghai"}).split(" ")[0];n.endsWith(",")&&(n=n.slice(0,-1));let[r,a,o]=n.split("/");return n=`${o}-${r}-${a}`,n}catch{return"unknown"}}m();m();function ye(e){if(typeof e!="string")return"auto";let t=e.toLowerCase();if(t==="und")return"auto";if(t==="zh"||t.startsWith("zh-hans"))return"zh-CN";if(t.startsWith("zh-hant")||t.startsWith("zh-hk")||t.startsWith("zh-tw"))return"zh-TW";if(t.startsWith("zh-"))return"zh-CN";if(t==="iw")return"he";if(t==="jv")return"jw";let n=Bn.map(a=>a.toLowerCase()),r=n.indexOf(t);if(r===-1)if(t.indexOf("-")>=0){t=t.split("-")[0];let a=n.indexOf(t);return a===-1?"auto":Bn[a]}else return"auto";else return Bn[r]}function kt(){return ye(document?.documentElement?.lang||"en")}function Ks(e){if(Math.abs(e)<1024)return e+" Byte";let n=["KB","MB","GB","TB","PB","EB","ZB","YB"],r=-1;do e/=1024,++r;while(Math.abs(e)>=1024&&ru+l.text.length,0)+i.text.length>t||o.tempSentences.length>=n)&&(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}),(o.from!==i.from||o.to!==i.to)&&(o.tempSentences.length>0?(a.push(o),o={fromByClient:o.fromByClient,from:i.from,to:i.to,tempSentences:[],url:i.url}):(o.from=i.from,o.to=i.to)),o.tempSentences.push(i);return o.tempSentences.length>0&&a.push(o),a}function lS(e,t){let n=[],r=[];for(let a=0;a0?yt){let x=[];Rg(C,t,x);for(let S=0;S0&&y{let s=e.lastIndexOf(i,t);return s>o?s:o},-1);if(a===-1){let o=e.slice(0,t);if(o&&!o.trim())return;n.push({text:o,prefix:"",suffix:""}),e.length>t&&Rg(e.slice(t),t,n)}else{let o=e.slice(0,a+1);if(o&&o.trim()==="")return;o.startsWith(" ")?n.push({text:o.slice(1),prefix:" ",suffix:""}):n.push({text:o,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?f.push(y):p.push(y))});let h=f.concat(p).filter(y=>y.required);if(h.length>0){for(let y of h)if(!o[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:o,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:f,explicitProps:p}}var vo=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,o=n.canary,i=n.debug,s=e.user,u=Yt(s),l=Object.keys(Qn);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=Qn[c];if(c.startsWith("mock"))return i?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&We())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||o||u);let p=!!g.canary,f=!!g.alpha,h=!!g.beta;return c===e[t]||p&&o||f&&(r||o)||h&&(a||r||o)?!0:!f&&!h&&!p}).map(c=>hi(t,c,e))};function Ks(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function y1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}m();var C1=be+"SyncStoreKey_";function jt(e,t){let n=C1+e;return Q.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function rt(e,t){let n=C1+e;return Q.storage.sync.set({[n]:t})}m();var xo=be+"CacheKey_";function Ig(e,t){let n=xo+e;return Q.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function cS(){let e=Q.storage.local.refresh;e&&e()}function Og(e,t){let n=xo+e;return Q.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:o}=r[n];return o&&or.startsWith(xo)).filter(r=>r!==xo+Tt);if(n.length>0)return Q.storage.local.remove(n)}}var gt={get:Ig,set:Ug,getExpired:Og,setExpired:Ng,remove:jg,clear:Hg,refresh:cS};m();var T1=["*://*/*","*","*://*"],x1="immersive-translate-wildcard-placeholder.com";function zg(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>T1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,o=r.hostname,i=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===o)return!0;if(T1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===o,g=l.port===i;return l.port?c&&g:c}else return gS(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let C=u.split("://");l=C[0],l==="*"&&C.length>1&&(l="*",u="https://"+C[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,x1),p;try{p=new URL(g)}catch{return I.debug("invalid match pattern",g,"raw match value:",c),!1}let f=p.host,h=p.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=dS(l+":",v1(f),v1(h));if(y){let C=new URL(a);return y.test(C.href)}else return!1}});if(s)return s}return null}catch{return null}}function v1(e){return e.replaceAll(x1,"*")}function dS(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return zg(e,t)!==null}function gS(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}m();m();var E1=be+"StoreKey_";function Xr(e,t){let n=E1+e;return Q.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function S1(e,t){let n=E1+e;return Q.storage.local.set({[n]:t})}m();m();m();m();function w1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function qg(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let o=mS(r);if(typeof a=="object"||o){let i=a;o&&typeof i=="string"&&(i={tag:"a",href:i,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=i.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),p=Object.keys(i).filter(f=>f!=="tag").map(f=>`${f}="${i[f]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${p}>${g}`)}}}else if(a){let i=new RegExp("{"+r+"}","gm");n=n.replace(i,a.toString())}}),n}function Gs(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),o="";do{o+=a.shift();let i=r[o];i!==void 0&&(typeof i=="object"||!a.length)?(r=i,o=""):a.length?o+=".":r=n}while(a.length);return r}function Ar(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let o=Gs(e,n,t);return o===t&&n!==r&&(o=Gs(e,r,t)),qg(o,a)}function mS(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function Ht(e,t,n){return Ar(tn,t,e.config.interfaceLanguage,"en",n)}m();function D1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",o).replace("HH",i).replace("mm",s).replace("ss",u)}function k1(e){return new Date(e).getTime()}var J=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=Ht.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=Ht.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=Ht.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=Ht.bind(null,t),r="retry",a="network",o=n("networkError");if(!this.status||this.status<0)return;let i=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?i=`${n("error.googleLimitIp")}

${i}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?i=`${n("error.openAIFreeLimit")}

+`;continue}else if(C.length>t){let x=[];Bg(C,t,x);for(let S=0;S0&&y{let s=e.lastIndexOf(i,t);return s>o?s:o},-1);if(a===-1){let o=e.slice(0,t);if(o&&!o.trim())return;n.push({text:o,prefix:"",suffix:""}),e.length>t&&Bg(e.slice(t),t,n)}else{let o=e.slice(0,a+1);if(o&&o.trim()==="")return;o.startsWith(" ")?n.push({text:o.slice(1),prefix:" ",suffix:""}):n.push({text:o,prefix:"",suffix:""}),a+10){g.forEach(y=>{c.length>0&&y.providers&&y.providers.length>0&&!y.providers.includes(l)||(y.optional?f.push(y):p.push(y))});let h=f.concat(p).filter(y=>y.required);if(h.length>0){for(let y of h)if(!o[y.name]){u=!1;break}}}return{...a,id:t,selected:n[e]===t,ok:u,currentProvider:l,config:o,providers:a.providers||[],props:a.props||[],allProps:g,optionalProps:f,explicitProps:p}}var vo=(e,t)=>{let{config:n}=e,r=n.alpha,a=n.beta,o=n.canary,i=n.debug,s=e.user,u=Yt(s),l=Object.keys(Qn);return t!=="translationService"&&l.unshift("inherit"),l.filter(c=>{if(c==="inherit")return!0;let g=Qn[c];if(c.startsWith("mock"))return i?!0:c===e.config[t];if(c===e.config[t])return!0;if(c==="openai"&&$e())return e.config.showOpenaiOnSafari||u?!0:!!(a||r||o||u);let p=!!g.canary,f=!!g.alpha,h=!!g.beta;return c===e[t]||p&&o||f&&(r||o)||h&&(a||r||o)?!0:!f&&!h&&!p}).map(c=>hi(t,c,e))};function Gs(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}function y1(e){return e.replace(/([a-zA-Z0-9]+)([\u4e00-\u9fa5]+)/g,"$1 $2").replace(/([\u4e00-\u9fa5]+)([a-zA-Z0-9]+)/g,"$1 $2")}m();var C1=be+"SyncStoreKey_";function jt(e,t){let n=C1+e;return Q.storage.sync.get(n).then(r=>r[n]===void 0?t:r[n])}function at(e,t){let n=C1+e;return Q.storage.sync.set({[n]:t})}m();var xo=be+"CacheKey_";function Rg(e,t){let n=xo+e;return Q.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function cS(){let e=Q.storage.local.refresh;e&&e()}function Ig(e,t){let n=xo+e;return Q.storage.local.get(n).then(r=>{if(r[n]===void 0)return t;let{value:a,expired:o}=r[n];return o&&or.startsWith(xo)).filter(r=>r!==xo+Tt);if(n.length>0)return Q.storage.local.remove(n)}}var mt={get:Rg,set:Ng,getExpired:Ig,setExpired:Og,remove:Ug,clear:jg,refresh:cS};m();var T1=["*://*/*","*","*://*"],x1="immersive-translate-wildcard-placeholder.com";function Hg(e,t){try{let n=[];if(!t||(t&&!Array.isArray(t)?n=[t]:n=t,n.length===0))return null;if(n.some(s=>T1.includes(s)))return e;let r=new URL(e);r.hash="",r.search="";let a=r.href,o=r.hostname,i=r.port;if(n&&n.length>0){let s=n.find(u=>{if(!u)return!1;if(u===o)return!0;if(T1.includes(u))return!0;if(!u.includes("*")&&u.includes("://")){try{let l=new URL(u);if(l.pathname==="/"&&!u.endsWith("/")){let c=l.hostname===o,g=l.port===i;return l.port?c&&g:c}else return gS(a,u)}catch{}return!1}else{let l,c=u;if(u.includes("://")){let C=u.split("://");l=C[0],l==="*"&&C.length>1&&(l="*",u="https://"+C[1])}else l="*",u="https://"+u;let g=u.replace(/\*/g,x1),p;try{p=new URL(g)}catch{return I.debug("invalid match pattern",g,"raw match value:",c),!1}let f=p.host,h=p.pathname;h==="/"&&(c.replace("://","").includes("/")||(h="/*"));let y=dS(l+":",v1(f),v1(h));if(y){let C=new URL(a);return y.test(C.href)}else return!1}});if(s)return s}return null}catch{return null}}function v1(e){return e.replaceAll(x1,"*")}function dS(e,t,n){let r="^";return e==="*:"?r+="(http:|https:|file:)":r+=e,r+="//",t&&(e==="file:"||(t==="*"?r+="[^/]+?":(t.match(/^\*\./)&&(r+="[^/]*?",t=t.substring(1)),r+=t.replace(/\./g,"\\.").replace(/\*/g,"[^/]*")))),n?n==="*"||n==="/*"?r+="(/.*)?":n.includes("*")?(r+=n.replace(/\*/g,".*?"),r+="/?"):r+=n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):r+="/?",r+="$",new RegExp(r)}function _t(e,t){return Hg(e,t)!==null}function gS(e,t){let n=new URL(e),r=new URL(t);return n.hostname===r.hostname&&n.pathname===r.pathname&&n.protocol===r.protocol&&n.port===r.port}m();m();var E1=be+"StoreKey_";function Xr(e,t){let n=E1+e;return Q.storage.local.get(n).then(r=>r[n]===void 0?t:r[n])}function S1(e,t){let n=E1+e;return Q.storage.local.set({[n]:t})}m();m();m();m();function w1(e,t){return[e,!e||e.endsWith("/")?"":"/",t,".json"].join("")}function zg(e,t){let n=e;return t&&Object.keys(t).forEach(r=>{let a=t[r];if(a===void 0)return;let o=mS(r);if(typeof a=="object"||o){let i=a;o&&typeof i=="string"&&(i={tag:"a",href:i,target:"_blank",class:"immersive-translate-link"});let s=`<${r}>`,u=n.indexOf(s);if(u!==-1){let l=i.tag||"a",c=n.indexOf(``);if(c!==-1){let g=n.substring(u+s.length,c),p=Object.keys(i).filter(f=>f!=="tag").map(f=>`${f}="${i[f]}"`).join(" ");n=n.replace(`${s}${g}`,`<${l} ${p}>${g}`)}}}else if(a){let i=new RegExp("{"+r+"}","gm");n=n.replace(i,a.toString())}}),n}function Ys(e,t,n){let r=e[t];if(!r)return n;if(!n)return"";let a=n.split("."),o="";do{o+=a.shift();let i=r[o];i!==void 0&&(typeof i=="object"||!a.length)?(r=i,o=""):a.length?o+=".":r=n}while(a.length);return r}function Ar(e,t,n,r,a){if(!e.hasOwnProperty(n))return t;let o=Ys(e,n,t);return o===t&&n!==r&&(o=Ys(e,r,t)),zg(o,a)}function mS(e){if(typeof e=="number")return!0;if(e){let t=parseInt(e);return!isNaN(t)}else return!1}function Ht(e,t,n){return Ar(nn,t,e.config.interfaceLanguage,"en",n)}m();function D1(e,t){let n=new Date(e),r=n.getFullYear().toString(),a=(n.getMonth()+1).toString().padStart(2,"0"),o=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0"),u=n.getSeconds().toString().padStart(2,"0");return t.replace("YYYY",r).replace("MM",a).replace("DD",o).replace("HH",i).replace("mm",s).replace("ss",u)}function k1(e){return new Date(e).getTime()}var J=class extends Error{status;constructor(t,n){if(t&&n){super(n),this.name=t;return}super(t)}initNetWork(t){return t&&(this.status=t),this}initStack(t){return t&&(this.stack=t),this}initData(t){return this.data=t,this}data;uiConfig(t){if(!this.message)return{};let n=null;if(n=this.handleProQuota(t)||this.handleUnavailableError(t)||this.handleProUser(t)||this.handleServiceMissingConfig(t)||this.handleNetwork(t)||this.handleFetchError(t),!n){let r=Ht.bind(null,t),a=this.getErrorMsg();n={type:"error",title:r("networkError"),errMsg:r("error.serveUnavailable",{serverName:r("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+r("errorReason",{message:a}),action:"changeService"}}return n}getErrorMsg(){return this.status?this.status<0?this.message:`${this.status}: ${this.message}`:this.message}handleUnavailableError(t){let n=Ht.bind(null,t),r=this.message.startsWith("bingAuth"),a=this.data?.translationService==="transmart"&&this.message.startsWith("Server is busy now");if(r||a)return this.message=this.message.replace("bingAuth:",""),{type:"network",title:n("networkError"),errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:this.message}),action:"changeService"}}handleServiceMissingConfig(t){let n=Ht.bind(null,t);if(this.message.endsWith(" are required")||this.message.includes("You didn't provide an API key"))return{type:"configError",title:n("error.serveConfigError"),errMsg:this.getErrorMsg()+"

"+n("error.reloadPageOfSetting"),action:"setting"}}handleNetwork(t){let n=Ht.bind(null,t),r="retry",a="network",o=n("networkError");if(!this.status||this.status<0)return;let i=this.getErrorMsg();return this.status===429?this.data?.translationService=="google"?i=`${n("error.googleLimitIp")}

${i}`:this.data?.translationService=="openai"&&(this.message.indexOf("Limit: 3 / min")>=0||this.message.includes("rate_limit_exceeded")&&this.message.includes("Limit 3"))?i=`${n("error.openAIFreeLimit")}

${i}`:this.data?.translationService=="openai"&&this.message.includes("You exceeded your current quota")?i=`${n("error.openAIExceededQuota")}

- ${i}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?i=`${n("error.gemini.429")}

${i}`:i=`${n("error.429")}

${i}`:this.status===403?this.data?.translationService=="claude"?i=`${n("error.claude.403")}

${i}`:i=`${n("error.403")}

${i}`:this.status===400?i=`${n("error.400")}

${i}`:this.status===502?i=`${n("error.502")}

${i}`:this.status===404&&i.includes("User subscription not found")&&(i=`${n("error.subscriptionExpired")}

${i}`,r="setting",a="configError",o=n("error.subscriptionExpiredTitle")),{type:a,title:o,errMsg:i,action:r}}handleFetchError(t){let n=Ht.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=Ht.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=Ht.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:o,isTrial:i,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",p=this.data?.translationService=="deepl"?"Deepl":"OpenAI",f=n("errorReason",{message:r});if(o=="onetime_7day")f+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Wl});else{let h="";p=="OpenAI"?h=W2:h=$2,i?f+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:V2}):f+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:p}),!i&&(a.cancelAtPeriodEnd==="false"||k1(u)>s)&&(f+=n("proQuotaExceededError.resetTime",{resetTime:D1(s,"YYYY-MM-DD HH:mm:ss")}))}return f}}};async function mr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await Cd(A1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await A1(e);return t}async function A1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let o=e.fetchPolyfill||fetch,i=3e4;if(e.timeout&&(i=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},i),r.signal=l}let s;try{s=await o(t,r)}catch(u){I.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new J("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of pS(s.body)){let g=new TextDecoder().decode(c);u+=g;let p;for(;(p=u.indexOf(` -`))>=0;){let f=u.slice(0,p).trim();if(u=u.slice(p+1),f.startsWith("event:")||f==="")continue;let h="";if(f.startsWith("data:")&&(h=f.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(C){I.debug("json error",C);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(f){I.error("parse response failed",f)}u&&I.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,p=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),p&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new J("fetchError",c).initNetWork(s.status)}}async function*pS(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}m();var Ys=new Map;function L1(){document.addEventListener(b2,e=>{let t=e;if(t&&t.detail){let n;try{n=JSON.parse(t.detail),Ys.has(n.id)&&(n.ok?Ys.get(n.id)(null,n.data):Ys.get(n.id)(new Error(n.errorMessage),null),Ys.delete(n.id))}catch{}}})}function Jl(e){let t=fS(64),n=new CustomEvent(p2,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{Ys.set(t,(o,i)=>{o?a(o):r(i)})})}function fS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let i=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,i=`${i}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=$g(s),{type:p,name:f}=g;if(p!==t)return!1;let h=$g(i),C=Js.get(p).get(f);if(!C)return this.logger.debug(`no message handler for ${p}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=C,S={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let A=b(r.payload,S);o({ok:!0,data:A})}catch(A){o({ok:!1,errorName:A.name,errorMessage:A.message,errorDetails:A.details,errorStatus:A.status})}return!1}else return b(r.payload,S).then(A=>{o({ok:!0,data:A})}).catch(A=>{o({ok:!1,errorName:A.name,errorMessage:A.message,errorDetails:A.message,errorStatus:A.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let o=this.fromType,i=Js.get(o);if(i.has(t))return i.get(t).connectionInstance;{let s=new Wg(`${o}:${t}`,this.logger);return Js.get(o).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},Wg=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=$g(t),{type:a,id:o}=r;if(a!=="content_script"){let i={to:t,from:this.from,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");try{let s=await Q.runtime.sendMessage(i);return _1(i,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let i={from:this.from,to:t,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");let s=await Q.tabs.sendMessage(o,i);return _1(i,s,this.logger)}}};function _1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new J(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new J("noResponse","Unknown error")}function $g(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}m();var hS="";function bi(){return hS||globalThis.navigator.userAgent}function Vg(){return bi().includes("ImtFxiOS")}function M1(){let t=bi().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function bS(){return bi().includes("ImtFxAndroid")}function P1(){let e=bi();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function F1(){let t=bi().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function Qs(){let e=bi();if(Vg()||bS()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Ql;function yS(){return Ql||(Ql=new ea("content_script",!1).getConnection("pure_main",()=>{}),Ql)}var B1="G-MKMD9LWFTR";async function Eo(e){try{let t=Pe(),n=t.INSTALL_FROM==="firefox_store";if(Qs()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=me(),o=at(),i=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await jt("fakeUserId","");u||(u=await Xr("fakeUserId",""),u&&await rt("fakeUserId",u));let l=Zn(),c=new Date,g=await jt("installedAt","");g||(g=await Xr("installedAt",""),g&&await rt("installedAt",g)),u?g||(g=new Date(0).toISOString(),await rt("installedAt",g)):(u=CS(32),await rt("fakeUserId",u)),g||(g=c.toISOString(),await rt("installedAt",g));let p=new Date(g),f=R1(p),h=R1(c),y=f===h,C=c.getTime()-p.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${B1}&api_secret=${s}`;i||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${B1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let S=ti.parse(x),A=e.map(w=>{let v=w.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser){v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown";let L=Qs();L&&(v.browser_name=L.name,v.browser_version=L.version)}return S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),f&&(v.install_day=TS(p)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",C?v.is_new_user_this_week="1":v.is_new_user_this_week="0",o?v.main_frame=0:v.main_frame=1,{...w,params:v}}),P=await Zl({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:A})})}catch{}}function CS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} + ${i}`:this.data?.translationService=="gemini"&&this.message.includes("RESOURCE_EXHAUSTED")?i=`${n("error.gemini.429")}

${i}`:i=`${n("error.429")}

${i}`:this.status===403?this.data?.translationService=="claude"?i=`${n("error.claude.403")}

${i}`:i=`${n("error.403")}

${i}`:this.status===400?i=`${n("error.400")}

${i}`:this.status===502?i=`${n("error.502")}

${i}`:this.status===404&&i.includes("User subscription not found")&&(i=`${n("error.subscriptionExpired")}

${i}`,r="setting",a="configError",o=n("error.subscriptionExpiredTitle")),{type:a,title:o,errMsg:i,action:r}}handleFetchError(t){let n=Ht.bind(null,t);if(this.status!==-999)return;let r=this.getErrorMsg();return{type:"network",title:"",errMsg:n("error.serveUnavailable",{serverName:n("translationServices."+t.translationService),1:"https://dash.immersivetranslate.com/#general",2:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error",3:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=webpage&utm_campaign=service_error"})+"

"+n("errorReason",{message:r}),action:"changeService"}}handleProUser(t){let n=Ht.bind(null,t);if(!(this.data?.translationService!=="openai"&&this.data?.translationService!=="deepl")){if(this.message.indexOf("token invalid")>=0||this.message.indexOf("Login required")>=0)return{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"};if(this.message.indexOf("activate Pro")>=0)return t.user?{type:"upgrade",title:n("upgradeToProErrorTitle"),errMsg:n("error.proUpgrade"),action:"upgrade"}:{type:"notLogin",title:n("notLoginPro"),errMsg:n("error.proTokenInvalid"),action:"login"}}}handleProQuota(t){if(!this.message.startsWith("ProQuota:")||!t.user?.subscription)return;let n=Ht.bind(null,t);this.message=this.message.replace("ProQuota:","");let r=this.message;try{r=JSON.parse(this.message).error}catch{}let a=t.user.subscription,{subscriptionType:o,isTrial:i,openAITokenUsedCountResetTime:s,subscriptionTo:u}=a;return{type:"ProQuotaExceeded",title:"",errMsg:c.call(this),action:"retry"};function c(){let g=this.data?.translationService=="deepl"?"OpenAI":"Deepl",p=this.data?.translationService=="deepl"?"Deepl":"OpenAI",f=n("errorReason",{message:r});if(o=="onetime_7day")f+=n("proQuotaExceededError.onetime7day",{anotherService:g,brandId:ee,href:Wl});else{let h="";p=="OpenAI"?h=W2:h=$2,i?f+=n("proQuotaExceededError.trial",{anotherService:g,brandId:ee,href:V2}):f+=n("proQuotaExceededError.nonTrial",{anotherService:g,brandId:ee,href:h,translationService:p}),!i&&(a.cancelAtPeriodEnd==="false"||k1(u)>s)&&(f+=n("proQuotaExceededError.resetTime",{resetTime:D1(s,"YYYY-MM-DD HH:mm:ss")}))}return f}}};async function mr(e){let t;if(e&&e.retry&&e.retry>0)try{t=await yd(A1.bind(null,e),{multiplier:2,maxAttempts:e.retry})}catch(n){throw n&&n.name==="RetryError"&&n.cause?n.cause:n}else t=await A1(e);return t}async function A1(e){e.body;let{url:t,responseType:n,...r}=e;n||(n="json"),r={mode:"cors",...r};let a=!0;e.fetchPolyfill&&(a=!1);let o=e.fetchPolyfill||fetch,i=3e4;if(e.timeout&&(i=e.timeout),a){let u=new AbortController,l=u.signal;setTimeout(()=>{u.abort()},i),r.signal=l}let s;try{s=await o(t,r)}catch(u){I.debug("fetch error",t,u);let l=u.message||"Unknown Error";throw new J("fetchError",l).initNetWork(-999).initStack(u.stack)}if(s.ok&&s.status>=200&&s.status<400){if(n==="json")return await s.json();if(n==="text")return await s.text();if(n==="raw"){let u=await s.text(),l=Object.fromEntries([...s.headers.entries()]),c=s.url;return c||(s.headers.get("X-Final-URL")?c=s.headers.get("X-Final-URL"):c=t),{body:u,headers:l,status:s.status,statusText:s.statusText,url:c}}else if(n==="stream"){let u="",l;if(s.body&&s.body instanceof ReadableStream)for await(let c of pS(s.body)){let g=new TextDecoder().decode(c);u+=g;let p;for(;(p=u.indexOf(` +`))>=0;){let f=u.slice(0,p).trim();if(u=u.slice(p+1),f.startsWith("event:")||f==="")continue;let h="";if(f.startsWith("data:")&&(h=f.slice(5).trim()),h==="[DONE]")break;let y;try{y=JSON.parse(h??"")}catch(C){I.debug("json error",C);continue}l=y}}return l}}else{let u;try{u=await s.text()}catch(f){I.error("parse response failed",f)}u&&I.error("fail response",u);let l="";u&&(l=u.slice(0,500));let c=l,p=new URL(t).hostname.endsWith(".immersivetranslate.com");throw t.endsWith("edge.microsoft.com/translate/auth")&&(c="bingAuth:"+l),p&&l.includes("quota exceeded")&&(c="ProQuota:"+l),new J("fetchError",c).initNetWork(s.status)}}async function*pS(e){let t=e.getReader();try{for(;;){let{done:n,value:r}=await t.read();if(n)return;yield r}}finally{t.releaseLock()}}m();var Js=new Map;function L1(){document.addEventListener(b2,e=>{let t=e;if(t&&t.detail){let n;try{n=JSON.parse(t.detail),Js.has(n.id)&&(n.ok?Js.get(n.id)(null,n.data):Js.get(n.id)(new Error(n.errorMessage),null),Js.delete(n.id))}catch{}}})}function Jl(e){let t=fS(64),n=new CustomEvent(p2,{detail:JSON.stringify({...e,type:"ask",id:t})});return document.dispatchEvent(n),new Promise((r,a)=>{Js.set(t,(o,i)=>{o?a(o):r(i)})})}function fS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let i=r.from,s=r.to,u,l,c;a.tab&&a.tab.id&&(u=a.tab.id,i=`${i}:${u}`,l=a.tab.url,c=a.tab.active),this.logger.debug(`${r.to} received message [${r.payload.method}] from ${r.from}`,r.payload.data?r.payload.data:" ");let g=Wg(s),{type:p,name:f}=g;if(p!==t)return!1;let h=Wg(i),C=Qs.get(p).get(f);if(!C)return this.logger.debug(`no message handler for ${p}:${s}, but it's ok`),!1;let{messageHandler:b,sync:x}=C,S={type:t,name:h.name,id:u,url:l,active:c};if(x){try{let A=b(r.payload,S);o({ok:!0,data:A})}catch(A){o({ok:!1,errorName:A.name,errorMessage:A.message,errorDetails:A.details,errorStatus:A.status})}return!1}else return b(r.payload,S).then(A=>{o({ok:!0,data:A})}).catch(A=>{o({ok:!1,errorName:A.name,errorMessage:A.message,errorDetails:A.message,errorStatus:A.status})}),!0}))}getConnection(t,n,r){let a=!1;r&&r.sync&&(a=!0);let o=this.fromType,i=Qs.get(o);if(i.has(t))return i.get(t).connectionInstance;{let s=new qg(`${o}:${t}`,this.logger);return Qs.get(o).set(t,{messageHandler:n,sync:a,connectionInstance:s}),s}}},qg=class{from;logger;constructor(t,n){this.from=t,this.logger=n}async sendMessage(t,n){let r=Wg(t),{type:a,id:o}=r;if(a!=="content_script"){let i={to:t,from:this.from,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");try{let s=await Q.runtime.sendMessage(i);return _1(i,s,this.logger)}catch(s){if(a==="popup"){let u=`popup ${t} is not active, so the message does not send, ignore this error, ${JSON.stringify(n)}`;return this.logger.debug(u,n,t,s),Promise.resolve({message:u})}else throw s}}else{let i={from:this.from,to:t,payload:n};this.logger.debug(`${i.from} send message [${i.payload.method}] to ${i.to}`,i.payload.data?i.payload.data:" ");let s=await Q.tabs.sendMessage(o,i);return _1(i,s,this.logger)}}};function _1(e,t,n){if(t){if(t.ok)return n.debug(`${e.from} received response from ${e.to}:`,t.data?t.data:" "),t.data;throw new J(t.errorName||"UnknownError",t.errorMessage||"Unknown error").initNetWork(t.errorStatus)}else throw new J("noResponse","Unknown error")}function Wg(e){let t=e.split(":");if(t.length<2)throw new Error("not a valid to string");let n={type:t[0],name:t[1]};if(t[0]==="content_script"){let r=parseInt(t[2]);if(!isNaN(r))n.id=r;else throw new Error("tab id not a valid number")}return n}m();var hS="";function bi(){return hS||globalThis.navigator.userAgent}function $g(){return bi().includes("ImtFxiOS")}function M1(){let t=bi().match(/ImtFxiOS\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function bS(){return bi().includes("ImtFxAndroid")}function P1(){let e=bi();return/ImtFxAndroid\/(\d+\.\d+\.\d+)\/google/.test(e)}function F1(){let t=bi().match(/ImtFxAndroid\/(\d+\.\d+\.\d+)/);return t?t[1]:null}function Zs(){let e=bi();if($g()||bS()){let t=e.match(/Imt[\w/.]+/);if(t){let n=t[0].split("/"),r=n[0];return n[2]&&(r+="_"+n[2]),{name:r,version:n[1]}}}return null}var Ql;function yS(){return Ql||(Ql=new ea("content_script",!1).getConnection("pure_main",()=>{}),Ql)}var B1="G-MKMD9LWFTR";async function Eo(e){try{let t=Pe(),n=t.INSTALL_FROM==="firefox_store";if(Zs()?.name?.startsWith("ImtFx")&&(n=!1),n)return;let a=me(),o=ot(),i=t.PROD==="1",s="sitc4WmvShWYwfU0dANM3Q",u=await jt("fakeUserId","");u||(u=await Xr("fakeUserId",""),u&&await at("fakeUserId",u));let l=Zn(),c=new Date,g=await jt("installedAt","");g||(g=await Xr("installedAt",""),g&&await at("installedAt",g)),u?g||(g=new Date(0).toISOString(),await at("installedAt",g)):(u=CS(32),await at("fakeUserId",u)),g||(g=c.toISOString(),await at("installedAt",g));let p=new Date(g),f=R1(p),h=R1(c),y=f===h,C=c.getTime()-p.getTime()<7*24*60*60*1e3,b=`https://www.google-analytics.com/mp/collect?measurement_id=${B1}&api_secret=${s}`;i||(b=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${B1}&api_secret=${s}`);let x="";typeof navigator<"u"&&(x=window.navigator.userAgent);let S=ti.parse(x),A=e.map(w=>{let v=w.params||{};if(S.os&&(v.os_name=S.os.name||"unknown",v.os_version=S.os.version||"unknown",v.os_version_name=S.os.versionName||"unknown"),S.browser){v.browser_name=S.browser.name||"unknown",v.browser_version=S.browser.version||"unknown";let L=Zs();L&&(v.browser_name=L.name,v.browser_version=L.version)}return S.platform&&(v.platform_type=S.platform.type||"unknown"),S.engine&&(v.engine_name=S.engine.name||"unknown",v.engine_version=S.engine.version||"unknown"),l&&(v.version=l),t.INSTALL_FROM&&(v.install_from=t.INSTALL_FROM),f&&(v.install_day=TS(p)),v.userscript=a.toString(),y?v.is_new_user_today="1":v.is_new_user_today="0",C?v.is_new_user_this_week="1":v.is_new_user_this_week="0",o?v.main_frame=0:v.main_frame=1,{...w,params:v}}),P=await Zl({responseType:"text",url:b,method:"POST",body:JSON.stringify({client_id:u,user_id:u,events:A})})}catch{}}function CS(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a",""],limit:5},custom:{placeholderDelimiters:["{","}"]},bing:{maxTextLengthPerRequest:1800,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},yandex:{maxTextLengthPerRequest:1e3,requestTimeout:1e4,retry:1,placeholderDelimiters:["","","b"]},deeplx:{limit:3,placeholderDelimiters:["@","#"]},d:{immediateTranslationTextCount:0,placeholderDelimiters:["@","#"]},papago:{placeholderDelimiters:["{","}"]},dpro:{apiUrl:"https://api.deepl.com/jsonrpc"},ai:{env:{imt_source_field:"text",imt_trans_field:"text",imt_sub_source_field:"source",imt_sub_trans_field:"translation",imt_yaml_item:`- id: {{id}} {{imt_source_field}}: {{text}}`,imt_subtitle_yaml_item:`- id: {{id}} {{imt_sub_source_field}}: {{text}}`,normal_result_yaml_example:`Example request: - id: 1 @@ -5175,7 +5175,7 @@ Translate the content to {{to}} Language: `,selectors:["h3 a[data-clk]","div.gs_rs","td a.gsc_a_at","td div.gs_gray:last-of-type","div.gsc_oci_value","#gs_opinion"],extraInlineSelectors:["br"],atomicBlockSelectors:["h3 a[data-clk]"]},{id:"googleMail",matches:"mail.google.com",detectParagraphLanguage:!0,selectors:["h2[data-thread-perm-id]","span[data-thread-id]","div[data-message-id] div[class='']",".messageBody","#views"],globalStyles:{"[role='listitem'] > div":"height:auto!important;white-space:unset!important;"}},{id:"googleNews",matches:"news.google.com",blockMinTextCount:26,blockMinWordCount:5,globalStyles:{".MCAGUe":"height: auto;",".To2ZZb.DbQnIe":"height: unset;",".cp7Yvc > h2":"display: block;",".oovtQ":"height: auto;",h4:"-webkit-line-clamp: unset;"},excludeSelectors:[".EyERq",".AOl7G.eejsDc","[aria-label='Home']","[aria-label='For you']","[aria-label='Following']","[aria-label='World']","[aria-label='Local']",".gb_Fc",".wBQf7b",".yPI8Rb",".jKHa4e",".u43Gd",".Zgjpyb","[role='button']","[jsname='rymPhb']",".cbz1ld",".VfPpkd-P5QLlc",".XvhY1d"]},{id:"outlook",matches:"outlook.live.com",excludeSelectors:[".jHAG3.XG5Jd",".OZZZK",".lDdSm"]},{id:"producthunt",matches:"www.producthunt.com",excludeMatches:"https://www.producthunt.com/stories/*",selectors:["h2","div[class^='styles_htmlText__']","[class^='styles_tagline']","a[href^='/discussions/'].fontWeight-600","button[class^='styles_textButton'] > div > span","h5 + p","div[data-test=product-item-name] + div",".noOfLines-1,.noOfLines-2,.noOfLines-3",".fontWeight-600","[class*='styles_dropdown']","[class*='styles_aboutText']"],globalStyles:{"h5 + p":"height:unset;",".noOfLines-1,.noOfLines-2,.noOfLines-3":"-webkit-line-clamp:unset;"},"excludeTags.remove":["PRE"]},{id:"codeforces",matches:"https://codeforces.com/*","stayOriginalTags.add":["[class^='MathJax']"]},{id:"discord",matches:"https://discord.com/channels/*",isTranslateTitle:!1,selectors:["li[id^=chat-messages] div[id^=message-content]","div[class^=headerText]","section[aria-label='Search Results'] div[id^=message-content]"],extraBlockSelectors:["[class^='embedFieldValue']","li[class^='card'] div[class^='message']","[data-list-item-id^='forum-channel-list'] div[class^='headerText']"],globalStyles:{"div[class^=headerText]":"max-height: unset;","div[class^=message]":"max-height: unset;","div[class^=text]":"max-height: unset;","h3[data-text-variant='heading-lg/semibold']":"-webkit-line-clamp: none;"},detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:"",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"telegram",matches:["web.telegram.org/z/*","web.telegram.org/a/*"],isTranslateTitle:!1,selectors:[".text-content",".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"telegramK",matches:["web.telegram.org/k/*","web.telegram.org/k/"],selectors:[".message",".reply-markup-button-text",".bot-commands-list-element-description"],"extraBlockSelectors.add":[".message.spoilers-container em",".message.spoilers-container strong"],excludeSelectors:[".time",".peer-title",".document-wrapper",".message.spoilers-container custom-emoji-element"],detectParagraphLanguage:!0},{id:"githubGist",matches:"gist.github.com",selectors:[".markdown-body",".readme"],detectParagraphLanguage:!0},{id:"lobste",matches:"lobste.rs",excludeMatches:["https://lobste.rs/about","https://lobste.rs/chat"],selectors:[".u-repost-of",".comment_text",".story_text"]},{id:"slack",matches:"*.slack.com",selectors:[".p-rich_text_block",".p-message_pane__foreword",".c-alert__message","[data-qa=message_attachment_text]"],additionalStayOriginalSelectors:["[data-qa=emoji]"],detectParagraphLanguage:!0},{id:"artstationArtwork",matches:"www.artstation.com/artwork/*",excludeSelectors:".project-description a",selectors:[".project-description","div.project-comment-text"],detectParagraphLanguage:!0},{id:"artstationLearning",matches:"www.artstation.com/learning/courses/*",additionalSelectors:["footer.learning-course-description.ng-star-inserted > span"],excludeSelectors:[".learning-card-meta",".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/subtitles/.*\\.(vtt|webvtt)$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"},videoSelector:"video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:[".vjs-text-track-display {display: none;}",".captions-text: {margin-bottom: 10%;}"]}}},{id:"artstationBlog",matches:["https://www.artstation.com/blogs","https://www.artstation.com/blogs/*"],detectParagraphLanguage:!0,additionalSelectors:[".comment-item-body"],atomicBlockSelectors:[".author-headline",".author-location"],excludeSelectors:["blog-card-thumbnail","blog-card-header",".blog-card-author",".blog-card-meta",".blog-view-header",".blog-grid-title",".post-meta-header"]},{id:"figmaCommunity",matches:"www.figma.com/community/*",normalizeBody:"div.ql-editor[contenteditable='false']",excludeSelectors:["div[class*='metadataRight']","div[class*='commentMetaAndOptions']"],globalStyles:{"div[class*='mini_cardBottomRowSizing']":"height: 3em;"},additionalSelectors:["div[class*='mini_cardBottomRow_Metadata']"],stayOriginalSelectors:["[data-tooltip='tooltip-user-info']"]},{id:"googleIndex",matches:["https://www.google.com/","https://www.google.com.hk/"],excludeSelectors:["#gb","#SIvCob"],inputTutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",inputTutorialsSelectors:["textarea#APjFqb"],"inputConfig.add":{tutorialsText:"\u8BD5\u8BD5\u8F93\u5165\u4E2D\u6587\u540E\u5FEB\u901F\u8FDE\u51FB 3 \u6B21\u7A7A\u683C\u952E\u7FFB\u8BD1\uFF08\u4EC5\u63D0\u793A\u4E00\u6B21\uFF09",tutorialsSelectors:["textarea#APjFqb"]}},{id:"googleSearch",matches:"www.google.*/search*",blockMinTextCount:32,blockMinWordCount:3,wrapperSuffix:"",detectParagraphLanguage:!0,excludeSelectors:["a h3 + div","div#sfooter","a[role=presentation] > div > div:first-child",".b5ZQcf",".CEMjEf",".MgUUmf.NUnG9d","#result-stats","[role=navigation]","div.sCuL3","div.eFM0qc.BCF2pd","div.WZ8Tjf","div.adDDi","#headerSection","#rateChatDiv","[id=bres]",".title-D5Lgyj","[data-attrid='VisualDigestVideoResult']",".search-enhance-WDIEkP h4",".SPZz6b h2",".CtCigf",".VLkRKc",".EbH0bb",".Wr0c6d",".jleFbf","#searchform",".yg51vc",".CbAZb"],extraBlockSelectors:[".MUFPAc"],"additionalExcludeSelectors.add":["[jscontroller='UsftYd']"],globalStyles:{".V82bz":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px",".pe7FNb":"-webkit-line-clamp: unset;",".promotion-3PDMAb":"display: none;",".uAKcGb":"-webkit-line-clamp: unset;max-height: unset;margin-bottom:30px","div[data-content-feature='1'] > div":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:2']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:3']":"-webkit-line-clamp: unset;max-height: unset;","div[style='-webkit-line-clamp:4']":"-webkit-line-clamp: unset;max-height: unset;",".Pw4Ldf.RsCEN":"height:unset;",".related-question-pair":"overflow:auto;"},ignoreZhCNandZhTW:!0,isTranslateTitle:!1,searchEnhancementConfig:[{id:"google",urlMatch:"https://www\\.google\\..+/search",style:{source:"font-size:12px; margin-bottom: 6px;",enTitle:"margin-top:6px;font-size:14px;",searchTitle:"margin-top:6px;position:relative;padding-right:24px;",more:"color:#1a0dab;margin-top:8px;",enTitleClassName:"immersive-translate-search-enhancement-en-title"},keyword:{value:"[0]$1",matches:[{source:"url",matchRegex:"q=(.+?)&"}]},showCount:5}]},{id:"lowendtalk",matches:"lowendtalk.com",selectors:["[role=heading]","h1",".userContent"]},{id:"linkedinJobs",matches:"www.linkedin.com/jobs/*",selectors:["#job-details > span",".decorated-job-posting__details"]},{id:"linkedinFeed",matches:"https://linkedin.com/feed/*",selectors:["h1",".feed-shared-update-v2__description-wrapper"]},{id:"indiehackers",matches:"www.indiehackers.com",selectors:[".content","h1","h3.story__title",".feed-item__title-link",".article-body",".interview-body"]},{id:"libreddit",matches:"libreddit.de",selectors:["h2.post_title",".comment_body > .md"]},{id:"notionSite",matches:["notion.site","*.notion.site"],normalizeBody:"body",selectors:["div[data-block-id]"]},{id:"notion_so",matches:["www.notion.so"],injectedCss:["[aria-label='Templates'] font br {display:none;}"]},{id:"newyorker",matches:"www.newyorker.com",additionalSelectors:["h1","[data-testid=SummaryItemHed]"],excludeSelectors:["[data-testid=PersistentTop]","[data-testid=StackedNavigationHeader]"],urlChangeDelay:2e3},{id:"startme",matches:"start.me",selectors:[".rss-article__title",".rss-articles-list__article-link",".rss-showcase__title",".rss-showcase__text"]},{id:"scmp",matches:"www.scmp.com",additionalSelectors:[".info__subHeadline",".section-content h2"],globalStyles:{".topic__article-list":"height: unset;",".adverisers__adveriser":"height: unset;",".advertiser__content":"height: unset;",".content-title__link":"display:unset;overflow:unset;-webkit-line-clamp:unset;",".title__text":"max-height:unset; -webkit-line-clamp:unset;",".news-list-item__news-title":"max-height:unset; -webkit-line-clamp:unset;","a[class*='link'] > .link__headline":"max-height:unset; -webkit-line-clamp:unset;"},"bodyRule.add":{bodySelector:"[data-qa='ArticleList-Item']",articleSelector:"[data-qa='GenericArticle-Content']",xpathRule:["datatype:p"]}},{id:"lesswrong",matches:"www.lesswrong.com",extraBlockSelectors:["span.commentOnSelection"]},{id:"mastodon",matches:["mastodon.social","mastodon.online","kolektiva.social","indieweb.social","mastodon.world","infosec.exchange"],isTranslateTitle:!1,selectorMatches:["div#mastodon"],selectors:["div.status__content__text",".about__section__body",".content",".form-container",".account__header__extra"],globalAttributes:{"[class='notranslate app-holder']":{class:"app-holder"}},detectLanguage:!0},{id:"cnbc",matches:"www.cnbc.com",urlChangeDelay:1e3,globalStyles:{"div.Card-titleContainer > div":"-webkit-line-clamp: unset;max-height: unset;"},"excludeSelectors.add":["#GlobalNavigation","#GlobalFooter",".LiveBlogHeader-timestampAndShareBarContainer",".LiveBlogHeader-liveUpdatesPill"]},{id:"dailyDev",matches:"app.daily.dev",selectors:["h1",".typo-body","article h3","[class^=markdown_markdown]"],globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset"}},{id:"pornhub",matches:["*.pornhub.com","pornhub.com"],excludeMatches:["*.pornhub.com/insights/*","pornhub.com/insights/*"],extraBlockSelectors:[".trendingNow",".searchItem",".tagcloud > a"],detectParagraphLanguage:!0,wrapperPrefix:"
",wrapperSuffix:` `,globalStyles:{"span.title":"height:unset; max-height:unset;",".detailedInfo":"max-height:unset;",".pcVideoListItem":"max-height:unset;",".wrap":"height:unset;",".entry-header":"height:unset;",".entry-title > a":"height:unset;-webkit-line-clamp:unset;"}},{id:"yourporn",matches:"https://www.youporn.com/*",extraBlockSelectors:[".button"],globalStyles:{".video-box":"max-height:unset;",".video-box-title":"white-space:unset;"}},{id:"modelhub",matches:"https://www.modelhub.com/*",globalStyles:{".videoTitle":"height:unset;",a:"height:unset;"}},{id:"xvideos",matches:"https://www.xvideos.com/*",globalStyles:{".title":"-webkit-line-clamp:unset;max-height:unset;",".mozaique":"display:flex; flex-wrap:wrap;"},excludeSelectors:[".video-hd-mark"]},{id:"missav",matches:"https://missav.com/*",globalStyles:{".truncate":"white-space:unset;",".overflow-y-hidden":"max-height:unset;overflow-y:unset;"},"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:".+/([a-z0-9-]+)$"},videoSelector:".plyr__video-wrapper video",attachRule:{appendSelector:".plyr--video",injectedGlobalCSS:""},quickButtonRule:{appendSelector:".plyr__controls",insertBeforeSelector:'[data-plyr="captions"]'}}},{id:"javbus",matches:"https://www.javbus.com/*",globalStyles:{".photo-info":"height:unset;"},excludeSelectors:[".item-tag","date"]},{id:"spankbang",matches:"https://spankbang.com/*",globalStyles:{".video-item > a":"white-space:unset;"},excludeSelectors:[".stats",".thumb"],extraBlockSelectors:[".searches > a",".tag > a",".extra > a",".positions > li"]},{id:"javdb",matches:"https://javdb*.com/*",globalStyles:{".video-title":"white-space:unset;"},excludeSelectors:[".video-number",".score",".has-addons"]},{id:"jable",matches:"https://jable.tv/*",globalStyles:{".title":"white-space:unset;max-height:unset;",".img-box > a":"position:relative;"}},{id:"netflav.player",matches:["https://netflavns1.com","https://embedrise.com"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"av",avSerial:{type:"url",regexStr:"code=([a-z0-9-]+)"},videoSelector:"#vplayer video",attachRule:{appendSelector:"#vplayer"},quickButtonRule:{appendSelector:"#vplayer .jw-button-container",insertBeforeSelector:"#vplayer .jw-button-container .jw-icon-cc"}}},{id:"netflav",matches:["https://netflav*.com/*"],globalStyles:{".grid_title":"max-height:unset;"},extraBlockSelectors:[".genre_filter_item","button"],"subtitleRule.add":{type:"av",avSerial:{type:"selector",selector:".videodetail_2_field_values",serialAttachIframe:"#iframe-block"}}},{id:"czechvideo",matches:"https://czechvideo.co/*",globalStyles:{".short-story":"height:unset;",".short-title":"height:unset;"},globalAttributes:{header:{translate:"unset;"}}},{id:"weibo",matches:["weibo.com","*.weibo.*"],selectors:["div[class^='detail_wbtext']",".weibo-text"],"stayOriginalSelectors.add":[".expand"]},{id:"medium",matches:["medium.com","*.medium.com"],selectorMatches:["meta[property='al:ios:url'][content^='medium://']"],urlChangeDelay:20,"additionalExcludeSelectors.remove":["i.fa","i[class^=fa-]",".navmenu-container",".google-symbols"],selectors:["h1","h2","h3","article section","[aria-hidden='false'] pre","article p",".postMetaInline","a .u-fontSize24"],excludeSelectors:["[aria-label='Post Preview Reading Time']",".al.b.bl.ag.bp",".al.b.bl.ag.ai",".hx.hy.hz.ia.ib.ab",".qb.ab",".ai.bn.n.mj",".speechify-ignore"],globalStyles:{"h2,h3":"-webkit-line-clamp: unset;max-height:unset;","article p":"-webkit-line-clamp: unset;max-height:unset;"},injectedCss:[".u-lineClamp4,.u-lineClamp3,.u-lineClamp2 {-webkit-line-clamp:unset!important;max-height:unset!important;}"]},{id:"nitter",selectorMatches:["meta[property='og:site_name'][content='Nitter']"],selectors:[".tweet-content",".quote-text"]},{id:"economist",matches:"www.economist.com",extraInlineSelectors:["span[data-caps='initial']"],excludeSelectors:["footer.ds-footer"],injectedCss:["a::before {position:relative!important;}"]},{id:"healthline",matches:"www.healthline.com",excludeSelectors:[".icon-hl-trusted-source-after"]},{id:"ebay",matches:"www.ebay.com",excludeSelectors:["headers","[itemprop=offers]",".dne-itemtile-original-price"],paragraphMinTextCount:4,paragraphMinWordCount:2,globalStyles:{"[itemprop=name]":"-webkit-line-clamp: unset;max-height: unset;",".merch-item-title":"-webkit-line-clamp: unset;max-height: unset;"}},{id:"skinstore",matches:"www.skinstore.com",excludeSelectors:[".responsiveFlyoutMenu_levelOneLink"],paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"tripadvisor",matches:"www.tripadvisor.com",paragraphMinTextCount:4,paragraphMinWordCount:2},{id:"primevideo",matches:["www.primevideo.com","https://*.amazon.co.*/*video*","https://*.amazon.com/*video*"],"excludeSelectors.add":["#dv-web-player"],"mutationExcludeSelectors.add":["#dv-web-player *"],"subtitleRule.add":{type:"ebutt",hookType:"xhr",subtitleUrlRegExp:"\\.ttml2$",loadingContainerSelector:"#dv-web-player"}},{id:"amazon",matches:"www.amazon.com",paragraphMinTextCount:4,paragraphMinWordCount:2,extraBlockSelectors:[".a-size-small.a-link-normal.page-banner-link.a-nowrap"],globalStyles:{".a-carousel-viewport":"height:unset;","[class*='clamp']":"max-height: unset;-webkit-line-clamp: unset;","[data-rows]":"max-height: unset;-webkit-line-clamp: unset;","[data-a-expander-name='review_text_read_more']":" max-height: unset;"},excludeSelectors:["#navFooter","#navbar-main",".s-price-instructions-style","[class*='-star ']","[data-hook='acr-average-stars-rating-text']",".a-color-price"]},{id:"visualstudioMarketplace",matches:"marketplace.visualstudio.com",additionalExcludeSelectors:[".core-info-second-row",".core-info-third-row",".meta-data-list",".item-title",".breadcrumb",".itemDetails-right",".ux-user-name",".ux-updated-date",".ux-item-second-row-wrapper",".stats-and-offer",".header-container"],atomicBlockSelectors:[".core-info-cell > div.name"],globalStyles:{".item-details-control-root.ux-item-shortdesc":"height: unset; overflow: visible; max-height:unset;"}},{id:"bloomberg",matches:"www.bloomberg.com",urlChangeDelay:2e3,excludeSelectors:[".ticker-bar","nav","[aria-label=Banner]","aside","[data-component=ticker-bar]","footer.bb-global-footer",".vjs-text-track-display"],"bodyRule.add":{bodySelector:"main article",articleSelector:".body-content"},"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"webvtt$",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"baiduXueshu",matches:"xueshu.baidu.com",globalStyles:{".abstract_wr":"height: unset; overflow: visible; max-height:unset;"}},{id:"sciencedirect",matches:"www.sciencedirect.com",urlChangeDelay:2e3,stayOriginalSelectors:["span.display","span.math"],extraBlockSelectors:["span.captions","span[id^=cap]"],globalAttributes:{"#abspara0010 br":{style:"display:none;"}}},{id:"thehighestofthemountains",matches:"www.thehighestofthemountains.com",extraBlockSelectors:"div"},{id:"telegraph1",matches:"te.legra.ph",normalizeBody:"div.ql-editor[contenteditable='false']",urlChangeDelay:500},{id:"telegraph2",matches:["telegra.ph"],normalizeBody:"div.ql-editor[contenteditable='false']",wrapperPrefix:` `},{id:"annasArchive",matches:["*.annas-archive.org","annas-archive.org"],selectors:[],globalStyles:{"div[id^='link-index-']":"height: unset; max-height: unset;","main div[class*='h-[125]']":"height:auto"},normalizeBody:"body",extraBlockSelectors:["a.custom-a"]},{id:"explainshell",matches:["explainshell.com"],selectors:["[class='help-box']"]},{id:"apnews",matches:["apnews.com"],urlChangeDelay:2e3},{id:"googlePlay",matches:"play.google.com",excludeSelectors:[".vlGucd",".ubGTjb"],globalStyles:{".Epkrse":"-webkit-line-clamp:unset;"}},{id:"tumblr",matches:["www.tumblr.com"],selectors:["article h1","article > header + div","[data-testid=notes-root] p","div.k31gt","p","article ul","article h2","article h3","article h4","article h5","article h6","article blockquote","article ol"],excludeSelectors:["div.fAAi8","div.wvu3V"],preWhitespaceDetectedTags:["DIV","SPAN","P"]},{id:"tinytask",matches:"https://www.tinytask.net",globalStyles:{"table > tbody > tr > td > center > table > tbody > tr > td > ul > li":"height: 100%"}},{id:"foxnews",matches:"www.foxnews.com",shadowRootSelectors:["[data-spot-im-module-default-area='conversation'] > div"],"excludeTags.add":["TEXT","IMG","SUB","SUP","CODE","TT","ASIDE"],excludeSelectors:[".site-footer",".components-MessageDetails-index__message-details-wrapper","div[class^=SlideDown__container]",".components-MessageActions-index__messageActionsWrapper","span[data-openweb-allow-amp]","div.spcv_typing-users"]},{id:"afreecatv",matches:"www.afreecatv.com",globalStyles:{"a.title":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"opennet",matches:"opennet.ru","excludeTags.add":["LABEL","IMG","SUB","SUP","CODE","TT"],"excludeTags.remove":["LINK","G","MATH","TTS-SENTENCE","AIO-CODE"]},{id:"construct",matches:["www.construct.net"],excludeMatches:["preview.construct.net","editor.construct.net"],additionalSelectors:["aside","div.manualContent"],atomicBlockSelectors:[],stayOriginalSelectors:["a.usernameReference"],additionalInlineSelectors:["a.forumLink"],additionalExcludeSelectors:["div.topNav","div.usernameLink","ul.authorDetails","ul.tagViewer","ul.breadCrumbNav","ul.subForumForums","ul.postTools","li.comment ul.controls","div.forumTopNavWrap","div.downloadWrap","div.articleLeftMenu","div.usernameTextWrap","div.favouriteWrap","div.bannerWrapper","div.viewAddonRightMenu","div.extendedMenu.addonsSubMenu","#BottomLinks.bottomLinks","div#LeftSide.leftSide","div#BottomWrap.bottomWrap","div.courseListWrap div.overview","div.conversationControls","div.contentWrapper h1","div.conversationControls","td.location a#LocationLink","#TopLevelComments .topBar","#TopLevelComments .controls",".tagViewWrap",".changeCount",".otherStats",".FilterMenu",".mobileTopicStats",".forumControlsWrapper",".forumsBottomNavWrap",".breadCrumbNav",".favouriteWrap",".usernameLink",".followWrapper",".blogPostStats",".manualContent dl dt"],globalStyles:{"td.location a#LocationLink":"padding-top: 4px;","div.articleMain .tutCourseWrap":"align-items: flex-start;"}},{id:"getpocket",matches:"getpocket.com",selectors:["h2","div.excerpt p","article","h1"],globalStyles:{"h2.title":"max-height:unset;-webkit-line-clamp:unset;","div.excerpt p":"max-height:unset;-webkit-line-clamp:unset;"}},{id:"fandom",matches:"*.fandom.com",urlChangeDelay:800,normalizeBody:"#mw-content-text",globalStyles:{"#mw-content-text > div > div:nth-child(1)":"height:100%;"},additionalExcludeSelectors:["header.fandom-community-header","div.ph-registration-buttons"]},{id:"huggingface",matches:"huggingface.co",globalStyles:{".line-clamp-2":"-webkit-line-clamp:unset;max-height:unset;"}},{id:"statista",matches:"www.statista.com",globalStyles:{".itemContent__text":"height:unset;max-height:unset;",".itemContent__subline":"height:unset;max-height:unset;"}},{id:"epubReader",matches:"epub-reader.online",globalStyles:{"span.slide-contents-item-label":"overflow:visible;max-height:unset;white-space:normal;"},atomicBlockSelectors:["div.slide-contents-item"]},{id:"you",matches:"https://you.com/search",globalStyles:{h3:"max-height:unset;-webkit-line-clamp:unset;",".caKYaC":"max-height:unset;-webkit-line-clamp:unset;",".dDwDsu":"max-height:unset;-webkit-line-clamp:unset;"},excludeSelectors:["div.hpIWZO"]},{id:"auth0Openai",matches:"auth0.openai.com",excludeSelectors:["form","header > h1"]},{id:"chatOpenai",matches:"chat.openai.com",excludeSelectors:["div.absolute.bottom-0.left-0.w-full","h1","div#headlessui-portal-root","nav","ul[aria-multiselectable]",".markdown *","div[class='flex flex-col items-start']","div[class='flex items-center justify-center gap-1 border-b border-black/10 bg-gray-50 p-3 text-gray-500 dark:border-gray-900/50 dark:bg-gray-700 dark:text-gray-300']"],"excludeTags.remove":["BUTTON"],isTranslateTitle:!1,wrapperPrefix:"",globalStyles:{"[class*='line-clamp']":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},aiRule:{streamingSelector:".result-streaming.markdown",messageWrapperSelector:".markdown",streamingChange:!0,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"poe",matches:["https://poe.com/*"],excludeSelectors:[".Markdown_markdownContainer__Tz3HQ *",".MarkdownLink_linkifiedLink__KxC9G","menu","aside"],aiRule:{streamingSelector:".ChatStopMessageButton_stopButton__LWNj6",messageWrapperSelector:".Markdown_markdownContainer__Tz3HQ",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"glasp",matches:"glasp.co",excludeSelectors:[".home_overview_list_content_wrapper"]},{id:"developerChrome",matches:"developer.chrome.com",excludeSelectors:["web-tabs","ul.code-sections--summary"]},{id:"android",matches:["developer.android.google.cn","developer.android.com"],observeUrlChange:!0,additionalSelectors:["aside","google-codelab-step"]},{id:"ft",matches:"www.ft.com",excludeSelectors:["header","[aria-labelledby=cookie-banner-aria-label]","footer","[aria-label='Primary navigation']"]},{id:"microsoft",matches:"https://apps.microsoft.com/store/detail/*",additionalSelectors:["pre"],globalStyles:{".line-clamp":"-webkit-line-clamp:unset;max-height:unset;"},isTransformPreTagNewLine:!0},{id:"gitlab",matches:"gitlab.com",excludeSelectors:[".tree-content-holder","nav",".home-panel-metadata","div[data-testid=project_topic_list]",".commit"]},{id:"tiktok",matches:"https://www.tiktok.com/*/video/*",selectors:["[data-e2e^=comment-level]","[data-e2e=browse-video-desc] > span"]},{id:"rfcEditor",matches:["www.rfc-editor.org","docs.haproxy.org"],isTransformPreTagNewLine:!0,"excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK","G","PRE","TTS-SENTENCE","AIO-CODE"]},{id:"steamcommunity",matches:"steamcommunity.com",globalStyles:{".forum_topic,.rightbox_list_option":"height:auto;",".forum_topic_name":"white-space:normal;line-height: 1.25rem; padding: 6px 20px 0 0;",".forum_topic_op":"clear: left; padding: 0 0 6px 2rem;"},excludeSelectors:[".forum_paging",".forum_topic_reply_count",".forum_topic_lastpost",".forum_topic_award_count",".discussion_search_pagingcontrols"]},{id:"steampoweredApp",matches:"store.steampowered.com/app/*",selectors:[".game_description_snippet",".game_area_description","#earlyAccessHeader","[id^='ReviewContent'] .content",".ModalOverlayContent"],excludeSelectors:["#global_actions","#store_controls","#foryou_tab","[class*=persona]","[class*=game_title_area]","a.btn_medium",".persona_name",".hours.ellipsis",".checkcol",".postedDate",".dev_row .summary",".already_in_library",".game_header_image_ctn .grid_content",".ds_flag.ds_wishlist_flag",".early_access_review.tooltip",".communitylink_achievement_images",".user_reviews_summary_row.summary",".review_award_ctn",".add_to_wishlist_area",".next_in_queue_content",".glance_tags.popular_tags",".game_purchase_action",".vote_button_ctn","#VoteUpDownBtnCtn","#footer","#ViewAllReviewssummary"],atomicBlockSelectors:[".game_area_sys_req_leftCol",".game_area_sys_req_rightCol"],extraInlineSelectors:[".pulldown"],additionalSelectors:[".game_page_autocollapse_ctn iframe"],globalStyles:{".game_description_snippet":"max-height:unset; overflow: scroll;",".game_purchase_area_friends_want":"height: auto; padding-bottom: 6px;",".div.early_access_banner":"height: 84px",".franchise_notice > *":"height: 84px"},detectParagraphLanguage:!0},{id:"steampowered",matches:"store.steampowered.com",detectParagraphLanguage:!0},{id:"nature",matches:"https://www.nature.com/articles/*",excludeSelectors:[".c-header",".c-recommendations-header",".c-recommendations-list-container",".c-article-references__links",".c-article-identifiers",".c-article-author-list",".c-article-metrics-bar__wrapper",".c-article__pill-button","#author-information-content","#article-info-section"]},{id:"webofscience",matches:"https://www.webofscience.com/*",globalStyles:{".abstract":"height:auto !important;",".show-more-lines":"height:unset !important;"},excludeSelectors:[".summary-left-panel",".authors","app-full-record-keywords mark"],mutationObserverContainerSelectors:["[data-ta='summary-record-title-link']","#FullRTa-fullRecordtitle-0"],extraBlockSelectors:["app-summary-authors + div","app-full-record-keywords span span"],observeUrlChange:!0,urlChangeDelay:600,mutationChangeDelay:600},{id:"appleinsider",matches:["appleinsider.com"],excludeSelectors:["#topic-nav"]},{id:"jetbrains",matches:"https://www.jetbrains.com/help/*",extraBlockSelectors:["[data-test=prompt]"]},{id:"crates",matches:["https://crates.io/search*"],selectors:["div[class^=_description-box] div[class^=_description]"]},{id:"theverge",matches:"www.theverge.com",shadowRootSelectors:["div#coral_thread > div"]},{id:"simp",matches:"https://beta.simp.red/trans*",mainFrameSelector:".simpread-read-root"},{id:"lookintobitcoin",matches:"https://www.lookintobitcoin.com/charts/*",excludeSelectors:["svg"]},{id:"openaiAccount",matches:"https://platform.openai.com/account/api-keys*",urlChangeDelay:1500},{id:"openaiDocs",matches:"https://platform.openai.com/docs*","excludeSelectors.add":[".pheader"]},{id:"pkgStd",matches:"https://pkg.go.dev/std",selectors:["td.UnitDirectories-desktopSynopsis"]},{id:"pkg",matches:"https://pkg.go.dev/*",selectors:["div.UnitDetails p"]},{id:"explainpaper",matches:["https://www.explainpaper.com/reader*"],isTranslateTitle:!1,selectors:[".leading-relaxed",".chat-messages p",".text-sm"]},{id:"colab",matches:"https://colab.research.google.com/*",excludeSelectors:["code","view-line"]},{id:"gatesnotes",matches:"www.gatesnotes.com",minZIndex:-1},{id:"kakao",matches:"page.kakao.com",shadowRootSelectors:["div[style^='visibility: visible'"]},{id:"coinmarketcap",matches:"coinmarketcap.com",extraBlockSelectors:["div[class='sc-3502f6cd-0 JxHqg']"]},{id:"wandb",matches:"wandb.ai",additionalSelectors:[".report-page-top"],additionalStayOriginalSelectors:["span[data-slate-inline=true]"],extraInlineSelectors:[]},{id:"paulgraham",matches:"paulgraham.com",additionalSelectors:["font[face=verdana]"],extraBlockSelectors:"font[face=verdana]"},{id:"zendesk",matches:"https://*.zendesk.com/agent/*",selectors:["[data-test-id*=subject]",".zd-comment",".title"]},{id:"migadu",matches:"webmail.migadu.com",selectors:[".bodyText"]},{id:"thehackernews",matches:"thehackernews.com",excludeSelectors:["span#blog-pager-older-link","span.h-datetime"],additionalSelectors:[".pop-title"]},{id:"brown",matches:"cs.brown.edu",excludeSelectors:[".SCodeFlow"]},{id:"tass",matches:"tass.ru",globalStyles:{"#__next":"font-size: 19px;line-height:28px;"}},{id:"chatGoogle",matches:"chat.google.com",selectors:["[jsname=bgckF]"]},{id:"fiverr",matches:"https://www.fiverr.com/inbox/*",selectors:[".message-body"]},{id:"fiverr-main",matches:"*.fiverr.com",globalStyles:{"h3 > a":"-webkit-line-clamp:unset;overflow:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",h5:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;",".YLycza2.u9KHmsf":"height:unset;max-height:unset;",".lt2ar2q.EhHcMiw":"height:unset; max-height: unset;"},excludeSelectors:[".popular"]},{id:"jira",matches:["jira.*.com/browse/*","jira.*.com/projects/*"],selectors:["[id=descriptionmodule]","[id=summary-val]","div.action-body","td.stsummary"]},{id:"ahaIo",matches:["*.aha.io"],selectors:["[tabindex='0']","div.user-content","div.comments__body","span.name"]},{id:"thehill",matches:"thehill.com",injectedCss:[".most-popular-item { max-height: unset !important; }",".most-popular-item__link { -webkit-line-clamp: unset !important; }"],excludeSelectors:["div.featured-cards__byline","div.list-item__meta",".tags__item","div.extended-scroll__header",".submitted-by",".site-header--has-alert-banner",".homepage__container__opinion__item__byline",".homepage__container__header",".archive__item__meta"]},{id:"ubuntu",matches:"manpages.ubuntu.com",selectors:["pre"],atomicBlockTags:["pre"]},{id:"spiedigitallibrary",matches:"www.spiedigitallibrary.org","excludeTags.add":["IMG","SUB","SUP","CODE","TT","ASIDE","FOOTER"],"excludeTags.remove":["LINK"]},{id:"promptingguide",matches:"www.promptingguide.ai",selectors:["article","li"]},{id:"ground",matches:"ground.news",globalStyles:{".line-clamp-3":"-webkit-line-clamp: unset !important;"}},{id:"ietf",matches:"*.ietf.org/doc/html/*",additionalSelectors:["pre"],isTransformPreTagNewLine:!0,preWhitespaceDetectedTags:["DIV","SPAN","PRE"]},{id:"newsminimalist",matches:"https://www.newsminimalist.com/",extraBlockSelectors:[".inline-flex"],"excludeTags.remove":["BUTTON"]},{id:"yandexIndex",matches:"https://yandex.com/",selectors:[".tabs__item-text"]},{id:"yandexSearch",matches:"https://yandex.com/search/*",excludeSelectors:[".KeyValue-Row",".EntityFeedbackFooter",".Organic-Subtitle",".SerpFooter-Content",".serp-user",".Pager"],globalStyles:{".ExtendedText-Toggle":"white-space:normal;"}},{id:"yandex",matches:"https://yandex.com/video/*",selectors:[".serp-item__title",".serp-item__text",".Keypoints-ItemTitle",".bes-epmjnzm-idtktyj",".OrganicTitle-LinkText","h1.VideoTitle"],globalStyles:{".serp-item__title":"-webkit-line-clamp: unset;max-height:unset;",".serp-item__text":"-webkit-line-clamp: unset;max-height:unset;",".OrganicTitle-LinkText":"-webkit-line-clamp: unset;max-height:unset;","h1.VideoTitle":"-webkit-line-clamp: unset;max-height:unset;",".link .serp-item__keypoints":"bottom:2px;",".OrganicTitle":"max-height:unset;"}},{id:"perplexity",matches:"https://www.perplexity.ai",globalStyles:{".line-clamp-1":"-webkit-line-clamp: unset !important;",".line-clamp-2":"-webkit-line-clamp: unset !important;"},"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3},additionalStayOriginalSelectors:["a.citation"],selectors:[".prose",".my-md",".line-clamp-2",".line-clamp-1"]},{id:"allmyfaves",matches:"https://allmyfaves.com/",selectors:["p"],paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"man7",matches:"man7.org",isTransformPreTagNewLine:!0,globalStyles:{pre:"white-space: inherit;"}},{id:"kadaza",matches:"https://www.kadaza.com/",selectors:[".header span.title",".custom-content-footer"],containerMinTextCount:2,containerMinWordCount:1,paragraphMinTextCount:2,paragraphMinWordCount:1},{id:"urlChangeDelay",matches:["https://babelnovel.com/books/*","https://www.webnovel.com/book/*","https://platform.openai.com/docs/*","docs.oracle.com","docs-cortex.paloaltonetworks.com","forum.m5stack.com/topic/*","community.m5stack.com/topic/*"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u91CD\u590D\u7FFB\u8BD1\u95EE\u9898"},{id:"genuine",matches:"blog.genuine.com",excludeSelectors:["div.enlighter"]},{id:"chinadaily",matches:"www.chinadaily.com.cn",injectedCss:["a { height: unset !important; }","li { height: unset !important; }","div { height: unset !important; }",".immersive-translate-target-inner {color:black;}"],excludeSelectors:[".topNav",".topNav2_art > span",".topNav_art2 > .dropdown",".dibu-three",".topBar"]},{id:"braynzarsoft",matches:"www.braynzarsoft.net",selectors:["div#view-question-desc"]},{globalAttributes:{"#stimulus":{translate:"off",class:"stimulus"},"#stem":{translate:"off",class:"stem"}},id:"lawhub",matches:"https://lawhub.lsac.org/question/*"},{id:"yuque",matches:"https://www.yuque.com/*",excludeSelectors:[".lark-virtual-tree"]},{id:"bearblog",matches:"https://bearblog.dev/discover/*",excludeTags:["small"]},{id:"researchgate",matches:"www.researchgate.net",excludeSelectors:[".nova-legacy-v-publication-item__meta-data",".nova-legacy-v-publication-item__person-list",".js-authors-list"]},{id:"theatlantic",matches:["www.theatlantic.com","https://mashable.com/*"],"excludeSelectors.add":["footer:last-of-type","nav","header div.subtitle-2.w-full"],initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}}},{id:"youtrackJetbrains",matches:"youtrack.jetbrains.com/articles/*",selectors:["[role=presentation]","[data-test=article-content]"],excludeSelectors:[".toolbar__ee8"]},{id:"dw",matches:"www.dw.com",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},"nav:last-of-type":{translate:"no"},nav:{translate:"no"}},excludeSelectors:[".focus-menu-shown"]},{id:"sentry",matches:"docs.sentry.io",initialSelectorGlobalAttributes:{"footer:last-of-type":{translate:"no"},".navbar":{translate:"no"}},"extraInlineSelectors.add":[".term-wrapper","span.description"]},{id:"openai-blog",matches:"https://openai.com/blog/*","stayOriginalTags.remove":["CODE"]},{id:"urlComment",selectorMatches:["meta[name='generator'][content^='Discourse']"],urlChangeDelay:0,_comment:"\u89E3\u51B3url\u53D8\u5316\u4F46\u662F\u9875\u9762\u4E0D\u53D8\u7684\u95EE\u9898"},{id:"feedly",matches:"feedly.com",globalStyles:{".TitleOnlyLayout":"height:unset !important;",".EntrySummary--u4":"-webkit-line-clamp: unset;max-height:unset;",".EntrySummary--u5":"-webkit-line-clamp: unset;max-height:unset;"},excludeSelectors:[".Leftnav"]},{id:"bardGoogle",matches:"bard.google.com",excludeSelectors:["mat-sidenav","div.capabilities-disclaimer","#cdk-overlay-6","message-actions button",".mdc-button__label .ng-star-inserted",".mdc-list-item__primary-text"],isTranslateTitle:!1,"excludeTags.add":["mat-tooltip-component"],"excludeTags.remove":["BUTTON"]},{id:"whatsapp",matches:"web.whatsapp.com",selectors:[".copyable-text > span"],wrapperPrefix:` -`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};m();m();function ta(e){if(e.beta)return!1;if(We()&&e.spVersion)return Zs(kr(),e.spVersion);if(P1()&&e.gspVersion){let t=F1();if(t)return Zs(t,e.gspVersion)}if(Vg()&&e.ispVersion){let t=M1();if(t)return Zs(t,e.ispVersion)}return!1}function Zs(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,o=0,i=1;for(let s=0;s<3;s++)a+=i*Number(r[s]||"0"),o+=i*Number(n[s]||"0"),i*=100;return o>=a}function Xs(e){e.message?.indexOf("token invalid")>=0&>.remove(Tt)}m();function Xl(e){return Array.isArray(e)?e:e?[e]:[]}function Rn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function zt(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function e0(e,t){let n={...e};return U1(n,t),ES(n,t),n}function N1(e,t,n){let r={...t};return So({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,o)=>r[a]=o}),So({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,o)=>r[a]=o}),r}function ES(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;U1(e,a)}function So({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[o,i,s]=SS(a);if(!o||e[a]===void 0)return;let u=e[a];n(o)&&(u=Xl(e[a]));let l=t(o);if(l==null){r(o,u);return}let c;if(i=="add_v"){if(!I1(s))return;c=Kg(l,u)}else if(i=="remove_v"){if(!I1(s))return;c=O1(l,u)}else i==="add"?c=Kg(l,u):i=="remove"&&(c=O1(l,u));if(c){r(o,c);return}Array.isArray(e[o])&&o.startsWith("additional")?c=Kg(l,u):c=u,r(o,c)})}function U1(e,t){return So({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function Kg(e,t){let n;if(Array.isArray(e)){let r=Xl(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function SS(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function I1(e){let t=Zn();return e&&Zs(t,e)}function O1(e,t){if(Array.isArray(e)){let n=Xl(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function wo(){if(Se.PROD==="1")return{};let e={};if(Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(Se.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=Se.DEEPL_PROXY_ENDPOINT),Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}Se.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=Se.IMMERSIVE_TRANSLATE_SERVICE);let t={};return Se.DEBUG==="1"&&(t.debug=!0,t.cache=!1),Se.MOCK==="1"&&(t.translationService="mock"),t}async function qt(){let e=await Q.storage.local.get(gi);if(e[gi]){let t=e[gi],n=t.tempTranslationUrlMatches||[],r=n.filter(i=>i.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let o={...t,tempTranslationUrlMatches:[...n]};return a&&await Wt(o),o}else return{}}async function Wt(e){await Q.storage.local.set({[gi]:e})}async function j1(e){await Q.storage.local.set({[Gr]:e})}async function wa(){await Q.storage.local.set({[Gr]:{}})}async function Da(){await Q.storage.local.set({[gi]:{}})}async function H1(){let e=await Q.storage.local.get(Gr),n={...await Gg(),...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Gr]){let r=e[Gr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),o=new Date(n.buildinConfigUpdatedAt);a>o&&(n=r)}}return n}async function pt(){let e=await Q.storage.local.get(Gr),t={...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Gr]){let k=e[Gr];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),F=new Date(t.buildinConfigUpdatedAt);_>F&&(t=k)}}let n=await kS(t);t.targetLanguage=n;let r=await gt.get(Tt,null),a={};if(!me()&&Q.commands&&Q.commands.getAll){let k=await Q.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let o=await Gg(),i=wo(),s=await pr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await qt(),c=new Date,g=Object.assign({},u,i,s);if(!g.interfaceLanguage){let k=await wS();g.interfaceLanguage=k}let p=g.interfaceLanguage==="en",f=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!p&&!f&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let C=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(C=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let S=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,S=!0);let A=(g?.translationLanguagePattern?.matches?.length||0)>0,P=await jt("installedAt",""),w=Number(await Xr("translage_page_daily",0)),v=Number(await jt(gr,0)),L;v>0&&(Date.now()-v0&&(Date.now()-w0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],F=Array.isArray(_)?_:[_],q=Array.from(new Set(F.concat(k.map(z=>z.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:q}}}let R=Object.assign(o,t);So({rule:t,valueIsArray:k=>Array.isArray(o[k]),getMergedValue:k=>o[k],onMergedResult:(k,_)=>{k!="generalRule"&&(R[k]=_)}});let M=Yt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let N={};g.translationServices&&g.translationServices.openai&&(N=g.translationServices.openai),!M&&O.authKey&&!O.provider?(R.translationServices.deepl||(R.translationServices.deepl={}),R.translationServices.deepl.provider="custom"):O&&O.provider||(R.translationServices.deepl||(R.translationServices.deepl={}),R.translationServices.deepl.provider="pro"),!M&&N.APIKEY&&!N.provider?(R.translationServices.openai||(R.translationServices.openai={}),R.translationServices.openai.provider="custom"):N&&N.provider||(R.translationServices.openai||(R.translationServices.openai={}),R.translationServices.openai.provider="pro");let H=Object.keys(R),B=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of H){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(R[_]=e0(o[_],g[_]));else if(_==="translationServices")AS(g,R);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&B.includes(_))g[_]&&(R[_]=Object.assign(R[_],g[_])),_==="shortcuts"&&(me()||We()?R[_]={...R[_],...a}:R[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let F=R.rules||[],q={};for(let V of F)V.id&&(q[V.id]=V);let z=g[_].map(V=>V.id&&q[V.id]?N1(t.generalRule,q[V.id],V):V);R[_]=[...z,...R[_]]}if(Se.PROD==="0"&&Se.DEV_RULES){let F=JSON.parse(Se.DEV_RULES);R[_]=[...F,...R[_]]}}else g[_]!==void 0&&(R[_]=g[_])}return R.donateUrl=t.donateUrl,R.minVersion=t.minVersion,R.feedbackUrl=t.feedbackUrl,R.rawUserConfig=s,R}async function pr(){return(await Q.storage.sync.get("userConfig")||{}).userConfig||{}}async function Do(e){await Q.storage.sync.set({userConfig:e})}async function eu(e,t){await Q.storage.local.set({[e]:t})}async function t0(e){return(await Q.storage.local.get(e))[e]||""}var wS=async()=>{let e=["zh-CN"];try{e=await Q.i18n.getAcceptLanguages()}catch(r){I.warn("get browser language error:",r)}let n=e.map(r=>Te(r)).find(r=>tn[r]);return n||"en"},Gg=async()=>{let e={...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};return{...e,targetLanguage:Dr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function DS(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function kS(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Dr;let n=await jt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),So({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),So({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let i=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>i.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var LS=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function In(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function ka(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:o,atomicBlockSelectors:i}=t;if(In(e,o))return!1;if(In(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!In(e,i)),c;function g(){return n&&n.display?!!LS.includes(n.display):In(e,r)}}var un=In;function ko(e){return!!e.shadowRoot}function Aa(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function tu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Lr(e,t=!1){let n=zs;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ao(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Lr(n,t)}function Ci(e,t){return Sa(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Yg(e){let{rule:t}=e,n=_S(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _S(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function nu(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),yt(r,k2,t.toString());let a=Yg(e);return r.append(tt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Ti(e,t){return e.querySelector(`[${Dg}='${t}']`)}function z1(){document.querySelectorAll(`[${Dg}]`).forEach(t=>{t.remove()})}function q1(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function W1(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{xi(n)&&t.push(n)}),t}function Jg(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:o,delimiters:i,excludeRegexps:s,targetLanguage:u}=e,l=o,c=1001;try{if(r&&r.length>0){let g={},p=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),f=new RegExp(a.replace("{word}",p.map(h=>h.k).join("|")),"g");l=l.replace(f,(h,y)=>{let C=c++;return t[`${C}`]=g[y]||y,i.length>2?h.replace(y,`<${i[2]}${C}>`):h.replace(y,`${i[0]}${C}${i[1]}`)})}s&&s.length>0&&s.forEach(g=>{let p=new RegExp(g,"gi");l=l.replace(p,(f,h)=>{let y=c++;return t[`${y}`]=p1(h),i.length>2?f.replace(h,`<${i[2]}${y}>`):f.replace(h,`${i[0]}${y}${i[1]}`)})})}catch(g){I.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function ru(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:o}=e,i=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];i=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=o.trim();return s=s.replace(i,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(o)||s.includes("")||s.includes("< styles>")||t9(s)||Q1(s)||e9(s)||Z1(s)||X1(s)||PS(s)||i.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:r0(o,n,r)}function na(e){return e.nodeType===Node.ELEMENT_NODE}function $1(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function V1(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),o=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${o}:${i}:${s}`}async function Qg(){return await jt("fakeUserId","")}async function MS(){return await jt("installedAt","")}async function K1(e){let n=Pe().INSTALL_FROM,r=Zn(),a=await MS(),o=await Qg(),i=await pt(),s=!1,u=await gt.get(Tt,null),l=!1;return u&&Yt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:i.interfaceLanguage,deviceId:o,isProUser:s,isTrial:l}}function G1(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,o=0,i=n;for(;i&&i!==r;)o++,i=i.parentNode;let s=o+"";for(let u=0;u{!e||!t||(async()=>{let a=await Zg(e,t);r(a)})()},[e,t,r]),n}async function Zg(e,t){if(!e||!t)return;let n=!1,r,a=!0;!We()&&me()||ot().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let o=await jt("installedAt","");new Date(o).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),o=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":o?"dual":a?"translation":r?"dual":null}var a0=!1,FS=me();function n9(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let o of a)n.push(o)}return n}function BS(e,t){let n=function(o){return o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE?o.nodeType===Node.ELEMENT_NODE&&r9(o,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let o=r.currentNode;if(o.nodeType===Node.ELEMENT_NODE){if(La(o,Rl)){if(a===!0)return!0;continue}if(ou(o.nodeName,t.inlineTags))return!0;if(!Xg(o,t))return!1}}return!0}function em(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(ou(e.nodeName,n)||Xg(e,t)){if(La(e,_2)||ou(e.nodeName,["BR"]))return!1;if(La(e,Rl))return!0;if(Xg(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return BS(e,t)}else return La(e,Rl);return!1}function r9(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&La(e,L2,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&La(e,T2))return!1;let{stayOriginalTags:r,excludeTags:a}=t,o=[];return n&&a&&a.length>0?o=a||[]:o=a.filter(i=>!r.includes(i)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||ou(e.nodeName,o))}function r0(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(i=>i.trim()!=="").length>=n||!o9(r)&&r.length>=n}function a9(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(o9(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function o9(e){for(let t=0;t127)return!1;return!0}function Q1(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function Z1(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function X1(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function e9(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function t9(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function La(e,t,n=!1){return tm(e,t,"1",n)}function tm(e,t,n,r=!1){return a0&&!r?e[Fn]?!!(e[Fn]&&e[Fn][t]===n):!1:e.dataset[t]===n}function Ei(e){return(e.innerText||e.textContent||"").trim()}function nm(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function o0(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function yt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(a0&&!r?(e[Fn]||(e[Fn]={}),e[Fn][t]||(e[Fn][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function i0(e,t,n=!1){if(a0&&!n){if(!e[Fn]||!e[Fn][t])return;delete e[Fn][t]}else delete e.dataset[t]}function Si(e,t,n=!1){return a0&&!n?!e[Fn]||!e[Fn][t]?void 0:e[Fn][t]:e.dataset[t]}function Xg(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!ou(e.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!at())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function zn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){I.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else I.warn("injectCSS failed, rootDocument does not have head node",e)}function xi(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(FS){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function ou(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function i9(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function s9(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let o=r.document.createRange(),i=a.offsetNode;if(!i||i.nodeType!==Node.TEXT_NODE||r9(i,n,!0))return null;try{o.setStart(i,a.offset),o.setEnd(i,a.offset)}catch(s){return I.warn("getRangeFromPoint error",s),null}return o}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function u9(e,t,n){let r=0,a=(o,i,s,u)=>{if(++r>100||u===o)return o;let l=o.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return o;let c=l.elementFromPoint(i,s);return c?a(c,i,s,o):o};return a(e,t,n)}m();function Lo(e,t,n,r,a){let o=t,i=qs[o]||[],s="";e&&i&&i.length>0&&i.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let p=n[g];if(["borderRadius"].includes(g)&&(p+="px"),s+=`--immersive-translate-theme-${o}-${g}: ${p}; +`,wrapperSuffix:"
"},{id:"bing",matches:"https://*.bing.com/search*",extraInlineSelectors:["a","i"],globalStyles:{"[class*='lineclamp'],.b_title":"-webkit-line-clamp:unset;"}},{id:"yahoo",matches:"*.yahoo.*",excludeSelectors:["._ys_jiqava","#ybar-inner-wrap","#Col2-5-Rmp-Proxy"],extraBlockSelectors:[".SIPGg",".sc-kzMCTH.pSZXj"],globalStyles:{"#atomic .Mt\\(20px\\)":"margin-top: 100px;","[class*='LineClamp']":"-webkit-line-clamp:unset;max-height:unset;","a[class*='js-content-viewer']> div[class*='Td\\(n\\)']":"overflow: scroll;","[class*='_ys_24482e']":"-webkit-line-clamp:unset;","#Aside > :first-child":"overflow:scroll;"}},{id:"wsj",matches:"www.wsj.com",excludeSelectors:["header","footer","nav","[aria-label='Markets summary']"]},{id:"businessinsider",matches:"www.businessinsider.com",excludeSelectors:["header","nav","section.live-updates-module "]},{id:"goodreads",matches:"www.goodreads.com",excludeSelectors:[".badgeYear",".gr-mediaBox__desc",".bookVotedRow",".minirating","div[itemprop='aggregateRating']",".wtrButtonContainer",".RatingsHistogram__labelTitle",".FollowButton",".siteHeader__topLevelLink","#books > thead","td[class*='rating']","td[class*='shelves']","td[class*='date_read']","td[class*='date_added']","td[class*='actions']"]},{id:"feeder",matches:"https://feeder.co/*",globalStyles:{".item-summary":"-webkit-line-clamp:unset;"}},{id:"elektrotechnik",matches:"https://www.elektrotechnik.rwth-aachen.de/*",globalAttributes:{"[class='notranslate']":{class:""}}},{id:"nytimes",matches:"www.nytimes.com",excludeSelectors:["#app > div > div > header","#app > div > div > div > div > header","#in-story-masthead"],injectedCss:["a::after {position:relative!important;}"]},{id:"bugsKde",matches:"bugs.kde.org","excludeTags.remove":["svg","PRE"],additionalExcludeSelectors:[".bz_first_comment_head",".bz_comment_head",".related_actions"]},{id:"eastmoney",matches:"guba.eastmoney.com",searchEnhancementConfig:[{id:"eastmoney",urlMatch:"guba.eastmoney.com/news,us\\w+,\\w+.html",delayTime:0,selector:".moneyFlowContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"guba.eastmoney.com/news,us(\\w+?),\\S+.html"}]},showCount:8},{id:"eastmoney",urlMatch:"guba.eastmoney.com/list,us\\w+.*.html",delayTime:0,selector:".qualityContentContainer",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#294688",title:"font-size:14px;color:#294688;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin:0px 0 16px;",more:"color:#294688;margin-top:8px;"},keyword:{value:"[0]$1:[0]$2",matches:[{source:{type:"selector",attribute:"href"},matchRegex:"code=(\\w+)_(\\w+)",match:"a[href*='rank/stock?code=']"}]},showCount:8}]},{id:"xueqiu",matches:"xueqiu.com",searchEnhancementConfig:[{id:"xueqiu",urlMatch:"xueqiu.com/S/[a-zA-Z]+/?$",delayTime:0,selector:".container-side-sm.float-right.stock__side",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;padding:0;",source:"font-size:12px; margin-bottom: 0px;",keyword:"color:#06c",title:"font-size:14px;color:#06c;",enTitle:"margin-top:4px;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;font-weight: bold;",time:"margin:0px 0 16px;",more:"color:#06c;margin-top:8px;"},showCount:8,keyword:{value:"[0]$1",matches:[{source:{type:"selector",attribute:"text"},matchRegex:"\\((.+)\\)",match:".stock-name"}]}}]},{id:"laohu8",matches:"www.laohu8.com",searchEnhancementConfig:[{id:"laohu8",urlMatch:"www.laohu8.com/stock/[a-zA-Z]+/?$",delayTime:0,selector:".hot-stocks-root",selectorAction:"insertBefore",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 0px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 0px 0 16px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)"}]},showCount:8}]},{id:"futunn",matches:"www.futunn.com",searchEnhancementConfig:[{id:"futunn",urlMatch:"www.futunn.com/stock/\\w+-US",delayTime:0,selector:".right",selectorAction:"appendChild",style:{container:"background:white;border:none;border-radius: 4px;box-shadow: 0 2px 4px hsla(216,5%,62%,.14);",source:"font-size:12px; margin-bottom: 4px;",title:"font-size:14px;color: #007bff;",enTitle:"margin-top:4px;color: #4d5156;font-size:12px;",searchTitle:"margin:4px 0 16px;position:relative;padding-right:24px;font-size: 16px;",time:"margin: 4px 0 20px;"},keyword:{value:"[0]$1 stock",matches:[{source:"url",matchRegex:"stock/([a-zA-Z]+)-US"}]},showCount:8}]},{id:"bmvrMarseille",matches:"www.bmvr.marseille.fr",globalStyles:{"a > div":"display:block;","[style*='358px;']":"width: 33.3333%; height: auto; padding: 0px; position: relative; margin: 0px;"},globalAttributes:{"#app":{class:""}}},{id:"piAi",matches:"pi.ai/talk",globalStyles:{"[class*='text-brand-green']":"flex-direction:column;"}},{id:"claudeAi",matches:"claude.ai",excludeSelectors:[".contents *"],"excludeTags.remove":["PRE"],injectedCss:"[data-testid='chat-menu-trigger'] br {display:none;}",aiRule:{messageWrapperSelector:".contents",messageContainerSelector:".ReactMarkdown",messageStreamEndSelector:".contents > button",streamingChange:!0,streamingDeepChild:!1,streamingDelayTime:1e3}},{id:"feishu",matches:["*.feishu.cn","*.larkoffice.com","*.larksuite.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],mutationObserverLimitTargetSelectors:[".maindocbody","div[class*='render']","div[class*='block']"],"excludeSelectors.add":[".catalogue__list"]},{id:"gitbook",selectorMatches:[".gitbook-root"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"],"additionalExcludeSelectors.add":["[spellcheck='false']"]},{id:"mitre",matches:"cwe.mitre.org",globalStyles:{"span.list_entry":"height: unset;"}},{id:"kaggle",matches:"www.kaggle.com",excludeTags:["i","button"]},{id:"ieee",matches:"spectrum.ieee.org",extraBlockSelectors:["small"]},{id:"ieeexplore",matches:"ieeexplore.ieee.org",stayOriginalSelectors:["a[ref-type]",".inline-formula",".display-formula"]},{id:"cnn",matches:"*.cnn.com","excludeSelectors.add":[".ad-slot-header__wrapper","#pageFooter"],"bodyRule.add":{bodySelector:".layout__content-wrapper",articleSelector:".article__content-container"}},{id:"marginalrevolution",matches:"marginalrevolution.com",globalAttributes:{header:{translate:"unset;"}}},{id:"highfrequencyelectronics",matches:"www.highfrequencyelectronics.com",globalStyles:{"#main-content":"overflow:unset;"}},{id:"githubBlog",matches:"github.blog",globalStyles:{".font-mktg":"word-break:normal;"}},{id:"semanticscholar",matches:"www.semanticscholar.org",selectors:[".cl-paper-title",".cl-paper-abstract",".tldr-abstract-replacement",".text-truncator",".paper-detail-title"]},{id:"uni-trier",matches:"dblp.uni-trier.de",selectors:["h1","h2",".title",".external","dd p"],excludeSelectors:[".side-column"]},{id:"bilibili",matches:"www.bilibili.com","excludeSelectors.add":[".bpx-player-subtitle-panel-text"],"subtitleRule.add":{type:"bilibili",subtitleUrlRegExp:"aisubtitle.hdslb.com/bfs",loadingContainerSelector:".bpx-player-subtitle-panel"}},{id:"time",matches:"time.com",excludeSelectors:[".date-and-duration"],globalStyles:{".headline":"-webkit-line-clamp:unset;overflow:unset;height:unset;",h3:"-webkit-line-clamp:unset;overflow:unset;",p:"-webkit-line-clamp:unset;overflow:unset;"}},{id:"docs-swift",matches:"docs.swift.org",selectors:[".content","#menu"]},{id:"uzh",matches:"www.uzh.ch",injectedCss:[".TextImage--inner {overflow:auto !important;}"]},{id:"mail-yandex",matches:"mail.yandex.com",selectors:["article",".Text_color_primary",".mail-MessageSnippet-Item_subject"],globalStyles:{".mail-MessageSnippet":"height: unset; line-height:unset;",".immersive-translate-target-translation-block-wrapper":"margin:unset;"}},{id:"forums.zotero",matches:"forums.zotero.org",selectors:[".page-sidebar",".page-content"]},{id:"pubmed.ncbi.nlm.nih.gov",matches:"pubmed.ncbi.nlm.nih.gov",urlChangeDelay:0,excludeSelectors:[".docsum-journal-citation",".citation-part",".docsum-authors",".top-wrapper",".article-source",".citation-doi",".identifiers",".cite",".share",".arrow-link"],globalAttributes:{"#Scholarscope_HighlightContent":{class:""},"#Scholarscope_HighlightOrigin":{class:"Scholarscope_HighlightContents"}},mutationExcludeContainsSelectors:["#Scholarscope_HighlightContent highlight"],mutationExcludeSelectors:["#Scholarscope_HighlightContent","#Scholarscope_HighlightContent span"],injectedCss:["#Scholarscope_HighlightOrigin > p font,#Scholarscope_HighlightContent > p font {display: inline!important;}","#Scholarscope_HighlightOrigin > p font br,#Scholarscope_HighlightContent > p font br {display: none!important;}"]},{id:"chosun",matches:"www.chosun.com",injectedCss:"body {word-break: unset!important;}"},{id:"yna",matches:"*.yna*",injectedCss:["font > br {display:none}"],globalStyles:{"a,strong":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;","div,p,li,.item-box01,.news-con":"height:unset;max-height:unset;-webkit-line-clamp:unset;"},"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"cnet",matches:"www.cnet.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"dolmods",matches:"dolmods.net",globalStyles:{"[class*='max-h']":"max-height:unset!important;"}},{id:"digitimes",matches:"www.digitimes.com",globalStyles:{"a,.title,.abstract,.display-5,.top":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeSelectors.add":[".main-nav-frame",".sub-header-wrapper",".footer",".date"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"vdi-nachrichten",matches:"www.vdi-nachrichten.com","excludeSelectors.add":[".header-menu__item > a",".linkbar__item",".header__button-group"]},{id:"htdp",matches:"htdp.org",excludeTags:["blockquote"],stayOriginalSelectors:[".RktIn"]},{id:"newsletterss",matches:"newsletterss.com",initialGlobalAttributes:{iframe:{scrolling:"auto"}}},{id:"docusaurus",selectorMatches:["#__docusaurus"],"excludeSelectors.add":["aside",".DocSearch-Modal"]},{id:"mercari",matches:"*.mercari.com","excludeTags.remove":["PRE"]},{id:"qqMail",matches:"mail.qq.com",useIframePostMessage:!1},{id:"nikkei",matches:"www.nikkei.com",globalStyles:{"h3,div,span,p":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"}},{id:"pubs.rsc.org",matches:"pubs.rsc.org",excludeSelectors:[".eqn"]},{id:"indeed",matches:"*.indeed.com",globalStyles:{"span,.css-19rjr9w.e1wnkr790":"max-height:unset;-webkit-line-clamp:unset;height:unset;white-space:unset;"},"excludeTags.remove":["BUTTON"]},{id:"brutalist",matches:"brutalist.report",selectors:["li > a:first-child","aside","nav > a","h1 > a","h3 > a","h2 >a"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"maxroll",matches:["maxroll.gg"],extraInlineSelectors:[".d4t-sprite-icon",".d4t-icon"],injectedCss:["font {font-family: sans-serif !important;}"]},{id:"microsoftTeams",matches:["teams.live.com"],"stayOriginalSelectors.add":["span[title][style='min-width: 20px; height: 20px;']"]},{id:"gradioappdocs",matches:"www.gradio.app/docs/*",selectors:["div.obj"],excludeSelectors:["div#examples"]},{id:"arca",matches:"arca.live","excludeTags.remove":["PRE"]},{id:"chatpdf",matches:["www.chatpdf.com"],"additionalExcludeSelectors.remove":[".notranslate"],excludeSelectors:[".chat-message-row.ai *",".pdf-viewer"],aiRule:{streamingSelector:"",messageWrapperSelector:".chat-message-row.ai",streamingChange:!1,streamingDeepChild:!0,streamingDelayTime:1e3}},{id:"inciteful",matches:["inciteful.xyz"],"excludeTags.remove":["BUTTON"]},{id:"app.element.io",matches:["app.element.io"],"additionalExcludeSelectors.remove":[".notranslate"],"excludeSelectors.add":[".mx_DisambiguatedProfile",".mx_ReplyChain_wrapper",".mx_ThreadSummary_replies_amount"]},{id:"fastapi.tiangolo.com",matches:"fastapi.tiangolo.com",selectors:["article"]},{id:"termynal",selectorMatches:["link[href*='termynal.css']"],"stayOriginalSelectors.add":[".termy"]},{id:"cpb-nl",matches:["www.cpb.nl"],"bodyRule.add":{enable:!1}},{id:"hub.logseq",matches:["hub.logseq.com"],globalStyles:{"[class*=':h-[']":"height:unset;"}},{id:"chat.zalo",matches:["chat.zalo.me"],"additionalExcludeSelectors.remove":[".notranslate"],inputExecCommandDeleteEnable:!0,"inputConfig.add":{execCommandDeleteEnable:!0}},{id:"epam",matches:"*.epam.com",globalStyles:{"[class*='ContentAnchorLinkList']":"word-break:unset;"},"excludeSelectors.add":["#blog-page-sidebar-wrapper"],"excludeTags.remove":["BUTTON"]},{id:"discussions.apple",matches:"discussions.apple.com","excludeSelectors.add":[".page-number"]},{id:"www.sixthtone.com",matches:["www.sixthtone.com"],"excludeSelectors.add":["#footer","[class^=index_time]","[class^=index_anthorList]","[class^=index_node]","[class^=index_popupWrapper]"]},{id:"forum.unity",matches:["forum.unity.com"],"excludeSelectors.add":[".bbCodeCode"]},{id:"wattpad",matches:["www.wattpad.com"],"excludeTags.remove":["PRE"],globalAttributes:{header:{translate:"unset;"}},globalStyles:{".story-info .item-description":"overflow: scroll;"}},{id:"netflix",matches:["www.netflix.com"],"excludeSelectors.add":[".player-timedtext"],"mutationExcludeSelectors.add":[".player-timedtext *"],"subtitleRule.add":{type:"netflix",loadingContainerSelector:".watch-video",subtitleUrlRegExp:"^https://.+?.oca.nflxvideo.net/\\?([ovet]=[^=]+){4}$",loadingStyle:"bottom: 15%;",quickButtonRule:{appendSelector:'[data-uia="control-next"]',insertBeforeSelector:'[data-uia="control-next"]',injectCSS:".imt-quick-subtitle-button {height: 60%; margin-right: 50px; font-size: 20px; } .logo,.logo svg { height: 36px; width: 36px} .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(50%); right: 0}"},videoSelector:"video",attachRule:{appendSelector:".watch-video",injectedCSS:[".imt-caption-window {margin-bottom: 0px; bottom: 10vw;}"],injectedGlobalCSS:[".player-timedtext {display: none !important; }"]}}},{id:"udemy",matches:["www.udemy.com"],"excludeSelectors.add":["[data-purpose='captions-cue-text']",".shaka-text-container"],"mutationExcludeSelectors.add":["[data-purpose='captions-cue-text'] *",".shaka-text-container *"],"subtitleRule.add":{type:"udemy",subtitleUrlRegExp:"^https://vtt.*\\.udemycdn\\.com/.*\\.vtt",videoPlayerSelector:"video.shaka-video",humanTrust:85,loadingContainerSelector:".shaka-video-container",loadingStyle:"bottom: 15%;",injectedCss:["[class^='well--text'] {white-space: pre;}"],quickButtonRule:{appendSelector:'[data-purpose="video-controls"]'}},"subtitleRule.add_v.[1.4.1]":{hookType:"fetch|xhr"}},{id:"iview",matches:"iview.abc.net.au",excludeSelectors:[".jwplayer"],"mutationExcludeSelectors.add":[".jwplayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/cc/.*\\.(vtt|webvtt)$",loadingContainerSelector:".jwplayer",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:".jw-settings-submenu-button",injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"nmaart",matches:"www.nma.art",excludeSelectors:[".video-container"],"mutationExcludeSelectors.add":[".video-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"/texttrack/.*\\.(vtt|webvtt)",loadingContainerSelector:".video-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"apple",matches:"developer.apple.com",excludeSelectors:[".developer-video-player"],"mutationExcludeSelectors.add":[".developer-video-player *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.(vtt|webvtt)"}},{id:"khanacademy",matches:["www.khanacademy.org"],"subtitleRule.add":{type:"khanacademy",subtitleUrlRegExp:"GetSubtitles",hookType:"fetch"},"stayOriginalSelectors.add":[".mathjax-wrapper"]},{id:"nebula",matches:["nebula.tv"],"excludeSelectors.add":["[data-subtitles-container='true']"],"mutationExcludeSelectors.add":["[data-subtitles-container='true'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:".video-poster",quickButtonRule:{appendSelector:".icon-spacing.css-4yh7a0",insertBeforeSelector:"#subtitles-toggle-button",ccEnableSelector:"#subtitles-toggle-button"}}},{id:"frontendmasters",matches:["frontendmasters.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 2} .imt-quick-subtitle-pop-content {z-index: 2147483647}"],quickButtonRule:{appendSelector:".vjs-control-bar"},videoSelector:".PromoPlayer video",attachRule:{appendSelector:".video-js",injectedGlobalCSS:".vjs-text-track-display {display: none;}"}}},{id:"udacity",matches:["*.udacity.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".vtt$",loadingContainerSelector:".vjs-text-track-display"}},{id:"skillshare",matches:["www.skillshare.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt\\?",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 13}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-volume-panel",injectCSS:" .label { display: none; } .imt-quick-subtitle-pop-content {transform: translateX(43%); right: 0; z-index: 2147483647 } "}}},{id:"domestika",matches:["www.domestika.org"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*subtitles.*\\.vtt",quickButtonRule:{appendSelector:".controlBar-wrapper .right-wrapper",insertBeforeSelector:".vjs-volume-panel"}}},{id:"hbomax",matches:["play.max.com","play.hbomax.com"],"excludeSelectors.add":["[data-testid='playerContainer']","[data-testid='CueBoxContainer']"],"mutationExcludeSelectors.add":["[data-testid='playerContainer'] *","[data-testid='CueBoxContainer'] *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"[data-testid='playerContainer']"}},{id:"mindvalley",matches:["home.mindvalley.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.webvtt$",loadingContainerSelector:".vjs-text-track-display",injectedCss:["#immersive-translate-quick-button-container {order: 6}"],quickButtonRule:{appendSelector:'[data-testid="video-section"] .vjs-control-bar',insertBeforeSelector:'[data-testid="video-section"] .vjs-volume-panel',injectCSS:".imt-quick-subtitle-pop-content {z-index: 999999;}"}}},{id:"masterclass",matches:["www.masterclass.com","learn.microsoft.com"],"excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",loadingContainerSelector:".vjs-text-track-display",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-playback-rate"}}},{id:"viu",matches:["www.viu.com"],"excludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay"],"mutationExcludeSelectors.add":[".bmpui-ui-viu-subtitle-overlay *"],"subtitleRule.add":{type:"webvtt",hookType:"xhr",subtitleUrlRegExp:"https?://[^/]+\\.cloudfront\\.net/[^/]+/[^/]+$",loadingContainerSelector:".bmpui-container-wrapper",loadingStyle:"bottom: 20%;",injectedCss:[".bmpui-controls-hidden #immersive-translate-quick-button-container {display: none;}"],quickButtonRule:{appendSelector:".bmpui-ui-container.bmpui-ui-viu-subtitle > .bmpui-container-wrapper",injectCSS:".imt-quick-subtitle-button {margin-bottom: 8px}"}}},{id:"linkin",matches:"*.linkedin.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*ambry/\\?x-li-ambry-ep=.*",hookType:"xhr",loadingContainerSelector:".video-player-container",quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-toggle"}}},{id:"kanopy",matches:"*.kanopy.com","excludeSelectors.add":[".vjs-text-track-display"],"mutationExcludeSelectors.add":[".vjs-text-track-display *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:".*captioncache/webvtt.*",hookType:"xhr",loadingContainerSelector:".video-player-container",injectedCss:["#immersive-translate-quick-button-container{height: 40px;display: flex;align-items: center;align-self: flex-end;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-caption-control"}}},{id:"iflix",matches:["www.iflix.com","wetv.vip"],"excludeSelectors.add":[".text-track"],"mutationExcludeSelectors.add":[".player-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt",hookType:"xhr",loadingContainerSelector:"#player-wrapper",loadingStyle:"bottom: 18%;",quickButtonRule:{appendSelector:'[data-role="wetv-ctrlbar-right"]',insertBeforeSelector:'[data-role="wetv-player-definition"]'}}},{id:"imdb",matches:"www.imdb.com","excludeSelectors.add":[".jw-text-track-container"],"mutationExcludeSelectors.add":[".jw-text-track-container *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#imdbnext-vp-jw-single",quickButtonRule:{appendSelector:".jw-reset.jw-button-container",insertBeforeSelector:'[button="ttt-button"]'}}},{id:"itv",matches:["www.itv.com"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".genie-video",loadingContainerSelector:".genie-container",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".control-bar_right-child-container",insertBeforeSelector:".controls-toggle_button--fullscreen"}}},{id:"egghead",matches:["egghead.io"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".cueplayer-react-video",loadingContainerSelector:".cueplayer-react-video-holder",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:".cueplayer-react-control-bar-right-part",insertBeforeSelector:".cueplayer-react-closed-caption"}}},{id:"coursera",matches:["www.coursera.org"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:".vjs-tech",loadingContainerSelector:".rc-VideoControlsContainer",loadingStyle:"bottom: unset; top: 5%;",quickButtonRule:{appendSelector:'[role="presentation"] > .rc-ControlBar > .icon-container'}}},{id:"ocrtraining",matches:["ocrtraining.cit.nih.gov","videocast.nih.gov"],"excludeSelectors.add":["#videocastPlayer"],"mutationExcludeSelectors.add":["#videocastPlayer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.srt$",loadingContainerSelector:"#videocastPlayer"}},{id:"espn",matches:["*.espn.com"],mainFrameMinTextCount:0,"excludeSelectors.add":["#fittPageContainer"],"mutationExcludeSelectors.add":["#fittPageContainer *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",injectedCss:["#immersive-translate-quick-button-container{margin-top:16px;}",".vjs-text-track-display > div >div {font:unset!important;}"],quickButtonRule:{appendSelector:".vjs-control-bar",insertBeforeSelector:".vjs-captions-button"}}},{id:"fmoviesz",matches:["fmoviesz.to","vidplay.online","c8365730d4.nl"],"excludeSelectors.add":["#player"],"mutationExcludeSelectors.add":["#player *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"subtitle/.*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:"#player",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"aniwatch",matches:["megacloud.tv","aniwatch.to"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"multi_attach_vtt",subtitleUrlRegExp:"^(?!.*sprite\\.vtt$).*\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"},activeLangSelector:"#jw-player-settings-submenu-captions .jw-settings-submenu-items .jw-settings-item-active",videoSelector:"video",attachRule:{appendSelector:".jw-wrapper",injectedGlobalCSS:[".jw-text-track-container {display: none;}","@media (min-width: 576px) { video::cue {opacity: 0} }"]}}},{id:"rottentomatoes",matches:["*.rottentomatoes.com"],"excludeSelectors.add":[".jw-wrapper"],"mutationExcludeSelectors.add":[".jw-wrapper *"],"subtitleRule.add":{type:"webvtt",subtitleUrlRegExp:"\\.vtt$",quickButtonRule:{appendSelector:".jw-button-container",insertBeforeSelector:".jw-icon-cc"}}},{id:"dailymotion",matches:["*.dailymotion.com"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"subsrt",subsrtFormat:"srt",loadingContainerSelector:".player",subtitleUrlRegExp:"/video/.*\\.srt",quickButtonRule:{appendSelector:".controls_bottom_right",insertBeforeSelector:".subtitles_toggle_button"}}},{id:"movie-web",matches:["movie-web.app/media*"],"excludeSelectors.add":["#root"],"mutationExcludeSelectors.add":["#root *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",subsrtFormat:"vtt",loadingContainerSelector:".relative.h-screen.overflow-hidden",subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".hidden.justify-between .flex.items-center.space-x-3"}}},{id:"deeplearning",matches:["learn.deeplearning.ai"],"excludeSelectors.add":['[data-layout="video"]'],"mutationExcludeSelectors.add":['[data-layout="video"] *'],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",loadingContainerSelector:'[data-layout="video"]',subtitleUrlRegExp:".*\\.vtt",quickButtonRule:{appendSelector:".vds-controls-group:last-child",insertBeforeSelector:".vds-caption-button"}}},{id:"paramountplus",matches:["*.paramountplus.com"],"excludeSelectors.add":[".aa-player-skin"],"mutationExcludeSelectors.add":[".aa-player-skin *"],"subtitleRule.add":{type:"text_track_dynamic",injectedCss:[".tt-container {white-space: pre-line;}",".timed-text-css-box-inner {display: none!important;}",".timed-text-css-box-inner:last-child {display: block!important;}"],videoPlayerSelector:"video",quickButtonRule:{appendSelector:".top-menu-container"}}},{id:"pluto",matches:["pluto.tv"],"excludeSelectors.add":[".video-player-layout"],"mutationExcludeSelectors.add":[".video-player-layout *"],"subtitleRule.add":{type:"text_track_dynamic",videoPlayerSelector:"video",quickButtonRule:{appendSelector:".endControls-0-2-85"}}},{id:"vimeo",matches:["vimeo.com"],"excludeSelectors.add":[".vp-captions"],"mutationExcludeSelectors.add":[".vp-captions *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".player_container",loadingStyle:"bottom: unset; top: 5%;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"ted",matches:["www.ted.com"],"excludeSelectors.add":["#video"],"mutationExcludeSelectors.add":["#video *"],"subtitleRule.add":{type:"webvtt",hookType:"fetch",subtitleUrlRegExp:"\\.vtt",videoPlayerSelector:"video",loadingContainerSelector:"media-controller",quickButtonRule:{appendSelector:".pointer-events-none #media-control-bar",insertBeforeSelector:".pointer-events-none .media-volume-wrapper"}}},{id:"player.vimeo",matches:["https://player.vimeo.com/video/*","laracasts.com"],selectorMatches:["iframe[src*='player.vimeo.com']"],extraBlockSelectors:["span.vp-captions-line","span[class^=CaptionsRenderer_]"],"excludeSelectors.add":[".vp-captions-line"],"mutationExcludeSelectors.add":[".vp-captions *",".vp-captions-line *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".vp-telecine",loadingStyle:"bottom: unset; top: 5%; font-size: 12px;",injectedCss:["#immersive-translateQuickButton {visibility: inherit!important;}"],quickButtonRule:{appendSelector:'[data-control-bar="true"] > div',insertBeforeSelector:'[data-volume-control-container="true"]',ccEnableSelector:'[data-cc-button="true"]',injectCSS:".imt-quick-subtitle-button {margin-right: 0px; font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 28px !important;}"}}},{id:"tv.adobe",matches:"https://*.tv.adobe.com","excludeSelectors.add":[".mpc-player"],"mutationExcludeSelectors.add":[".mpc-player *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".mpc-player",quickButtonRule:{appendSelector:".mpc-controls__container"}}},{id:"threejs-journey",matches:"threejs-journey.com","excludeSelectors.add":[".video-area"],"mutationExcludeSelectors.add":[".video-area *"],"subtitleRule.add":{type:"text_track",videoPlayerSelector:"video",loadingContainerSelector:".video-area",injectedCss:[".js-tracks-text.tracks-text {white-space: pre;}"],quickButtonRule:{appendSelector:".js-controls .right",insertBeforeSelector:".js-subtitles",injectCSS:".imt-quick-subtitle-button { font-size: 12px;} .logo,.logo svg { height: 18px !important; width: 18px !important;} .imt-quick-subtitle-pop-content {bottom: 38px !important;}"}}},{id:"codewithchris",matches:["learn.codewithchris.com","*.rachelsenglishacademy.com","www.unrealsenseiacademy.com"],"excludeSelectors.add":[".w-captions",".w-captions-line > div > span"],"mutationExcludeSelectors.add":[".w-captions *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/embed/captions/",loadingContainerSelector:".w-ui-container",hookType:"fetch",generalSetting:{captionsPath:"captions",itemsPath:"hash.lines",textKey:"text"}}},{id:"panopto",matches:["southampton.cloud.panopto.eu"],"excludeSelectors.add":[".primaryPlayer"],"mutationExcludeSelectors.add":[".primaryPlayer *"],"subtitleRule.add":{type:"general",subtitleUrlRegExp:"DeliveryInfo.aspx",disableSubsCache:!0,loadingContainerSelector:"#primaryPlayer",hookType:"fetch",generalSetting:{textKey:"Caption"},quickButtonRule:{appendSelector:"#transportControls",insertBeforeSelector:"#captionsButton"}}},{id:"edx",matches:["*.edx.org"],"excludeSelectors.add":[".closed-captions",".subtitles-menu"],mainFrameMinTextCount:0,"subtitleRule.add":{type:"general",subtitleUrlRegExp:"/transcript/translation/",loadingContainerSelector:".tc-wrapper",generalSetting:{itemsPath:"text"},injectedCss:[".subtitles-menu span,.closed-captions {white-space: pre-line;}","#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],quickButtonRule:{appendSelector:".secondary-controls",insertBeforeSelector:".speeds.menu-container"}}},{id:"ardmediathek",matches:["www.ardmediathek.*"],"excludeSelectors.add":[".ardplayer-viewport-addon-overlays"],"mutationExcludeSelectors.add":[".ardplayer-viewport-addon-overlays *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"subtitle/ebutt",loadingContainerSelector:".ardplayer-viewport-addon-overlays",quickButtonRule:{appendSelector:".ardplayer-footer .ardplayer-addons-container",insertBeforeSelector:".ardplayer-footer .ardplayer-button-sharing",injectCSS:".imt-quick-subtitle-button {font-size: 20px; } .logo,.logo svg { height: 36px !important; width: 36px !important;} .imt-quick-subtitle-pop-content {z-index: 2147483647;} "}}},{id:"bbc-iplayer",matches:["https://www.bbc.*/iplayer*"],"excludeSelectors.add":[".player"],"mutationExcludeSelectors.add":[".player *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".player__container"}},{id:"bbc",matches:["*.bbc.*"],"excludeSelectors.add":["section.module--languages",".drop-capped",".smp-toucan-player","smp-subtitles","#subtitle_subtitle2"],"mutationExcludeSelectors.add":["[data-testid='media-player-container-landscape'] *"],"subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"iplayer/subtitles/.*.xml",loadingContainerSelector:".smp-toucan-player"}},{id:"zdf.de",matches:["www.zdf.de"],"excludeSelectors.add":[".zdfplayer-cue-region"],"subtitleRule.add":{type:"ebutt",subtitleUrlRegExp:"mtt/.*.xml",loadingContainerSelector:".zdfplayer-video-container",responseType:"document",injectedCss:["#immersive-translate-quick-button-container {display:inline-block;vertical-align:middle;margin-right:-16px;}"],quickButtonRule:{appendSelector:".right-controls-1FfJUp.svelte-inzdbf",insertBeforeSelector:".right-controls-1FfJUp.svelte-inzdbf button"}}},{id:"piped.video",matches:"piped.video","subtitleRule.add":{type:"ebutt",hookType:"fetch",subtitleUrlRegExp:"api/timedtext",loadingContainerSelector:".shaka-video-container",responseType:"document",quickButtonRule:{appendSelector:".shaka-controls-button-panel",insertBeforeSelector:".shaka-mute-button"}}},{id:"disneyplus",matches:["www.disneyplus.com"],"excludeSelectors.add":[".dss-hls-subtitle-overlay"],"mutationExcludeSelectors.add":[".dss-hls-subtitle-overlay *"],"subtitleRule.add":{type:"disneyplus",subtitleUrlRegExp:"\\.vtt$"}},{id:"mubi",matches:["https://mubi.com","https://mubi.de"],"subtitleRule.add":{type:"fmp4.xml",subtitleUrlRegExp:"textstream",hookType:"fetch",quickButtonRule:{appendSelector:".css-1k6yql2.e1b63bld4",insertBeforeSelector:".css-1ce7rqp.e7f2hfl0"}}},{id:"hulu",matches:"https://*.hulu.com","subtitleRule.add":{type:"hulu",hookType:"fetch",injectedCss:[".ClosedCaption {display:none!important;}"],videoSelector:"#content-video-player",subtitleUrlRegExp:"play.hulu.com/.*/playlist",loadingContainerSelector:"#web-player-app",quickButtonRule:{appendSelector:".PlayerSettingsGroup",insertBeforeSelector:".PlayerSettingsGroup .PlayerControlsButton"}}},{id:"youku.tv",matches:"www.youku.tv","excludeSelectors.add":["#subtitle"],"mutationExcludeSelectors.add":["#subtitle *"],"subtitleRule.add":{type:"subsrt",hookType:"fetch",injectedCss:["#immersive-translate-quick-button-container {display: inline-block; vertical-align: middle;}"],subtitleUrlRegExp:"\\.ass$",subsrtFormat:"ass",loadingContainerSelector:"#youku-dashboard",loadingStyle:"bottom: 10%;",quickButtonRule:{appendSelector:".kui-dashboard-dashboard-panel .kui-dashboard-rear-ctn",insertBeforeSelector:".kui-rate-control-0"}}},{id:"starz",matches:"www.starz.com","excludeSelectors.add":["starz-player"],"mutationExcludeSelectors.add":["starz-player *"],"subtitleRule.add":{type:"subsrt",subsrtFormat:"vtt",subtitleUrlRegExp:"\\.vtt$",loadingContainerSelector:"starz-player",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {display: inline-block;}"],quickButtonRule:{appendSelector:"starz-player .button-group",insertBeforeSelector:"starz-player .button-group .video-player-icon-md"}}},{id:"www.iq.com",matches:"www.iq.com","excludeSelectors.add":[".iqp-subtitle"],"mutationExcludeSelectors.add":[".iqp-subtitle *"],"subtitleRule.add":{type:"xml",subtitleUrlRegExp:"\\.xml\\?",loadingContainerSelector:".intl-video-area",xmlTextSelector:"sub",loadingStyle:"bottom: 10%;",injectedCss:["#immersive-translate-quick-button-container {float: right; height: 100%;}"],quickButtonRule:{appendSelector:".iqp-contrls-right"}}},{id:"archiveToday",matches:["archive.today","archive.ph","archive.is","archive.md"],"excludeSelectors.add":["#HEADER"]},{id:"arxiv-vanity.com",matches:["www.arxiv-vanity.com"],"excludeSelectors.add":[".arxiv-vanity-wrapper"]},{id:"fibery",matches:["the.fibery.io"],"additionalExcludeSelectors.remove":["[translate=no]"],"additionalStayOriginalSelectors.add":[".entity-node-view-container"]},{id:"makersuite.google",matches:"makersuite.google.com","excludeSelectors.add":[".material-symbols-outlined"]},{id:"etymonline",matches:"www.etymonline.com",globalAttributes:{".crossreference.notranslate":{class:"crossreference"},".foreign.notranslate":{class:"foreign"}}},{id:"https://browse.arxiv.org/",matches:["https://browse.arxiv.org","https://arxiv.org/html/*"],"excludeSelectors.add":[".desktop_header","[class*='ltx_lst_language_']","div.package-alerts"]},{id:"jstor",matches:"www.jstor.org","excludeSelectors.add":[".audio-duration","[data-qa='card-item-count']"],globalStyles:{".card__heading":"-webkit-line-clamp:unset;","search-results-vue-pharos-image-card,search-ui-pharos-image-card":"display:flex;","search-results-vue-pharos-link":"display:inline;"}},{id:"tandfonline",matches:"*.tandfonline.com","extraInlineSelectors.add":["span.off-screen"]},{id:"boringreport",matches:["www.boringreport.org"],"excludeTags.remove":["BUTTON"]},{id:"bsky.app",matches:"https://bsky.app",selectors:["[data-testid=postText]"],isTranslateTitle:!1},{id:"peacocktv",matches:["*.peacocktv.com"],injectedCss:[".video-player__subtitles__line > font,.video-player__subtitles__line:only-child{display:block;}"]},{id:"noTranslate",matches:["*.tiktok.com","altis.world","*.newthingsunderthesun.com","*.gumroad.com","edstem.org","actions.tldrnewsletter.com","community.linkingyourthinking.com","doc.qt.io","winaero.com"],"additionalExcludeSelectors.remove":[".notranslate","[translate=no]"]},{id:"jmir",matches:["*.jmir.org"],"additionalInlineSelectors.add":[".tooltiptext"]},{id:"smzdm",matches:["www.smzdm.com"],"excludeSelectors.add":[".z-highlight",".feed-block-info",".z-feed-foot",".feed-block-descripe","#J_column_tab_box",".crumbs"],globalStyles:{".feed-block-title":"height:unset"}},{id:"xiaohongshu.com",matches:["www.xiaohongshu.com"],"excludeSelectors.add":[".author-wrapper",".info",".side-bar"],globalStyles:{"a.title":"-webkit-line-clamp:3"}},{id:"learnopengl",matches:["learnopengl.com"],globalStyles:{function:"position:relative;z-index:1000;"}},{id:"notateslaapp",matches:["www.notateslaapp.com"],"extraBlockSelectors.add":[".nav > *"]},{id:"eightfold",matches:["*.eightfold.ai"],injectedCss:[".flexbox{width:100%}"]},{id:"deno",matches:["deno.com"],injectedCss:[":root {font-feature-settings:unset}"]},{id:"soundcloud",matches:"soundcloud.com",injectedCss:[".compactTrackListItem {height: unset !important;}"],"excludeSelectors.add":[".searchTitle__textContent",".searchOptions__container",".compactTrackListItem__additional",".soundTitle__tagContainer",".searchResultGroupHeading",".sc-ministats-group",".compactTrackList__moreLink",".sound__soundActions"]},{id:"section.blog.naver.com",matches:"section.blog.naver.com",globalStyles:{".text,.title_post,.text_post,p,strong,div":"-webkit-line-clamp:unset;max-height:unset;height:unset;"},"extraBlockSelectors.add":[".item",".heading a",".info_find a"],"excludeSelectors.add":[".comments",".time"]},{id:"gradio-app",selectorMatches:"gradio-app","excludeTags.remove":["BUTTON"],"excludeSelectors.add":['[data-testid="block-label"]'],"mutationConfig.add":{buildTimeout:1e3,consumeTimeout:1e3}}]};m();m();function ta(e){if(e.beta)return!1;if($e()&&e.spVersion)return Xs(kr(),e.spVersion);if(P1()&&e.gspVersion){let t=F1();if(t)return Xs(t,e.gspVersion)}if($g()&&e.ispVersion){let t=M1();if(t)return Xs(t,e.ispVersion)}return!1}function Xs(e,t){let n=e.split(".").reverse(),r=t.split(".").reverse(),a=0,o=0,i=1;for(let s=0;s<3;s++)a+=i*Number(r[s]||"0"),o+=i*Number(n[s]||"0"),i*=100;return o>=a}function eu(e){e.message?.indexOf("token invalid")>=0&&mt.remove(Tt)}m();function Xl(e){return Array.isArray(e)?e:e?[e]:[]}function Rn(e,t){return t?(Array.isArray(t)||(t=[t]),Array.from(new Set([...t,e]))):[e]}function zt(e,t){return t?(Array.isArray(e)||(e=[e]),Array.isArray(t)||(t=[t]),t.filter(n=>!e.includes(n))):[]}function e0(e,t){let n={...e};return U1(n,t),ES(n,t),n}function N1(e,t,n){let r={...t};return So({rule:r,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>e[a],onMergedResult:(a,o)=>r[a]=o}),So({rule:n,valueIsArray:a=>Array.isArray(e[a]),getMergedValue:a=>r[a],onMergedResult:(a,o)=>r[a]=o}),r}function ES(e,t){if(!t.condition)return;let n=t.condition.enableSubtitle?.true||{},r=t.condition.enableSubtitle?.false||{},a=e.enableSubtitle?n:r;U1(e,a)}function So({rule:e,getMergedValue:t,valueIsArray:n,onMergedResult:r}){Object.keys(e).sort().forEach(a=>{let[o,i,s]=SS(a);if(!o||e[a]===void 0)return;let u=e[a];n(o)&&(u=Xl(e[a]));let l=t(o);if(l==null){r(o,u);return}let c;if(i=="add_v"){if(!I1(s))return;c=Vg(l,u)}else if(i=="remove_v"){if(!I1(s))return;c=O1(l,u)}else i==="add"?c=Vg(l,u):i=="remove"&&(c=O1(l,u));if(c){r(o,c);return}Array.isArray(e[o])&&o.startsWith("additional")?c=Vg(l,u):c=u,r(o,c)})}function U1(e,t){return So({rule:t,valueIsArray:n=>Array.isArray(e[n]),getMergedValue:n=>e[n],onMergedResult:(n,r)=>{e[n]=r}}),e}function Vg(e,t){let n;if(Array.isArray(e)){let r=Xl(t);n=[...e,...r],n=Array.from(new Set(n))}else typeof e=="object"&&typeof t=="object"?n={...e,...t}:n=t;return n}function SS(e){let t=e.lastIndexOf("["),n="",r=e;return t>0&&(n=e.slice(t+1,e.length-1),r=e.slice(0,t-1)),[...r.split("."),n]}function I1(e){let t=Zn();return e&&Xs(t,e)}function O1(e,t){if(Array.isArray(e)){let n=Xl(t);return e=e.filter(r=>!n.includes(r)),Array.from(new Set(e))}else if(typeof e=="object"&&typeof t=="object")Object.keys(t).forEach(n=>{delete e[n]});else return t;return e}function wo(){if(Se.PROD==="1")return{};let e={};if(Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY){let n={secretId:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_ID,secretKey:Se.IMMERSIVE_TRANSLATE_SECRET_TENCENT_SECRET_KEY};e.translationServices={},e.translationServices.tencent=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID&&Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY){let n={appid:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_APPID,key:Se.IMMERSIVE_TRANSLATE_SECRET_BAIDU_KEY};e.translationServices||(e.translationServices={}),e.translationServices.baidu=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN){let n={token:Se.IMMERSIVE_TRANSLATE_SECRET_CAIYUN_TOKEN};e.translationServices||(e.translationServices={}),e.translationServices.caiyun=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY){let n={apikey:Se.IMMERSIVE_TRANSLATE_SECRET_OPENL_APIKEY};e.translationServices||(e.translationServices={}),e.translationServices.openl=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET){let n={appId:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_ID,appSecret:Se.IMMERSIVE_TRANSLATE_SECRET_YOUDAO_APP_SECRET};e.translationServices||(e.translationServices={}),e.translationServices.youdao=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID&&Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY){let n={accessKeyId:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_ACCESS_KEY_ID,secretAccessKey:Se.IMMERSIVE_TRANSLATE_SECRET_VOLC_SECRET_ACCESS_KEY};e.translationServices||(e.translationServices={}),e.translationServices.volc=n}if(Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY){let n={authKey:Se.IMMERSIVE_TRANSLATE_SECRET_DEEPL_AUTH_KEY};e.translationServices||(e.translationServices={}),e.translationServices.deepl=n}if(Se.DEEPL_PROXY_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateApiUrl=Se.DEEPL_PROXY_ENDPOINT),Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT&&(e.translationServices||(e.translationServices={}),e.translationServices.deepl||(e.translationServices.deepl={}),e.translationServices.deepl.immersiveTranslateDeeplTokenUrl=Se.IMMERSIVE_TRANSLATE_DEEPL_ENDPOINT),Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY){let n={APIKEY:Se.IMMERSIVE_TRANSLATE_SECRET_OPENAI_API_KEY};e.translationServices||(e.translationServices={}),e.translationServices.openai=n}Se.IMMERSIVE_TRANSLATE_SERVICE&&(e.translationService=Se.IMMERSIVE_TRANSLATE_SERVICE);let t={};return Se.DEBUG==="1"&&(t.debug=!0,t.cache=!1),Se.MOCK==="1"&&(t.translationService="mock"),t}async function qt(){let e=await Q.storage.local.get(gi);if(e[gi]){let t=e[gi],n=t.tempTranslationUrlMatches||[],r=n.filter(i=>i.expiredAt>Date.now()),a=!1;r.length!==n.length&&(n=r,a=!0);let o={...t,tempTranslationUrlMatches:[...n]};return a&&await Wt(o),o}else return{}}async function Wt(e){await Q.storage.local.set({[gi]:e})}async function j1(e){await Q.storage.local.set({[Gr]:e})}async function wa(){await Q.storage.local.set({[Gr]:{}})}async function Da(){await Q.storage.local.set({[gi]:{}})}async function H1(){let e=await Q.storage.local.get(Gr),n={...await Kg(),...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Gr]){let r=e[Gr];if(r&&r.buildinConfigUpdatedAt){let a=new Date(r.buildinConfigUpdatedAt),o=new Date(n.buildinConfigUpdatedAt);a>o&&(n=r)}}return n}async function ft(){let e=await Q.storage.local.get(Gr),t={...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};if(e[Gr]){let k=e[Gr];if(k&&k.buildinConfigUpdatedAt){let _=new Date(k.buildinConfigUpdatedAt),F=new Date(t.buildinConfigUpdatedAt);_>F&&(t=k)}}let n=await kS(t);t.targetLanguage=n;let r=await mt.get(Tt,null),a={};if(!me()&&Q.commands&&Q.commands.getAll){let k=await Q.commands.getAll();for(let _ of k)_.name&&_.shortcut&&(a[_.name]=_.shortcut)}let o=await Kg(),i=wo(),s=await pr(),u=globalThis.IMMERSIVE_TRANSLATE_CONFIG||{},l=await qt(),c=new Date,g=Object.assign({},u,i,s);if(!g.interfaceLanguage){let k=await wS();g.interfaceLanguage=k}let p=g.interfaceLanguage==="en",f=g.targetLanguage==="en",h=t&&t.translationLanguagePattern&&t.translationLanguagePattern.matches&&t.translationLanguagePattern.matches.length===0,y=["bing","google","transmart","mock"].includes(g.translationService)||!g.translationService;!p&&!f&&!h&&y?t.translationLanguagePattern||(t.translationLanguagePattern={matches:["en"],excludeMatches:[]}):t.translationLanguagePattern={matches:[],excludeMatches:[]};let C=t&&t.enableDefaultAlwaysTranslatedUrls;g.enableDefaultAlwaysTranslatedUrls===!1&&(C=!1);let b=g&&g.isChangedAlwaysTranslatedUrls,x=[];g.translationUrlPattern&&g.translationUrlPattern.matches&&(x=g.translationUrlPattern.matches||[]);let S=!1;b===void 0&&(x.length>0?b=!0:b=!1,g.isChangedAlwaysTranslatedUrls=b,s.isChangedAlwaysTranslatedUrls=b,S=!0);let A=(g?.translationLanguagePattern?.matches?.length||0)>0,P=await jt("installedAt",""),w=Number(await Xr("translage_page_daily",0)),v=Number(await jt(gr,0)),L;v>0&&(Date.now()-v0&&(Date.now()-w0){let k=l.tempTranslationUrlMatches.filter(_=>new Date(_.expiredAt)>c);if(k.length>0){let _=g.translationUrlPattern?g.translationUrlPattern?.matches||[]:[],F=Array.isArray(_)?_:[_],q=Array.from(new Set(F.concat(k.map(z=>z.match))));g.translationUrlPattern={...g.translationUrlPattern,matches:q}}}let R=Object.assign(o,t);So({rule:t,valueIsArray:k=>Array.isArray(o[k]),getMergedValue:k=>o[k],onMergedResult:(k,_)=>{k!="generalRule"&&(R[k]=_)}});let M=Yt(r),O={};g.translationServices&&g.translationServices.deepl&&(O=g.translationServices.deepl);let N={};g.translationServices&&g.translationServices.openai&&(N=g.translationServices.openai),!M&&O.authKey&&!O.provider?(R.translationServices.deepl||(R.translationServices.deepl={}),R.translationServices.deepl.provider="custom"):O&&O.provider||(R.translationServices.deepl||(R.translationServices.deepl={}),R.translationServices.deepl.provider="pro"),!M&&N.APIKEY&&!N.provider?(R.translationServices.openai||(R.translationServices.openai={}),R.translationServices.openai.provider="custom"):N&&N.provider||(R.translationServices.openai||(R.translationServices.openai={}),R.translationServices.openai.provider="pro");let H=Object.keys(R),B=["translationUrlPattern","translationLanguagePattern","immediateTranslationPattern","translationBodyAreaPattern","translationParagraphLanguagePattern","translationThemePatterns","translationGeneralConfig","shortcuts","inputTranslationUrlPattern","inputLanguageCodeAlias"];for(let k of H){let _=k;if(_==="generalRule")typeof g[_]=="object"&&(R[_]=e0(o[_],g[_]));else if(_==="translationServices")AS(g,R);else if(typeof g[_]!="string"&&typeof g[_]!="boolean"&&typeof g[_]!="number"&&B.includes(_))g[_]&&(R[_]=Object.assign(R[_],g[_])),_==="shortcuts"&&(me()||$e()?R[_]={...R[_],...a}:R[_]={...a});else if(_==="rules"){if(Array.isArray(g[_])){let F=R.rules||[],q={};for(let V of F)V.id&&(q[V.id]=V);let z=g[_].map(V=>V.id&&q[V.id]?N1(t.generalRule,q[V.id],V):V);R[_]=[...z,...R[_]]}if(Se.PROD==="0"&&Se.DEV_RULES){let F=JSON.parse(Se.DEV_RULES);R[_]=[...F,...R[_]]}}else g[_]!==void 0&&(R[_]=g[_])}return R.donateUrl=t.donateUrl,R.minVersion=t.minVersion,R.feedbackUrl=t.feedbackUrl,R.rawUserConfig=s,R}async function pr(){return(await Q.storage.sync.get("userConfig")||{}).userConfig||{}}async function Do(e){await Q.storage.sync.set({userConfig:e})}async function tu(e,t){await Q.storage.local.set({[e]:t})}async function t0(e){return(await Q.storage.local.get(e))[e]||""}var wS=async()=>{let e=["zh-CN"];try{e=await Q.i18n.getAcceptLanguages()}catch(r){I.warn("get browser language error:",r)}let n=e.map(r=>ye(r)).find(r=>nn[r]);return n||"en"},Kg=async()=>{let e={...yi,buildinConfigUpdatedAt:Se.BUILD_TIME};return{...e,targetLanguage:Dr,interfaceLanguage:"en",translationMode:"dual",debug:!1,alpha:!1,translationUrlPattern:{matches:[],excludeMatches:[]},translationLanguagePattern:{matches:[],excludeMatches:[]},translationThemePatterns:{},translationParagraphLanguagePattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationBodyAreaPattern:{matches:[],excludeMatches:[],selectorMatches:[],excludeSelectorMatches:[]},translationTheme:"none",translationService:"bing",inputTranslationService:"inherit",mouseHoverTranslationService:"inherit",subtitleTranslateService:"inherit",translationArea:"main",translationStartMode:"dynamic",translationServices:{},monkeyH5FloatBall:{...e.monkeyH5FloatBall},pcFloatBall:{...e.pcFloatBall},generalRule:{...e.generalRule},translationGeneralConfig:{engine:"bing",_systemExcludeWordRegex:"\\b({word})\\b"},rules:[]}};function DS(e,t){return e=e||[],t=t||[],e.length!==t.length?!0:t.filter(r=>!e.includes(r)).length>0}async function kS(e){try{let t=e?.autoSelectTargetLanguageAfterInstalledAt;if(!t)return Dr;let n=await jt("installedAt","");if(n&&new Date(n){let l=a[u],c=a[l.extends];!c||l.extends==u||(a[u]={...c,...a[u]})}),So({rule:{...a},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),So({rule:{...r},valueIsArray:u=>Array.isArray(a[u]),getMergedValue:u=>a[u],onMergedResult:(u,l)=>{a[u]={...a[u],...l}}}),new Date(e.updatedAt)<=new Date("2024.4.2")&&Object.keys(r).forEach(u=>{["openai","gemini"].includes(u)&&r[u].prompt!=null&&(r[u].maxTextGroupLengthPerRequest==null&&(a[u].maxTextGroupLengthPerRequest=1),r[u].multiplePrompt==null&&(a[u].multiplePrompt=r[u].prompt))});let i=["imt_source_field","imt_trans_field","imt_sub_source_field","imt_sub_trans_field"],s=(u,l)=>{!u||!u[l]||!u?.env||(u[l]=u[l].replace(/{{(.+?)}}/g,(c,g)=>i.includes(g)?c:u?.env[g]||c))};Object.values(a).forEach(u=>{s(u,"prompt"),s(u,"multiplePrompt"),s(u,"subtitlePrompt")})}var LS=["block","grid","flex","table","table-row","table-cell","list-item","-webkit-box","box","contents"];function In(e,t){if(t.length===0)return!1;let n=t.join(",");return e.matches&&e.matches(n)||!1}function ka(e,t,n){let{blockSelectors:r,extraBlockSelectors:a,extraInlineSelectors:o,atomicBlockSelectors:i}=t;if(In(e,o))return!1;if(In(e,a)||["br","input"].includes(e.nodeName.toLowerCase()))return!0;let l=null;if(e.parentNode&&e.parentNode.immersiveTranslateComputedStyle&&(l=e.parentNode.immersiveTranslateComputedStyle),l&&l.display&&l.display==="inline-flex")return!1;let c=g();return c&&(c=!In(e,i)),c;function g(){return n&&n.display?!!LS.includes(n.display):In(e,r)}}var ln=In;function ko(e){return!!e.shadowRoot}function Aa(e){if(!e||typeof e!="string"&&(e=e.textContent,!e))return"";let t="";return e!==e.trimStart()&&(t+=" "),t+=e.trim(),t===" "||e!==e.trimEnd()&&(t+=" "),t}function nu(e){if(!e)return["",""];if(typeof e!="string"&&(e=e.textContent,!e))return["",""];let t=[];return e!==e.trimStart()?t.push(" "):t.push(""),!e.trim()&&t.length===1?[" ",""]:(e!==e.trimEnd()?t.push(" "):t.push(""),t)}function Lr(e,t=!1){let n=qs;return t&&e?.translatedPlaceholderDelimiters?n=e.translatedPlaceholderDelimiters:e?.placeholderDelimiters&&(n=e.placeholderDelimiters),n}function Ao(e,t=!1){let n=e.config?.translationServices?.[e.translationService];return Lr(n,t)}function Ci(e,t){return Sa(t,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})}function Gg(e){let{rule:t}=e,n=_S(e);return` <${t.targetWrapperTag} class="${n} notranslate">`}function _S(e){let t=e.config.loadingTheme;return`${ee}-loading-${t}`}function ru(e,t){let n=e.rule,r=document.createElement(n.targetWrapperTag);r.classList.add("notranslate",Lt),r.setAttribute("translate","no"),r.setAttribute("lang",e.targetLanguage),yt(r,k2,t.toString());let a=Gg(e);return r.append(nt.sanitize(a,{RETURN_DOM_FRAGMENT:!0})),r}function Ti(e,t){return e.querySelector(`[${wg}='${t}']`)}function z1(){document.querySelectorAll(`[${wg}]`).forEach(t=>{t.remove()})}function q1(){document.querySelectorAll(`.${Lt}-error`).forEach(t=>{t.remove()})}function W1(){let e=document.querySelectorAll("iframe"),t=[];return e.forEach(n=>{xi(n)&&t.push(n)}),t}function Yg(e){let t={},{glossaries:r,_systemExcludeWordRegex:a,text:o,delimiters:i,excludeRegexps:s,targetLanguage:u}=e,l=o,c=1001;try{if(r&&r.length>0){let g={},p=r.filter(h=>h.tl&&h.tl!==u?!1:h.k?(g[h.k]=h.v||"",!0):!1).sort((h,y)=>h.tl&&!y.tl?1:!h.tl&&y.tl?-1:0),f=new RegExp(a.replace("{word}",p.map(h=>h.k).join("|")),"g");l=l.replace(f,(h,y)=>{let C=c++;return t[`${C}`]=g[y]||y,i.length>2?h.replace(y,`<${i[2]}${C}>`):h.replace(y,`${i[0]}${C}${i[1]}`)})}s&&s.length>0&&s.forEach(g=>{let p=new RegExp(g,"gi");l=l.replace(p,(f,h)=>{let y=c++;return t[`${y}`]=p1(h),i.length>2?f.replace(h,`<${i[2]}${y}>`):f.replace(h,`${i[0]}${y}${i[1]}`)})})}catch(g){I.debug(`format source text error: ${g.message}`)}return{text:l,variables:t}}function au(e){let{noTranslateRegexp:t,minTextCount:n,minWordCount:r,delimiters:a,text:o}=e,i=new RegExp(`${a[0]}(\\d+)${a[1]}`,"gi");if(a.length>2){let u=a[2];i=new RegExp(`<${u}(\\d+)>(.*?)`,"gi")}let s=o.trim();return s=s.replace(i,""),s=s.trim(),s===""||s.length===1&&s.charCodeAt(0)===8203||/^[0-9.,\/#!$%\^&\*;:{}=\-_`~()\s]+$/.test(o)||s.includes("")||s.includes("< styles>")||t9(s)||Q1(s)||e9(s)||Z1(s)||X1(s)||PS(s)||i.test(s)||t&&t.length>0&&new RegExp(t.join("|"),"gi").test(s)?!1:r0(o,n,r)}function na(e){return e.nodeType===Node.ELEMENT_NODE}function $1(e,t){return e.paragraphs?e.paragraphs[0]?.ctxId!==t?(e.paragraphs=[],!1):!0:!1}function V1(e){let t=new Date(e),n=t.getFullYear(),r=t.getMonth()+1,a=t.getDate(),o=t.getHours(),i=t.getMinutes(),s=t.getSeconds();return`${n}/${r}/${a} ${o}:${i}:${s}`}async function Jg(){return await jt("fakeUserId","")}async function MS(){return await jt("installedAt","")}async function K1(e){let n=Pe().INSTALL_FROM,r=Zn(),a=await MS(),o=await Jg(),i=await ft(),s=!1,u=await mt.get(Tt,null),l=!1;return u&&Yt(u)&&(s=!0,u.subscription&&u.subscription.isTrial&&(l=!0)),{installFrom:n,version:r,installedAt:a,interfaceLang:e,optionInterfaceLang:i.interfaceLanguage,deviceId:o,isProUser:s,isTrial:l}}function G1(e,t,n,r){if(!t||!r||!e)return"";let a=e.xpathRule,o=0,i=n;for(;i&&i!==r;)o++,i=i.parentNode;let s=o+"";for(let u=0;u{!e||!t||(async()=>{let a=await Qg(e,t);r(a)})()},[e,t,r]),n}async function Qg(e,t){if(!e||!t)return;let n=!1,r,a=!0;!$e()&&me()||it().any?(a=!1,r=t.monkeyH5FloatBall,!r&&e.rule.isShowUserscriptPagePopup==!1&&(r=e.config.monkeyH5FloatBall,r.enable=!1),r||(r=e.config.monkeyH5FloatBall),n=!t.monkeyH5FloatBall):(r=e.config.pcFloatBall,n=!t.pcFloatBall);try{if(r?.afterInstalledAt&&n){let o=await jt("installedAt","");new Date(o).getTime()s==n),a=e.config.translationModeLanguagePattern.translationMatches.find(s=>s==n),o=e.config.translationModeUrlPattern.dualMatches.find(s=>_t(e.url,s));return e.config.translationModeUrlPattern.translationMatches.find(s=>_t(e.url,s))?"translation":o?"dual":a?"translation":r?"dual":null}var a0=!1,FS=me();function n9(e,t){let n=[];for(let r of t){let a=e.querySelectorAll(r);for(let o of a)n.push(o)}return n}function BS(e,t){let n=function(o){return o.nodeType===Node.ELEMENT_NODE||o.nodeType===Node.TEXT_NODE?o.nodeType===Node.ELEMENT_NODE&&r9(o,t,!0)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,n),a=!0;for(;r.nextNode();){let o=r.currentNode;if(o.nodeType===Node.ELEMENT_NODE){if(La(o,Rl)){if(a===!0)return!0;continue}if(iu(o.nodeName,t.inlineTags))return!0;if(!Zg(o,t))return!1}}return!0}function Xg(e,t){let n=t.inlineTags;if(e.nodeType===Node.ELEMENT_NODE)if(iu(e.nodeName,n)||Zg(e,t)){if(La(e,_2)||iu(e.nodeName,["BR"]))return!1;if(La(e,Rl))return!0;if(Zg(e,t)){let r=globalThis.getComputedStyle(e);if(r.display==="block"||r.display==="flex")return!1}return BS(e,t)}else return La(e,Rl);return!1}function r9(e,t,n){if(!(e.nodeType===Node.ELEMENT_NODE||e.nodeType===Node.TEXT_NODE)||e.nodeType===Node.ELEMENT_NODE&&La(e,L2,!0))return!0;if(e.nodeType===Node.ELEMENT_NODE&&La(e,T2))return!1;let{stayOriginalTags:r,excludeTags:a}=t,o=[];return n&&a&&a.length>0?o=a||[]:o=a.filter(i=>!r.includes(i)),!!(e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("translate")==="no"||e.classList.contains("notranslate"))||iu(e.nodeName,o))}function r0(e,t,n){let r=e.trim();return r.length>=t||r.split(" ").filter(i=>i.trim()!=="").length>=n||!o9(r)&&r.length>=n}function a9(e,t,n){let r=e.trim();if(r.length<=t)return!0;if(o9(r)){if(r.split(" ").length<=n)return!0}else if(r.length<=n)return!0;return!1}function o9(e){for(let t=0;t127)return!1;return!0}function Q1(e){if(e&&e.includes("://")&&!e.includes(" ")&&e.length<512)try{return new URL(e),!0}catch{return!1}else return!1}function Z1(e){return e?/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/.test(e):!1}function X1(e){return e?/^[_\d:\-+\.。,,% ]+$/.test(e):!1}function e9(e){if(e&&e.startsWith("#")){if(e.split("#").length>2)return!1;if(e.indexOf(" ")===-1)return!0}return!1}function t9(e){return!!(e&&e.startsWith("@")&&e.indexOf(" ")===-1)}function La(e,t,n=!1){return em(e,t,"1",n)}function em(e,t,n,r=!1){return a0&&!r?e[Fn]?!!(e[Fn]&&e[Fn][t]===n):!1:e.dataset[t]===n}function Ei(e){return(e.innerText||e.textContent||"").trim()}function tm(e){let t=e.querySelectorAll("iframe"),n="";for(let r=0;r2e3))break}return n}function o0(e){return e?typeof e=="string"?document.querySelector(e)!==null:e.some(t=>document.querySelector(t)):!1}function yt(e,t,n,r=!1,a=!1){e.isContentEditable&&!a||(a0&&!r?(e[Fn]||(e[Fn]={}),e[Fn][t]||(e[Fn][t]=n)):e.dataset[t]!==n&&(e.dataset[t]=n))}function i0(e,t,n=!1){if(a0&&!n){if(!e[Fn]||!e[Fn][t])return;delete e[Fn][t]}else delete e.dataset[t]}function Si(e,t,n=!1){return a0&&!n?!e[Fn]||!e[Fn][t]?void 0:e[Fn][t]:e.dataset[t]}function Zg(e,t){let n=t.allBlockTags.concat(t.inlineTags).concat(t.excludeTags);return!iu(e.nodeName,n)}function Ae(){if(!globalThis||!globalThis.location)return"https://example.com";if(!ot())return globalThis.location.href;try{let t=globalThis.location.href,n=new URL(t);if(n.protocol==="about:"||n.protocol==="blob:"){if(globalThis.location.ancestorOrigins&&globalThis.location.ancestorOrigins.length>0)return globalThis.location.ancestorOrigins[0];let r="";try{r=globalThis.parent.location.href}catch{}return r||(globalThis.location!=globalThis.parent.location?document.referrer:document.location.href)}else return t}catch{}return globalThis.location.href}function zn(e,t,n){if(e instanceof ShadowRoot){try{e.appendChild(document.createElement("style")).textContent=t}catch(r){I.warn("injectCSS failed, rootDocument"+r?.message,e)}return}if(e&&e.head&&e.head.appendChild){let r=e.createElement("style");if(n){let a=e.querySelector(`style[data-id="${n}"]`);a&&a.remove(),r.dataset.id=n}r.textContent=t,e.head.appendChild(r)}else if(e){let r=document.createElement("head"),a=document.createElement("style");a.textContent=t,r.appendChild(a),e.appendChild(r)}else I.warn("injectCSS failed, rootDocument does not have head node",e)}function xi(e){let t=e.getAttribute("src");if(t){if(t==="about:blank")return!0;if(FS){if(t.startsWith("blob:"))return!0}else if(t.startsWith("blob:"))return!!document.querySelector("meta[name='immersive-translate-ebook-viewer']")||!t.startsWith("blob:http");return!1}try{if(e.contentDocument&&e.contentDocument.body)return!0}catch{}return!1}function iu(e,t){if(!e||!t)return!1;Array.isArray(t)||(t=[t]),e=e.toUpperCase();for(let n of t)if(e===n)return!0;return!1}function i9(e){let t=e.replace("#",""),n=parseInt(t.substring(0,2),16),r=parseInt(t.substring(2,4),16),a=parseInt(t.substring(4,6),16);return{r:n,g:r,b:a}}function s9(e,t,n,r){if(r.document.caretPositionFromPoint){let a=r.document.caretPositionFromPoint(e,t);if(a){let o=r.document.createRange(),i=a.offsetNode;if(!i||i.nodeType!==Node.TEXT_NODE||r9(i,n,!0))return null;try{o.setStart(i,a.offset),o.setEnd(i,a.offset)}catch(s){return I.warn("getRangeFromPoint error",s),null}return o}return null}else return r.document.caretRangeFromPoint?r.document.caretRangeFromPoint(e,t):null}function u9(e,t,n){let r=0,a=(o,i,s,u)=>{if(++r>100||u===o)return o;let l=o.shadowRoot;if(!l||typeof l.elementFromPoint!="function")return o;let c=l.elementFromPoint(i,s);return c?a(c,i,s,o):o};return a(e,t,n)}m();function Lo(e,t,n,r,a){let o=t,i=Ws[o]||[],s="";e&&i&&i.length>0&&i.forEach(c=>{let{name:g}=c;if(e&&n&&n[g]){let p=n[g];if(["borderRadius"].includes(g)&&(p+="px"),s+=`--immersive-translate-theme-${o}-${g}: ${p}; `,t==="marker"&&g==="backgroundColor"&&typeof p=="string"){let{r:f,g:h,b:y}=i9(p);s+=`--immersive-translate-theme-${o}-${g}-rgb: ${f}, ${h}, ${y}; `}}}),r||(r="inherit"),e&&(s+=` .immersive-translate-target-inner { font-family: ${r}; } @@ -5189,53 +5189,53 @@ ${s}} `):t.rule.injectedCss&&(s+=t.rule.injectedCss),t.rule.additionalInjectedCss&&Array.isArray(t.rule.additionalInjectedCss)&&t.rule.additionalInjectedCss.length>0?s+=` `+t.rule.additionalInjectedCss.join(` `):t.rule.additionalInjectedCss&&(s+=` -`+t.rule.additionalInjectedCss)),s&&zn(e,s,"immersive-translate-dynamic-injected-css")}m();m();m();var RS=0;function d(e,t,n,r,a){var o,i,s={};for(i in t)i=="ref"?o=t[i]:s[i]=t[i];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--RS,__source:a,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(i in o)s[i]===void 0&&(s[i]=o[i]);return Be.vnode&&Be.vnode(u),u}function rm({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}m();function am(){let[e,t]=$(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}m();m();m();var l9={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},c9={...tn,"zh-CN":{...l9["zh-CN"],...tn["zh-CN"]},"zh-TW":{...l9["zh-TW"],...tn["zh-TW"]}},wi=c9;function Ma(e,t,n){return Ar(c9,e,t,Dr,n)}var s0=()=>Bn.filter(e=>e!=="auto"),Jt=(e,t,n,r)=>{let a=R2[e]||e,o=I2[e],i=O2[e],s={"zh-CN":o,"zh-TW":i,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};m();m();m();m();m();m();m();m();m();m();var _r=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(o=>{throw o});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return I.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=_l){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return I.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw I.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function d9(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${Ll}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function g9(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function om(e,t,n,r,a,o,i){if(I.debug(`autoSyncStrategy accessToken: ${e}`),t===null){I.debug("autoSyncStrategy settings is null");return}let s=new _r(e);try{let u=(await s.findByName(_l)).files;I.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:p}=c,f=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(I.debug("remoteUpdatedAt",f,"localUpdatedAt",h),f>h)I.debug("remote is newer, update local config",g),n(g),o&&o(!0);else if(f.getTime()===h.getTime())I.debug("remote and local are the same, do nothing"),o&&o(!1);else if(f(await e.removeAuthInfo(),Is()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Q.storage.local.get(Ta);if(t[Ta])return t[Ta]}static async removeAuthInfo(){return await Q.storage.local.remove(Ta)}static setAuthInfo(t){return Q.storage.local.set({[Ta]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(I.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await m9(n.access_token).then(o=>!0).catch(o=>!1))return Promise.resolve(n);let r=d9(this._state,this._redirectUrl);return I.debug(this.CLASSNAME,"auth url: "+r),Is()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Q.storage.local.set({[Os]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,o)=>{let i=()=>{Q.tabs.onUpdated.removeListener(s),Q.tabs.onRemoved.removeListener(u)},s=(p,f,h)=>{if(I.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===p){let y=new URL(h.url||""),C=g9(h.url);y.pathname.startsWith("/auth-done")&&C?.access_token&&(I.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:C.access_token}),r=!0,Q.tabs.remove(p),i())}},u=(p,f)=>{I.debug(this.CLASSNAME,"create tab onRemoved: "+p),(p===n||!r)&&(i(),o(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Q.windows===void 0?g=Q.tabs.create({url:t}).then(p=>{n=p.id}):g=Q.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(p=>{n=p.tabs[0].id}),g.then(()=>{Q.tabs.onUpdated.addListener(s),Q.tabs.onRemoved.addListener(u)}).catch(p=>{I.debug(this.CLASSNAME,"create tab failed: "+p),o(p)})})}};var OS="https://www.googleapis.com/oauth2/v3/tokeninfo",NS=Ll,US=Pe().REDIRECT_URL;function m9(e){if(!e)throw"Authorization failure";let t=`${OS}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((o,i)=>{a.status!=200&&i("Token validation error"),a.json().then(s=>{s.aud&&s.aud===NS?o(e):i("Token validation error")})})}return fetch(n).then(r)}function p9(e,t=!1){let n=US;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,o=window.location.port;n=`${window.location.protocol}//${a}${o?`:${o}`:""}/auth-done/`}return new Pa(e,n).auth(t)}function im(e,t=!1){return p9(e,t).then(n=>n.access_token||null)}m();m();m();function Fa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function jS(e,t){return e<>>32-t}function l0(e,t,n,r,a,o){return Fa(jS(Fa(Fa(t,e),Fa(r,o)),a),n)}function mn(e,t,n,r,a,o,i){return l0(t&n|~t&r,e,t,a,o,i)}function pn(e,t,n,r,a,o,i){return l0(t&r|n&~r,e,t,a,o,i)}function fn(e,t,n,r,a,o,i){return l0(t^n^r,e,t,a,o,i)}function hn(e,t,n,r,a,o,i){return l0(n^(t|~r),e,t,a,o,i)}function u0(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,o,i,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function sm(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=u0(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,o[n]=r[n]^1549556828;return i=u0(a.concat(sm(t)),512+t.length*8),f9(u0(o.concat(i),512+128))}function h9(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function um(e){return unescape(encodeURIComponent(e))}function b9(e){return HS(um(e))}function qS(e){return h9(b9(e))}function y9(e,t){return zS(um(e),um(t))}function WS(e,t){return h9(y9(e,t))}function qn(e,t,n){return t?n?y9(t,e):WS(t,e):n?b9(e):qS(e)}var Di=[];async function iu(e,t){return await new Promise((n,r)=>{let a=e,o=1,i=indexedDB.open(a,o);i.onsuccess=s=>{n(i.result)},i.onerror=s=>{r()},i.onupgradeneeded=s=>{let u=i.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function lm(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await VS(t,e)}async function cm(e){let t=qn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await $S(n,t)}async function $S(e,t){let n=await iu(e);return await new Promise((r,a)=>{if(!n)return a();let o="cache",s=n.transaction([o],"readonly").objectStore(o).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function VS(e,t){let n=await iu(e);return(await dm()).includes(e)||await KS(e),await new Promise(a=>{if(!n)return a(!1);let o="cache",s=n.transaction([o],"readwrite").objectStore(o).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function KS(e){let t="cache_list",n=await iu(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=o=>{n.close(),Di.push(e)},a.onerror=o=>{n.close()}}async function dm(){if(Di&&Di.length>0)return Di;let e=await iu(ee+"-cacheList","cache_list");return Di=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=o=>{e.close(),t(a.result)},a.onerror=o=>{e.close(),t([])}}),Di}async function gm(){try{let e=[];(await dm()).forEach(r=>{e.push(GS(r))});let n=await Promise.all(e);return Vs(n.reduce((r,a)=>r+a,0))}catch{return Vs(0)}}async function GS(e){let t=await iu(e),r=[...t.objectStoreNames].reduce((i,s)=>{let u=YS(t,s);return i.push(u),i},[]),a=await Promise.all(r);return t.close(),a.reduce((i,s)=>i+s,0)}async function YS(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,o=e.transaction([t]).objectStore(t).openCursor();o.onsuccess=i=>{let s=o.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},o.onerror=i=>r("error in "+t+": "+i)})}async function C9(){try{let t=(await dm()).map(r=>JS(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function JS(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}m();function QS(e,t){return Math.floor(Math.random()*(t-e+1))+e}var ZS=30,mm="RATE_LIMITER_TICKS",_o=class e{static strictTicks={};static clearStrictTicks(){eu(mm,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await t0(mm);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){I.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(o=>{setTimeout(()=>{r(o)},o)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await eu(mm,JSON.stringify(this.strictTicks))}catch(a){I.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=QS(4,ZS);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:o,interval:i}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var su=l1()?["action"]:["browser_action","page_action"],e7=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...su]},{id:Us,contexts:su},{id:js,contexts:su},{id:Hs,contexts:su},{id:v2,contexts:su}];async function c0(e){e=e||await pt(),I.debug("update ContextMenu",e);for(let t of e7){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=Ma(`browser.${t.id}`,e.interfaceLanguage);Q.contextMenus.update(t.id,{title:r,visible:n})}}m();function T9(e,t){let n=t;n||(n=Pe().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,o=new RegExp(a),i=n.match(o);return i?i[1]:""}m();function ki(e,t,n=[],r){let a=["notranslate"];return r&&a.push(B2),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${Ag}-theme-${e}`):a.push(`${kg}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(Ag):a.push(kg),a}function Ai(e){let t=["notranslate",Ol];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function v9(e,t,n){let{rule:r,state:a}=n,{translationTheme:o}=a,{variables:i,isVertical:s}=e;i=i||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ao(n,!0),p="afterend",f=g[0],h=g[1],y=`${f}(\\d+)${h}`,C=new RegExp(y,"g"),b=tt.sanitize(u);i.length>0&&(b=b.replace(C,P=>{let w=b.indexOf(P),v=b[w-1]===" ",L=b[w+P.length]===" ",T=P.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),j=Number(T);if(isNaN(j))return P;let R=i[j];if(R&&R.type==="element"){let M=R.value.outerHTML;return v||(M=" "+M),L||(M=M+" "),M}else I.error("variable type not supported",R,P);return P}));let x=ki(o,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(F2);let S=Ai(o),A="";return r.translationBlockStyle&&(A=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${A} class="${x.join(" ")}" ${wr}="1"><${r.targetWrapperTag} class="${S.join(" ")}" ${wr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${wr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:p}}m();function it(e){vg({type:"success",text:e})}function rn(e){vg({type:"error",text:e})}m();m();m();m();var pm={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Q.storage[n].get(r)},set:(e,t,n)=>Q.storage[n].set({[e]:t})};function d0(e,t,n){let[r]=$(()=>typeof t=="function"?t():t),[a]=$(n),[o,i]=$(r),[s,u]=$(!1),[l,c]=$("");le(()=>{pm.get(e,r,a).then(p=>{p[e]&&i(p[e]),u(!0),c("")}).catch(p=>{u(!1),c(p)})},[e,r,a]);let g=Ne(p=>{let f=typeof p=="function"?p(o):p;I.debug("new settings",f),pm.set(e,f,a).then(()=>{i(f),u(!0),c("")}).catch(h=>{i(f),u(!1),c(h)})},[a,e,o]);return[o,g,s,l]}m();function g0(e,t,n){let r=[];return function(){let[o,i,s,u]=d0(e,t,n),l=Ne(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(i),()=>{r.splice(r.indexOf(i),1)}),[i]),[o,l,s,u]}}function x9(e,t){return g0(e,t,"local")}function E9(e,t){return g0(e,t,"sync")}var t7="userConfig",n7=null,r7=E9(t7,n7);function $e(e){let[t,n,r,a]=r7(),o=Ne(i=>{let s=typeof i=="function"?i(t):i;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,o,r,a,n]}m();m();m();m();function m0(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:o,isPreWhitespace:i}=t,s=[],u={};for(let l=0;l2&&(b=`<${o[2]}${C}>`),u[C]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";p&&(y=Aa(fm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&un(c,a)){let C=Object.keys(u).length,b=`${o[0]}${C}${o[1]}`;o.length>2&&(b=`<${o[2]}${C}>`),u[C]=c;let x=hm(s).endsWith(" ")?" ":"",S=Aa(c.innerText||c.textContent),A=Aa(c.nextSibling).startsWith(" ")?" ":"",P=tu(x+S+A),w=P[0]+b+P[1];if(x===" ")w=w.trimStart();else if(!w.startsWith(" ")){let v=tu(c.previousSibling)[1];v===""&&(v=" "),w=v+w}s.push({text:w,type:"variable"})}else{let y=hm(s).endsWith(" ")?" ":"",C=Aa(c.innerText||c.textContent);p&&(C=Aa(fm(c)));let b=Aa(c.nextSibling).startsWith(" ")?" ":"",x=tu(y+C+b),S=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")S=S.trimStart();else{let A=tu(c.previousSibling)[1];A===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(A=" "),S=A+S}s.push({text:S,type:"text"})}else{let y=hm(s).endsWith(" ")?" ":"",C="";c.textContent&&(C=Aa(fm(c))),y===" "&&(C=C.trimStart()),s.push({text:C,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(p=s[c-1].text),c/g,">"))}e.targetText=tt.sanitize(e.targetText);let a=!1,o=e.text,i=o.split(" ").length,s=o.split(` -`).length;i<=n.blockMinWordCount&&o.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ao(t);if(l.length>2){let c=l[2];return a7({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=v9(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function fm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function a7(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:o,variables:i,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;i=i||[];let g=e.targetText;g=tt.sanitize(g);let p=g,f=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);i.length>0&&(p=p.replace(f,x=>{let S=p.indexOf(x),A=p[S-1]===" ",P=p[S+x.length]===" ",w=x.match(h);if(!w)return x;let v=w[1],L=Number(v);if(isNaN(L))return x;let D=i[Number(L)];if(D&&D.type==="element"){let T=D.value.outerHTML;return A||(T=" "+T),P||(T=T+" "),T}else if(D&&D.type==="text"){let T=D.value;return A||(T=" "+T),P||(T=T+" "),T}else I.error("variable type not supported",D,x);return x}));let y=ki(l,n,r||[],s),C=Ai(l),b="";return c&&(b=`style="${c}"`),p=`<${a} ${b} class="${y.join(" ")}" ${wr}="1"><${a} class="${C.join(" ")}" ${wr}="1">${p}`,n||(o==="smart"?p=`
${p}`:p=`${o}${p}`),n&&(o!=="smart"?p=`${o}${p}`:p=`<${a} class="notranslate" ${wr}="1"> ${p}`),u==="smart"?p=`${p}`:p=`${p}${u}`,{html:p,position:"afterend"}}function hm(e){let t=e[e.length-1];return t?t.text:""}function bm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let o=n[2],i=new RegExp(`<${o}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${o}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(i,c=>{let g=c.match(s);if(!g)return c;let p=g[1],f=Number(p);if(isNaN(f))return c;let h=r[p];return h||c})),u}else{let o=`${n[0]}(\\d+)${n[1]}`,i=new RegExp(o,"g");a=a.replace(i,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}m();m();m();m();m();m();var YV=D9(2),w9=D9(3);function D9(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),o=a.length-e+1;if(o<1)return r;for(;o--;)r[o]=a.slice(o,o+e);return r}}m();var o7=/\s+/g,i7=/[\t\n\v\f\r ]+/g;function k9(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?s7:u7;return String(e).replace(t.style==="html"?i7:o7,t.trim?l7(n):n)}function s7(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function u7(){return" "}function l7(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var A9={}.hasOwnProperty;function c7(e){return e==null?"":k9(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function d7(e){return w9(" "+c7(e)+" ")}function g7(e){let t=d7(e),n={},r=-1;for(;++rn&&(n=o,r=a)}return[r,n]}function C7(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function T7(e,t,n,r){t=x7(t,n,r);let a=[],o;if(t)for(o in t)p0.call(t,o)&&a.push([o,v7(e,t[o])]);return a.length===0?Cm():a.sort(E7)}function v7(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharactersi+s.length,0));let o=e.length-r;for(let i of F7){let s=i[1],u=i[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/o>.5?t==="zh-CN"?I9(e)?"zh-TW":"zh-CN":t:"auto"}var N9=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Tm=new Map(N9),B7=new Map(N9.map(([e,t])=>[t,e]));function U9(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>B7.get(s));!t&&t!==0&&(t=25);let a=h0(e);if(a!=="auto")return a;let o={minLength:t,whitelist:[...Tm.keys()]},i=M9(e,o);if(i&&i.length>0){if(i.length>1&&i[0][1]-i[1][1]<=.3)for(let c=0;c.5&&c/i.length<=.25){if(g=="eng"&&p<.95)break;return Tm.get(g)}}let[s,u]=i[0],l=Tm.get(s);if(l&&u>.9)return l}}catch(r){I.error(r)}return"auto"}m();m();var vm="Original";function Ze(){return vm}function Dn(e){vm=e,j9(vm)}m();var z9="auto",b0="auto",H9="auto";function q9(e){z9=e}function Xn(e){b0=e}function Mt(){return b0!=="auto"?b0:H9!=="auto"?H9:z9}function y0(){return b0}m();function Mo(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ra(e){try{if(!e||!Mo(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:o}=r;if(a&&o){let i=document.querySelector(a);if(!i)return"";t=i.getAttribute(o)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var Xe={},Ia=async function(e,t){let{method:n,data:r}=e,a=await Xe.updateGlobalContext(),o=Date.now();if(I.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Xe.translateTheWholePage(r),rt(gr,o);else if(n==="translateTheMainPage")await Xe.translateTheMainPage(r),rt(gr,o);else if(n==="translateToThePageEndImmediately")await Xe.translateToThePageEndImmediately(r),rt(gr,o);else if(n==="toggleTranslatePage")await Xe.toggleTranslatePage(r),rt(gr,o);else if(n==="toggleTranslateTheWholePage")await Xe.toggleTranslateTheWholePage(r),rt(gr,o);else if(n==="toggleTranslateTheMainPage")await Xe.toggleTranslateTheMainPage(r),rt(gr,o);else if(n==="toggleOnlyTransation")await Xe.ensureSwitchTranslationMode(r),rt(gr,o);else if(n==="translatePage")await Xe.translatePage(a,r),rt(gr,o);else if(n==="toggleTranslationMask")await Xe.toggleTranslationMask(r);else if(n==="restorePage")Xe.restorePage();else if(n==="retryFailedParagraphs")Xe.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Xe.switchTranslationMode(r.mode),await Xe.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Xe.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Pl,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Xe.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Ns,{detail:r}));else if(n==="translateWithOpenAI")await Xe.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Xe.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Xe.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Xe.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Xe.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Xe.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Xe.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")at()||await Xe.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!at())return JSON.stringify(a)}};function W9(e){Object.assign(Xe,e)}function $9(e){Object.assign(Xe,e)}function V9(e){Object.assign(Xe,e)}var R7=function(e,t){let{method:n,data:r}=e;if(I.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Ze();if(n==="getCurrentPageLanguage"){let a=Mt();return Xe.detectCurrentPageLanguage().catch(o=>{I.warn("detectCurrentPageLanguage failed",o)}),a}else{if(n==="setCurrentPageLanguageByClient")return Xn(r),Mt();if(n==="getContextString"){let a=Xe.getPureGlobalContext(),{articleNode:o,bodyNode:i,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Xe.getPureGlobalContext();return Ra(a?.rule)}}},C0,T0;function K9(){let e=v0();at()||I7(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function v0(){return C0||(C0=new ea("content_script",!1).getConnection("main",Ia),C0)}function I7(){return T0||(T0=new ea("content_script",!1).getConnection("main_sync",R7,{sync:!0}),T0)}m();var xm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],x0="https://transmart.qq.com/api/imt",ra=class e{static langMapReverse=new Map(xm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:x0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,o=e.langMapReverse.get(a);return o||a}};async function Pt(e){return await v0().sendMessage("background:main",e)}function de(e){return Al()?Jl({method:"request",data:e}):me()||kl()?(e.fetchPolyfill=globalThis.GM_fetch,mr(e)):Pt({method:"fetch",data:e})}function er(){return me()?pt():Pt({method:"getConfig"})}function kn(e){return me()?Do(e):Pt({method:"setUserConfig",data:e})}function An(){return me()?pr():Pt({method:"getUserConfig"})}function lu(){return me()?qt():Pt({method:"getLocalConfig"})}function E0(e){return me()?Wt(e):Pt({method:"setLocalConfig",data:e})}function G9(e){return me()?j1(e):Pt({method:"setBuildinConfig",data:e})}async function Oe(e){if(e.text){let n=h0(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(me()||We()){if(e.translateService&&!jl.includes(e.translateService))return Promise.resolve("auto");let r=U9(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Pt({method:"detectLanguage",data:e});return Promise.resolve(t)}function Y9(){return Pt({method:"detectTabLanguage"})}async function S0(e){let t=await Oe({text:e,pageLangs:["en"]});try{if(me()||We()){let n=e.substring(0,200);t=await ra.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function j9(e){let t=new CustomEvent(bo,{detail:e});if(document.dispatchEvent(t),me())return;v0().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function J9(e){return me()?cm(e):Pt({method:"queryParagraphCache",data:e})}async function Q9(e){if(me()){await lm(e);return}return Pt({method:"setParagraphCache",data:e})}async function Z9(){if(me())return Promise.resolve();await Pt({method:"mockRequest"})}function Li(e=!1,t=""){return me()?(Q.runtime.openOptionsPage(e,t),Promise.resolve()):Pt({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function w0(e=""){return me()||We()?Pe().OPTIONS_URL:Q.runtime.getURL("options.html")}function X9(e=""){return Q&&Q.runtime&&Q.runtime.getURL?Q.runtime.getURL("options.html"):""}function D0(e=!1){return me()?(Q.extra.openAboutPage(e),Promise.resolve()):Pt({method:"openAboutPage"})}function _i(e){return me()?(Q.extra.openInTab(e),Promise.resolve()):Pt({method:"openInTab",data:e})}function e6(e=!1){return me()?(Q.extra.openEbookViewerPage(e),Promise.resolve()):Pt({method:"openEbookViewerPage"})}function t6(e=!1){return me()?(Q.extra.openEbookBuilderPage(e),Promise.resolve()):Pt({method:"openEbookBuilderPage"})}function n6(e){We()}function Mi(e=!1,t){return me()?(Q.extra.openPdfViewerPage(e),Promise.resolve()):Pt({method:"openPdfViewerPage",data:{url:t}})}function r6(e=!1){return me()?(Q.extra.openSubtitleBuilderPage(e),Promise.resolve()):Pt({method:"openSubtitleBuilderPage"})}function Pi(e){return me()?Promise.resolve():Pt({method:"setBadge",data:{text:e}})}function a6(){return me()?(I.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Pt({method:"autoSyncLatestConfig"})}function k0(e,t=!1){return me()?Q.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function o6(e,t){return me()?_o.getDelay(e,t):Pt({method:"getDelay",data:{key:e,options:t}})}var ke=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,o=!1,i=!1,s=[],u=null,l=new Set;for(let C of a)C.from&&C.from!=="auto"&&l.add(C.from),C.refresh&&(o=!0),C.debug&&(i=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=b1(a,c,g)}catch(C){if(r)for(let b=0;bC));let p=[],f=[],h=(C,b,x)=>{let S="";if(b.translatedTexts&&b.translatedTexts[0]&&(S=b.translatedTexts[0]),f[C]||(f[C]=b,f[C].translatedTexts=Array(b.sentenceTotalParts).fill(null)),f[C].hasError)return;if(x){let w=x instanceof J?new J(x.name,x.message).initNetWork(x.status).initData(x.data):x;f[C].hasError=!0,b.callback&&b.callback(w,null,b.sentence);return}f[C].translatedTexts[b.partIndex]=S;let A=f[C],P=0;for(let w=0;w{let P=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(P=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:P,to:b.to,url:x,options:n,refresh:o,debug:i}),sourceTempSentences:b.tempSentences};{let w=P2;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(w=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],D=Lr(this.serviceConfig);if(b.tempSentences.forEach((H,B)=>{let k=Jg({text:H.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});H.force!==!0&&(k&&k.text&&k.text.trim().lengthB.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:H,from:P,to:b.to})}let T="";v&&v.length>=2?T=L.map((H,B)=>{let{item:k}=H;return B===L.length-1?k.text:k.text+v[0]+(B+1)+v[1]}).join(""):T=L.map(({item:H})=>H.text).join(w);let j=await this.translate({text:T,from:P,to:b.to,url:x,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:o,debug:i}),{text:R}=j,M=[];if(v&&v.length>=2){let H=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(H=v[2]);let B=new RegExp(H,"g");M=R.split(B)}else M=R.split(w);let O=[];if(M.length>L.length){for(let H=0;HH.text);return D=Lr(this.serviceConfig,!0),O.forEach((H,B)=>{let k=L[B],_=k.index,F=k.variables||{};Object.keys(F).length>0&&(H=bm({text:H,delimiters:D,variables:F})),N[_]=H}),{sourceTempSentences:b.tempSentences,text:N,from:j.from,to:j.to}}};p.push(A().then(P=>{let{text:w,sourceTempSentences:v}=P;for(let L=0;L{if(P instanceof J&&P.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let w=0;w{let b=C.sentence.text;return C.translatedTexts&&C.translatedTexts.length>0&&(b=C.translatedTexts.join("")),{...C.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],o=Lr(this.serviceConfig);if(this.serviceConfig&&o.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,p)=>{let f=Jg({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:o,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[p]!==!0&&(f&&f.text&&f.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){I.debug("formatAndTranslateList error",t,l)}let i=await this.translateList(n),{text:s}=i,u=t.text.map(l=>l);return o=Lr(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let p=g.index,f=g.variables,h=Object.keys(f);u[p]=l,h.length>0&&(u[p]=bm({text:l,delimiters:o,variables:f}))}}),{...i,text:u}}detectLanguageLocally(t){return Oe({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};m();m();var Fi="input is invalid type",Em=typeof window=="object",Oa=Em?window:{};Oa.JS_SHA256_NO_WINDOW&&(Em=!1);var O7=!Em&&typeof self=="object",N7=!Oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;N7?Oa=global:O7&&(Oa=self);var CG=!Oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,TG=typeof define=="function"&&define.amd,cu=!Oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Ce="0123456789abcdef".split(""),U7=[-2147483648,8388608,32768,128],fr=[24,16,8,0],A0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],L0=["hex","array","digest","arrayBuffer"],an=[];(Oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});cu&&(Oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var i6=function(e,t){return function(n){return new on(t,!0).update(n)[e]()}},u6=function(e){var t=i6("hex",e);t.create=function(){return new on(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[o>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};on.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=U7[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};on.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=this.blocks,l,c,g,p,f,h,y,C,b,x,S;for(l=16;l<64;++l)f=u[l-15],c=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,f=u[l-2],g=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(S=t&n,l=0;l<64;l+=4)this.first?(this.is224?(C=300032,f=u[0]-1413257819,s=f-150054599<<0,r=f+24177077<<0):(C=704751109,f=u[0]-210244248,s=f-1521486534<<0,r=f+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),C=e&t,p=C^e&n^S,y=a&o^~a&i,f=s+g+y+A0[l]+u[l],h=c+p,s=r+f<<0,r=f+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,p=b^r&t^C,y=s&a^~s&o,f=i+g+y+A0[l+1]+u[l+1],h=c+p,i=n+f<<0,n=f+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),x=n&r,p=x^n&e^b,y=i&s^~i&a,f=o+g+y+A0[l+2]+u[l+2],h=c+p,o=t+f<<0,t=f+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),S=t&n,p=S^t&r^x,y=o&i^~o&s,f=a+g+y+A0[l+3]+u[l+3],h=c+p,a=e+f<<0,e=f+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+o<<0,this.h6=this.h6+i<<0,this.h7=this.h7+s<<0};on.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=Ce[e>>28&15]+Ce[e>>24&15]+Ce[e>>20&15]+Ce[e>>16&15]+Ce[e>>12&15]+Ce[e>>8&15]+Ce[e>>4&15]+Ce[e&15]+Ce[t>>28&15]+Ce[t>>24&15]+Ce[t>>20&15]+Ce[t>>16&15]+Ce[t>>12&15]+Ce[t>>8&15]+Ce[t>>4&15]+Ce[t&15]+Ce[n>>28&15]+Ce[n>>24&15]+Ce[n>>20&15]+Ce[n>>16&15]+Ce[n>>12&15]+Ce[n>>8&15]+Ce[n>>4&15]+Ce[n&15]+Ce[r>>28&15]+Ce[r>>24&15]+Ce[r>>20&15]+Ce[r>>16&15]+Ce[r>>12&15]+Ce[r>>8&15]+Ce[r>>4&15]+Ce[r&15]+Ce[a>>28&15]+Ce[a>>24&15]+Ce[a>>20&15]+Ce[a>>16&15]+Ce[a>>12&15]+Ce[a>>8&15]+Ce[a>>4&15]+Ce[a&15]+Ce[o>>28&15]+Ce[o>>24&15]+Ce[o>>20&15]+Ce[o>>16&15]+Ce[o>>12&15]+Ce[o>>8&15]+Ce[o>>4&15]+Ce[o&15]+Ce[i>>28&15]+Ce[i>>24&15]+Ce[i>>20&15]+Ce[i>>16&15]+Ce[i>>12&15]+Ce[i>>8&15]+Ce[i>>4&15]+Ce[i&15];return this.is224||(u+=Ce[s>>28&15]+Ce[s>>24&15]+Ce[s>>20&15]+Ce[s>>16&15]+Ce[s>>12&15]+Ce[s>>8&15]+Ce[s>>4&15]+Ce[s&15]),u};on.prototype.toString=on.prototype.hex;on.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,o>>24&255,o>>16&255,o>>8&255,o&255,i>>24&255,i>>16&255,i>>8&255,i&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};on.prototype.array=on.prototype.digest;on.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function _0(e,t,n){var r,a=typeof e;if(a==="string"){var o=[],i=e.length,s=0,u;for(r=0;r>6,o[s++]=128|u&63):u<55296||u>=57344?(o[s++]=224|u>>12,o[s++]=128|u>>6&63,o[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),o[s++]=240|u>>18,o[s++]=128|u>>12&63,o[s++]=128|u>>6&63,o[s++]=128|u&63);e=o}else if(a==="object"){if(e===null)throw new Error(Fi);if(cu&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!cu||!ArrayBuffer.isView(e)))throw new Error(Fi)}else throw new Error(Fi);e.length>64&&(e=new on(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}on.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}_0.prototype=new on;_0.prototype.finalize=function(){if(on.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();on.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),on.prototype.finalize.call(this)}};var Bi=u6();Bi.sha256=Bi;Bi.sha224=u6(!0);Bi.sha256.hmac=l6();Bi.sha224.hmac=l6(!0);var c6=Bi;var d6=c6.sha256;function hr(e){return Promise.resolve(d6(e))}function M0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Na(e,t){let n=d6.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function g6(e,t){let n=await Na(e,t);return M0(n)}async function P0(e,t){let n=j7(t),r=await Na(e,n);return M0(r)}function j7(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var m6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],du=class e extends ke{static langMap=new Map(m6);maxTextGroupLength=50;static langMapReverse=new Map(m6.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new J("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetText,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetTextList,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=`${o}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await hr(a)].join(` +`+t.rule.additionalInjectedCss)),s&&zn(e,s,"immersive-translate-dynamic-injected-css")}m();m();m();var RS=0;function d(e,t,n,r,a){var o,i,s={};for(i in t)i=="ref"?o=t[i]:s[i]=t[i];var u={type:e,props:s,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--RS,__source:a,__self:r};if(typeof e=="function"&&(o=e.defaultProps))for(i in o)s[i]===void 0&&(s[i]=o[i]);return Be.vnode&&Be.vnode(u),u}function nm({value:e,defaultCase:t=null,cases:n}){return e==null?null:d(xe,{children:n[e]!=null?n[e]:t})}m();function rm(){let[e,t]=$(location.hash);return le(()=>{let n=()=>t(location.hash);return globalThis.addEventListener("hashchange",n,!1),()=>{globalThis.removeEventListener("hashchange",n)}},[]),e}m();m();m();var l9={"zh-CN":{"languages.en":"\u82F1\u8BED","languages.ja":"\u65E5\u8BED","languages.ko":"\u97E9\u8BED","languages.es":"\u897F\u73ED\u7259\u8BED","languages.fr":"\u6CD5\u8BED","languages.de":"\u5FB7\u8BED","languages.it":"\u610F\u5927\u5229\u8BED","languages.pt":"\u8461\u8404\u7259\u8BED","languages.ru":"\u4FC4\u8BED","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"},"zh-TW":{"languages.en":"\u82F1\u8A9E","languages.ja":"\u65E5\u8A9E","languages.ko":"\u97D3\u8A9E","languages.es":"\u897F\u73ED\u7259\u8A9E","languages.fr":"\u6CD5\u8A9E","languages.de":"\u5FB7\u8A9E","languages.it":"\u610F\u5927\u5229\u8A9E","languages.pt":"\u8461\u8404\u7259\u8A9E","languages.ru":"\u4FC4\u8A9E","languages.wyw":"\u6587\u8A00\u6587","languages.":"\u5168\u90E8"}},c9={...nn,"zh-CN":{...l9["zh-CN"],...nn["zh-CN"]},"zh-TW":{...l9["zh-TW"],...nn["zh-TW"]}},wi=c9;function Ma(e,t,n){return Ar(c9,e,t,Dr,n)}var s0=()=>Bn.filter(e=>e!=="auto"),Jt=(e,t,n,r)=>{let a=R2[e]||e,o=I2[e],i=O2[e],s={"zh-CN":o,"zh-TW":i,en:a};if(n)return s[e]?s[e]:a;if(s[t]){let u=s[t];return r||e==="auto"||e==="placeholder"?u:`${u} (${a})`}else return a};m();m();m();m();m();m();m();m();m();m();var _r=class{accessToken;constructor(t){this.accessToken=t}async listAll(){let t=[],n="";do{let{nextPageToken:r,files:a}=await this.list(n).catch(o=>{throw o});t.push(...a),n=r||""}while(n);return t}async getConfig(t){try{return await(await fetch(`https://www.googleapis.com/drive/v3/files/${t}?alt=media`,{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(n){return I.error("get config error, use default",n),{}}}async delete(t){await fetch(`https://www.googleapis.com/drive/v3/files/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${this.accessToken}`}})}findByName(t){return this.list(void 0,`name = '${t}'`)}uploadConfig(t,n=_l){let r=new Blob([JSON.stringify(t,null,2)],{type:"application/json"});return this.upload({name:n,parents:["appDataFolder"],mimeType:"application/json"},r)}updateConfig(t,n){let r=new Blob([JSON.stringify(n,null,2)],{type:"application/json"});return this.updateContent(t,r)}async upload(t,n){let r=new FormData;r.append("metadata",new Blob([JSON.stringify(t)],{type:"application/json; charset=UTF-8"})),r.append("file",n);let a=await fetch("https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart",{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`},body:r});return a.ok?await a.json():Promise.reject(a.text())}async list(t,n){let r=new URL("https://www.googleapis.com/drive/v3/files");t&&r.searchParams.append("pageToken",t),n&&r.searchParams.append("q",n),r.searchParams.append("spaces","appDataFolder"),r.searchParams.append("fields","files(id,name,createdTime,modifiedTime,size)"),r.searchParams.append("pageSize","100"),r.searchParams.append("orderBy","createdTime desc");try{return I.debug("list api:",r.toString(),this.accessToken),await(await fetch(r.toString(),{headers:{Authorization:`Bearer ${this.accessToken}`}})).json()}catch(a){throw I.error("fetch google ip error",a),a}}async updateContent(t,n){return await(await fetch(`https://www.googleapis.com/upload/drive/v3/files/${t}?uploadType=media`,{method:"PATCH",headers:{Authorization:`Bearer ${this.accessToken}`},body:n})).text()}};function d9(e,t){let n=["https://www.googleapis.com/auth/drive.appdata"];return`https://accounts.google.com/o/oauth2/v2/auth?client_id=${Ll}&response_type=token&redirect_uri=${encodeURIComponent(t)}&scope=${encodeURIComponent(n.join(" "))}&state=${encodeURIComponent(JSON.stringify(e))}`}function g9(e){let t=e.match(/[#?](.*)/);return!t||t.length<1?null:{access_token:new URLSearchParams(t[1].split("#")[0]).get("access_token")}}async function am(e,t,n,r,a,o,i){if(I.debug(`autoSyncStrategy accessToken: ${e}`),t===null){I.debug("autoSyncStrategy settings is null");return}let s=new _r(e);try{let u=(await s.findByName(_l)).files;I.debug("files",u);let l=u[0]?.id,c=null;if(l&&(c=await s.getConfig(l).then(g=>({fileId:l,config:g}))),c){let{config:g,fileId:p}=c,f=g.updatedAt?new Date(g.updatedAt):new Date(0),h=t.updatedAt?new Date(t.updatedAt):new Date(0);if(I.debug("remoteUpdatedAt",f,"localUpdatedAt",h),f>h)I.debug("remote is newer, update local config",g),n(g),o&&o(!0);else if(f.getTime()===h.getTime())I.debug("remote and local are the same, do nothing"),o&&o(!1);else if(f(await e.removeAuthInfo(),Os()&&globalThis.location.reload(),r))}static async getAuthInfo(){let t=await Q.storage.local.get(Ta);if(t[Ta])return t[Ta]}static async removeAuthInfo(){return await Q.storage.local.remove(Ta)}static setAuthInfo(t){return Q.storage.local.set({[Ta]:t})}async auth(t=!1){let n=await e.getAuthInfo();if(I.debug(this.CLASSNAME,"token from cache:",n),n&&n.access_token&&await m9(n.access_token).then(o=>!0).catch(o=>!1))return Promise.resolve(n);let r=d9(this._state,this._redirectUrl);return I.debug(this.CLASSNAME,"auth url: "+r),Os()?this.userscriptAuthWorkflow(r,t):this.extensionAuthWorkflow(r).then(a=>(e.setAuthInfo(a),a))}async userscriptAuthWorkflow(t,n){return n&&await Q.storage.local.set({[Ns]:!0}),globalThis.open(t,"_self"),Promise.resolve({})}extensionAuthWorkflow(t){let n,r=!1;return new Promise((a,o)=>{let i=()=>{Q.tabs.onUpdated.removeListener(s),Q.tabs.onRemoved.removeListener(u)},s=(p,f,h)=>{if(I.debug(this.CLASSNAME,"create tab onUpdated: "+h.url),n===p){let y=new URL(h.url||""),C=g9(h.url);y.pathname.startsWith("/auth-done")&&C?.access_token&&(I.debug(this.CLASSNAME,"auth done: "+h.url),a({access_token:C.access_token}),r=!0,Q.tabs.remove(p),i())}},u=(p,f)=>{I.debug(this.CLASSNAME,"create tab onRemoved: "+p),(p===n||!r)&&(i(),o(new Error("auth failed")))},l=Math.min(500,screen.availWidth),c=Math.min(650,screen.availHeight),g;Q.windows===void 0?g=Q.tabs.create({url:t}).then(p=>{n=p.id}):g=Q.windows.create({url:t,type:"popup",width:l,height:c,left:Math.round((screen.width-l)/2),top:Math.round((screen.height-c)/2)}).then(p=>{n=p.tabs[0].id}),g.then(()=>{Q.tabs.onUpdated.addListener(s),Q.tabs.onRemoved.addListener(u)}).catch(p=>{I.debug(this.CLASSNAME,"create tab failed: "+p),o(p)})})}};var OS="https://www.googleapis.com/oauth2/v3/tokeninfo",NS=Ll,US=Pe().REDIRECT_URL;function m9(e){if(!e)throw"Authorization failure";let t=`${OS}?access_token=${e}`,n=new Request(t,{method:"GET"});function r(a){return new Promise((o,i)=>{a.status!=200&&i("Token validation error"),a.json().then(s=>{s.aud&&s.aud===NS?o(e):i("Token validation error")})})}return fetch(n).then(r)}function p9(e,t=!1){let n=US;if(typeof window<"u"&&window.location.protocol.startsWith("http")){let a=window.location.hostname,o=window.location.port;n=`${window.location.protocol}//${a}${o?`:${o}`:""}/auth-done/`}return new Pa(e,n).auth(t)}function om(e,t=!1){return p9(e,t).then(n=>n.access_token||null)}m();m();m();function Fa(e,t){var n=(e&65535)+(t&65535),r=(e>>16)+(t>>16)+(n>>16);return r<<16|n&65535}function jS(e,t){return e<>>32-t}function l0(e,t,n,r,a,o){return Fa(jS(Fa(Fa(t,e),Fa(r,o)),a),n)}function mn(e,t,n,r,a,o,i){return l0(t&n|~t&r,e,t,a,o,i)}function pn(e,t,n,r,a,o,i){return l0(t&r|n&~r,e,t,a,o,i)}function fn(e,t,n,r,a,o,i){return l0(t^n^r,e,t,a,o,i)}function hn(e,t,n,r,a,o,i){return l0(n^(t|~r),e,t,a,o,i)}function u0(e,t){e[t>>5]|=128<>>9<<4)+14]=t;var n,r,a,o,i,s=1732584193,u=-271733879,l=-1732584194,c=271733878;for(n=0;n>5]>>>t%32&255);return n}function im(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t>5]|=(e.charCodeAt(t/8)&255)<16&&(r=u0(r,e.length*8)),n=0;n<16;n+=1)a[n]=r[n]^909522486,o[n]=r[n]^1549556828;return i=u0(a.concat(im(t)),512+t.length*8),f9(u0(o.concat(i),512+128))}function h9(e){var t="0123456789abcdef",n="",r,a;for(a=0;a>>4&15)+t.charAt(r&15);return n}function sm(e){return unescape(encodeURIComponent(e))}function b9(e){return HS(sm(e))}function qS(e){return h9(b9(e))}function y9(e,t){return zS(sm(e),sm(t))}function WS(e,t){return h9(y9(e,t))}function qn(e,t,n){return t?n?y9(t,e):WS(t,e):n?b9(e):qS(e)}var Di=[];async function su(e,t){return await new Promise((n,r)=>{let a=e,o=1,i=indexedDB.open(a,o);i.onsuccess=s=>{n(i.result)},i.onerror=s=>{r()},i.onupgradeneeded=s=>{let u=i.result,l=t||"cache";u.createObjectStore(l,{keyPath:"key"})}})}async function um(e){let t=`${ee}-${e.service}@${e.from}->${e.to}`;return await VS(t,e)}async function lm(e){let t=qn(e.originalText),n=`${ee}-${e.service}@${e.from}->${e.to}`;return await $S(n,t)}async function $S(e,t){let n=await su(e);return await new Promise((r,a)=>{if(!n)return a();let o="cache",s=n.transaction([o],"readonly").objectStore(o).get(t);s.onsuccess=u=>{n.close();let l=s.result;r(l)},s.onerror=u=>{n.close(),a()}})}async function VS(e,t){let n=await su(e);return(await cm()).includes(e)||await KS(e),await new Promise(a=>{if(!n)return a(!1);let o="cache",s=n.transaction([o],"readwrite").objectStore(o).put(t);s.onsuccess=u=>{n.close(),a(!0)},s.onerror=u=>{n.close(),a(!1)}})}async function KS(e){let t="cache_list",n=await su(ee+"-cacheList",t),a=n.transaction([t],"readwrite").objectStore(t).put({key:e});a.onsuccess=o=>{n.close(),Di.push(e)},a.onerror=o=>{n.close()}}async function cm(){if(Di&&Di.length>0)return Di;let e=await su(ee+"-cacheList","cache_list");return Di=await new Promise(t=>{let n="cache_list",a=e.transaction([n],"readonly").objectStore(n).getAllKeys();a.onsuccess=o=>{e.close(),t(a.result)},a.onerror=o=>{e.close(),t([])}}),Di}async function dm(){try{let e=[];(await cm()).forEach(r=>{e.push(GS(r))});let n=await Promise.all(e);return Ks(n.reduce((r,a)=>r+a,0))}catch{return Ks(0)}}async function GS(e){let t=await su(e),r=[...t.objectStoreNames].reduce((i,s)=>{let u=YS(t,s);return i.push(u),i},[]),a=await Promise.all(r);return t.close(),a.reduce((i,s)=>i+s,0)}async function YS(e,t){return await new Promise((n,r)=>{if(e==null)return r();let a=0,o=e.transaction([t]).objectStore(t).openCursor();o.onsuccess=i=>{let s=o.result;if(s){let u=s.value,l=JSON.stringify(u);a+=l.length,s.continue()}else n(a)},o.onerror=i=>r("error in "+t+": "+i)})}async function C9(){try{let t=(await cm()).map(r=>JS(r));return!!(await Promise.all(t)).every(r=>r)}catch{return!1}}async function JS(e){return await new Promise(t=>{let n=indexedDB.deleteDatabase(e);n.onsuccess=()=>{t(!0)},n.onerror=r=>{t(!1)}})}m();function QS(e,t){return Math.floor(Math.random()*(t-e+1))+e}var ZS=30,gm="RATE_LIMITER_TICKS",_o=class e{static strictTicks={};static clearStrictTicks(){tu(gm,"{}")}static async getStrictTicks(t,n){if(n)return this.strictTicks[t]||[];try{let r=await t0(gm);r&&(this.strictTicks=JSON.parse(r)||{})}catch(r){I.debug("Error setting rate limiter ticks",r),this.strictTicks[t]=[]}finally{return this.strictTicks[t]||[]}}static wait(t,n){return new Promise((r,a)=>{e.getDelay(t,n).then(o=>{setTimeout(()=>{r(o)},o)})})}static async setStrictTicks(t,n,r){try{if(this.strictTicks[t]=n,r)return;await tu(gm,JSON.stringify(this.strictTicks))}catch(a){I.debug("Error setting rate limiter ticks",a)}}static async getDelay(t,n,r=!1){if(!r){let l=QS(4,ZS);await xn(l)}let a=await this.getStrictTicks(t,r)||[],{limit:o,interval:i}=n,s=Date.now();if(a.length=u?(a.push(s),await this.setStrictTicks(t,a,r),0):(a.push(u),await this.setStrictTicks(t,a,r),u-s)}};var uu=l1()?["action"]:["browser_action","page_action"],e7=[{id:"toggleTranslatePage",contexts:["page","frame","selection",...uu]},{id:js,contexts:uu},{id:Hs,contexts:uu},{id:zs,contexts:uu},{id:v2,contexts:uu}];async function c0(e){e=e||await ft(),I.debug("update ContextMenu",e);for(let t of e7){let n=!0;e.isShowContextMenu===!1&&t.id==="toggleTranslatePage"&&(n=!1);let r=Ma(`browser.${t.id}`,e.interfaceLanguage);Q.contextMenus.update(t.id,{title:r,visible:n})}}m();function T9(e,t){let n=t;n||(n=Pe().IMMERSIVE_TRANSLATE_INJECTED_CSS||"");let a=`${`--immersive-translate-${e}`}: (.+?);`,o=new RegExp(a),i=n.match(o);return i?i[1]:""}m();function ki(e,t,n=[],r){let a=["notranslate"];return r&&a.push(B2),e&&(a.push(`${ee}-target-translation-theme-${e}`),t?a.push(`${kg}-theme-${e}`):a.push(`${Dg}-theme-${e}`)),n.length>0&&a.push(...n),t?a.push(kg):a.push(Dg),a}function Ai(e){let t=["notranslate",Ol];return e&&t.push(`${ee}-target-translation-theme-${e}-inner`),t}function v9(e,t,n){let{rule:r,state:a}=n,{translationTheme:o}=a,{variables:i,isVertical:s}=e;i=i||[];let{text:u}=t,{wrapperPrefix:l,wrapperSuffix:c}=r,g=Ao(n,!0),p="afterend",f=g[0],h=g[1],y=`${f}(\\d+)${h}`,C=new RegExp(y,"g"),b=nt.sanitize(u);i.length>0&&(b=b.replace(C,P=>{let w=b.indexOf(P),v=b[w-1]===" ",L=b[w+P.length]===" ",T=P.replace(new RegExp(g[0],"g"),"").replace(new RegExp(g[1],"g"),""),j=Number(T);if(isNaN(j))return P;let R=i[j];if(R&&R.type==="element"){let M=R.value.outerHTML;return v||(M=" "+M),L||(M=M+" "),M}else I.error("variable type not supported",R,P);return P}));let x=ki(o,e.inline,r.translationClasses||[],e.preWhitespace);s&&x.push(F2);let S=Ai(o),A="";return r.translationBlockStyle&&(A=`style="${r.translationBlockStyle}"`),b=`<${n.rule.targetWrapperTag} ${A} class="${x.join(" ")}" ${wr}="1"><${r.targetWrapperTag} class="${S.join(" ")}" ${wr}="1">${b}`,e.inline||(l==="smart"?b=`
${b}`:b=`${l}${b}`),e.inline&&(l!=="smart"?b=`${l}${b}`:b=`<${r.targetWrapperTag} class="notranslate" ${wr}="1"> ${b}`),c==="smart"?b=`${b}`:b=`${b}${c}`,{html:b,position:p}}m();function st(e){Tg({type:"success",text:e})}function an(e){Tg({type:"error",text:e})}m();m();m();m();var mm={get:(e,t,n)=>{let r=t===void 0?e:{[e]:t};return Q.storage[n].get(r)},set:(e,t,n)=>Q.storage[n].set({[e]:t})};function d0(e,t,n){let[r]=$(()=>typeof t=="function"?t():t),[a]=$(n),[o,i]=$(r),[s,u]=$(!1),[l,c]=$("");le(()=>{mm.get(e,r,a).then(p=>{p[e]&&i(p[e]),u(!0),c("")}).catch(p=>{u(!1),c(p)})},[e,r,a]);let g=Ne(p=>{let f=typeof p=="function"?p(o):p;I.debug("new settings",f),mm.set(e,f,a).then(()=>{i(f),u(!0),c("")}).catch(h=>{i(f),u(!1),c(h)})},[a,e,o]);return[o,g,s,l]}m();function g0(e,t,n){let r=[];return function(){let[o,i,s,u]=d0(e,t,n),l=Ne(c=>{for(let g of r)g(c)},[]);return le(()=>(r.push(i),()=>{r.splice(r.indexOf(i),1)}),[i]),[o,l,s,u]}}function x9(e,t){return g0(e,t,"local")}function E9(e,t){return g0(e,t,"sync")}var t7="userConfig",n7=null,r7=E9(t7,n7);function Ve(e){let[t,n,r,a]=r7(),o=Ne(i=>{let s=typeof i=="function"?i(t):i;s&&(s.updatedAt=new Date().toISOString()),n(s),e&&e(s)},[t]);return[t,o,r,a,n]}m();m();m();m();function m0(e,t){let n=e.original||e,r=null,{stayOriginalSelectors:a,delimiters:o,isPreWhitespace:i}=t,s=[],u={};for(let l=0;l2&&(b=`<${o[2]}${C}>`),u[C]=c,s.push({text:b,type:"variable"})}else s.push({text:c.textContent||"",type:"text"});else{let y=c.textContent||"";p&&(y=Aa(pm(c))),s.push({text:y,type:"text"})}else if(c.nodeType===Node.ELEMENT_NODE)if(c&&ln(c,a)){let C=Object.keys(u).length,b=`${o[0]}${C}${o[1]}`;o.length>2&&(b=`<${o[2]}${C}>`),u[C]=c;let x=fm(s).endsWith(" ")?" ":"",S=Aa(c.innerText||c.textContent),A=Aa(c.nextSibling).startsWith(" ")?" ":"",P=nu(x+S+A),w=P[0]+b+P[1];if(x===" ")w=w.trimStart();else if(!w.startsWith(" ")){let v=nu(c.previousSibling)[1];v===""&&(v=" "),w=v+w}s.push({text:w,type:"variable"})}else{let y=fm(s).endsWith(" ")?" ":"",C=Aa(c.innerText||c.textContent);p&&(C=Aa(pm(c)));let b=Aa(c.nextSibling).startsWith(" ")?" ":"",x=nu(y+C+b),S=x[0]+(c.innerText?.trim()||c.textContent?.trim()||"")+x[1];if(y===" ")S=S.trimStart();else{let A=nu(c.previousSibling)[1];A===""&&(c.nodeName==="A"||c.nodeName==="CODE")&&(A=" "),S=A+S}s.push({text:S,type:"text"})}else{let y=fm(s).endsWith(" ")?" ":"",C="";c.textContent&&(C=Aa(pm(c))),y===" "&&(C=C.trimStart()),s.push({text:C,type:"text"})}}if(s&&s.length>0){let l="";for(let c=0;c0&&(p=s[c-1].text),c/g,">"))}e.targetText=nt.sanitize(e.targetText);let a=!1,o=e.text,i=o.split(" ").length,s=o.split(` +`).length;i<=n.blockMinWordCount&&o.length<=n.blockMinTextCount&&s<2&&(a=!0);let u={id:Number(e.id),elements:[],isVertical:!1,rootFrame:e.commonAncestorContainer,text:e.text,variables:r,inline:a,preWhitespace:e.isPreWhitespace||!1,languageByLocal:"auto",languageByClient:"auto"},l=Ao(t);if(l.length>2){let c=l[2];return a7({delimiterTag:c,targetText:e.targetText,inline:a,preWhitespace:e.isPreWhitespace||!1,wrapperPrefix:t.rule.wrapperPrefix,wrapperSuffix:t.rule.wrapperSuffix,targetWrapperTag:t.rule.targetWrapperTag,translationTheme:t.state.translationTheme,translationBlockStyle:t.rule.translationBlockStyle,translationClasses:t.rule.translationClasses,variables:r}).html}else{let c=v9(u,{id:Number(e.id),url:"https://google.com",text:e.targetText,from:"auto",to:"auto",fromByClient:"auto"},t);return c.html}}function pm(e){return(e?.innerText||e.textContent||"").replace(/\s+/g," ")||""}function a7(e){let{delimiterTag:t,inline:n,translationClasses:r,targetWrapperTag:a,wrapperPrefix:o,variables:i,preWhitespace:s,wrapperSuffix:u,translationTheme:l,translationBlockStyle:c}=e;i=i||[];let g=e.targetText;g=nt.sanitize(g);let p=g,f=new RegExp(`<${t}(\\d+)>(.*?)`,"g"),h=new RegExp(`<${t}(\\d+)>`);i.length>0&&(p=p.replace(f,x=>{let S=p.indexOf(x),A=p[S-1]===" ",P=p[S+x.length]===" ",w=x.match(h);if(!w)return x;let v=w[1],L=Number(v);if(isNaN(L))return x;let D=i[Number(L)];if(D&&D.type==="element"){let T=D.value.outerHTML;return A||(T=" "+T),P||(T=T+" "),T}else if(D&&D.type==="text"){let T=D.value;return A||(T=" "+T),P||(T=T+" "),T}else I.error("variable type not supported",D,x);return x}));let y=ki(l,n,r||[],s),C=Ai(l),b="";return c&&(b=`style="${c}"`),p=`<${a} ${b} class="${y.join(" ")}" ${wr}="1"><${a} class="${C.join(" ")}" ${wr}="1">${p}`,n||(o==="smart"?p=`
${p}`:p=`${o}${p}`),n&&(o!=="smart"?p=`${o}${p}`:p=`<${a} class="notranslate" ${wr}="1"> ${p}`),u==="smart"?p=`${p}`:p=`${p}${u}`,{html:p,position:"afterend"}}function fm(e){let t=e[e.length-1];return t?t.text:""}function hm(e){let{text:t,delimiters:n,variables:r}=e,a=t;if(n.length>2){let o=n[2],i=new RegExp(`<${o}(\\d+)>(.*?)`,"g"),s=new RegExp(`<${o}(\\d+)>`),u=t;return Object.keys(r).length>0&&(u=u.replace(i,c=>{let g=c.match(s);if(!g)return c;let p=g[1],f=Number(p);if(isNaN(f))return c;let h=r[p];return h||c})),u}else{let o=`${n[0]}(\\d+)${n[1]}`,i=new RegExp(o,"g");a=a.replace(i,s=>{let l=s.replace(new RegExp(n[0],"g"),"").replace(new RegExp(n[1],"g"),""),c=Number(l);return isNaN(c)?s:r[c]?r[c]:s})}return a}m();m();m();m();m();m();var YV=D9(2),w9=D9(3);function D9(e){if(typeof e!="number"||Number.isNaN(e)||e<1||e===Number.POSITIVE_INFINITY)throw new Error("`"+e+"` is not a valid argument for `n-gram`");return t;function t(n){let r=[];if(n==null)return r;let a=typeof n.slice=="function"?n:String(n),o=a.length-e+1;if(o<1)return r;for(;o--;)r[o]=a.slice(o,o+e);return r}}m();var o7=/\s+/g,i7=/[\t\n\v\f\r ]+/g;function k9(e,t){t?typeof t=="string"&&(t={style:t}):t={};let n=t.preserveLineEndings?s7:u7;return String(e).replace(t.style==="html"?i7:o7,t.trim?l7(n):n)}function s7(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function u7(){return" "}function l7(e){return t;function t(n,r,a){return r===0||r+n.length===a.length?"":e(n)}}var A9={}.hasOwnProperty;function c7(e){return e==null?"":k9(String(e).replace(/[\u0021-\u0040]+/g," ")).trim().toLowerCase()}function d7(e){return w9(" "+c7(e)+" ")}function g7(e){let t=d7(e),n={},r=-1;for(;++rn&&(n=o,r=a)}return[r,n]}function C7(e,t){let n=e.match(t);return(n?n.length:0)/e.length||0}function T7(e,t,n,r){t=x7(t,n,r);let a=[],o;if(t)for(o in t)p0.call(t,o)&&a.push([o,v7(e,t[o])]);return a.length===0?ym():a.sort(E7)}function v7(e,t){let n=0,r=-1;for(;++rt.traditionalCharacters?(t.detectedCharacters="simplified",t.detectionRate=t.simplifiedCharacters/t.traditionalCharacters|1):t.simplifiedCharactersi+s.length,0));let o=e.length-r;for(let i of F7){let s=i[1],u=i[0],l=e.match(s),c=l?l.length:0;c>n&&(n=c,t=u)}return n*2.5/o>.5?t==="zh-CN"?I9(e)?"zh-TW":"zh-CN":t:"auto"}var N9=[["afr","af"],["amh","am"],["arb","ar"],["azj","az"],["bel","be"],["bul","bg"],["ben","bn"],["bos","bs"],["cat","ca"],["ceb","ceb"],["ces","cs"],["dan","da"],["deu","de"],["ell","el"],["eng","en"],["epo","eo"],["spa","es"],["est","et"],["fas","fa"],["fin","fi"],["fra","fr"],["gax","ga"],["glg","gl"],["guj","gu"],["hau","ha"],["heb","he"],["hin","hi"],["hrv","hr"],["hun","hu"],["hye","hy"],["ind","id"],["ibo","ig"],["ita","it"],["jpn","ja"],["jav","jw"],["kat","ka"],["kaz","kk"],["khm","km"],["kan","kn"],["kor","ko"],["ckb","ku"],["lao","lo"],["lit","lt"],["lav","lv"],["min","mi"],["mkd","mk"],["mal","ml"],["mar","mr"],["mya","my"],["nep","ne"],["nld","nl"],["nob","no"],["nya","ny"],["pan","pa"],["pol","pl"],["pbu","ps"],["por","pt"],["ron","ro"],["rus","ru"],["sin","si"],["slk","sk"],["slv","sl"],["sna","sn"],["som","so"],["als","sq"],["srp","sr"],["sun","su"],["swe","sv"],["swh","sw"],["tam","ta"],["tel","te"],["tgk","tg"],["tha","th"],["toi","to"],["tur","tr"],["ukr","uk"],["urd","ur"],["uzn","uz"],["vie","vi"],["xho","xh"],["ydd","yi"],["yor","yo"],["cmn","zh-CN"],["zul","zu"]],Cm=new Map(N9),B7=new Map(N9.map(([e,t])=>[t,e]));function U9(e,t,n=["en"]){if(!e)return"auto";try{let r=n.map(s=>B7.get(s));!t&&t!==0&&(t=25);let a=h0(e);if(a!=="auto")return a;let o={minLength:t,whitelist:[...Cm.keys()]},i=M9(e,o);if(i&&i.length>0){if(i.length>1&&i[0][1]-i[1][1]<=.3)for(let c=0;c.5&&c/i.length<=.25){if(g=="eng"&&p<.95)break;return Cm.get(g)}}let[s,u]=i[0],l=Cm.get(s);if(l&&u>.9)return l}}catch(r){I.error(r)}return"auto"}m();m();var Tm="Original";function Ze(){return Tm}function Dn(e){Tm=e,j9(Tm)}m();var z9="auto",b0="auto",H9="auto";function q9(e){z9=e}function Xn(e){b0=e}function Mt(){return b0!=="auto"?b0:H9!=="auto"?H9:z9}function y0(){return b0}m();function Mo(e){return e?.id?.endsWith("pdfWebPage")||!1}function Ra(e){try{if(!e||!Mo(e))return"";let t="";if(e.pdfUrlExtractRule.attribute&&e.pdfUrlExtractRule.selector){let r=e.pdfUrlExtractRule,{selector:a,attribute:o}=r;if(a&&o){let i=document.querySelector(a);if(!i)return"";t=i.getAttribute(o)||""}}else t=document.querySelector("embed[type='application/pdf']")?.getAttribute("src")||"";if(t.startsWith("about"))return"";if(!t.startsWith("/"))return t;let n=new URL(location.href);return t.startsWith("//")?n.protocol+t:n.protocol+"//"+n.host+t}catch{return""}}var Xe={},Ia=async function(e,t){let{method:n,data:r}=e,a=await Xe.updateGlobalContext(),o=Date.now();if(I.debug(`content script received message: ${n}`,r||" "),n==="translateTheWholePage")await Xe.translateTheWholePage(r),at(gr,o);else if(n==="translateTheMainPage")await Xe.translateTheMainPage(r),at(gr,o);else if(n==="translateToThePageEndImmediately")await Xe.translateToThePageEndImmediately(r),at(gr,o);else if(n==="toggleTranslatePage")await Xe.toggleTranslatePage(r),at(gr,o);else if(n==="toggleTranslateTheWholePage")await Xe.toggleTranslateTheWholePage(r),at(gr,o);else if(n==="toggleTranslateTheMainPage")await Xe.toggleTranslateTheMainPage(r),at(gr,o);else if(n==="toggleOnlyTransation")await Xe.ensureSwitchTranslationMode(r),at(gr,o);else if(n==="translatePage")await Xe.translatePage(a,r),at(gr,o);else if(n==="toggleTranslationMask")await Xe.toggleTranslationMask(r);else if(n==="restorePage")Xe.restorePage();else if(n==="retryFailedParagraphs")Xe.retryFailedParagraphs();else if(n==="switchTranslationMode"){if(a.rule.isPdf)return;r&&r.mode&&(await Xe.switchTranslationMode(r.mode),await Xe.reloadSubtitleWithTranslationModeChanged())}else if(n==="autoEnableSubtitleChanged")Xe.autoEnableSubtitleChanged(a,r);else if(n=="shareToDraft")globalThis.document.dispatchEvent(new CustomEvent(Pl,{detail:r}));else if(n=="toggleTranslateToThePageEndImmediately")await Xe.toggleTranslateToThePageEndImmediately(r);else if(n==="toggleMouseHoverTranslateDirectly")globalThis.document.dispatchEvent(new CustomEvent(Us,{detail:r}));else if(n==="translateWithOpenAI")await Xe.translatePageWithTranslationService("openai",r);else if(n==="translateWithGoogle")await Xe.translatePageWithTranslationService("google",r);else if(n==="translateWithDeepL")await Xe.translatePageWithTranslationService("deepl",r);else if(n==="translateWithBing")await Xe.translatePageWithTranslationService("bing",r);else if(n==="translateWithTransmart")await Xe.translatePageWithTranslationService("transmart",r);else if(n==="translateWithGemini")await Xe.translatePageWithTranslationService("gemini",r);else if(n==="translateInputBox")await Xe.translateInputBoxWithShortcut(a);else if(n!=="updateGlobalCtx"){if(n==="toggleVideoSubtitlePreTranslation")ot()||await Xe.toggleVideoSubtitlePreTranslation();else if(n==="getAsyncContextString"&&!ot())return JSON.stringify(a)}};function W9(e){Object.assign(Xe,e)}function $9(e){Object.assign(Xe,e)}function V9(e){Object.assign(Xe,e)}var R7=function(e,t){let{method:n,data:r}=e;if(I.debug(`content script received sync message: ${n}`,r||" "),n==="ping")return"pong";if(n==="getPageStatus")return Ze();if(n==="getCurrentPageLanguage"){let a=Mt();return Xe.detectCurrentPageLanguage().catch(o=>{I.warn("detectCurrentPageLanguage failed",o)}),a}else{if(n==="setCurrentPageLanguageByClient")return Xn(r),Mt();if(n==="getContextString"){let a=Xe.getPureGlobalContext(),{articleNode:o,bodyNode:i,...s}=a;return JSON.stringify(s)}else if(n=="getPdfWebUrl"){let a=Xe.getPureGlobalContext();return Ra(a?.rule)}}},C0,T0;function K9(){let e=v0();ot()||I7(),e.sendMessage("popup:main_sync",{method:"ready"}).catch(n=>{})}function v0(){return C0||(C0=new ea("content_script",!1).getConnection("main",Ia),C0)}function I7(){return T0||(T0=new ea("content_script",!1).getConnection("main_sync",R7,{sync:!0}),T0)}m();var vm=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","ja"],["ko","ko"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],x0="https://transmart.qq.com/api/imt",ra=class e{static langMapReverse=new Map(vm.map(([t,n])=>[n,t]));static getClientKey(){return btoa("transmart_crx_"+navigator.userAgent).slice(0,100)}static async detectLanguageRemotelyByTransmart(t){let n={header:{fn:"text_analysis",client_key:e.getClientKey()},text:t.slice(0,280)},r=await de({url:x0,method:"POST",body:JSON.stringify(n)});if(r.header.ret_code!=="succ")throw new Error(r.message||r.header.ret_code);let a=r.language,o=e.langMapReverse.get(a);return o||a}};async function Pt(e){return await v0().sendMessage("background:main",e)}function de(e){return Al()?Jl({method:"request",data:e}):me()||kl()?(e.fetchPolyfill=globalThis.GM_fetch,mr(e)):Pt({method:"fetch",data:e})}function er(){return me()?ft():Pt({method:"getConfig"})}function kn(e){return me()?Do(e):Pt({method:"setUserConfig",data:e})}function An(){return me()?pr():Pt({method:"getUserConfig"})}function cu(){return me()?qt():Pt({method:"getLocalConfig"})}function E0(e){return me()?Wt(e):Pt({method:"setLocalConfig",data:e})}function G9(e){return me()?j1(e):Pt({method:"setBuildinConfig",data:e})}async function Oe(e){if(e.text){let n=h0(e.text);if(n!=="auto")return Promise.resolve(n)}else return"auto";if(me()||$e()){if(e.translateService&&!jl.includes(e.translateService))return Promise.resolve("auto");let r=U9(e.text,e.minLength,e.pageLangs);return Promise.resolve(r)}let t=await Pt({method:"detectLanguage",data:e});return Promise.resolve(t)}function Y9(){return Pt({method:"detectTabLanguage"})}async function S0(e){let t=await Oe({text:e,pageLangs:["en"]});try{if(me()||$e()){let n=e.substring(0,200);t=await ra.detectLanguageRemotelyByTransmart(n)}}catch{}return t}function j9(e){let t=new CustomEvent(bo,{detail:e});if(document.dispatchEvent(t),me())return;v0().sendMessage("popup:main_sync",{method:"setPageStatus",data:e}).catch(r=>{})}function J9(e){return me()?lm(e):Pt({method:"queryParagraphCache",data:e})}async function Q9(e){if(me()){await um(e);return}return Pt({method:"setParagraphCache",data:e})}async function Z9(){if(me())return Promise.resolve();await Pt({method:"mockRequest"})}function Li(e=!1,t=""){return me()?(Q.runtime.openOptionsPage(e,t),Promise.resolve()):Pt({method:"openOptionsPage",data:{newTab:e,pageRoute:t}})}function w0(e=""){return me()||$e()?Pe().OPTIONS_URL:Q.runtime.getURL("options.html")}function X9(e=""){return Q&&Q.runtime&&Q.runtime.getURL?Q.runtime.getURL("options.html"):""}function D0(e=!1){return me()?(Q.extra.openAboutPage(e),Promise.resolve()):Pt({method:"openAboutPage"})}function _i(e){return me()?(Q.extra.openInTab(e),Promise.resolve()):Pt({method:"openInTab",data:e})}function e6(e=!1){return me()?(Q.extra.openEbookViewerPage(e),Promise.resolve()):Pt({method:"openEbookViewerPage"})}function t6(e=!1){return me()?(Q.extra.openEbookBuilderPage(e),Promise.resolve()):Pt({method:"openEbookBuilderPage"})}function n6(e){$e()}function Mi(e=!1,t){return me()?(Q.extra.openPdfViewerPage(e),Promise.resolve()):Pt({method:"openPdfViewerPage",data:{url:t}})}function r6(e=!1){return me()?(Q.extra.openSubtitleBuilderPage(e),Promise.resolve()):Pt({method:"openSubtitleBuilderPage"})}function Pi(e){return me()?Promise.resolve():Pt({method:"setBadge",data:{text:e}})}function a6(){return me()?(I.warn("autoSyncLatestConfig is not support in monkey"),Promise.resolve()):Pt({method:"autoSyncLatestConfig"})}function k0(e,t=!1){return me()?Q.extra.openInTab(e,t):globalThis.open(e,t?"_blank":"_self"),Promise.resolve()}function o6(e,t){return me()?_o.getDelay(e,t):Pt({method:"getDelay",data:{key:e,options:t}})}var ke=class{static langMap=new Map;serviceConfig;generalConfig;maxTextLength=1800;isSupportList=!0;maxTextGroupLength=50;requestTimeout=30*1e3;retry=2;translationOptions;minTextCount=2;constructor(t,n,r){this.serviceConfig=t,this.generalConfig=n,this.translationOptions=r,t?.retry&&(this.retry=t.retry),t?.requestTimeout&&(this.requestTimeout=Number(t.requestTimeout)),r&&r.minTextCount&&(this.minTextCount=r.minTextCount)}async init(){}getMaxTextGroupLength(){return this.maxTextGroupLength}getRateLimiter(){let t=this.getDefaultRateLimit()||{limit:7,interval:1250},n=this.serviceConfig;return n?.limit&&(t.limit=Number(n.limit)),n?.interval&&(t.interval=Number(n.interval)),t}formatRateLimit(t){return t.limit<1&&(t.interval=Math.round(1e3/t.limit),t.limit=1),t}getDefaultRateLimit(){return{limit:7,interval:1250}}getCacheKeyPrefix(){return""}translate(t){throw new Error("Not implemented")}translateList(t){throw new Error("Not implemented")}async multipleTranslate(t,n,r){if(t.sentences.length===0)return{sentences:[]};let{sentences:a}=t,o=!1,i=!1,s=[],u=null,l=new Set;for(let C of a)C.from&&C.from!=="auto"&&l.add(C.from),C.refresh&&(o=!0),C.debug&&(i=!0);let c=this.maxTextLength;this.serviceConfig&&this.serviceConfig.maxTextLengthPerRequest&&(c=this.serviceConfig.maxTextLengthPerRequest);let g=this.maxTextGroupLength;this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequest&&(g=this.serviceConfig.maxTextGroupLengthPerRequest),this.translationOptions&&this.translationOptions.sourceProgram&&["videoSubtitle","subtitle"].includes(this.translationOptions.sourceProgram)&&this.serviceConfig&&this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle&&(g=this.serviceConfig.maxTextGroupLengthPerRequestForSubtitle);try{s=b1(a,c,g)}catch(C){if(r)for(let b=0;bC));let p=[],f=[],h=(C,b,x)=>{let S="";if(b.translatedTexts&&b.translatedTexts[0]&&(S=b.translatedTexts[0]),f[C]||(f[C]=b,f[C].translatedTexts=Array(b.sentenceTotalParts).fill(null)),f[C].hasError)return;if(x){let w=x instanceof J?new J(x.name,x.message).initNetWork(x.status).initData(x.data):x;f[C].hasError=!0,b.callback&&b.callback(w,null,b.sentence);return}f[C].translatedTexts[b.partIndex]=S;let A=f[C],P=0;for(let w=0;w{let P=b.from;if(b.fromByClient&&b.fromByClient!=="auto"&&(P=b.fromByClient),this.isSupportList)return{...await this.formatAndTranslateList({text:b.tempSentences.map(v=>v.text),forces:b.tempSentences.map(v=>v.force),xpaths:b.tempSentences.map(v=>v.xpath||""),from:P,to:b.to,url:x,options:n,refresh:o,debug:i}),sourceTempSentences:b.tempSentences};{let w=P2;this.serviceConfig&&this.serviceConfig.translationTextSeparator&&(w=this.serviceConfig.translationTextSeparator);let v=null;this.serviceConfig&&this.serviceConfig.newlinePlaceholderDelimiters&&(v=this.serviceConfig.newlinePlaceholderDelimiters);let L=[],D=Lr(this.serviceConfig);if(b.tempSentences.forEach((H,B)=>{let k=Yg({text:H.text,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:D,glossaries:this.translationOptions.glossaries,excludeRegexps:this.translationOptions.excludeRegexps,targetLanguage:b.to});H.force!==!0&&(k&&k.text&&k.text.trim().lengthB.text);return Promise.resolve({sourceTempSentences:b.tempSentences,text:H,from:P,to:b.to})}let T="";v&&v.length>=2?T=L.map((H,B)=>{let{item:k}=H;return B===L.length-1?k.text:k.text+v[0]+(B+1)+v[1]}).join(""):T=L.map(({item:H})=>H.text).join(w);let j=await this.translate({text:T,from:P,to:b.to,url:x,options:{...n,rawTextArrayLength:L.length,sourceProgram:this.translationOptions.sourceProgram||""},refresh:o,debug:i}),{text:R}=j,M=[];if(v&&v.length>=2){let H=`${v[0]}\\d+${v[1]}`;v&&v.length>=3&&(H=v[2]);let B=new RegExp(H,"g");M=R.split(B)}else M=R.split(w);let O=[];if(M.length>L.length){for(let H=0;HH.text);return D=Lr(this.serviceConfig,!0),O.forEach((H,B)=>{let k=L[B],_=k.index,F=k.variables||{};Object.keys(F).length>0&&(H=hm({text:H,delimiters:D,variables:F})),N[_]=H}),{sourceTempSentences:b.tempSentences,text:N,from:j.from,to:j.to}}};p.push(A().then(P=>{let{text:w,sourceTempSentences:v}=P;for(let L=0;L{if(P instanceof J&&P.initData({translationService:this.translationOptions.translationService,isLogin:!!this.translationOptions.userToken,isPro:this.translationOptions.isPro}),r){for(let w=0;w{let b=C.sentence.text;return C.translatedTexts&&C.translatedTexts.length>0&&(b=C.translatedTexts.join("")),{...C.sentence,text:b}})}}async formatAndTranslateList(t){let n={...t},{forces:r}=t,a=[],o=Lr(this.serviceConfig);if(this.serviceConfig&&o.length>0)try{let{text:l,xpaths:c}=t;if(l.forEach((g,p)=>{let f=Yg({text:g,_systemExcludeWordRegex:this.generalConfig._systemExcludeWordRegex,delimiters:o,excludeRegexps:this.translationOptions.excludeRegexps,glossaries:this.translationOptions.glossaries,targetLanguage:t.to});r&&r[p]!==!0&&(f&&f.text&&f.text.trim().lengthg.text),n.xpaths=a.map(g=>g.xpath)}catch(l){I.debug("formatAndTranslateList error",t,l)}let i=await this.translateList(n),{text:s}=i,u=t.text.map(l=>l);return o=Lr(this.serviceConfig,!0),s.forEach((l,c)=>{let g=a[c];if(g){let p=g.index,f=g.variables,h=Object.keys(f);u[p]=l,h.length>0&&(u[p]=hm({text:l,delimiters:o,variables:f}))}}),{...i,text:u}}detectLanguageLocally(t){return Oe({text:t,minLength:18,pageLangs:[Mt(),"en"]})}detectLanguageRemotely(t){return Promise.resolve("auto")}detectLanguage(t){return t.length>=50?this.detectLanguageLocally(t):this.detectLanguageRemotely(t)}};m();m();var Fi="input is invalid type",xm=typeof window=="object",Oa=xm?window:{};Oa.JS_SHA256_NO_WINDOW&&(xm=!1);var O7=!xm&&typeof self=="object",N7=!Oa.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;N7?Oa=global:O7&&(Oa=self);var CG=!Oa.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,TG=typeof define=="function"&&define.amd,du=!Oa.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Te="0123456789abcdef".split(""),U7=[-2147483648,8388608,32768,128],fr=[24,16,8,0],A0=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],L0=["hex","array","digest","arrayBuffer"],on=[];(Oa.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"});du&&(Oa.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var i6=function(e,t){return function(n){return new sn(t,!0).update(n)[e]()}},u6=function(e){var t=i6("hex",e);t.create=function(){return new sn(e)},t.update=function(a){return t.create().update(a)};for(var n=0;n>2]|=e[a]<>2]|=r<>2]|=(192|r>>6)<>2]|=(128|r&63)<=57344?(s[o>>2]|=(224|r>>12)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<>2]|=(240|r>>18)<>2]|=(128|r>>12&63)<>2]|=(128|r>>6&63)<>2]|=(128|r&63)<=64?(this.block=s[16],this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}};sn.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=U7[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}};sn.prototype.hash=function(){var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=this.blocks,l,c,g,p,f,h,y,C,b,x,S;for(l=16;l<64;++l)f=u[l-15],c=(f>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,f=u[l-2],g=(f>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,u[l]=u[l-16]+c+u[l-7]+g<<0;for(S=t&n,l=0;l<64;l+=4)this.first?(this.is224?(C=300032,f=u[0]-1413257819,s=f-150054599<<0,r=f+24177077<<0):(C=704751109,f=u[0]-210244248,s=f-1521486534<<0,r=f+143694565<<0),this.first=!1):(c=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),g=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),C=e&t,p=C^e&n^S,y=a&o^~a&i,f=s+g+y+A0[l]+u[l],h=c+p,s=r+f<<0,r=f+h<<0),c=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),g=(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7),b=r&e,p=b^r&t^C,y=s&a^~s&o,f=i+g+y+A0[l+1]+u[l+1],h=c+p,i=n+f<<0,n=f+h<<0,c=(n>>>2|n<<30)^(n>>>13|n<<19)^(n>>>22|n<<10),g=(i>>>6|i<<26)^(i>>>11|i<<21)^(i>>>25|i<<7),x=n&r,p=x^n&e^b,y=i&s^~i&a,f=o+g+y+A0[l+2]+u[l+2],h=c+p,o=t+f<<0,t=f+h<<0,c=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),g=(o>>>6|o<<26)^(o>>>11|o<<21)^(o>>>25|o<<7),S=t&n,p=S^t&r^x,y=o&i^~o&s,f=a+g+y+A0[l+3]+u[l+3],h=c+p,a=e+f<<0,e=f+h<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0,this.h4=this.h4+a<<0,this.h5=this.h5+o<<0,this.h6=this.h6+i<<0,this.h7=this.h7+s<<0};sn.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=Te[e>>28&15]+Te[e>>24&15]+Te[e>>20&15]+Te[e>>16&15]+Te[e>>12&15]+Te[e>>8&15]+Te[e>>4&15]+Te[e&15]+Te[t>>28&15]+Te[t>>24&15]+Te[t>>20&15]+Te[t>>16&15]+Te[t>>12&15]+Te[t>>8&15]+Te[t>>4&15]+Te[t&15]+Te[n>>28&15]+Te[n>>24&15]+Te[n>>20&15]+Te[n>>16&15]+Te[n>>12&15]+Te[n>>8&15]+Te[n>>4&15]+Te[n&15]+Te[r>>28&15]+Te[r>>24&15]+Te[r>>20&15]+Te[r>>16&15]+Te[r>>12&15]+Te[r>>8&15]+Te[r>>4&15]+Te[r&15]+Te[a>>28&15]+Te[a>>24&15]+Te[a>>20&15]+Te[a>>16&15]+Te[a>>12&15]+Te[a>>8&15]+Te[a>>4&15]+Te[a&15]+Te[o>>28&15]+Te[o>>24&15]+Te[o>>20&15]+Te[o>>16&15]+Te[o>>12&15]+Te[o>>8&15]+Te[o>>4&15]+Te[o&15]+Te[i>>28&15]+Te[i>>24&15]+Te[i>>20&15]+Te[i>>16&15]+Te[i>>12&15]+Te[i>>8&15]+Te[i>>4&15]+Te[i&15];return this.is224||(u+=Te[s>>28&15]+Te[s>>24&15]+Te[s>>20&15]+Te[s>>16&15]+Te[s>>12&15]+Te[s>>8&15]+Te[s>>4&15]+Te[s&15]),u};sn.prototype.toString=sn.prototype.hex;sn.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,a=this.h4,o=this.h5,i=this.h6,s=this.h7,u=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,n>>24&255,n>>16&255,n>>8&255,n&255,r>>24&255,r>>16&255,r>>8&255,r&255,a>>24&255,a>>16&255,a>>8&255,a&255,o>>24&255,o>>16&255,o>>8&255,o&255,i>>24&255,i>>16&255,i>>8&255,i&255];return this.is224||u.push(s>>24&255,s>>16&255,s>>8&255,s&255),u};sn.prototype.array=sn.prototype.digest;sn.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function _0(e,t,n){var r,a=typeof e;if(a==="string"){var o=[],i=e.length,s=0,u;for(r=0;r>6,o[s++]=128|u&63):u<55296||u>=57344?(o[s++]=224|u>>12,o[s++]=128|u>>6&63,o[s++]=128|u&63):(u=65536+((u&1023)<<10|e.charCodeAt(++r)&1023),o[s++]=240|u>>18,o[s++]=128|u>>12&63,o[s++]=128|u>>6&63,o[s++]=128|u&63);e=o}else if(a==="object"){if(e===null)throw new Error(Fi);if(du&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!du||!ArrayBuffer.isView(e)))throw new Error(Fi)}else throw new Error(Fi);e.length>64&&(e=new sn(t,!0).update(e).array());var l=[],c=[];for(r=0;r<64;++r){var g=e[r]||0;l[r]=92^g,c[r]=54^g}sn.call(this,t,n),this.update(c),this.oKeyPad=l,this.inner=!0,this.sharedMemory=n}_0.prototype=new sn;_0.prototype.finalize=function(){if(sn.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();sn.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),sn.prototype.finalize.call(this)}};var Bi=u6();Bi.sha256=Bi;Bi.sha224=u6(!0);Bi.sha256.hmac=l6();Bi.sha224.hmac=l6(!0);var c6=Bi;var d6=c6.sha256;function hr(e){return Promise.resolve(d6(e))}function M0(e){return Array.from(new Uint8Array(e)).map(r=>r.toString(16).padStart(2,"0")).join("")}function Na(e,t){let n=d6.hmac.create(t);return n.update(e),Promise.resolve(n.array())}async function g6(e,t){let n=await Na(e,t);return M0(n)}async function P0(e,t){let n=j7(t),r=await Na(e,n);return M0(r)}function j7(e){let t=[];return e.replace(/../g,function(n){return t.push(parseInt(n,16)),""}),new Uint8Array(t).buffer}var m6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],gu=class e extends ke{static langMap=new Map(m6);maxTextGroupLength=50;static langMapReverse=new Map(m6.map(([t,n])=>[n,t]));static getUTCDate(t){let n=t.getUTCFullYear(),r=`${t.getUTCMonth()+1}`.padStart(2,"0"),a=`${t.getUTCDate()}`.padStart(2,"0");return`${n}-${r}-${a}`}secretId="";secretKey="";isSupportList=!0;constructor(t,n,r){if(super(t,n,r),!t||!t.secretId||!t.secretKey)throw new J("secretId and secretKey are required");this.secretId=t.secretId?.trim(),this.secretKey=t.secretKey?.trim()}getDefaultRateLimit(){return{limit:3,interval:1350}}async translate(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceText:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslate",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetText,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=JSON.stringify({ProjectId:0,Source:e.langMap.get(r)||"auto",SourceTextList:n,Target:e.langMap.get(a)||a}),i=await this.signedRequest({secretId:this.secretId,secretKey:this.secretKey,action:"TextTranslateBatch",payload:o,service:"tmt",version:"2018-03-21"});return{text:i.Response.TargetTextList,from:e.langMapReverse.get(i.Response.Source)||r,to:e.langMapReverse.get(i.Response.Target)||a}}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=`${o}.tencentcloudapi.com`,u=new Date,l=`${new Date().valueOf()}`.slice(0,10),c=["POST","/","","content-type:application/json; charset=utf-8",`host:${s}`,"","content-type;host",await hr(a)].join(` `),g=e.getUTCDate(u),p=["TC3-HMAC-SHA256",l,`${g}/${o}/tc3_request`,await hr(c)].join(` -`),f=await g6(g,`TC3${n}`),h=await P0(o,f),y=await P0("tc3_request",h),C=await P0(p,y),b=await de({retry:this.retry,url:`https://${o}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":i,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${o}/tc3_request, SignedHeaders=content-type;host, Signature=${C}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new J(b.Response.Error.Message);return b}};m();var p6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],H7={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},gu=class e extends ke{static langMap=new Map(p6);static langMapReverse=new Map(p6.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,o=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),i=await de({url:`https://wxapp.translator.qq.com/api/translate?${o}`,retry:this.retry,method:"GET",headers:H7,timeout:this.requestTimeout});return{text:i.targetText,from:e.langMapReverse.get(i.source)||r,to:e.langMapReverse.get(i.target)||a}}};m();var f6=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Po=class e extends ke{static langMap=new Map(f6);static langMapReverse=new Map(f6.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=nn(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,o,i);if(!s)throw new J("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new J("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,o,i);if(!s)throw new J("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new J("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let o="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:o,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),o=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:o,timeout:this.requestTimeout})}}};m();m();m();function z7(e,t){return t?e+(t-e%t):e}function q7(e,t){return e.split(t).length-1}function Sm(e){let t=Date.now(),n=1;for(let r of e)n+=q7(r,"i");return z7(t,n)}function W7(e,t){return Math.floor(Math.random()*(t-e+1))+e}function wm(){return W7(1e6,1e8)}m();m();m();var Dm="https://www2.deepl.com/jsonrpc",km="auto",h6=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];m();function $7(e=h6){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function Am(e){return $7()[e.toLowerCase()]}var V7={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function K7(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function G7(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function Y7(e,t,n,r,a,o,i){let s=wm(),u=G7(r,n),l=[];t.forEach(p=>{l.push({text:p,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Sm(t);let c=await de({retry:2,method:"POST",url:e,body:K7(u),headers:V7}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(p=>{g.text.push(p.text)}),g}async function b6(e,t,n,r=km,a,o,i){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:Y7(e,t,Am(n),Am(r)??"auto",a,o,i):{text:[],from:r,to:n}}var y6=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ri=class e extends ke{static langMap=new Map(y6);static langMapReverse=new Map(y6.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=Dm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=nn(Dm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,o=await b6(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:o.text,from:e.langMapReverse.get(o.from),to:e.langMapReverse.get(o.to)}}};m();var mu=class e extends ke{static langMap=new Map(xm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=ra.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),o=e.langMap.get(a)||a,i=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Pe(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=C6());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:o,orig_url:u},target:{lang:i}}),g=await de({url:x0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new J(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,o=Pe(),i=t.url;if(o.INSTALL_FROM==="firefox_store"&&(i=C6()),r.length===1){let f=await this.translate({from:n,text:r[0],to:a,url:i,options:t.options});return{text:[f.text],from:f.from,to:f.to}}let u=await this.detectLanguage(r.join(` -`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:i},target:{lang:c},type:"plain"}),p=await de({url:x0,body:g,method:"POST"});if(p.header.ret_code!=="succ")throw new J(p.message||p.header.ret_code);return{text:p.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return ra.detectLanguageRemotelyByTransmart(t)}};function C6(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}m();m();function Lm(){return Math.random()>=.1}var Ii=class extends ke{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Lm())throw new J("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await Z9(),!Lm())throw new J("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(o=>{let i=o.match(/^\s*/)[0].length;return o.slice(0,i)+"\u6A21\u62DF\uFF1A"+o.slice(i,-6)})}}};m();var v6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],_m=new Map(v6),T6=new Map(v6.map(([e,t])=>[t,e])),Mm=class e extends ke{static langMap=_m;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new J("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,o=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:_m.get(r)||"auto",target_lang:_m.get(a)||a}),timeout:this.requestTimeout});if(o.status){let i=o;return i.result&&a=="zh-TW",{text:i.result,from:T6.get(i.source_lang),to:T6.get(i.target_lang)}}else throw new J(o.msg)}},F0=Mm;m();var x6=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],pu=new Map(x6),J7=new Map(x6.map(([e,t])=>[t,e])),Pm=class extends ke{static langMap=pu;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=gn()||Jn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new J("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new J("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new J("authKey are required");if(!this.authKey)throw new J("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=nn(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=nn(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=nn(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=nn(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=nn(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:o,merged:i}=this.optimizationText(t),s={source_lang:pu.get(n)||"",target_lang:pu.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);o.forEach(C=>{u.append("text",C)});let l=u.toString(),c={text:o,source_lang:pu.get(n)||"auto",target_lang:pu.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let p,f={};t.refresh&&(f={"X-Refresh":"True"}),t.debug&&(f={...f,"X-Debug":"True"}),this.provider==="pro"?p=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...f,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?p=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...f,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):p=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(p,i,!!t.debug),y=h.map(C=>C.text);if(r==="zh-TW"){let C=this.serviceConfig||{};C&&C.googleApiUrl&&(C.apiUrl=C.googleApiUrl);let x=await new Po(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(S=>S.text).join(` +`),f=await g6(g,`TC3${n}`),h=await P0(o,f),y=await P0("tc3_request",h),C=await P0(p,y),b=await de({retry:this.retry,url:`https://${o}.tencentcloudapi.com`,method:"POST",headers:{"Content-Type":"application/json; charset=utf-8",Host:s,"X-TC-Action":r,"X-TC-Timestamp":l,"X-TC-Region":"ap-beijing","X-TC-Version":i,Authorization:`TC3-HMAC-SHA256 Credential=${t}/${g}/${o}/tc3_request, SignedHeaders=content-type;host, Signature=${C}`},body:a,timeout:this.requestTimeout});if(b instanceof Error)throw b;if(b.Response&&b.Response.Error&&b.Response.Error.Message)throw new J(b.Response.Error.Message);return b}};m();var p6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh-TW"],["de","de"],["en","en"],["es","es"],["fr","fr"],["id","id"],["it","it"],["ja","jp"],["ko","kr"],["ms","ms"],["pt","pt"],["ru","ru"],["th","th"],["tr","tr"],["vi","vi"]],H7={"content-type":"application/json",Host:"wxapp.translator.qq.com","User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 16_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.32(0x18002035) NetType/WIFI Language/zh_TW",Referer:"https://servicewechat.com/wxb1070eabc6f9107e/117/page-frame.html"},mu=class e extends ke{static langMap=new Map(p6);static langMapReverse=new Map(p6.map(([t,n])=>[n,t]));isSupportList=!1;constructor(t,n,r){super(t,n,r)}async translate(t){let{text:n,from:r,to:a}=t,o=new URLSearchParams({source:r,target:a,sourceText:n,platform:"WeChat_APP",candidateLangs:"en|zh",guid:"oqdgX0SIwhvM0TmqzTHghWBvfk22"}).toString(),i=await de({url:`https://wxapp.translator.qq.com/api/translate?${o}`,retry:this.retry,method:"GET",headers:H7,timeout:this.requestTimeout});return{text:i.targetText,from:e.langMapReverse.get(i.source)||r,to:e.langMapReverse.get(i.target)||a}}};m();var f6=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["sa","sa"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["fil","tl"],["tr","tr"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zu","zu"]],Po=class e extends ke{static langMap=new Map(f6);static langMapReverse=new Map(f6.map(([t,n])=>[n,t]));isSupportList=!1;apiUrl="https://translate.googleapis.com/translate_a/single";constructor(t,n,r){super(t,n,r),t?.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}getDefaultRateLimit(){return{limit:10,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchWithoutToken(n,o,i);if(!s)throw new J("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new J("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async translateXml(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=e.langMap.get(r)||"auto",i=e.langMap.get(a)||a,s=await this.fetchXmlWithoutToken(n,o,i);if(!s)throw new J("google translate NETWORK_ERROR");if(!s.data[0]||s.data[0].length<=0)throw new J("google translate API_SERVER_ERROR");return{text:s.data[0].map(l=>l[0]).filter(Boolean).join(""),from:e.langMapReverse.get(s.data[2])||"auto",to:a}}async fetchXmlWithoutToken(t,n,r){let o="https://translate.googleapis.com/translate_a/t?"+new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}).toString();return{data:await de({retry:this.retry,url:o,timeout:this.requestTimeout})}}async fetchWithoutToken(t,n,r){let a=new URLSearchParams({client:"gtx",dt:"t",sl:n,tl:r,q:t}),o=this.apiUrl+"?"+a.toString();return{data:await de({retry:this.retry,url:o,timeout:this.requestTimeout})}}};m();m();m();function z7(e,t){return t?e+(t-e%t):e}function q7(e,t){return e.split(t).length-1}function Em(e){let t=Date.now(),n=1;for(let r of e)n+=q7(r,"i");return z7(t,n)}function W7(e,t){return Math.floor(Math.random()*(t-e+1))+e}function Sm(){return W7(1e6,1e8)}m();m();m();var wm="https://www2.deepl.com/jsonrpc",Dm="auto",h6=[{code:"BG",language:"Bulgarian"},{code:"ZH",language:"Chinese"},{code:"CS",language:"Czech"},{code:"DA",language:"Danish"},{code:"NL",language:"Dutch"},{code:"EN",language:"English"},{code:"ET",language:"Estonian"},{code:"FI",language:"Finnish"},{code:"FR",language:"French"},{code:"DE",language:"German"},{code:"EL",language:"Greek"},{code:"HU",language:"Hungarian"},{code:"IT",language:"Italian"},{code:"JA",language:"Japanese"},{code:"LV",language:"Latvian"},{code:"LT",language:"Lithuanian"},{code:"PL",language:"Polish"},{code:"PT",language:"Portuguese"},{code:"RO",language:"Romanian"},{code:"RU",language:"Russian"},{code:"SK",language:"Slovak"},{code:"SL",language:"Slovenian"},{code:"ES",language:"Spanish"},{code:"SV",language:"Swedish"}];m();function $7(e=h6){return e.reduce((t,n)=>(t[n.code.toLowerCase()]=n.code,t[n.language.toLowerCase()]=n.code,t),{})}function km(e){return $7()[e.toLowerCase()]}var V7={Accept:"*/*","Accept-Language":"en-US;q=0.8,en;q=0.7","Content-Type":"application/json",Origin:"https://www.deepl.com",Referer:"https://www.deepl.com/translator","Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-site"};function K7(e){return JSON.stringify(e).replace('"method":"',()=>{let t=e;return(t.id+3)%13===0||(t.id+5)%29===0?'"method" : "':'"method": "'})}function G7(e,t){return{id:1,jsonrpc:"2.0",method:"LMT_handle_texts",params:{timestamp:0,texts:[{text:"",requestAlternatives:3}],splitting:"newlines",lang:{source_lang_user_selected:e,target_lang:t}}}}async function Y7(e,t,n,r,a,o,i){let s=Sm(),u=G7(r,n),l=[];t.forEach(p=>{l.push({text:p,requestAlternatives:3})}),u.id=s,u.params.texts=l,u.params.timestamp=Em(t);let c=await de({retry:2,method:"POST",url:e,body:K7(u),headers:V7}),g={from:c.result.lang,to:n,text:[]};return c.result.texts.forEach(p=>{g.text.push(p.text)}),g}async function b6(e,t,n,r=Dm,a,o,i){return t?t&&t.length===1&&t[0]===""?{text:[""],from:r,to:n}:Y7(e,t,km(n),km(r)??"auto",a,o,i):{text:[],from:r,to:n}}var y6=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Ri=class e extends ke{static langMap=new Map(y6);static langMapReverse=new Map(y6.map(([t,n])=>[n,t]));maxTextGroupLength=3;maxTextLength=800;isSupportList=!0;API_URL=wm;constructor(t,n,r){super(t,n,r),t&&t.apiUrl&&(this.API_URL=rn(wm,t.apiUrl))}getDefaultRateLimit(){return{limit:1,interval:1050}}async translateList(t){let{text:n,to:r,from:a}=t,o=await b6(this.API_URL,n,e.langMap.get(r)||r,e.langMap.get(a)||"auto");return{text:o.text,from:e.langMapReverse.get(o.from),to:e.langMapReverse.get(o.to)}}};m();var pu=class e extends ke{static langMap=new Map(vm);clientKey;maxTextGroupLength=25;maxTextLength=1e3;isSupportList=!1;constructor(t,n,r){super(t,n,r),this.clientKey=ra.getClientKey()}async translate(t){let{text:n,to:r}=t,a=await this.detectLanguage(n),o=e.langMap.get(a)||a,i=e.langMap.get(r)||r;if(a===r)return{text:n,from:a,to:r};let s=Pe(),u=t.url;s.INSTALL_FROM==="firefox_store"&&(u=C6());let c=JSON.stringify({header:{fn:"auto_translation_block",client_key:this.clientKey},source:{text_block:n,lang:o,orig_url:u},target:{lang:i}}),g=await de({url:x0,body:c,method:"POST",retry:this.retry,timeout:this.requestTimeout});if(g.header.ret_code!=="succ")throw new J(g.message||g.header.ret_code);return{text:g.auto_translation,from:a||"auto",to:r}}getDefaultRateLimit(){return{limit:30,interval:1050}}async translateList(t){let{from:n,text:r,to:a}=t,o=Pe(),i=t.url;if(o.INSTALL_FROM==="firefox_store"&&(i=C6()),r.length===1){let f=await this.translate({from:n,text:r[0],to:a,url:i,options:t.options});return{text:[f.text],from:f.from,to:f.to}}let u=await this.detectLanguage(r.join(` +`));if(u===a)return{text:r,from:u,to:a};let l=e.langMap.get(u)||u,c=e.langMap.get(a)||a,g=JSON.stringify({header:{fn:"auto_translation",client_key:this.clientKey},source:{text_list:r,lang:l,orig_url:i},target:{lang:c},type:"plain"}),p=await de({url:x0,body:g,method:"POST"});if(p.header.ret_code!=="succ")throw new J(p.message||p.header.ret_code);return{text:p.auto_translation,from:u||"auto",to:a}}detectLanguageLocally(t){return this.detectLanguageRemotely(t)}detectLanguageRemotely(t){return ra.detectLanguageRemotelyByTransmart(t)}};function C6(){let e=new Date;return e.setMinutes(e.getMinutes()-e.getMinutes()%5),e.setSeconds(0),e.setMilliseconds(0),`https://google.com/search?q=google&_t=${e.getTime()/1e3}`}m();m();function Am(){return Math.random()>=.1}var Ii=class extends ke{isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;async translate(t){let{text:n}=t;if(!Am())throw new J("404","\u6A21\u62DF\u9519\u8BEF");let r=n.match(/^\s*/)[0].length;return{text:n.slice(0,r)+"\u6A21\u62DF\uFF1A"+n.slice(r,-6),from:t.from,to:t.to}}async translateList(t){let{text:n,from:r,to:a}=t;if(await Z9(),!Am())throw new J("404","\u6A21\u62DF\u9519\u8BEF");return n.length===0?{from:r,to:a,text:[""]}:{from:r,to:a,text:n.map(o=>{let i=o.match(/^\s*/)[0].length;return o.slice(0,i)+"\u6A21\u62DF\uFF1A"+o.slice(i,-6)})}}};m();var v6=[["auto","auto"],["zh-CN","zh"],["zh-TW","zh"],["en","en"],["ja","ja"],["de","de"],["fr","fr"],["it","it"],["es","es"],["nl","nl"],["pl","pl"],["pt","pt"],["ru","ru"]],Lm=new Map(v6),T6=new Map(v6.map(([e,t])=>[t,e])),_m=class e extends ke{static langMap=Lm;static DEFAULT_CODENAME="deepl";apikey="";codename=e.DEFAULT_CODENAME;isSupportList=!1;maxTextGroupLength=1;constructor(t,n,r){if(super(t,n,r),!t||!t.apikey)throw new J("apikey are required");this.apikey=t.apikey?.trim(),t.codename&&(this.codename=t.codename)}async translate(t){let{text:n,from:r,to:a}=t,o=await de({retry:this.retry,url:`https://api.openl.club/services/${this.codename}/translate`,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({apikey:this.apikey,text:n,source_lang:Lm.get(r)||"auto",target_lang:Lm.get(a)||a}),timeout:this.requestTimeout});if(o.status){let i=o;return i.result&&a=="zh-TW",{text:i.result,from:T6.get(i.source_lang),to:T6.get(i.target_lang)}}else throw new J(o.msg)}},F0=_m;m();var x6=[["auto",""],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ar","AR"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["pt-br","PT-BR"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],fu=new Map(x6),J7=new Map(x6.map(([e,t])=>[t,e])),Mm=class extends ke{static langMap=fu;authKey="";maxTextLength=1800;freeApiUrl="https://api-free.deepl.com/v2/translate";proApiUrl="https://api.deepl.com/v2/translate";immersiveTranslateApiUrl="https://deepl.immersivetranslate.com/v2/translate";immersiveTranslateDeeplTokenUrl="https://api.immersivetranslate.com";immersiveTranslateDeeplProApiUrl=gn()||Jn()?"https://api2.immersivetranslate.com/deepl/translate":"https://test-api2.immersivetranslate.com/deepl/translate";provider="custom";splitor="";qualityNoSymabol="";qualityMinTextLength;apiKeys=[];static async clearState(){}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}constructor(t,n,r){if(super(t,n,r),t=t||{},this.splitor=t.qualityDelimiterBetaV3||"",this.qualityNoSymabol=t.qualityNoSymoblBetaV3||"",this.qualityMinTextLength=t.qualityMinTextLengthV3||0,t.provider==="pro")if(this.provider="pro",r.userToken){if(!r.isPro)throw new J("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");this.authKey=r.userToken,this.apiKeys=this.authKey.split(",").map(a=>a.trim())}else throw new J("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");else if(this.authKey=t.authKey?.trim(),this.apiKeys=this.authKey.split(",").map(a=>a.trim()),!this.authKey)throw new J("authKey are required");if(!this.authKey)throw new J("authKey are required");t&&t.freeApiUrl&&(this.freeApiUrl=rn(this.freeApiUrl,t.freeApiUrl)),t&&t.proApiUrl&&(this.proApiUrl=rn(this.proApiUrl,t.proApiUrl)),t&&t.immersiveTranslateApiUrl&&(this.immersiveTranslateApiUrl=rn(this.immersiveTranslateApiUrl,t.immersiveTranslateApiUrl)),t&&t.immersiveTranslateDeeplTokenUrl&&(this.immersiveTranslateDeeplTokenUrl=rn(this.immersiveTranslateDeeplTokenUrl,t.immersiveTranslateDeeplTokenUrl)),t&&t.immersiveTranslateDeeplProApiUrl&&(this.immersiveTranslateDeeplProApiUrl=rn(this.immersiveTranslateDeeplProApiUrl,t.immersiveTranslateDeeplProApiUrl))}async init(){}getRateLimiter(){let t=super.getRateLimiter();if(this.provider==="pro"){if(this.serviceConfig?.immersiveTranslateProLimit){let n=Number(this.serviceConfig.immersiveTranslateProLimit);return isNaN(n)&&(n=15),{limit:n,interval:t?.interval||1050}}return{limit:15,interval:t?.interval||1050}}return super.getRateLimiter()}getDefaultRateLimit(){return{limit:3,interval:1250}}async translateList(t){let{from:n,to:r}=t,a=this.getRandomKey(),{text:o,merged:i}=this.optimizationText(t),s={source_lang:fu.get(n)||"",target_lang:fu.get(r)||r,tag_handling:"html"};this.serviceConfig?.tag_handling&&(this.serviceConfig.tag_handling==="none"?delete s.tag_handling:s.tag_handling=this.serviceConfig.tag_handling);let u=new URLSearchParams(s);o.forEach(C=>{u.append("text",C)});let l=u.toString(),c={text:o,source_lang:fu.get(n)||"auto",target_lang:fu.get(r)||r},g=this.freeApiUrl;a.endsWith(":im")?g=this.immersiveTranslateApiUrl:a.endsWith(":fx")||(g=this.proApiUrl);let p,f={};t.refresh&&(f={"X-Refresh":"True"}),t.debug&&(f={...f,"X-Debug":"True"}),this.provider==="pro"?p=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...f,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):a.startsWith("immersive_")?p=await de({retry:this.retry,url:this.immersiveTranslateDeeplProApiUrl,method:"POST",body:JSON.stringify(c),headers:{...f,token:a,"Content-Type":"application/json"},timeout:this.requestTimeout}):p=await de({retry:2,url:g,method:"POST",body:l,headers:{Authorization:"DeepL-Auth-Key "+a,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},extra:{overrideMimeType:"application/json; charset=utf-8"}});let{translations:h}=this.restoreText(p,i,!!t.debug),y=h.map(C=>C.text);if(r==="zh-TW"){let C=this.serviceConfig||{};C&&C.googleApiUrl&&(C.apiUrl=C.googleApiUrl);let x=await new Po(this.serviceConfig,this.generalConfig,this.translationOptions).translate({from:"zh-CN",to:"zh-TW",text:h.map(S=>S.text).join(` `),url:"",options:{}});x&&x.text&&(y=x.text.split(` -`))}return{text:y,from:h[0]&&J7.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,o=[];for(let i=0;i=0){o.push(n[i]);continue}if(this.qualityMinTextLength>0&&n[i].length({text:!gn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));o.push(...u)}else o.push(s)}return{...t,translations:o}}},E6=Pm;m();var Q7=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],Fm=new Map(Q7),Bm=class extends ke{static langMap=Fm;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new J("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,o=n,i={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:o,from:Fm.get(r)||r,to:Fm.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(i);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` -`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new J(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},S6=Bm;m();var Z7=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Rm=new Map(Z7),Im=class extends ke{static langMap=Rm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new J("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=nn(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let o={"api-version":"3.0",to:Rm.get(a)||a};r!=="auto"&&(o.from=Rm.get(r)||r);let i=new URLSearchParams(o),s=JSON.stringify(n.map(p=>({text:p}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((p,f)=>{i.append(f,p)}),u.search=i.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new J("server response invalid");return{from:r,to:a,text:g.map(p=>p.translations.map(h=>h.text).join(" "))}}},w6=Im;m();var X7=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Oi=new Map(X7),Om=class extends ke{static langMap=Oi;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,o;if(n.length===0)return{from:r,to:a,text:[]};let i=` +`))}return{text:y,from:h[0]&&J7.get(h[0].detected_source_language)||n,to:r}}optimizationText(t){let{text:n,xpaths:r}=t;if(!this.splitor||this.provider!="pro")return{text:n,merged:[]};let a=new Map,o=[];for(let i=0;i=0){o.push(n[i]);continue}if(this.qualityMinTextLength>0&&n[i].length({text:!gn()&&r?`[${l}]`:l,detected_source_language:s.detected_source_language}));o.push(...u)}else o.push(s)}return{...t,translations:o}}},E6=Mm;m();var Q7=[["auto","auto"],["zh-CN","zh"],["zh-TW","cht"],["en","en"],["ja","ja"],["ko","ko"],["es","es"],["de","de"],["fr","fra"],["pt","pt"],["ru","ru"],["ar","ara"],["it","it"],["ms","ms"],["id","id"],["vi","vie"],["th","th"],["ur","ur"],["yue","yue"],["bo","bo"],["wyw","wyw"],["be","be"],["bg","bul"],["bn","bn"],["ca","ca"],["cs","cs"],["da","da"],["el","el"],["et","et"],["fa","fa"],["fi","fi"],["gu","gu"],["he","he"],["hi","hi"],["hr","hr"],["hu","hu"],["hy","hye"],["is","is"],["ka","ka"],["km","km"],["kn","kn"],["lt","lt"],["lv","lv"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["pa","pa"],["pl","pl"],["ps","ps"],["ro","ro"],["si","si"],["sk","sk"],["sl","sl"],["sq","sq"],["sr","sr"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["tr","tr"],["ug","ug"],["uk","uk"],["uz","uz"]],Pm=new Map(Q7),Fm=class extends ke{static langMap=Pm;APIKEY="";isSupportList=!1;constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new J("APIKEY are required");this.APIKEY=t.APIKEY?.trim()}async translate(t){let{text:n,from:r,to:a}=t,o=n,i={url:"https://api.niutrans.com/NiuTransServer/translation",retry:this.retry,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({src_text:o,from:Pm.get(r)||r,to:Pm.get(a)||a,apikey:this.APIKEY}),timeout:this.requestTimeout},s=await de(i);if(s.tgt_text){let u=s.tgt_text;return u.endsWith(` +`)&&(u=u.slice(0,-1)),{text:u,from:r,to:a}}else throw new J(s.error_msg||JSON.stringify(s).slice(0,500))}getDefaultRateLimit(){return{limit:4,interval:1350}}},S6=Fm;m();var Z7=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","he"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"]],Bm=new Map(Z7),Rm=class extends ke{static langMap=Bm;APIKEY="";region="eastasia";isSupportList=!0;apiUrl="https://api.cognitive.microsofttranslator.com/translate?x=2";constructor(t,n,r){if(super(t,n,r),!t||!t.APIKEY)throw new J("APIKEY are required");this.APIKEY=t.APIKEY?.trim(),t.region&&(this.region=t.region),t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl))}async translateList(t){let{text:n,from:r,to:a}=t;if(n.length===0)return{from:r,to:a,text:[]};let o={"api-version":"3.0",to:Bm.get(a)||a};r!=="auto"&&(o.from=Bm.get(r)||r);let i=new URLSearchParams(o),s=JSON.stringify(n.map(p=>({text:p}))),u=new URL(this.apiUrl),l=new URLSearchParams(u.search);l.toString()!==""&&l.forEach((p,f)=>{i.append(f,p)}),u.search=i.toString();let c={url:u.toString(),retry:this.retry,method:"POST",headers:{"Ocp-Apim-Subscription-Key":this.APIKEY,"Ocp-Apim-Subscription-Region":this.region,"content-type":"application/json"},body:s,timeout:this.requestTimeout},g=await de(c);if(g.length===0)throw new J("server response invalid");return{from:r,to:a,text:g.map(p=>p.translations.map(h=>h.text).join(" "))}}},w6=Rm;m();var X7=[["auto","auto"],["zh-CN","zh-CN"],["zh-TW","zh-TW"],["en","en"],["ja","ja"],["ru","ru"],["es","es"],["de","de"],["ko","ko"],["fr","fr"],["th","th"],["vi","vi"],["id","id"]],Oi=new Map(X7),Im=class extends ke{static langMap=Oi;isSupportList=!0;maxTextGroupLength=25;maxTextLength=1200;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:3,interval:1150}}async translateList(t){let{text:n,from:r,to:a}=t,o;if(n.length===0)return{from:r,to:a,text:[]};let i=`
-`,s=n.join(i),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Oi.get(r)?(o=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:o||Oi.get(r)||r,target:Oi.get(a)||a})):u.body=JSON.stringify({text:s,source:Oi.get(r),target:Oi.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new J("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},D6=Om;m();function A6(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(o=>{r.set(o.id,o)});for(let o of r.keys()){let[i,s]=o.split("2");if(["auto",t.sourceLanguage].includes(i)&&["auto",t.targetLanguage].includes(s)){let u=r.get(o);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function bn(e){let{url:t,config:n,state:r}=e,a=new URL(t),o="auto",{translationParagraphLanguagePattern:i,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:p,sourceLanguageUrlPattern:f,immediateTranslationPattern:h}=n,y=p||"zh-CN",C=Ni(t,i),b=Ni(t,h),x=s,S=Object.keys(u);for(let se of S){let ue=u[se];if(Ni(t,ue)){x=se;break}}let A=l,P=Object.keys(c);for(let se of P){let ue=c[se];if(ue&&Ni(t,ue)){A=se;break}}let w=Ni(t,g),v=k6(t,g);v||(v=_t(t,N2)),v||(v=_t(t,n.blockUrls));let L=k6(t,n.inputTranslationUrlPattern);L||(L=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),T=Object.keys(f),j={};for(let se of T){let ue=f[se];if(ue&&ue.matches)for(let De of ue.matches)j[De]=se}let R=Object.keys(j),M=zg(t,R);M&&(o=j[M]??"auto",j[M]&&j[M]!=="auto"&&Xn(j[M]));let O=a.hostname,N=await hr(O),H=a.pathname+a.search+a.hash,B=await hr(H),k=`https://${N}.com/${B}`,_=await qt(),F=await H1(),q=n.translationStartMode;q==="dynamic"&&b&&(q="immediate");let z=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(z=n.inputTranslationService);let V=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(V=n.mouseHoverTranslationService);let K=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(K=n.subtitleTranslateService);let oe=await gt.get(Tt,null),te=!1;oe&&(te=Yt(oe));let Z={targetLanguage:y,config:n,translationService:x,inputTranslationService:z,mouseHoverTranslationService:V,subtitleTranslateService:K,isTranslateUrl:w,sourceLanguage:o,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:C,cache:n.cache,translationTheme:A,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:C,cache:n.cache,translationTheme:A,isTranslateDirectlyOnHover:!1},localConfig:_};oe&&(Z.user=oe,te?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(se=>!Z.config.generalRule.bodyTranslateTags.includes(se)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[Z.translationService]||{};ce.immediateTranslationTextCount!==void 0&&ew(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),Z.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&Z.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(Z.state.translationDebounce=ce.translationDebounce);let he=F.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Ni(t,se)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let ve=n.generalRule;if(X&&(Z.rule=e0(ve,X)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(se=>!Z.rule.bodyTranslateTags.includes(se)&&!Z.rule.forceTranslateTags.includes(se))),Z.rule.mainFrameSelector){let se=document.querySelector(Z.rule.mainFrameSelector);se&&(Z.mainFrame=se)}return Z}function Ni(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:o}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:o&&o.length>0&&o0(o)?!1:!!(a&&a.length>0&&o0(a))}function k6(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&o0(r))}function ew(e){return typeof e=="number"}m();m();m();function L6(e){let t=e.split(` +`,s=n.join(i),u={url:"https://api.papago-chrome.com/v2/translate/openapi",retry:this.retry,method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:"",timeout:this.requestTimeout};r==="auto"||!Oi.get(r)?(o=(await de({url:"https://api.papago-chrome.com/v2/translate/detect",method:"POST",headers:{authority:"api.papago-chrome.com","content-type":"application/json"},body:s})).langCode,u.body=JSON.stringify({text:s,source:o||Oi.get(r)||r,target:Oi.get(a)||a})):u.body=JSON.stringify({text:s,source:Oi.get(r),target:Oi.get(a)||a});let l=await de(u);if(l.translatedText==="")throw new J("server response invalid");let c=l.translatedText.split("
").map(g=>g.trim());return{from:r,to:a,text:c}}},D6=Im;m();function A6(e,t){let n=Object.assign({},e),r=new Map;(n.langOverrides||[]).forEach(o=>{r.set(o.id,o)});for(let o of r.keys()){let[i,s]=o.split("2");if(["auto",t.sourceLanguage].includes(i)&&["auto",t.targetLanguage].includes(s)){let u=r.get(o);if(!u)continue;if(u.extends){let l=r.get(u.extends);l&&(n=Object.assign({},n,l))}n=Object.assign({},n,u)}}return n}async function bn(e){let{url:t,config:n,state:r}=e,a=new URL(t),o="auto",{translationParagraphLanguagePattern:i,translationService:s,translationServices:u,translationTheme:l,translationThemePatterns:c,translationUrlPattern:g,targetLanguage:p,sourceLanguageUrlPattern:f,immediateTranslationPattern:h}=n,y=p||"zh-CN",C=Ni(t,i),b=Ni(t,h),x=s,S=Object.keys(u);for(let se of S){let ue=u[se];if(Ni(t,ue)){x=se;break}}let A=l,P=Object.keys(c);for(let se of P){let ue=c[se];if(ue&&Ni(t,ue)){A=se;break}}let w=Ni(t,g),v=k6(t,g);v||(v=_t(t,N2)),v||(v=_t(t,n.blockUrls));let L=k6(t,n.inputTranslationUrlPattern);L||(L=_t(t,n.inputTranslationBlockUrls));let D=_t(t,n.mutationBlockUrls),T=Object.keys(f),j={};for(let se of T){let ue=f[se];if(ue&&ue.matches)for(let De of ue.matches)j[De]=se}let R=Object.keys(j),M=Hg(t,R);M&&(o=j[M]??"auto",j[M]&&j[M]!=="auto"&&Xn(j[M]));let O=a.hostname,N=await hr(O),H=a.pathname+a.search+a.hash,B=await hr(H),k=`https://${N}.com/${B}`,_=await qt(),F=await H1(),q=n.translationStartMode;q==="dynamic"&&b&&(q="immediate");let z=x;n.inputTranslationService&&n.inputTranslationService!=="inherit"&&(z=n.inputTranslationService);let V=x;n.mouseHoverTranslationService&&n.mouseHoverTranslationService!=="inherit"&&(V=n.mouseHoverTranslationService);let K=x;n.subtitleTranslateService&&n.subtitleTranslateService!=="inherit"&&(K=n.subtitleTranslateService);let oe=await mt.get(Tt,null),te=!1;oe&&(te=Yt(oe));let Z={targetLanguage:y,config:n,translationService:x,inputTranslationService:z,mouseHoverTranslationService:V,subtitleTranslateService:K,isTranslateUrl:w,sourceLanguage:o,mainFrame:document.body,isTranslateExcludeUrl:v,isMutationTranslationExcludeUrl:D,isInputTranslationExcludeUrl:L,rule:n.generalRule,url:t,encryptedUrl:k,state:r?Object.assign({translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:C,cache:n.cache,translationTheme:A,isTranslateDirectlyOnHover:!1},r):{translationMode:n.translationMode,translationArea:n.translationArea,translationStartMode:q,immediateTranslationTextCount:n.immediateTranslationTextCount,isAutoTranslate:!1,translationDebounce:300,isNeedClean:!1,isDetectParagraphLanguage:C,cache:n.cache,translationTheme:A,isTranslateDirectlyOnHover:!1},localConfig:_};oe&&(Z.user=oe,te?Z.isPro=!0:Z.isPro=!1),Z.state.translationArea==="body"&&(Z.config.generalRule.excludeTags=Z.config.generalRule.excludeTags.filter(se=>!Z.config.generalRule.bodyTranslateTags.includes(se)),Z.config.generalRule.additionalExcludeSelectors=Z.config.generalRule.additionalExcludeSelectors.filter(se=>se!==".btn"));let ce=n.translationServices[Z.translationService]||{};ce.immediateTranslationTextCount!==void 0&&ew(ce.immediateTranslationTextCount)&&ce.immediateTranslationTextCount>=0&&(Z.state.immediateTranslationTextCount=ce.immediateTranslationTextCount),Z.translationService==="deepl"&&(ce&&ce.authKey&&ce.authKey.startsWith("immersive_")||ce&&ce.provider==="pro"&&Z.user?.token)&&ce.immediateTranslationTextCountForImmersiveDeepl!==void 0&&ce.immediateTranslationTextCountForImmersiveDeepl>=0&&(Z.state.immediateTranslationTextCount=ce.immediateTranslationTextCountForImmersiveDeepl),ce&&ce.translationDebounce&&typeof ce.translationDebounce=="number"&&(Z.state.translationDebounce=ce.translationDebounce);let he=F.immediateTranslationTextCount;n.immediateTranslationTextCount!==he&&(Z.state.immediateTranslationTextCount=n.immediateTranslationTextCount);let ae=n.rules,X;globalThis.PDFViewerApplication?X=ae.find(se=>se.pageType=="pdfReader"):globalThis.immersiveTranslateEbookViewer?X=ae.find(se=>se.pageType=="ebookReader"):globalThis.immersiveTranslateEbookBuilder?X=ae.find(se=>se.pageType=="ebookBuilder"):X=ae.find(se=>Ni(t,se)),Z.state.translationArea==="body"&&(Z.rule.paragraphMinTextCount=1,Z.rule.paragraphMinWordCount=1),X&&X.pageType==="ebookBuilder"&&(Z.state.translationStartMode="immediate");let ve=n.generalRule;if(X&&(Z.rule=e0(ve,X)),Z.rule.selectors.length>0&&(Z.rule.paragraphMinTextCount=2,Z.rule.paragraphMinWordCount=1),Z.state.translationArea==="body"&&Z.rule.excludeTags&&(Z.rule.excludeTags=Z.rule.excludeTags.filter(se=>!Z.rule.bodyTranslateTags.includes(se)&&!Z.rule.forceTranslateTags.includes(se))),Z.rule.mainFrameSelector){let se=document.querySelector(Z.rule.mainFrameSelector);se&&(Z.mainFrame=se)}return Z}function Ni(e,t){if(!t)return!1;let{matches:n,excludeMatches:r,selectorMatches:a,excludeSelectorMatches:o}=t;return r&&r.length>0&&_t(e,r)?!1:n&&n.length>0&&_t(e,n)?!0:o&&o.length>0&&o0(o)?!1:!!(a&&a.length>0&&o0(a))}function k6(e,t){if(!t)return!1;let{excludeMatches:n,excludeSelectorMatches:r}=t;return!!(n&&n.length>0&&_t(e,n)||r&&r.length>0&&o0(r))}function ew(e){return typeof e=="number"}m();m();m();function L6(e){let t=e.split(` `),n=[],r,a="",o="";for(let i of t){i.startsWith("- ")&&(i=i.slice(1),r&&n.push(r),r={},a="",o="");let s=i.trim().split(/[::]/).map(l=>l.trim()).filter(l=>!!l);if(s.length>=2&&!/\S\s\S/.test(s[0])){let l=i.slice(i.indexOf(s[1])).trim();l?(a=s[0],l=="|-"?o="":o=l):o+=` `+i}else o+=` -`+i;if(!a)continue;r||(r={});let u=Number(o);r[a]=Number.isNaN(u)?o:Number(o)}return r&&n.push(r),Object.values(n).forEach(i=>{Object.entries(i).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?i[s]=l.slice(1,-1):i[s]=l}})}),n}var Nm=class extends ke{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` +`+i;if(!a)continue;r||(r={});let u=Number(o);r[a]=Number.isNaN(u)?o:Number(o)}return r&&n.push(r),Object.values(n).forEach(i=>{Object.entries(i).forEach(([s,u])=>{if(typeof u=="string"){let l=u.trim();l?.startsWith('"')&&l?.endsWith('"')?i[s]=l.slice(1,-1):i[s]=l}})}),n}var Om=class extends ke{apiKeys=[];isSupportList=!1;maxTextLength=1200;maxTextGroupLength=1;translationTextSeparator=` %% `;bodyConfigs={};model="";systemPrompt="";prompt="";subtitlePrompt="";multiplePrompt="";ignoreResReges=[];apiUrl="";constructor(t,n,r){if(super(t,n,r),t||(t={}),t.APIKEY){let a=t.APIKEY?.trim();this.apiKeys=a.split(",").map(o=>o.trim())}Array.isArray(t.ignoreResRegexs)&&(this.ignoreResReges=t.ignoreResRegexs),t.translationTextSeparator&&(this.translationTextSeparator=t.translationTextSeparator),t.model&&(this.model=t.model),t.systemPrompt&&(this.systemPrompt=t.systemPrompt),t.prompt&&(this.prompt=t.prompt),t.multiplePrompt&&(this.multiplePrompt=t.multiplePrompt),t.subtitlePrompt&&(this.subtitlePrompt=t.subtitlePrompt),t.bodyConfigs&&(this.bodyConfigs=t.bodyConfigs)}getLangMap(){return new Map}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a,options:o}=t;if(n.length===0)return{from:r,to:a,text:""};let i=this.getLangMap(),s=this.prompt||"",u=i.get(r)||r,l=i.get(a)||a,c=this.serviceConfig.env||{},g=o?.sourceProgram,p=["subtitle","videoSubtitle"].includes(g),f=[n];o?.rawTextArrayLength&&(f=n.split(this.translationTextSeparator)),f.length>1&&this.multiplePrompt&&(s=this.multiplePrompt),p&&this.subtitlePrompt&&f.length>1&&(s=this.subtitlePrompt);let h="",y="",C=s.includes("{{json}}"),b=s.includes("{{yaml}}");if(C){let P=[],w=c.imt_json_item||"";p&&(w=c.imt_subtitle_json_item||w);for(let v=0;vw==="from"?u:w==="to"?l+" Language":w==="text"?n:w=="json"?h:w=="yaml"?y:c[w]||P).replace(/{{(.+?)}}/g,(P,w)=>c[w]||P);let x=await this.handleOptions(s,t);I.debug("request options",x);let S=await de(x),A=this.parseResponse(S);if(A=this.filterContent(n,A,s,f),I.debug("filterContent after",A),!C&&!b||!A)return{from:r,to:a,text:A||n};A=tw(n,A),A=y1(A);try{let P={};if(C){I.debug("extractValidJson before",A);let L=this.extractValidJson(A);I.debug("parse before",A),P=ol.parse(L)}else if(b){I.debug("parseYAML before",A);let L=this.extractValidYaml(A);P=L6(L)}let w=c.imt_trans_field;p&&(w=c.imt_sub_trans_field||w);let v=c.imt_source_field;return p&&(v=c.imt_sub_source_field||v),A=this.restoreText(f,P,w,this.translationTextSeparator,v),{from:r,to:a,text:A}}catch(P){return I.error("parse response failed",A,P),{from:r,to:a,text:A}}}extractValidJson(t){let n=t.indexOf("["),r=t.lastIndexOf("]");return n!==-1&&r!==-1?t.slice(n,r+1):""}extractValidYaml(t){let n=t.split(` `),r=[];for(let a=0;anew RegExp(s).test(o))&&(o=t)}catch(i){I.debug("e",i)}return o}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return qn(t.join("_"))}},Ui=Nm;function tw(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var nw=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],_6=new Map(nw),Um=class extends Ui{static langMap=_6;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=gn()||Jn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new J("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(o=>o.trim()),!a)throw new J("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=nn(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=nn(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=nn(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return _6}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],o={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},i=this.getRandomKey();return this.provider==="pro"?(o.url=this.immersiveProApiUrl,o.headers.token=i,o.headers={...o.headers,...r}):i&&(o.headers.Authorization="Bearer "+i,o.headers["api-key"]=i,i.startsWith("immersiveopenai_")&&(o.url=this.immersiveProApiUrl,o.headers.token=i,i.endsWith("x")||(o.headers["Immersive-Corpus-Campagin"]="yes"),delete o.headers.Authorization,delete o.headers["api-key"],o.headers={...o.headers,...r})),o}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return qn(t.join("_"))}},M6=Um;m();var B6=R5(P6());var F6=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],hu=class e extends ke{static langMap=new Map(F6);static langMapReverse=new Map(F6.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new J("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new B6.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},i=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:i,payload:o,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=this.scene=="general"?"translate_standard":"translate_ecommerce",i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:o},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:i,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:i,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),p=this.SHA1.b64_hmac(`${n}&`,g),f=new URLSearchParams(Object.assign({},l,{Signature:p})).toString(),h=await de({retry:this.retry,url:`https://${o}.aliyuncs.com?${f}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new J(h.Message);return h}};m();m();var rw=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Ot={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},jm=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},Hm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=jm(t);if(r)return Array.isArray(n)?`${r}=${n.map(jm).sort().join(`&${r}=`)}`:`${r}=${jm(n)}`}).filter(t=>t).join("&"),ji=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${Ot.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},o=this.request.params,i=this.request.headers;t.sessionToken&&(a[Ot.tokenHeader]=t.sessionToken),a[Ot.dateHeader]=r,a[Ot.notSignBody]="",a[Ot.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[Ot.algorithmKey]=Ot.algorithm,a[Ot.signHeadersKey]="",a[Ot.signQueriesKey]=void 0,a[Ot.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=o,this.request.headers=i,a[Ot.signQueriesKey]=Object.keys(a).sort().join(";"),a[Ot.signatureKey]=s,Hm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[Ot.dateHeader]=n,t.sessionToken&&(this.request.headers[Ot.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Ot.contentSha256Header]=await hr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return M0(await Na(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(Ot.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` -`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=Hm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} +`)}restoreText(t,n,r,a,o){let i=[];for(let s=0;snew RegExp(s).test(o))&&(o=t)}catch(i){I.debug("e",i)}return o}getCacheKeyPrefix(){let t=[this.model||"",this.apiUrl||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return qn(t.join("_"))}},Ui=Om;function tw(e,t){return!e.includes(".")&&!e.includes("\u3002")&&(t.endsWith("\u3002")||t.endsWith("."))?t.slice(0,-1):t}var nw=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["zh-CN-NE","Northeastern Chinese"],["en","English"],["yue","Cantonese"],["bo","\u85CF\u8BED"],["wyw","Classical Chinese"],["ja","Japanese"],["ko","Korean"],["fr","French"],["de","German"],["es","Spanish"],["it","Italian"],["ru","Russian"],["pt","Portuguese"],["pt-br","Portuguese (Brazil)"],["nl","Dutch"],["pl","Polish"],["ar","Arabic"],["af","Afrikaans"],["am","Amharic"],["az","Azerbaijani"],["be","Belarusian"],["bg","Bulgarian"],["bn","Bengali"],["bs","Bosnian"],["ca","Catalan"],["ceb","Cebuano"],["co","Corsican"],["cs","Czech"],["cy","Welsh"],["da","Danish"],["el","Greek"],["eo","Esperanto"],["et","Estonian"],["eu","Basque"],["fa","Persian"],["fi","Finnish"],["fj","Fijian"],["fil","Filipino"],["fy","Western Frisian"],["ga","Irish"],["gd","Scottish Gaelic"],["gl","Galician"],["gu","Gujarati"],["ha","Hausa"],["haw","Hawaiian"],["he","Hebrew"],["hi","Hindi"],["hmn","Hmong"],["hr","Croatian"],["ht","Haitian Creole"],["hu","Hungarian"],["hy","Armenian"],["id","Indonesian"],["ig","Igbo"],["is","Icelandic"],["jw","Javanese"],["ka","Georgian"],["kk","Kazakh"],["km","Khmer"],["kn","Kannada"],["ku","Kurdish"],["ky","Kyrgyz"],["la","Lao"],["lb","Luxembourgish"],["lo","Lao"],["lt","Lithuanian"],["lv","Latvian"],["mg","Malagasy"],["mi","Maori"],["mk","Macedonian"],["ml","Malayalam"],["mn","Mongolian"],["mr","Marathi"],["ms","Malay"],["mt","Maltese"],["my","Burmese"],["pa","Punjabi"],["ps","Pashto"],["ro","Romanian"],["si","Sinhala"],["sk","Slovak"],["sl","Slovene"],["sa","Sanskrit"],["sm","Samoan"],["sn","Shona"],["so","Somali"],["sq","Albanian"],["sr","Serbian"],["sr-Cyrl","Serbian (Cyrillic)"],["sr-Latn","Serbian (Latin)"],["st","Southern Sotho"],["su","Sundanese"],["sv","Swedish"],["sw","Swahili"],["ta","Tamil"],["te","Telugu"],["tg","Tajik"],["th","Thai"],["tr","Turkish"],["ug","Uyghur"],["uk","Ukrainian"],["ur","Urdu"],["uz","Uzbek"],["vi","Vietnamese"],["xh","Xhosa"],["yi","Yiddish"],["yo","Yoruba"],["zu","Zulu"]],_6=new Map(nw),Nm=class extends Ui{static langMap=_6;provider="custom";immersiveApiUrl="https://openai-api.immersivetranslate.com/v1/chat/completions";immersiveProApiUrl=gn()||Jn()?"https://api2.immersivetranslate.com/openai/v1/chat/completions":"https://test-api2.immersivetranslate.com/openai/v1/chat/completions";temperature=0;constructor(t,n,r){if(super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.temperature!==void 0&&(this.temperature=parseFloat(t.temperature)),this.provider==="pro"){if(!r.isPro)throw new J("Please activate Pro membership first, \u8BF7\u5148\u5F00\u901A Pro \u4F1A\u5458\u3002");let a=r.userToken||"";if(this.apiKeys=a.split(",").map(o=>o.trim()),!a)throw new J("Login required, \u767B\u5F55\u540E\u624D\u53EF\u4EE5\u4F7F\u7528\u3002");t.proModel&&(t.model=t.proModel),t.proLimit&&(t.limit=t.proLimit)}t&&t.immersiveApiUrl&&(this.immersiveApiUrl=rn(this.immersiveApiUrl,t.immersiveApiUrl)),this.apiUrl="https://api.openai.com/v1/chat/completions",t.apiUrl&&(this.apiUrl=rn(this.apiUrl,t.apiUrl)),t&&t.immersiveProApiUrl&&(this.immersiveProApiUrl=rn(this.immersiveProApiUrl,t.immersiveProApiUrl)),this.model=this.model||"gpt-3.5-turbo-1106"}getLangMap(){return _6}getDefaultRateLimit(){return{limit:10,interval:1300}}parseResponse(t){return t?.choices?.[0]?.message?.content?.trim()}async handleOptions(t,n){let r={};n.refresh&&(r["X-Refresh"]="True"),n.debug&&(r["X-Debug"]="True");let a=[{role:"system",content:this.serviceConfig.systemPrompt||""},{role:"user",content:t}],o={url:this.apiUrl,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:this.model,temperature:this.temperature,messages:a},null,2),timeout:this.requestTimeout,retry:this.retry},i=this.getRandomKey();return this.provider==="pro"?(o.url=this.immersiveProApiUrl,o.headers.token=i,o.headers={...o.headers,...r}):i&&(o.headers.Authorization="Bearer "+i,o.headers["api-key"]=i,i.startsWith("immersiveopenai_")&&(o.url=this.immersiveProApiUrl,o.headers.token=i,i.endsWith("x")||(o.headers["Immersive-Corpus-Campagin"]="yes"),delete o.headers.Authorization,delete o.headers["api-key"],o.headers={...o.headers,...r})),o}getCacheKeyPrefix(){let t=["openai",this.provider||"",this.model||"",this.systemPrompt||"",this.prompt||"",this.systemPrompt||"",this.multiplePrompt||"",this.subtitlePrompt||""];return qn(t.join("_"))}},M6=Nm;m();var B6=R5(P6());var F6=[["af","af"],["am","am"],["ar","ar"],["auto","auto"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["ceb","ceb"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fil","fil"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["haw","haw"],["he","he"],["hi","hi"],["hmn","hmn"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["jw","jw"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["mww","mww"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["otq","otq"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["tn","tn"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tlh","tlh"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["yua","yua"],["yue","yue"],["bo","bo"],["sa","sa"],["zh-CN","zh"],["zh-TW","zh-tw"],["zu","zu"]],bu=class e extends ke{static langMap=new Map(F6);static langMapReverse=new Map(F6.map(([t,n])=>[n,t]));SHA1;AccessKeyID="";AccessKeySecret="";isSupportList=!0;scene="general";maxTextGroupLength=50;maxTextLength=1e3;constructor(t,n,r){if(super(t,n,r),!t||!t.AccessKeyID||!t.AccessKeySecret)throw new J("AccessKeyID and AccessKeySecret are required");this.AccessKeyID=t.AccessKeyID?.trim(),this.AccessKeySecret=t.AccessKeySecret?.trim(),this.SHA1=new B6.default.SHA1,t.scene&&(this.scene=t.scene)}async translate(t){let{text:n,from:r,to:a}=t,o={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:n,TargetLanguage:e.langMap.get(a)||a},i=this.scene=="general"?"TranslateGeneral":"Translate",s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:i,payload:o,service:"mt",version:"2018-10-12"});return{text:s.Data.Translated,from:s.Data.DetectedLanguage&&e.langMapReverse.get(s.Data.DetectedLanguage)||r||"auto",to:e.langMapReverse.get(a)||a}}async translateList(t){let{text:n,from:r,to:a}=t,o=this.scene=="general"?"translate_standard":"translate_ecommerce",i={FormatType:"text",Scene:this.scene,SourceLanguage:e.langMap.get(r)||"auto",SourceText:JSON.stringify(n.reduce((l,c,g)=>(l[g]=c,l),{})),TargetLanguage:e.langMap.get(a)||a,ApiType:o},s=await this.signedRequest({secretId:this.AccessKeyID,secretKey:this.AccessKeySecret,action:"GetBatchTranslate",payload:i,service:"mt",version:"2018-10-12"}),u=s.TranslatedList.length&&s.TranslatedList[0].detectedLanguage;return{text:s.TranslatedList.sort((l,c)=>parseInt(l.index)-parseInt(c.index)).map(l=>l.translated),from:u&&e.langMapReverse.get(u)||r||"auto",to:e.langMapReverse.get(a)||a}}encode(t){return encodeURIComponent(t).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}async signedRequest({secretId:t,secretKey:n,action:r,payload:a,service:o,version:i}){let s=new Date().toISOString(),u=Math.random().toString(36).slice(2),l={Action:r,Version:i,Format:"JSON",AccessKeyId:t,SignatureNonce:u,Timestamp:s,SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0"},g=(y=>{let b=Object.keys(y).sort().map(x=>`${this.encode(x)}=${this.encode(y[x])}`).join("&");return`POST&%2F&${this.encode(b)}`})(Object.assign({},l,a)),p=this.SHA1.b64_hmac(`${n}&`,g),f=new URLSearchParams(Object.assign({},l,{Signature:p})).toString(),h=await de({retry:this.retry,url:`https://${o}.aliyuncs.com?${f}`,method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(a).toString(),timeout:this.requestTimeout});if(h instanceof Error)throw h;if(h.Code!=="200")throw new J(h.Message);return h}};m();m();var rw=["authorization","content-type","content-length","user-agent","presigned-expires","expect"],Ot={algorithm:"HMAC-SHA256",v4Identifier:"request",dateHeader:"X-Date",tokenHeader:"X-Security-Token",contentSha256Header:"X-Content-Sha256",notSignBody:"X-NotSignBody",kDatePrefix:"",credential:"X-Credential",algorithmKey:"X-Algorithm",signHeadersKey:"X-SignedHeaders",signQueriesKey:"X-SignedQueries",signatureKey:"X-Signature"},Um=e=>{try{return encodeURIComponent(e).replace(/[^A-Za-z0-9_.~\-%]+/g,escape).replace(/[*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}catch{return""}},jm=e=>Object.keys(e).map(t=>{let n=e[t];if(typeof n>"u"||n===null)return;let r=Um(t);if(r)return Array.isArray(n)?`${r}=${n.map(Um).sort().join(`&${r}=`)}`:`${r}=${Um(n)}`}).filter(t=>t).join("&"),ji=class{request;serviceName;bodySha256;constructor(t,n,r){this.request=t,this.request.headers=t.headers||{},this.serviceName=n,r=r||{},this.bodySha256=r.bodySha256,this.request.params=this.sortParams(this.request.params)}sortParams(t){let n={};return t&&Object.keys(t).filter(r=>{let a=t[r];return typeof a<"u"&&a!==null}).sort().map(r=>{n[r]=t[r]}),n}async addAuthorization(t,n){let r=this.getDateTime(n);await this.addHeaders(t,r),this.request.headers.Authorization=await this.authorization(t,r)}async authorization(t,n){let r=[],a=this.credentialString(n);return r.push(`${Ot.algorithm} Credential=${t.accessKeyId}/${a}`),r.push(`SignedHeaders=${this.signedHeaders()}`),r.push(`Signature=${await this.signature(t,n)}`),r.join(", ")}async getSignUrl(t,n){let r=this.getDateTime(n),a={...this.request.params},o=this.request.params,i=this.request.headers;t.sessionToken&&(a[Ot.tokenHeader]=t.sessionToken),a[Ot.dateHeader]=r,a[Ot.notSignBody]="",a[Ot.credential]=`${t.accessKeyId}/${this.credentialString(r)}`,a[Ot.algorithmKey]=Ot.algorithm,a[Ot.signHeadersKey]="",a[Ot.signQueriesKey]=void 0,a[Ot.signatureKey]=void 0,a=this.sortParams(a),this.request.params=a,this.request.headers={};let s=await this.signature(t,r);return this.request.params=o,this.request.headers=i,a[Ot.signQueriesKey]=Object.keys(a).sort().join(";"),a[Ot.signatureKey]=s,jm(a)}getDateTime(t){return this.iso8601(t).replace(/[:\-]|\.\d{3}/g,"")}async addHeaders(t,n){if(this.request.headers[Ot.dateHeader]=n,t.sessionToken&&(this.request.headers[Ot.tokenHeader]=t.sessionToken),this.request.body){let r=this.request.body;this.request.headers[Ot.contentSha256Header]=await hr(r)}}async signature(t,n){let r=await this.getSigningKey(t,n.substr(0,8),this.request.region,this.serviceName);return M0(await Na(await this.stringToSign(n),r))}async stringToSign(t){let n=[];n.push(Ot.algorithm),n.push(t),n.push(this.credentialString(t));let r=await this.canonicalString();return n.push(await this.hexEncodedHash(r)),n.join(` +`)}async canonicalString(){let t=[],n=this.request.pathname||"/";t.push(this.request.method.toUpperCase()),t.push(n);let r=jm(this.request.params)||"";return t.push(r),t.push(`${this.canonicalHeaders()} `),t.push(this.signedHeaders()),t.push(await this.hexEncodedBodyHash()),t.join(` `)}canonicalHeaders(){let t=[];Object.keys(this.request.headers).forEach(r=>{t.push([r,this.request.headers[r]])}),t.sort((r,a)=>r[0].toLowerCase(){let a=r[0].toLowerCase();if(this.isSignableHeader(a)){let o=r[1];if(typeof o>"u"||o===null||typeof o.toString!="function")throw new J(`Header ${a} contains invalid value`);n.push(`${a}:${this.canonicalHeaderValues(o.toString())}`)}}),n.join(` -`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await hr(t)}async hexEncodedBodyHash(){return this.request.headers[Ot.contentSha256Header]?this.request.headers[Ot.contentSha256Header]:this.request.body?await this.hexEncodedHash(Hm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return rw.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let o=await Na(n,`${Ot.kDatePrefix}${t.secretKey}`),i=await Na(r,o),s=await Na(a,i);return Na(Ot.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,Ot.v4Identifier].join("/")}};var R6=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],zm=new Map(R6),aw=new Map(R6.map(([e,t])=>[t,e])),qm=class extends ke{static langMap=zm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new J("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ji(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let o=new URLSearchParams(r.params),i=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+o.toString(),headers:a.request.headers,method:r.method,body:r.body});if(i.DetectedLanguageList&&i.DetectedLanguageList.length>0)return i.DetectedLanguageList[0].Language;if(i.ResponseMetadata&&i.ResponseMetadata.Error){let s=i.ResponseMetadata.Error;throw new J(s.Code,s.Message)}else if(i.ResponseMetaData&&i.ResponseMetaData.Error){let s=i.ResponseMetaData.Error;throw new J(s.Code,s.Message)}else throw new J("response: "+JSON.stringify(i))}async translateList(t){let{text:n,from:r,to:a}=t,o=zm.get(r),i={TargetLanguage:zm.get(a)||a,TextList:n};o?i.SourceLanguage=o:i.SourceLanguage=await this.remoteDetectLanguage(n.join(` -`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(i)},u=new ji(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(f=>f.Translation),p=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(p=aw.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:p,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new J(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new J(g.Code,g.Message)}else throw new J("response: "+JSON.stringify(c))}},I6=qm;m();var O6=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Wm=new Map(O6),ow=new Map(O6.map(([e,t])=>[t,e])),bu=class extends ke{static langMap=Wm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,o=Wm.get(r)||"detect",i=Wm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:o,target_language:i,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=ow.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new J(l.status_code.toString(),l.status_message)}}};m();var iw=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],$m=new Map(iw),yu=class extends ke{static langMap=$m;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new J("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,o=this.getRandomKey(),s=await de({retry:this.retry,url:o,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:$m.get(r)||r,target_lang:$m.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new J(s.message||s.message||"API Error")}};m();m();var Vm="https://{s}bing.com",z6=Vm+"/translator",sw=Vm+"/ttranslatev3",uw=Vm+"/tspellcheckv3",R0="bingGlobalConfig",q6=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],N6=new Map(q6),U6=new Map(q6.map(([e,t])=>[t,e])),j6=1e3,br,Hi;function Km(e,t){return e.replace("{s}",t?t+".":"")}async function lw(){if(!br){let n=await Q.storage.local.get(R0);return n&&(br=n[R0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=br;return Date.now()-e>t}async function H6(){let e,t,n,r,a,o,i,s,u,l;try{let c=Km(z6,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:p,headers:f,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=f["set-cookie"],t=p.match(/IG:"([^"]+)"/)[1],n=p.match(/data-iid="([^"]+)"/)[1],[a,r,o,i,s,u]=JSON.parse(p.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return br={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:o,isVertical:i,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Q.storage.local.set({[R0]:br}),br}function cw(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=br;return Km(e?uw:sw,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+br.count++:"")}function dw(e,t,n,r){let{token:a,key:o}=br,i={fromLang:n,text:t,token:a,key:o};return!e&&r&&(i.to=r),i}async function W6(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>j6)throw new Error(`The supported maximum length of text is ${j6}. Please shorten the text.`);Hi||(Hi=H6()),await Hi,await lw()&&(Hi=H6(),await Hi),t=t||"auto",n=n||"zh-CN",t=N6.get(t)||t,n=N6.get(n)||n;let a=cw(!1),o=dw(!1,e,t,n==="auto-detect"?"zh-Hans":n),i={referer:Km(z6,br.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(o),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:i,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(br=null,Hi=null,await Q.storage.local.remove(R0),c.ShowCaptcha)throw new Error(` +`)}canonicalHeaderValues(t){return t.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")}signedHeaders(){let t=[];return Object.keys(this.request.headers).forEach(n=>{n=n.toLowerCase(),this.isSignableHeader(n)&&t.push(n)}),t.sort().join(";")}signedQueries(){return Object.keys(this.request.params).join(";")}credentialString(t){return this.createScope(t.substr(0,8),this.request.region,this.serviceName)}async hexEncodedHash(t){return await hr(t)}async hexEncodedBodyHash(){return this.request.headers[Ot.contentSha256Header]?this.request.headers[Ot.contentSha256Header]:this.request.body?await this.hexEncodedHash(jm(this.request.body)):await this.hexEncodedHash("")}isSignableHeader(t){return rw.indexOf(t)<0}iso8601(t){return t===void 0&&(t=new Date),t.toISOString().replace(/\.\d{3}Z$/,"Z")}async getSigningKey(t,n,r,a){let o=await Na(n,`${Ot.kDatePrefix}${t.secretKey}`),i=await Na(r,o),s=await Na(a,i);return Na(Ot.v4Identifier,s)}createScope(t,n,r){return[t.substr(0,8),n,r,Ot.v4Identifier].join("/")}};var R6=[["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],Hm=new Map(R6),aw=new Map(R6.map(([e,t])=>[t,e])),zm=class extends ke{static langMap=Hm;accessKeyId="";secretAccessKey="";maxTextGroupLength=8;constructor(t,n,r){if(super(t,n,r),!t||!t.accessKeyId||!t.secretAccessKey)throw new J("accessKeyId and secretAccessKey are required");this.accessKeyId=t.accessKeyId?.trim(),this.secretAccessKey=t.secretAccessKey?.trim()}async remoteDetectLanguage(t){let r={region:"cn-north-1",method:"POST",params:{Action:"LangDetect",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify({TextList:[t]})},a=new ji(r,"translate");await a.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let o=new URLSearchParams(r.params),i=await de({retry:2,url:"https://open.volcengineapi.com"+r.pathname+"?"+o.toString(),headers:a.request.headers,method:r.method,body:r.body});if(i.DetectedLanguageList&&i.DetectedLanguageList.length>0)return i.DetectedLanguageList[0].Language;if(i.ResponseMetadata&&i.ResponseMetadata.Error){let s=i.ResponseMetadata.Error;throw new J(s.Code,s.Message)}else if(i.ResponseMetaData&&i.ResponseMetaData.Error){let s=i.ResponseMetaData.Error;throw new J(s.Code,s.Message)}else throw new J("response: "+JSON.stringify(i))}async translateList(t){let{text:n,from:r,to:a}=t,o=Hm.get(r),i={TargetLanguage:Hm.get(a)||a,TextList:n};o?i.SourceLanguage=o:i.SourceLanguage=await this.remoteDetectLanguage(n.join(` +`).slice(0,1e3));let s={region:"cn-north-1",method:"POST",params:{Action:"TranslateText",Version:"2020-06-01"},pathname:"/",headers:{"Content-Type":"application/json",host:"open.volcengineapi.com"},body:JSON.stringify(i)},u=new ji(s,"translate");await u.addAuthorization({accessKeyId:this.accessKeyId,secretKey:this.secretAccessKey});let l=new URLSearchParams(s.params),c=await de({retry:2,url:"https://open.volcengineapi.com"+s.pathname+"?"+l.toString(),headers:u.request.headers,method:s.method,body:s.body});if(c.TranslationList){let g=c.TranslationList.map(f=>f.Translation),p=r;return c.TranslationList.length>0&&c.TranslationList[0].DetectedSourceLanguage&&(p=aw.get(c.TranslationList[0].DetectedSourceLanguage)||r),{text:g,from:p,to:a}}else if(c.ResponseMetadata&&c.ResponseMetadata.Error){let g=c.ResponseMetadata.Error;throw new J(g.Code,g.Message)}else if(c.ResponseMetaData&&c.ResponseMetaData.Error){let g=c.ResponseMetaData.Error;throw new J(g.Code,g.Message)}else throw new J("response: "+JSON.stringify(c))}},I6=zm;m();var O6=[["auto","detect"],["af","af"],["am","am"],["ar","ar"],["az","az"],["be","be"],["bg","bg"],["bn","bn"],["bs","bs"],["ca","ca"],["co","co"],["cs","cs"],["cy","cy"],["da","da"],["de","de"],["el","el"],["en","en"],["eo","eo"],["es","es"],["et","et"],["eu","eu"],["fa","fa"],["fi","fi"],["fj","fj"],["fr","fr"],["fy","fy"],["ga","ga"],["gd","gd"],["gl","gl"],["gu","gu"],["ha","ha"],["he","he"],["hi","hi"],["hr","hr"],["ht","ht"],["hu","hu"],["hy","hy"],["id","id"],["ig","ig"],["is","is"],["it","it"],["ja","ja"],["ka","ka"],["kk","kk"],["km","km"],["kn","kn"],["ko","ko"],["ku","ku"],["ky","ky"],["la","la"],["lb","lb"],["lo","lo"],["lt","lt"],["lv","lv"],["mg","mg"],["mi","mi"],["mk","mk"],["ml","ml"],["mn","mn"],["mr","mr"],["ms","ms"],["mt","mt"],["my","my"],["ne","ne"],["nl","nl"],["no","no"],["ny","ny"],["pa","pa"],["pl","pl"],["ps","ps"],["pt","pt"],["ro","ro"],["ru","ru"],["sd","sd"],["si","si"],["sk","sk"],["sl","sl"],["sm","sm"],["sn","sn"],["so","so"],["sq","sq"],["sr","sr"],["st","st"],["su","su"],["sv","sv"],["sw","sw"],["ta","ta"],["te","te"],["tg","tg"],["th","th"],["tn","tn"],["to","to"],["tr","tr"],["ty","ty"],["ug","ug"],["uk","uk"],["ur","ur"],["uz","uz"],["vi","vi"],["xh","xh"],["yi","yi"],["yo","yo"],["zh-CN","zh"],["zh-TW","zh-Hans"],["zu","zu"]],qm=new Map(O6),ow=new Map(O6.map(([e,t])=>[t,e])),yu=class extends ke{static langMap=qm;maxTextGroupLength=50;isSupportList=!1;async translate(t){let{text:n,from:r,to:a}=t,o=qm.get(r)||"detect",i=qm.get(a)||a,u=await de({url:"https://translate.volcengine.com/crx/translate/v1/",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source_language:o,target_language:i,text:n}),retry:this.retry});if(u.base_resp&&u.base_resp.status_code===0){let l=u.translation,c=r;return u.detected_language&&(c=ow.get(u.detected_language)||r),{text:l,from:c,to:a}}else{let l=u.base_resp;throw new J(l.status_code.toString(),l.status_message)}}};m();var iw=[["auto","auto"],["en","EN"],["ja","JA"],["pl","PL"],["zh-CN","ZH"],["zh-TW","ZH"],["ja","JA"],["ko","KO"],["es","ES"],["de","DE"],["fr","FR"],["pt","PT"],["ru","RU"],["it","IT"],["id","ID"],["nl","NL"],["pl","PL"],["bg","BG"],["cs","CS"],["da","DA"],["el","EL"],["et","ET"],["fi","FI"],["hu","HU"],["lt","LT"],["lv","LV"],["ro","RO"],["sk","SK"],["sl","SL"],["sv","SV"],["tr","TR"],["uk","UK"]],Wm=new Map(iw),Cu=class extends ke{static langMap=Wm;url="";isSupportList=!1;maxTextGroupLength=1;apiKeys=[];constructor(t,n,r){if(super(t,n,r),!t||!t.url)throw new J("deeplx custom url are required, please check your settings.");this.url=t.url,this.apiKeys=this.url.split(",").map(a=>a.trim())}getRandomKey(){let t=Math.floor(Math.random()*this.apiKeys.length);return this.apiKeys[t]}async translate(t){let{text:n,from:r,to:a}=t,o=this.getRandomKey(),s=await de({retry:this.retry,url:o,headers:{"content-type":"application/json"},method:"POST",body:JSON.stringify({source_lang:Wm.get(r)||r,target_lang:Wm.get(a)||a,text:n}),timeout:this.requestTimeout});if(s.code===200)return{text:s.data,from:r,to:a};throw new J(s.message||s.message||"API Error")}};m();m();var $m="https://{s}bing.com",z6=$m+"/translator",sw=$m+"/ttranslatev3",uw=$m+"/tspellcheckv3",R0="bingGlobalConfig",q6=[["auto","auto-detect"],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["he","iw"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["yue","yua"],["vi","vi"],["ku","ku"],["km","kmr"]],N6=new Map(q6),U6=new Map(q6.map(([e,t])=>[t,e])),j6=1e3,br,Hi;function Vm(e,t){return e.replace("{s}",t?t+".":"")}async function lw(){if(!br){let n=await Q.storage.local.get(R0);return n&&(br=n[R0]),!0}let{tokenTs:e,tokenExpiryInterval:t}=br;return Date.now()-e>t}async function H6(){let e,t,n,r,a,o,i,s,u,l;try{let c=Vm(z6,e),g=await de({retry:2,url:c,responseType:"raw"}),{body:p,headers:f,url:h}=g;e=h.match(/^https?:\/\/(\w+)\.bing\.com/)[1],l=f["set-cookie"],t=p.match(/IG:"([^"]+)"/)[1],n=p.match(/data-iid="([^"]+)"/)[1],[a,r,o,i,s,u]=JSON.parse(p.match(/params_AbusePreventionHelper\s?=\s?([^\]]+\])/)[1])}catch(c){throw c}return br={subdomain:e,IG:t,IID:n,key:a,token:r,tokenTs:a,tokenExpiryInterval:o,isVertical:i,frontDoorBotClassification:s,isSignedInOrCorporateUser:u,cookie:l,count:0},await Q.storage.local.set({[R0]:br}),br}function cw(e){let{IG:t,IID:n,subdomain:r,isVertical:a}=br;return Vm(e?uw:sw,r)+"?isVertical=1"+(t&&t.length?"&IG="+t:"")+(n&&n.length?"&IID="+n+"."+br.count++:"")}function dw(e,t,n,r){let{token:a,key:o}=br,i={fromLang:n,text:t,token:a,key:o};return!e&&r&&(i.to=r),i}async function W6(e,t,n){if(!e||!(e=e.trim()))return;if(e.length>j6)throw new Error(`The supported maximum length of text is ${j6}. Please shorten the text.`);Hi||(Hi=H6()),await Hi,await lw()&&(Hi=H6(),await Hi),t=t||"auto",n=n||"zh-CN",t=N6.get(t)||t,n=N6.get(n)||n;let a=cw(!1),o=dw(!1,e,t,n==="auto-detect"?"zh-Hans":n),i={referer:Vm(z6,br.subdomain),"content-type":"application/x-www-form-urlencoded"},s=new URLSearchParams(o),u=a,l=s.toString(),c=await de({retry:2,url:u,headers:i,method:"POST",body:l});if(c.ShowCaptcha||c.StatusCode===401||c.statusCode){if(br=null,Hi=null,await Q.storage.local.remove(R0),c.ShowCaptcha)throw new Error(` Sorry that bing translator seems to be asking for the captcha, Please take care not to request too frequently. The response code is ${c.StatusCode}. `);if(c.StatusCode===401)throw new Error(` Max count of translation exceeded. Please try it again later. The response code is 401. - `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],p=c[0].detectedLanguage;return{text:g.text,from:U6.get(p.language),to:U6.get(g.to)}}m();m();m();m();m();function Ua(e){return e!=null}function K6(e,t,n){return`${e.type}#${t}#${n}`}function G6(e,t,n,r,a){return{body:a,id:r,type:K6(e,t,n)}}function gw(e,t,n,r){return{id:n,response:r,type:K6(e,"ask",t)}}function Y6(e,t,n,r){if(Ua(r)){let a=r.type;if(Ua(a)&&Ua(r.body)){let[o,i,s]=a.split("#");return o===e.type&&i===t&&s===n}else return!1}else return!1}function mw(e,t,n){if(Ua(n)){let r=n.type;if(Ua(r)&&Ua(n.response)){let[a,o,i]=r.split("#");return a===e.type&&o==="ask"&&i===t}else return!1}else return!1}function pw(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function fw(e,t,n,r){return new Promise(a=>{let o=i=>{let s=i.data;mw(t,n,s)&&s.id===r&&(e.removeEventListener("message",o),a(s.response))};e.addEventListener("message",o)})}function hw(e,t,n,r){let a=o=>{let i=o.data;Y6(t,"tell",n,i)&&r(i.body)};return e.addEventListener("message",a),[e,a]}function $6(e,t,n,r,a,o){let i=async s=>{let u=s.data;if(Y6(n,"ask",r,u)){let l=await o(u.body);t=s.source,t.postMessage(gw(n,r,u.id,l),s.origin)}};return e.addEventListener("message",i),[e,i]}function bw(e,t,n,r,a){let o=Math.random().toString();return e.postMessage(G6(t,"tell",n,o,r),a)}async function V6(e,t,n,r,a,o,i){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${i}ms`)),i),p=await fw(e,n,r,s);clearTimeout(g),l(p)});return t.postMessage(G6(n,"ask",r,s,a),o),u}var ja=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;$6(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let o=n.contentWindow;if(Ua(o))return new e(t,o,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await V6(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(hw(this.thisWindow,this.protocol,t,n))}tell(t,n){bw(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push($6(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return V6(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){pw(this.listeners)}};var J6;async function Q6(){if(at()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=ja.iframe(Hl,"*",{targetWindow:t});J6=n,await ja.connect(n).catch(r=>{I.error("connect with parent frame error",r)})}}function Z6(){return J6}var I0=new Map;async function Gm(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=qn(e.body)),I0.has(t))return I0.get(t);let n=de(e);I0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{I0.delete(t)},3e3)}}async function X6(e){return Gm(e)}async function O0(e){if(at()){let n=Z6();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw I.error("can not comunicate with root frame, use strict limiter",r),r}else return Gm(e)}else return Gm(e)}m();function eb(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),o=JSON.parse(a),i=new Date(o.exp*1e3);return{accessToken:e,accessTokenExpiresAt:i.toISOString()}}m();async function N0(e){await jg(e)}async function U0(e,t){let n=await Og(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),o=new Date(n.accessTokenExpiresAt).getTime();if(o-r>30*1e3)return n;if(o-r>3e3)return tb(e,t)}return tb(e,t)}async function tb(e,t){let n=await t(),r=n.accessTokenExpiresAt,o=new Date(r).getTime()-Date.now();return await Ng(e,n,o-1e3),n}var yw=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Ym=new Map(yw),Cu=class extends ke{static langMap=Ym;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await N0(xg)}async translate(t){let{text:n,from:r,to:a}=t;return n?await W6(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await U0(xg,async()=>{let t=await O0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return eb(t)})}async translateList(t){let{from:n,to:r,text:a}=t,o=Ym.get(n)||"auto",i=Ym.get(r)||r;o==="auto"&&(o="");let s=await this.getAccessToken(),u=[];for(let p of a)u.push({Text:p});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${o}&to=${i}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(p=>p.translations[0]?.text||""),from:n,to:r};throw new J("Microsoft translate error "+JSON.stringify(g))}};m();var nb=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Jm=new Map(nb),Cw=new Map(nb.map(([e,t])=>[t,e])),Qm=class extends ke{static langMap=Jm;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new J("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:o}=this,{text:i,from:s,to:u}=t,l=qn(a+i+n+o);this.domain&&(l=qn(a+i+n+this.domain+o));let c=new URLSearchParams({from:Jm.get(s)||"auto",to:Jm.get(u)||u,q:i,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let p=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(p.error_code)throw new J("API_SERVER_ERROR",p.error_msg);let{trans_result:f,from:h}=p,y=f.map(({dst:b})=>b);return{from:Cw.get(h)||h,to:u,text:y.join(` -`)}}},rb=Qm;m();m();var Fo=class extends ke{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new J(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n);if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Zl(i);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new J("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new J(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n.join(" "));if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Zl(i);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},o=a?.body||"",i=this.apiServiceConfig.keywords||{};a.body=u(o);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,p)=>{let[f,h]=p.split(":"),y=i[f];return h==="random"?Tw(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let o of a){if(Array.isArray(r))return r=r.map(i=>i[o]),r;r=r[o]}return r}detectLanguageRemotely(t){return ra.detectLanguageRemotelyByTransmart(t)}};function Tw(e){let t=Math.floor(Math.random()*e.length);return e[t]}var ab=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Zm=class extends Fo{static langMap=new Map(ab);constructor(t,n,r){if(!t?.token)throw new J("token are required");super({...t,isSupportList:!0,langs:ab,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},ob=Zm;m();var vw=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],j0=new Map(vw),Xm=class extends ke{static langMap=j0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!j0.get(a))throw new J(`Unsupported language: ${a}`);if(r==="auto")throw new J("Unsupported language: auto");let i=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:i,trans_type:`${j0.get(r)||"auto"}2${j0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},ib=Xm;m();var sb=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],ep=new Map(sb),xw=new Map(sb.map(([e,t])=>[t,e]));function Ew(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var tp=class extends ke{static langMap=ep;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new J("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o=Sw(32),i=Math.round(new Date().getTime()/1e3),s=this.appId+Ew(n)+o+i+this.appSecret,u=await hr(s),l={q:n,appKey:this.appId,salt:o.toString(),from:ep.get(r)||"auto",to:ep.get(a)||a,sign:u,signType:"v3",curtime:i.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),p=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!p.translation)throw new J(JSON.stringify(p));let f=p.l,[h,y]=f.split("2");return{text:p.translation.join(` -`),from:xw.get(h),to:a}}};function Sw(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var rp=class extends ke{static langMap=np;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o={q:n,from:np.get(r)||"auto",to:np.get(a)||a},i=new URLSearchParams(o),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:i.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` -`),from:r,to:a};throw new J("Youdao translation failed: "+JSON.stringify(s))}},cb=rp;m();var Tu=class extends Fo{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||zs,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};m();var db="immersive-translate-gemini-fake-user-key",ww=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],gb=new Map(ww),ap=class extends Ui{static langMap=gb;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return gb}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Ig(db,""),this.fakeId||(this.fakeId=Dw(10),await Ug(db,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let o=this.systemPrompt+t;this.randomPrefix&&(o=this.randomPrefix.replace("{{id}}",this.fakeId)+o);let i={contents:[{role:"user",parts:[{text:o}]}],...this.bodyConfigs};return a.body=JSON.stringify(i,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let o=super.filterContent(t,n,r);return o.includes(this.fakeId)&&a.length<=1?t:o}};function Dw(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await O0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=await this.getAccessToken(),i=new URLSearchParams;i.append("srv","tr-url-widget"),i.append("id",`${o.accessToken}-0-0`),i.append("format","html"),i.append("lang",`${r==="auto"?"":ip.get(r)+"-"}${ip.get(a)}`),n.forEach(l=>{i.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${i.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var Lw={mock:Ii,mock2:Ii,custom:Tu,google:Po,transmart:mu,deepl:E6,volc:I6,volcAlpha:bu,bing:Cu,tencent:du,tenAlpha:gu,baidu:rb,caiyun:ob,cai:ib,openl:F0,youdao:ub,you:cb,d:Ri,dpro:Ri,deeplx:yu,niu:S6,azure:w6,openai:M6,gemini:mb,claude:fb,papago:D6,aliyun:hu,yandex:vu},Ha={};Object.keys(Qn).forEach(e=>{Ha[e]={...Qn[e],class:Lw[e]}});function za(e,t){let n=Bn;if(Ha[e]&&Ha[e].class&&Ha[e].class.langMap&&Ha[e].class.langMap.size>0){let r=Ha[e].class.langMap,a=n.filter(o=>r.get(o));return a.includes(t)||a.unshift("placeholder"),a}else return Bn}async function Mr(e,t,n){if(!e.text)return e;let r=null,a=await st({sentences:[e]},t,(o,i,s)=>{o&&(r=o)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new J("translateFailed","translate failed")}async function hb(e,t){for(let n of e)try{return await Mr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function sp(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,o=n,i=a[o]||{},s=Yt(e.user);await new Ha[o].class(i,r,{translationService:o,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _w(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function st(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:o,state:i}=t,s=a.translationGeneralConfig,u=a.translationServices,l=o,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=A6(g,{sourceLanguage:_w(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let p=a.beta,f=i.cache===!1&&p,h=a.debug===!0&&p;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(f&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],C={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,S=Yt(t.user),A;try{A=new Ha[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:S,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await A.init()}catch(v){if(n){y.push(...e.sentences);let L={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let T=v instanceof J?new J(v.name,v.message).initNetWork(v.status).initData(v.data||L):v;n(T,null,D)}}return{sentences:[]}}if(i.cache)for(let v of e.sentences){x++;let L=l;l==="openl"&&(L=l+"-"+g.codename||F0.DEFAULT_CODENAME);let D=A.getCacheKeyPrefix();D&&(L=D+"-"+L);let T=null;try{T=await nl(J9({originalText:v.text,from:v.from,to:v.to,service:L}),200)}catch(j){I.warn("query cache DB error, but it's ok",j)}if(T){let j={...v,text:T.translatedText};C.sentences[x]=j,n&&n(null,j,v)}else y.push(v)}else y.push(...e.sentences);let P=y.length;if(b-P>0&&I.debug(`use ${b-P} sentences from cache`),!y.length)return C;let w=await A.multipleTranslate({sentences:y},g,(v,L,D)=>{if(n&&n(v,L,D),!v&&L&&!l.startsWith("mock")&&i.cache){let T=l;l==="openl"&&(T=l+"-"+g.codename||F0.DEFAULT_CODENAME);let j=A.getCacheKeyPrefix();j&&(T=j+"-"+T),i.cache&&nl(Q9({translatedText:L.text,from:D.from,to:D.to,detectedFrom:L.from,key:qn(D.text),service:T}),3e3).catch(R=>{I.warn("set cache DB error",R)})}});for(let v of w?.sentences||[]){let L=C.sentences.findIndex(D=>!D);if(L===-1)throw new J("translateFailed","can not match the result");C.sentences[L]=v}return C}m();m();m();var zi={},Mw={root:"",lang:"en",fallbackLang:"en"};function up(e,t){let n=Object.assign({},Mw,e);zi=t||zi;let[r,a]=$(n.lang),[o,i]=$(zi),[s,u]=$(!1),l=g=>{if(o.hasOwnProperty(g))return;u(!1);let p=w1(n.root||"",g);n.getUrl&&(p=n.getUrl(n.root||"",g),fetch(p).then(f=>f.json()).then(f=>{zi[g]=f,i({...zi}),u(!0)}).catch(f=>{i({...zi}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,p)=>{if(!o.hasOwnProperty(r))return g;let f=Gs(o,r,g);return f===g&&r!==n.fallbackLang&&(f=Gs(o,n.fallbackLang,g)),qg(f,p)},isReady:s}}var cp=Yo(null),lp={root:"assets",lang:"en",fallbackLang:"en"},qi=e=>{let{t,setLang:n,lang:r,isReady:a}=up({root:e.root||lp.root,lang:e.lang||lp.lang,fallbackLang:e.fallbackLang||lp.fallbackLang,getUrl:e.getUrl},e.translations);return d(cp.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Le(cp)}m();function we(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}m();m();function Pr(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:o}=W();return n=n||(o==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(i=>i.selected)?.value,onChange:i=>{let s=i.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((i,s)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+s))})}function dp(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:o=>{e.onChange(o.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(o=>o.selected)?.value,onChange:o=>{let i=o.target.value,s=t.find(u=>u.value===i);s&&s.onSelected(s)},children:t.map((o,i)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+i))})}m();function Bo(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=$(e.value),{config:o,field:i,onFinish:s}=e,u=i.name;i.label&&(u=i.label),i.labelKey&&(u=t(i.labelKey));let l={},c={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(c=o.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let p=0;p{let p=g.target.value,f=Array.isArray(r)?p.split(","):p;a(f),e.onChange(f)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function Wi(e){let{t}=W(),[n,r]=$(!0),[a,o]=$(!1),{config:i,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:p}=e;g=g??(l.default||"");let f={},h={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(h=i.translationServices[e.service]),h.env){let C=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||o(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(dp,{maxWidth:200,items:l.options.map(C=>({label:`${C.label?t(C.label):C.value}`,value:C.value,selected:g===C.value,onSelected:()=>{c(C.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let C=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(dp,{maxWidth:250,items:C.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(C[0]),o(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Bo,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Bo,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Bo,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Bo,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Bo,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let C=g,b="";C||(C="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:S}=Pw(C);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:A=>{c(A.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:S},onInput:A=>{c(A.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:C=>{c(C.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,f)}}):null]})}):null}}function Pw(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}m();function bb(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let o=Jt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),o]})},"language-"+a)})})]})}function xu(e){let{selectLanguages:t,languages:n}=e,r=Re(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:e.title,description:e.description}),d(bb,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,o)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Jt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:i=>{i.preventDefault(),e.onChange(!1,t[o])}})]},"lang-"+o))})]}):null}m();m();function aa(e){let{t}=W(),n=qe(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:o=>{o.target&&o.target.id==="immersive-translate-overlay"&&r(o)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:o=>{if(o.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function qa(e){let{t}=W(),[n,r]=$([]),[a,o]=$(!1),[i,s]=$(!1);function u(){e.onDeleteUrl(n,e.type),r([]),o(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,p)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[i&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:f=>{f.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:f=>{e.onEditUrl(g,e.type,p)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:f=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+p))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:i?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let f=g.target.checked;r(f?e.urls:[]),o(f)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function Eu(e){let{t}=W(),[n,r]=$(!1),[a,o]=$(""),[i,s]=$(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,p)=>{r(!n),o(c),s(p)},l=(c,g,p,f)=>{e.onSubmitAddUrl?.(c,g,p,f),r(!n),o(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(aa,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:i}):null]}),d(qa,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}m();async function Wa(){let e=["bingGlobalConfig","baiduGlobalConfig",m2,Ta];for(let t of e)await Q.storage.local.remove(t);me()||await C9(),await Hg()}function yb(){return me()?Promise.resolve("0 B"):gm()}m();var H0='',Su="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Cb="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Tb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",vb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",xb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Eb="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";m();m();function $i(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}m();function Fw(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[o,i]=$(!1);function s(u,l){u.preventDefault(),i(!0),new _r(n).delete(l).catch(c=>{rn(t("delete"))}).then(()=>a()).finally(()=>i(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":o,children:t("delete")})}function gp(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[o,i,s,u]=$e(),[l,c]=$([]),[g,p]=$(!0),[f,h]=$(!1),[y,C]=$({});le(()=>{n&&x().then(()=>p(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new _r(n).listAll().then(L=>{c(L)}).catch(L=>r())}function S(v){if(v.preventDefault(),l.length>=10)return rn(a("maxBackupFiles",{count:10}));h(!0);let L="immersive-translate-config-"+$i()+".json";new _r(n).uploadConfig(o,L).catch(D=>{rn(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function A(v,L,D){v.preventDefault(),C({[D]:!0}),new _r(n).getConfig(L).then(T=>{i(()=>({...T})),it(a("importSuccess"))}).catch(T=>{I.error(T),rn(a("importFail"))}).finally(()=>C({}))}function P(v,L){new _r(n).getConfig(v).then(D=>{let T=document.createElement("a");T.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),T.setAttribute("download",L),T.style.display="none",document.body.appendChild(T),T.click(),document.body.removeChild(T)}).catch(D=>{I.error("download google config file failed",D),rn(a("downloadFail")+": "+D.message)})}function w(v){v.preventDefault(),i({...o,autoSync:!1}),Pa.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,L)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),P(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",Vs(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[L],disabled:y[L],onClick:D=>A(D,v.id,L),children:a("import_hint")}),d(Fw,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+L))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":f,onClick:S,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:w,disabled:g,children:a("revokeAuth")})]})]})})}m();m();function Fr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var Ee=Yo([]);function Qt(e){let[t,n]=$(null);return le(()=>{pt().then(r=>{n(r),I.debug("current config",r)})},[]),le(()=>{pt().then(r=>{n(r)})},[e]),t}function On(e){let[t,n]=$(null);return le(()=>{e&&bn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function Sb(){let[e,t]=$(!1),n=kr();return le(()=>{me()&&(!n||n=="0.0.0"||Fr(n,"0.9.0")||t(!0))},[n]),[e,t]}function oa(){let[e,t]=$(null);return le(()=>{qt().then(r=>{t(r)})},[]),[e,r=>{t(r),Wt(r)}]}m();var ut=class extends no{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(I.error("ErrorBoundary",this.error,this.info),d(Bw,{error:this.error,info:this.info})):this.props.children}};function Bw({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var mp=I;function Rw(){let[e,t]=$(null);return le(()=>{pt().then(n=>{t(n)})},[]),e}function fp(){let[e,t,n,r,a]=$e(),o=Rw(),{t:i,setLang:s}=W(),[u,l]=oa();if(!o)return null;return d(ut,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!ci()&&d(p,{}),d(f,{config:o})]})});function c(){let h=b=>{b.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...wo(),updatedAt:new Date().toISOString()}),Da().catch(x=>{mp.error("clean local config error",x)}),wa().catch(x=>{mp.error("clean buildin config error",x)}),Wa().catch(x=>{mp.error("clean cache error",x)}),it(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},C=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=S=>{let A=S.target,P=new FileReader;P.onload=function(){try{let w=JSON.parse(P.result);y(w),it(i("successImportConfig"))}catch(w){rn(`Invalid JSON ${w.message}`)}},P.readAsText(A.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:i("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:C,href:"#",role:"button",children:[Ow,i("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),ci()){let x=Pe();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});ao.saveAs(x,"immersive-translate-config-"+$i()+".txt")}},role:"button",children:[Nw,i("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:i("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:i("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function p(){let[h,y]=$(!1),[C,b]=$(!1),[x,S]=$(!1),[A,P]=$("");le(()=>{if(Is()&&n){let M=localStorage.getItem(Os);if(localStorage.removeItem(Os),M){let O=globalThis.localStorage.getItem(Sg);I.debug("import_export","rawAuthInfoStr",O);let N={},H={},B="";if(O){globalThis.localStorage.removeItem(Sg);try{N=JSON.parse(O),H=N.state||{},B=N.access_token||""}catch(k){I.error("parse state error",k)}}if(B&&H&&(Pa.setAuthInfo({access_token:B}),I.debug("import_export","Google OAuth:",N),N)){let k=N.state;I.debug("state",k),k?.mode==="auto"?(b(!0),j(B)):(S(!0),D(B))}}}},[n]);function w(){b(!0),im({source:globalThis.location.href,mode:"auto"},!0).then(M=>{I.debug("import_export","Google OAuth:"+M),M!==null&&j(M)}).catch(M=>{M&&M.message==="tokenValidateErrorRedirectToAuthUrl"?I.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):T(M)})}function v(){S(!0),y(!1),im({source:globalThis.location.href,mode:"manual"},!0).then(M=>{I.debug("import_export","Google OAuth:"+M),M!==null&&D(M)}).catch(M=>{M&&M.message==="tokenValidateErrorRedirectToAuthUrl"?I.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):T(M)})}function L(){P(""),w()}function D(M){P(M),S(!1),y(!0)}function T(M){b(!1),S(!1),y(!1),t({...e,autoSync:!1}),I.error("import_export","Google OAuth error:"+M),rn(i("authFail"))}function j(M){b(!0),I.debug("sync latest with drive",M,e),P(M),om(M,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?it(i("successSyncConfig")):it(i("successSyncButNoChange"))},O=>rn(i("syncFail")+O)).finally(()=>{b(!1)})}function R(M){t({...e,autoSync:M.checked}),M.checked&&w()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:i("syncToCloud")}),d("h6",{class:"!text-sm",children:i("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:M=>{M.preventDefault(),w()},"aria-busy":C,href:"#",role:"button",children:[C?d(xe,{}):wb,i("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:M=>{M.preventDefault(),v()},class:"secondary text-sm",children:i("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&i("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(gp,{onClose:()=>y(!1),authExpire:L,accessToken:A}):null]})}function f({config:h}){let y=kb(),[C,b]=$(!1),[x,S]=$(""),[A,P]=$(""),[w,v]=$(null),{t:L}=W();if(!y||!y.token)return null;let D=Yt(y);async function T(){try{if(C)return;b(!0),P("");let M=await z0(y?.token,e,a),O="";switch(M){case"upload":{O=L("successSyncConfigToAccount");break}case"override":{O=L("successSyncConfigInAccount");break}default:O=L("syncConfigNoUpdate")}S(O)}catch(M){S(""),P(M.message)}finally{b(!1)}}let j=M=>{l({...u,proAutoSync:M})},R=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:L("syncToAccount")}),d("h6",{class:"!text-sm",children:L("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{j(!R)},checked:R}),L("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:M=>{M.preventDefault(),T()},"aria-busy":C,href:"#",role:"button",children:[wb," ",L("syncToAccountButton")]}),A?d("p",{class:"text-xs text-red-500",children:A}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&L("lastSyncedAt",{date:V1(u.accountLastSyncedAt)})})]})}}async function z0(e,t,n){try{if(t===null)return"noupdate";let r=await qt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await pp(e,t),await Wt(r),"upload"}let a=await Ab(e);r.accountLastSyncedAt=Date.now(),I.debug("settings",t),I.debug("local settings.updatedAt",t.updatedAt),I.debug("remote settings.updatedAt",a.updatedAt),I.debug("last synced at",r.accountLastSyncedAt);let o=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(o=!0),!o&&t.updatedAt>a.updatedAt&&(o=!0),I.debug("isUpload",o),o)return await pp(e,t),await Wt(r),"upload";let i=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(i=!0),!i&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||Iw(n)&&z0(n.token,e,t).then(o=>{I.debug("syncUserSetting result",o)})},[e,n])}function Iw(e){return Yt(e)?!0:new Date(e.createTime){gt.get(Tt,null).then(n=>{t(n)})},[t]),e}function Ab(e){return(location.href?.indexOf("popup.html")>0?mr:de)({responseType:"json",url:yo+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function pp(e,t){return(location.href?.indexOf("popup.html")>0?mr:de)({responseType:"json",url:yo+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var wb=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),Ow=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),Nw=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});m();var Uw=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Lb=Uw;m();var hp="Arial",bp=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===hp.toLowerCase()?!0:_b(hp,t).join("")!==_b(e,t).join("")}catch{return!1}};function _b(e,t){let n=t.length*12,r=20,a=new Date().getTime(),o=document.createElement("canvas"),i=o.getContext("2d");if(!i)return[];o.width=n,o.height=r,i.textAlign="center",i.fillStyle="black",i.textBaseline="middle",i.clearRect(0,0,n,r),i.font="12px "+e+", "+hp,i.fillText(t,n/2,r/2);let s=i.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}m();m();function yp(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:o,onChange:i}=e,s=t(o.descriptionKey,{1:o.descriptionLink1,2:o.descriptionLink2});return!r&&o.descriptionKeyForNormal&&(s=t(o.descriptionKeyForNormal,{1:o.descriptionLink1,2:o.descriptionLink2})),(!n||ta(n))&&!r&&o.name=="pro"?null:d("label",{class:"pro-radio-label",for:o.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:o.name,name:o.name,value:o.name,onClick:i,checked:o.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(o.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function $a({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:o}=W(),i=We(),[s,u]=$(!1),[l,c]=$(""),[g,p]=$(""),[f,h]=$(null),[y,C]=$(null),[b,x,S,A,P]=Le(Ee),w=F=>{x(q=>{let z={...q,[n]:F};return n==="translationService"&&(z.translationServiceChangedbyUserAt=new Date().toISOString()),z})},v=t&&vo(t,n)||[],L=Re(()=>{if(e&&t){let{translationServices:F}=e,q=t[n],z=F?.[q];return z?{...z}:{}}return null},[e,t]),D=Re(()=>{if(e&&t){let F=t[n];if(Qn[F])return hi(n,F,t)}return null},[e,t]);if(le(()=>{gt.get(Tt,null).then(F=>{F?(h(F),C(Yt(F))):C(!1)}).catch(F=>{C(!1)})},[]),y===null)return null;let T=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:r||o("service"),description:a||o("select translation service")}),d(R,{})]}),d(M,{}),d(O,{}),T&&d("article",{children:[d(N,{}),d(H,{}),d(B,{}),d(j,{}),k(),_()]})]});function j(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:o("geminiWarning")}):null}function R(){return d("select",{class:"select",onChange:F=>{F.preventDefault(),c(""),p(""),w(F.target.value)},children:v.map((F,q)=>d("option",{value:F.id,selected:F.id===t?.config?.[n],children:`${o("translationServices."+F.id)}${F.ok?"":" "+(!y&&!i&&F.providers&&F.providers.length>0?o("needLoginAction"):o("needActionForOptions"))}`},"service-item="+q))})}function M(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!L||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:o("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async F=>{F.preventDefault();try{c(""),p(""),u(!0),await xn(500);let q=D.class;q&&q.clearState&&await q.clearState(),await Mr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),p("verified")}catch(q){let z=q.message;try{z=q?.uiConfig?.(t)?.errMsg||q.message}catch{}c(z)}finally{u(!1)}},children:o("verifyService")})]})}function N(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:o("chooseProviderLabel")}),D.providers.map((F,q)=>d(yp,{userConfig:e,isProUser:!!y,provider:F,currentProvider:D.currentProvider,onChange:z=>{z.preventDefault();let K=z.target.value;K&&x(oe=>{let te=oe.translationServices||{},Z=te[D.id]||{};return{...oe,translationServices:{...te,[D.id]:{...Z,provider:K}}}})}}))]}):null}function H(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:tt.sanitize(o(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function B(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:o(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:o("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:o("KeyAndConfigurationTutorial")})]})}function k(){return!L||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((F,q)=>d("div",{class:"mt-2",children:d(Wi,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:F,value:L[F.name],onChange:z=>{x(V=>{let K=V.translationServices||{},oe=K[D.id]||{};return{...V,translationServices:{...K,[D.id]:{...oe,[F.name]:z}}}})},onFinish:()=>{it(o("saved"))}},F.name+D.id)},"service-item-prop-"+F.name+q))})}function _(){return!L||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[o("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((F,q)=>{let z=L[F.name];return F.name==="apiUrl"&&D?.id==="openai"&&L?.APIKEY?.startsWith("immersiveopenai_")&&(F={...F,disabled:!0},z="https://openai-api.immersivetranslate.com/v1/chat/completions"),F.name=="placeholderDelimiters"&&(F.default=L.placeholderDelimiters||F.default),d("div",{class:"mt-2",children:d(Wi,{config:e,service:D?.id,field:F,value:z,onChange:V=>{x(K=>{let oe=K.translationServices||{},te=oe[D.id]||{};return{...K,translationServices:{...oe,[D.id]:{...te,[F.name]:V}}}})},onFinish:()=>{it(o("saved"))}},F.name+D.id)},"service-item-optional-prop-"+F.name+q)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:F=>{F.preventDefault(),window.confirm(o("confirmResetToDefaultSettings"))&&(x(z=>{let V=z.translationServices||{};return{...z,translationServices:{...V,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:o("resetToDefaultSettings")})]})})}}var jw=Object.keys(wi),Pb=s0();function q0(){let e=$e(),[t,n,r,a,o]=e,i=Qt(t),s=On(i);vt(t,n);let[u,l]=Sb();return le(()=>()=>{Ut.unbind("esc")},[]),!i||!s?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:[d(Hw,{}),d(Yw,{config:i}),d(Ww,{config:i}),d($a,{config:i,ctx:s,serviceType:"translationService"}),d(zw,{config:i}),d($w,{config:i}),d(Vw,{config:i}),d(Kw,{config:i}),d(Gw,{config:i}),d(qw,{config:i,ctx:s}),d(Lb,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function Hw(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=s=>{s.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...wo(),updatedAt:new Date().toISOString()}),Da().catch(u=>{I.error("clean local config error",u)}),wa().catch(u=>{I.error("clean buildin config error",u)}),Wa().catch(u=>{I.error("clean cache error",u)}),it(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:o("general")}),d("a",{class:"text-sm",href:"#",onClick:i,children:o("reset")})]})}function zw({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(we,{title:i("interface language"),description:i("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),me()||setTimeout(()=>{c0()},200)},children:jw.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Jt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function qw({config:e,ctx:t}){let{t:n}=W(),[r,a]=$(0),[o,i]=$(""),[s,u]=$(!1),l=$e(),c=(S,A,P)=>{u(!s),h(w=>{let v=w.translationThemePatterns||{},L=v[A]||{},D=L.matches||[],T=[...D];return P==="edit"&&(T=zt(o,D)),T=Rn(S,T),{...w,translationThemePatterns:{...v,[A]:{...L,matches:T}}}})},g=(S,A)=>{h(P=>{let w=P.translationThemePatterns||{},v=w[A]||{},D=[...v.matches||[]];return S.forEach(T=>{D=zt(T,D)}),{...P,translationThemePatterns:{...w,[A]:{...v,matches:D}}}})},p=(S,A,P)=>{u(!s),i(S),a(P)},[f,h,y,C,b]=l,x=S=>{h(A=>{let P={matches:[],excludeMatches:[]};return A&&A.translationThemePatterns&&A.translationThemePatterns[S]&&(P=A.translationThemePatterns[S]),Lo(document,S,P,A.selectTranslationFont),{...A,translationTheme:S}})};return d("div",{children:[d("div",{class:"nav",children:[d(we,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:S=>{x(S.target.value)},children:Lg.map((S,A)=>d("option",{value:S,selected:S===e.translationTheme,children:n(`translationTheme.${S}`)},"theme"+A))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:ki(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ai(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&Tp(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[Tp(e.translationTheme).map((S,A)=>{S.label=n(`customThemeLabel.${S.name}`);let P=e.translationThemePatterns||{},w=e.translationTheme,v=P[w]||{},L=`theme-${w}-${S.name}`,D=T9(L)||void 0,T=v[S.name]||D;return d(Wi,{config:e,field:S,value:T,onChange:j=>{h(R=>{let M=R.translationThemePatterns||{},N={...M[e.translationTheme]||{},[S.name]:j},H={...R,translationThemePatterns:{...M,[e.translationTheme]:N}};return Lo(document,e.translationTheme,N,R.selectTranslationFont),H})}},"theme-prop"+A)}),d("a",{href:"#",class:"text-sm secondary",onClick:S=>{S.preventDefault(),h(A=>{let P=A.translationThemePatterns||{},w={...P[e.translationTheme]};Tp(e.translationTheme).forEach(L=>{delete w[L.name]});let v={...A,translationThemePatterns:{...P,[e.translationTheme]:w}};return Lo(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(tD,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),Lg.map((S,A)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:S,checked:S===e.translationTheme,onChange:P=>{x(P.target.value)}}),n(`translationTheme.${S}`)]})}),d("p",{children:d("font",{class:ki(S,!1,[],!1).join(" "),children:d("font",{class:Ai(S).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+A))]})]})}),d("div",{class:"nav",children:[d(we,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:S=>{S.preventDefault(),u(!s)},children:n("add")})})]}),s?d(aa,{toggleModal:S=>{S.preventDefault(),u(!s)},onAddInterfaceUrl:(S,A)=>{c(S,e.translationTheme,A)},urlValue:o,index:r}):null,d(qa,{urls:eD(e),type:"matches",onDeleteUrl:S=>{g(S,e.translationTheme)},onEditUrl:p})]})}function Ww({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=za(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(we,{title:i("target"),description:i("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Jt(l,e?.interfaceLanguage)},"language"+c))})]})}function $w({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),{handleTranslationLanguagePatternSelected:s}=Fb(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(xu,{title:t("always languages"),description:t("always translate the following languages"),languages:Pb,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function Vw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),{handleTranslationLanguagePatternSelected:s}=Fb(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(xu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Pb,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function Kw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),s=(l,c,g,p)=>{r(f=>{let h=f.translationUrlPattern,y=[],C=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,C=h.excludeMatches);let b=[...y],x=[...C];if(p==="edit"){if(!b[c])return f;b[c]=l}return b=Rn(l,b),x=zt(l,C),{...f,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...f.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await qt();for(let p of l){let f=p,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==f),C=!1;y.length!==h.length&&(C=!0),C&&Wt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let p=g.translationUrlPattern,f=[];p&&p.matches&&(f=p.matches);let h=[...f];return l.forEach(y=>{h=zt(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Eu,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function Gw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),s=(l,c,g,p)=>{r(f=>{let h=f.translationUrlPattern,y=[],C=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,C=h.excludeMatches);let b=[...y],x=[...C];return p==="edit"&&(x[c]=l),b=zt(l,y),x=Rn(l,x),{...f,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...f.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let p=g.translationUrlPattern,f=[];p&&p.excludeMatches&&(f=p.excludeMatches);let h=[...f];return l.forEach(y=>{h=zt(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Eu,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Fb(e){return{handleTranslationLanguagePatternSelected:Ne((n,r)=>{if(!n){e(i=>{let s={...i.translationLanguagePattern};return{...i,translationLanguagePattern:{...i.translationLanguagePattern,matches:zt(r,s.matches),excludeMatches:zt(r,s.excludeMatches)}}});return}let a=n,o=a==="matches"?"excludeMatches":"matches";r&&e(i=>{let s={...i.translationLanguagePattern};return s[a]=Rn(r,s[a]),s[o]=zt(r,s[o]),{...i,translationLanguagePattern:{...i.translationLanguagePattern,...s}}})},[e])}}var Cp=0,xp;async function Bb(e){if(Cp>60*10)return null;Cp++,gt.refresh(),await xn(300);let t=await gt.get(Tt,null);I.debug("loopCheckUser",Cp,t),t?(clearTimeout(xp),e(t)):xp=setTimeout(Bb.bind(null,e),1500)}function Mb(e){let{user:t,lang:n}=e,r=We(),a=t&&t.email==="test@immersivetranslate.com",{t:o}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let i=t,s=i.subscription,u=Xw(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",p="";if(g){let f="";s.isTrial&&(f=o("autoRenewTrialSuffix")),p=o("currentPlanDescriptionForContinuous",{plan:`${o(l)}${f}`,endAt:u})}else c?p=o("currentPlanDescriptionForOneTime",{plan:o(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):f1(i)?p=o("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:o(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?p=o("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:o(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):p=o("currentPlanDescriptionForAutoRenewCaceling",{plan:o(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:p}})}else return d("span",{class:"info-subtitle",children:r||a?"":o("currentPlanDescriptionForFree")})}function Yw({config:e}){let{t}=W(),n=We(),[r,a]=$(null),o=!!e.showSponsorOnSafari,[i,s,u,l,c]=Le(Ee),g=e.interfaceLanguage;le(()=>(gt.get(Tt,null).then(y=>{y&&(a(y),Jw(y.token).then(C=>{let b=C.data;b.token=y.token,gt.set(Tt,b),a(b)}).catch(C=>{Xs(C),a(null)}))}),()=>{clearTimeout(xp)}),[]);let p=Ne(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&Qw(r.token).finally(async()=>{await gt.remove(Tt),await xn(200),await gt.refresh(),a(null)})},[r]),f=Ne(async y=>{y&&y.preventDefault&&y.preventDefault(),Zw(ql),await gt.set(Ws,!0),Bb(C=>{z0(C.token,i,s),a(C),Ep?.close(),window.location.reload()})},[a]),h=r?.avatar||Tb;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?ta(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d(Mb,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&o===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${xa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:Su})]}),d("div",{class:"",children:d("a",{href:`${Co}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:p,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:Su})]}),d(Mb,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Co,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:p,children:t("logout")})})]})]}):ta(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:f,children:t(n?"loginForSafari":"login")})]})}var Rb=yo;function Jw(e){return de({responseType:"json",url:Rb+"/v1/user",method:"get",headers:{token:e}})}function Qw(e){return de({responseType:"json",url:Rb+"/v1/user/logout",method:"delete",headers:{token:e}})}var Ep=null;function Zw(e){let r=screen.width/2-230,a=screen.height/2-640/2;return Ep=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),Ep}function Xw(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function Tp(e){let t=[];return qs[e]&&(t=t.concat(qs[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function eD(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var vp="";function tD({config:e}){let{t}=W(),[n,r]=$(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(nD,{config:e,isOpen:n})]})}function nD({config:e,isOpen:t}){let{t:n}=W(),[r,a]=$([]),[o,i]=$(!1);le(()=>{if(!t||r.length)return;let f=e.translationFonts.filter(y=>bp(y,n("sampleTargetText").charAt(0)+"a"));f.length&&f.unshift("none");let h=e.selectTranslationFont&&!f.find(y=>y===e.selectTranslationFont);(!f.length||h)&&i(!0),a(f)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Le(Ee),p=f=>{f!==vp&&!bp(f,n("sampleTargetText").charAt(0)+"a")&&rn(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,C={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(C=h.translationThemePatterns[y]),Lo(document,y,C,f),{...h,selectTranslationFont:f}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{i(!o),o&&(r.find(h=>h===e.selectTranslationFont)||p(vp))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:o}),n("translationFont.custom")]}):null,o?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:f=>p(f.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:f=>{p(f.target.value)},children:r.map((f,h)=>{let y=n(`font.${f}`);y.startsWith("font.")&&(y=f);let C=f=="none"?vp:f;return d("option",{value:C,selected:f===e?.selectTranslationFont,children:y},"locale"+h)})})]})}m();var Ln={};zl.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function Sp(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let[i,s]=$(null),{t:u}=W();if(le(()=>{pt().then(c=>{bn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!i)return d("div",{children:"loading"});let l=i.config;return d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(rD,{config:l}),d(aD,{config:l}),d(oD,{config:l}),d($a,{config:l,ctx:i,serviceType:"inputTranslationService"}),d(iD,{config:l}),d(sD,{config:l}),d(lD,{config:l}),d(uD,{config:l})]})})}function rD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[i("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(we,{title:i("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?i("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):i("enableInputTranslationDescription",{inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function aD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=za(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(we,{title:i("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?i("inputTargetLanguageDescriptionForNoneKey"):i("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Jt(l,e.interfaceLanguage)},"language"+c))})]})}function oD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();return e?d("div",{class:"nav",children:[d(we,{title:i("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function iD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(we,{title:i("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?i("inputStartingTriggerKeyDescriptionForNoneKey"):i("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:zl.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?i(u.labelKey):u.key},"startingkey-"+l))})]}):null}function sD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:i("inputTrailingTriggerKeyTitle"),description:i("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:zl.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?i(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:i("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function uD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),[s,u]=$(!1),l=b=>{u(!s)},[c,g]=$(0),[p,f]=$(""),h=(b,x,S,A)=>{l(S),n(P=>{let w=P.inputTranslationUrlPattern,v=[],L=[];w&&w.matches&&w.excludeMatches&&(v=w.matches,L=w.excludeMatches);let D=[...v],T=[...L];return A==="edit"&&(S==="matches"?D[x]=b:T[x]=b),S==="matches"?(D=Rn(b,D),T=zt(b,L)):(D=zt(b,v),T=Rn(b,T)),{...P,inputTranslationUrlPattern:{...P.inputTranslationUrlPattern,matches:D,excludeMatches:T}}})},y=(b,x)=>{n(S=>{let A=S.inputTranslationUrlPattern,P=[];x==="matches"?A&&A.matches&&(P=A.matches):A&&A.excludeMatches&&(P=A.excludeMatches);let w=[...P];return b.forEach(v=>{w=zt(v,w)}),{...S,inputTranslationUrlPattern:{...S.inputTranslationUrlPattern,[x]:w}}})},C=(b,x,S)=>{l(x),f(b),g(S)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:i("inputTranslationBlockUrlsTitle"),description:i("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:i("add")})}),s?d(aa,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:p,index:c}):null]}),d(qa,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:C})]}):null}function lD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();if(!e)return null;let s=()=>ot().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>ot().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(we,{title:i("inputTrailingTriggerKeyTimeout"),description:i("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}m();function wp(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let i=Qt(t),{t:s}=W(),[u,l]=$({}),[c,g]=$({});return le(()=>{Q.storage.sync.get(null).then(p=>{l(p),Q.storage.local.get(null).then(f=>{g(f)})})},[t]),!i||!t?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(pD,{}),d(mD,{}),d(fD,{}),d(cD,{}),d(dD,{}),d(gD,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(i,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function cD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let p=JSON.parse(c);if(!Array.isArray(p)){rn("Invalid rules, rules must be an array");return}g.rules=p}t(()=>g),it(o("saved"))}catch(c){rn(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(o("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),it(o("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:i,placeholder:`[{ + `);if(c.statusCode)throw new Error(`Something went wrong! The response is ${JSON.stringify(c)}.`)}let g=c[0].translations[0],p=c[0].detectedLanguage;return{text:g.text,from:U6.get(p.language),to:U6.get(g.to)}}m();m();m();m();m();function Ua(e){return e!=null}function K6(e,t,n){return`${e.type}#${t}#${n}`}function G6(e,t,n,r,a){return{body:a,id:r,type:K6(e,t,n)}}function gw(e,t,n,r){return{id:n,response:r,type:K6(e,"ask",t)}}function Y6(e,t,n,r){if(Ua(r)){let a=r.type;if(Ua(a)&&Ua(r.body)){let[o,i,s]=a.split("#");return o===e.type&&i===t&&s===n}else return!1}else return!1}function mw(e,t,n){if(Ua(n)){let r=n.type;if(Ua(r)&&Ua(n.response)){let[a,o,i]=r.split("#");return a===e.type&&o==="ask"&&i===t}else return!1}else return!1}function pw(e){e.forEach(([t,n])=>t.removeEventListener("message",n)),e.length=0}function fw(e,t,n,r){return new Promise(a=>{let o=i=>{let s=i.data;mw(t,n,s)&&s.id===r&&(e.removeEventListener("message",o),a(s.response))};e.addEventListener("message",o)})}function hw(e,t,n,r){let a=o=>{let i=o.data;Y6(t,"tell",n,i)&&r(i.body)};return e.addEventListener("message",a),[e,a]}function $6(e,t,n,r,a,o){let i=async s=>{let u=s.data;if(Y6(n,"ask",r,u)){let l=await o(u.body);t=s.source,t.postMessage(gw(n,r,u.id,l),s.origin)}};return e.addEventListener("message",i),[e,i]}function bw(e,t,n,r,a){let o=Math.random().toString();return e.postMessage(G6(t,"tell",n,o,r),a)}async function V6(e,t,n,r,a,o,i){let s=Math.random().toString(),u=new Promise(async(l,c)=>{let g=setTimeout(()=>c(new Error(`Failed to get response within ${i}ms`)),i),p=await fw(e,n,r,s);clearTimeout(g),l(p)});return t.postMessage(G6(n,"ask",r,s,a),o),u}var ja=class e{constructor(t,n,r=window,a="*"){this.protocol=t;this.targetWindow=n;this.thisWindow=r;this.targetOrigin=a;$6(r,n,this.getSystemProtocol("ping"),"ping",a,()=>Promise.resolve({}))}static async connect(t,n=10,r=500){for(let a=0;a<=n;a++)try{return await t.ping({timeout:r}),t}catch{continue}throw new Error(`Could not connect on protocol ${t.protocol.type} after ${n*r}ms`)}static parent(t,n,r="*",a=window){let o=n.contentWindow;if(Ua(o))return new e(t,o,a,r);throw new Error("iframe.contentWindow was null")}static iframe(t,n="*",{thisWindow:r=window,targetWindow:a=window.parent}={}){return new e(t,a,r,n)}static rootIframe(t,n="*",{thisWindow:r=window}={}){return new e(t,null,r,n)}getSystemProtocol(t){return{type:`system|${t}`}}listeners=[];async ping({timeout:t=1e4}){await V6(this.thisWindow,this.targetWindow,this.getSystemProtocol("ping"),"ping",{data:{},payload:{}},this.targetOrigin,t)}handleTell(t,n){this.listeners.push(hw(this.thisWindow,this.protocol,t,n))}tell(t,n){bw(this.targetWindow,this.protocol,t,n,this.targetOrigin)}handleAsk(t,n){this.listeners.push($6(this.thisWindow,this.targetWindow,this.protocol,t,this.targetOrigin,n))}ask(t,n,r=1e4){if(this.targetWindow)return V6(this.thisWindow,this.targetWindow,this.protocol,t,n,this.targetOrigin,r);throw new Error("target window is requried")}destroy(){pw(this.listeners)}};var J6;async function Q6(){if(ot()){let t=globalThis;for(;t.top!=t.self;)t=t.top;let n=ja.iframe(Hl,"*",{targetWindow:t});J6=n,await ja.connect(n).catch(r=>{I.error("connect with parent frame error",r)})}}function Z6(){return J6}var I0=new Map;async function Km(e){let t=e.url;if(e.method&&(t+=e.method),e.body&&(t+=qn(e.body)),I0.has(t))return I0.get(t);let n=de(e);I0.set(t,n);try{return await n}catch(r){throw r}finally{setTimeout(()=>{I0.delete(t)},3e3)}}async function X6(e){return Km(e)}async function O0(e){if(ot()){let n=Z6();if(n)try{return await n.ask("throttleRequest",e)}catch(r){throw I.error("can not comunicate with root frame, use strict limiter",r),r}else return Km(e)}else return Km(e)}m();function eb(e){let t=e.split(".");if(t.length<=1)throw new Error("invlaid token");let n=t[1];if(!n)throw new Error("invalid base64 url token");let r=n.replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(globalThis.atob(r).split("").map(function(s){return"%"+("00"+s.charCodeAt(0).toString(16)).slice(-2)}).join("")),o=JSON.parse(a),i=new Date(o.exp*1e3);return{accessToken:e,accessTokenExpiresAt:i.toISOString()}}m();async function N0(e){await Ug(e)}async function U0(e,t){let n=await Ig(e);if(n?.accessToken&&n?.accessTokenExpiresAt){let r=Date.now(),o=new Date(n.accessTokenExpiresAt).getTime();if(o-r>30*1e3)return n;if(o-r>3e3)return tb(e,t)}return tb(e,t)}async function tb(e,t){let n=await t(),r=n.accessTokenExpiresAt,o=new Date(r).getTime()-Date.now();return await Og(e,n,o-1e3),n}var yw=[["auto",""],["ar","ar"],["ga","ga"],["et","et"],["bg","bg"],["is","is"],["pl","pl"],["bs","bs-Latn"],["fa","fa"],["da","da"],["de","de"],["ru","ru"],["fr","fr"],["zh-TW","zh-Hant"],["fil","fil"],["fj","fj"],["fi","fi"],["gu","gu"],["kk","kk"],["he","he"],["ht","ht"],["ko","ko"],["nl","nl"],["ca","ca"],["zh-CN","zh-Hans"],["wyw","lzh"],["cs","cs"],["kn","kn"],["otq","otq"],["tlh","tlh"],["hr","hr"],["lv","lv"],["lt","lt"],["ro","ro"],["mg","mg"],["mt","mt"],["mr","mr"],["ml","ml"],["ms","ms"],["mi","mi"],["bn","bn-BD"],["hmn","mww"],["af","af"],["pa","pa"],["pt","pt"],["ps","ps"],["ja","ja"],["sv","sv"],["sm","sm"],["sr-Latn","sr-Latn"],["sr-Cyrl","sr-Cyrl"],["no","nb"],["sk","sk"],["sl","sl"],["sw","sw"],["ty","ty"],["te","te"],["ta","ta"],["th","th"],["to","to"],["tr","tr"],["cy","cy"],["ur","ur"],["uk","uk"],["es","es"],["el","el"],["hu","hu"],["it","it"],["hi","hi"],["id","id"],["en","en"],["yua","yua"],["bo","bo"],["vi","vi"]],Gm=new Map(yw),Tu=class extends ke{static langMap=Gm;isSupportList=!0;maxTextLength=1800;constructor(t,n,r){super(t,n,r)}static async clearState(){await N0(vg)}async translate(t){let{text:n,from:r,to:a}=t;return n?await W6(n,r,a):{...t}}async init(){await this.getAccessToken()}async getAccessToken(){return await U0(vg,async()=>{let t=await O0({responseType:"text",url:"https://edge.microsoft.com/translate/auth",headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5","cache-control":"no-cache",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","sec-mesh-client-arch":"x86_64","sec-mesh-client-edge-channel":"beta","sec-mesh-client-edge-version":"113.0.1774.23","sec-mesh-client-os":"Windows","sec-mesh-client-os-version":"10.0.19044","sec-mesh-client-webview":"0",Referer:"https://appsumo.com/","Referrer-Policy":"strict-origin-when-cross-origin"},body:null,method:"GET",timeout:5e3,retry:this.retry});return eb(t)})}async translateList(t){let{from:n,to:r,text:a}=t,o=Gm.get(n)||"auto",i=Gm.get(r)||r;o==="auto"&&(o="");let s=await this.getAccessToken(),u=[];for(let p of a)u.push({Text:p});let l=JSON.stringify(u),c=`https://api-edge.cognitive.microsofttranslator.com/translate?from=${o}&to=${i}&api-version=3.0&includeSentenceLength=true`,g=await de({url:c,headers:{accept:"*/*","accept-language":"zh-TW,zh;q=0.9,ja;q=0.8,zh-CN;q=0.7,en-US;q=0.6,en;q=0.5",authorization:"Bearer "+s.accessToken,"cache-control":"no-cache","content-type":"application/json",pragma:"no-cache","sec-ch-ua":'"Microsoft Edge";v="113", "Chromium";v="113", "Not-A.Brand";v="24"',"sec-ch-ua-mobile":"?0","sec-ch-ua-platform":'"Windows"',"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"cross-site","Referrer-Policy":"strict-origin-when-cross-origin","User-Agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0"},body:l,method:"POST",timeout:this.requestTimeout});if(g&&g.length>0&&g[0].translations&&g[0].translations.length>0)return{text:g.map(p=>p.translations[0]?.text||""),from:n,to:r};throw new J("Microsoft translate error "+JSON.stringify(g))}};m();var nb=[["auto","auto"],["zh-CN","zh"],["en","en"],["yue","yue"],["wyw","wyw"],["ja","jp"],["ko","kor"],["fr","fra"],["es","spa"],["th","th"],["ar","ara"],["ru","ru"],["pt","pt"],["de","de"],["it","it"],["el","el"],["nl","nl"],["pl","pl"],["bg","bul"],["et","est"],["da","dan"],["fi","fin"],["cs","cs"],["ro","rom"],["sl","slo"],["sv","swe"],["hu","hu"],["zh-TW","cht"],["vi","vie"]],Ym=new Map(nb),Cw=new Map(nb.map(([e,t])=>[t,e])),Jm=class extends ke{static langMap=Ym;endpoint="https://api.fanyi.baidu.com/api/trans/vip/translate";fieldEndpoint="https://fanyi-api.baidu.com/api/trans/vip/fieldtranslate";appid="";key="";isSupportList=!1;maxTextGroupLength=3;action=!1;domain="";constructor(t,n,r){if(super(t,n,r),!t||!t.appid||!t.key)throw new J("appid and key are required");this.appid=t.appid?.trim(),this.key=t.key?.trim(),t.action&&(this.action=!0),t.endpoint&&(this.endpoint=t.endpoint),t.fieldEndpoint&&(this.fieldEndpoint=t.fieldEndpoint),t.domain&&(this.domain=t.domain,this.endpoint=this.fieldEndpoint)}getDefaultRateLimit(){return{limit:1,interval:1550}}async translate(t){let n=Date.now().toString(),{endpoint:r}=this,{appid:a,key:o}=this,{text:i,from:s,to:u}=t,l=qn(a+i+n+o);this.domain&&(l=qn(a+i+n+this.domain+o));let c=new URLSearchParams({from:Ym.get(s)||"auto",to:Ym.get(u)||u,q:i,salt:n,appid:a,sign:l});this.action&&c.set("action","1"),this.domain&&c.set("domain",this.domain);let g=new URL(r);g.search=c.toString();let p=await de({url:g.toString(),retry:this.retry,timeout:this.requestTimeout});if(p.error_code)throw new J("API_SERVER_ERROR",p.error_msg);let{trans_result:f,from:h}=p,y=f.map(({dst:b})=>b);return{from:Cw.get(h)||h,to:u,text:y.join(` +`)}}},rb=Jm;m();m();var Fo=class extends ke{langMap;requestBaseConfig;apiServiceConfig;constructor(t,n,r){super(t,n,r),this.apiServiceConfig=this.serviceConfig,this.isSupportList=this.apiServiceConfig.isSupportList,this.langMap=new Map(this.apiServiceConfig.langs),this.requestBaseConfig=this.handleBaseApiServiceConfig(this.apiServiceConfig)}async translate(t){if(!Object.keys(this.apiServiceConfig).length)throw"serivce id not found config";let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new J(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n);if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Zl(i);return{text:this.handleResponseText(s),from:r,to:a}}async translateList(t){if(!Object.keys(this.apiServiceConfig).length)throw new J("serivce id not found config");let{text:n,from:r,to:a}=t;if(!this.langMap.has(a))throw new J(`Unsupported language: ${a}`);a=this.langMap.get(a);let o=await this.checkLang(r,n.join(" "));if(!o)return{text:n,from:r,to:a};r=o;let i=this.handleRequest(n,r,a),s=await Zl(i);return{text:this.handleResponseText(s),from:r,to:a}}handleBaseApiServiceConfig(t){let n=t.request.url,r=t.request.headers||{};return r["content-type"]||(r["content-type"]="application/json"),{url:n,retry:t.request.retry||this.retry,method:t.request.method||"POST",headers:r,body:JSON.stringify(t.request.body),timeout:this.requestTimeout}}async checkLang(t,n){if(t=="auto"){if(this.langMap.has("auto"))return"auto";t=await this.detectLanguageRemotely(n.slice(0,this.apiServiceConfig.checkLangLenth||10))}return this.langMap.has(t)?this.langMap.get(t):null}handleRequest(t,n,r){let a={...this.requestBaseConfig},o=a?.body||"",i=this.apiServiceConfig.keywords||{};a.body=u(o);let s=a.headers||{};return Object.keys(s).forEach(l=>{s[l]=u(s[l])}),a.headers=s,a.url=u(a.url||""),a;function u(l){return l.replaceAll('"{text}"',()=>Array.isArray(t)?JSON.stringify(t):`"${t}"`).replaceAll("{from}",n).replaceAll("{to}",r).replaceAll(/{([a-z:_]+)}/gi,(g,p)=>{let[f,h]=p.split(":"),y=i[f];return h==="random"?Tw(y.split(",")):y})}}handleResponseText(t){let n=this.apiServiceConfig.response,r=t,a=n.text.split(".");for(let o of a){if(Array.isArray(r))return r=r.map(i=>i[o]),r;r=r[o]}return r}detectLanguageRemotely(t){return ra.detectLanguageRemotelyByTransmart(t)}};function Tw(e){let t=Math.floor(Math.random()*e.length);return e[t]}var ab=[["zh-CN","zh"],["en","en"],["ja","ja"],["ko","ko"],["fr","fr"],["es","es"],["ru","ru"]],Qm=class extends Fo{static langMap=new Map(ab);constructor(t,n,r){if(!t?.token)throw new J("token are required");super({...t,isSupportList:!0,langs:ab,keywords:{token:t.token?.trim()},request:{headers:{"content-type":"application/json","x-authorization":"token {token:random}"},url:"https://api.interpreter.caiyunai.com/v1/translator",retry:2,body:{source:"{text}",trans_type:"{from}2{to}"}},response:{text:"target"}},n,r)}},ob=Qm;m();var vw=[["auto","auto"],["zh-CN","zh"],["en","en"],["ja","ja"]],j0=new Map(vw),Zm=class extends ke{static langMap=j0;token="ssdj273ksdiwi923bsd9";constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translateList(t){let{text:n,from:r,to:a}=t;if(!j0.get(a))throw new J(`Unsupported language: ${a}`);if(r==="auto")throw new J("Unsupported language: auto");let i=n;return{text:(await de({retry:this.retry,url:"https://api.interpreter.caiyunai.com/v1/translator",headers:{"content-type":"application/json","x-authorization":"token "+this.token},method:"POST",body:JSON.stringify({source:i,trans_type:`${j0.get(r)||"auto"}2${j0.get(a)}`}),timeout:this.requestTimeout})).target,from:r,to:a}}},ib=Zm;m();var sb=[["auto","auto"],["en","en"],["ru","ru"],["pt","pt"],["es","es"],["zh-CN","zh-CHS"],["ja","ja"],["ko","ko"],["fr","fr"],["ar","ar"],["id","id"],["vi","vi"],["it","it"]],Xm=new Map(sb),xw=new Map(sb.map(([e,t])=>[t,e]));function Ew(e){let t=e.length;return t<=20?e:e.substring(0,10)+t+e.substring(t-10,t)}var ep=class extends ke{static langMap=Xm;isSupportList=!1;appId="";appSecret="";throttleLimit=5;domain="general";vocabId="";constructor(t,n,r){if(super(t,n,r),!t||!t.appId||!t.appSecret)throw new J("appId and appSecret are required");this.appId=t.appId?.trim(),this.appSecret=t.appSecret?.trim(),t.domain&&(this.domain=t.domain),t&&t.vocabId&&(this.vocabId=t.vocabId)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o=Sw(32),i=Math.round(new Date().getTime()/1e3),s=this.appId+Ew(n)+o+i+this.appSecret,u=await hr(s),l={q:n,appKey:this.appId,salt:o.toString(),from:Xm.get(r)||"auto",to:Xm.get(a)||a,sign:u,signType:"v3",curtime:i.toString()};this.domain&&this.domain!=="general"&&(l.domain=this.domain),this.vocabId&&(l.vocabId=this.vocabId);let c=new URLSearchParams(l),p=await de({url:"https://openapi.youdao.com/api",method:"POST",body:c.toString(),headers:{"Content-Type":"application/x-www-form-urlencoded"},retry:this.retry,timeout:this.requestTimeout});if(!p.translation)throw new J(JSON.stringify(p));let f=p.l,[h,y]=f.split("2");return{text:p.translation.join(` +`),from:xw.get(h),to:a}}};function Sw(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a[t,e]));var np=class extends ke{static langMap=tp;isSupportList=!1;appId="";appSecret="";maxTextLength=800;constructor(t,n,r){super(t,n,r)}getDefaultRateLimit(){return{limit:5,interval:1050}}async translate(t){let{text:n,from:r,to:a}=t,o={q:n,from:tp.get(r)||"auto",to:tp.get(a)||a},i=new URLSearchParams(o),s=await de({url:"https://aidemo.youdao.com/trans",method:"POST",body:i.toString(),headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"},retry:this.retry,timeout:this.requestTimeout});if(s&&s.translation)return{text:s.translation.join(` +`),from:r,to:a};throw new J("Youdao translation failed: "+JSON.stringify(s))}},cb=np;m();var vu=class extends Fo{constructor(t,n,r){super({...t,isSupportList:!0,langs:(t.langs||"zh-CN,en").split(",").map(a=>[a,a]),limitPerSecond:t.limitPerSecond||5,maxTextLengthPerRequest:t.maxTextLengthPerRequest||1200,maxTextGroupLengthPerRequest:t.maxTextGroupLengthPerRequest||1,placeholderDelimiters:t.placeholderDelimiters||qs,request:{url:t.url,retry:2,body:{text_list:"{text}",source_lang:"{from}",target_lang:"{to}"}},response:{text:"translations.text"}},n,r)}};m();var db="immersive-translate-gemini-fake-user-key",ww=[["auto","auto"],["zh-CN","Simplified Chinese"],["zh-TW","Traditional Chinese"],["en","English"],["ar","Arabic"],["bn","Bengali"],["bg","Bulgarian"],["hr","Croatian"],["cs","Czech"],["da","Danish"],["nl","Dutch"],["et","Estonian"],["fi","Finnish"],["fr","French"],["de","German"],["el","Greek"],["he","iw"],["hi","Hindi"],["hu","Hungarian"],["id","Indonesian"],["it","Italian"],["ja","Japanese"],["ko","Korean"],["lv","Latvian"],["lt","Lithuanian"],["no","Norway"],["pl","Polish"],["pt","Portuguese"],["ro","Romanian"],["ru","Russian"],["sr","Serbian"],["sk","Slovak"],["sl","Slovene"],["es","Spanish"],["sw","Swahili"],["sv","Swedish"],["th","Thai"],["tr","Turkish"],["uk","Ukrainian"],["vi","Vietnamese"]],gb=new Map(ww),rp=class extends Ui{static langMap=gb;provider="custom";randomPrefix="My user id is {{id}}. ";fakeId="";constructor(t,n,r){super(t,n,r),t||(t={}),t.provider&&(this.provider=t.provider),t.randomPrefix&&(this.randomPrefix=t.randomPrefix),this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={key}",t?.apiUrl&&(this.apiUrl=t.apiUrl),this.maxTextGroupLength=this.maxTextGroupLength||10,this.model=this.model||"gemini-1.0-pro-latest",this.bodyConfigs=t?.bodyConfigs||{}}getLangMap(){return gb}getDefaultRateLimit(){return{limit:1,interval:1050}}async handleOptions(t,n){this.fakeId="",this.randomPrefix&&(this.fakeId=await Rg(db,""),this.fakeId||(this.fakeId=Dw(10),await Ng(db,this.fakeId)));let r=this.getRandomKey(),a={url:this.apiUrl.replace("{model}",this.model),method:"POST",headers:{"content-type":"application/json"},timeout:this.requestTimeout,retry:this.retry};r&&(a.url=a.url.replace("{key}",r));let o=this.systemPrompt+t;this.randomPrefix&&(o=this.randomPrefix.replace("{{id}}",this.fakeId)+o);let i={contents:[{role:"user",parts:[{text:o}]}],...this.bodyConfigs};return a.body=JSON.stringify(i,null,2),a}parseResponse(t){return t?.candidates?.[0]?.content?.parts?.[0]?.text}filterContent(t,n,r,a){let o=super.filterContent(t,n,r);return o.includes(this.fakeId)&&a.length<=1?t:o}};function Dw(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let n=(await O0({url:"https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=es&widgetTheme=light&autoMode=false",method:"GET",responseType:"text"})).match(/sid\:\s\'[0-9a-f\.]+/),r="",a=Date.now()+1*60*1e3;return n&&n[0]&&n[0].length>7&&(r=n[0].substring(6),a=Date.now()+30*60*1e3),{accessToken:r,accessTokenExpiresAt:new Date(a).toISOString()}})}async translateList(t){let{text:n,from:r,to:a}=t;if(!n)return{...t};let o=await this.getAccessToken(),i=new URLSearchParams;i.append("srv","tr-url-widget"),i.append("id",`${o.accessToken}-0-0`),i.append("format","html"),i.append("lang",`${r==="auto"?"":op.get(r)+"-"}${op.get(a)}`),n.forEach(l=>{i.append("text",l)});let s=await de({url:`https://translate.yandex.net/api/v1/tr.json/translate?${i.toString()}`});if(s?.code!==200)return{...t};let u=s.text?.map(l=>l);return{from:r,to:a,text:u||n}}getDefaultRateLimit(){return{limit:5,interval:1050}}};var Lw={mock:Ii,mock2:Ii,custom:vu,google:Po,transmart:pu,deepl:E6,volc:I6,volcAlpha:yu,bing:Tu,tencent:gu,tenAlpha:mu,baidu:rb,caiyun:ob,cai:ib,openl:F0,youdao:ub,you:cb,d:Ri,dpro:Ri,deeplx:Cu,niu:S6,azure:w6,openai:M6,gemini:mb,claude:fb,papago:D6,aliyun:bu,yandex:xu},Ha={};Object.keys(Qn).forEach(e=>{Ha[e]={...Qn[e],class:Lw[e]}});function za(e,t){let n=Bn;if(Ha[e]&&Ha[e].class&&Ha[e].class.langMap&&Ha[e].class.langMap.size>0){let r=Ha[e].class.langMap,a=n.filter(o=>r.get(o));return a.includes(t)||a.unshift("placeholder"),a}else return Bn}async function Mr(e,t,n){if(!e.text)return e;let r=null,a=await et({sentences:[e]},t,(o,i,s)=>{o&&(r=o)},n);if(r)throw r;if(a.sentences.length>0)return{...e,...a.sentences[0]};throw new J("translateFailed","translate failed")}async function hb(e,t){for(let n of e)try{return await Mr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto"},{...t,translationService:n},{retry:1,requestTimeout:t.config.verifyRequestTimeout||5*1e3}),n}catch{continue}return null}async function ip(e){let{config:t,translationService:n}=e,r=t.translationGeneralConfig,a=t.translationServices,o=n,i=a[o]||{},s=Yt(e.user);await new Ha[o].class(i,r,{translationService:o,userToken:e.user?.token,isPro:s,sourceProgram:e.sourceProgram,glossaries:e.rule.glossaries,excludeRegexps:e.rule.excludeRegexps}).init()}function _w(e){if(!e?.length)return"auto";let t=e[0].from;return e[0].fromByClient&&e[0].fromByClient!=="auto"&&(t=e[0].fromByClient),t}async function et(e,t,n,r){if(!e.sentences.length)return{...e};let{config:a,translationService:o,state:i}=t,s=a.translationGeneralConfig,u=a.translationServices,l=o,c=t.targetLanguage;e&&e.sentences&&e.sentences[0]&&e.sentences[0].to&&(c=e.sentences[0].to);let g=u[l]||{};g=A6(g,{sourceLanguage:_w(e.sentences),targetLanguage:c,model:g.model||"",url:t.url,isPro:t.isPro?"true":"false",sourceProgram:t.sourceProgram||""}),r&&(g={...g,...r});let p=a.beta,f=i.cache===!1&&p,h=a.debug===!0&&p;e.sentences&&e.sentences.length>0&&(e.sentences=e.sentences.map(v=>(f&&(v.refresh=!0),h&&(v.debug=!0),v))),l==="openai"&&(e.sentences=e.sentences.map(v=>({...v,from:"auto"})));let y=[],C={sentences:Array(e.sentences.length)},b=e.sentences.length,x=-1,S=Yt(t.user),A;try{A=new Ha[l].class(g,s,{translationService:l,userToken:t.user?.token,isPro:S,sourceProgram:t.sourceProgram,glossaries:t.rule.glossaries,excludeRegexps:t.rule.excludeRegexps,minTextCount:t.rule.paragraphMinTextCount}),await A.init()}catch(v){if(n){y.push(...e.sentences);let L={translationService:l,isPro:!!t.isPro,isLogin:!!t.user?.token};for(let D of y){let T=v instanceof J?new J(v.name,v.message).initNetWork(v.status).initData(v.data||L):v;n(T,null,D)}}return{sentences:[]}}if(i.cache)for(let v of e.sentences){x++;let L=l;l==="openl"&&(L=l+"-"+g.codename||F0.DEFAULT_CODENAME);let D=A.getCacheKeyPrefix();D&&(L=D+"-"+L);let T=null;try{T=await nl(J9({originalText:v.text,from:v.from,to:v.to,service:L}),200)}catch(j){I.warn("query cache DB error, but it's ok",j)}if(T){let j={...v,text:T.translatedText};C.sentences[x]=j,n&&n(null,j,v)}else y.push(v)}else y.push(...e.sentences);let P=y.length;if(b-P>0&&I.debug(`use ${b-P} sentences from cache`),!y.length)return C;let w=await A.multipleTranslate({sentences:y},g,(v,L,D)=>{if(n&&n(v,L,D),!v&&L&&!l.startsWith("mock")&&i.cache){let T=l;l==="openl"&&(T=l+"-"+g.codename||F0.DEFAULT_CODENAME);let j=A.getCacheKeyPrefix();j&&(T=j+"-"+T),i.cache&&nl(Q9({translatedText:L.text,from:D.from,to:D.to,detectedFrom:L.from,key:qn(D.text),service:T}),3e3).catch(R=>{I.warn("set cache DB error",R)})}});for(let v of w?.sentences||[]){let L=C.sentences.findIndex(D=>!D);if(L===-1)throw new J("translateFailed","can not match the result");C.sentences[L]=v}return C}m();m();m();var zi={},Mw={root:"",lang:"en",fallbackLang:"en"};function sp(e,t){let n=Object.assign({},Mw,e);zi=t||zi;let[r,a]=$(n.lang),[o,i]=$(zi),[s,u]=$(!1),l=g=>{if(o.hasOwnProperty(g))return;u(!1);let p=w1(n.root||"",g);n.getUrl&&(p=n.getUrl(n.root||"",g),fetch(p).then(f=>f.json()).then(f=>{zi[g]=f,i({...zi}),u(!0)}).catch(f=>{i({...zi}),u(!0)}))};return le(()=>{l(n.fallbackLang||"en"),l(r)},[r]),{lang:r,setLang:a,t:(g,p)=>{if(!o.hasOwnProperty(r))return g;let f=Ys(o,r,g);return f===g&&r!==n.fallbackLang&&(f=Ys(o,n.fallbackLang,g)),zg(f,p)},isReady:s}}var lp=Yo(null),up={root:"assets",lang:"en",fallbackLang:"en"},qi=e=>{let{t,setLang:n,lang:r,isReady:a}=sp({root:e.root||up.root,lang:e.lang||up.lang,fallbackLang:e.fallbackLang||up.fallbackLang,getUrl:e.getUrl},e.translations);return d(lp.Provider,{value:{t,setLang:n,lang:r,isReady:a},children:e.children})};function W(){return Le(lp)}m();function we(e){return d("div",{class:"nav-left",children:[d("div",{class:"title",children:e.title}),d("div",{class:"description",children:e.description})]})}m();m();function Pr(e){let{items:t,maxWidth:n,className:r,style:a}=e,{lang:o}=W();return n=n||(o==="en"?144:160),d("select",{autoComplete:"off",class:r||"min-select",style:{maxWidth:`${n}px`,...a},value:t.find(i=>i.selected)?.value,onChange:i=>{let s=i.target.value,u=t.find(l=>l.value===s);u&&u.onSelected(u)},children:t.map((i,s)=>d("option",{value:i.value,selected:i.selected,children:i.label},"selectlink"+s))})}function cp(e){let{items:t,maxWidth:n,isInput:r,value:a}=e;return n=n||128,r?d("input",{value:a,onChange:o=>{e.onChange(o.target.value)}}):d("select",{autoComplete:"off",style:{maxWidth:`${n}px`},value:t.find(o=>o.selected)?.value,onChange:o=>{let i=o.target.value,s=t.find(u=>u.value===i);s&&s.onSelected(s)},children:t.map((o,i)=>d("option",{value:o.value,selected:o.selected,children:o.label},"selectlink"+i))})}m();function Bo(e){let{t}=W(),n={};e.width&&(n={width:`${e.width}px`});let[r,a]=$(e.value),{config:o,field:i,onFinish:s}=e,u=i.name;i.label&&(u=i.label),i.labelKey&&(u=t(i.labelKey));let l={},c={};if(o.translationServices&&e.service&&o.translationServices[e.service]&&(c=o.translationServices[e.service]),c.env){let g=Object.keys(c.env);for(let p=0;p{let p=g.target.value,f=Array.isArray(r)?p.split(","):p;a(f),e.onChange(f)},onChange:()=>{s&&s()}}),e.field.descriptionKey?d("small",{class:"whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]}):d(xe,{children:[d("input",{style:n,required:e.field.required,placeholder:e.field.placeholder||e.field.name,value:r,type:e.type,disabled:e.field.disabled||!1,name:e.field.name,autoComplete:"off",onInput:g=>{a(g.target.value),e.onChange(g.target.value)},onChange:()=>{(e.type==="text"||e.type==="password")&&s&&s()}}),e.field.descriptionKey?d("small",{dangerouslySetInnerHTML:{__html:t(e.field.descriptionKey,l)}}):null]})]})}function Wi(e){let{t}=W(),[n,r]=$(!0),[a,o]=$(!1),{config:i,currentProvider:s,onFinish:u,field:l,onChange:c,value:g,isProUser:p}=e;g=g??(l.default||"");let f={},h={};if(i.translationServices&&e.service&&i.translationServices[e.service]&&(h=i.translationServices[e.service]),h.env){let C=Object.keys(h.env);for(let b=0;b{l.options&&(l.options.some(b=>b.value===g)||o(!0))},[]);let y=l.name;if(l.label&&(y=l.label),l.labelKey&&(y=t(l.labelKey)),l.type==="select")return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(cp,{maxWidth:200,items:l.options.map(C=>({label:`${C.label?t(C.label):C.value}`,value:C.value,selected:g===C.value,onSelected:()=>{c(C.value)}})),onChange:c,isInput:a,value:g})]});if(l.type==="model-select"){let C=l.options.map(b=>b.value);return d("div",{class:"flex flex-col mt-5 mb-6",children:[d("label",{class:"text-16 mb-2",children:[y,"\uFF1A"]}),d(cp,{maxWidth:250,items:C.map(b=>({label:b,value:b,selected:g===b,onSelected:()=>{c(b)}})),onChange:c,isInput:s!=="pro"?a:!1,value:g}),s!=="pro"&&d("label",{for:"customContent",class:"text-sm",onClick:()=>{a&&c(C[0]),o(!a)},children:[d("input",{type:"checkbox",id:"customContent",name:"customContent",checked:a}),t("customContent")]})]})}else{if(l.type==="text")return d("div",{children:d(Bo,{service:e.service,field:l,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="textarea")return d("div",{children:d(Bo,{service:e.service,field:l,rows:5,config:e.config,value:g,type:l.type,onChange:c,onFinish:u})});if(l.type==="jsonarea")return d("div",{children:d(Bo,{service:e.service,field:{...l,type:"textarea"},config:e.config,value:g,rows:5,type:l.type,onChange:c,onFinish:u})});if(l.type==="number")return d("div",{children:d(Bo,{service:e.service,field:l,config:e.config,value:g,type:l.type,width:196,onChange:c})});if(l.type==="password")return d("div",{children:[d(Bo,{service:e.service,field:l,config:e.config,value:g,type:n?l.type:"text",onChange:c,onFinish:u}),d("label",{for:"translate",onClick:()=>{r(!n)},children:[d("input",{type:"checkbox",id:"translate",name:"translate"}),t("show password")]})]});if(l.type==="color"){let C=g,b="";C||(C="#FFFFFF",b="#FFFFFF");let{hex:x,opacity:S}=Pw(C);return d("div",{children:d("label",{class:"flex items-center",for:l.name,children:[d("span",{class:"mr-2",children:l.label||l.name}),d("input",{type:"text",id:l.name,class:"border-color-text mr-2",placeholder:b||"",value:g,onInput:A=>{c(A.target.value)}}),d("input",{id:l.name,type:"color",name:l.name,value:x,style:{opacity:S},onInput:A=>{c(A.target.value)}})]})})}else return l.type==="boolean"?d("div",{class:"flex items-center my-4",children:d("label",{class:"ml-2",for:l.name,children:[d("input",{type:"checkbox",id:l.name,name:l.name,role:"switch",checked:g,onChange:C=>{c(C.target.checked)}}),y,l.descriptionKey?d("small",{class:"my-2",dangerouslySetInnerHTML:{__html:t(l.descriptionKey,f)}}):null]})}):null}}function Pw(e){let t=1;return e.length==9&&(t=parseInt(e.substring(7,9),16)/255,e=e.slice(0,7)),{opacity:t,hex:e}}m();function bb(e){let{t,lang:n}=W();return d("details",{role:"list",class:"nav-right",children:[d("summary",{"aria-haspopup":"listbox",children:t("edit")}),d("ul",{role:"listbox",class:"option-list",children:e.options.map((r,a)=>{let o=Jt(r.value,n);return d("li",{children:d("label",{children:[d("input",{type:"checkbox",onChange:()=>{e.onToggleAlwaysLangs(!r.checked,r.value)},value:r.value,checked:r.checked}),o]})},"language-"+a)})})]})}function Eu(e){let{selectLanguages:t,languages:n}=e,r=Re(()=>!n||!t?[]:n.concat("").map(a=>({checked:t?.includes(a),value:a})),[n,t]);return e.interfaceLanguage?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:e.title,description:e.description}),d(bb,{options:r,onToggleAlwaysLangs:e.onChange})]}),d("div",{class:"langs-list",children:t.map((a,o)=>d("div",{class:"lang-card",children:[d("div",{id:`${a}`,children:Jt(a,e.interfaceLanguage)}),d("a",{href:"#close",class:"close",target:"_blank","aria-label":"Close","data-target":`${a}`,onClick:i=>{i.preventDefault(),e.onChange(!1,t[o])}})]},"lang-"+o))})]}):null}m();m();function aa(e){let{t}=W(),n=We(null),{toggleModal:r}=e;return d("dialog",{id:"immersive-translate-overlay",onClick:o=>{o.target&&o.target.id==="immersive-translate-overlay"&&r(o)},open:!0,children:d("article",{class:"add-modal",children:[d("a",{href:"#close","aria-label":"Close",class:"close","data-target":"modal-example",onClick:e.toggleModal}),d("div",{class:"add-text",children:t("add url")}),d("input",{placeholder:"URL",ref:n,value:e.urlValue}),d("blockquote",{children:d("p",{class:"text-sm",children:t("addUrlDescription")})}),d("div",{class:"flex",children:[d("div",{class:"footer-button",children:d("a",{href:"#cancel",role:"button",class:"full-button secondary margin-right","data-target":"modal-example",onClick:e.toggleModal,children:t("cancel")})}),d("div",{class:"footer-button",children:d("a",{href:"#confirm",role:"button",class:"full-button margin-left","data-target":"modal-example",onClick:o=>{if(o.preventDefault(),n.current&&n.current.value){if(e.onSubmitAddUrl){if(e.urlValue!==""){e.onSubmitAddUrl(n.current.value,e.index,e.type,"edit");return}e.onSubmitAddUrl(n.current.value,e.index,e.type);return}else if(e.onAddInterfaceUrl){if(e.urlValue!==""){e.onAddInterfaceUrl(n.current.value,"edit");return}e.onAddInterfaceUrl(n.current.value)}}},children:t("confirm")})})]})]})})}function qa(e){let{t}=W(),[n,r]=$([]),[a,o]=$(!1),[i,s]=$(!1);function u(){e.onDeleteUrl(n,e.type),r([]),o(!1)}if(!e.urls.length)return null;let l=`checkAll${e.urls.length}`;return d("div",{children:[d(c,{}),d("div",{class:"url-list-item",children:e.urls.map((g,p)=>d("div",{className:"url-list",style:"padding:6px 24px;",children:d("div",{className:"url-left",style:{display:"flex",flexDirection:"row",alignItems:"center",width:"100%"},children:[i&&e.urls.length>1&&d("input",{type:"checkbox",checked:n.includes(g),style:"margin-right:12px;",onChange:f=>{f.target.checked?r([...n,g]):r(n.filter(h=>h!==g))}}),d("div",{className:"url-name height-tight",children:g}),d("div",{style:{flex:1}}),d("a",{style:{marginRight:"12px",cursor:"pointer"},onClick:f=>{e.onEditUrl(g,e.type,p)},children:t("edit")}),d("a",{style:{cursor:"pointer"},onClick:f=>{e.onDeleteUrl([g],e.type)},children:t("delete")})]})},"menu"+p))})]});function c(){return e.urls.length<2?null:d("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",padding:"0 24px",marginBottom:"12px"},children:i?d(xe,{children:[d("input",{type:"checkbox",id:l,checked:a,onChange:g=>{let f=g.target.checked;r(f?e.urls:[]),o(f)}}),d("label",{htmlFor:l,children:t("pickAll")}),d("div",{style:{flex:1}}),d("a",{style:{cursor:"pointer"},onClick:u,children:t("delete")})]}):d("a",{style:{marginLeft:"-24px",marginRight:"12px",cursor:"pointer"},onClick:()=>s(!0),children:t("batchEdit")})})}}function Su(e){let{t}=W(),[n,r]=$(!1),[a,o]=$(""),[i,s]=$(0);le(()=>{Ut("esc",()=>{r(!1)})},[]);let u=(c,g,p)=>{r(!n),o(c),s(p)},l=(c,g,p,f)=>{e.onSubmitAddUrl?.(c,g,p,f),r(!n),o(""),s(0)};return d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:e.title,description:e.description}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:c=>{c.preventDefault(),r(!n)},children:t("add")})}),n?d(aa,{toggleModal:c=>{c.preventDefault(),r(!n)},onSubmitAddUrl:l,type:e.type,urlValue:a,index:i}):null]}),d(qa,{urls:e.urls||[],type:e.type,onDeleteUrl:e.onDeleteUrl,onEditUrl:u})]})}m();async function Wa(){let e=["bingGlobalConfig","baiduGlobalConfig",m2,Ta];for(let t of e)await Q.storage.local.remove(t);me()||await C9(),await jg()}function yb(){return me()?Promise.resolve("0 B"):dm()}m();var H0='',wu="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iI0ZGQzczNiIgZD0iTTMgN2gxN3YxMEgzeiIvPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik02Ljg5NyA5LjI0MmMuNDE1IDAgLjcyLjExMS45MjguMzQ3LjIwNy4yMzUuMzE4LjUyNy4zMTguODczcy0uMTEuNjIzLS4zMTguODQ1Yy0uMjA4LjIyMi0uNTI3LjMzMy0uOTI4LjMzM2gtMS4zM1Y5LjI0MmgxLjMzWm05Ljg0NiAxLjc4OGMuMzg4IDAgLjY2NS4xNTIuODQ1LjQ1Ny4xNTIuMjY0LjIzNS41ODIuMjYzLjk4NHYuMzE5YzAgLjQ5OS0uMDgzLjg4Ny0uMjYzIDEuMTkyLS4xOC4zMDQtLjQ1Ny40NTctLjgzLjQ1Ny0uMzg5IDAtLjY2Ni0uMTUzLS44NDYtLjQ0NC0uMTUyLS4yNjMtLjIzNS0uNTk1LS4yNjMtMS4wMTF2LS4yOTFjMC0uNDg1LjA4My0uODczLjI2My0xLjE3OC4xOC0uMzA1LjQ0My0uNDg1LjgzMS0uNDg1Wm0tMy40MDctMS4xMzZhMS4xNyAxLjE3IDAgMCAwLS43MDYuMjM1IDEuNDgyIDEuNDgyIDAgMCAwLS40MTUuNWwtLjA4My4xNjUtLjA3LS44MDNoLTEuMzU3djUuNDMyaDEuNDU0di0zLjY1OWEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiA4LjEySDQuMTE0djcuMzE3aDEuNDY4VjEyLjc5aDEuMzNjLjg0NCAwIDEuNDk1LS4yMDggMS45OC0uNjM4LjQ4NS0uNDMuNzItLjk4My43Mi0xLjY5cy0uMjM1LTEuMjYxLS43Mi0xLjY5Yy0uNDQzLS4zODktMS4wMzktLjYxLTEuNzczLS42MzhsLS4yMjEtLjAxNFptOS44NDcgMS43NzRjLS44MDMgMC0xLjQyNi4yNjMtMS44ODMuNzc2LS40MTYuNDctLjYzNyAxLjA2Ny0uNjc5IDEuNzczdi4zMzNjMCAuODE4LjIyMiAxLjQ4My42NzkgMS45OTUuNDU3LjUxMyAxLjA4Ljc3NiAxLjg4My43NzYuODA0IDAgMS40MjctLjI2MyAxLjg4NC0uNzc2LjQxNS0uNDcuNjM3LTEuMDUzLjY3OC0xLjc3M3YtLjMzM2MwLS44MTctLjIyMS0xLjQ4Mi0uNjc4LTEuOTk1LS40NTctLjUxMy0xLjA4LS43NzYtMS44ODQtLjc3NlpNMTguMDAzIDZhNiA2IDAgMCAxIDAgMTJIMFY5LjQyM0EzLjQyIDMuNDIgMCAwIDEgMy40MiA2aDE0LjU4M1oiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSI3LjUiIHgyPSIyMiIgeTE9IjE5IiB5Mj0iNiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIHN0b3AtY29sb3I9IiMyMjIiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM2OTY5NjkiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48L3N2Zz4=",Cb="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSI+PHBhdGggZmlsbD0iIzk5OSIgZD0iTTYuODk3IDMuMjQyYy40MTUgMCAuNzIuMTExLjkyOC4zNDcuMjA3LjIzNS4zMTguNTI2LjMxOC44NzMgMCAuMzQ2LS4xMS42MjMtLjMxOC44NDUtLjIwOC4yMjItLjUyNy4zMzMtLjkyOC4zMzNoLTEuMzNWMy4yNDJoMS4zM1ptOS44NDYgMS43ODhjLjM4OCAwIC42NjUuMTUyLjg0NS40NTcuMTUyLjI2NC4yMzUuNTgyLjI2My45ODR2LjMxOWMwIC40OTktLjA4My44ODctLjI2MyAxLjE5Mi0uMTguMzA0LS40NTcuNDU3LS44My40NTctLjM4OSAwLS42NjYtLjE1My0uODQ2LS40NDQtLjE1Mi0uMjYzLS4yMzUtLjU5NS0uMjYzLTEuMDExdi0uMjkxYzAtLjQ4NS4wODMtLjg3My4yNjMtMS4xNzguMTgtLjMwNS40NDMtLjQ4NS44MzEtLjQ4NVptLTMuNDA3LTEuMTM2YTEuMTcgMS4xNyAwIDAgMC0uNzA2LjIzNSAxLjQ4MiAxLjQ4MiAwIDAgMC0uNDE1LjVsLS4wODMuMTY1LS4wNy0uODAzaC0xLjM1N3Y1LjQzMmgxLjQ1NFY1Ljc2NGEuODguODggMCAwIDEgLjMxOS0uMzg4Yy4xMS0uMDY5LjI1LS4xMS40MTUtLjEyNGguMTI1bC41NC4wMTQuMTY2LTEuMzE3Yy0uMDctLjAxNC0uMTI0LS4wMjgtLjE5NC0uMDQxLS4wNTUtLjAxNC0uMTI0LS4wMTQtLjE5NC0uMDE0Wk02Ljg5NiAyLjEySDQuMTE0djcuMzE3aDEuNDY4VjYuNzloMS4zM2MuODQ0IDAgMS40OTUtLjIwOCAxLjk4LS42MzguNDg1LS40My43Mi0uOTgzLjcyLTEuNjlzLS4yMzUtMS4yNjEtLjcyLTEuNjljLS40NDMtLjM4OS0xLjAzOS0uNjEtMS43NzMtLjYzOGwtLjIyMS0uMDE0Wm05Ljg0NyAxLjc3NGMtLjgwMyAwLTEuNDI2LjI2My0xLjg4My43NzYtLjQxNi40Ny0uNjM3IDEuMDY3LS42NzkgMS43NzN2LjMzM2MwIC44MTguMjIyIDEuNDgzLjY3OSAxLjk5NS40NTcuNTEzIDEuMDguNzc2IDEuODgzLjc3Ni44MDQgMCAxLjQyNy0uMjYzIDEuODg0LS43NzYuNDE1LS40Ny42MzctMS4wNTMuNjc4LTEuNzczdi0uMzMzYzAtLjgxNy0uMjIxLTEuNDgzLS42NzgtMS45OTUtLjQ1Ny0uNTEzLTEuMDgtLjc3Ni0xLjg4NC0uNzc2Wk0xOC4wMDMgMGE2IDYgMCAwIDEgMCAxMkgwVjMuNDIzQTMuNDIgMy40MiAwIDAgMSAzLjQyIDBoMTQuNTgzWiIvPjwvc3ZnPg==",Tb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAA4CAMAAACfWMssAAABC1BMVEUAAADt7vHt7vHn5+/v7+/u7vLs7O/Y2urv7+/I0uTu7/Ls7e/r6+/r7e/J1OTE0OGdrMHu7/Hu7/Lt7vHHz9/I0+Ps7O/V3eju7/GXp72YqL7s7u/I0uPH0+Pv7/OWpr3H0uLH0+OXp7vl6e67xtmquszi5u3W3ejAzd66x9jJ0+O5xdimtcmYprzI0+Ps7e+Yp73t7vHI0+OXp7309vnCzt/N1+Xd4+ucrMHp7PLa4evR2uff5O3F0OHo6+/j5+6uu82jssedrMKaqr/Y3+nP2ObR2OOpt8rm6e/k5+68yNq6xdW2w9XT3OivvdCmtcnu8fa/ytezwNKhsMTL09/c4+zZ3+m/y9zGz9seNO0nAAAAMXRSTlMA3+8gEJ9gECDfv3BAgO/v78+vkCCQUO/f37ewoIB/cGBAQO/v79/f39/Pz8/Pv6CfPHl8AQAAAyVJREFUSMedluda4kAUQAcUkGJB0bXturq9b3JTaUkITQOiYHv/JzEzmZYYIp/nhyYz93hnbqaI0ijVqoX6oRJyWNmt1tBqlIqVvBIjv1tcQfvALZlcYe0tGmEvQz3gWmrW4rJ0BeUVCutp3lpOeZXc2ts8YWZ72abw3mKWqOdMp+3U8OaWanSpKVeI1rOrdnTVuHyhOaq6/V1tsdoKr0ib+roF/khvJry++mMHwFPZ+8GLCbZGENJ7nI7b/amBaX0zP7W2fgOmM2Zrlw12T6EYC8D4HTXGFyBc8Tls0oQKQ/UBs7MdF3eo+FWJpyzIovAEuiUyyinFJzQ8APC4J0yPzJGIImVREeIEvF8k9Op61uuB3/PcQMfvEws8dSwi8UbZ5W9dlsD1QcKbkMaOKn2mSijmuWcQreNCkp6uEkx5rDX+0ooGaUEK15HZ5cE1VGWPbdI1gXRGpLfFxaqYIhloAJBp8sIWUEVOqPuwlHksZR3l5BnOIANdnmUO0QebFAayGMUKy0QHt44yNLr2+0nRxKK1VCI9QRgySIpN/Olxr7kAN3Dpn7h1hmSnPdkWLY/BxZwQdRyjmWBrmmbeuVjUNHsOELY80VVg8OLUk6J2o0XYw+AO/w7ADRsti4gDvlj/ic/YIeJLhk74wzFhLn3IE7bkuqw4OF8qJjxKVa3yRY7FazwdEuTaLN6eOzRvT15zNbSel8rqA5g4yIVbJt6CS8WJVJs8Qmyx2iQlFWdCDGAWPfTlhXMiHR0POOUChjjozuJDdWbD6GGAE3bF0YHHKlLq1lBLp4m72/wrYjbp2yUxzQzvQexGJKVUSKfhpGg3ZNMN8kzcQDQlN0m/nfTuo3b5PGYpxR4hIWNpGdjTqPEdj8pt8H9T5KOVutP7dkiTjJF48dM4cV85JC4dgx3ke0iwXqc3aCb9LrvKBRvhthwbGRJNKiYozLa6Aib3hFleRSyn/GvVSJhXo95iNom3/WygFEr7sbuUX1SCfbSEj2X59k6a5XO0lMa+8BLm1vsSyqJxWk4e6V6mJg/4b+KS/Hx6jlbk4uz4+Ag7R3/+n12khjwDw+rmuecPQ74AAAAASUVORK5CYII=",vb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAAn1BMVEUAAADt7vHu7vLu7vLv7+/n5+fFxcXu7vHv7/PHx8eamprt7fLt7fHn5+vGxsbS09Surq6fn5+ZmZmZmZnGxsbGxsbt7/K/v7/Hx8ft7vHGxsaZmZn09vnk5eeqqquenp7p6u3X2NnLy8vU1dbr7O67u7uvr6/o6evh4uPR0dLCwsLAwMDZ2ty9vb6kpaWhoaHe3+HPz8+zs7OkpKTc3d7Gt0R8AAAAGXRSTlMA779wIBDv338gv5+AgHDv7+/v36+gn3BgD0kJmgAAAS1JREFUKM9dkOmSgyAQhNFo7mTvYwYEBa9oorne/9l2hqJSbr4q+NHNdBcjAukyXgBE8SwRU5IYHmwm1iyCCdFMBJbwxDK8B2iKLGjl8VAC+JmEcqzRrmnP5yzrbm93SuOeDQCcpNToGaV8ISGmAfBGPce+qjrsjSxYSbkBGtt1tZGEueLpwsZW8A8snlj2jD0efRZVtxzw4Ia2BFgIch1qOaHCM4lsHHA0WpOpKyk7qX2WWLBhhhxU7grlKlV7I+LyAm+DUplS/sqv2HL5FiDDSio15CQOdHrrl5L6kpqEMOHwTlIiOKu0WIDy5Bfkn3+HJTYXRNdmWXtA1nmJfu1lgRNcQw2encV/2J0I7OdIXM1YIzH/FQ9WX4i1JF4RP1dBDNZ+/S7lx/onDcIfdi8x4pYpSxgAAAAASUVORK5CYII=",xb="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAA51BMVEUAAABRT2tSUGpRT2tQUHBQUGjwtcxRT2tRUGtST2tSTmrvsMnvt89QUHDqTIpkXHhST2zQobmfdpPrTYrGVoHqS4nwtszvtMzvtc3vr89RT2vwtczASHb09vnIXYbt4OncqMDqTInGVoBbVnHqp8GqiKJlXHfz2+bsrsfkmrfIm7SggpvScZfKaY/q1uDtgKvRiKaNdY/MY4vy7fLy5Ozxydrxw9bhtcjnobzVlK/diam0j6jYfqHVeJyXfJWcd5TrXJOCb4l5aYNvYn3DUXzxzd3kwNDSorrth6/CjqnAeZnNdJaDb4nDaCDkAAAAGnRSTlMA73C/ICDv37+ff3AgEL+AgO/v7+/fr6BgELJb3PQAAAE/SURBVCjPXZHnUsMwEIRlOySkhw66k+24YScx6b0XOu//PJw0mozh+6Efu6ddzYlpqiWrwLlhmTmW5cLiZ4oZyzR4BsNkmhL/R0nPcx6FR6357ZbPuanyKefT62yjn37/cJwPbjeUJnuKNPeFuAaFjXhNgkUXONHDdR6CJIkh8HArlSo1UIUbx6sTEt4CZlfSaLBLOl2YeaixA2irLKrey4AzA4jpXQVG7hI6mCGBPonSaIF9StMUMe0hzrGjslhBGp7tDIUzfRPTnvhWhiHLQxjYQrwIoQ5nAXtZ3uD8AAkKYTsk0sAocNVSqqpkRaK+MYYNSTkms3wXXodCMZpAKD9FLzF6Bxg/ExMgXS+RluKHkGEZUYOi7sIf3DrTlPNAfOx2XSDyj+xM5QGg2yTIua+wLJVy7abZvKuVn7TwCyKmN+3PjJblAAAAAElFTkSuQmCC",Eb="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTguNzEwMjMgMTMuMzg3NkwxMy4yODkzIDguODA4NkwxNC4wOTc3IDguMDAwMjJMMTMuMjg5NyA3LjE5MjIyTDguNzEwMjMgMi42MTI3OUw3LjkwMjIzIDMuNDIwNzlMMTEuOTA5NSA3LjQyODc5SDEuOTA1NjZWOC41NzE2NUgxMS45MDk1TDcuOTAxODUgMTIuNTc5M0w4LjcxMDIzIDEzLjM4NzZaIiBmaWxsPSIjODM4MzgzIi8+CjwvZz4KPC9zdmc+Cg==";m();m();function $i(){let e=new Date;return`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}_${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`}m();function Fw(e){let{t}=W(),{accessToken:n,id:r,listAllFiles:a}=e,[o,i]=$(!1);function s(u,l){u.preventDefault(),i(!0),new _r(n).delete(l).catch(c=>{an(t("delete"))}).then(()=>a()).finally(()=>i(!1))}return d("a",{href:"#",className:"secondary margin-left text-sm",onClick:u=>s(u,r),"aria-busy":o,children:t("delete")})}function dp(e){let{onClose:t,accessToken:n,authExpire:r}=e,{t:a}=W(),[o,i,s,u]=Ve(),[l,c]=$([]),[g,p]=$(!0),[f,h]=$(!1),[y,C]=$({});le(()=>{n&&x().then(()=>p(!1))},[n]);let b=v=>{v.target&&v.target.id==="immersive-translate-overlay"&&t()};function x(){return new _r(n).listAll().then(L=>{c(L)}).catch(L=>r())}function S(v){if(v.preventDefault(),l.length>=10)return an(a("maxBackupFiles",{count:10}));h(!0);let L="immersive-translate-config-"+$i()+".json";new _r(n).uploadConfig(o,L).catch(D=>{an(a("uploadFail"))}).then(()=>x()).finally(()=>h(!1))}function A(v,L,D){v.preventDefault(),C({[D]:!0}),new _r(n).getConfig(L).then(T=>{i(()=>({...T})),st(a("importSuccess"))}).catch(T=>{I.error(T),an(a("importFail"))}).finally(()=>C({}))}function P(v,L){new _r(n).getConfig(v).then(D=>{let T=document.createElement("a");T.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(JSON.stringify(D,null,2))),T.setAttribute("download",L),T.style.display="none",document.body.appendChild(T),T.click(),document.body.removeChild(T)}).catch(D=>{I.error("download google config file failed",D),an(a("downloadFail")+": "+D.message)})}function w(v){v.preventDefault(),i({...o,autoSync:!1}),Pa.revoke(n).then(()=>t())}return d("dialog",{id:"immersive-translate-overlay",onClick:b,open:!0,children:d("article",{class:"md:w-[32rem] px-4",children:[d("a",{href:"#",title:a("clickToDownload"),"aria-label":"Close",className:"close","data-target":"modal-example",onClick:v=>{v.preventDefault(),t()}}),d("h4",{children:a("syncTitle")}),d("div",{className:"mb-4",children:l.map((v,L)=>d("div",{class:"flex flex-wrap justify-between",children:[d("div",{class:"mr-2 mb-2",children:[d("div",{children:d("a",{href:"#",onClick:D=>{D.preventDefault(),P(v.id,v.name)},class:"block truncate w-40 sm:w-auto",children:v.name.replace("immersive-translate-","")})}),d("div",{class:"text-xs text-gray-500",children:[new Date(v.modifiedTime).toLocaleString(),",\xA0",Ks(parseInt(v.size))]})]}),d("div",{children:[d("a",{href:"#",role:"button",className:"margin-right secondary","aria-busy":y[L],disabled:y[L],onClick:D=>A(D,v.id,L),children:a("import_hint")}),d(Fw,{accessToken:n,id:v.id,listAllFiles:x})]})]},"file"+L))}),d("div",{className:"flex items-center",children:[d("a",{href:"#",role:"button",className:"mr-4","data-target":"modal-example","aria-busy":f,onClick:S,disabled:g,children:a("create_new_backup")}),d("a",{href:"#",className:"secondary text-sm","data-target":"modal-example",onClick:w,disabled:g,children:a("revokeAuth")})]})]})})}m();m();function Fr(e,t){return e.localeCompare(t,void 0,{numeric:!0,sensitivity:"base"})>=0}var Ee=Yo([]);function Qt(e){let[t,n]=$(null);return le(()=>{ft().then(r=>{n(r),I.debug("current config",r)})},[]),le(()=>{ft().then(r=>{n(r)})},[e]),t}function On(e){let[t,n]=$(null);return le(()=>{e&&bn({url:"http://localhost",config:e,state:{cache:!1}}).then(r=>n(r))},[e]),t}function Sb(){let[e,t]=$(!1),n=kr();return le(()=>{me()&&(!n||n=="0.0.0"||Fr(n,"0.9.0")||t(!0))},[n]),[e,t]}function oa(){let[e,t]=$(null);return le(()=>{qt().then(r=>{t(r)})},[]),[e,r=>{t(r),Wt(r)}]}m();var ut=class extends no{constructor(t){super(t),this.state={hasError:!1}}error;info;static getDerivedStateFromError(t){return{hasError:!0}}componentDidCatch(t,n){this.error=t,this.info=n}render(){return this.state.hasError?(I.error("ErrorBoundary",this.error,this.info),d(Bw,{error:this.error,info:this.info})):this.props.children}};function Bw({error:e,info:t}){let{t:n}=W(),r=location.protocol.includes("extension")&&location.href.includes("options.html");return d("div",{class:"error-boundary",children:[e?.message," ",JSON.stringify(t?.componentStack),d("div",{style:{marginTop:10},children:[n("error.configError"),d("a",{style:{marginLeft:6},href:r?location.href.replace(/#.+/,"#import_export"):"https://dash.immersivetranslate.com/#import_export",target:r?"":"_blank",children:n("error.goReset")})]})]})}var gp=I;function Rw(){let[e,t]=$(null);return le(()=>{ft().then(n=>{t(n)})},[]),e}function pp(){let[e,t,n,r,a]=Ve(),o=Rw(),{t:i,setLang:s}=W(),[u,l]=oa();if(!o)return null;return d(ut,{children:d("div",{class:"pb-4",children:[d(c,{}),d(g,{}),!ci()&&d(p,{}),d(f,{config:o})]})});function c(){let h=b=>{b.preventDefault(),confirm(i("confirmResetConfig"))&&(a({...wo(),updatedAt:new Date().toISOString()}),Da().catch(x=>{gp.error("clean local config error",x)}),wa().catch(x=>{gp.error("clean buildin config error",x)}),Wa().catch(x=>{gp.error("clean cache error",x)}),st(i("resetSuccess")),setTimeout(()=>{window.location.reload()},500))},y=b=>{t(()=>({...b}))},C=b=>{b.preventDefault();let x=document.createElement("input");x.setAttribute("type","file"),x.setAttribute("accept","text/plain"),x.style.display="none",document.body.appendChild(x),x.oninput=S=>{let A=S.target,P=new FileReader;P.onload=function(){try{let w=JSON.parse(P.result);y(w),st(i("successImportConfig"))}catch(w){an(`Invalid JSON ${w.message}`)}},P.readAsText(A.files[0])},x.click(),document.body.removeChild(x)};return d(xe,{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:i("import_export_title")})}),d("div",{class:"pb-2",children:[d("a",{class:"mr-2 secondary mb-2 !text-sm",onClick:C,href:"#",role:"button",children:[Ow,i("import")]}),d("a",{href:"#",class:"secondary mr-2 mb-2 !text-sm",onClick:b=>{if(b.preventDefault(),ci()){let x=Pe();window.location.href=x.OPTIONS_URL+"#download_config"}else{let x=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});ao.saveAs(x,"immersive-translate-config-"+$i()+".txt")}},role:"button",children:[Nw,i("export")]}),d("a",{href:"#",onClick:h,class:"secondary text-sm",children:i("reset")})]})]})}function g(){return d("details",{class:"mt-4 mb-6",children:[d("summary",{children:i("clickToExpandConfig")}),d("pre",{children:d("code",{children:JSON.stringify(e,null,2)})})]})}function p(){let[h,y]=$(!1),[C,b]=$(!1),[x,S]=$(!1),[A,P]=$("");le(()=>{if(Os()&&n){let M=localStorage.getItem(Ns);if(localStorage.removeItem(Ns),M){let O=globalThis.localStorage.getItem(Eg);I.debug("import_export","rawAuthInfoStr",O);let N={},H={},B="";if(O){globalThis.localStorage.removeItem(Eg);try{N=JSON.parse(O),H=N.state||{},B=N.access_token||""}catch(k){I.error("parse state error",k)}}if(B&&H&&(Pa.setAuthInfo({access_token:B}),I.debug("import_export","Google OAuth:",N),N)){let k=N.state;I.debug("state",k),k?.mode==="auto"?(b(!0),j(B)):(S(!0),D(B))}}}},[n]);function w(){b(!0),om({source:globalThis.location.href,mode:"auto"},!0).then(M=>{I.debug("import_export","Google OAuth:"+M),M!==null&&j(M)}).catch(M=>{M&&M.message==="tokenValidateErrorRedirectToAuthUrl"?I.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):T(M)})}function v(){S(!0),y(!1),om({source:globalThis.location.href,mode:"manual"},!0).then(M=>{I.debug("import_export","Google OAuth:"+M),M!==null&&D(M)}).catch(M=>{M&&M.message==="tokenValidateErrorRedirectToAuthUrl"?I.debug("tokenValidateErrorRedirectToAuthUrl, ignore"):T(M)})}function L(){P(""),w()}function D(M){P(M),S(!1),y(!0)}function T(M){b(!1),S(!1),y(!1),t({...e,autoSync:!1}),I.error("import_export","Google OAuth error:"+M),an(i("authFail"))}function j(M){b(!0),I.debug("sync latest with drive",M,e),P(M),am(M,e,O=>{O.interfaceLanguage&&s(O.interfaceLanguage),a(O)},O=>l({...u,lastSyncedAt:O}),O=>t({...e,updatedAt:O}),O=>{O?st(i("successSyncConfig")):st(i("successSyncButNoChange"))},O=>an(i("syncFail")+O)).finally(()=>{b(!1)})}function R(M){t({...e,autoSync:M.checked}),M.checked&&w()}return d(xe,{children:[d("hgroup",{class:"my-2",children:[d("h5",{children:i("syncToCloud")}),d("h6",{class:"!text-sm",children:i("syncToCloudDescription")})]}),d("div",{children:[d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:M=>{M.preventDefault(),w()},"aria-busy":C,href:"#",role:"button",children:[C?d(xe,{}):wb,i("syncToGoogleDrive")]}),d("a",{href:"#","aria-busy":x,onClick:M=>{M.preventDefault(),v()},class:"secondary text-sm",children:i("backupToCloud")})]}),d("div",{class:"text-xs text-gray-500",children:u?.lastSyncedAt&&i("lastSyncedAt",{date:new Date(u.lastSyncedAt).toLocaleString()})}),u?.lastSyncErrorMessage&&d("p",{class:"mt-2 text-xs text-red-500"}),h?d(dp,{onClose:()=>y(!1),authExpire:L,accessToken:A}):null]})}function f({config:h}){let y=kb(),[C,b]=$(!1),[x,S]=$(""),[A,P]=$(""),[w,v]=$(null),{t:L}=W();if(!y||!y.token)return null;let D=Yt(y);async function T(){try{if(C)return;b(!0),P("");let M=await z0(y?.token,e,a),O="";switch(M){case"upload":{O=L("successSyncConfigToAccount");break}case"override":{O=L("successSyncConfigInAccount");break}default:O=L("syncConfigNoUpdate")}S(O)}catch(M){S(""),P(M.message)}finally{b(!1)}}let j=M=>{l({...u,proAutoSync:M})},R=u&&u.proAutoSync!==void 0?u.proAutoSync:!0;return d(xe,{children:[d("hgroup",{class:"my-2 mt-4",children:[d("h5",{children:L("syncToAccount")}),d("h6",{class:"!text-sm",children:L("syncToAccountDescription")})]}),D&&d("fieldset",{class:"my-4",children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{j(!R)},checked:R}),L("enableAutoSyncUserSettings")]})}),d("a",{className:"mr-4 secondary mb-2 !text-sm ",onClick:M=>{M.preventDefault(),T()},"aria-busy":C,href:"#",role:"button",children:[wb," ",L("syncToAccountButton")]}),A?d("p",{class:"text-xs text-red-500",children:A}):d("p",{class:"text-xs text-gray-500",children:x||u?.accountLastSyncedAt&&L("lastSyncedAt",{date:V1(u.accountLastSyncedAt)})})]})}}async function z0(e,t,n){try{if(t===null)return"noupdate";let r=await qt();if(t.updatedAt){let s=new Date().getTime(),u=new Date(t.updatedAt).getTime();if(s-u<1e3)return await mp(e,t),await Wt(r),"upload"}let a=await Ab(e);r.accountLastSyncedAt=Date.now(),I.debug("settings",t),I.debug("local settings.updatedAt",t.updatedAt),I.debug("remote settings.updatedAt",a.updatedAt),I.debug("last synced at",r.accountLastSyncedAt);let o=!1;if(t.updatedAt&&(!a||!a.updatedAt)&&(o=!0),!o&&t.updatedAt>a.updatedAt&&(o=!0),I.debug("isUpload",o),o)return await mp(e,t),await Wt(r),"upload";let i=!1;return a.updatedAt&&(!t||!t.updatedAt)&&(i=!0),!i&&t.updatedAt{!n||!n.token||r&&r.proAutoSync===!1||Iw(n)&&z0(n.token,e,t).then(o=>{I.debug("syncUserSetting result",o)})},[e,n])}function Iw(e){return Yt(e)?!0:new Date(e.createTime){mt.get(Tt,null).then(n=>{t(n)})},[t]),e}function Ab(e){return(location.href?.indexOf("popup.html")>0?mr:de)({responseType:"json",url:yo+"/v1/user/settings",method:"get",headers:{token:e}}).then(n=>n.data)}function mp(e,t){return(location.href?.indexOf("popup.html")>0?mr:de)({responseType:"json",url:yo+"/v1/user/settings",method:"post",headers:{token:e,"content-type":"application/json"},body:JSON.stringify(t)}).then(r=>r.data)}var wb=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",children:d("path",{fill:"currentColor",d:"M15.375 19.25q-.525.25-.95-.038q-.425-.287-.425-.937q0-.25.163-.487q.162-.238.412-.363q1.575-.75 2.5-2.225T18 11.95q0-1.125-.425-2.188Q17.15 8.7 16.25 7.8L16 7.55V9q0 .425-.287.712Q15.425 10 15 10t-.712-.288Q14 9.425 14 9V5q0-.425.288-.713Q14.575 4 15 4h4q.425 0 .712.287Q20 4.575 20 5t-.288.713Q19.425 6 19 6h-1.75l.4.35q1.225 1.225 1.788 2.662Q20 10.45 20 11.95q0 2.4-1.25 4.362q-1.25 1.963-3.375 2.938ZM5 20q-.425 0-.713-.288Q4 19.425 4 19t.287-.712Q4.575 18 5 18h1.75l-.4-.35q-1.225-1.225-1.788-2.662Q4 13.55 4 12.05q0-2.4 1.25-4.363Q6.5 5.725 8.625 4.75q.525-.25.95.037q.425.288.425.938q0 .25-.162.487q-.163.238-.413.363q-1.575.75-2.5 2.225T6 12.05q0 1.125.425 2.187Q6.85 15.3 7.75 16.2l.25.25V15q0-.425.288-.713Q8.575 14 9 14t.713.287Q10 14.575 10 15v4q0 .425-.287.712Q9.425 20 9 20Z"})}),Ow=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17 3.515 8.515 4.929 7.1 11 13.17V2h2v11.172z"})]}),Nw=d("svg",{class:"inline mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18",children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M3 19h18v2H3v-2zM13 5.828V17h-2V5.828L4.929 11.9l-1.414-1.414L12 2l8.485 8.485-1.414 1.414L13 5.83z"})]});m();var Uw=({children:e,isOpen:t,closeModal:n})=>d("div",{style:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",background:"rgba(0, 0, 0, 0.5)",display:t?"block":"none"},children:d("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",background:"white",padding:"30px",borderRadius:"5px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.2)"},children:e})}),Lb=Uw;m();var fp="Arial",hp=(e,t="a")=>{try{return typeof e!="string"||!document.createElement("canvas").getContext("2d")?!1:e.toLowerCase()===fp.toLowerCase()?!0:_b(fp,t).join("")!==_b(e,t).join("")}catch{return!1}};function _b(e,t){let n=t.length*12,r=20,a=new Date().getTime(),o=document.createElement("canvas"),i=o.getContext("2d");if(!i)return[];o.width=n,o.height=r,i.textAlign="center",i.fillStyle="black",i.textBaseline="middle",i.clearRect(0,0,n,r),i.font="12px "+e+", "+fp,i.fillText(t,n/2,r/2);let s=i.getImageData(0,0,n,r).data;return Array.from(s).filter(l=>l!==0)}m();m();function bp(e){let{t}=W(),{userConfig:n,isProUser:r,currentProvider:a,provider:o,onChange:i}=e,s=t(o.descriptionKey,{1:o.descriptionLink1,2:o.descriptionLink2});return!r&&o.descriptionKeyForNormal&&(s=t(o.descriptionKeyForNormal,{1:o.descriptionLink1,2:o.descriptionLink2})),(!n||ta(n))&&!r&&o.name=="pro"?null:d("label",{class:"pro-radio-label",for:o.name,children:[d("div",{class:"pro-input-radio",children:d("input",{type:"radio",id:o.name,name:o.name,value:o.name,onClick:i,checked:o.name===a})}),d("div",{class:"pl-4",children:[d("div",{class:"pro-radio-title",children:t(o.nameKey)}),d("small",{class:"pro-radio-desc muted",dangerouslySetInnerHTML:{__html:s}})]})]})}function $a({config:e,ctx:t,serviceType:n,title:r,description:a}){let{t:o}=W(),i=$e(),[s,u]=$(!1),[l,c]=$(""),[g,p]=$(""),[f,h]=$(null),[y,C]=$(null),[b,x,S,A,P]=Le(Ee),w=F=>{x(q=>{let z={...q,[n]:F};return n==="translationService"&&(z.translationServiceChangedbyUserAt=new Date().toISOString()),z})},v=t&&vo(t,n)||[],L=Re(()=>{if(e&&t){let{translationServices:F}=e,q=t[n],z=F?.[q];return z?{...z}:{}}return null},[e,t]),D=Re(()=>{if(e&&t){let F=t[n];if(Qn[F])return hi(n,F,t)}return null},[e,t]);if(le(()=>{mt.get(Tt,null).then(F=>{F?(h(F),C(Yt(F))):C(!1)}).catch(F=>{C(!1)})},[]),y===null)return null;let T=!!D?.providers?.length||!!D?.explicitProps?.length||!!D?.optionalProps?.length;return d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:r||o("service"),description:a||o("select translation service")}),d(R,{})]}),d(M,{}),d(O,{}),T&&d("article",{children:[d(N,{}),d(H,{}),d(B,{}),d(j,{}),k(),_()]})]});function j(){return D?.id=="gemini"?D.config.disableWarning?null:d("div",{class:"description py-2",children:o("geminiWarning")}):null}function R(){return d("select",{class:"select",onChange:F=>{F.preventDefault(),c(""),p(""),w(F.target.value)},children:v.map((F,q)=>d("option",{value:F.id,selected:F.id===t?.config?.[n],children:`${o("translationServices."+F.id)}${F.ok?"":" "+(!y&&!i&&F.providers&&F.providers.length>0?o("needLoginAction"):o("needActionForOptions"))}`},"service-item="+q))})}function M(){return l?d("p",{class:"verified text-red-500 mr-2",dangerouslySetInnerHTML:{__html:l}}):null}function O(){return!L||!D?null:d("div",{class:"text-right text-sm",children:[g&&d("span",{class:"verified text-green-500 mr-2",children:o("verified")}),d("a",{"aria-busy":s,href:"#",class:"secondary",onClick:async F=>{F.preventDefault();try{c(""),p(""),u(!0),await xn(500);let q=D.class;q&&q.clearState&&await q.clearState(),await Mr({id:1e6,text:"Hello world",from:"en",to:"zh-CN",url:"https://google.com",fromByClient:"auto",refresh:!0},{...t,translationService:D.id,rule:{...t?.rule,paragraphMinTextCount:1}}),p("verified")}catch(q){let z=q.message;try{z=q?.uiConfig?.(t)?.errMsg||q.message}catch{}c(z)}finally{u(!1)}},children:o("verifyService")})]})}function N(){return D?.providers?.length?d("fieldset",{children:[d("legend",{class:"mb-4",children:o("chooseProviderLabel")}),D.providers.map((F,q)=>d(bp,{userConfig:e,isProUser:!!y,provider:F,currentProvider:D.currentProvider,onChange:z=>{z.preventDefault();let K=z.target.value;K&&x(oe=>{let te=oe.translationServices||{},Z=te[D.id]||{};return{...oe,translationServices:{...te,[D.id]:{...Z,provider:K}}}})}}))]}):null}function H(){return D?.titleKey?d("div",{class:"description pb-1",dangerouslySetInnerHTML:{__html:nt.sanitize(o(D?.titleKey),{ALLOWED_ATTR:["href","target"]})}}):null}function B(){return!D?.docUrl||D.providers.length?null:d("div",{children:[d("a",{target:"_blank",class:"pb-1 docUrl",href:D.homepage,children:o(`translationServices.${D.id}`)}),"\xA0",d("span",{class:"description pb-1",children:o("please refer to")}),"\xA0",d("a",{target:"_blank",class:"pb-1 docUrl",href:D.docUrl,children:o("KeyAndConfigurationTutorial")})]})}function k(){return!L||!e||!D?.explicitProps?.length?null:d(xe,{children:D.explicitProps.map((F,q)=>d("div",{class:"mt-2",children:d(Wi,{config:e,isProUser:!!y,currentProvider:D.currentProvider,service:D?.id,field:F,value:L[F.name],onChange:z=>{x(V=>{let K=V.translationServices||{},oe=K[D.id]||{};return{...V,translationServices:{...K,[D.id]:{...oe,[F.name]:z}}}})},onFinish:()=>{st(o("saved"))}},F.name+D.id)},"service-item-prop-"+F.name+q))})}function _(){return!L||!e||!D?.optionalProps?.length?null:d(xe,{children:d("details",{class:"pt-4 border-none",children:[d("summary",{style:{lineHeight:"1rem"},children:[o("moreOptions"),"\xA0\u{1F449}"]}),d("div",{children:D.optionalProps.map((F,q)=>{let z=L[F.name];return F.name==="apiUrl"&&D?.id==="openai"&&L?.APIKEY?.startsWith("immersiveopenai_")&&(F={...F,disabled:!0},z="https://openai-api.immersivetranslate.com/v1/chat/completions"),F.name=="placeholderDelimiters"&&(F.default=L.placeholderDelimiters||F.default),d("div",{class:"mt-2",children:d(Wi,{config:e,service:D?.id,field:F,value:z,onChange:V=>{x(K=>{let oe=K.translationServices||{},te=oe[D.id]||{};return{...K,translationServices:{...oe,[D.id]:{...te,[F.name]:V}}}})},onFinish:()=>{st(o("saved"))}},F.name+D.id)},"service-item-optional-prop-"+F.name+q)})}),d("a",{href:"#",class:"secondary text-sm mt-2",onClick:F=>{F.preventDefault(),window.confirm(o("confirmResetToDefaultSettings"))&&(x(z=>{let V=z.translationServices||{};return{...z,translationServices:{...V,[D.id]:{}}}}),setTimeout(()=>{window.location.reload()},100))},children:o("resetToDefaultSettings")})]})})}}var jw=Object.keys(wi),Pb=s0();function q0(){let e=Ve(),[t,n,r,a,o]=e,i=Qt(t),s=On(i);vt(t,n);let[u,l]=Sb();return le(()=>()=>{Ut.unbind("esc")},[]),!i||!s?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:[d(Hw,{}),d(Yw,{config:i}),d(Ww,{config:i}),d($a,{config:i,ctx:s,serviceType:"translationService"}),d(zw,{config:i}),d($w,{config:i}),d(Vw,{config:i}),d(Kw,{config:i}),d(Gw,{config:i}),d(qw,{config:i,ctx:s}),d(Lb,{isOpen:u,closeModal:()=>l(!0),children:["\u5F53\u524D\u6C89\u6D78\u5F0F\u63D2\u4EF6\u592A\u65E7\uFF0C\u70B9\u6B64\u5347\u7EA7\u81F3",d("a",{href:"https://download.immersivetranslate.com/immersive-translate.user.js",target:"_blank",children:"\u6700\u65B0\u7248"})]})]})})}function Hw(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=s=>{s.preventDefault(),confirm(o("confirmResetConfig"))&&(a({...wo(),updatedAt:new Date().toISOString()}),Da().catch(u=>{I.error("clean local config error",u)}),wa().catch(u=>{I.error("clean buildin config error",u)}),Wa().catch(u=>{I.error("clean cache error",u)}),st(o("resetSuccess")),setTimeout(()=>{window.location.reload()},500))};return d("div",{class:"nav",children:[d("strong",{class:"text-lg",children:o("general")}),d("a",{class:"text-sm",href:"#",onClick:i,children:o("reset")})]})}function zw({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i,setLang:s}=W(),u=l=>{n(c=>({...c,interfaceLanguage:l}))};return d("div",{class:"nav",children:[d(we,{title:i("interface language"),description:i("desc.interfaceLanguage")}),d("select",{class:"select",onChange:l=>{s(l.target.value),u(l.target.value),me()||setTimeout(()=>{c0()},200)},children:jw.map((l,c)=>d("option",{value:l,selected:l===e.interfaceLanguage,children:Jt(l,e.interfaceLanguage,!0)},"locale"+c))})]})}function qw({config:e,ctx:t}){let{t:n}=W(),[r,a]=$(0),[o,i]=$(""),[s,u]=$(!1),l=Ve(),c=(S,A,P)=>{u(!s),h(w=>{let v=w.translationThemePatterns||{},L=v[A]||{},D=L.matches||[],T=[...D];return P==="edit"&&(T=zt(o,D)),T=Rn(S,T),{...w,translationThemePatterns:{...v,[A]:{...L,matches:T}}}})},g=(S,A)=>{h(P=>{let w=P.translationThemePatterns||{},v=w[A]||{},D=[...v.matches||[]];return S.forEach(T=>{D=zt(T,D)}),{...P,translationThemePatterns:{...w,[A]:{...v,matches:D}}}})},p=(S,A,P)=>{u(!s),i(S),a(P)},[f,h,y,C,b]=l,x=S=>{h(A=>{let P={matches:[],excludeMatches:[]};return A&&A.translationThemePatterns&&A.translationThemePatterns[S]&&(P=A.translationThemePatterns[S]),Lo(document,S,P,A.selectTranslationFont),{...A,translationTheme:S}})};return d("div",{children:[d("div",{class:"nav",children:[d(we,{title:n("translation display"),description:n("select diplay style")}),d("select",{class:"select",onChange:S=>{x(S.target.value)},children:Ag.map((S,A)=>d("option",{value:S,selected:S===e.translationTheme,children:n(`translationTheme.${S}`)},"theme"+A))})]}),d("div",{class:"pt-2 text-sm",children:d("p",{children:[n("sampleSourceText"),d("div",{class:"pt-2"}),d("font",{class:ki(e.translationTheme,!1,[],!1).join(" "),children:d("font",{class:Ai(e.translationTheme).join(" "),children:n("sampleTargetText")})}),e.translationTheme&&Cp(e.translationTheme).length>0?d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("customTheme")}),d("div",{class:"flex flex-col items-end",children:[Cp(e.translationTheme).map((S,A)=>{S.label=n(`customThemeLabel.${S.name}`);let P=e.translationThemePatterns||{},w=e.translationTheme,v=P[w]||{},L=`theme-${w}-${S.name}`,D=T9(L)||void 0,T=v[S.name]||D;return d(Wi,{config:e,field:S,value:T,onChange:j=>{h(R=>{let M=R.translationThemePatterns||{},N={...M[e.translationTheme]||{},[S.name]:j},H={...R,translationThemePatterns:{...M,[e.translationTheme]:N}};return Lo(document,e.translationTheme,N,R.selectTranslationFont),H})}},"theme-prop"+A)}),d("a",{href:"#",class:"text-sm secondary",onClick:S=>{S.preventDefault(),h(A=>{let P=A.translationThemePatterns||{},w={...P[e.translationTheme]};Cp(e.translationTheme).forEach(L=>{delete w[L.name]});let v={...A,translationThemePatterns:{...P,[e.translationTheme]:w}};return Lo(document,e.translationTheme,{matches:[],excludeMatches:[]},e.selectTranslationFont,!0),v})},children:n("resetToDefaultColor")})]})]}):null,d(tD,{config:e}),d("details",{class:"pt-2 border-none",children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:n("previewAllThemes")}),Ag.map((S,A)=>d("div",{class:"pt-2",children:d("label",{children:[d("div",{class:"flex justify-between",children:d("div",{children:[d("input",{type:"radio",name:"theme",value:S,checked:S===e.translationTheme,onChange:P=>{x(P.target.value)}}),n(`translationTheme.${S}`)]})}),d("p",{children:d("font",{class:ki(S,!1,[],!1).join(" "),children:d("font",{class:Ai(S).join(" "),children:n("sampleTargetText")})})})]})},"theme-index-"+A))]})]})}),d("div",{class:"nav",children:[d(we,{title:"",description:n("useAboveStyleForTheseSites",{theme:n(`translationTheme.${e.translationTheme}`)})}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:S=>{S.preventDefault(),u(!s)},children:n("add")})})]}),s?d(aa,{toggleModal:S=>{S.preventDefault(),u(!s)},onAddInterfaceUrl:(S,A)=>{c(S,e.translationTheme,A)},urlValue:o,index:r}):null,d(qa,{urls:eD(e),type:"matches",onDeleteUrl:S=>{g(S,e.translationTheme)},onEditUrl:p})]})}function Ww({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();if(!e)return null;let s=l=>{n(c=>({...c,targetLanguage:l}))},u=za(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(we,{title:i("target"),description:i("translate other languages into specific language")}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e?.targetLanguage,children:Jt(l,e?.interfaceLanguage)},"language"+c))})]})}function $w({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),{handleTranslationLanguagePatternSelected:s}=Fb(r),u=(l,c)=>{s(l?"matches":void 0,c)};return d(Eu,{title:t("always languages"),description:t("always translate the following languages"),languages:Pb,selectLanguages:e?.translationLanguagePattern?.matches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function Vw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),{handleTranslationLanguagePatternSelected:s}=Fb(r),u=(l,c)=>{s(l?"excludeMatches":void 0,c)};return d(Eu,{title:t("neverTranslateLanguagesLabel"),description:t("neverTranslateTheFollowingLanguagesDescription"),languages:Pb,selectLanguages:e?.translationLanguagePattern?.excludeMatches||[],interfaceLanguage:e?.interfaceLanguage,onChange:u})}function Kw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),s=(l,c,g,p)=>{r(f=>{let h=f.translationUrlPattern,y=[],C=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,C=h.excludeMatches);let b=[...y],x=[...C];if(p==="edit"){if(!b[c])return f;b[c]=l}return b=Rn(l,b),x=zt(l,C),{...f,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...f.translationUrlPattern,matches:b,excludeMatches:x}}})},u=async(l,c)=>{if(l&&l.length>0){let g=await qt();for(let p of l){let f=p,h=g.tempTranslationUrlMatches||[],y=h.filter(b=>b.match!==f),C=!1;y.length!==h.length&&(C=!0),C&&Wt({...g,tempTranslationUrlMatches:[...y]})}}r(g=>{let p=g.translationUrlPattern,f=[];p&&p.matches&&(f=p.matches);let h=[...f];return l.forEach(y=>{h=zt(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Su,{title:t("always sites"),description:t("always translate the following sites"),onDeleteUrl:u,onSubmitAddUrl:s,urls:e?.translationUrlPattern.matches||[],type:"matches"})}function Gw({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),s=(l,c,g,p)=>{r(f=>{let h=f.translationUrlPattern,y=[],C=[];h&&h.matches&&h.excludeMatches&&(y=h.matches,C=h.excludeMatches);let b=[...y],x=[...C];return p==="edit"&&(x[c]=l),b=zt(l,y),x=Rn(l,x),{...f,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...f.translationUrlPattern,matches:b,excludeMatches:x}}})},u=(l,c)=>{r(g=>{let p=g.translationUrlPattern,f=[];p&&p.excludeMatches&&(f=p.excludeMatches);let h=[...f];return l.forEach(y=>{h=zt(y,h)}),{...g,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...g.translationUrlPattern,[c]:h}}})};return d(Su,{title:t("never sites"),description:t("never translate the following sites"),urls:e?.translationUrlPattern.excludeMatches||[],onDeleteUrl:u,onSubmitAddUrl:s,type:"excludeMatches"})}function Fb(e){return{handleTranslationLanguagePatternSelected:Ne((n,r)=>{if(!n){e(i=>{let s={...i.translationLanguagePattern};return{...i,translationLanguagePattern:{...i.translationLanguagePattern,matches:zt(r,s.matches),excludeMatches:zt(r,s.excludeMatches)}}});return}let a=n,o=a==="matches"?"excludeMatches":"matches";r&&e(i=>{let s={...i.translationLanguagePattern};return s[a]=Rn(r,s[a]),s[o]=zt(r,s[o]),{...i,translationLanguagePattern:{...i.translationLanguagePattern,...s}}})},[e])}}var yp=0,vp;async function Bb(e){if(yp>60*10)return null;yp++,mt.refresh(),await xn(300);let t=await mt.get(Tt,null);I.debug("loopCheckUser",yp,t),t?(clearTimeout(vp),e(t)):vp=setTimeout(Bb.bind(null,e),1500)}function Mb(e){let{user:t,lang:n}=e,r=$e(),a=t&&t.email==="test@immersivetranslate.com",{t:o}=W();if(t&&t.subscription&&t.subscription.subscriptionStatus=="active"){let i=t,s=i.subscription,u=Xw(s.subscriptionTo),l=s.subscriptionType,c=l.startsWith("onetime_"),g=!c&&s.cancelAtPeriodEnd!="true",p="";if(g){let f="";s.isTrial&&(f=o("autoRenewTrialSuffix")),p=o("currentPlanDescriptionForContinuous",{plan:`${o(l)}${f}`,endAt:u})}else c?p=o("currentPlanDescriptionForOneTime",{plan:o(l),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n,2:"https://immersivetranslate.com/accounts/upgrade?type=month&lng="+n}):f1(i)?p=o("currentYearlyPlanDescriptionForAutoRenewCacelingWithRealPaiedUser",{plan:o(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/billing"}):l==="yearly"||l==="year"?p=o("currentYearlyPlanDescriptionForAutoRenewCacelingWithAdmin",{plan:o(l+"ForOnce"),endAt:u,1:"https://immersivetranslate.com/accounts/upgrade?type=year&lng="+n}):p=o("currentPlanDescriptionForAutoRenewCaceling",{plan:o(l+"ForOnce"),endAt:u});return d("span",{class:"info-subtitle",dangerouslySetInnerHTML:{__html:p}})}else return d("span",{class:"info-subtitle",children:r||a?"":o("currentPlanDescriptionForFree")})}function Yw({config:e}){let{t}=W(),n=$e(),[r,a]=$(null),o=!!e.showSponsorOnSafari,[i,s,u,l,c]=Le(Ee),g=e.interfaceLanguage;le(()=>(mt.get(Tt,null).then(y=>{y&&(a(y),Jw(y.token).then(C=>{let b=C.data;b.token=y.token,mt.set(Tt,b),a(b)}).catch(C=>{eu(C),a(null)}))}),()=>{clearTimeout(vp)}),[]);let p=Ne(y=>{y&&y.preventDefault&&y.preventDefault(),r?.token&&Qw(r.token).finally(async()=>{await mt.remove(Tt),await xn(200),await mt.refresh(),a(null)})},[r]),f=Ne(async y=>{y&&y.preventDefault&&y.preventDefault(),Zw(ql),await mt.set($s,!0),Bb(C=>{z0(C.token,i,s),a(C),xp?.close(),window.location.reload()})},[a]),h=r?.avatar||Tb;return r?!r.subscription||r.subscription.subscriptionStatus!="active"?ta(e)?null:d("div",{children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("span",{class:"info-title",title:r.email,children:r.email}),d(Mb,{user:r,lang:g})]}),d("div",{class:"ops",children:[d("a",{class:n&&o===!1?"!hidden":"",style:{display:"flex",flexDirection:"row",alignItems:"center",marginRight:"24px"},href:`${xa}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:[t("openPremium"),d("img",{width:24,height:24,style:{width:"24px",height:"24px"},src:wu})]}),d("div",{class:"",children:d("a",{href:`${Co}?utm_campaign=extension_settings_general&from=${n?"safari":"extension"}`,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:p,children:t("logout")})})]})]})]}):d("div",{class:"",children:[d("div",{class:"title",children:t("currentAccount")}),d("article",{class:"header nav",style:"padding:16px 16px",children:[d("div",{class:"info",style:"margin-left:0",children:[d("div",{className:"flex",children:[d("span",{class:"info-title info-primary",children:r.userName}),d("img",{width:24,height:24,style:{width:"24px",height:"24px",marginLeft:"4px"},src:wu})]}),d(Mb,{user:r,lang:g})]}),d("div",{class:"",children:d("a",{href:Co,children:t("manageAccount")})}),d("div",{class:"",children:d("a",{href:"#",onClick:p,children:t("logout")})})]})]}):ta(e)?null:d("div",{class:"header nav",children:[d("img",{src:h}),d("div",{class:"info",children:d("span",{class:"info-subtitle",children:t("nologin")})}),d("a",{class:"py-4",href:"#",onClick:f,children:t(n?"loginForSafari":"login")})]})}var Rb=yo;function Jw(e){return de({responseType:"json",url:Rb+"/v1/user",method:"get",headers:{token:e}})}function Qw(e){return de({responseType:"json",url:Rb+"/v1/user/logout",method:"delete",headers:{token:e}})}var xp=null;function Zw(e){let r=screen.width/2-230,a=screen.height/2-640/2;return xp=window.open(e,"loginWindow",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no,left=${r},top=${a},width=460,height=640,chrome=yes,centerscreen=yes`),xp}function Xw(e){let t=new Date(e),n=t.getFullYear(),r=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0");return`${n}-${r}-${a}`}function Cp(e){let t=[];return Ws[e]&&(t=t.concat(Ws[e])),t.push({name:"textColor",type:"color",required:!1}),t.push({name:"zoom",type:"number",default:100,required:!1}),t}function eD(e){let t=e.translationTheme;return!e.translationThemePatterns[t]||!e.translationThemePatterns[t].matches?[]:[...e.translationThemePatterns[t].matches]}var Tp="";function tD({config:e}){let{t}=W(),[n,r]=$(!1);return d("details",{class:"pt-2 border-none",onToggle:a=>{r(a.target?.open)},children:[d("summary",{class:"text-sm",style:{textAlign:"right",lineHeight:"1rem"},children:t("translationFont")}),d(nD,{config:e,isOpen:n})]})}function nD({config:e,isOpen:t}){let{t:n}=W(),[r,a]=$([]),[o,i]=$(!1);le(()=>{if(!t||r.length)return;let f=e.translationFonts.filter(y=>hp(y,n("sampleTargetText").charAt(0)+"a"));f.length&&f.unshift("none");let h=e.selectTranslationFont&&!f.find(y=>y===e.selectTranslationFont);(!f.length||h)&&i(!0),a(f)},[e.translationFonts,t,r,a]);let[s,u,l,c,g]=Le(Ee),p=f=>{f!==Tp&&!hp(f,n("sampleTargetText").charAt(0)+"a")&&an(n("translationFont.notSupportErrorMessage")),u(h=>{let y=e.translationTheme,C={matches:[],excludeMatches:[]};return h&&y&&h.translationThemePatterns&&h.translationThemePatterns[y]&&(C=h.translationThemePatterns[y]),Lo(document,y,C,f),{...h,selectTranslationFont:f}})};return d("div",{class:"flex items-center justify-end",children:[r.length?d("label",{for:"translationFont.custom",class:"text-sm mr-2",onClick:()=>{i(!o),o&&(r.find(h=>h===e.selectTranslationFont)||p(Tp))},children:[d("input",{type:"checkbox",id:"translationFont.custom",name:"translationFont.custom",checked:o}),n("translationFont.custom")]}):null,o?d("input",{style:{maxWidth:196},placeholder:n("translationFont.customPlaceholder"),value:e?.selectTranslationFont,onChange:f=>p(f.target.value)}):d("select",{class:"select",style:{maxWidth:196,flex:"unset"},onChange:f=>{p(f.target.value)},children:r.map((f,h)=>{let y=n(`font.${f}`);y.startsWith("font.")&&(y=f);let C=f=="none"?Tp:f;return d("option",{value:C,selected:f===e?.selectTranslationFont,children:y},"locale"+h)})})]})}m();var Ln={};zl.forEach(e=>{e.labelKey&&(Ln[e.key]=e.labelKey)});function Ep(){let e=Ve(),[t,n,r,a,o]=e;vt(t,n);let[i,s]=$(null),{t:u}=W();if(le(()=>{ft().then(c=>{bn({config:c,url:globalThis.location.href}).then(g=>{s(g)})})},[t]),!i)return d("div",{children:"loading"});let l=i.config;return d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("inputOptions")})}),d(rD,{config:l}),d(aD,{config:l}),d(oD,{config:l}),d($a,{config:l,ctx:i,serviceType:"inputTranslationService"}),d(iD,{config:l}),d(sD,{config:l}),d(lD,{config:l}),d(uD,{config:l})]})})}function rD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();return e?d(xe,{children:[d("details",{class:"mt-3",open:!0,children:[d("summary",{children:[i("clickToSeeQuickDemo")," \u{1F447}\u{1F447}"]}),d("video",{controls:!0,autoPlay:!0,src:"https://s.immersivetranslate.com/videos/immpersive-translate-input-translation-demo-202307044.mp4"})]}),d("div",{class:"nav",children:[d(we,{title:i("enableInputTranslation"),description:e.enableInputTranslationWithoutTriggerKey?i("enableInputTranslationDescriptionForNoneKey",{inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage),trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes}):i("enableInputTranslationDescription",{inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage),startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey,trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTrailingTriggerKeyRepeatTimes:e.inputTrailingTriggerKeyRepeatTimes})}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslation:!!u}))},checked:e.enableInputTranslation})})]})]}):null}function aD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=l=>{n(c=>({...c,inputTargetLanguage:l}))};if(!e)return null;let u=za(e.translationService,e.targetLanguage);return d("div",{class:"nav",children:[d(we,{title:i("inputTargetLanguage"),description:e.enableInputTranslationWithoutTriggerKey?i("inputTargetLanguageDescriptionForNoneKey"):i("inputTargetLanguageDescription",{startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:l=>{l.preventDefault(),s(l.target.value)},children:u.filter(l=>l!=="auto").map((l,c)=>d("option",{value:l,selected:l===e.inputTargetLanguage,children:Jt(l,e.interfaceLanguage)},"language"+c))})]})}function oD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();return e?d("div",{class:"nav",children:[d(we,{title:i("enableInputTranslationWithoutTriggerKeyTitle",{trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey,inputTargetLanguage:Jt(e.inputTargetLanguage,e.interfaceLanguage)}),description:""}),d("label",{for:"enableInputTranslation",children:d("input",{type:"checkbox",id:"enableInputTranslation",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;n(l=>({...l,enableInputTranslationWithoutTriggerKey:!!u}))},checked:e.enableInputTranslationWithoutTriggerKey})})]}):null}function iD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=u=>{n(l=>({...l,inputStartingTriggerKey:u}))};return e?d("div",{class:"nav",children:[d(we,{title:i("inputStartingTriggerKeyTitle"),description:e.inputStartingTriggerKey==="none"?i("inputStartingTriggerKeyDescriptionForNoneKey"):i("inputStartingTriggerKeyDescription",{startingKey:Ln[e.inputStartingTriggerKey]?i(Ln[e.inputStartingTriggerKey]):e.inputStartingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:zl.filter(u=>u.skipForStarting!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputStartingTriggerKey,children:u.labelKey?i(u.labelKey):u.key},"startingkey-"+l))})]}):null}function sD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),s=u=>{n(l=>({...l,inputTrailingTriggerKey:u}))};return e?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:i("inputTrailingTriggerKeyTitle"),description:i("inputTrailingTriggerKeyDescription",{trailingKey:Ln[e.inputTrailingTriggerKey]?i(Ln[e.inputTrailingTriggerKey]):e.inputTrailingTriggerKey})}),d("select",{class:"select",onChange:u=>{u.preventDefault(),s(u.target.value)},children:zl.filter(u=>u.skipForTrailing!==!0).map((u,l)=>d("option",{value:u.key,selected:u.key===e.inputTrailingTriggerKey,children:u.labelKey?i(u.labelKey):u.key},"startingkey-"+l))})]}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:i("inputHelperInfo",{1:"https://immersivetranslate.com/docs/input/"})}})]}):null}function uD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W(),[s,u]=$(!1),l=b=>{u(!s)},[c,g]=$(0),[p,f]=$(""),h=(b,x,S,A)=>{l(S),n(P=>{let w=P.inputTranslationUrlPattern,v=[],L=[];w&&w.matches&&w.excludeMatches&&(v=w.matches,L=w.excludeMatches);let D=[...v],T=[...L];return A==="edit"&&(S==="matches"?D[x]=b:T[x]=b),S==="matches"?(D=Rn(b,D),T=zt(b,L)):(D=zt(b,v),T=Rn(b,T)),{...P,inputTranslationUrlPattern:{...P.inputTranslationUrlPattern,matches:D,excludeMatches:T}}})},y=(b,x)=>{n(S=>{let A=S.inputTranslationUrlPattern,P=[];x==="matches"?A&&A.matches&&(P=A.matches):A&&A.excludeMatches&&(P=A.excludeMatches);let w=[...P];return b.forEach(v=>{w=zt(v,w)}),{...S,inputTranslationUrlPattern:{...S.inputTranslationUrlPattern,[x]:w}}})},C=(b,x,S)=>{l(x),f(b),g(S)};return e?d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:i("inputTranslationBlockUrlsTitle"),description:i("inputTranslationBlockUrlsDescription")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:b=>{b.preventDefault(),l("excludeMatches")},children:i("add")})}),s?d(aa,{toggleModal:b=>{b.preventDefault(),l("excludeMatches")},onSubmitAddUrl:h,type:"excludeMatches",urlValue:p,index:c}):null]}),d(qa,{urls:e.inputTranslationUrlPattern.excludeMatches,type:"excludeMatches",onDeleteUrl:y,onEditUrl:C})]}):null}function lD({config:e}){let[t,n,r,a,o]=Le(Ee),{t:i}=W();if(!e)return null;let s=()=>it().any?e.inputTrailingMobileTriggerKeyTimeout:e.inputTrailingTriggerKeyTimeout,u=l=>{n(c=>it().any?{...c,inputTrailingMobileTriggerKeyTimeout:l}:{...c,inputTrailingTriggerKeyTimeout:l})};return d("nav",{children:[d(we,{title:i("inputTrailingTriggerKeyTimeout"),description:i("inputTrailingTriggerKeyTimeoutDescription")}),d("div",{class:"option-input",children:d("input",{type:"number",value:s(),onChange:l=>{l.target&&u(Number(l.target.value))}})})]})}m();function Sp(){let e=Ve(),[t,n,r,a,o]=e;vt(t,n);let i=Qt(t),{t:s}=W(),[u,l]=$({}),[c,g]=$({});return le(()=>{Q.storage.sync.get(null).then(p=>{l(p),Q.storage.local.get(null).then(f=>{g(f)})})},[t]),!i||!t?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:d("div",{children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:s("developer")})}),d("div",{dangerouslySetInnerHTML:{__html:s("developerDescription",{1:"https://immersivetranslate.com/docs/advanced/"})},class:"secondary text-xs text-gray-500 mb-4"}),d(pD,{}),d(mD,{}),d(fD,{}),d(cD,{}),d(dD,{}),d(gD,{}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the final config"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(i,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the sync storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(u,null,2)})})]}),d("details",{class:"py-2",children:[d("summary",{children:"Click to expand the local storage object"}),d("pre",{children:d("code",{class:"code-editor",children:JSON.stringify(c,null,2)})})]})]})})})}function cD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=l=>{try{let c=l.target.value,g={...e};if(!c)delete g.rules;else{let p=JSON.parse(c);if(!Array.isArray(p)){an("Invalid rules, rules must be an array");return}g.rules=p}t(()=>g),st(o("saved"))}catch(c){an(`Invalid JSON ${c.message}`)}},s=l=>{if(l.preventDefault(),confirm(o("confirmResetConfig"))){let c={...e};delete c.rules,t(()=>c),st(o("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit User Rules"}),d("textarea",{class:"user-rule code-editor",rows:10,onChange:i,placeholder:`[{ "matches": "www.google.com", "selectors": [".title"] }, { "matches": "*.twitter.com", "selectors": [".text"], "excludeSelectors": ["footer"] - }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:o("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function dD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),it(o("saved"))},s=u=>{if(u.preventDefault(),confirm(o("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),it(o("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:i,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:o("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function gD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=u=>{u.preventDefault(),confirm(o("confirmResetConfig"))&&(t(()=>wo()),Da().catch(l=>{I.error("clean local config error",l)}),wa().catch(l=>{I.error("clean buildin config error",l)}),Wa().catch(l=>{I.error("clean cache error",l)}),it(o("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),it(o("saved"))}catch(l){rn(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:o("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:i,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function mD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!o?.beta)},checked:!!o?.beta}),i("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:i("betaDescription",{1:Ul})}})]})}function pD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!o?.debug)},checked:o?.debug}),i("toggleDebug")]})})}function fD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W();if(!o?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Eo([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!o?.enableSentryReport)},checked:o?.enableSentryReport}),i("enableSentryReport")]})})}m();m();var hD="buildinConfig",bD={},W0=x9(hD,bD);m();function wu(e,t=2e3){return n=>{let r,a=0;return o=>{++a==e&&(n(o),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var yD=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},CD=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},TD=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},vD=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xD=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},ED=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},SD=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},wD=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Dp(){let[e,t]=$(null),{t:n}=W(),[r,a]=$(n("calculating")+"..."),[o,i]=$(null),[s,u]=W0(),[l,c]=$(null),[g,p]=$(""),[f,h]=$(!1),[y,C]=$(!1),[b,x]=$(null),[S,A]=$(null),[P,w,v,L]=$e();vt(P,w);let[D,T]=$(!1),j=kr(),R=!0;We()&&b&&(R=b.generalRule.showSponsorOnSafari);let M=async()=>{p("");let _=o;if(o===null)try{let F=await mr({url:va});F?(i(F),_=F,h(!0)):(p(n("unknownError")),c(null))}catch(F){c(null),p(F.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(p(n("canNotFetchRemoteRule")),c(null))};le(()=>{pt().then(_=>{let F=_.buildinConfigUpdatedAt;x(_);let q=new Date(F);t(F),mr({url:va}).then(z=>{let V=z.minVersion,K=j;i(z);let oe=z.latestVersion;if(oe&&(Fr(K,oe)?A(!0):A(!1)),Fr(K,V)){let te=z.buildinConfigUpdatedAt;new Date(te)>q?(c(!0),M()):c(!1)}else C(!0),c(null)}).catch(z=>{c(null),p(z.message)})}),yb().then(_=>{a(_)})},[]),le(()=>{pt().then(_=>{x(_)})},[P,e]);let O=_=>{w(F=>{let q=!F.alpha;return q?it(n("enableAlphaSuccess")):it(n("disableAlphaSuccess")),{...F,alpha:q}})},N=_=>{_.preventDefault(),_.stopPropagation(),T(!0),wa().catch(F=>{I.error("clear build config failed:",F)}),Da().catch(F=>{I.error("clear local config failed:",F)}),Wa().then(()=>{T(!1),it("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(F=>{T(!1),rn(F.message)})},H=_=>{w(F=>({...F,cache:_}))},B=_=>{w(F=>({...F,enabled:_}))},k="aboutIntro";return R||(k="aboutIntroWithoutSponsor"),b?d(ut,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:wu(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:wu(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",j,i2()?"(Beta)":""]}),S===!1&&d(ED,{latestVersion:o?.latestVersion}),S===!0&&d(SD,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{B(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{H(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!me()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:N,children:n("cleanCache")})]}),g?d(wD,{handleSyncing:M,message:g,date:e||""}):y?d(xD,{minVersion:o.minVersion}):l===null?d(TD,{}):l===!0?d(vD,{}):f?d(CD,{date:e}):d(yD,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:Ul,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),R&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}m();m();var DD=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let o=n[a];t&&t(o,a)};return d("div",{class:"tags-input-container",children:[n.map((a,o)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(o),class:"delete",children:"\xD7"})]},a)),d(kD,{...e})]})};function kD(e){let{onAddTag:t,tags:n}=e,r=qe(null),[a,o]=$(!1),{t:i}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{o(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{o(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:i("tagsInput.add")})]})}var Ib=DD;var AD=s0();function kp(){let e=$e(),[t,n,r,a,o]=e,i=Qt(t),s=On(i),{t:u,setLang:l}=W();return vt(t,n),!i||!s?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_D,{config:i,ctx:s}),d(MD,{config:i}),d(LD,{config:i,setSettings:n}),d(PD,{ctx:s}),d(FD,{ctx:s}),d(BD,{config:i}),d(RD,{config:i}),d(ID,{config:i}),d(OD,{config:i}),d(ND,{config:i}),d(UD,{config:i}),d(jD,{config:i}),d(HD,{config:i}),d(zD,{config:i,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(qD,{config:i,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function LD(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=Ne(({tag:o,index:i,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(p=>p.k===o);return s==="add"&&!g&&(c=[...l,{k:o}]),s==="remove"&&(c=l.filter((p,f)=>f!==i)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(we,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Ib,{tags:t.generalRule.glossaries.map(o=>o.k),onAddTag:o=>a({tag:o,action:"add"}),onRemoveTag:(o,i)=>a({tag:o,index:i,action:"remove"})})]}):null}function _D({config:e,ctx:t}){let{t:n}=W(),[r,a,o,i,s]=Le(Ee);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(we,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let p=2,f=Math.floor(g/2);f>2&&(p=f),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:p}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function MD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function PD({ctx:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function FD({ctx:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(we,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function BD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function RD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function ID({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return me()?null:d("div",{class:"nav",children:[d(we,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;c0({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function OD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function ND({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function UD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function jD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),[s]=W0();return s.generalRule?d("div",{class:"nav",children:[d(we,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function HD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function zD({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[o,i,s,u,l]=Le(Ee),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(p,f)=>{i(h=>{let y=h.translationModeLanguagePattern,C=y?.[t]||[],b=y?.[c]||[],x=[...C];p?x=Array.from(new Set([...x,f])):x=x.filter(A=>A!==f);let S=b.filter(A=>A!==f);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:S}}})};return d(xu,{title:n,description:r,languages:AD,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function qD({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[o,i,s,u,l]=Le(Ee),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,C,b)=>{i(x=>{let S=x.translationModeUrlPattern,A=S?.[t]||[],P=S?.[c]||[],w=[...A];b==="edit"?w[y]=h:w=Array.from(new Set([...w,h]));let v=P.filter(L=>L!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:w,[c]:v}}})},p=Re(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(Eu,{title:n,description:r,urls:p,onDeleteUrl:(h,y)=>{i(C=>{let b=p.filter(x=>!h.find(S=>S==x));return{...C,translationModeUrlPattern:{...C.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}m();function Ap(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let i=Qt(t),s=On(i),{t:u}=W();return s?d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}m();m();function Vi(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}m();function yr(e){return Se.ASSETS_BASE_URL+e}function Lp(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let{t:i}=W(),s=Qt(t),u=On(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(p=>{let f="",h="";if(p.includes("[")){let y=p.split("[");h=y[0];let b=new URL(h).hostname;f=y[1]?y[1].slice(0,-1):b}else h=p,f=new URL(h).hostname;return{name:f,url:h}}),g=c.map((p,f)=>{let h=f===c.length-1;return` + }]`,spellcheck:!1,value:e.rules?JSON.stringify(e.rules||[],null,2):""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:l=>l.preventDefault(),role:"button",children:o("save")}),d("a",{target:"_blank",class:"secondary text-sm mr-3",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function dD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=u=>{let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule,injectedCss:u.target.value||""},t(()=>l),st(o("saved"))},s=u=>{if(u.preventDefault(),confirm(o("confirmResetConfig"))){let l={...e};l.generalRule||(l.generalRule={}),l.generalRule={...l.generalRule},delete l.generalRule.injectedCss,t(()=>l),st(o("resetThisSuccess"))}};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Injected CSS"}),d("textarea",{class:"code-editor",rows:10,onChange:i,spellcheck:!1,placeholder:".title { color: red }",value:e.generalRule&&e.generalRule.injectedCss?e.generalRule.injectedCss:""}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:o("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:s,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function gD(){let[e,t,n,r,a]=Le(Ee),{t:o}=W(),i=u=>{u.preventDefault(),confirm(o("confirmResetConfig"))&&(t(()=>wo()),Da().catch(l=>{I.error("clean local config error",l)}),wa().catch(l=>{I.error("clean buildin config error",l)}),Wa().catch(l=>{I.error("clean cache error",l)}),st(o("resetSuccess")))};return d("details",{class:"py-2",children:[d("summary",{children:"Edit Full User Config"}),d("textarea",{class:"code-editor",rows:10,onChange:u=>{try{let l=JSON.parse(u.target.value);t(()=>l),st(o("saved"))}catch(l){an(`Invalid JSON ${l.message}`)}},spellcheck:!1,value:JSON.stringify(e,null,2)}),d("div",{children:[d("a",{href:"#",class:"mr-3 !py-2",onClick:u=>u.preventDefault(),role:"button",children:o("save")}),d("a",{class:"secondary text-sm mr-3",target:"_blank",href:"https://immersivetranslate.com/docs/advanced/",children:[o("help"),"?"]}),d("a",{href:"#",onClick:i,class:"text-sm secondary mr-2",children:o("reset")})]})]})}function mD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W(),s=u=>{t(l=>({...l,beta:u}))};return d("fieldset",{class:"mt-2",children:[d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"beta",name:"beta",role:"switch",onChange:()=>{s(!o?.beta)},checked:!!o?.beta}),i("toggleBeta")]}),d("small",{class:"text-gray-500",dangerouslySetInnerHTML:{__html:i("betaDescription",{1:Ul})}})]})}function pD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W(),s=u=>{t(l=>({...l,debug:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"debug",name:"debug",role:"switch",onChange:()=>{s(!o?.debug)},checked:o?.debug}),i("toggleDebug")]})})}function fD(){let[e,t,n,r,a]=Le(Ee),o=Qt(e),{t:i}=W();if(!o?.sentryConfig?.enable)return d(xe,{});let s=u=>{t(l=>(u||Eo([{name:"disableReport"}]),{...l,enableSentryReport:u}))};return d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"report",name:"report",role:"switch",onChange:()=>{s(!o?.enableSentryReport)},checked:o?.enableSentryReport}),i("enableSentryReport")]})})}m();m();var hD="buildinConfig",bD={},W0=x9(hD,bD);m();function Du(e,t=2e3){return n=>{let r,a=0;return o=>{++a==e&&(n(o),a=0),clearTimeout(r),r=setTimeout(()=>a=0,t)}}}var yD=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("The local rules are up to date")," ",new Date(e).toLocaleString()]})},CD=({date:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},TD=()=>{let{t:e}=W();return d("p",{class:"text-sm","aria-busy":!0,children:[e("Checking for updates"),"..."]})},vD=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:[e("Rules are being synchronized"),"..."]})},xD=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},ED=({latestVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:[t("foundNewVersion"),":"," ",d("a",{href:"https://github.com/immersive-translate/immersive-translate/releases",children:e})]})},SD=()=>{let{t:e}=W();return d("p",{class:"text-sm",children:e("theLocalExtensionIsUpToUpdate")})},wD=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function wp(){let[e,t]=$(null),{t:n}=W(),[r,a]=$(n("calculating")+"..."),[o,i]=$(null),[s,u]=W0(),[l,c]=$(null),[g,p]=$(""),[f,h]=$(!1),[y,C]=$(!1),[b,x]=$(null),[S,A]=$(null),[P,w,v,L]=Ve();vt(P,w);let[D,T]=$(!1),j=kr(),R=!0;$e()&&b&&(R=b.generalRule.showSponsorOnSafari);let M=async()=>{p("");let _=o;if(o===null)try{let F=await mr({url:va});F?(i(F),_=F,h(!0)):(p(n("unknownError")),c(null))}catch(F){c(null),p(F.message);return}_!==null?(u(_),c(!1),t(_.buildinConfigUpdatedAt)):(p(n("canNotFetchRemoteRule")),c(null))};le(()=>{ft().then(_=>{let F=_.buildinConfigUpdatedAt;x(_);let q=new Date(F);t(F),mr({url:va}).then(z=>{let V=z.minVersion,K=j;i(z);let oe=z.latestVersion;if(oe&&(Fr(K,oe)?A(!0):A(!1)),Fr(K,V)){let te=z.buildinConfigUpdatedAt;new Date(te)>q?(c(!0),M()):c(!1)}else C(!0),c(null)}).catch(z=>{c(null),p(z.message)})}),yb().then(_=>{a(_)})},[]),le(()=>{ft().then(_=>{x(_)})},[P,e]);let O=_=>{w(F=>{let q=!F.alpha;return q?st(n("enableAlphaSuccess")):st(n("disableAlphaSuccess")),{...F,alpha:q}})},N=_=>{_.preventDefault(),_.stopPropagation(),T(!0),wa().catch(F=>{I.error("clear build config failed:",F)}),Da().catch(F=>{I.error("clear local config failed:",F)}),Wa().then(()=>{T(!1),st("\u6E05\u7406\u6210\u529F"),a("0 B")}).catch(F=>{T(!1),an(F.message)})},H=_=>{w(F=>({...F,cache:_}))},B=_=>{w(F=>({...F,enabled:_}))},k="aboutIntro";return R||(k="aboutIntroWithoutSponsor"),b?d(ut,{children:d("div",{class:"text-sm",children:[d("div",{class:"nav",children:d("strong",{onClick:Du(7)(O),class:"text-lg immersive-translate-no-select",children:n("about")})}),d("p",{onClick:Du(7)(O),class:"mb-2 immersive-translate-no-select",children:["V",j,i2()?"(Beta)":""]}),S===!1&&d(ED,{latestVersion:o?.latestVersion}),S===!0&&d(SD,{}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"enabled",name:"enabled",role:"switch",onChange:()=>{B(!b.enabled)},checked:b.enabled}),n("enabledExtension")]})}),d("fieldset",{children:d("label",{for:"switch",children:[d("input",{type:"checkbox",id:"cache",name:"cache",role:"switch",onChange:()=>{H(!b.cache)},checked:b.cache}),n("allowCacheTranslations")]})}),!me()&&r&&d("p",{class:"text-sm",children:[n("cacheSize"),"\xA0",r," \xA0 ",D?d("span",{children:[n("cleaning"),"..."]}):d("a",{class:"text-sm",href:"#",onClick:N,children:n("cleanCache")})]}),g?d(wD,{handleSyncing:M,message:g,date:e||""}):y?d(xD,{minVersion:o.minVersion}):l===null?d(TD,{}):l===!0?d(vD,{}):f?d(CD,{date:e}):d(yD,{date:e}),d("blockquote",{class:"text-sm",dangerouslySetInnerHTML:{__html:n(k,{1:"https://immersivetranslate.com/docs/thanks/",2:"https://immersivetranslate.com/docs/donate/",3:"https://twitter.com/immersivetran",4:"https://t.me/immersivetranslate",5:"https://immersivetranslate.substack.com",6:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",7:"https://immersivetranslate.com/pricing/?utm_source=extension&utm_medium=extension&utm_campaign=about_page",8:"mailto:support@immersivetranslate.com"})}}),d("div",{class:"flex items-center justify-center",children:[d("div",{class:"flex flex-col items-center",children:[d("img",{width:"120",src:"https://immersivetranslate.com/assets/wechat-qrcode.jpg",alt:"wechat contact"}),d("div",{class:"text-sm",children:n("wechatPublicAccount")})]}),d("div",{class:"w-16"}),d("div",{class:"flex flex-col items-center",children:[d("img",{width:"125",src:"https://immersivetranslate.com/assets/wechat-contact.png",alt:"qq channel contact"}),d("div",{class:"text-sm text-center",children:n("wechatCommunities")})]})]}),d("ul",{class:"text-sm ml-4",children:[d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/issues",children:n("feedback")})}),d("li",{children:d("a",{class:"secondary",href:Ul,children:n("joinTelegramGroup")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")})}),d("li",{children:d("a",{class:"secondary",href:"https://immersivetranslate.com/",children:n("projectHomepage")})}),d("li",{children:d("a",{class:"secondary",href:"https://github.com/immersive-translate/immersive-translate/",children:n("Github")})}),R&&!1]}),d("div",{class:"flex justify-center",children:d("iframe",{src:"https://immersivetranslate.substack.com/embed",width:"480",height:"320",style:"border:1px solid #EEE; background:white;",frameBorder:0,scrolling:"no"})})]})}):null}m();m();var DD=e=>{let{onRemoveTag:t,tags:n}=e,r=a=>{let o=n[a];t&&t(o,a)};return d("div",{class:"tags-input-container",children:[n.map((a,o)=>d("div",{class:"tag",style:{paddingRight:0},children:[d("span",{children:a}),d("span",{onClick:()=>r(o),class:"delete",children:"\xD7"})]},a)),d(kD,{...e})]})};function kD(e){let{onAddTag:t,tags:n}=e,r=We(null),[a,o]=$(!1),{t:i}=W(),s=c=>{r.current.innerText="",t&&t(c)};return d(xe,{children:[d("span",{autoFocus:!0,class:"input tag",ref:r,contentEditable:!0,style:{display:a?"inline-block":"none"},onKeyDown:c=>{c.key==="Enter"&&r.current?.textContent&&(c.preventDefault(),s(r.current?.textContent))},onBlur:()=>{o(!1),r.current.innerText=""}}),d("span",{style:{display:a?"none":"inline-block"},onClick:()=>{o(!0),setTimeout(()=>{r.current?.focus()},100)},class:"input tag add",children:i("tagsInput.add")})]})}var Ib=DD;var AD=s0();function Dp(){let e=Ve(),[t,n,r,a,o]=e,i=Qt(t),s=On(i),{t:u,setLang:l}=W();return vt(t,n),!i||!s?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:d("div",{class:"pb-32",children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("advanced")})}),d(_D,{config:i,ctx:s}),d(MD,{config:i}),d(LD,{config:i,setSettings:n}),d(PD,{ctx:s}),d(FD,{ctx:s}),d(BD,{config:i}),d(RD,{config:i}),d(ID,{config:i}),d(OD,{config:i}),d(ND,{config:i}),d(UD,{config:i}),d(jD,{config:i}),d(HD,{config:i}),d(zD,{config:i,matchKey:"translationMatches",title:u("translationModeLang.translation.title"),description:u("translationModeLang.translation.description")}),d(qD,{config:i,matchKey:"translationMatches",title:u("translationModeUrl.translation.title"),description:u("translationModeUrl.translation.description")})]})})})}function LD(e){let{config:t,setSettings:n}=e,{t:r}=W(),a=Ne(({tag:o,index:i,action:s})=>{n(u=>{let l=u.generalRule?.glossaries||t.generalRule.glossaries,c=l,g=l.find(p=>p.k===o);return s==="add"&&!g&&(c=[...l,{k:o}]),s==="remove"&&(c=l.filter((p,f)=>f!==i)),{...u,generalRule:{...u.generalRule,glossaries:c}}})},[t]);return t?d(xe,{children:[d("div",{class:"nav",children:d(we,{title:r("neverTranslateText.title"),description:r("neverTranslateText.description")})}),d(Ib,{tags:t.generalRule.glossaries.map(o=>o.k),onAddTag:o=>a({tag:o,action:"add"}),onRemoveTag:(o,i)=>a({tag:o,index:i,action:"remove"})})]}):null}function _D({config:e,ctx:t}){let{t:n}=W(),[r,a,o,i,s]=Le(Ee);return t.state.translationArea=="body"?null:d("div",{class:"nav",children:[d(we,{title:n("paragraphMinTextCountField"),description:n("paragraphMinTextCountDesc")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:u=>{a(l=>{let c=l.generalRule||{},g=parseInt(u.target.value);if(g===0)c={...c,paragraphMinTextCount:1,paragraphMinWordCount:1};else{let p=2,f=Math.floor(g/2);f>2&&(p=f),c={...c,paragraphMinTextCount:g,paragraphMinWordCount:p}}return{...l,generalRule:c}})},name:"count",value:e.generalRule.paragraphMinTextCount,placeholder:"Text Length",required:!0})})]})}function MD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("the number of characters to be translated first")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>({...l,immediateTranslationTextCount:parseInt(u)}))},name:"count",value:e.immediateTranslationTextCount,placeholder:"Text Length",required:!0})})]})}function PD({ctx:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("enableLineBreak"),description:t("enableLineBreakDescription")}),d("label",{for:"switch",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:u?280:0}}})},checked:e.rule.lineBreakMaxTextCount>0,id:"switch",name:"switch",role:"switch"})})]})}function FD({ctx:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return e.rule.lineBreakMaxTextCount<=0?null:d("div",{class:"nav",children:[d(we,{title:t("lineBreakMaxTextCount")}),d("label",{for:"count",children:d("input",{type:"number",id:"count",onChange:s=>{let u=s.target.value;r(l=>{let c=l.generalRule||{};return{...l,generalRule:{...c,lineBreakMaxTextCount:parseInt(u)}}})},name:"count",value:e.rule.lineBreakMaxTextCount,placeholder:"Text Length",required:!0})})]})}function BD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translate to the bottom of the page"),description:t("translateToThePageEndImmediatelyDescription")}),d("label",{for:"translateToThePageEndImmediatelyDescription",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationStartMode:u?"immediate":"dynamic"}))},checked:e.translationStartMode==="immediate",id:"translateToThePageEndImmediatelyDescription",name:"switch",role:"switch"})})]})}function RD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translationOnlyMode"),description:t("translationOnlyModeDescription")}),d("label",{for:"translationOnlyMode",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationMode:u?"translation":"dual"}))},checked:e.translationMode==="translation",id:"translationOnlyMode",name:"switch",role:"switch"})})]})}function ID({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return me()?null:d("div",{class:"nav",children:[d(we,{title:t("isShowContextMenu")}),d("label",{for:"isShowContextMenu",children:d("input",{type:"checkbox",onChange:s=>{let u=s.target.checked;c0({...e,isShowContextMenu:u}),r(l=>({...l,isShowContextMenu:u}))},checked:e.isShowContextMenu===!0,id:"isShowContextMenu",name:"switch",role:"switch"})})]})}function OD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("translate all areas of the page"),description:t("translationAreaDescription")}),d("label",{for:"translationAreaDescription",children:d("input",{type:"checkbox",id:"translationAreaDescription",name:"switch",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,translationArea:u?"body":"main"}))},checked:e.translationArea==="body"})})]})}function ND({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("isTranslateTitle"),description:t("isTranslateTitleDescription")}),d("label",{for:"isTranslateTitle",children:d("input",{type:"checkbox",id:"isTranslateTitle",name:"isTranslateTitle",role:"switch",onChange:s=>{let u=s.target.checked;r(l=>({...l,generalRule:{...l.generalRule,isTranslateTitle:u}}))},checked:e.generalRule.isTranslateTitle})})]})}function UD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("loadingThemeTitle"),description:t("loadingThemeDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,loadingTheme:s.target.value}))},children:[d("option",{value:"spinner",selected:e.loadingTheme==="spinner",children:t("loadingTheme.spinner")}),d("option",{value:"text",selected:e.loadingTheme==="text",children:t("loadingTheme.text")}),d("option",{value:"none",selected:e.loadingTheme==="none",children:t("loadingTheme.none")})]})]})}function jD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee),[s]=W0();return s.generalRule?d("div",{class:"nav",children:[d(we,{title:t("translationLineBreakSettingTitle"),description:t("translationLineBreakSettingDescription",{count:s.generalRule.blockMinTextCount})}),d("select",{class:"select",onChange:u=>{r(l=>{let c=l.generalRule||{};return parseInt(u.target.value)===0?c={...c,blockMinTextCount:0,blockMinWordCount:0}:c={...c,blockMinTextCount:s.generalRule.blockMinTextCount,blockMinWordCount:s.generalRule.blockMinWordCount},{...l,generalRule:c}})},children:[d("option",{value:32,selected:e.generalRule.blockMinTextCount>0,children:t("smartLineBreak")}),d("option",{value:0,selected:e.generalRule.blockMinTextCount===0,children:t("alwaysLineBreak")})]})]}):null}function HD({config:e}){let{t}=W(),[n,r,a,o,i]=Le(Ee);return d("div",{class:"nav",children:[d(we,{title:t("tempTranslateDomainTitle"),description:t("tempTranslateDomainDescription")}),d("select",{class:"select",onChange:s=>{r(u=>({...u,tempTranslateDomainMinutes:parseInt(s.target.value)}))},children:[d("option",{value:0,selected:e.tempTranslateDomainMinutes===0,children:t("disabled")}),d("option",{value:5,selected:e.tempTranslateDomainMinutes===5,children:t("xMinutes",{count:5})}),d("option",{value:10,selected:e.tempTranslateDomainMinutes===10,children:t("xMinutes",{count:10})}),d("option",{value:15,selected:e.tempTranslateDomainMinutes===15,children:t("xMinutes",{count:15})}),d("option",{value:30,selected:e.tempTranslateDomainMinutes===30,children:t("xMinutes",{count:30})}),d("option",{value:60,selected:e.tempTranslateDomainMinutes===60,children:t("xMinutes",{count:60})})]})]})}function zD({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[o,i,s,u,l]=Le(Ee),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(p,f)=>{i(h=>{let y=h.translationModeLanguagePattern,C=y?.[t]||[],b=y?.[c]||[],x=[...C];p?x=Array.from(new Set([...x,f])):x=x.filter(A=>A!==f);let S=b.filter(A=>A!==f);return{...h,isChangedAlwaysTranslatedUrls:!0,translationModeLanguagePattern:{...h.translationModeLanguagePattern,[t]:x,[c]:S}}})};return d(Eu,{title:n,description:r,languages:AD,selectLanguages:e?.translationModeLanguagePattern?.[t]||[],interfaceLanguage:e?.interfaceLanguage,onChange:g})}function qD({config:e,matchKey:t,title:n,description:r}){let{t:a}=W(),[o,i,s,u,l]=Le(Ee),c=t==="dualMatches"?"translationMatches":"dualMatches",g=(h,y,C,b)=>{i(x=>{let S=x.translationModeUrlPattern,A=S?.[t]||[],P=S?.[c]||[],w=[...A];b==="edit"?w[y]=h:w=Array.from(new Set([...w,h]));let v=P.filter(L=>L!==h);return{...x,isChangedAlwaysTranslatedUrls:!0,translationModeUrlPattern:{...x.translationModeUrlPattern,[t]:w,[c]:v}}})},p=Re(()=>e?.translationModeUrlPattern[t]||[],[e,t]);return d(Su,{title:n,description:r,urls:p,onDeleteUrl:(h,y)=>{i(C=>{let b=p.filter(x=>!h.find(S=>S==x));return{...C,translationModeUrlPattern:{...C.translationModeUrlPattern,[y]:b}}})},onSubmitAddUrl:g,type:t})}m();function kp(){let e=Ve(),[t,n,r,a,o]=e;vt(t,n);let i=Qt(t),s=On(i),{t:u}=W();return s?d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("contact")})}),d("div",{children:d("div",{children:u("contact.description",{email:"support@immersivetranslate.com"})})}),d("iframe",{class:"letterbird-embed contact-embed",src:"https://letterbird.co/immersivetranslate?origin=http://localhost:8000&hideheader=1",width:"100%",height:"452px"})]})}):d("div",{children:"loading"})}m();m();function Vi(e){return d("div",{class:"intro-container",children:[d("img",{src:e.image,class:"intro-light-img"}),d("img",{src:e.nightImage,class:"intro-night-img"}),d("div",{class:"intro-right",children:[d("h1",{children:e.title}),d("p",{dangerouslySetInnerHTML:{__html:e.description}})]})]})}m();function yr(e){return Se.ASSETS_BASE_URL+e}function Ap(){let e=Ve(),[t,n,r,a,o]=e;vt(t,n);let{t:i}=W(),s=Qt(t),u=On(s);if(!u||!s)return d("div",{children:"loading"});let c=(s.supportedVideoSubtitleSites||[]).map(p=>{let f="",h="";if(p.includes("[")){let y=p.split("[");h=y[0];let b=new URL(h).hostname;f=y[1]?y[1].slice(0,-1):b}else h=p,f=new URL(h).hostname;return{name:f,url:h}}),g=c.map((p,f)=>{let h=f===c.length-1;return` ${p.name} ${h?"":", "} - `}).join("");return d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:i("subtitle")})}),d(Vi,{image:yr("images/dual_subtitle_intro.png"),nightImage:yr("images/dual_subtitle_intro_night.png"),title:i("intro.subtitleTitle"),description:i("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(we,{title:i("autoEnableSubtitle"),description:i("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:f}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.humanSubtitlesPreferred"),description:i("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:f}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.preTranslation"),description:i("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:f}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d($a,{title:i("youtubeService"),config:s,ctx:u,description:i("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.showQuickButton"),description:i("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:f}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(WD,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.disabledSubtitle"),description:i("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:f}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:i("intro.subtitleDescription")+"
"+g}})]})})}function WD(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(we,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}m();var Ob=ps({presets:[Zu(),el()]});m();var Nb="G-MKMD9LWFTR";async function mt(e,t,n){try{let r=Qs(),a=Pe(),o=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(o=!1);let i=me(),s=at(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await Xr(l,0),T=$0(new Date(D)),j=Date.now(),R=$0(new Date(j));if(T===R)return;await S1(l,j)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",p=await jt("fakeUserId","");p||(p=await Xr("fakeUserId",""),p&&await rt("fakeUserId",p));let f=Zn(),h=new Date,y=await jt("installedAt","");y||(y=await Xr("installedAt",""),y&&await rt("installedAt",y)),p?y||(y=new Date(0).toISOString(),await rt("installedAt",y)):(p=$D(32),await rt("fakeUserId",p)),y||(y=h.toISOString(),await rt("installedAt",y));let C=new Date(y),b=$0(C),x=$0(h),S=b===x,A=h.getTime()-C.getTime()<7*24*60*60*1e3,P=`https://www.google-analytics.com/mp/collect?measurement_id=${Nb}&api_secret=${g}`;u||(P=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Nb}&api_secret=${g}`);let w=ti.parse(window.navigator.userAgent),v=t.map(D=>{let T=D.params||{};if(w.os&&(T.os_name=w.os.name||"unknown",T.os_version=w.os.version||"unknown",T.os_version_name=w.os.versionName||"unknown"),w.browser&&(T.browser_name=w.browser.name||"unknown",T.browser_version=w.browser.version||"unknown",r&&(T.browser_name=r.name,T.browser_version=r.version)),w.platform&&(T.platform_type=w.platform.type||"unknown"),w.engine&&(T.engine_name=w.engine.name||"unknown",T.engine_version=w.engine.version||"unknown"),n.translationService&&(T.translation_service||(T.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(T.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?T.openai_is_official="1":T.openai_is_official="0":T.openai_is_official="1"))),n.targetLanguage&&(T.target_language=n.targetLanguage),n.config.interfaceLanguage&&(T.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?T.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":T.enable_default_always_translated_urls="0",f&&(T.version=f),n.config.enableInputTranslation?T.enable_input_translation=n.config.enableInputTranslation?"1":"0":T.enable_input_translation="0",n.config.translationTheme&&(T.translation_theme=n.config.translationTheme),n.config.alpha&&(T.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?T.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):T.always_translate_languages="none",a.INSTALL_FROM&&(T.install_from=a.INSTALL_FROM),n.config.beta&&(T.beta=n.config.alpha.toString()),n.config.translationArea&&(T.translation_area=n.config.translationArea),b&&(T.install_day=VD(C)),n.user){let R=h1(n.user);R&&Object.keys(R).forEach(M=>{T[M]=R[M]})}else T.user_type="anonymous";n.config.translationMode&&(T.translation_mode=n.config.translationMode),T.userscript=i.toString(),S?T.is_new_user_today="1":T.is_new_user_today="0",A?T.is_new_user_this_week="1":T.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?T.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():T.temp_translate_domain_minutes="0";let j="html";if(n.rule.pageType&&(j=n.rule.pageType),T.page_type=j,s?T.main_frame=0:T.main_frame=1,!c){let R=n.url;try{let M=new URL(R);T.site_host=M.hostname}catch{T.site_host="unknown"}n.sourceLanguage&&(T.source_language=n.sourceLanguage)}return{...D,params:T}});if(o)return;let L=await de({responseType:"text",url:P,method:"POST",body:JSON.stringify({client_id:p,user_id:p,events:v})})}catch{}}function $D(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[f,h]=$(!1),y=qe(null),C=qe(null),b=()=>{u||!l&&ot().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),p?.()},s))},x=()=>{ot().any&&(C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{S()},2e3))},S=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},A=Re(()=>{let P={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(o&&(P.maxWidth="200px",i&&(P.width=i+"px"),P.whiteSpace="normal"),n){case"top":return{...P,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...P,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...P,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...P,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,o,i,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:S,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),f&&d("div",{style:A,role:"tooltip",children:e})]})},tr=KD;m();m();m();m();m();function jb(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return I.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return I.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let o=window.document.cloneNode(!0),s=new pl(o,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=GD(s.content,s.textContent),t&&(n=zb(r,t))}catch(o){I.debug(o)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function Hb(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&I.debug("update article node",n),e.articleNode=n)}function _p(e,t){return t&&e?.contains(t)||!1}function GD(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let o=YD(a[0]),i=document.querySelector(o);return!i||(a.length>1&&(i=i.parentElement),i==document.documentElement)?null:(i?.textContent?.length||0)>=t.length&&t.length>=500?i:null}function YD(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function zb(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(o=>e.articleChildTags.includes(o.nodeName)).length>=e.articleChildTagsNum)return t;for(let o=0;o{let k=H(B);return k==NodeFilter.FILTER_ACCEPT?xt.mark(B,M,y):k==NodeFilter.FILTER_REJECT,k}),N=T;if(H(N)===NodeFilter.FILTER_REJECT)return;for(xt.mark(N,M,y);N;){if(s=_p(o,N),c&&c.length>0){let{currentNode:B,isMatchedSelection:k}=A(O,N,c);if(B)N=B;else break;if(!k)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let B=N;if(B.nodeName==="IFRAME"){j&&j(B),P(),Mp(C,!0),N=O.nextNode();continue}B.nodeType===Node.ELEMENT_NODE&&(l&&Fp(B,l),f&&Rp(B,f));let k=ka(B,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},B.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&B.childNodes.length==1&&B.childNodes[0].nodeType===Node.TEXT_NODE&&B.innerText?.length==1&&B?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),un(B,u)&&!k){w(B);let q=null;for(;!(q=O.nextSibling())&&O.parentNode(););N=q;continue}let _=ko(B);if(!qb(C,B)||k){P(B);let q=k?B:B.parentElement;q&&q.childNodes.length>0&&v(C,q,q.immersiveTranslateComputedStyle||null)}_&&B.shadowRoot?.mode==="open"&&(k?j?.(B.shadowRoot):S({...D,container:B.shadowRoot})),B.nodeType===Node.ELEMENT_NODE&&B.nodeName==="PRE"&&g&&tk(B)}else if(N.nodeType===Node.TEXT_NODE)w(N);else throw new Error("should not be here");N=O.nextNode(),C.commonAncestorContainer&&N&&N.parentNode===C.commonAncestorContainer&&(C._currentStacks=[]),C.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&C._currentStacks.push(N)}function H(B){if(B.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(na(B)){if(f){let q=Object.keys(f);if(q.length>0&&un(B,q))for(let V of q){let K=f[V];if(B.matches(V)){let oe=f[V],te=Object.keys(oe);for(let Z of te){let ce=oe[Z];B.getAttribute(Z)!==ce&&(ce===null?B.removeAttribute(Z):B.setAttribute(Z,ce))}break}}}if(!D.force&&xt.isMarked(B,M)||$1(B,M)||K0(B,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||B.nodeName==="IFRAME"&&!xi(B))return NodeFilter.FILTER_REJECT;if(B.nodeType===Node.ELEMENT_NODE){let q=window.getComputedStyle(B);if(B.immersiveTranslateComputedStyle=q,Bp(q))return R&&R(B),NodeFilter.FILTER_REJECT;let z=ka(B,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},q||null);if(un(B,u)&&z)return NodeFilter.FILTER_REJECT}let k=B.getBoundingClientRect(),{width:_,height:F}=k;return B.nodeName==="IMG"&&(_>48&&F>48?B.immersiveTranslateComputedStyle={display:"block"}:_>0&&F>0&&h!==!1&&(B.setAttribute("width",_),B.setAttribute("height",F))),!B.childNodes||B.childNodes&&B.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!C.isPreWhitespace&&(_>0&&_<4||F>0&&F<4)&&(B.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(B.nodeType===Node.TEXT_NODE){let k=B.textContent?.trim();if(!k)return C.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=B.parentNode;if(_.getBoundingClientRect){let{width:F,height:q}=_.getBoundingClientRect();if(F>0&&F<4||q>0&&q<4)return NodeFilter.FILTER_REJECT}return p>0&&k.length>=p&&Pp(B,p),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}S(e),C&&C.commonAncestorContainer&&C.flatNodes.length>0&&P();function A(D,T,j){let R=T.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(T))if(b=!1,T&&T.nodeType===Node.ELEMENT_NODE)if(V0(T,j))b=!0,x=T,P(),v(C,x,R);else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b}}else if(T&&T.nodeType===Node.ELEMENT_NODE)if(V0(T,j))b=!0,x=T,P(),v(C,x,R);else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};return{currentNode:T,isMatchedSelection:!0}}function P(D){if(D&&D.nodeName==="BR"){C.commonAncestorContainer=D.parentNode;let j=[...C.flatNodes],R=C.flatNodes.filter(M=>D.parentNode?.contains(M));R.length>0&&j.length!=R.length&&(C.flatNodes=R,C.flatNodes.original=j)}let T=ek(C,a,n);T&&(T.xpath=G1(r,s,T.commonAncestorContainer,o),t&&t(T)),Mp(C)}function w(D){if(!qb(C,D)){P(),Mp(C);let T=D.parentNode;T&&v(C,T,T.computedStyle)}C.flatNodes.push(D)}function v(D,T,j){D.commonAncestorContainer=T;let R=L(j);D.isPreWhitespace=R}function L(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function qb(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=ko(t));let r=XD(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function QD(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function ZD(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Fp(e,t){if(t){let n=Object.keys(t);if(n.length>0&&un(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=e.style.cssText||"";i&&(i=i.trim()),i&&!i.endsWith(";")&&(i+=";"),e.style.cssText=i+o;break}}}}function XD(e){return e&&e._currentStacks?e._currentStacks.some(t=>ko(t)):!1}function ek(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(f=>f.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let i=nk(r,a,n);i||(i=a);let s=[];for(let f of r){let h=ZD(e,i,f);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,p=0;for(;g&&(c.push(g),g!==l);){if(p++,p>JD){I.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:i,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function Mp(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Bp(e){return e.display==="none"}var xt={_marked_key:E2,isMarked(e,t){return tm(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||ko(e)))return i0(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||ko(e)))return yt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=Si(e,"markWalk")||"";return yt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||ko(e)):!1}};function tk(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function nk(e,t,n){if(!e.length)return null;let r=e.map(a=>{let o=new Set;for(;(a=a.parentNode)&&(o.add(a),a!==t););return o});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(In(a,n.atomicBlockSelectors))continue;if(r.every(o=>o.has(a)))return a}return null}function Pp(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let o=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((i,s)=>{let u=n.lastIndexOf(s,t);return u>i?u:i},-1);if(o>1){let i=n[o-1]||"",s=n[o-2]||"",u=n[o+1]||"";i==="."||u==="."||u===")"||s==="."&&i==="S"||s.toUpperCase()==="M"&&(i.toUpperCase()==="R"||i.toUpperCase()==="S")?o=-1:isNaN(Number(i))||(o=-1)}if(o===-1)n.length>t+20&&Pp(e,t+20);else{let i=n.slice(o+1);if(!i.trim())return;o++,i.startsWith(" ")&&o++,e.immersive=!0;let s=e.splitText(o);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),o+10)for(let r of n){let a=t[r],o=Object.keys(a),i=n9(e,[r]);for(let s of i)for(let u of o){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function $b(e,t,n,r,a,o,i){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let p of c){let f=l[p];if(p==="translate"&&f==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||rk(g,a,o,i)||!a9(y,n,r))continue}g.getAttribute(p)!==f&&(f===null?g.removeAttribute(p):g.setAttribute(p,f))}}}function Rp(e,t){if(t){let n=Object.keys(t);if(n.length>0&&un(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=t[a],s=Object.keys(i);for(let u of s){let l=i[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function K0(e,t){return un(e,t.excludeSelectors||[])?un(e,t.selectors||[])?!1:!un(e,t.stayOriginalSelectors||[]):!1}function V0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return un(e,t.concat(n))}function rk(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,o=>o.nodeType===Node.ELEMENT_NODE&&K0(o,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let o=a.currentNode;if(o.nodeType===Node.TEXT_NODE&&parent){let i=o.textContent||"";if(i.includes("Copyright"))continue;if(r0(i,t,n))return!0}}return!1}m();function Vb(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Il)||Ip(e).catch(o=>{I.error("translateTitle error:",o.name,o.message,o.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var G0="";async function Ip(e){let t=document.title;if(!t||t.includes(Il))return;G0!==t&&(G0=t);let n=await Oe({text:t,pageLangs:[Mt(),"en"]});if(!Ci(e,n))try{let r=await Mr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+Il+G0)}catch(r){throw r}}function Kb(e){e.rule.isTranslateTitle&&(document.title=G0)}function Ki(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function yn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,o=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(o),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var ak={sanitize:e=>e};function jp(e,t){if(e.interruptEffectDOM)return;let n=yn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Io.bind(null,e),onFrame:r=>{Np(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),di&&yt(t,"consumeContainer",e.id)}function Np(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!xi(t))return;I.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Ro(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else I.debug("onFrame shadowRoot",t.host),Ro(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ro(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=yn(t.ctx),o=0;if(u(t,e,n))return;if(na(e)&&s(e)){i(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(na(c)&&(r&&Fp(c,r),a&&Rp(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(i(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){i(g);continue}else break}if(!l.parentNode())return}}}catch{}if(o==0&&e instanceof HTMLElement){i(e);return}return t.observeContainers;function i(l){xt.clearMark(l),o++,t.immediateTranslateCapacity>=0?jp(t,l):(di&&yt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Np(t,l.shadowRoot,n),!1;if(c==="iframe")return Np(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return V0(l,g.selectors);if(g.pageHeight){let p=l.scrollHeight;if(p>0&&p0)return!0}return!1}function u(l,c,g){if(Hb(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let f=yn(l.ctx);return!!K0(c,{excludeSelectors:f.excludeSelectors,selectors:f.selectors,stayOriginalSelectors:f.stayOriginalSelectors})}}function Du(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),o=r.contains(e.targetNodes[0]);if(a&&o)n="dual";else if(a)n="original";else if(o)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(Y0(e.rootNodes),Yb(e.commonAncestorContainer)),n=="original"&&t=="translation"){let i=Op(e.rootNodes);if(Y0(e.rootNodes),Gb(i))return;Gi(i,r,e.targetNodes||[]),Yb(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let i=e.targetNodes[0];Gi(i,r,e.rootNodes||[]),Jb(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let i=Op(e.rootNodes);if(Gb(i))return;Gi(i,r,e.targetNodes||[]),Jb(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let i=Op(e.targetNodes);Y0(e.targetNodes),Gi(i,r,e.rootNodes||[])}n=="dual"&&t=="original"&&Y0(e.targetNodes),qp(e)}catch(i){I.error(i)}}}function Gb(e){return!e||!na(e)?!1:e.classList.contains(Lt)}function Yb(e){if(!na(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{yt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function Jb(e){if(!na(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Si(r,"immersiveTranslateClassBak");i0(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Op(e){return e?e[e.length-1].nextSibling:null}function Y0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function Gi(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var ok=ys(J0,300);async function Io(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||ik(t.rootNodes)||t.stepState>=2)return;t.stepState=2,di&&yt(a,"onParseParagraph",e.id);let{ctx:o}=e,{rule:i}=o,s=Ao(o),u=m0(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:gk(o)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=o?.config?.translationLanguagePattern?.excludeMatches||[],c=await zp(o,t,{excludeLanguages:n?[]:l,targetLanguage:o.targetLanguage,noTranslateRegexp:o.rule.noTranslateRegexp,delimiters:Lr(o.config.translationServices[o.translationService]),minTextCount:n||o.state.translationArea==="body"?3:i.paragraphMinTextCount,minWordCount:i.paragraphMinWordCount,isDetectParagraphLanguage:i.detectParagraphLanguage||o.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:o.rule.ignoreZhCNandZhTW});if(c){if(I.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),sk(e,t.text),Hp(e,t,r)):(di&&yt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function ik(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?na(t)&&t.classList.contains(Lt):!1}function sk(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function Hp(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),di&&yt(t.commonAncestorContainer,"consumeParagraph",e.id),yt(t.commonAncestorContainer,S2,"1",!0),n=="hover"){J0.call(e,e.ctx);return}ok.call(e,e.ctx)}async function J0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await st(r,t,(a,o,i)=>{let s=i.id,u=uk(e,s.toString());u&&lk.call(null,a,o,i,u,t,n)})}catch(a){I.error("translateCurrentQueue error",a);return}}function uk(e,t){return e.find(n=>n.id===t)}function lk(e,t,n,r,a,o){let i=!1,s=r;if(Ti(s.commonAncestorContainer,n.id)?.remove(),qp(r),s&&(e||!t)){e||(I.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);yt(c,A2,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(Gi(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let p=ck(a,e).replaceAll(` +
`}).join("");return d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:i("subtitle")})}),d(Vi,{image:yr("images/dual_subtitle_intro.png"),nightImage:yr("images/dual_subtitle_intro_night.png"),title:i("intro.subtitleTitle"),description:i("intro.subtitleDescription")+g}),d("div",{class:"nav",children:[d(we,{title:i("autoEnableSubtitle"),description:i("subtitle.autoEnableSubtitleDescription")}),d("label",{for:"subtitle.autoEnableSubtitle",children:d("input",{type:"checkbox",id:"subtitle.autoEnableSubtitle",name:"subtitle.autoEnableSubtitle",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],autoEnableSubtitle:f}}}))},checked:s.generalRule.subtitleRule.autoEnableSubtitle})})]}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.humanSubtitlesPreferred"),description:i("subtitle.humanSubtitlesPreferredDescription")}),d("label",{for:"subtitle.humanSubtitlesPreferred",children:d("input",{type:"checkbox",id:"subtitle.humanSubtitlesPreferred",name:"subtitle.humanSubtitlesPreferred",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],humanPreferred:f}}}))},checked:s.generalRule.subtitleRule.humanPreferred})})]}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.preTranslation"),description:i("subtitle.preTranslationDescription")}),d("label",{for:"subtitle.preTranslation",children:d("input",{type:"checkbox",id:"subtitle.preTranslation",name:"subtitle.preTranslation",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],preTranslation:f}}}))},checked:s.generalRule.subtitleRule.preTranslation})})]}),d($a,{title:i("youtubeService"),config:s,ctx:u,description:i("videoSubtitleTranslationDescription"),serviceType:"subtitleTranslateService"}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.showQuickButton"),description:i("subtitle.showQuickButtonDescription")}),d("label",{for:"subtitle.showQuickButton",children:d("input",{type:"checkbox",id:"subtitle.showQuickButton",name:"subtitle.showQuickButton",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],showQuickButton:f}}}))},checked:s.generalRule.subtitleRule.showQuickButton})})]}),d(WD,{translationMode:s.generalRule.subtitleRule.translationMode,setSettings:n}),d("div",{class:"nav",children:[d(we,{title:i("subtitle.disabledSubtitle"),description:i("subtitle.disabledSubtitleDescription")}),d("label",{for:"subtitle.disabledSubtitle",children:d("input",{type:"checkbox",id:"subtitle.disabledSubtitle",name:"subtitle.disabledSubtitle",role:"switch",onChange:p=>{let f=p.target.checked;n(h=>({...h,generalRule:{...h.generalRule,"subtitleRule.add":{...h.generalRule?.["subtitleRule.add"],disabled:f}}}))},checked:s.generalRule.subtitleRule.disabled})})]}),d("div",{className:"intro-footer",dangerouslySetInnerHTML:{__html:i("intro.subtitleDescription")+"
"+g}})]})})}function WD(e){let{t}=W(),n=["inherit","dual","translation"];return d("div",{class:"nav",children:[d(we,{title:t("subtitle.transitionMode"),description:t("subtitle.transitionModeDescription")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),e.setSettings(a=>({...a,generalRule:{...a.generalRule,"subtitleRule.add":{...a.generalRule?.["subtitleRule.add"],translationMode:r.target.value}}}))},children:n.map(r=>d("option",{value:r,selected:e.translationMode==r,children:t(`transitionMode.${r}`)},r))})]})}m();var Ob=fs({presets:[Zu(),el()]});m();var Nb="G-MKMD9LWFTR";async function pt(e,t,n){try{let r=Zs(),a=Pe(),o=a.INSTALL_FROM==="firefox_store";r?.name?.startsWith("ImtFx")&&(o=!1);let i=me(),s=ot(),u=a.PROD==="1",l=`report_${e}`,c=e.endsWith("_daily");if(c){if(s)return;let D=await Xr(l,0),T=$0(new Date(D)),j=Date.now(),R=$0(new Date(j));if(T===R)return;await S1(l,j)}else if(!n.config.telemetry)return;let g="sitc4WmvShWYwfU0dANM3Q",p=await jt("fakeUserId","");p||(p=await Xr("fakeUserId",""),p&&await at("fakeUserId",p));let f=Zn(),h=new Date,y=await jt("installedAt","");y||(y=await Xr("installedAt",""),y&&await at("installedAt",y)),p?y||(y=new Date(0).toISOString(),await at("installedAt",y)):(p=$D(32),await at("fakeUserId",p)),y||(y=h.toISOString(),await at("installedAt",y));let C=new Date(y),b=$0(C),x=$0(h),S=b===x,A=h.getTime()-C.getTime()<7*24*60*60*1e3,P=`https://www.google-analytics.com/mp/collect?measurement_id=${Nb}&api_secret=${g}`;u||(P=`https://www.google-analytics.com/debug/mp/collect?measurement_id=${Nb}&api_secret=${g}`);let w=ti.parse(window.navigator.userAgent),v=t.map(D=>{let T=D.params||{};if(w.os&&(T.os_name=w.os.name||"unknown",T.os_version=w.os.version||"unknown",T.os_version_name=w.os.versionName||"unknown"),w.browser&&(T.browser_name=w.browser.name||"unknown",T.browser_version=w.browser.version||"unknown",r&&(T.browser_name=r.name,T.browser_version=r.version)),w.platform&&(T.platform_type=w.platform.type||"unknown"),w.engine&&(T.engine_name=w.engine.name||"unknown",T.engine_version=w.engine.version||"unknown"),n.translationService&&(T.translation_service||(T.translation_service=n.translationService),n.config.translationServices&&n.config.translationServices[n.translationService]&&(n.config.translationServices[n.translationService].provider&&(T.translation_service_provider=n.config.translationServices[n.translationService].provider),n.translationService==="openai"&&n.config.translationServices[n.translationService].provider==="custom"&&(n.config.translationServices[n.translationService].apiUrl?n.config.translationServices[n.translationService].apiUrl.startsWith("https://api.openai.com/")?T.openai_is_official="1":T.openai_is_official="0":T.openai_is_official="1"))),n.targetLanguage&&(T.target_language=n.targetLanguage),n.config.interfaceLanguage&&(T.interface_language=n.config.interfaceLanguage),n.config.enableDefaultAlwaysTranslatedUrls?T.enable_default_always_translated_urls=n.config.enableDefaultAlwaysTranslatedUrls?"1":"0":T.enable_default_always_translated_urls="0",f&&(T.version=f),n.config.enableInputTranslation?T.enable_input_translation=n.config.enableInputTranslation?"1":"0":T.enable_input_translation="0",n.config.translationTheme&&(T.translation_theme=n.config.translationTheme),n.config.alpha&&(T.alpha=n.config.alpha.toString()),n.config.translationLanguagePattern&&n.config.translationLanguagePattern.matches?.length>0?T.always_translate_languages=n.config.translationLanguagePattern.matches.join(","):T.always_translate_languages="none",a.INSTALL_FROM&&(T.install_from=a.INSTALL_FROM),n.config.beta&&(T.beta=n.config.alpha.toString()),n.config.translationArea&&(T.translation_area=n.config.translationArea),b&&(T.install_day=VD(C)),n.user){let R=h1(n.user);R&&Object.keys(R).forEach(M=>{T[M]=R[M]})}else T.user_type="anonymous";n.config.translationMode&&(T.translation_mode=n.config.translationMode),T.userscript=i.toString(),S?T.is_new_user_today="1":T.is_new_user_today="0",A?T.is_new_user_this_week="1":T.is_new_user_this_week="0",n.config.tempTranslateDomainMinutes?T.temp_translate_domain_minutes=n.config.tempTranslateDomainMinutes.toString():T.temp_translate_domain_minutes="0";let j="html";if(n.rule.pageType&&(j=n.rule.pageType),T.page_type=j,s?T.main_frame=0:T.main_frame=1,!c){let R=n.url;try{let M=new URL(R);T.site_host=M.hostname}catch{T.site_host="unknown"}n.sourceLanguage&&(T.source_language=n.sourceLanguage)}return{...D,params:T}});if(o)return;let L=await de({responseType:"text",url:P,method:"POST",body:JSON.stringify({client_id:p,user_id:p,events:v})})}catch{}}function $D(e){let t="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,a=0;for(;a{let[f,h]=$(!1),y=We(null),C=We(null),b=()=>{u||!l&&it().any||(y.current&&clearTimeout(y.current),y.current=setTimeout(()=>{h(!0),p?.()},s))},x=()=>{it().any&&(C.current&&clearTimeout(C.current),C.current=setTimeout(()=>{S()},2e3))},S=()=>{y.current&&(clearTimeout(y.current),g?.()),h(!1)},A=Re(()=>{let P={position:"absolute",padding:"6px 20px",backgroundColor:"#000000",color:"#ffffff",borderRadius:"8px",whiteSpace:"nowrap",fontSize:"14px",zIndex:1e3};switch(o&&(P.maxWidth="200px",i&&(P.width=i+"px"),P.whiteSpace="normal"),n){case"top":return{...P,bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"10px",...c};case"bottom":return{...P,top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"10px",...c};case"left":return{...P,right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"10px",...c};case"right":return{...P,left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"10px",...c};default:return{}}},[n,o,i,c]);return d("div",{class:a,style:{position:"relative",pointerEvents:"all",display:"inline-block",...r},children:[d("div",{onMouseEnter:b,onMouseLeave:S,onTouchStart:()=>{l&&b()},onTouchEnd:()=>{l&&x()},children:t}),f&&d("div",{style:A,role:"tooltip",children:e})]})},tr=KD;m();m();m();m();m();function jb(e){let t=null,n=null,r=e.rule.bodyRule;if(!r.enable)return{bodyIsRoot:!1,bodyNode:t,articleNode:n};if(r.bodySelector&&(t=document.querySelector(r.bodySelector)),r.articleSelector&&(n=document.querySelector(r.articleSelector)),t||n)return I.debug("body rule has confirm"),{bodyIsRoot:a(),bodyNode:t,articleNode:n};if(document.body.scrollHeight>=window.innerHeight*r.maxBodyScreenLength)return I.debug("content dom elements too long"),{bodyIsRoot:!1,bodyNode:t,articleNode:n};try{let o=window.document.cloneNode(!0),s=new pl(o,{keepClasses:!0}).parse();if(!s)throw new Error("article is null");t=GD(s.content,s.textContent),t&&(n=zb(r,t))}catch(o){I.debug(o)}return{bodyIsRoot:a(),bodyNode:t,articleNode:n};function a(){return e.state.translationArea==="body"?!1:!!r.bodyIsRoot}}function Hb(e,t){if(!e.rule.bodyRule.articleSelector||t.nodeType!==Node.ELEMENT_NODE)return;let n=t.querySelector(e.rule.bodyRule.articleSelector);n&&(e.articleNode!=n&&I.debug("update article node",n),e.articleNode=n)}function Lp(e,t){return t&&e?.contains(t)||!1}function GD(e,t){let a=new DOMParser().parseFromString(e,"text/html").querySelectorAll("#readability-page-1 > div");if(a.length<=0)return null;let o=YD(a[0]),i=document.querySelector(o);return!i||(a.length>1&&(i=i.parentElement),i==document.documentElement)?null:(i?.textContent?.length||0)>=t.length&&t.length>=500?i:null}function YD(e){let t=e.tagName.toLowerCase();e.id&&(t+="#"+e.id),e.className&&(t+="."+e.className.trim().split(/\s+/).join("."));let n=Array.from(e.attributes).filter(r=>!["id","class","style"].includes(r.name)).map(r=>`[${r.name}="${r.value}"]`).join("");return t+n}function zb(e,t){if(t.nodeType!=Node.ELEMENT_NODE)return null;let n=null,r=Array.from(t.childNodes);if(r.filter(o=>e.articleChildTags.includes(o.nodeName)).length>=e.articleChildTagsNum)return t;for(let o=0;o{let k=H(B);return k==NodeFilter.FILTER_ACCEPT?xt.mark(B,M,y):k==NodeFilter.FILTER_REJECT,k}),N=T;if(H(N)===NodeFilter.FILTER_REJECT)return;for(xt.mark(N,M,y);N;){if(s=Lp(o,N),c&&c.length>0){let{currentNode:B,isMatchedSelection:k}=A(O,N,c);if(B)N=B;else break;if(!k)continue}if(N.nodeType===Node.ELEMENT_NODE||N.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let B=N;if(B.nodeName==="IFRAME"){j&&j(B),P(),_p(C,!0),N=O.nextNode();continue}B.nodeType===Node.ELEMENT_NODE&&(l&&Pp(B,l),f&&Bp(B,f));let k=ka(B,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},B.immersiveTranslateComputedStyle||null);if(k&&n.paragraphFirstLetterFontSize>0&&B.childNodes.length==1&&B.childNodes[0].nodeType===Node.TEXT_NODE&&B.innerText?.length==1&&B?.immersiveTranslateComputedStyle?.fontSize>=n.paragraphFirstLetterFontSize+"px"&&(k=!1),ln(B,u)&&!k){w(B);let q=null;for(;!(q=O.nextSibling())&&O.parentNode(););N=q;continue}let _=ko(B);if(!qb(C,B)||k){P(B);let q=k?B:B.parentElement;q&&q.childNodes.length>0&&v(C,q,q.immersiveTranslateComputedStyle||null)}_&&B.shadowRoot?.mode==="open"&&(k?j?.(B.shadowRoot):S({...D,container:B.shadowRoot})),B.nodeType===Node.ELEMENT_NODE&&B.nodeName==="PRE"&&g&&tk(B)}else if(N.nodeType===Node.TEXT_NODE)w(N);else throw new Error("should not be here");N=O.nextNode(),C.commonAncestorContainer&&N&&N.parentNode===C.commonAncestorContainer&&(C._currentStacks=[]),C.commonAncestorContainer&&N&&N.nodeType===Node.ELEMENT_NODE&&C._currentStacks.push(N)}function H(B){if(B.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return NodeFilter.FILTER_ACCEPT;if(na(B)){if(f){let q=Object.keys(f);if(q.length>0&&ln(B,q))for(let V of q){let K=f[V];if(B.matches(V)){let oe=f[V],te=Object.keys(oe);for(let Z of te){let ce=oe[Z];B.getAttribute(Z)!==ce&&(ce===null?B.removeAttribute(Z):B.setAttribute(Z,ce))}break}}}if(!D.force&&xt.isMarked(B,M)||$1(B,M)||K0(B,{excludeSelectors:n.excludeSelectors,selectors:n.selectors,stayOriginalSelectors:u})||B.nodeName==="IFRAME"&&!xi(B))return NodeFilter.FILTER_REJECT;if(B.nodeType===Node.ELEMENT_NODE){let q=window.getComputedStyle(B);if(B.immersiveTranslateComputedStyle=q,Fp(q))return R&&R(B),NodeFilter.FILTER_REJECT;let z=ka(B,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},q||null);if(ln(B,u)&&z)return NodeFilter.FILTER_REJECT}let k=B.getBoundingClientRect(),{width:_,height:F}=k;return B.nodeName==="IMG"&&(_>48&&F>48?B.immersiveTranslateComputedStyle={display:"block"}:_>0&&F>0&&h!==!1&&(B.setAttribute("width",_),B.setAttribute("height",F))),!B.childNodes||B.childNodes&&B.childNodes.length===0?NodeFilter.FILTER_ACCEPT:!C.isPreWhitespace&&(_>0&&_<4||F>0&&F<4)&&(B.textContent?.trim().length||0)<2?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}else if(B.nodeType===Node.TEXT_NODE){let k=B.textContent?.trim();if(!k)return C.isPreWhitespace?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;let _=B.parentNode;if(_.getBoundingClientRect){let{width:F,height:q}=_.getBoundingClientRect();if(F>0&&F<4||q>0&&q<4)return NodeFilter.FILTER_REJECT}return p>0&&k.length>=p&&Mp(B,p),NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_REJECT}}S(e),C&&C.commonAncestorContainer&&C.flatNodes.length>0&&P();function A(D,T,j){let R=T.immersiveTranslateComputedStyle||null;if(x){if(!x.contains(T))if(b=!1,T&&T.nodeType===Node.ELEMENT_NODE)if(V0(T,j))b=!0,x=T,P(),v(C,x,R);else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b}}else if(T&&T.nodeType===Node.ELEMENT_NODE)if(V0(T,j))b=!0,x=T,P(),v(C,x,R);else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};else return b=!1,T=D.nextNode(),{currentNode:T,isMatchedSelection:b};return{currentNode:T,isMatchedSelection:!0}}function P(D){if(D&&D.nodeName==="BR"){C.commonAncestorContainer=D.parentNode;let j=[...C.flatNodes],R=C.flatNodes.filter(M=>D.parentNode?.contains(M));R.length>0&&j.length!=R.length&&(C.flatNodes=R,C.flatNodes.original=j)}let T=ek(C,a,n);T&&(T.xpath=G1(r,s,T.commonAncestorContainer,o),t&&t(T)),_p(C)}function w(D){if(!qb(C,D)){P(),_p(C);let T=D.parentNode;T&&v(C,T,T.computedStyle)}C.flatNodes.push(D)}function v(D,T,j){D.commonAncestorContainer=T;let R=L(j);D.isPreWhitespace=R}function L(D){return D&&D.whiteSpace&&D.whiteSpace.startsWith("pre")||D&&D.whiteSpace==="break-spaces"||!1}}function qb(e,t){let n=!1;(t.nodeType===Node.ELEMENT_NODE||t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)&&(n=ko(t));let r=XD(e),a=!0;return!n&&!r&&(e.commonAncestorContainer&&e.commonAncestorContainer.contains(t)?a=!0:e.commonAncestorContainer&&(a=!1,e._currentStacks=[])),a}function QD(e){let{isTransformPreTagNewLine:t}=e;return e.excludeSelectors=e.excludeSelectors.filter(n=>{let r=n!=="iframe";return t?r&&n!=="pre":r}),e}function ZD(e,t,n){if(t){for(let r of t.childNodes)if(r.contains(n))return r}return e._currentStacks.length>0?(e.commonAncestorContainer||(e.commonAncestorContainer=e._currentStacks[0]),e._currentStacks[0]):null}function Pp(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=e.style.cssText||"";i&&(i=i.trim()),i&&!i.endsWith(";")&&(i+=";"),e.style.cssText=i+o;break}}}}function XD(e){return e&&e._currentStacks?e._currentStacks.some(t=>ko(t)):!1}function ek(e,t,n){let{flatNodes:r,commonAncestorContainer:a}=e;if(a&&r.length>0){if(!r.map(f=>f.textContent?.trim()||"").join(""))return null;if(r.length===1)return{ctxId:t,stepState:1,commonAncestorContainer:r[0].parentNode,rootNodes:[r[0]],flatNodes:r,isPreWhitespace:e.isPreWhitespace,variables:{},xpath:""};let i=nk(r,a,n);i||(i=a);let s=[];for(let f of r){let h=ZD(e,i,f);h&&(s.includes(h)||s.push(h))}if(s.length<1)return null;let u=s[0],l=s[s.length-1],c=[],g=u,p=0;for(;g&&(c.push(g),g!==l);){if(p++,p>JD){I.warn("loop too many times for convert root nodes, break");break}g=g.nextSibling}return{ctxId:t,rootNodes:c,stepState:1,flatNodes:r,commonAncestorContainer:i,variables:{},isPreWhitespace:e.isPreWhitespace,xpath:""}}else return null}function _p(e,t=!1){e.rootNodes=[],e.flatNodes=[],e._currentStacks=[],t&&(e.commonAncestorContainer=null)}function Fp(e){return e.display==="none"}var xt={_marked_key:E2,isMarked(e,t){return em(e,this._marked_key,t)},clearMark(e){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||ko(e)))return i0(e,this._marked_key)},clearToParentMark(e,t){let n=e;for(;n&&t&&n!=t;)xt.clearMark(n),n=n.parentElement},mark(e,t,n){if(!(!e||e.nodeType!==Node.ELEMENT_NODE)&&!(e instanceof HTMLIFrameElement||ko(e)))return yt(e,this._marked_key,t,!1,n)},markWalk(e,t,n){if(!e||e.nodeType!==Node.ELEMENT_NODE||this.isSkipMarkEle(e))return;let r=Si(e,"markWalk")||"";return yt(e,"markWalk",r+","+t,!1,n)},isSkipMarkEle(e){return e?!!(e instanceof HTMLIFrameElement||ko(e)):!1}};function tk(e){let n=e.innerHTML.replace(/\n\n/g,"
");e.innerHTML=n}function nk(e,t,n){if(!e.length)return null;let r=e.map(a=>{let o=new Set;for(;(a=a.parentNode)&&(o.add(a),a!==t););return o});for(let a of r[0])if(a.nodeType===Node.ELEMENT_NODE||a.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(In(a,n.atomicBlockSelectors))continue;if(r.every(o=>o.has(a)))return a}return null}function Mp(e,t){let n=e.textContent||"";if(n.trim().length<=t)return;let o=[". ","? ","! ","\u3002","\uFF1F","\uFF01",`.${String.fromCharCode(160)}`].reduce((i,s)=>{let u=n.lastIndexOf(s,t);return u>i?u:i},-1);if(o>1){let i=n[o-1]||"",s=n[o-2]||"",u=n[o+1]||"";i==="."||u==="."||u===")"||s==="."&&i==="S"||s.toUpperCase()==="M"&&(i.toUpperCase()==="R"||i.toUpperCase()==="S")?o=-1:isNaN(Number(i))||(o=-1)}if(o===-1)n.length>t+20&&Mp(e,t+20);else{let i=n.slice(o+1);if(!i.trim())return;o++,i.startsWith(" ")&&o++,e.immersive=!0;let s=e.splitText(o);s.immersive=!0;let u=document.createElement("br");u.immersive=!0,s.parentNode?.insertBefore(u,s),o+10)for(let r of n){let a=t[r],o=Object.keys(a),i=n9(e,[r]);for(let s of i)for(let u of o){let l=a[u];s.getAttribute(u)!==l&&(l===null?s.removeAttribute(u):s.setAttribute(u,l))}}}function $b(e,t,n,r,a,o,i){let s=Object.keys(t);if(s.length>0)for(let u of s){let l=t[u],c=Object.keys(l),g=e.querySelector(u);if(g)for(let p of c){let f=l[p];if(p==="translate"&&f==="no"){let y=g.innerText||g.textContent||"";if(!y.trim()||rk(g,a,o,i)||!a9(y,n,r))continue}g.getAttribute(p)!==f&&(f===null?g.removeAttribute(p):g.setAttribute(p,f))}}}function Bp(e,t){if(t){let n=Object.keys(t);if(n.length>0&&ln(e,n))for(let a of n){let o=t[a];if(e.matches(a)){let i=t[a],s=Object.keys(i);for(let u of s){let l=i[u];e.getAttribute(u)!==l&&(l===null?e.removeAttribute(u):e.setAttribute(u,l))}break}}}}function K0(e,t){return ln(e,t.excludeSelectors||[])?ln(e,t.selectors||[])?!1:!ln(e,t.stayOriginalSelectors||[]):!1}function V0(e,t){if(t.length===0)return!1;let n=t.filter(r=>!r.endsWith("*")).map(r=>r+" *");return ln(e,t.concat(n))}function rk(e,t,n,r){let a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,o=>o.nodeType===Node.ELEMENT_NODE&&K0(o,{excludeSelectors:r.excludeSelectors,selectors:r.selectors,stayOriginalSelectors:r.stayOriginalSelectors})?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT);for(;a.nextNode();){let o=a.currentNode;if(o.nodeType===Node.TEXT_NODE&&parent){let i=o.textContent||"";if(i.includes("Copyright"))continue;if(r0(i,t,n))return!0}}return!1}m();function Vb(e){let t=document.querySelector("title"),n;return t&&(n=new MutationObserver(function(r){r.length>0&&(r[0].target.text.includes(Il)||Rp(e).catch(o=>{I.error("translateTitle error:",o.name,o.message,o.details||"")}))}),n.observe(t,{subtree:!0,characterData:!0,childList:!0})),n}var G0="";async function Rp(e){let t=document.title;if(!t||t.includes(Il))return;G0!==t&&(G0=t);let n=await Oe({text:t,pageLangs:[Mt(),"en"]});if(!Ci(e,n))try{let r=await Mr({id:0,url:e.url,text:t,from:n,to:e.targetLanguage,fromByClient:n,force:!0},e);r&&r.text&&(document.title=r.text+Il+G0)}catch(r){throw r}}function Kb(e){e.rule.isTranslateTitle&&(document.title=G0)}function Ki(e){return(e.config.rtlLanguages||["ar","arc","az","dv","he","ckb","fa","ur"]).includes(e.targetLanguage)}function yn(e){let t=e.rule.selectors,n=e.rule.excludeTags,r=e.rule.additionalExcludeTags,a=e.rule.excludeSelectors,o=e.rule.additionalExcludeSelectors;return e.state.translationArea==="body"&&(t=[],a=[]),{paragraphFirstLetterFontSize:e.rule.paragraphFirstLetterFontSize,globalStyles:e.rule.globalStyles,globalAttributes:e.rule.globalAttributes,selectors:t,atomicBlockSelectors:e.rule.atomicBlockSelectors,skipEditableCheck:e.rule.skipEditableCheck,lineBreakMaxTextCount:e.rule.lineBreakMaxTextCount,isTransformPreTagNewLine:e.rule.isTransformPreTagNewLine,excludeSelectors:n.concat(r).map(s=>s.toLowerCase()).filter(s=>s!=="code"&&s!=="img").concat(a).concat(o),blockSelectors:e.rule.allBlockTags.map(s=>s.toLowerCase()).concat(e.rule.extraBlockSelectors),extraBlockSelectors:e.rule.extraBlockSelectors,extraInlineSelectors:e.rule.extraInlineSelectors.concat(e.rule.additionalInlineSelectors),stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(s=>s.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}}var ak={sanitize:e=>e};function Up(e,t){if(e.interruptEffectDOM)return;let n=yn(e.ctx);e.walkContainer({id:e.id,container:t,articleNode:e.ctx.articleNode,filterRule:n,bodyRule:e.ctx.rule.bodyRule,onParagraph:Io.bind(null,e),onFrame:r=>{Op(e,r,!0)},onIgnoreElement:r=>{xt.mark(r,e.id,n.skipEditableCheck),e.ignoreResizeObserver?.observe(r)}}),di&&yt(t,"consumeContainer",e.id)}function Op(e,t,n){try{if(e.injectCssToDocument(t,e.ctx),t instanceof HTMLIFrameElement){if(!xi(t))return;I.debug("onFrame fragment",t);let r=t.contentWindow?.document.body;r&&(Ro(r,e,n),e.dynamicContainerObserver?.observe(r,{childList:!0,subtree:!0,characterData:!0}))}else I.debug("onFrame shadowRoot",t.host),Ro(t,e,n),e.dynamicContainerObserver?.observe(t,{childList:!0,subtree:!0,characterData:!0})}catch{}}function Ro(e,t,n=!0){let{globalStyles:r,globalAttributes:a}=yn(t.ctx),o=0;if(u(t,e,n))return;if(na(e)&&s(e)){i(e);return}try{let l=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,c=>(na(c)&&(r&&Pp(c,r),a&&Bp(c,a)),u(t,c,n)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT));for(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);l.nextNode();){xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck);let c=l.currentNode;if(s(c))for(i(c);;){if(l.nextSibling()){let g=l.currentNode;if(xt.mark(l.currentNode,t.id,t.ctx.rule.skipEditableCheck),s(g)){i(g);continue}else break}if(!l.parentNode())return}}}catch{}if(o==0&&e instanceof HTMLElement){i(e);return}return t.observeContainers;function i(l){xt.clearMark(l),o++,t.immediateTranslateCapacity>=0?Up(t,l):(di&&yt(l,"observeContainer",t.id),t.containerVisibleObserver?.unobserve(l),t.containerVisibleObserver?.observe(l))}function s(l){let c=l.nodeName.toLowerCase();if(l.shadowRoot)return Op(t,l.shadowRoot,n),!1;if(c==="iframe")return Op(t,l,n),!1;if(["script","#document-fragment","img"].includes(c))return!1;let g=t.containerRule;if(g.selectors&&g.selectors?.length>0)return V0(l,g.selectors);if(g.pageHeight){let p=l.scrollHeight;if(p>0&&p0)return!0}return!1}function u(l,c,g){if(Hb(l.ctx,c),c.nodeName.toLowerCase()=="script")return c.childNodes.length==0||c.childNodes.length==1&&c.childNodes[0].nodeType==Node.TEXT_NODE;if(c.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(c.nodeType!==Node.ELEMENT_NODE||g&&xt.isMarked(c,l.id))return!0;if(l.ctx.rule.isTransformPreTagNewLine&&c.nodeName==="PRE")return!1;let f=yn(l.ctx);return!!K0(c,{excludeSelectors:f.excludeSelectors,selectors:f.selectors,stayOriginalSelectors:f.stayOriginalSelectors})}}function ku(e,t){if(!e.targetNodes)return;let n=e.state||"original",r=e.commonAncestorContainer;if(!xt.isSkipMarkEle(r)&&!xt.isMarked(r,e.ctxId))return;let a=r.contains(e.rootNodes[0]),o=r.contains(e.targetNodes[0]);if(a&&o)n="dual";else if(a)n="original";else if(o)n="translation";else return;if(t!=n){e.state=t;try{if(n=="dual"&&t=="translation"&&(Y0(e.rootNodes),Yb(e.commonAncestorContainer)),n=="original"&&t=="translation"){let i=Ip(e.rootNodes);if(Y0(e.rootNodes),Gb(i))return;Gi(i,r,e.targetNodes||[]),Yb(e.commonAncestorContainer)}if(n=="translation"&&t=="dual"){let i=e.targetNodes[0];Gi(i,r,e.rootNodes||[]),Jb(e.commonAncestorContainer)}if(n=="original"&&t=="dual"){let i=Ip(e.rootNodes);if(Gb(i))return;Gi(i,r,e.targetNodes||[]),Jb(e.commonAncestorContainer)}if(n=="translation"&&t=="original"){let i=Ip(e.targetNodes);Y0(e.targetNodes),Gi(i,r,e.rootNodes||[])}n=="dual"&&t=="original"&&Y0(e.targetNodes),zp(e)}catch(i){I.error(i)}}}function Gb(e){return!e||!na(e)?!1:e.classList.contains(Lt)}function Yb(e){if(!na(e))return;e.querySelectorAll("font[class*=immersive-translate-target-translation]").forEach(r=>{yt(r,"immersiveTranslateClassBak",r.className),r.className="notranslate immersive-translate-target-dual immersive-translate-target-inner"});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.add("immersive-translate-state-dual")}function Jb(e){if(!na(e))return;e.querySelectorAll("font[class*=immersive-translate-target-dual]").forEach(r=>{let a=Si(r,"immersiveTranslateClassBak");i0(r,"immersiveTranslateClassBak"),r.className=a});let n=e.querySelector(".immersive-translate-target-wrapper");n&&n.classList.remove("immersive-translate-state-dual")}function Ip(e){return e?e[e.length-1].nextSibling:null}function Y0(e){(e||[]).forEach(t=>t.parentNode?.removeChild(t))}function Gi(e,t,n){let r=e;t&&(r?n.forEach(a=>{r.parentNode?.insertBefore(a,r)}):n.forEach(a=>{t.appendChild(a)}))}var ok=Cs(J0,300);async function Io(e,t,n=!1,r="web"){if(e.interruptEffectDOM)return;let a=t.commonAncestorContainer;if(a instanceof ShadowRoot||ik(t.rootNodes)||t.stepState>=2)return;t.stepState=2,di&&yt(a,"onParseParagraph",e.id);let{ctx:o}=e,{rule:i}=o,s=Ao(o),u=m0(t.flatNodes,{isPreWhitespace:t.isPreWhitespace||!1,delimiters:s,stayOriginalSelectors:gk(o)});if(!u)return;t.variables=u?.variables||{},t.text=u?.text;let l=o?.config?.translationLanguagePattern?.excludeMatches||[],c=await Hp(o,t,{excludeLanguages:n?[]:l,targetLanguage:o.targetLanguage,noTranslateRegexp:o.rule.noTranslateRegexp,delimiters:Lr(o.config.translationServices[o.translationService]),minTextCount:n||o.state.translationArea==="body"?3:i.paragraphMinTextCount,minWordCount:i.paragraphMinWordCount,isDetectParagraphLanguage:i.detectParagraphLanguage||o.state.isDetectParagraphLanguage,ignoreZhCNandZhTW:o.rule.ignoreZhCNandZhTW});if(c){if(I.debug("on paragraph",c.text,c),a.paragraphs=a.paragraphs||[],a.paragraphs.includes(c))return;a.paragraphs.push(c),e.immediateTranslateCapacity>0||n?(n&&(t.force=!0),sk(e,t.text),jp(e,t,r)):(di&&yt(a,"observeParagraph",e.id),e.observeParagraphs.push(c),e.paragraphVisibleObserver?.unobserve(a),e.paragraphVisibleObserver?.observe(a))}return c}function ik(e){if(!e)return!1;let t=e[e.length-1].nextSibling;return t?na(t)&&t.classList.contains(Lt):!1}function sk(e,t){e.ctx.state.translationStartMode!=="immediate"&&(e.immediateTranslateCapacity-=t?.length||0)}function jp(e,t,n="web"){if(e.interruptEffectDOM||t.stepState>=3)return;t.stepState=3;let r=e.autoIncreaseParagraphId++;if(t.id=r.toString(),e.paragraphEntities[r]=t,e.paragraphQueue.push(r.toString()),di&&yt(t.commonAncestorContainer,"consumeParagraph",e.id),yt(t.commonAncestorContainer,S2,"1",!0),n=="hover"){J0.call(e,e.ctx);return}ok.call(e,e.ctx)}async function J0(e){if(this.interruptEffectDOM)return;let t=this.paragraphQueue;this.paragraphQueue=[];let n=[];for(let r=0;r0)try{await et(r,t,(a,o,i)=>{let s=i.id,u=uk(e,s.toString());u&&lk.call(null,a,o,i,u,t,n)})}catch(a){I.error("translateCurrentQueue error",a);return}}function uk(e,t){return e.find(n=>n.id===t)}function lk(e,t,n,r,a,o){let i=!1,s=r;if(Ti(s.commonAncestorContainer,n.id)?.remove(),zp(r),s&&(e||!t)){e||(I.error("translate error",n,e,t),e=new Error("no response from server"));let{rule:u}=a,l=n.id,c=document.createElement(u.targetWrapperTag);yt(c,A2,l.toString()),c.classList.add("notranslate",Lt,Lt+"-error"),c.setAttribute("translate","no"),c.setAttribute("lang",a.targetLanguage);let g=r.rootNodes[r.rootNodes.length-1].nextSibling;if(Gi(g,r.commonAncestorContainer,[c]),s&&(s.error=e),c){let p=ck(a,e).replaceAll(` `,"").replaceAll('"',"""),f=e.message.replaceAll(` -`,"").replaceAll('"',"""),h=Ar(tn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Ar(tn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+f,C=Ar(tn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Ar(tn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> +`,"").replaceAll('"',"""),h=Ar(nn,"retryAllParagraphs",a.config.interfaceLanguage,"zh-CN"),y=Ar(nn,"errorTooltipTitle",a.config.interfaceLanguage,"zh-CN")+": "+f,C=Ar(nn,"error.retry",a.config.interfaceLanguage,"zh-CN"),b=Ar(nn,"error.reason",a.config.interfaceLanguage,"zh-CN"),x=`<${u.targetWrapperTag} class="${ee}-error notranslate"> <${u.targetWrapperTag} class="${ee}-error-wrapper"> @@ -5250,7 +5250,7 @@ ${s}} ${b} - `;c.innerHTML=tt.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S9(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),Ki(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(wr,"1");let g=ak.sanitize(l);c.innerHTML=g,r.targetNodes=[c],Du(r,o)}i=!0}else I.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:i}})}))}async function zp(e,t,n){let{text:r}=t,a=await Oe({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:o}=n;if(!ru({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=y0();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!jl.includes(e.translationService)&&(me()||We())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Sa(g,o,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Sa(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function ku(){Up=0}var Up=0;function ck(e,t){Up+=1;let n=t.message;if(t instanceof J){let r=t.uiConfig(e);if(n=JSON.stringify(r),Up!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(ho,{detail:r}))}return n}function qp(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,dk(t,`[${w2}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function dk(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function gk(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}m();m();async function Qb(){let e="auto",t=[kt(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Oe({text:Ei(document.body),pageLangs:t})),e}m();var mk=[];function Zb(e){mk.push(e)}m();var Wp;function Xb(e){let t=e.ctx.rule.aiRule;if(I.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=yn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(o=>{Au(e,o,t,r)}),Wp=new MutationObserver(o=>{o.forEach(function(i){for(let s of o)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&In(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||Vp(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Au(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!ka(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=vi(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Au(e,c,t,r));continue}Au(e,u,t,r)}catch(u){I.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(i=>{xt.isMarked(i,e.id)||Au(e,i,t,r)})}),Wp.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Au(e,t,n,r,a=!1){let o=t.closest(n.messageWrapperSelector);if(!o)return;let i=t;for(;i!=o;)clearTimeout(i.timer),i=i.parentElement;clearTimeout(o.timer);let s=t;s.timer=setTimeout(()=>{a&&$p(t),ia({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Io(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function ey(){Wp?.disconnect()}m();m();m();m();var pk=` + `;c.innerHTML=nt.sanitize(x)}}else if(r){if(s.error=void 0,r.targetText=t?.text||"",!(r.text?.trim().toLocaleLowerCase()==r.targetText?.trim().toLocaleLowerCase())){let l=S9(r,a),c=document.createElement(a.rule.targetWrapperTag);c.classList.add("notranslate",Lt),Ki(a)&&c.setAttribute("dir","rtl"),c.setAttribute("lang",a.targetLanguage),c.setAttribute(wr,"1");let g=ak.sanitize(l);c.innerHTML=g,r.targetNodes=[c],ku(r,o)}i=!0}else I.error("paragraph not found",n.id);document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:i}})}))}async function Hp(e,t,n){let{text:r}=t,a=await Oe({text:r||"",minLength:15,pageLangs:[Mt(),"en"],translateService:e.translationService}),{targetLanguage:o}=n;if(!au({text:r||"",delimiters:n.delimiters,minWordCount:n.minWordCount,minTextCount:n.minTextCount,noTranslateRegexp:n.noTranslateRegexp}))return null;let s=n.excludeLanguages||[],u=y0();n.isDetectParagraphLanguage&&(u="auto");let l=Mt(),c=a;c==="auto"&&!n.isDetectParagraphLanguage&&(c=l,!jl.includes(e.translationService)&&(me()||$e())&&(c="auto")),t.languageByLocal=c,t.languageByClient=u;let g=u!=="auto"?u:c;return Sa(g,o,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW})||s.length>0&&s.some(h=>Sa(g,h,{ignoreZhCNandZhTW:n.ignoreZhCNandZhTW}))?null:t}function Au(){Np=0}var Np=0;function ck(e,t){Np+=1;let n=t.message;if(t instanceof J){let r=t.uiConfig(e);if(n=JSON.stringify(r),Np!=e.rule.toastErrorMinTimes)return n;document.dispatchEvent(new CustomEvent(ho,{detail:r}))}return n}function zp(e){let t=e.commonAncestorContainer;if(!t.paragraphs?.length)return;t.recordLength=t.innerHTML.length,dk(t,`[${w2}]`).forEach(r=>{r.recordLength&&(r.recordLength=r.innerHTML.length)})}function dk(e,t){let n=e,r=[];for(;n.parentElement;){let a=n.parentElement.closest(t);if(a)r.push(a),n=a;else break}return r}function gk(e){return e.config?.translationServices?.[e.translationService]?.disableStaySelectors?[]:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(r=>r.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)}m();m();async function Qb(){let e="auto",t=[kt(),"en"];return document.body&&document.body.textContent&&document.body.textContent.trim()&&(e=await Oe({text:Ei(document.body),pageLangs:t})),e}m();var mk=[];function Zb(e){mk.push(e)}m();var qp;function Xb(e){let t=e.ctx.rule.aiRule;if(I.debug("aiRule",t),!t||!t.messageWrapperSelector)return;let n=e.ctx.rule,r=yn(e.ctx),a=r.excludeSelectors.indexOf(`${t.messageWrapperSelector} *`);r.excludeSelectors.splice(a,1),document.querySelectorAll(`${t.messageWrapperSelector} > *`).forEach(o=>{Lu(e,o,t,r)}),qp=new MutationObserver(o=>{o.forEach(function(i){for(let s of o)if(s.target.nodeType!=Node.COMMENT_NODE)try{if(n.mutationExcludeSelectors.length>0&&In(s.target,n.mutationExcludeSelectors))continue;let u=s.target;if(s.type=="characterData"&&(u=s.target.parentElement),!u.closest(t.messageWrapperSelector)||$p(s)&&s.type!="characterData")continue;if(u.recordLength){u.recordLength!==u.innerHTML.length&&Lu(e,u,t,r,!0);continue}if((s.addedNodes||[]).length<=0&&s.type!="characterData"||u.nodeType!==Node.ELEMENT_NODE)continue;if(!ka(u,{blockSelectors:r.blockSelectors,extraInlineSelectors:r.extraInlineSelectors,extraBlockSelectors:r.extraBlockSelectors,atomicBlockSelectors:r.atomicBlockSelectors},window.getComputedStyle(u))){let c=vi(r,u.parentElement);c&&(xt.clearToParentMark(u,c),Lu(e,c,t,r));continue}Lu(e,u,t,r)}catch(u){I.error(u)}}),document.querySelectorAll(`${t.messageWrapperSelector}`).forEach(i=>{xt.isMarked(i,e.id)||Lu(e,i,t,r)})}),qp.observe(document.body,{childList:!0,subtree:!0,characterData:!0})}function Lu(e,t,n,r,a=!1){let o=t.closest(n.messageWrapperSelector);if(!o)return;let i=t;for(;i!=o;)clearTimeout(i.timer),i=i.parentElement;clearTimeout(o.timer);let s=t;s.timer=setTimeout(()=>{a&&Wp(t),ia({id:e.id,container:t,filterRule:r,force:!0,onParagraph:u=>{Io(e,u,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),s.timer=null},n.streamingDelayTime||1e3)}function ey(){qp?.disconnect()}m();m();m();m();var pk=` .toastify { padding: 12px 20px; color: #ffffff; @@ -5333,21 +5333,21 @@ ${s}} max-width: fit-content; } } -`,Kp="immersive-translate-toastify-shadow-root",Gp=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Kp)){let t=document.getElementById(Kp);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Kp,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=pk,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,o=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${o})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),o;for(let i=0;i0?window.innerWidth:screen.width)<=360?(a[i].style[o]=`${r[o]}px`,r[o]+=s+u):a[i].classList.contains("toastify-left")===!0?(a[i].style[o]=`${t[o]}px`,t[o]+=s+u):(a[i].style[o]=`${n[o]}px`,n[o]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function Z0(e){e=e||{},new Gp({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}m();function ty(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}m();m();m();function Wn(e){Ia(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{I.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:Ml,payload:e},"*")});let n=new CustomEvent(Yr,{detail:e});globalThis.document.dispatchEvent(n)}function Yp(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((o,i)=>(o[t[i]]=i,o),{}),a=Object.keys(r);for(let o of a){let i=o.replace(/MacCtrl/ig,"Ctrl");i&&Ut(i,s=>{s.preventDefault();let u=r[o];Wn({method:u,data:{trigger:"shortcut"}})})}}m();m();m();m();var ny=`${ee}-float-ball`;function Va(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${ny}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${ny}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}m();m();function ry(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},o=Object.keys(n);for(let l of o){let g=n[l].matches;for(let p of g)a[p]||(a[p]=[]),a[p].push(l)}let i=a[e];if(i&&i.length>0)for(let l of i)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}m();m();var X0="DROP_DOWN_DEFAULT_VALUE";function Jp(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:o,style:i}=e;r=r||"",t=t??!0,o=o||80;let s=qe(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:X0,style:{maxWidth:`${o}px`,...i},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==X0){s.current.value=X0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:X0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}m();var fk=({date:e})=>{let{t}=W(),[n,r]=$(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},hk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},bk=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},yk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Qp(e){let{isShowError:t,request:n}=e,[r,a]=$(null),{t:o}=W(),[i,s]=$(null),[u,l]=$(null),[c,g]=$(""),[p,f]=$(!1),[h,y]=$(!1),[C,b]=$(!1),[x,S]=$(null),[A,P]=$(null),w=Zn(),v=async()=>{g("");let L=i;if(i===null)try{let D=await n({url:va});D?(s(D),L=D,f(!0)):(g(o("unknownError")),l(null))}catch(D){l(null),g(D.message);return}L!==null?(e.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(g(o("canNotFetchRemoteRule")),l(null))};return le(()=>{pt().then(L=>{let D=L.buildinConfigUpdatedAt;S(L);let T=new Date(D);if(a(D),w==="0.0.0"){b(!0);return}n({url:va}).then(j=>{let R=j,M=R.minVersion,O=w;s(R);let N=R.latestVersion;if(N&&(Fr(O,N)?P(!0):P(!1)),Fr(O,M)){let H=R.buildinConfigUpdatedAt;new Date(H)>T?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(j=>{l(null),g(j.message)})})},[]),le(()=>{pt().then(L=>{S(L)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:C?d(bk,{}):c?t===!1?null:d(yk,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(hk,{minVersion:i.minVersion}):u===null||u===!0?null:p?d(fk,{date:r}):null}):null}m();function Ck(){return navigator.userAgent.indexOf("Mac")!==-1}var ay={Alt:"\u2325"};function ec(e=""){return Ck()?Object.keys(ay).reduce((t,n)=>t.replace(n,ay[n]),e):e}m();function oy({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return ta(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Co:H2,children:[d("img",{src:t?xb:vb}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Co:q2,children:d("img",{src:n?Su:Cb})})]})}m();function iy({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let o=za(t.config.translationService,t.config.targetLanguage),i=Bn;o.length<=30&&(i=o.indexOf("auto")>=0?o:["auto",...o]);let s=o.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(Tk,{supportedLanguages:i,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Eb,style:{maxWidth:"unset"},class:"mx-2"}),d(vk,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function Tk(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:o=>{let i=o.target.value;i&&e.onSelected(i)},children:e.supportedLanguages.map((o,i)=>{let s=Jt(o,e.interfaceLanguage),u="";return o==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Jt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:o,selected:o===e.value,children:u||s},"selectlink"+i)})})]})}function vk(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Jt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}m();function sy(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=wk(e);return n.length?d(xe,{children:[d(uy,{class:"mt-3",label:t("popupService"),items:r}),d(xk,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function uy(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Pr,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xk({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=Sk(e),o=Ek(e),i=Ne((u,l)=>{t(c=>{let g=c.translationServices||{},p=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...p,[u]:l}}}})},[]),s=Re(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==o[u.name],onSelected:()=>{i(u.name,g.value)}}));return{label:l,items:c}}),[o]);return!o||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(uy,{class:"mt-2",label:u,items:l},"field-"+c))})}function Ek(e){return Re(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function Sk(e){return Re(()=>{let{translationService:n}=e.config;if(Qn[n])return hi("translationService",n,e)},[Qn,hi,e])}function wk({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:o,openOptionsPage:i}){let{t:s}=W(),u=Re(()=>t?vo(t,"translationService"):[],[vo,t]),l=Ne(g=>{let p=u.find(f=>f.id===g.value);if(p.ok){if(n(f=>({...f,translationService:p.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;p.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{o()},1)}else n(f=>({...f,translationService:p.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{i()},100)},[i,o,a,n]),c=Re(()=>{let g=We();return u.filter(f=>t.config.showUnconfiguredTranslationServiceInPopup===!1?f.ok:!0).map(f=>({label:`${s("translationServices."+f.id)}${f.ok?"":" "+(" "+(!e&&!g&&f.providers&&f.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:f.id,selected:f.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}m();m();function ly(e){let t;try{t=new URL(e)}catch{return!1}let n=X9(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(Dk(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function Dk(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}m();function cy(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function dy(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:o}=kk(e),[i,s]=$(()=>a?"excludeMatches":"matches"),u=Re(()=>r||a||!1,[r,a]),l=Ne(c=>{s(c),u&&o(c,n.hostname)},[s,o,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Pr,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:i==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:i==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;o(g?i:"default",n.hostname)}})]})}function kk({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:o,onTranslatePage:i,setSettings:s,onClose:u}){let l=null,c=null,g=null,p=null,f=null,{translationUrlPattern:h}=t.config;if(l=Re(()=>new URL(e||""),[e]),t.config&&e&&ly(e)){c=cy(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(S=>_t(e,S)),p=!!x.find(S=>_t(e,S))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?f=!0:f=!1}let y=Ne(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],S=x.filter(P=>P.match!==b),A=!1;S.length!==x.length&&(A=!0),A&&r({...t.localConfig,tempTranslationUrlMatches:[...S]})},[r]),C=Ne((b,x)=>{if(b==="default"){s(P=>{let w={...P.translationUrlPattern};return{...P,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...P.translationUrlPattern,matches:Zp(e,w.matches),excludeMatches:Zp(e,w.excludeMatches)}}}),y();return}let S=b,A=S==="matches"?"excludeMatches":"matches";l&&s(P=>{let w={...P.translationUrlPattern};return w[A]=Zp(e,w[A]),w[S]=Rn(x,w[S]),{...P,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...P.translationUrlPattern,...w}}}),S==="matches"&&a==="Original"?setTimeout(()=>{i(),u()},100):S==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{o(),u()},100)},[i,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:p,isAlwaysTranslateLang:f,handleTranslationUrlPatternSelected:C}}function Zp(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}m();function gy(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=Ak(e);return To(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Pr,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:o=>{let i=o.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Jr[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:i?u:"Off"}}})}})]}):null:d(Lk,{...e})}function Ak({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=Re(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),o=Re(()=>Jr.filter(s=>!(s==="Off"||Jr.includes(a)&&s==="OtherCustom")),[e,a]);return Re(()=>o.map(s=>{let u=r("mouseHoldKey",{key:ec(s)}),l=Jr.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(p=>{let f={...p.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(f.mouseHoverHoldKey=g.value),{...p,generalRule:f}})}}}),[o,a])}function Lk(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,o=Object.keys(Lu).filter(l=>l!="touchShortcutsOff"),i=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return i!=="touchShortcutsOff"&&i!==s&&(u=i),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Pr,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:o.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(p=>{let f={...p.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(f.touchShortcutsToggleTranslateTouchElement=g.value),{...p,generalRule:f}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let p=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?p:"touchShortcutsOff"}}})}})]})}m();function my(e){let{isAlwaysTranslateLang:t}=_k({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Jt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let o=a.target.checked;r(o?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:zt(e.currentLang,u.matches),excludeMatches:zt(e.currentLang,u.excludeMatches)}}});return}let o=a,i=o==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[o]=Rn(e.currentLang,u[o]),u[i]=zt(e.currentLang,u[i]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),o==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _k({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}m();m();var py=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),fy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),hy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),by=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),yy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Cy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Ty=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function xy({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Pe(),o=Math.round((yi.supportedVideoSubtitleSites||[]).length/10),i=Re(()=>[{title:r("widget.translateFile"),icon:py,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:fy,tooltipText:r("widget.videoSubtitleTooltip",{count:o*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:hy,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e($l)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:i.map(s=>s.tooltipText?d(tr,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(vy,{...s})}):d(vy,{...s}))})}function vy(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Xp(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:o,onAutoEnableSubtitleChanged:i}=e,[s,u]=$(""),[l,c]=$(o),[g,p]=$(null),[f,h]=$(null);le(()=>{gt.get(Tt,null).then(x=>{x?(p(x),h(Yt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,C=We();n&&C&&(y=n.generalRule.showSponsorOnSafari);let b=ta(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(oy,{isLogin:!!g,isProUser:!!f,config:n}),d(Ik,{openSharePage:r})]}),d(iy,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(sy,{isProUser:!!f,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(Pk,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(Bk,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Qp,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(dy,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(gy,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(my,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(Mk,{onAutoEnableSubtitleChanged:i,ctx:a,setSettings:t})]}),d(xy,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(Fk,{...e,isProUser:!!f,isShowPricing:y,setMessage:u})]})}function Mk(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return Re(()=>!n.rule.subtitleRule.disabled&&_g.includes(n.rule.subtitleRule.type||""),[n,_g])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:i=>{let s=i.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function Pk(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let o=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(o)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(tr,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?yy:Cy})})}function Fk(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:o}=e.ctx,i=60;n.startsWith("zh")||(i=70);let s=Pe(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[by,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(Rk,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Jp,{label:t("more"),showArrow:!0,maxWidth:i,className:"text-gray-6 transform-padding-left more",onSelected:f=>{f.value==="openPremium"?(globalThis.open(xa),e.onClose()):f.value==="changeToOnlyTranslationMode"?c("translation"):f.value==="changeToDualTranslationMode"?c("dual"):f.value==="translateTheWholePage"?e.onTranslateTheWholePage():f.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():f.value==="translateTheMainPage"?e.onTranslateTheMainPage():f.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):f.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):f.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):f.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):f.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):f.value==="donate"?(globalThis.open(o.donateUrl),e.onClose()):f.value==="feedback"?(globalThis.open(o.feedbackUrl),e.onClose()):f.value==="options"?(e.openOptionsPage(),e.onClose()):f.value==="changeToTranslateTheWholePage"?g():f.value==="changeToTranslateTheMainPage"?p():f.value==="about"?e.openAboutPage():f.value==="toggleEnabled"?e.onToggleEnabled():f.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):f.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):f.value==="goPro"&&e.onOpenUrl(xa,u)},menus:[o.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},o.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},o.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},o.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(f){f.preventDefault(),e.openOptionsPage()}function c(f){e.setSettings(h=>({...h,translationMode:f})),e.onSwitchTranslationMode(f)}function g(){e.setSettings(f=>({...f,translationArea:"body"})),e.onTranslateTheWholePage()}function p(){e.setSettings(f=>({...f,translationArea:"main"})),e.onTranslateTheMainPage()}}function Bk({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:o,noPermissionPDF:i}){let{t:s,lang:u}=W(),l=r.config,c=Re(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");Mo(r?.rule)&&!g&&(g=!0);let p=s("translate");t==="Translated"||t==="Error"?p=s("show-original"):t==="Original"?g?Zr()&&c.protocol==="file:"||i?p=s("translate-firefox-local-pdf"):me()?p=s("noSupportTranslate-pdf"):p=s("translate-pdf"):p=s("translate"):p=s(t);let f=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ea()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(p+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):p+=` (${ec(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(f+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:o||t==="Translating",children:p})}function Rk({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:o}=W(),i=Zn();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:wu(7)(s),children:["V",i,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function Ik(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),Ty]})}m();async function Ey(e){try{let t=new Date;I.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Q.storage.local.set({[M2]:t.toISOString()}),await Ok(),me()||await a6()}catch(t){I.error("run cron task failed",t)}}async function Ok(){try{let e=await er(),t=await de({url:va}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,o=new Date(a),i=t.minVersion,s=Q.runtime.getManifest().version;Fr(s,i)?o>r?(await Q.storage.local.set({buildinConfig:t}),I.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Ia({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{I.error("send content message request failed from cron task",u)})):I.debug(`no need to sync rules, latest: ${r}`):I.info(`local version is too old, please update to ${i} or later`)}catch(e){I.error("sync rules error: ",e)}}function tc(e){let{onClose:t}=e,[n,r]=$("Original"),[a,o,i,s]=$e(()=>{setTimeout(()=>{S("updateGlobalContext",!1)()},250)});vt(a,o);let[u,l]=$(null),[c,g]=$(globalThis.location.href),[p,f]=$("auto"),[h,y]=$(null),C=j=>{r(j.detail)};if(le(()=>(document.addEventListener(bo,C,!1),er().then(j=>{l(j);let R=Mt();f(R);let M=Ze();r(M),Ey(j.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",C),document.removeEventListener("urlChange",x)}),[]),le(()=>{er().then(j=>{l(j)})},[a]),le(()=>{c&&u&&e4().then(j=>{y(j)})},[c,u]),!u||!h)return null;return d(Xp,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:j=>{S("switchTranslationMode",!0,{mode:j})()},request:de,onClose:A,onToggleEnabled:P,onTranslateTheWholePage:S("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:S("toggleTranslatePage",!0),onTranslateTheMainPage:S("translateTheMainPage",!0),onTranslateToThePageEndImmediately:S("translateToThePageEndImmediately",!0),onTranslatePage:S("translatePage",!0),onRestorePage:S("restorePage",!1),onTranslatePdf:()=>{v(Ra(h.rule)||c)},openAboutPage:D,openSharePage:S("shareToDraft",!0),onSetPageLanguage:b,setSettings:o,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:p,onSetLocalConfig:E0,onSetBuildinConfig:G9,onAutoEnableSubtitleChanged:S("autoEnableSubtitleChanged",!0),onOpenUrl:w});function b(j){f(j);let R=ry(c,j,u.sourceLanguageUrlPattern);o(M=>({...M,sourceLanguageUrlPattern:R})),Xn(j)}function x(){g(globalThis.location.href)}function S(j,R,M={}){let O={trigger:"page_popup",...M};return()=>{Wn({method:j,data:O}),R&&t()}}function A(){t()}function P(){o(j=>({...j,enabled:!j.enabled})),setTimeout(()=>{A()},50)}function w(j,R){let M=j;R&&(M=`${j}?utm_source=extension&utm_medium=extension&utm_campaign=${R}`),k0(M,!0),setTimeout(()=>{A()},50)}function v(j){j&&(Mi(!1,j),setTimeout(()=>{A()},50))}function L(j=""){Li(!0,j),setTimeout(()=>{t()},50)}function D(){D0(),setTimeout(()=>{t()},50)}function T(){r6(),setTimeout(()=>{t()},50)}}m();function ky(){let[e,t]=$("Original");return le(()=>{let n=Ze();t(n);let r=a=>{t(a.detail)};return document.addEventListener(bo,r),()=>{document.removeEventListener(bo,r)}},[]),{pageStatus:e}}var Sy=6,Nk={position:"right",top:335};function Ay({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let o=qe(null),i=qe(null),[s,u]=$(!1),l=qe(null),c=qe(!1),g=qe(n.floatBallConfig||Nk),p=qe(0),f=qe(0),h=qe(0),y=qe(!1),C=qe(0),b=qe(0),x=qe(0),S=qe(0),A=qe(!1),P=Ne(w=>{a||(clearTimeout(l.current),w?u(w):l.current=setTimeout(()=>{u(w),y.current=!1},ot().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(o.current&&g.current){let w=t4(g.current.top);g.current.top=w,o.current.style.top=`${w}px`,o.current.style.display="flex"}},[t,o]),le(()=>{if(!i.current||!o.current)return;let w=M=>{M.preventDefault&&M.preventDefault(),p.current=M.clientX,f.current=M.clientY,C.current=Date.now(),h.current=o.current.offsetTop,c.current=!0,clearTimeout(l.current),P(!0),x.current=M.clientX,S.current=M.clientY,A.current=!1,ot().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{wy({startX:p.current,startY:f.current,endX:x.current,endY:S.current})||(A.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",T),document.addEventListener("mouseup",L),document.addEventListener("touchend",j),document.addEventListener("touchcancel",j)},v=M=>{if(M.preventDefault&&M.preventDefault(),!c.current||!o.current||(x.current=M.clientX,S.current=M.clientY,A.current))return;let O=M.clientY-f.current+h.current,N=t4(O);o.current.style.top=`${N}px`},L=M=>{if(M.preventDefault&&M.preventDefault(),R(),c.current=!1,clearTimeout(l.current),y.current||P(!1),A.current)return;wy({startX:p.current,startY:f.current,endX:M.clientX,endY:M.clientY})||(clearTimeout(b.current),e());let N=t4(M.clientY-30);g.current.top=N;let H=lu();E0({...H,floatBallConfig:g.current})},D=M=>{M.preventDefault&&M.preventDefault(),w(M.changedTouches[0])},T=M=>{M.preventDefault&&M.preventDefault(),v(M.changedTouches[0])},j=M=>{M.preventDefault&&M.preventDefault(),L(M.changedTouches[0])},R=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",j),document.removeEventListener("touchcancel",j)};return i.current.addEventListener("mousedown",w),i.current.addEventListener("touchstart",D),()=>{i.current&&(i.current.removeEventListener("mousedown",w),i.current.removeEventListener("touchstart",D))}},[t,i,o,l,c,n,P,e]),le(()=>{if(ot().any)return;let w=L=>{L.target===o.current&&!y.current||(y.current=!0,P(!0),clearTimeout(l.current))},v=L=>{if(c.current){y.current=!1;return}L.target===o.current&&!y.current||P(!1)};return o.current?.addEventListener("mouseover",w),o.current?.addEventListener("mouseout",v),()=>{o.current?.removeEventListener("mouseover",w),o.current?.removeEventListener("mouseout",v)}},[o,c,P,t,y]),{ballRef:i,floatBallConfigRef:g,containerRef:o,active:s,setActive:P}}function wy({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),o=Math.abs(r-t);return a>Sy||o>Sy}function Ly(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=Re(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),o=Re(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),i=Re(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:o,settingTransform:i}}function _y(){let[e,t]=$(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var Dy="hasShownFloatingBallGuide",Uk="2024-01-06";function My(e){let[t,n]=$(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await jt(Dy,""),o=await jt("installedAt","");o&&new Date(o){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Py(e,t){let n=qe(0),[r,a]=$(!0),[o,i]=$(!1),s=$e(),[u,l]=s,{t:c}=W(),g=Ne(()=>{e?.config.floatBallTooltipRule&&(ot().any?i(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,i]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,ot().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let p=Ne(()=>{e&&(n.current=n.current+1,g(),l(y=>{let C={...y};return ot().any?C.h5FloatBallMainBtnTooltipShownCount=n.current:C.pcFloatBallMainBtnTooltipShownCount=n.current,C}))},[l,g,n,e]),f=Re(()=>ot().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=Re(()=>ot().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Jt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:o,tooltipDelay:f,tooltipText:h,handleShowTooltip:p}}function t4(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}m();var Oo=`${ee}-float-ball`;function Fy(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(jk,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function jk(e){let{t}=W(),[n,r]=$("UntilNext"),a=w0()+"#floating",o=t("closeQuickTranslation.settingOpen",{1:a}),i=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:o},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:o}];return d("div",{class:`${Oo}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${Oo}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(Va,{type:"modal-close"})})]}),d("div",{class:`${Oo}-close-radio-content mt-3`,children:i.map(s=>d(Hk,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{_i(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${Oo}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${Oo}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function Hk(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,o=zk(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${Oo}-radio-sel`:`${Oo}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:o.map(i=>i.type==="text"?i.value:d("a",{onClick:()=>i.href&&a&&a(i.href),children:i.value}))}):null]})]})}function zk(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let o=a[2],i=a[3],s=a[4];o&&i?t.push({type:"link",href:o,value:i}):s&&t.push({type:"text",value:s})}return t}m();var No=`${ee}-float-ball`;function By(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=Re(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${No}-guide-container`,style:r,children:[d("img",{class:`${No}-guide-bg ${e.fixedPosition}`,src:qk}),d("div",{class:`${No}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${No}-guide-img`,src:yr("images/float_ball_intro.png")}),d("div",{class:`${No}-guide-message`,children:[t("floatBall.guideClickToTranslate"),ot().any?` -${t("floatBall.longPress")}`:""]}),d("div",{class:`${No}-primary-btn ${No}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var qk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";m();function Wk({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Ry=Wk;var _u=`${ee}-float-ball`;function n4(e){let{t}=W(),n=$e(),[r,a,o,i]=n;vt(r,a);let s=Qt(r),u=On(s),{isFullScreen:l}=_y(),[c,g]=$(!1),[p,f]=$(!0),{pageStatus:h}=ky(),y=au(u,r),C=Ne(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=Ae();if(Mo(u?.rule)){let F=Ra(u.rule);Mi(!0,F||_);return}Wn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Wn,g]),b=Ne(()=>{g(!0)},[g]),x=p&&!!s,{containerRef:S,active:A,ballRef:P,floatBallConfigRef:w,setActive:v}=Ay({handleBallClick:C,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),L=y?.fixedPosition||"right",D=L==="right"?"left":"right",{isShowGuide:T,handleCloseGuide:j}=My(e.ctx),{closeTransform:R,logoContainerTransform:M,settingTransform:O}=Ly(y,A||T),{tooltipDelay:N,disableTooltipDelay:H,tooltipText:B,handleShowTooltip:k}=Py(u,h);return x?d("div",{class:`${_u}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:A||T||c?"all":"none"},ref:S,children:[d($k,{ctx:u,setVisible:f,closeTransform:R,setActive:v,getModalStyle:()=>Iy(w.current.top,300,L)}),d(tr,{enableMobile:!0,text:B,position:D,delay:N,onShow:k,disable:H,children:d("div",{class:`${_u}-btn ${L} btn-animate `,ref:P,style:{transform:M,opacity:A||T?1:.5},children:d("div",{children:[d(Va,{type:"logo"}),h!=="Original"?d(Va,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${_u}-more-buttons btn-animate`,children:[d(tr,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${_u}-more-button`,onClick:()=>{k0(J2,!0)},children:d(Va,{type:"file"})})}),d(tr,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${_u}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(Va,{type:"setting"})})})]}),d(Vk,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>Iy(w.current.top,500,L)}),d(By,{visible:T,top:w.current.top,fixedPosition:L,onClose:()=>{j(),v(!1)}})]}):null}function $k(e){let{t}=W(),[n,r]=$(!1),a=$e(),[o,i,s,u]=a,l=au(e.ctx,o),c=Ne(p=>{e.ctx&&i(f=>n0({...f},p))},[e.ctx,i]),g=Ne(p=>{l&&(e.setVisible(!1),p==="AlwaysClose"?c({...l,enable:!1}):p==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(Va,{type:"close"})}),d(Fy,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function Vk(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(Ry,{isVisible:e.visible,onClose:e.onClose,children:d(tc,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(tc,{onClose:e.onClose})})}):null}function Kk(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Iy=(e,t,n)=>{let a=Kk().height,o={position:"fixed"},i=0;return s2()&&(e=Gk.top),o.top=e-i,o.top+t>=a?(o.bottom=30,delete o.top):o.top<=10&&(o.top=10),n==="left"?o.left=65:o.right=65,o},Gk={position:"right",right:0,top:335};function Yk(e,t){for(let n of t){if(me()&&!Zr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function Oy(){let e=Pe(),t=await er(),n=await pr(),r={url:globalThis.location.href,config:t},a=await bn(r),o=await Zg(a,n),i=_t(a.url,o?.blockUrls),s=await qt();if(!o?.enable||i)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` -`);return Yk(l,[c]),Jk(l,t,s,a)}function Jk(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),la(d(qi,{lang:t.interfaceLanguage,fallbackLang:"en",translations:wi,children:d(n4,{localConfig:n,ctx:r})}),a)}var Ny=!1;async function Uy(){Ny||(Ny=!0,Oy().catch(e=>{I.error("init popup error",e)}))}var jy=!1,Wy=[()=>{Ut.unbind()}],Hy=[...Wy],Qk=or(async()=>{await Li()},50),Zk=or(async()=>{await D0()},50),Xk=or(async()=>{await t6()},50),eA=or(async()=>{await e6()},50),$y=or(e=>{Wn({method:e,data:{trigger:"userscript_menu"}})},50);function tA(e,t){let n=e.document;if(jy)return;jy=!0,me()||K9(),n.addEventListener("securitypolicyviolation",gA),document.addEventListener(be+"DocumentMessageUser",Jy),document.addEventListener(be+"DocumentMessageUpdateUser",Qy),document.addEventListener(be+"ChangeSuccessService",Zy.bind(null,t)),document.addEventListener(be+"ChangeService",Xy.bind(null,t)),document.addEventListener(ho,lA.bind(null,t)),n.addEventListener(be+"EbookLoaded",dA),n.addEventListener(f2,cA.bind(null,t)),n.addEventListener(h2,mA.bind(null,t)),n.addEventListener(Pl,a=>{at()||i4(a,t)}),n.addEventListener(y2,tC),n.addEventListener("click",a=>{aA(a,t)}),at()&&e.addEventListener("message",rA,!1),me()&&(at()||n.addEventListener(Yr,nA)),at()||ja.rootIframe(Hl).handleAsk("throttleRequest",X6)}function Vy(e,t){pA(),tA(t,e),me()&&(at()||(Yp(e.config),fA(e.config))),Ea()&&nC(e),We()&&Yp(e.config)}function nA(e){Uy()}function rA(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===Ml&&Ia(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function aA(e,t){let n=e.target;if(!n||!n.getAttribute){Ka(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&mt(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),r4({method:"retryFailedParagraphs"}),Ka(n,!0);return}else if(a=="toast-error"){let o=n.getAttribute(`data-${ee}-tooltip-text`)||"",i="",s="retry";try{let u=JSON.parse(o);i=u.title,o=u.errMsg,s=u.action}catch{}Ky(Gy.bind(null,t,i,o,s));return}}}async function oA(){let e=await An(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function iA(){let e=await An(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var zy=0;function Ky(e){let t=Date.now();if(t-zy<2e3||(zy=t,sA()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),o=`${ee}-modal-title`,i=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${o}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${i}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Pe();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let p=document.createElement("div");p.className=ee+"-modal-content notranslate",u.appendChild(p);let f=document.createElement("span");f.textContent="\xD7",f.className=ee+"-close",p.appendChild(f);let h=document.createElement("div");h.className=o+" notranslate",p.appendChild(h);let y=document.createElement("div");y.className=i+" notranslate",p.appendChild(y);let C=document.createElement("div");C.className=s,p.appendChild(C),l.appendChild(u),f.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,C)}setTimeout(()=>{uA()},100)}function Gy(e,t,n,r="retry",a,o,i,s){let u=Ht.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");o.innerText=l,i.innerHTML=tt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",p=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),p.setAttribute(`data-${ee}-action`,"retry");let f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("viewBox","0 0 16 16"),f.setAttribute("width","20"),f.setAttribute("height","20"),f.innerHTML='',p.appendChild(f),p.onclick=()=>{a.style.display="none",r4({method:"retryFailedParagraphs"}),Ka(p,!0)}}else if(r=="login")g=u("goLogin"),p.onclick=()=>{Ka(p,!0),window.open(j2)};else if(r=="upgrade")g=u("upgradeToPro"),p.onclick=()=>{Ka(p,!0),window.open(Wl)};else if(r=="setting")g=u("goSettings"),p.onclick=()=>{Ka(p,!0),window.open(Se.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),p.onclick=()=>{Ka(p,!0),window.open(Se.OPTIONS_URL)},o4(e,e.config.translationService,!1).then(f=>{f?(g=u("toggleToService",{service:u("translationServices."+f)}),p.innerHTML=tt.sanitize(g),p.onclick=()=>{eC(f),Ka(p,!0)}):(g=u("goSettings"),p.innerHTML=tt.sanitize(g))});else if(r=="none")return;p.className="immersive-translate-btn",p.innerHTML+=tt.sanitize(g),s.appendChild(p)}function sA(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function uA(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function Ka(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function lA(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:o,action:i}=r;Ky(Gy.bind(null,e,a,o,i))}catch(r){I.warn("parse message error",r)}}async function cA(e,t){let n=t;if(I.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")r4({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")n6(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oA();else if(a.type==="toggleEnableInputTranslation")iA();else if(a.type==="translatePage")hA(a.data);else if(a.type==="getAsyncTranslationServiceList")r=vo(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=za(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let o=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:o,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let o={...e,translationService:a.data.service};try{r=await bA(a.data,o)}catch(i){qy(a.type,i.uiConfig(o),a.id)}}else a.type==="getAsyncLanguageByText"?r=await S0(a.data):a.type==="sharePage"?i4({detail:a.data},e):a.type==="switchTranslationMode"?a4(a.data):$y(a.type);r&&a.id&&qy(a.type,r,a.id)}}catch(a){I.warn("parse message error",a)}}}function dA(e){setTimeout(()=>{Yy()},10)}function gA(e){Se.HAS_CSP_ERROR="1"}function mA(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&mt(n.name,[{name:n.name}],{...e})}function pA(){Hy.forEach(e=>{e()}),Hy=Wy}function fA(e){if(me()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Vl.commands,a=[...Object.keys(t).filter(o=>o==="toggleTranslatePage").map(o=>{let i=t[o].description,s=i;return i.startsWith("__MSG_")&&i.endsWith("__")&&(s=Ma(`browser.${i.slice(6,-2)}`,e.interfaceLanguage)),{id:o,title:s}}),{id:js,title:Ma("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:Hs,title:Ma("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:Us,title:Ma("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:wg,title:Ma("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let o of a)GM.registerMenuCommand(o.title,()=>{o.id===Us?Qk():o.id===wg?Zk():o.id===Hs?Xk():o.id===js?eA():$y(o.id)},o.key)}}function r4(e){Ia(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{I.error("send content message request failed",e,n)});let t=new CustomEvent(Yr,{detail:e});globalThis.document.dispatchEvent(t)}async function hA(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Ye(Ae(),t);_n(n)}function qy(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function bA({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let o=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),i=null;try{let s=await st({sentences:o},{...a,translationService:r},u=>i=u);if(i)throw i;return s}catch(s){throw s}}m();var Uo={};async function s4(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Oe({text:t,minLength:200,pageLangs:[kt(),"en"]});return Xn(n),n}async function rC(e){Dn("Translating");let t=Mt(),n=y0(),r=[...document.querySelectorAll(".source-text")];if(Ci(e,t))return;let a=r.filter(o=>o.innerText?.trim()).map((o,i)=>{let s=o.parentElement?.parentElement?.querySelector(".target-text");return yt(o,"id",i+""),s&&(Ti(s,i)?.remove(),s.appendChild(nu(e,i))),{text:o.innerText||"",id:i,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await st({sentences:a},{...e,sourceProgram:"subtitle"},(o,i,s)=>{let u=s.id,l=Ti(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),o?(c.innerHTML=tt.sanitize(`${o.message}`),Uo[u]={ok:!1,sentence:s}):i&&(c.innerHTML=tt.sanitize(i.text),Uo[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!o}})})))})}catch(o){throw o}finally{Dn("Translated")}}async function aC(e){Dn("Translating"),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Uo),n=[],r=[];for(let a of t){let o=Uo[a];if(!o.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Uo[a],u.appendChild(nu(e,a)),r.push(o.sentence))}}}try{await st({sentences:r},e,(a,o,i)=>{let s=i.id,u=Ti(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=tt.sanitize(`${a.message}`),Uo[s]={ok:!1,sentence:i}):o&&(l.innerHTML=tt.sanitize(o.text),Uo[s]={ok:!0,sentence:i}),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{Dn("Translated")}}function u4(){Dn("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}m();var l4={};async function oC(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let o=a.body;if(o&&(t=t+o.innerText||"",t.length>1e3))break}let n=await Oe({text:t,pageLangs:["en"]});return Xn(n),n}async function iC(e){Dn("Translating"),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(l4),n=[];for(let r of t){let a=l4[r];if(a.error){let i=a.commonAncestorContainer.querySelector(`[${Bl}='${r}']`);i&&i.remove(),n.push(a)}}try{ku(),await Q0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{Dn("Translated")}}function sC(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}Dn("Original")}async function uC(e){Dn("Translating");let t=Ks(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;_a(u,e);let l=u.body;if(!l)continue;let c=yn(e);c.isModifyImage=!1,ia({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let o=Lr(e.config.translationServices[e.translationService]),i=1;for(let s of r){let u=m0(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:o,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(i++).toString();let l=await zp(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:o,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),l4[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Q0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{Dn("Translated")}}m();var Cr=!1,nc,lC=!1,rc=null;function dC(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){I.debug("exclude url for input");return}if(rc===!1){I.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Bn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ot().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=0,s=Date.now();nc&&self.removeEventListener("keydown",nc),nc=u,self.addEventListener("keydown",nc);function u(c){if(Cr||rc===!1)return;let g=c,p=g.target||g.srcElement,f=p?.tagName;(p?.isContentEditable||f=="INPUT"||f=="SELECT"||f=="TEXTAREA")&&(MA(c,o.triggerKey,o.codePrefixAlias)?l(c):i=0)}async function l(c){Date.now()-s=o.triggerTimes&&TA()&&(i=0,CA(c,e,o))}PA(e)}function gC({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let o of a){let i=t.map(s=>{let u=o+s;return a.includes(s)||(u+=" "),u});r.push(...i)}return new RegExp(r.join("|"))}function ac(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var Yi;function mC(e){let t=e.parentElement;if(!t)return;Yi=document.createElement("div"),Yi.className=ee+"-input",Yi.innerHTML=`
`,t.appendChild(Yi);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function pC(){Yi&&Yi.remove()}async function yA(e){if(!Cr)try{let h=function(){c=e.config.inputTargetLanguage;let C=l.split(" ")[0];C&&C[0]&&(C=C[0].toLowerCase()+C.slice(1)),C.trim()&&o.flatAlias.includes(C)?(c=ac(C,o.codeAlias),u=l.slice(C.length+1)):u=l},y=function(){c="";let C=gC(o),b=l.split(C);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let S=l.lastIndexOf(u),A=l.slice(0,S).lastIndexOf(b[b.length-2]);s=l.slice(0,A+b[b.length-2].length)}if(s.endsWith(o.codePrefix))return;if(s.endsWith(":")&&o.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=ac(x,o.codeAlias),!c){I.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Bn.forEach(C=>n[C]=[C,...n[C]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;ot().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=document.activeElement;if(!i||i.tagName==="BODY")return;Cr=!0;let s="",u="",l=Ga(i)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=fC(u,o),p=await Oe({text:g,pageLangs:["en"]});I.debug("translateContent",g,p);let f={text:g||"",id:0,from:p,to:c,url:"https://google.com",fromByClient:p,force:!0};if(!f.text||f.text.length>5e3)return;mC(i),rt(Fl,Date.now());try{let C=await Mr(f,{...e,translationService:e.inputTranslationService});bC(e),hC(e,i,s+C.text)}catch(C){if(C instanceof J){let b=C.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(ho,{detail:b}))}}finally{Cr=!1}}catch(t){throw Cr=!1,t}finally{Cr=!1,pC()}}async function CA(e,t,n){if(!Cr)try{let g=function(){s=t.config.inputTargetLanguage;let f=i.split(" ")[0];f&&f[0]&&(f=f[0].toLowerCase()+f.slice(1)),f.trim()&&n.flatAlias.includes(f)?(s=ac(f,n.codeAlias),o=i.slice(f.length+1)):o=i},p=function(){s="";let f=gC(n),h=i.split(f);if(h.length<2)return;if(o=h[h.length-1],a=h[0],h.length>2){let C=i.lastIndexOf(o),b=i.slice(0,C).lastIndexOf(h[h.length-2]);a=i.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",o="";return}let y=i.slice(a.length+1,i.indexOf(o)).trim();if(s=ac(y,n.codeAlias),!s){I.warn("not found alias",y);return}},r=document.activeElement;Cr=!0;let a="",o="",i=Ga(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(p(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=fC(o,n),l=await Oe({text:u,pageLangs:["en"]});I.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!lC){lC=!0;let f=await FA(t);if(e.target&&e.target.focus(),f==="open_settings"){Li(!0,"#input");return}else if(f==="open_learn_more"){_i("https://immersivetranslate.com/docs/input/");return}else if(f==="disable_once"||f==="disable_forever"){if(rc=!1,f==="disable_forever"){let h=await An();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(f==="disable_once"){let h=await An();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(f==="close_disable_once"||f==="close_disable_forever"){if(rc=!1,f==="close_disable_forever"){let h=await An();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(f==="enable"){let h=await An();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(f==="close_enable"){let h=await An();h.enableInputTranslation=!0,await kn(h)}}mC(r),rt(Fl,Date.now());try{let f=await Mr(c,{...t,translationService:t.inputTranslationService});bC(t),hC(t,r,a+f.text)}catch(f){if(f instanceof J){let h=f.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(ho,{detail:h}))}}finally{Cr=!1}}catch(r){throw Cr=!1,r}finally{Cr=!1,pC()}}function TA(){let e=document.activeElement;if(!e)return!1;if(oc(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` +`,Vp="immersive-translate-toastify-shadow-root",Kp=class{defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}};constructor(t){this.version="1.12.0",this.options={},this.toastElement=null,this._rootElement=document.body,this._init(t)}showToast(){if(this.toastElement=this._buildToast(),typeof this.options.selector=="string")this._rootElement=document.getElementById(this.options.selector);else if(this.options.selector instanceof HTMLElement||this.options.selector instanceof ShadowRoot)this._rootElement=this.options.selector;else if(document.getElementById(Vp)){let t=document.getElementById(Vp);this._rootElement=t.shadowRoot}else{let t=document.createElement("div");t.setAttribute("translate","no"),t.className="no-translate immersive-translate-toastify-shadow-root",t.id=Vp,t.style.all="initial",t.style.zIndex="2147483647",document.body.appendChild(t);let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=pk,n.appendChild(r),this._rootElement=n}if(!this._rootElement)throw"Root element is not defined";return this._rootElement.insertBefore(this.toastElement,this._rootElement.firstChild),this._reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(()=>{this._removeElement(this.toastElement)},this.options.duration)),this}hideToast(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this._removeElement(this.toastElement)}_init(t){this.options=Object.assign(this.defaults,t),this.options.backgroundColor,this.toastElement=null,this.options.gravity=t.gravity==="bottom"?"toastify-bottom":"toastify-top",this.options.stopOnFocus=t.stopOnFocus===void 0?!0:t.stopOnFocus,t.backgroundColor&&(this.options.style.background=t.backgroundColor)}_buildToast(){if(!this.options)throw"Toastify is not initialized";let t=document.createElement("div");t.className=`toastify on ${this.options.className}`,t.className+=` toastify-${this.options.position}`,t.className+=` ${this.options.gravity}`;for(let n in this.options.style)t.style[n]=this.options.style[n];if(this.options.ariaLive&&t.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(this.options.escapeMarkup?t.innerText=this.options.text:t.innerHTML=this.options.text,this.options.avatar!==""){let n=document.createElement("img");n.src=this.options.avatar,n.className="toastify-avatar",this.options.position=="left"?t.appendChild(n):t.insertAdjacentElement("afterbegin",n)}if(this.options.close===!0){let n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Close"),n.className="toast-close",n.innerHTML="✖",n.addEventListener("click",a=>{a.stopPropagation(),this._removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)});let r=window.innerWidth>0?window.innerWidth:screen.width;this.options.position=="left"&&r>360?t.insertAdjacentElement("afterbegin",n):t.appendChild(n)}if(this.options.stopOnFocus&&this.options.duration>0&&(t.addEventListener("mouseover",n=>{window.clearTimeout(t.timeOutValue)}),t.addEventListener("mouseleave",()=>{t.timeOutValue=window.setTimeout(()=>{this._removeElement(t)},this.options.duration)})),typeof this.options.destination<"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&t.addEventListener("click",n=>{n.stopPropagation(),this.options.onClick()}),typeof this.options.offset=="object"){let n=this._getAxisOffsetAValue("x",this.options),r=this._getAxisOffsetAValue("y",this.options),a=this.options.position=="left"?n:`-${n}`,o=this.options.gravity=="toastify-top"?r:`-${r}`;t.style.transform=`translate(${a},${o})`}return t}_removeElement(t){t.className=t.className.replace(" on",""),window.setTimeout(()=>{this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),this._reposition()},400)}_reposition(){let t={top:15,bottom:15},n={top:15,bottom:15},r={top:15,bottom:15},a=this._rootElement.querySelectorAll(".toastify"),o;for(let i=0;i0?window.innerWidth:screen.width)<=360?(a[i].style[o]=`${r[o]}px`,r[o]+=s+u):a[i].classList.contains("toastify-left")===!0?(a[i].style[o]=`${t[o]}px`,t[o]+=s+u):(a[i].style[o]=`${n[o]}px`,n[o]+=s+u)}}_getAxisOffsetAValue(t,n){return n.offset[t]?isNaN(n.offset[t])?n.offset[t]:`${n.offset[t]}px`:"0px"}};function Z0(e){e=e||{},new Kp({gravity:"bottom",duration:1500,style:{background:"#222",color:"#f2f2f2"},...e}).showToast()}m();function ty(e,t){let n=t.matches||[],r=t.excludeMatches||[];if(r&&!Array.isArray(r)&&(r=[r]),n&&!Array.isArray(n)&&(n=[n]),r.length>0){if(r.includes(e)||r.includes(""))return!1;for(let a of r)if(a.includes("*")&&new RegExp(a).test(e))return!1}if(n.length===0)return!1;if(n.length>0){if(n.includes(e)||n.includes(""))return!0;for(let a of n)if(a.includes("*")&&new RegExp(a).test(e))return!0}return!1}m();m();m();function Wn(e){Ia(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(r=>{I.error("send content message request failed",e,r)}),document.querySelectorAll("iframe").forEach(r=>{r.contentWindow&&r.contentWindow.postMessage({author:Ml,payload:e},"*")});let n=new CustomEvent(Yr,{detail:e});globalThis.document.dispatchEvent(n)}function Gp(e){let t=e.shortcuts||{},r=Object.keys(t).reduce((o,i)=>(o[t[i]]=i,o),{}),a=Object.keys(r);for(let o of a){let i=o.replace(/MacCtrl/ig,"Ctrl");i&&Ut(i,s=>{s.preventDefault();let u=r[o];Wn({method:u,data:{trigger:"shortcut"}})})}}m();m();m();m();var ny=`${ee}-float-ball`;function Va(e){return e.type=="logo"?d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",class:`${ny}-logo-img`,children:[d("path",{fill:"none",d:"M0 0h24v24H0z"}),d("path",{d:"M5 15v2a2 2 0 0 0 1.85 1.995L7 19h3v2H7a4 4 0 0 1-4-4v-2h2zm13-5l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16 10h2zm-1 2.885L15.753 16h2.492L17 12.885zM8 2v2h4v7H8v3H6v-3H2V4h4V2h2zm9 1a4 4 0 0 1 4 4v2h-2V7a2 2 0 0 0-2-2h-3V3h3zM6 6H4v3h2V6zm4 0H8v3h2V6z",fill:"rgba(255,255,255,1)"})]}):e.type=="close"?d("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{"clip-path":"url(#clip0_2589_9951)",children:d("path",{d:"M7 14C5.14348 14 3.36301 13.2625 2.05025 11.9497C0.737498 10.637 0 8.85652 0 7C0 5.14348 0.737498 3.36301 2.05025 2.05025C3.36301 0.737498 5.14348 0 7 0C8.85652 0 10.637 0.737498 11.9497 2.05025C13.2625 3.36301 14 5.14348 14 7C14 8.85652 13.2625 10.637 11.9497 11.9497C10.637 13.2625 8.85652 14 7 14ZM4.183 5.064L6.118 7L4.183 8.936C4.12409 8.99361 4.07719 9.06234 4.04502 9.1382C4.01285 9.21406 3.99605 9.29554 3.99559 9.37794C3.99513 9.46034 4.01101 9.54201 4.04234 9.61823C4.07366 9.69444 4.11978 9.76369 4.17805 9.82195C4.23631 9.88022 4.30556 9.92634 4.38177 9.95766C4.45799 9.98898 4.53966 10.0049 4.62206 10.0044C4.70446 10.004 4.78594 9.98715 4.8618 9.95498C4.93766 9.92281 5.00639 9.87591 5.064 9.817L7 7.882L8.936 9.817C9.05327 9.93168 9.21104 9.99548 9.37506 9.99457C9.53908 9.99365 9.69612 9.92809 9.8121 9.8121C9.92809 9.69612 9.99365 9.53908 9.99457 9.37506C9.99548 9.21104 9.93168 9.05327 9.817 8.936L7.882 7L9.817 5.064C9.87591 5.00639 9.92281 4.93766 9.95498 4.8618C9.98715 4.78594 10.004 4.70446 10.0044 4.62206C10.0049 4.53966 9.98898 4.45799 9.95766 4.38177C9.92634 4.30556 9.88022 4.23631 9.82195 4.17805C9.76369 4.11978 9.69444 4.07366 9.61823 4.04234C9.54201 4.01101 9.46034 3.99513 9.37794 3.99559C9.29554 3.99605 9.21406 4.01285 9.1382 4.04502C9.06234 4.07719 8.99361 4.12409 8.936 4.183L7 6.118L5.064 4.183C4.94673 4.06832 4.78896 4.00452 4.62494 4.00543C4.46092 4.00635 4.30388 4.07191 4.1879 4.1879C4.07191 4.30388 4.00635 4.46092 4.00543 4.62494C4.00452 4.78896 4.06832 4.94673 4.183 5.064Z",fill:"#B1B1B1","fill-opacity":"0.32"})}),d("defs",{children:d("clipPath",{id:"clip0_2589_9951",children:d("rect",{width:"14",height:"14",fill:"white"})})})]}):e.type=="setting"?d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6.55741 0L9.06847 0.00329403C9.84824 0.00470579 10.4802 0.636235 10.4812 1.41647L10.4821 1.82588C10.9687 2.0278 11.4297 2.28671 11.8553 2.59718L12.1913 2.40329C12.516 2.21676 12.9013 2.1665 13.2629 2.26352C13.6246 2.36055 13.933 2.59695 14.1207 2.92094L15.3795 5.09365C15.5601 5.40546 15.6149 5.7744 15.5328 6.12523C15.4507 6.47606 15.2378 6.78235 14.9376 6.98165L14.8609 7.02871L14.5235 7.22353C14.5819 7.76273 14.5736 8.30708 14.4986 8.84424L14.7372 8.98259C15.0496 9.16307 15.2812 9.45606 15.3848 9.80165C15.4884 10.1472 15.456 10.5193 15.2944 10.8419L15.2553 10.9153L14.076 12.9576C13.8955 13.27 13.6025 13.5017 13.2569 13.6053C12.9113 13.7088 12.5392 13.6765 12.2167 13.5148L12.1433 13.4753L11.8172 13.2871C11.4074 13.5817 10.9651 13.8283 10.4991 14.0221L10.4995 14.5831C10.5 14.9434 10.3629 15.2904 10.1163 15.5532C9.86972 15.816 9.53215 15.9748 9.17247 15.9972L9.08306 16L6.57153 15.9967C6.19697 15.9961 5.83793 15.847 5.57312 15.5821C5.30831 15.3172 5.15932 14.9581 5.15883 14.5835L5.15788 13.9073C4.76852 13.7244 4.39771 13.5044 4.05059 13.2504L3.44918 13.5967C3.12448 13.7834 2.73902 13.8337 2.37726 13.7367C2.01551 13.6397 1.70698 13.4032 1.5193 13.0791L0.260473 10.9064C0.0799611 10.5945 0.0252226 10.2255 0.107423 9.87467C0.189623 9.52384 0.402569 9.21757 0.702826 9.01835L0.779062 8.97129L1.3913 8.61835C1.34424 8.17129 1.34188 7.71765 1.38706 7.26494L0.707532 6.87247C0.395061 6.69207 0.163305 6.39911 0.0596515 6.05351C-0.0440025 5.70791 -0.0117246 5.33577 0.149885 5.01318L0.189415 4.93976L1.36871 2.89741C1.54919 2.58502 1.84218 2.35337 2.18777 2.2498C2.53336 2.14624 2.90547 2.17859 3.228 2.34023L3.30141 2.37976L3.89436 2.72188C4.28027 2.42082 4.69854 2.1637 5.14141 1.95529L5.14047 1.41694C5.14001 1.05657 5.27707 0.709596 5.52367 0.446813C5.77028 0.184029 6.10786 0.0252343 6.46753 0.00282354L6.55741 0ZM6.55553 1.41506L6.55694 2.85271L5.74377 3.23576C5.39553 3.39906 5.06706 3.60094 4.764 3.83718L4.01247 4.424L2.62941 3.62494L2.59365 3.60518L1.41483 5.64753L2.88636 6.49694L2.79506 7.40612C2.75968 7.7598 2.76078 8.11619 2.79836 8.46965L2.8953 9.38541L1.48494 10.1976L2.7433 12.3704L4.14377 11.5647L4.88636 12.1087C5.15997 12.309 5.45231 12.4823 5.7593 12.6264L6.57106 13.008L6.57388 14.5816L9.08447 14.5849L9.08306 13.0791L9.95553 12.7158C10.3216 12.5635 10.6689 12.3698 10.9908 12.1384L11.7329 11.6047L12.8506 12.2499L14.0289 10.2075L12.9654 9.592L13.0972 8.64847C13.1561 8.22659 13.1628 7.79904 13.1169 7.37553L13.0181 6.45882L14.1555 5.80235L12.8967 3.62965L11.7645 4.28235L11.0214 3.74024C10.686 3.4956 10.3229 3.29152 9.93953 3.13224L9.06894 2.77082L9.06659 1.41835L6.55553 1.41506ZM9.37153 5.47624C10.0214 5.85201 10.4955 6.47036 10.6898 7.19547C10.8841 7.92058 10.7827 8.69316 10.4078 9.34353C10.2223 9.66543 9.97517 9.9476 9.68053 10.1739C9.38589 10.4002 9.04953 10.5662 8.69068 10.6623C8.33183 10.7585 7.95754 10.7829 7.58923 10.7343C7.22092 10.6856 6.86582 10.5648 6.54424 10.3788C5.89445 10.003 5.4204 9.38458 5.2262 8.65948C5.032 7.93438 5.13352 7.16184 5.50847 6.51153C5.69395 6.18963 5.94107 5.90746 6.23571 5.68117C6.53034 5.45488 6.86671 5.28891 7.22556 5.19275C7.58441 5.09659 7.9587 5.07213 8.32701 5.12077C8.69532 5.16942 9.05042 5.29021 9.372 5.47624H9.37153ZM6.73388 7.21835C6.54638 7.54388 6.49567 7.9305 6.5929 8.29336C6.69012 8.65623 6.92733 8.96571 7.25247 9.15388C7.41305 9.24679 7.59037 9.30712 7.77429 9.33143C7.9582 9.35574 8.14511 9.34355 8.32431 9.29556C8.50351 9.24757 8.67149 9.16472 8.81864 9.05174C8.96579 8.93877 9.08923 8.7979 9.18188 8.63718C9.55883 7.98353 9.356 7.15435 8.73435 6.74494L8.66377 6.70118L8.59035 6.66165C8.26834 6.49988 7.89663 6.46742 7.55145 6.57093C7.20626 6.67444 6.91375 6.90608 6.73388 7.21835Z",fill:"#6C6F73"})}):e.type==="file"?d("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.6861 1L15.2353 4.54635V7.11765V14.6471V15.5882C15.2353 15.9627 15.0866 16.3217 14.8218 16.5865C14.557 16.8513 14.198 17 13.8235 17H4.41176C4.03734 17 3.67825 16.8513 3.4135 16.5865C3.14874 16.3217 3 15.9627 3 15.5882V14.6471V7.11765V2.41176C3 2.03734 3.14874 1.67825 3.4135 1.4135C3.67825 1.14874 4.03734 1 4.41176 1H11.6861ZM11.8692 3.17882V4.74212H13.4334L11.8692 3.17882ZM4.41171 15.5882V14.647V2.41176H10.4574L10.4578 6.15341H13.8235V14.647V15.5882H4.41171ZM12.7739 7.51746H5.46094V8.6155H12.7739V7.51746ZM5.46094 9.98805H12.7739V11.0861H5.46094V9.98805ZM9.5127 12.36H5.46094V13.458H9.5127V12.36Z",fill:"#6C6F73"})}):e.type==="translated"?d("svg",{width:"11",height:"11",viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:`${ny}-translated-img`,children:[d("circle",{cx:"5.5",cy:"5.5",r:"5.5",fill:"#68CD52"}),d("path",{d:"M1.40857 5.87858L2.24148 5.18962L4.15344 6.64214C4.15344 6.64214 6.33547 4.15566 9.00658 2.48145L9.32541 2.87514C9.32541 2.87514 6.28665 5.55844 4.71735 9.07881L1.40857 5.87858Z",fill:"white"})]}):e.type==="modal-close"?d("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4.41083 4.41066C4.5671 4.25443 4.77902 4.16667 4.99999 4.16667C5.22096 4.16667 5.43289 4.25443 5.58916 4.41066L9.99999 8.82149L14.4108 4.41066C14.4877 4.33107 14.5797 4.26758 14.6813 4.22391C14.783 4.18023 14.8923 4.15724 15.003 4.15628C15.1136 4.15532 15.2234 4.1764 15.3258 4.21831C15.4282 4.26021 15.5212 4.32208 15.5995 4.40033C15.6777 4.47857 15.7396 4.57162 15.7815 4.67403C15.8234 4.77644 15.8445 4.88618 15.8435 4.99682C15.8426 5.10747 15.8196 5.21682 15.7759 5.31849C15.7322 5.42016 15.6688 5.51212 15.5892 5.58899L11.1783 9.99982L15.5892 14.4107C15.741 14.5678 15.825 14.7783 15.8231 14.9968C15.8212 15.2153 15.7335 15.4243 15.579 15.5788C15.4245 15.7333 15.2155 15.821 14.997 15.8229C14.7785 15.8248 14.568 15.7408 14.4108 15.589L9.99999 11.1782L5.58916 15.589C5.43199 15.7408 5.22149 15.8248 5.00299 15.8229C4.7845 15.821 4.57549 15.7333 4.42098 15.5788C4.26647 15.4243 4.17883 15.2153 4.17693 14.9968C4.17503 14.7783 4.25903 14.5678 4.41083 14.4107L8.82166 9.99982L4.41083 5.58899C4.2546 5.43272 4.16684 5.22079 4.16684 4.99982C4.16684 4.77885 4.2546 4.56693 4.41083 4.41066Z",fill:"#C4C4C4"})}):null}m();m();function ry(e,t,n){let r=[];n||(n={}),t!=="auto"&&!n[t]&&(n[t]={matches:[],excludeMatches:[]}),r=t!=="auto"?n[t].matches:[];let a={},o=Object.keys(n);for(let l of o){let g=n[l].matches;for(let p of g)a[p]||(a[p]=[]),a[p].push(l)}let i=a[e];if(i&&i.length>0)for(let l of i)n[l].matches.indexOf(e)>-1&&(n[l]={...n[l],matches:n[l].matches.filter(g=>g!==e)});let s=new Set(r);if(t==="auto")return{...n};s.add(e);let u=Array.from(s);return{...n,[t]:{...n[t],matches:u}}}m();m();var X0="DROP_DOWN_DEFAULT_VALUE";function Yp(e){let{showArrow:t,onSelected:n,className:r,menus:a,maxWidth:o,style:i}=e;r=r||"",t=t??!0,o=o||80;let s=We(null);return d("select",{ref:s,autoComplete:"off",class:`min-select ${t?"":"min-select-no-arrow"} ${r||""}`,value:X0,style:{maxWidth:`${o}px`,...i},onChange:u=>{u.preventDefault();let l=u.target.value;if(s.current&&l!==X0){s.current.value=X0,s.current?.dispatchEvent(new Event("change"));let c=a.find(g=>g.value===l);c&&n(c)}},children:[{value:X0,label:e.label}].concat(a).map((u,l)=>d("option",{value:u.value,children:u.label},"option-"+l))})}m();var fk=({date:e})=>{let{t}=W(),[n,r]=$(!1);return le(()=>{setTimeout(()=>{r(!0)},5e3)},[]),n?null:d("p",{class:"text-sm",children:[t("Successfully synchronized with the latest official rules:")," ",new Date(e).toLocaleString()]})},hk=({minVersion:e})=>{let{t}=W();return d("p",{class:"text-sm",children:t("localVersionIsTooOld",{minVersion:e})})},bk=()=>{let{t:e}=W();return d("p",{class:"text-sm",dangerouslySetInnerHTML:{__html:e("badUserscriptBrowser",{1:"https://immersivetranslate.com/docs/installation/"})}})},yk=({message:e,handleSyncing:t,date:n})=>{let{t:r}=W();return d("p",{class:"text-sm",children:[r("failToSyncRules")," ",d("a",{onClick:t,children:r("retry")}),d("br",{}),r("failedReason"),"\uFF1A",e,d("br",{}),r("currentRuleVersion"),"\uFF1A",n]})};function Jp(e){let{isShowError:t,request:n}=e,[r,a]=$(null),{t:o}=W(),[i,s]=$(null),[u,l]=$(null),[c,g]=$(""),[p,f]=$(!1),[h,y]=$(!1),[C,b]=$(!1),[x,S]=$(null),[A,P]=$(null),w=Zn(),v=async()=>{g("");let L=i;if(i===null)try{let D=await n({url:va});D?(s(D),L=D,f(!0)):(g(o("unknownError")),l(null))}catch(D){l(null),g(D.message);return}L!==null?(e.setStorageBuildinConfig(L),l(!1),a(L.buildinConfigUpdatedAt)):(g(o("canNotFetchRemoteRule")),l(null))};return le(()=>{ft().then(L=>{let D=L.buildinConfigUpdatedAt;S(L);let T=new Date(D);if(a(D),w==="0.0.0"){b(!0);return}n({url:va}).then(j=>{let R=j,M=R.minVersion,O=w;s(R);let N=R.latestVersion;if(N&&(Fr(O,N)?P(!0):P(!1)),Fr(O,M)){let H=R.buildinConfigUpdatedAt;new Date(H)>T?(l(!0),v()):l(!1)}else y(!0),l(null)}).catch(j=>{l(null),g(j.message)})})},[]),le(()=>{ft().then(L=>{S(L)})},[r]),x?d("div",{class:"text-sm mt-2",style:{maxWidth:218},children:C?d(bk,{}):c?t===!1?null:d(yk,{handleSyncing:v,message:c,date:r||""}):h?t===!1?null:d(hk,{minVersion:i.minVersion}):u===null||u===!0?null:p?d(fk,{date:r}):null}):null}m();function Ck(){return navigator.userAgent.indexOf("Mac")!==-1}var ay={Alt:"\u2325"};function ec(e=""){return Ck()?Object.keys(ay).reduce((t,n)=>t.replace(n,ay[n]),e):e}m();function oy({config:e,isLogin:t,isProUser:n}){let{t:r}=W();return ta(e)?d("div",{}):d("div",{class:"flex items-center",children:[d("a",{class:"flex items-center text-decoration-none",target:"_blank",href:t?Co:H2,children:[d("img",{src:t?xb:vb}),d("span",{class:"text-xs ml-2 text-label",children:r(t?"loggedIn":"notLogin")})]}),d("a",{title:r(n?"popup.openProForPro":"popup.openPro"),target:"_blank",class:"ml-2",href:n?Co:q2,children:d("img",{src:n?wu:Cb})})]})}m();function iy({currentLang:e,ctx:t,onSetPageLanguage:n,setSettings:r}){let{t:a}=W();if(!t)return null;let o=za(t.config.translationService,t.config.targetLanguage),i=Bn;o.length<=30&&(i=o.indexOf("auto")>=0?o:["auto",...o]);let s=o.filter(u=>u!=="auto");return d("div",{class:"flex mt-4 items-center",children:[d(Tk,{supportedLanguages:i,interfaceLanguage:t.config.interfaceLanguage,currentLang:e,value:t.sourceLanguage,onSelected:n}),d("img",{src:Eb,style:{maxWidth:"unset"},class:"mx-2"}),d(vk,{supportedLanguages:s,interfaceLanguage:t.config.interfaceLanguage,value:t.config.targetLanguage,label:a("popupTarget"),onSelected:u=>{r(l=>({...l,targetLanguage:u}))}})]})}function Tk(e){let{t}=W(),{value:n,currentLang:r}=e,a=t("popupSourceLanguage");return n==="auto"&&r&&r!=="auto"&&(a=t("languages.auto")),d("div",{class:"language-select-container",children:[d("label",{children:a}),d("select",{autoComplete:"off",class:"language-select",onChange:o=>{let i=o.target.value;i&&e.onSelected(i)},children:e.supportedLanguages.map((o,i)=>{let s=Jt(o,e.interfaceLanguage),u="";return o==="auto"&&n==="auto"&&(r&&r==="auto"?u=t("languages.auto"):u=Jt(r,e.interfaceLanguage)+` (${t("languages.auto")})`),d("option",{value:o,selected:o===e.value,children:u||s},"selectlink"+i)})})]})}function vk(e){return d("div",{class:"language-select-container",children:[d("label",{children:e.label}),d("select",{autoComplete:"off",class:"language-select",onChange:t=>{let n=t.target.value;n&&e.onSelected(n)},children:e.supportedLanguages.map((t,n)=>{let r=Jt(t,e.interfaceLanguage);return d("option",{value:t,selected:t===e.value,children:r},"selectlink"+n)})})]})}m();function sy(e){let{t}=W(),{translationServiceItems:n,translationServiceOptions:r}=wk(e);return n.length?d(xe,{children:[d(uy,{class:"mt-3",label:t("popupService"),items:r}),d(xk,{ctx:e.ctx,onRestorePage:e.onRestorePage,setSettings:e.setSettings})]}):null}function uy(e){return d("div",{class:`min-select-container ${e.class||""}`,children:[d("label",{class:"inline-block text-label mb-0 text-gray-6",style:{minWidth:60},children:[e.label,"\uFF1A"]}),d(Pr,{className:"translate-service transform-padding-left",maxWidth:300,items:e.items})]})}function xk({ctx:e,setSettings:t,onRestorePage:n}){let{t:r}=W(),a=Sk(e),o=Ek(e),i=Ne((u,l)=>{t(c=>{let g=c.translationServices||{},p=g[a.id]||{};return setTimeout(()=>{n()},1),{...c,translationServices:{...g,[a.id]:{...p,[u]:l}}}})},[]),s=Re(()=>a?.props.filter(u=>u.type==="select").map(u=>{let l=u.name;u.label&&(l=u.label),u.labelKey&&(l=r(u.labelKey));let c=u.options.map(g=>({label:`${g.label?r(g.label):g.value}`,value:g.value,selected:g.value==o[u.name],onSelected:()=>{i(u.name,g.value)}}));return{label:l,items:c}}),[o]);return!o||!a?.props?.length||!s||!s?.length?null:d(xe,{children:s.map(({label:u,items:l},c)=>d(uy,{class:"mt-2",label:u,items:l},"field-"+c))})}function Ek(e){return Re(()=>{let{translationServices:n,translationService:r}=e.config;return n&&n[r]?n[r]||{}:{}},[e])}function Sk(e){return Re(()=>{let{translationService:n}=e.config;if(Qn[n])return hi("translationService",n,e)},[Qn,hi,e])}function wk({isProUser:e,ctx:t,setSettings:n,pageStatus:r,onTranslatePage:a,onRestorePage:o,openOptionsPage:i}){let{t:s}=W(),u=Re(()=>t?vo(t,"translationService"):[],[vo,t]),l=Ne(g=>{let p=u.find(f=>f.id===g.value);if(p.ok){if(n(f=>({...f,translationService:p.id,translationServiceChangedbyUserAt:new Date().toISOString()})),r!="Translated")return;p.props.length===0?t.rule.isTranslateWhenServiceChanged&&setTimeout(()=>{a()},1):setTimeout(()=>{o()},1)}else n(f=>({...f,translationService:p.id,translationServiceChangedbyUserAt:new Date().toISOString()})),setTimeout(()=>{i()},100)},[i,o,a,n]),c=Re(()=>{let g=$e();return u.filter(f=>t.config.showUnconfiguredTranslationServiceInPopup===!1?f.ok:!0).map(f=>({label:`${s("translationServices."+f.id)}${f.ok?"":" "+(" "+(!e&&!g&&f.providers&&f.providers.length>0?s("goLoginOrAction"):s("needAction")))}`,value:f.id,selected:f.selected,onSelected:l}))},[u,t,l,s]);return{translationServiceItems:u,translationServiceOptions:c}}m();m();function ly(e){let t;try{t=new URL(e)}catch{return!1}let n=X9(),r="";try{r=new URL(n).hostname}catch{}return r&&t.hostname===r?!0:!(Dk(e)||t.protocol!=="http:"&&t.protocol!=="https:"&&t.protocol!=="file:"&&t.protocol!=="data:")}function Dk(e){try{return new URL(e)?.pathname.toLowerCase().endsWith(".pdf")}catch{return!1}}m();function cy(e){let t=e.indexOf("#");return t===-1?e:e.slice(0,t)}function dy(e){let{t}=W(),{currentUrlObj:n,isAlwaysTranslateDomain:r,isNeverTranslateDomain:a,handleTranslationUrlPatternSelected:o}=kk(e),[i,s]=$(()=>a?"excludeMatches":"matches"),u=Re(()=>r||a||!1,[r,a]),l=Ne(c=>{s(c),u&&o(c,n.hostname)},[s,o,u]);return d("div",{class:"flex justify-between mt-5",children:[d(Pr,{style:{width:"unset",flex:"unset"},maxWidth:230,className:"transform-padding-left min-select",items:[{label:t("alwaysTranslateThisSite"),value:"matches",selected:i==="matches",onSelected:()=>{l("matches")}},{label:t("neverTranslateThisSite"),value:"excludeMatches",selected:i==="excludeMatches",onSelected:()=>{l("excludeMatches")}}].filter(Boolean)}),d("input",{type:"checkbox",role:"switch",checked:u,class:"shrink-0",onChange:c=>{let g=c.target.checked;o(g?i:"default",n.hostname)}})]})}function kk({currentUrl:e,ctx:t,currentLang:n,onSetLocalConfig:r,pageStatus:a,onRestorePage:o,onTranslatePage:i,setSettings:s,onClose:u}){let l=null,c=null,g=null,p=null,f=null,{translationUrlPattern:h}=t.config;if(l=Re(()=>new URL(e||""),[e]),t.config&&e&&ly(e)){c=cy(e);let{matches:b,excludeMatches:x}=h;g=!!b.find(S=>_t(e,S)),p=!!x.find(S=>_t(e,S))}if(n&&n!=="auto"){let{translationLanguagePattern:b}=t.config,{matches:x}=b;x.includes(n)?f=!0:f=!1}let y=Ne(()=>{let b=l.hostname,x=t.localConfig.tempTranslationUrlMatches||[],S=x.filter(P=>P.match!==b),A=!1;S.length!==x.length&&(A=!0),A&&r({...t.localConfig,tempTranslationUrlMatches:[...S]})},[r]),C=Ne((b,x)=>{if(b==="default"){s(P=>{let w={...P.translationUrlPattern};return{...P,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...P.translationUrlPattern,matches:Qp(e,w.matches),excludeMatches:Qp(e,w.excludeMatches)}}}),y();return}let S=b,A=S==="matches"?"excludeMatches":"matches";l&&s(P=>{let w={...P.translationUrlPattern};return w[A]=Qp(e,w[A]),w[S]=Rn(x,w[S]),{...P,isChangedAlwaysTranslatedUrls:!0,translationUrlPattern:{...P.translationUrlPattern,...w}}}),S==="matches"&&a==="Original"?setTimeout(()=>{i(),u()},100):S==="excludeMatches"&&a==="Translated"&&setTimeout(()=>{o(),u()},100)},[i,u,a,y]);return{currentUrlObj:l,currentUrlWithoutHash:c,isAlwaysTranslateDomain:g,isNeverTranslateDomain:p,isAlwaysTranslateLang:f,handleTranslationUrlPatternSelected:C}}function Qp(e,t){return t?(Array.isArray(t)||(t=[t]),e?t.filter(n=>!_t(e,n)):t):[]}m();function gy(e){let{t}=W(),{ctx:n,setSettings:r}=e,a=Ak(e);return To(n.localConfig)?a.length?d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[t("mouse-translate"),":"]}),d(Pr,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:a})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:n.config.generalRule.mouseHoverHoldKey!=="Off",onChange:o=>{let i=o.target.checked;r(s=>{let u=s.generalRule?.mouseHoverPreferenceKey||n.config.generalRule.mouseHoverPreferenceKey||Jr[0];return{...s,generalRule:{...s.generalRule,mouseHoverHoldKey:i?u:"Off"}}})}})]}):null:d(Lk,{...e})}function Ak({ctx:e,openOptionsPage:t,setSettings:n}){let{t:r}=W(),a=Re(()=>{let s=e.config.generalRule,u=s.mouseHoverPreferenceKey;return s.mouseHoverHoldKey!=="Off"&&u!==s.mouseHoverHoldKey&&(u=s.mouseHoverHoldKey),u},[e]),o=Re(()=>Jr.filter(s=>!(s==="Off"||Jr.includes(a)&&s==="OtherCustom")),[e,a]);return Re(()=>o.map(s=>{let u=r("mouseHoldKey",{key:ec(s)}),l=Jr.includes(a),c=s===a;return s==="Auto"?u=r("mouseHoldKeyAuto"):s==="Off"?u=r("mouseHoldKeyOff"):s==="OtherCustom"?u=l?r("mouseHoldKeyOther"):r("mouseHoldKeyCustomKey",{key:a}):s==="Other"&&(u=r("mouseHoldKeyOther")),l||s==="OtherCustom"&&(c=!0),{label:u,value:s,selected:c,onSelected:g=>{g.value==="Other"?t("#shortcuts"):n(p=>{let f={...p.generalRule,mouseHoverPreferenceKey:g.value};return e.config.generalRule.mouseHoverHoldKey!=="Off"&&(f.mouseHoverHoldKey=g.value),{...p,generalRule:f}})}}}),[o,a])}function Lk(e){let{ctx:t,setSettings:n}=e,{t:r}=W(),a=t.config.generalRule,o=Object.keys(_u).filter(l=>l!="touchShortcutsOff"),i=a.touchShortcutsToggleTranslateTouchElement,s=a.touchShortcutsToggleTranslateTouchElementPreferenceKey,u=s||"touchShortcutsOff";return i!=="touchShortcutsOff"&&i!==s&&(u=i),d("div",{class:"flex mt-3 items-center justify-between",children:[d("div",{class:"flex items-center",children:[d("label",{class:"mb-0 mr-2 shrink-0",children:[r("touch.mouse-translate"),":"]}),d(Pr,{style:{width:"100%",maxWidth:"100%"},className:"transform-padding-left min-select",items:o.map((l,c)=>({value:l,label:r(l),selected:l==u,onSelected(g){n(p=>{let f={...p.generalRule,touchShortcutsToggleTranslateTouchElementPreferenceKey:g.value};return t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff"&&(f.touchShortcutsToggleTranslateTouchElement=g.value),{...p,generalRule:f}})}}))})]}),d("input",{type:"checkbox",role:"switch",class:"shrink-0",checked:t.config.generalRule.touchShortcutsToggleTranslateTouchElement!=="touchShortcutsOff",onChange:l=>{let c=l.target.checked;n(g=>{let p=g.generalRule?.touchShortcutsToggleTranslateTouchElementPreferenceKey||t.config.generalRule.touchShortcutsToggleTranslateTouchElementPreferenceKey||"slide.left";return{...g,generalRule:{...g.generalRule,touchShortcutsToggleTranslateTouchElement:c?p:"touchShortcutsOff"}}})}})]})}m();function my(e){let{isAlwaysTranslateLang:t}=_k({ctx:e.ctx,currentLang:e.currentLang}),{t:n}=W();if(e.currentLang!=="auto")return d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0 text-overflow-ellipsis flex-1",children:n("alwaysTranslateSomeLanguage",{language:Jt(e.currentLang,e.ctx.config.interfaceLanguage,!1,!0)})}),d("input",{id:"alwaysTranslateThisLanugage",name:"alwaysTranslateThisLanugage",type:"checkbox",role:"switch",class:"shrink-0",checked:!!t,onChange:a=>{let o=a.target.checked;r(o?"matches":void 0)}})]});return d("span",{});function r(a){if(!a){e.setSettings(s=>{let u={...s.translationLanguagePattern};return{...s,translationLanguagePattern:{...s.translationLanguagePattern,matches:zt(e.currentLang,u.matches),excludeMatches:zt(e.currentLang,u.excludeMatches)}}});return}let o=a,i=o==="matches"?"excludeMatches":"matches";e.currentLang&&e.setSettings(s=>{let u={...s.translationLanguagePattern};return u[o]=Rn(e.currentLang,u[o]),u[i]=zt(e.currentLang,u[i]),{...s,translationLanguagePattern:{...s.translationLanguagePattern,...u}}}),o==="matches"&&e.pageStatus==="Original"&&setTimeout(()=>{e.onTranslatePage(),e.onClose()},100)}}function _k({ctx:e,currentLang:t}){let n=null;if(t&&t!=="auto"){let{translationLanguagePattern:r}=e.config,{matches:a}=r;a.includes(t)?n=!0:n=!1}return{isAlwaysTranslateLang:n}}m();m();var py=d("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4284 6.59193L15.1187 2.28564H6.28557C5.83092 2.28564 5.39488 2.46626 5.07339 2.78775C4.7519 3.10924 4.57129 3.54527 4.57129 3.99993V9.71422V18.8571V19.9999C4.57129 20.4546 4.7519 20.8906 5.07339 21.2121C5.39488 21.5336 5.83092 21.7142 6.28557 21.7142H17.7141C18.1688 21.7142 18.6048 21.5336 18.9263 21.2121C19.2478 20.8906 19.4284 20.4546 19.4284 19.9999V18.8571V9.71422V6.59193ZM15.341 6.82964V4.93136L17.2404 6.82964H15.341ZM6.28551 18.8571V19.9999H17.7141V18.8571V8.54335H13.6272L13.6267 3.99992H6.28551V18.8571Z"}),d("rect",{x:"7.55957",y:"10.2002",width:"8.88",height:"1.8",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"13.2002",width:"8.88",height:"1.68",fill:"#EA4C89"}),d("rect",{x:"7.55957",y:"16.0801",width:"4.92",height:"1.8",fill:"#EA4C89"})]}),fy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M19.4289 2.85693C19.654 2.85693 19.8769 2.90127 20.0849 2.98743C20.2929 3.07358 20.4818 3.19985 20.641 3.35904C20.8002 3.51822 20.9265 3.7072 21.0126 3.91519C21.0988 4.12318 21.1431 4.3461 21.1431 4.57122V19.4284C21.1431 19.6535 21.0988 19.8764 21.0126 20.0844C20.9265 20.2924 20.8002 20.4814 20.641 20.6405C20.4818 20.7997 20.2929 20.926 20.0849 21.0122C19.8769 21.0983 19.654 21.1426 19.4289 21.1426H4.57171C4.11705 21.1426 3.68102 20.962 3.35952 20.6405C3.03803 20.3191 2.85742 19.883 2.85742 19.4284V4.57122C2.85742 4.11656 3.03803 3.68053 3.35952 3.35904C3.68102 3.03755 4.11705 2.85693 4.57171 2.85693H19.4289ZM19.4289 9.14265H4.57171V19.4284H19.4289V9.14265ZM8.00028 4.57122H4.57171V7.42836H8.00028V4.57122ZM14.286 4.57122H9.71457V7.42836H14.286V4.57122ZM19.4289 4.57122H16.0003V7.42836H19.4289V4.57122Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.2854 10.543C10.4843 10.5431 10.6797 10.5951 10.8523 10.6938L15.4066 13.2955C15.5815 13.3955 15.7269 13.5399 15.828 13.7142C15.9292 13.8884 15.9824 14.0863 15.9824 14.2878C15.9824 14.4893 15.9292 14.6872 15.828 14.8615C15.7269 15.0357 15.5815 15.1802 15.4066 15.2801L10.8523 17.8824C10.6785 17.9817 10.4816 18.0336 10.2814 18.0329C10.0812 18.0322 9.88476 17.9789 9.71164 17.8784C9.53851 17.7779 9.39483 17.6337 9.29496 17.4602C9.19509 17.2867 9.14254 17.09 9.14258 16.8898V11.6858C9.14258 11.3827 9.26299 11.092 9.47731 10.8777C9.69164 10.6634 9.98233 10.543 10.2854 10.543ZM10.8569 12.6704V15.9047L13.6872 14.2875L10.8569 12.6704Z",fill:"#EA4C89"})]}),hy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.4979 2.78775C19.1764 2.46626 18.7404 2.28564 18.2857 2.28564H5.71429C5.25963 2.28564 4.82359 2.46626 4.5021 2.78775C4.18061 3.10924 4 3.54527 4 3.99993V19.9999C4 20.2251 4.04434 20.448 4.13049 20.656C4.21664 20.8639 4.34292 21.0529 4.5021 21.2121C4.66129 21.3713 4.85027 21.4976 5.05826 21.5837C5.26624 21.6699 5.48916 21.7142 5.71429 21.7142H18.2857C18.5108 21.7142 18.7338 21.6699 18.9417 21.5837C19.1497 21.4976 19.3387 21.3713 19.4979 21.2121C19.6571 21.0529 19.7834 20.8639 19.8695 20.656C19.9557 20.448 20 20.2251 20 19.9999V3.99993C20 3.54527 19.8194 3.10924 19.4979 2.78775ZM5.71429 18.8571H18.2857V19.9999H5.71429V18.8571ZM5.71428 3.95993V17.1028H18.2857V3.95993H5.71428Z"}),d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5033 3.95996V10.8171L10.6462 9.55653L7.78906 10.8171V3.95996H9.50334V8.18682L10.6462 7.68282L11.7891 8.18682V3.95996H13.5033Z",fill:"#EA4C89"})]}),by=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 20 20",fill:"#B3B3B3",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.0402 2.56219C10.8673 2.38914 10.6329 2.29178 10.3883 2.2915H9.61327C9.36886 2.29316 9.13508 2.39169 8.96323 2.5655C8.79138 2.7393 8.6955 2.97417 8.6966 3.21859V4.08317L7.88827 4.38838C7.27152 4.62052 6.69744 4.95314 6.18931 5.37275L5.51952 5.92484L4.76848 5.4915L4.7539 5.48317C4.61453 5.40172 4.45595 5.35893 4.29452 5.35921C4.13241 5.35919 3.97315 5.40182 3.83273 5.48282C3.69231 5.56382 3.57567 5.68033 3.49452 5.82067L3.12577 6.45817C3.00657 6.66857 2.9746 6.91731 3.03672 7.15101C3.09885 7.38471 3.25012 7.58474 3.45806 7.70817L3.47056 7.72171L4.21952 8.15505L4.07785 9.00817C3.96954 9.6575 3.96954 10.3203 4.07785 10.9696L4.2164 11.8207L3.46848 12.2519L3.44556 12.2655C3.23393 12.3881 3.07956 12.5896 3.0163 12.8259C2.95303 13.0622 2.98603 13.3139 3.10806 13.5259L3.50077 14.2061C3.58233 14.3463 3.6992 14.4627 3.83975 14.5436C3.9803 14.6246 4.13961 14.6673 4.30181 14.6675C4.46324 14.6678 4.62182 14.625 4.76119 14.5436L4.7841 14.53L5.53306 14.0978L6.20181 14.6457C6.70534 15.0591 7.27331 15.3871 7.88306 15.6165L8.6914 15.9217V16.7853C8.6914 17.0298 8.78849 17.2644 8.96134 17.4375C9.1342 17.6105 9.36868 17.7079 9.61327 17.7082H10.3883C10.5096 17.7086 10.6299 17.685 10.7422 17.6389C10.8544 17.5928 10.9565 17.525 11.0425 17.4393C11.1285 17.3537 11.1968 17.2519 11.2435 17.1399C11.2901 17.0278 11.3142 16.9077 11.3143 16.7863V15.9217L12.1226 15.6165C12.7394 15.3844 13.3135 15.0517 13.8216 14.6321L14.4914 14.08L15.2424 14.5134L15.257 14.5228C15.469 14.6447 15.7206 14.6775 15.9567 14.614C16.1929 14.5505 16.3941 14.3959 16.5164 14.1842L16.8851 13.5467C17.0068 13.3348 17.0397 13.0834 16.9764 12.8473C16.9132 12.6113 16.759 12.41 16.5476 12.2873L16.532 12.278L15.782 11.8457L15.9237 10.9915C16.032 10.3422 16.032 9.67938 15.9237 9.03005L15.7851 8.179L16.5331 7.74775L16.556 7.73421C16.7676 7.61158 16.922 7.41003 16.9852 7.17376C17.0485 6.93749 17.0155 6.68577 16.8935 6.4738L16.5008 5.79359C16.4192 5.65338 16.3023 5.53699 16.1618 5.45603C16.0212 5.37506 15.8619 5.33234 15.6997 5.33213C15.5383 5.33185 15.3797 5.37464 15.2404 5.45609L15.2174 5.46963L14.4685 5.90192L13.7997 5.354C13.2962 4.94059 12.7282 4.61262 12.1185 4.38317L11.3101 4.07796V3.21442C11.3101 2.96983 11.2131 2.73524 11.0402 2.56219ZM9.61327 1.0415H10.3883C10.6736 1.04164 10.9562 1.09798 11.2197 1.20731C11.4833 1.31663 11.7228 1.4768 11.9245 1.67867C12.1261 1.88054 12.2861 2.12016 12.3951 2.38384C12.5042 2.64753 12.5603 2.93011 12.5601 3.21546C13.2969 3.49312 13.9834 3.88931 14.5924 4.38838L14.6154 4.37484C14.8625 4.2313 15.1356 4.13798 15.4189 4.10025C15.7023 4.06251 15.9903 4.0811 16.2664 4.15495C16.5425 4.2288 16.8013 4.35644 17.028 4.53057C17.2547 4.7047 17.4447 4.92187 17.5872 5.16963L17.9799 5.84984C18.1226 6.09693 18.2153 6.36972 18.2525 6.65262C18.2897 6.93552 18.2709 7.22299 18.197 7.49859C18.123 7.7742 17.9956 8.03254 17.8218 8.25885C17.648 8.48516 17.4313 8.67501 17.1841 8.81755L17.1612 8.83109C17.2248 9.21777 17.2569 9.60899 17.257 10.0009C17.2552 10.4017 17.2203 10.8016 17.1529 11.1967L17.1685 11.205C17.6673 11.4933 18.0313 11.9678 18.1803 12.5243C18.3294 13.0809 18.2513 13.6738 17.9633 14.1728L17.5956 14.8103C17.3075 15.3093 16.833 15.6734 16.2765 15.8227C15.72 15.9719 15.1269 15.894 14.6279 15.6061L14.6133 15.5978C13.999 16.1043 13.3053 16.5059 12.5601 16.7863C12.5599 17.3622 12.331 17.9145 11.9237 18.3217C11.5165 18.729 10.9642 18.9579 10.3883 18.9582H9.61327C9.32792 18.958 9.04539 18.9017 8.78181 18.7924C8.51823 18.683 8.27877 18.5229 8.07709 18.321C7.87541 18.1191 7.71547 17.8795 7.6064 17.6158C7.49733 17.3521 7.44126 17.0696 7.4414 16.7842C6.70459 16.5066 6.01812 16.1104 5.40911 15.6113L5.38619 15.6248C5.13939 15.7686 4.86664 15.8623 4.58357 15.9005C4.30049 15.9387 4.01267 15.9206 3.73659 15.8474C3.4605 15.7741 3.20159 15.6471 2.97469 15.4736C2.74779 15.3001 2.55736 15.0835 2.41431 14.8363L2.0216 14.1561C1.8789 13.909 1.78628 13.6362 1.74904 13.3533C1.7118 13.0704 1.73068 12.7829 1.80459 12.5073C1.87849 12.2317 2.00599 11.9734 2.17977 11.7471C2.35356 11.5208 2.57025 11.3309 2.81744 11.1884L2.84035 11.1748C2.7767 10.7882 2.74465 10.3969 2.74452 10.005C2.74637 9.60425 2.78121 9.20429 2.84869 8.80921L2.83306 8.80088C2.33422 8.51264 1.97027 8.0381 1.82123 7.48158C1.67218 6.92506 1.75025 6.33214 2.03827 5.83317L2.40598 5.19046C2.69404 4.69144 3.16851 4.32727 3.72504 4.17803C4.28157 4.02879 4.87459 4.1067 5.37369 4.39463L5.38827 4.40296C6.00243 3.89603 6.69615 3.49408 7.4414 3.21338C7.44167 2.63745 7.67058 2.08518 8.07783 1.67794C8.48507 1.27069 9.03734 1.04178 9.61327 1.0415ZM11.1583 8.26761C10.8156 8.03869 10.4129 7.9165 10.0008 7.9165C9.44828 7.9165 8.91838 8.136 8.52768 8.5267C8.13698 8.9174 7.91748 9.4473 7.91748 9.99984C7.91748 10.4119 8.03967 10.8147 8.26859 11.1573C8.49751 11.4999 8.82288 11.7669 9.20356 11.9246C9.58424 12.0823 10.0031 12.1235 10.4073 12.0431C10.8114 11.9628 11.1826 11.7643 11.474 11.473C11.7653 11.1816 11.9637 10.8104 12.0441 10.4063C12.1245 10.0021 12.0832 9.58326 11.9256 9.20258C11.7679 8.8219 11.5009 8.49653 11.1583 8.26761ZM8.14891 7.22827C8.69708 6.862 9.34154 6.6665 10.0008 6.6665C10.8849 6.6665 11.7327 7.01769 12.3578 7.64281C12.983 8.26794 13.3341 9.11578 13.3341 9.99984C13.3341 10.6591 13.1387 11.3036 12.7724 11.8517C12.4061 12.3999 11.8855 12.8271 11.2764 13.0794C10.6673 13.3317 9.99712 13.3977 9.35051 13.2691C8.70391 13.1405 8.10997 12.823 7.64379 12.3569C7.17762 11.8907 6.86015 11.2967 6.73153 10.6501C6.60291 10.0035 6.66892 9.33331 6.92122 8.72423C7.17351 8.11514 7.60075 7.59454 8.14891 7.22827Z"})}),yy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{d:"M22.9331 7.46673V21.3334C22.9331 22.2667 22.1331 23.0667 21.1997 23.0667H10.1331V22.0001V20.9334H20.9331V7.60006H15.3331L11.0664 18.0001C10.7997 18.6667 10.1331 19.0667 9.46641 19.0667H2.79974C1.86641 19.0667 1.06641 18.2667 1.06641 17.3334V3.46673C1.06641 2.5334 1.86641 1.7334 2.79974 1.7334L12.9331 1.7334V2.80007V3.86673H2.93307V17.3334H9.33307L13.5997 6.9334C13.8664 6.26673 14.5331 5.86673 15.1997 5.86673H21.3331C22.2664 5.60006 22.9331 6.40007 22.9331 7.46673Z"}),d("path",{d:"M5.904 11.4063L5.472 13H4L6.056 6H7.96L10 13H8.496L8.072 11.4063H5.904ZM7.688 9.95389L7.048 7.54323H6.952L6.296 9.95389H7.688Z",fill:"#EA4C89"}),d("path",{d:"M19.4337 18.9805C18.403 18.6732 17.5907 18.3117 16.9968 17.8961C16.6999 18.1039 16.3542 18.2965 15.9597 18.474C15.5652 18.6558 15.1071 18.8312 14.5854 19L14 17.8831C14.9035 17.6494 15.6076 17.3918 16.1124 17.1104C15.8579 16.816 15.6394 16.4848 15.4571 16.1169C15.2789 15.7489 15.1262 15.3312 14.9989 14.8636H14.1718V13.8182H16.456C16.4178 13.5844 16.3669 13.3312 16.3033 13.0584L17.5504 13L17.6522 13.8182H19.8091V14.8636H18.9374C18.8059 15.3485 18.6532 15.7749 18.4793 16.1429C18.3054 16.5108 18.0976 16.8377 17.8558 17.1234C18.4327 17.4524 19.1474 17.6926 20 17.8442L19.4337 18.9805ZM16.1633 14.8636C16.3118 15.487 16.5854 16.013 16.9841 16.4416C17.1707 16.2424 17.3256 16.0152 17.4486 15.7597C17.5758 15.5 17.684 15.2013 17.7731 14.8636H16.1633Z",fill:"#EA4C89"})]}),Cy=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"#222222",children:[d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13 2H3C1.89543 2 1 2.89543 1 4V20C1 21.1046 1.89543 22 3 22H7V20H3V4H13V2ZM21 2H17V4H21V20H11V22H21C22.1046 22 23 21.1046 23 20V4C23 2.89543 22.1046 2 21 2Z"}),d("path",{d:"M10.5387 14.1787L9.96267 16H8L10.7413 8H13.28L16 16H13.9947L13.4293 14.1787H10.5387ZM12.9173 12.5187L12.064 9.76369H11.936L11.0613 12.5187H12.9173Z",fill:"#EA4C89"})]}),Ty=d("svg",{xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28",viewBox:"0 0 28 28",fill:"#666666",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19 8H9C8.44772 8 8 8.44772 8 9V11H20V9C20 8.44772 19.5523 8 19 8ZM21 11V9C21 7.89543 20.1046 7 19 7H9C7.89543 7 7 7.89543 7 9V11V12V19C7 20.1046 7.89543 21 9 21H13V20H9C8.44772 20 8 19.5523 8 19V12H20V14H21V12V11ZM9 9H11V10H9V9ZM17 9H15V10H17V9ZM12 9H14V10H12V9ZM21 17H18V14H17V17H14V18H17V21H18V18H21V17Z"})});function xy({onOpenUrl:e,openOptionsPage:t,type:n}){let{t:r}=W(),a=Pe(),o=Math.round((yi.supportedVideoSubtitleSites||[]).length/10),i=Re(()=>[{title:r("widget.translateFile"),icon:py,tooltipText:r("translateFileTooltip"),tooltipStyle:{left:-10,transform:"unset",fontSize:13,whiteSpace:"pre"},tooltipMultiple:!0,onClick:()=>{e(a.TRANSLATE_FILE_URL,n)}},{title:r("widget.videoSubtitle"),icon:fy,tooltipText:r("widget.videoSubtitleTooltip",{count:o*10}),tooltipStyle:{fontSize:13},onClick:()=>{t("#subtitle")}},{title:r("widget.instruction"),icon:hy,tooltipText:r("widget.instructionTooltip"),tooltipStyle:{left:"unset",right:-10,transform:"unset",fontSize:13},onClick:()=>{e($l)}}],[a,e,t,r]);return d("div",{class:"widgets-container mt-5",children:i.map(s=>s.tooltipText?d(tr,{text:s.tooltipText,containerStyle:{flex:1},tipStyle:s.tooltipStyle,multiple:s.tooltipMultiple,children:d(vy,{...s})}):d(vy,{...s}))})}function vy(e){return d("div",{class:"widget-item",onClick:e.onClick,children:[e.icon,d("span",{class:"ml-1 text-gray-6",children:e.title})]})}function Zp(e){let{setSettings:t,config:n,openSharePage:r,ctx:a,errorMsg:o,onAutoEnableSubtitleChanged:i}=e,[s,u]=$(""),[l,c]=$(o),[g,p]=$(null),[f,h]=$(null);le(()=>{mt.get(Tt,null).then(x=>{x?(p(x),h(Yt(x))):h(!1)}).catch(x=>{h(!1)})},[]);let y=!0,C=$e();n&&C&&(y=n.generalRule.showSponsorOnSafari);let b=ta(n);return d("div",{class:`popup-container ${e.className||""}`,style:e.style,children:[d("div",{class:"popup-content text-sm",children:[b?d("div",{style:{marginTop:-12}}):d("div",{class:"flex items-center justify-between ml-1",style:{height:28},children:[d(oy,{isLogin:!!g,isProUser:!!f,config:n}),d(Ik,{openSharePage:r})]}),d(iy,{ctx:e.ctx,setSettings:e.setSettings,onSetPageLanguage:e.onSetPageLanguage,currentLang:e.currentLang}),d(sy,{isProUser:!!f,ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,openOptionsPage:e.openOptionsPage}),d("div",{class:"flex flex-row mt-3 items-center",children:[d(Pk,{ctx:a,onSwitchTranslationMode:e.onSwitchTranslationMode}),d(Bk,{ctx:e.ctx,pageStatus:e.pageStatus,currentUrl:e.currentUrl,onTranslatePdf:e.onTranslatePdf,onToggleTranslate:e.onToggleTranslate,disabledButton:e.disabledButton,noPermissionPDF:e.noPermissionPDF})]}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${s?"":"display-none"}`,children:s}),d("div",{class:`text-sm text-gray-9 mt-4 ml-1 ${l?"":"display-none"}`,children:l}),d(Jp,{isShowError:!1,request:e.request,setStorageBuildinConfig:e.onSetBuildinConfig}),d("div",{class:"text-sm px-1 text-gray-2",children:[d(dy,{ctx:e.ctx,setSettings:e.setSettings,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onRestorePage:e.onRestorePage,currentUrl:e.currentUrl,currentLang:e.currentLang,onClose:e.onClose,onSetLocalConfig:e.onSetLocalConfig}),d(gy,{ctx:e.ctx,openOptionsPage:e.openOptionsPage,setSettings:e.setSettings}),d(my,{ctx:a,currentLang:e.currentLang,pageStatus:e.pageStatus,onTranslatePage:e.onTranslatePage,onClose:e.onClose,setSettings:e.setSettings}),d(Mk,{onAutoEnableSubtitleChanged:i,ctx:a,setSettings:t})]}),d(xy,{type:e.type,onOpenUrl:e.onOpenUrl,openOptionsPage:e.openOptionsPage})]}),d(Fk,{...e,isProUser:!!f,isShowPricing:y,setMessage:u})]})}function Mk(e){let{t}=W(),{ctx:n,setSettings:r,onAutoEnableSubtitleChanged:a}=e;return Re(()=>!n.rule.subtitleRule.disabled&&Lg.includes(n.rule.subtitleRule.type||""),[n,Lg])?d("div",{class:"flex justify-between mt-3 items-center",children:[d("label",{class:"mb-0",children:t("autoEnableSubtitle")}),d("input",{type:"checkbox",role:"switch",id:"autoEnableSubtitle",name:"autoEnableSubtitle",checked:!!n.rule.subtitleRule.autoEnableSubtitle,onChange:i=>{let s=i.target.checked;r(u=>({...u,generalRule:{...u.generalRule,"subtitleRule.add":{...u.generalRule?.["subtitleRule.add"],autoEnableSubtitle:s}}})),a()}})]}):null}function Pk(e){let{t}=W(),n=e.ctx.state.translationMode,r=()=>{let o=n==="dual"?"translation":"dual";e.onSwitchTranslationMode(o)},a=t(n==="dual"?"changeToOnlyTempTranslationMode":"changeToDualTempTranslationMode");return d(tr,{text:a,multiple:!0,tipStyle:{left:-20,transform:"unset",fontSize:13,whiteSpace:"pre"},children:d("div",{class:"translate-mode mr-2 ",onClick:r,children:n==="dual"?yy:Cy})})}function Fk(e){let{t,lang:n}=W(),{isProUser:r,isShowPricing:a}=e,{config:o}=e.ctx,i=60;n.startsWith("zh")||(i=70);let s=Pe(),u=`${e.type}_more`;return d("footer",{children:d("div",{class:"px-3 py-2-5 text-sm flex items-center justify-between popup-footer",children:[d("div",{class:"setting flex flex-row items-center justify-center secondary clickable",onClick:l,children:[by,d("span",{class:"ml-1 text-gray-6",children:t("options")})]}),d(Rk,{ctx:e.ctx,onToggleEnabled:e.onToggleEnabled,setSettings:e.setSettings,setMessage:e.setMessage}),d(Yp,{label:t("more"),showArrow:!0,maxWidth:i,className:"text-gray-6 transform-padding-left more",onSelected:f=>{f.value==="openPremium"?(globalThis.open(xa),e.onClose()):f.value==="changeToOnlyTranslationMode"?c("translation"):f.value==="changeToDualTranslationMode"?c("dual"):f.value==="translateTheWholePage"?e.onTranslateTheWholePage():f.value==="translateToThePageEndImmediately"?e.onTranslateToThePageEndImmediately():f.value==="translateTheMainPage"?e.onTranslateTheMainPage():f.value==="translateLocalPdfFile"?e.onOpenUrl(s.PDF_VIEWER_URL,u):f.value==="pdfProFile"?e.onOpenUrl(s.PDF_PRO_URL,u):f.value==="translateText"?e.onOpenUrl(s.TEXT_TRANSLATE_URL,u):f.value==="translateLocalHtmlFile"?e.onOpenUrl(s.HTML_VIEWER_URL,u):f.value==="translateLocalSubtitleFile"?e.onOpenUrl(s.SUBTITLE_BUILDER_URL,u):f.value==="donate"?(globalThis.open(o.donateUrl),e.onClose()):f.value==="feedback"?(globalThis.open(o.feedbackUrl),e.onClose()):f.value==="options"?(e.openOptionsPage(),e.onClose()):f.value==="changeToTranslateTheWholePage"?g():f.value==="changeToTranslateTheMainPage"?p():f.value==="about"?e.openAboutPage():f.value==="toggleEnabled"?e.onToggleEnabled():f.value==="openEbookViewer"?e.onOpenUrl(s.EBOOK_VIEWER_URL,u):f.value==="openEbookBuilder"?e.onOpenUrl(s.EBOOK_BUILDER_URL,u):f.value==="goPro"&&e.onOpenUrl(xa,u)},menus:[o.translationMode==="dual"&&{label:"\u{1F524} "+t("changeToOnlyTranslationMode"),value:"changeToOnlyTranslationMode"},o.translationMode==="translation"&&{label:"\u{1F521} "+t("changeToDualTranslationMode"),value:"changeToDualTranslationMode"},o.translationArea==="main"&&{label:"\u{1F480} "+t("changeToTranslateTheWholePage"),value:"changeToTranslateTheWholePage"},o.translationArea==="body"&&{label:"\u{1F4D6} "+t("changeToTranslateTheMainPage"),value:"changeToTranslateTheMainPage"},{label:"\u26A1 "+t("translateToThePageEndImmediately"),value:"translateToThePageEndImmediately"},{label:"\u{1F4D8} "+t("browser.openEbookViewer"),value:"openEbookViewer"},{label:"\u{1F4DA} "+t("browser.openEbookBuilder"),value:"openEbookBuilder"},{label:"\u{1F4C1} "+t("browser.translateLocalPdfFile"),value:"translateLocalPdfFile"},{label:"\u2747\uFE0F "+t("browser.PdfProFile"),value:"pdfProFile"},{label:"\u{1F310} "+t("browser.translateLocalHtmlFile"),value:"translateLocalHtmlFile"},{label:"\u{1F4FA} "+t("browser.translateLocalSubtitleFile"),value:"translateLocalSubtitleFile"},{label:"\u{1F4DD} "+t("browser.textTranslate"),value:"translateText"},r===!1&&a&&{label:"\u{1F451} "+t("upgradeToPro"),value:"goPro"},{label:"\u2764\uFE0F "+t(a?"aboutLabel":"aboutLabelWithoutSponsor"),value:"about"}].filter(Boolean)})]})});function l(f){f.preventDefault(),e.openOptionsPage()}function c(f){e.setSettings(h=>({...h,translationMode:f})),e.onSwitchTranslationMode(f)}function g(){e.setSettings(f=>({...f,translationArea:"body"})),e.onTranslateTheWholePage()}function p(){e.setSettings(f=>({...f,translationArea:"main"})),e.onTranslateTheMainPage()}}function Bk({currentUrl:e,pageStatus:t,onTranslatePdf:n,ctx:r,onToggleTranslate:a,disabledButton:o,noPermissionPDF:i}){let{t:s,lang:u}=W(),l=r.config,c=Re(()=>new URL(e||""),[e]),g=c?.pathname.toLowerCase().endsWith(".pdf");Mo(r?.rule)&&!g&&(g=!0);let p=s("translate");t==="Translated"||t==="Error"?p=s("show-original"):t==="Original"?g?Zr()&&c.protocol==="file:"||i?p=s("translate-firefox-local-pdf"):me()?p=s("noSupportTranslate-pdf"):p=s("translate-pdf"):p=s("translate"):p=s(t);let f=s("translateToThePageEndImmediately");return(t==="Original"||t==="Translated")&&(l.shortcuts.toggleTranslatePage&&(Ea()?r.rule.touchShortcutsToggleTranslatePage&&r.rule.touchShortcutsToggleTranslatePage!=="touchShortcutsOff"&&(p+=` (${s(r.rule.touchShortcutsToggleTranslatePage)})`):p+=` (${ec(l.shortcuts.toggleTranslatePage)})`),l.shortcuts.toggleTranslateToThePageEndImmediately&&(f+=` (${l.shortcuts.toggleTranslateToThePageEndImmediately})`)),d("button",{class:"mb-0 main-button",onClick:()=>{g?n&&n():a()},"aria-busy":t==="Translating",disabled:o||t==="Translating",children:p})}function Rk({ctx:e,onToggleEnabled:t,setSettings:n,setMessage:r}){let{t:a,lang:o}=W(),i=Zn();return d("div",{class:"flex",children:d("span",{class:"immersive-translate-no-select text-sm text-gray-c2",onClick:Du(7)(s),children:["V",i,e.config.enabled?null:d("a",{href:"#",onClick:t,children:[" ","(",a("hasBeenDisabled"),")"]})]})});function s(u){n(l=>(l.alpha?r("Success disable alpha!"):r("Success enable alpha!"),{...l,alpha:!l.alpha}))}}function Ik(e){let{t}=W();return d("div",{class:"share-button-container",onClick:e.openSharePage,children:[d("span",{class:"text-gray-9",children:t("buildSnapshots")}),Ty]})}m();async function Ey(e){try{let t=new Date;I.debug("cron task start, next will run at",new Date(t.getTime()+e).toLocaleString()),await Q.storage.local.set({[M2]:t.toISOString()}),await Ok(),me()||await a6()}catch(t){I.error("run cron task failed",t)}}async function Ok(){try{let e=await er(),t=await de({url:va}),n=e.buildinConfigUpdatedAt,r=new Date(n),a=t.buildinConfigUpdatedAt,o=new Date(a),i=t.minVersion,s=Q.runtime.getManifest().version;Fr(s,i)?o>r?(await Q.storage.local.set({buildinConfig:t}),I.info(`sync remote rules success, latest: ${new Date(a).toLocaleString()}`),Ia({method:"updateGlobalCtx",data:{}},{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(u=>{I.error("send content message request failed from cron task",u)})):I.debug(`no need to sync rules, latest: ${r}`):I.info(`local version is too old, please update to ${i} or later`)}catch(e){I.error("sync rules error: ",e)}}function tc(e){let{onClose:t}=e,[n,r]=$("Original"),[a,o,i,s]=Ve(()=>{setTimeout(()=>{S("updateGlobalContext",!1)()},250)});vt(a,o);let[u,l]=$(null),[c,g]=$(globalThis.location.href),[p,f]=$("auto"),[h,y]=$(null),C=j=>{r(j.detail)};if(le(()=>(document.addEventListener(bo,C,!1),er().then(j=>{l(j);let R=Mt();f(R);let M=Ze();r(M),Ey(j.interval)}),document.addEventListener("urlChange",x),()=>{document.removeEventListener("pageTranslatedStatus",C),document.removeEventListener("urlChange",x)}),[]),le(()=>{er().then(j=>{l(j)})},[a]),le(()=>{c&&u&&Xp().then(j=>{y(j)})},[c,u]),!u||!h)return null;return d(Zp,{type:"float_ball_popup",className:e.className,onSwitchTranslationMode:j=>{S("switchTranslationMode",!0,{mode:j})()},request:de,onClose:A,onToggleEnabled:P,onTranslateTheWholePage:S("translateTheWholePage",!0),openOptionsPage:L,onToggleTranslate:S("toggleTranslatePage",!0),onTranslateTheMainPage:S("translateTheMainPage",!0),onTranslateToThePageEndImmediately:S("translateToThePageEndImmediately",!0),onTranslatePage:S("translatePage",!0),onRestorePage:S("restorePage",!1),onTranslatePdf:()=>{v(Ra(h.rule)||c)},openAboutPage:D,openSharePage:S("shareToDraft",!0),onSetPageLanguage:b,setSettings:o,config:u,pageStatus:n,ctx:h,currentUrl:c,currentLang:p,onSetLocalConfig:E0,onSetBuildinConfig:G9,onAutoEnableSubtitleChanged:S("autoEnableSubtitleChanged",!0),onOpenUrl:w});function b(j){f(j);let R=ry(c,j,u.sourceLanguageUrlPattern);o(M=>({...M,sourceLanguageUrlPattern:R})),Xn(j)}function x(){g(globalThis.location.href)}function S(j,R,M={}){let O={trigger:"page_popup",...M};return()=>{Wn({method:j,data:O}),R&&t()}}function A(){t()}function P(){o(j=>({...j,enabled:!j.enabled})),setTimeout(()=>{A()},50)}function w(j,R){let M=j;R&&(M=`${j}?utm_source=extension&utm_medium=extension&utm_campaign=${R}`),k0(M,!0),setTimeout(()=>{A()},50)}function v(j){j&&(Mi(!1,j),setTimeout(()=>{A()},50))}function L(j=""){Li(!0,j),setTimeout(()=>{t()},50)}function D(){D0(),setTimeout(()=>{t()},50)}function T(){r6(),setTimeout(()=>{t()},50)}}m();function ky(){let[e,t]=$("Original");return le(()=>{let n=Ze();t(n);let r=a=>{t(a.detail)};return document.addEventListener(bo,r),()=>{document.removeEventListener(bo,r)}},[]),{pageStatus:e}}var Sy=6,Nk={position:"right",top:335};function Ay({handleBallClick:e,isShow:t,localConfig:n,handleMobileBallLongPress:r,popupVisible:a}){let o=We(null),i=We(null),[s,u]=$(!1),l=We(null),c=We(!1),g=We(n.floatBallConfig||Nk),p=We(0),f=We(0),h=We(0),y=We(!1),C=We(0),b=We(0),x=We(0),S=We(0),A=We(!1),P=Ne(w=>{a||(clearTimeout(l.current),w?u(w):l.current=setTimeout(()=>{u(w),y.current=!1},it().any?3e3:0))},[u,l,y,a]);return le(()=>{a||u(!1)},[a]),le(()=>{if(o.current&&g.current){let w=e4(g.current.top);g.current.top=w,o.current.style.top=`${w}px`,o.current.style.display="flex"}},[t,o]),le(()=>{if(!i.current||!o.current)return;let w=M=>{M.preventDefault&&M.preventDefault(),p.current=M.clientX,f.current=M.clientY,C.current=Date.now(),h.current=o.current.offsetTop,c.current=!0,clearTimeout(l.current),P(!0),x.current=M.clientX,S.current=M.clientY,A.current=!1,it().any&&(clearTimeout(b.current),b.current=setTimeout(()=>{wy({startX:p.current,startY:f.current,endX:x.current,endY:S.current})||(A.current=!0,r())},500)),document.addEventListener("mousemove",v),document.addEventListener("touchmove",T),document.addEventListener("mouseup",L),document.addEventListener("touchend",j),document.addEventListener("touchcancel",j)},v=M=>{if(M.preventDefault&&M.preventDefault(),!c.current||!o.current||(x.current=M.clientX,S.current=M.clientY,A.current))return;let O=M.clientY-f.current+h.current,N=e4(O);o.current.style.top=`${N}px`},L=M=>{if(M.preventDefault&&M.preventDefault(),R(),c.current=!1,clearTimeout(l.current),y.current||P(!1),A.current)return;wy({startX:p.current,startY:f.current,endX:M.clientX,endY:M.clientY})||(clearTimeout(b.current),e());let N=e4(M.clientY-30);g.current.top=N;let H=cu();E0({...H,floatBallConfig:g.current})},D=M=>{M.preventDefault&&M.preventDefault(),w(M.changedTouches[0])},T=M=>{M.preventDefault&&M.preventDefault(),v(M.changedTouches[0])},j=M=>{M.preventDefault&&M.preventDefault(),L(M.changedTouches[0])},R=()=>{document.removeEventListener("mousemove",v),document.removeEventListener("touchmove",T),document.removeEventListener("mouseup",L),document.removeEventListener("touchend",j),document.removeEventListener("touchcancel",j)};return i.current.addEventListener("mousedown",w),i.current.addEventListener("touchstart",D),()=>{i.current&&(i.current.removeEventListener("mousedown",w),i.current.removeEventListener("touchstart",D))}},[t,i,o,l,c,n,P,e]),le(()=>{if(it().any)return;let w=L=>{L.target===o.current&&!y.current||(y.current=!0,P(!0),clearTimeout(l.current))},v=L=>{if(c.current){y.current=!1;return}L.target===o.current&&!y.current||P(!1)};return o.current?.addEventListener("mouseover",w),o.current?.addEventListener("mouseout",v),()=>{o.current?.removeEventListener("mouseover",w),o.current?.removeEventListener("mouseout",v)}},[o,c,P,t,y]),{ballRef:i,floatBallConfigRef:g,containerRef:o,active:s,setActive:P}}function wy({startX:e,startY:t,endX:n,endY:r}){let a=Math.abs(n-e),o=Math.abs(r-t);return a>Sy||o>Sy}function Ly(e,t){let n=e?.fixedPosition||"right",r=e?.clickType==="translate",a=Re(()=>t?"":n=="left"?"translateX(-100%)":"translateX(100%)",[n,t]),o=Re(()=>t&&r?"":n=="left"?"translateX(-20px)":"translateX(20px)",[n,t,r]),i=Re(()=>t&&r?"":n=="left"?"translateX(-60px)":"translateX(60px)",[n,t,r]);return{closeTransform:a,logoContainerTransform:o,settingTransform:i}}function _y(){let[e,t]=$(!1);return le(()=>{let n=()=>{document.querySelector("video")&&t(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",n),()=>{document.removeEventListener("fullscreenchange",n)}},[]),{isFullScreen:e}}var Dy="hasShownFloatingBallGuide",Uk="2024-01-06";function My(e){let[t,n]=$(!1);le(()=>{!e.config.enableShowFloatingBallGuide||Mt()==e.targetLanguage||(async()=>{let a=await jt(Dy,""),o=await jt("installedAt","");o&&new Date(o){n(!1)},[]);return{isShowGuide:t,handleCloseGuide:r}}function Py(e,t){let n=We(0),[r,a]=$(!0),[o,i]=$(!1),s=Ve(),[u,l]=s,{t:c}=W(),g=Ne(()=>{e?.config.floatBallTooltipRule&&(it().any?i(n.current>=(e.config.floatBallTooltipRule.h5MainBtnTooltipMaxShowCount||2)):a(n.current>=(e.config.floatBallTooltipRule.mainBtnTooltipImmediateShowCount||5)))},[a,n,e,i]);le(()=>{e&&(n.current=e.config.pcFloatBallMainBtnTooltipShownCount||0,it().any&&(n.current=e.config.h5FloatBallMainBtnTooltipShownCount||0),g())},[e]);let p=Ne(()=>{e&&(n.current=n.current+1,g(),l(y=>{let C={...y};return it().any?C.h5FloatBallMainBtnTooltipShownCount=n.current:C.pcFloatBallMainBtnTooltipShownCount=n.current,C}))},[l,g,n,e]),f=Re(()=>it().any||!r?0:e?.config.floatBallTooltipRule?.mainBtnTooltipDelayTime||2e3,[r,e]),h=Re(()=>it().any?c("floatBall.longPress"):t!=="Original"?c("floatBall.showOriginal"):e?.targetLanguage?c("floatBall.translateToLanguage",{language:Jt(e.targetLanguage,e.targetLanguage,!0)}):c("floatBall.translate"),[t,e]);return{disableTooltipDelay:o,tooltipDelay:f,tooltipText:h,handleShowTooltip:p}}function e4(e){return Math.max(Math.min(e,globalThis.innerHeight-200),10)}m();var Oo=`${ee}-float-ball`;function Fy(e){let t=n=>{n&&n.target&&n.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(jk,{onConfirm:e.onCloseConfirm,onClose:e.onClose})})}):null}function jk(e){let{t}=W(),[n,r]=$("UntilNext"),a=w0()+"#floating",o=t("closeQuickTranslation.settingOpen",{1:a}),i=[{title:t("closeQuickTranslation.untilNext"),type:"UntilNext"},{title:t("closeQuickTranslation.currentWebsite"),type:"CurrentWebsite",description:o},{title:t("closeQuickTranslation.alwaysClose"),type:"AlwaysClose",description:o}];return d("div",{class:`${Oo}-close-content`,children:[d("div",{class:"flex justify-between",children:[d("div",{class:`${Oo}-close-title`,children:t("closeQuickTranslation")}),d("div",{class:"clickable",onClick:e.onClose,children:d(Va,{type:"modal-close"})})]}),d("div",{class:`${Oo}-close-radio-content mt-3`,children:i.map(s=>d(Hk,{onClick:()=>{r(s.type)},title:s.title,description:s.description,selected:s.type===n,onLinkClick:u=>{_i(u)}},s.type))}),d("div",{class:"flex mt-3 flex-end",children:[d("div",{class:`${Oo}-default-btn`,onClick:e.onClose,children:t("closeQuickTranslation.cancel")}),d("div",{class:`${Oo}-primary-btn ml-2`,onClick:()=>{e.onConfirm&&e.onConfirm(n)},children:t("closeQuickTranslation.confirm")})]})]})}function Hk(e){let{selected:t,title:n,description:r,onLinkClick:a}=e,o=zk(r||"");return d("div",{class:"flex items-center clickable",style:"padding: 8px 0",onClick:e.onClick,children:[d("div",{class:t?`${Oo}-radio-sel`:`${Oo}-radio-nor`,children:d("div",{})}),d("div",{class:"ml-2 text-sm",children:[d("span",{children:n}),r?d("small",{class:"muted text-sm",children:o.map(i=>i.type==="text"?i.value:d("a",{onClick:()=>i.href&&a&&a(i.href),children:i.value}))}):null]})]})}function zk(e){let t=[],n=/((.*?)<\/a>)|([^<]+)/g,r=Array.from(e.matchAll(n));for(let a of r){let o=a[2],i=a[3],s=a[4];o&&i?t.push({type:"link",href:o,value:i}):s&&t.push({type:"text",value:s})}return t}m();var No=`${ee}-float-ball`;function By(e){let{t}=W(),n=a=>{a&&a.target&&a.target.id==="immersive-translate-popup-overlay"&&e.onClose()},r=Re(()=>{let a={position:"fixed",top:e.top+60};return e.fixedPosition=="left"&&(a.left=48),e.fixedPosition=="right"&&(a.right=48),a},[e.top,e.fixedPosition]);return e.visible?d("div",{onClick:n,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:`${No}-guide-container`,style:r,children:[d("img",{class:`${No}-guide-bg ${e.fixedPosition}`,src:qk}),d("div",{class:`${No}-guide-content ${e.fixedPosition}`,children:[d("img",{class:`${No}-guide-img`,src:yr("images/float_ball_intro.png")}),d("div",{class:`${No}-guide-message`,children:[t("floatBall.guideClickToTranslate"),it().any?` +${t("floatBall.longPress")}`:""]}),d("div",{class:`${No}-primary-btn ${No}-guide-button`,onClick:e.onClose,children:t("floatBall.iKnow")})]})]})}):null}var qk="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEyIiBoZWlnaHQ9IjM3MiIgdmlld0JveD0iMCAwIDMxMiAzNzIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSBtZWV0Ij4KPGcgZmlsdGVyPSJ1cmwoI2ZpbHRlcjBfZF8zNjQ4XzEyODAyKSI+CjxwYXRoIGQ9Ik0yMCAzNkMyMCAyNC45NTQzIDI4Ljk1NDMgMTYgNDAgMTZIMjU4LjkxNEMyNjkuOTU5IDE2IDI3OC45MTQgMjQuOTU0MyAyNzguOTE0IDM2VjE3My4wNzVMMjg5LjEyOCAxNzguNzQyQzI5MS43NzggMTgwLjIxMyAyOTEuODk0IDE4My45ODIgMjg5LjMzOSAxODUuNjEyTDI3OC45MTQgMTkyLjI2M1YzMjhDMjc4LjkxNCAzMzkuMDQ2IDI2OS45NTkgMzQ4IDI1OC45MTQgMzQ4SDQwQzI4Ljk1NDMgMzQ4IDIwIDMzOS4wNDYgMjAgMzI4VjM2WiIgZmlsbD0idXJsKCNwYWludDBfbGluZWFyXzM2NDhfMTI4MDIpIi8+CjwvZz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8zNjQ4XzEyODAyIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzExLjE4OCIgaGVpZ2h0PSIzNzIiIGZpbHRlclVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj4KPGZlRmxvb2QgZmxvb2Qtb3BhY2l0eT0iMCIgcmVzdWx0PSJCYWNrZ3JvdW5kSW1hZ2VGaXgiLz4KPGZlQ29sb3JNYXRyaXggaW49IlNvdXJjZUFscGhhIiB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMTI3IDAiIHJlc3VsdD0iaGFyZEFscGhhIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIxMCIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzM2NDhfMTI4MDIiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMzY0OF8xMjgwMiIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzM2NDhfMTI4MDIiIHgxPSIxNTcuNSIgeTE9IjE2IiB4Mj0iMTU3LjUiIHkyPSIzNDgiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj4KPHN0b3Agc3RvcC1jb2xvcj0iI0ZGOTJCQyIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IndoaXRlIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==";m();function Wk({isVisible:e,onClose:t,children:n}){return d(xe,{children:[e&&d("div",{className:`immersive-translate-sheet-backdrop ${e?"visible":""}`,onClick:t}),d("div",{className:`immersive-translate-sheet ${e?"visible":""}`,children:d("div",{className:"immersive-translate-sheet-content",children:n})})]})}var Ry=Wk;var Mu=`${ee}-float-ball`;function t4(e){let{t}=W(),n=Ve(),[r,a,o,i]=n;vt(r,a);let s=Qt(r),u=On(s),{isFullScreen:l}=_y(),[c,g]=$(!1),[p,f]=$(!0),{pageStatus:h}=ky(),y=ou(u,r),C=Ne(()=>{if(y?.clickType==="popup")return g(!0);if(y?.clickType==="translate"){let _=Ae();if(Mo(u?.rule)){let F=Ra(u.rule);Mi(!0,F||_);return}Wn({method:"toggleTranslatePage",data:{trigger:"float_ball"}})}},[y,Wn,g]),b=Ne(()=>{g(!0)},[g]),x=p&&!!s,{containerRef:S,active:A,ballRef:P,floatBallConfigRef:w,setActive:v}=Ay({handleBallClick:C,handleMobileBallLongPress:b,isShow:x,localConfig:e.localConfig,popupVisible:c}),L=y?.fixedPosition||"right",D=L==="right"?"left":"right",{isShowGuide:T,handleCloseGuide:j}=My(e.ctx),{closeTransform:R,logoContainerTransform:M,settingTransform:O}=Ly(y,A||T),{tooltipDelay:N,disableTooltipDelay:H,tooltipText:B,handleShowTooltip:k}=Py(u,h);return x?d("div",{class:`${Mu}-container ${L} notranslate`,style:{zIndex:l?-1:2147483647,pointerEvents:A||T||c?"all":"none"},ref:S,children:[d($k,{ctx:u,setVisible:f,closeTransform:R,setActive:v,getModalStyle:()=>Iy(w.current.top,300,L)}),d(tr,{enableMobile:!0,text:B,position:D,delay:N,onShow:k,disable:H,children:d("div",{class:`${Mu}-btn ${L} btn-animate `,ref:P,style:{transform:M,opacity:A||T?1:.5},children:d("div",{children:[d(Va,{type:"logo"}),h!=="Original"?d(Va,{type:"translated"}):null]})})}),d("div",{style:{marginTop:"12px",transform:O},class:`${Mu}-more-buttons btn-animate`,children:[d(tr,{text:t("translateFileTooltip"),multiple:!0,width:200,position:D,containerClass:"btn-animate",children:d("div",{class:`${Mu}-more-button`,onClick:()=>{k0(J2,!0)},children:d(Va,{type:"file"})})}),d(tr,{text:t("floatBall.setting"),position:D,containerClass:"btn-animate",children:d("div",{class:`${Mu}-more-button`,onClick:()=>{v(!0),g(!0)},children:d(Va,{type:"setting"})})})]}),d(Vk,{onClose:()=>{v(!1),g(!1)},visible:c,getModalStyle:()=>Iy(w.current.top,500,L)}),d(By,{visible:T,top:w.current.top,fixedPosition:L,onClose:()=>{j(),v(!1)}})]}):null}function $k(e){let{t}=W(),[n,r]=$(!1),a=Ve(),[o,i,s,u]=a,l=ou(e.ctx,o),c=Ne(p=>{e.ctx&&i(f=>n0({...f},p))},[e.ctx,i]),g=Ne(p=>{l&&(e.setVisible(!1),p==="AlwaysClose"?c({...l,enable:!1}):p==="CurrentWebsite"&&c({...l,blockUrls:[...l.blockUrls,globalThis.location.hostname]}))},[c,l,e.setVisible]);return d(xe,{children:[d("div",{title:t("floatBall.close"),class:"btn-animate",style:{transform:e.closeTransform,padding:4},onClick:()=>{e.setActive(!0),r(!0)},children:d(Va,{type:"close"})}),d(Fy,{visible:n,onClose:()=>{e.setActive(!1),r(!1)},getModalStyle:e.getModalStyle,onCloseConfirm:g})]})}function Vk(e){let t=r=>{r&&r.target&&r.target.id==="immersive-translate-popup-overlay"&&e.onClose()};return window.innerWidth<=385?d(Ry,{isVisible:e.visible,onClose:e.onClose,children:d(tc,{onClose:e.onClose,className:"popup-container-sheet"})}):e.visible?d("div",{onClick:t,id:"immersive-translate-popup-overlay",class:"immersive-translate-popup-overlay",children:d("div",{class:"immersive-translate-popup-wrapper",style:e.getModalStyle(),children:d(tc,{onClose:e.onClose})})}):null}function Kk(){return{width:Math.max(document.documentElement.clientWidth,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight,window.innerHeight||0)}}var Iy=(e,t,n)=>{let a=Kk().height,o={position:"fixed"},i=0;return s2()&&(e=Gk.top),o.top=e-i,o.top+t>=a?(o.bottom=30,delete o.top):o.top<=10&&(o.top=10),n==="left"?o.left=65:o.right=65,o},Gk={position:"right",right:0,top:335};function Yk(e,t){for(let n of t){if(me()&&!Zr()&&typeof GM!==void 0&&GM.addElement){GM.addElement(e,"style",{textContent:n});continue}e.appendChild(document.createElement("style")).textContent=n}}async function Oy(){let e=Pe(),t=await er(),n=await pr(),r={url:globalThis.location.href,config:t},a=await bn(r),o=await Qg(a,n),i=_t(a.url,o?.blockUrls),s=await qt();if(!o?.enable||i)return;let u=document.createElement("div");u.id="immersive-translate-popup",u.setAttribute("style","all: initial"),document.documentElement.appendChild(u);let l=u.attachShadow({mode:"open"}),c=[e.IMMERSIVE_TRANSLATE_PICO_CSS,e.IMMERSIVE_TRANSLATE_COMMON_CSS,e.IMMERSIVE_TRANSLATE_POPUP_CSS,e.IMMERSIVE_TRANSLATE_PAGE_POPUP_CSS].join(` +`);return Yk(l,[c]),Jk(l,t,s,a)}function Jk(e,t,n,r){let a=document.createElement("div");a.id="mount",a.style.display="block",e.appendChild(a),la(d(qi,{lang:t.interfaceLanguage,fallbackLang:"en",translations:wi,children:d(t4,{localConfig:n,ctx:r})}),a)}var Ny=!1;async function Uy(){Ny||(Ny=!0,Oy().catch(e=>{I.error("init popup error",e)}))}var jy=!1,Wy=[()=>{Ut.unbind()}],Hy=[...Wy],Qk=or(async()=>{await Li()},50),Zk=or(async()=>{await D0()},50),Xk=or(async()=>{await t6()},50),eA=or(async()=>{await e6()},50),$y=or(e=>{Wn({method:e,data:{trigger:"userscript_menu"}})},50);function tA(e,t){let n=e.document;if(jy)return;jy=!0,me()||K9(),n.addEventListener("securitypolicyviolation",gA),document.addEventListener(be+"DocumentMessageUser",Jy),document.addEventListener(be+"DocumentMessageUpdateUser",Qy),document.addEventListener(be+"ChangeSuccessService",Zy.bind(null,t)),document.addEventListener(be+"ChangeService",Xy.bind(null,t)),document.addEventListener(ho,lA.bind(null,t)),n.addEventListener(be+"EbookLoaded",dA),n.addEventListener(f2,cA.bind(null,t)),n.addEventListener(h2,mA.bind(null,t)),n.addEventListener(Pl,a=>{ot()||o4(a,t)}),n.addEventListener(y2,tC),n.addEventListener("click",a=>{aA(a,t)}),ot()&&e.addEventListener("message",rA,!1),me()&&(ot()||n.addEventListener(Yr,nA)),ot()||ja.rootIframe(Hl).handleAsk("throttleRequest",X6)}function Vy(e,t){pA(),tA(t,e),me()&&(ot()||(Gp(e.config),fA(e.config))),Ea()&&nC(e),$e()&&Gp(e.config)}function nA(e){Uy()}function rA(e){let t=e;t&&t.data&&t.data.payload&&t.data.author===Ml&&Ia(t.data.payload,{tab:{id:1,url:"https://www.fake-iframe.com",active:!0}})}function aA(e,t){let n=e.target;if(!n||!n.getAttribute){Ka(n);return}let r=n.getAttribute("data-immersive-translate-event");r&&pt(r,[{name:r}],{...t,sourceLanguage:"none"});let a=n.getAttribute(`data-${ee}-action`);if(a){if(e.preventDefault(),a==="retry"){typeof e.stopPropagation=="function"&&e.stopPropagation(),n4({method:"retryFailedParagraphs"}),Ka(n,!0);return}else if(a=="toast-error"){let o=n.getAttribute(`data-${ee}-tooltip-text`)||"",i="",s="retry";try{let u=JSON.parse(o);i=u.title,o=u.errMsg,s=u.action}catch{}Ky(Gy.bind(null,t,i,o,s));return}}}async function oA(){let e=await An(),t=e.enableDefaultAlwaysTranslatedUrls===void 0?!0:e.enableDefaultAlwaysTranslatedUrls;if(e.enableDefaultAlwaysTranslatedUrls=!t,!e.enableDefaultAlwaysTranslatedUrls){let n=e&&e.isChangedAlwaysTranslatedUrls,r=[];e.translationUrlPattern&&e.translationUrlPattern.matches&&(r=e.translationUrlPattern.matches||[]),!n&&r.length>0&&(e.translationUrlPattern={matches:[],excludeMatches:[]})}await kn(e)}async function iA(){let e=await An(),t=e.enableInputTranslation;e.enableInputTranslation=!t,await kn(e)}var zy=0;function Ky(e){let t=Date.now();if(t-zy<2e3||(zy=t,sA()))return;let n=`${ee}-modal-root`,r=`${ee}-modal`,a=document.getElementById(n),o=`${ee}-modal-title`,i=`${ee}-modal-body`,s=`${ee}-modal-footer`,u;if(a){u=a.shadowRoot.querySelector(`.${r}`);let l=u.querySelector(`.${o}`),c=u.querySelector(`.${s}`),g=u.querySelector(`.${i}`);e(u,l,g,c)}else{a=document.createElement("div"),a.setAttribute("translate","no"),a.className="no-translate immersive-translate-error-modal-shadow-root",a.id=n,a.style.all="initial",a.style.zIndex="2147483647",document.body.appendChild(a);let l=a.attachShadow({mode:"open"}),c=document.createElement("style"),g=Pe();c.textContent=g.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,l.appendChild(c),u=document.createElement("div"),u.className=r+" notranslate",u.id=r;let p=document.createElement("div");p.className=ee+"-modal-content notranslate",u.appendChild(p);let f=document.createElement("span");f.textContent="\xD7",f.className=ee+"-close",p.appendChild(f);let h=document.createElement("div");h.className=o+" notranslate",p.appendChild(h);let y=document.createElement("div");y.className=i+" notranslate",p.appendChild(y);let C=document.createElement("div");C.className=s,p.appendChild(C),l.appendChild(u),f.onclick=function(){u.style.display="none"},l.addEventListener("click",b=>{b.target==u&&(u.style.display="none")}),e(u,h,y,C)}setTimeout(()=>{uA()},100)}function Gy(e,t,n,r="retry",a,o,i,s){let u=Ht.bind(null,e),l=t||u("errorModalTitle"),c=u("unknownError");o.innerText=l,i.innerHTML=nt.sanitize(n||c,{ADD_ATTR:["target"]}),s.innerText="";let g="",p=document.createElement("button");if(r=="retry"){g=u("retryAllButton"),p.setAttribute(`data-${ee}-action`,"retry");let f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("viewBox","0 0 16 16"),f.setAttribute("width","20"),f.setAttribute("height","20"),f.innerHTML='',p.appendChild(f),p.onclick=()=>{a.style.display="none",n4({method:"retryFailedParagraphs"}),Ka(p,!0)}}else if(r=="login")g=u("goLogin"),p.onclick=()=>{Ka(p,!0),window.open(j2)};else if(r=="upgrade")g=u("upgradeToPro"),p.onclick=()=>{Ka(p,!0),window.open(Wl)};else if(r=="setting")g=u("goSettings"),p.onclick=()=>{Ka(p,!0),window.open(Se.OPTIONS_URL)};else if(r=="changeService")g=u("detectServiceLoading"),p.onclick=()=>{Ka(p,!0),window.open(Se.OPTIONS_URL)},a4(e,e.config.translationService,!1).then(f=>{f?(g=u("toggleToService",{service:u("translationServices."+f)}),p.innerHTML=nt.sanitize(g),p.onclick=()=>{eC(f),Ka(p,!0)}):(g=u("goSettings"),p.innerHTML=nt.sanitize(g))});else if(r=="none")return;p.className="immersive-translate-btn",p.innerHTML+=nt.sanitize(g),s.appendChild(p)}function sA(){let e=document.querySelector("#immersive-translate-modal-root");return e&&e.shadowRoot?e.shadowRoot.querySelector(`#${ee}-modal`)?.style.display=="block":!1}function uA(){let e=document.querySelector("#immersive-translate-modal-root");if(e&&(e.style.display="block",e.shadowRoot)){let t=e.shadowRoot.querySelector(`#${ee}-modal`);t&&(t.style.display="block")}}function Ka(e,t=!1){let n=document.querySelector("#immersive-translate-modal-root");if(!n||n.style.display=="none")return;let r=n.shadowRoot.querySelector(`#${ee}-modal`);r&&r!==e&&(!t&&r.contains(e)||(r.style.display="none"))}function lA(e,t){let n=t;if(n&&n.detail)try{let r=n.detail;if(!r||!r.type)return;let{title:a,errMsg:o,action:i}=r;Ky(Gy.bind(null,e,a,o,i))}catch(r){I.warn("parse message error",r)}}async function cA(e,t){let n=t;if(I.debug("receive third party message",n),n&&n.detail){let r=null;try{let a=JSON.parse(n.detail);if(a&&a.type){if(a.type==="retryFailedParagraphs")n4({method:"retryFailedParagraphs"});else if(a.type==="updateCommands")n6(a.data);else if(a.type==="toggleEnableDefaultAlwaysTranslatedUrls")oA();else if(a.type==="toggleEnableInputTranslation")iA();else if(a.type==="translatePage")hA(a.data);else if(a.type==="getAsyncTranslationServiceList")r=vo(e,"translationService");else if(a.type==="getAsyncTargetLanguageList")r=za(a.data?.translationService,a.data?.targetLanguage);else if(a.type==="getAsyncTranslationMeta"){let o=e.state.translationService||e.config.translationService;r={targetLanguage:e.state.targetLanguage||e.targetLanguage,translationService:o,translationMode:e.state.translationMode}}else if(a.type=="getAsyncTranslateContent"){let o={...e,translationService:a.data.service};try{r=await bA(a.data,o)}catch(i){qy(a.type,i.uiConfig(o),a.id)}}else a.type==="getAsyncLanguageByText"?r=await S0(a.data):a.type==="sharePage"?o4({detail:a.data},e):a.type==="switchTranslationMode"?r4(a.data):$y(a.type);r&&a.id&&qy(a.type,r,a.id)}}catch(a){I.warn("parse message error",a)}}}function dA(e){setTimeout(()=>{Yy()},10)}function gA(e){Se.HAS_CSP_ERROR="1"}function mA(e,t){let n=t.detail;(n.name=="open_pdf_page"||n.name==="open_html_page")&&pt(n.name,[{name:n.name}],{...e})}function pA(){Hy.forEach(e=>{e()}),Hy=Wy}function fA(e){if(me()&&typeof GM<"u"&&GM&&GM.registerMenuCommand){let t=Vl.commands,a=[...Object.keys(t).filter(o=>o==="toggleTranslatePage").map(o=>{let i=t[o].description,s=i;return i.startsWith("__MSG_")&&i.endsWith("__")&&(s=Ma(`browser.${i.slice(6,-2)}`,e.interfaceLanguage)),{id:o,title:s}}),{id:Hs,title:Ma("browser.openEbookViewer",e.interfaceLanguage),key:"e"},{id:zs,title:Ma("browser.openEbookBuilder",e.interfaceLanguage),key:"m"},{id:js,title:Ma("browser.openOptionsPage",e.interfaceLanguage),key:"o"},{id:Sg,title:Ma("browser.openAboutPage",e.interfaceLanguage),key:"a"}];for(let o of a)GM.registerMenuCommand(o.title,()=>{o.id===js?Qk():o.id===Sg?Zk():o.id===zs?Xk():o.id===Hs?eA():$y(o.id)},o.key)}}function n4(e){Ia(e,{tab:{id:1,url:"https://www.fake.com",active:!0}}).catch(n=>{I.error("send content message request failed",e,n)});let t=new CustomEvent(Yr,{detail:e});globalThis.document.dispatchEvent(t)}async function hA(e){let t={};e?.translationMode&&(t.translationMode=e.translationMode),e?.translationService&&(t.translationService=e.translationService),e?.targetLanguage&&(t.targetLanguage=e.targetLanguage),e?.translationStartMode&&(t.translationStartMode=e.translationStartMode);let n=await Ye(Ae(),t);_n(n)}function qy(e,t,n){globalThis.document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({id:n,type:e,payload:t})}))}async function bA({textList:e,from:t,to:n,service:r},a){if(a.rule.id!=="immersive")return;let o=e.map(s=>({text:s||"",id:0,from:t,to:n,url:a.url,fromByClient:t,force:!0})),i=null;try{let s=await et({sentences:o},{...a,translationService:r},u=>i=u);if(i)throw i;return s}catch(s){throw s}}m();var Uo={};async function i4(){let t=[...document.querySelectorAll(".source-text")].map(r=>r.textContent).join(""),n=await Oe({text:t,minLength:200,pageLangs:[kt(),"en"]});return Xn(n),n}async function rC(e){Dn("Translating");let t=Mt(),n=y0(),r=[...document.querySelectorAll(".source-text")];if(Ci(e,t))return;let a=r.filter(o=>o.innerText?.trim()).map((o,i)=>{let s=o.parentElement?.parentElement?.querySelector(".target-text");return yt(o,"id",i+""),s&&(Ti(s,i)?.remove(),s.appendChild(ru(e,i))),{text:o.innerText||"",id:i,from:t,to:e.targetLanguage,url:"https://google.com",fromByClient:n,force:!0}});document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await et({sentences:a},{...e,sourceProgram:"subtitle"},(o,i,s)=>{let u=s.id,l=Ti(document.body,u);if(!l)return;let c=l.parentElement;c&&(l.remove(),o?(c.innerHTML=nt.sanitize(`${o.message}`),Uo[u]={ok:!1,sentence:s}):i&&(c.innerHTML=nt.sanitize(i.text),Uo[u]={ok:!0,sentence:s}),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!o}})})))})}catch(o){throw o}finally{Dn("Translated")}}async function aC(e){Dn("Translating"),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(Uo),n=[],r=[];for(let a of t){let o=Uo[a];if(!o.ok){let s=document.querySelector(`#error-id-${a}`);if(s){let u=s.parentElement;s.remove(),u&&(delete Uo[a],u.appendChild(ru(e,a)),r.push(o.sentence))}}}try{await et({sentences:r},e,(a,o,i)=>{let s=i.id,u=Ti(document.body,s);if(!u)return;let l=u.parentElement;l&&(u.remove(),a?(l.innerHTML=nt.sanitize(`${a.message}`),Uo[s]={ok:!1,sentence:i}):o&&(l.innerHTML=nt.sanitize(o.text),Uo[s]={ok:!0,sentence:i}),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"paragraphTranslated",payload:{ok:!a}})})))})}catch(a){throw a}finally{Dn("Translated")}}function s4(){Dn("Original"),document.querySelectorAll(".target-text").forEach(e=>{e.innerHTML=""})}m();var u4={};async function oC(){let e=[...document.querySelectorAll("iframe")],t="";for(let r of e){let a=r.contentDocument;if(!a)continue;let o=a.body;if(o&&(t=t+o.innerText||"",t.length>1e3))break}let n=await Oe({text:t,pageLangs:["en"]});return Xn(n),n}async function iC(e){Dn("Translating"),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let t=Object.keys(u4),n=[];for(let r of t){let a=u4[r];if(a.error){let i=a.commonAncestorContainer.querySelector(`[${Bl}='${r}']`);i&&i.remove(),n.push(a)}}try{Au(),await Q0(n,e,e.state.translationMode||e.config.translationMode)}catch{}finally{Dn("Translated")}}function sC(){let e=[...document.querySelectorAll("iframe")];for(let t of e){let n=t.contentDocument;if(!n)continue;let r=n.querySelectorAll("."+Lt);for(let a of r)a.remove()}Dn("Original")}async function uC(e){Dn("Translating");let t=Gs(),n=[...document.querySelectorAll("iframe")],r=[],a=[];for(let s of n){let u=s.contentDocument;if(!u)continue;_a(u,e);let l=u.body;if(!l)continue;let c=yn(e);c.isModifyImage=!1,ia({id:t,container:l,filterRule:c,onParagraph:g=>{r.push(g)}})}let o=Lr(e.config.translationServices[e.translationService]),i=1;for(let s of r){let u=m0(s.flatNodes,{isPreWhitespace:s.isPreWhitespace||!1,delimiters:o,stayOriginalSelectors:e.rule.stayOriginalTags.concat(e.rule.stayOriginalTags).map(c=>c.toLowerCase()).concat(e.rule.stayOriginalSelectors).concat(e.rule.additionalStayOriginalSelectors)});if(!u)continue;s.variables=u?.variables||{},s.text=u?.text,s.id=(i++).toString();let l=await Hp(e,s,{excludeLanguages:e?.config?.translationLanguagePattern?.excludeMatches||[],isDetectParagraphLanguage:e.state.isDetectParagraphLanguage,targetLanguage:e.targetLanguage,delimiters:o,noTranslateRegexp:e.rule.noTranslateRegexp,minTextCount:2,minWordCount:1,ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW});l&&(a.push(l),u4[l.id]=l)}r=[],document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"totalParagraphsCount",payload:{totalParagraphsCount:a.length}})}));try{await Q0(a,e,e.state.translationMode||e.config.translationMode)}catch{}finally{Dn("Translated")}}m();var Cr=!1,nc,lC=!1,rc=null;function dC(e){let{config:t}=e;if(e.isInputTranslationExcludeUrl){I.debug("exclude url for input");return}if(rc===!1){I.debug("disable for this time");return}let n={...t.inputLanguageCodeAlias};Bn.forEach(c=>n[c]=[c,...n[c]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;it().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=0,s=Date.now();nc&&self.removeEventListener("keydown",nc),nc=u,self.addEventListener("keydown",nc);function u(c){if(Cr||rc===!1)return;let g=c,p=g.target||g.srcElement,f=p?.tagName;(p?.isContentEditable||f=="INPUT"||f=="SELECT"||f=="TEXTAREA")&&(MA(c,o.triggerKey,o.codePrefixAlias)?l(c):i=0)}async function l(c){Date.now()-s=o.triggerTimes&&TA()&&(i=0,CA(c,e,o))}PA(e)}function gC({codePrefix:e,flatAlias:t,codePrefixAlias:n}){let r=[],a=n[e]||[];a.includes(e)||a.unshift(e);for(let o of a){let i=t.map(s=>{let u=o+s;return a.includes(s)||(u+=" "),u});r.push(...i)}return new RegExp(r.join("|"))}function ac(e,t){for(let[n,r]of Object.entries(t))if(r.includes(e))return n;return""}var Yi;function mC(e){let t=e.parentElement;if(!t)return;Yi=document.createElement("div"),Yi.className=ee+"-input",Yi.innerHTML=`
`,t.appendChild(Yi);let n=t,r=!1;do{let a=getComputedStyle(n).position;if(["fixed","absolute","relative"].includes(a)){r=!0;break}n=n.parentElement}while(n);if(n=t,!r)do{if(getComputedStyle(n).position==="static"){n.style.position="relative";break}n=n?.parentElement||null}while(n)}function pC(){Yi&&Yi.remove()}async function yA(e){if(!Cr)try{let h=function(){c=e.config.inputTargetLanguage;let C=l.split(" ")[0];C&&C[0]&&(C=C[0].toLowerCase()+C.slice(1)),C.trim()&&o.flatAlias.includes(C)?(c=ac(C,o.codeAlias),u=l.slice(C.length+1)):u=l},y=function(){c="";let C=gC(o),b=l.split(C);if(b.length<2)return;if(u=b[b.length-1],s=b[0],b.length>2){let S=l.lastIndexOf(u),A=l.slice(0,S).lastIndexOf(b[b.length-2]);s=l.slice(0,A+b[b.length-2].length)}if(s.endsWith(o.codePrefix))return;if(s.endsWith(":")&&o.codePrefix=="/"){s="",u="";return}let x=l.slice(s.length+1,l.indexOf(u)).trim();if(c=ac(x,o.codeAlias),!c){I.warn("not found alias",x);return}},{config:t}=e,n={...t.inputLanguageCodeAlias};Bn.forEach(C=>n[C]=[C,...n[C]||[]]);let r=t.inputStartingTriggerKeyAlias[t.inputStartingTriggerKey]||[];r.includes(t.inputStartingTriggerKey)||r.unshift(t.inputStartingTriggerKey),n[t.inputTargetLanguage]=[...r,...n[t.inputTargetLanguage]];let a=t.inputTrailingTriggerKeyTimeout;it().any&&(a=t.inputTrailingMobileTriggerKeyTimeout);let o={triggerTimes:t.inputTrailingTriggerKeyRepeatTimes,triggerKey:t.inputTrailingTriggerKey,triggerTimeout:a,codePrefix:t.inputStartingTriggerKey,codeAlias:n,flatAlias:Object.values(n).flat(),codePrefixAlias:t.inputStartingTriggerKeyAlias},i=document.activeElement;if(!i||i.tagName==="BODY")return;Cr=!0;let s="",u="",l=Ga(i)||"",c=e.config.inputTargetLanguage;e.config.inputStartingTriggerKey==="none"?h():(y(),!c&&e.config.enableInputTranslationWithoutTriggerKey&&h());let g=fC(u,o),p=await Oe({text:g,pageLangs:["en"]});I.debug("translateContent",g,p);let f={text:g||"",id:0,from:p,to:c,url:"https://google.com",fromByClient:p,force:!0};if(!f.text||f.text.length>5e3)return;mC(i),at(Fl,Date.now());try{let C=await Mr(f,{...e,translationService:e.inputTranslationService});bC(e),hC(e,i,s+C.text)}catch(C){if(C instanceof J){let b=C.uiConfig(e);b.action=="retry"&&(b.action="none"),document.dispatchEvent(new CustomEvent(ho,{detail:b}))}}finally{Cr=!1}}catch(t){throw Cr=!1,t}finally{Cr=!1,pC()}}async function CA(e,t,n){if(!Cr)try{let g=function(){s=t.config.inputTargetLanguage;let f=i.split(" ")[0];f&&f[0]&&(f=f[0].toLowerCase()+f.slice(1)),f.trim()&&n.flatAlias.includes(f)?(s=ac(f,n.codeAlias),o=i.slice(f.length+1)):o=i},p=function(){s="";let f=gC(n),h=i.split(f);if(h.length<2)return;if(o=h[h.length-1],a=h[0],h.length>2){let C=i.lastIndexOf(o),b=i.slice(0,C).lastIndexOf(h[h.length-2]);a=i.slice(0,b+h[h.length-2].length)}if(a.endsWith(n.codePrefix))return;if(a.endsWith(":")&&n.codePrefix=="/"){a="",o="";return}let y=i.slice(a.length+1,i.indexOf(o)).trim();if(s=ac(y,n.codeAlias),!s){I.warn("not found alias",y);return}},r=document.activeElement;Cr=!0;let a="",o="",i=Ga(r)||"",s=t.config.inputTargetLanguage;n.codePrefix==="none"?g():(p(),!s&&t.config.enableInputTranslationWithoutTriggerKey&&g());let u=fC(o,n),l=await Oe({text:u,pageLangs:["en"]});I.debug("translateContent",u,l);let c={text:u||"",id:0,from:l,to:s,url:"https://google.com",fromByClient:l,force:!0};if(!c.text)return;if(t.config.isShowInputTranslationConsent&&!lC){lC=!0;let f=await FA(t);if(e.target&&e.target.focus(),f==="open_settings"){Li(!0,"#input");return}else if(f==="open_learn_more"){_i("https://immersivetranslate.com/docs/input/");return}else if(f==="disable_once"||f==="disable_forever"){if(rc=!1,f==="disable_forever"){let h=await An();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}else if(f==="disable_once"){let h=await An();h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(f==="close_disable_once"||f==="close_disable_forever"){if(rc=!1,f==="close_disable_forever"){let h=await An();h.enableInputTranslation=!1,h.isShowInputTranslationConsent=!1,await kn(h)}return}else if(f==="enable"){let h=await An();h.enableInputTranslation=!0,h.isShowInputTranslationConsent=!1,await kn(h)}else if(f==="close_enable"){let h=await An();h.enableInputTranslation=!0,await kn(h)}}mC(r),at(Fl,Date.now());try{let f=await Mr(c,{...t,translationService:t.inputTranslationService});bC(t),hC(t,r,a+f.text)}catch(f){if(f instanceof J){let h=f.uiConfig(t);h.action=="retry"&&(h.action="none"),document.dispatchEvent(new CustomEvent(ho,{detail:h}))}}finally{Cr=!1}}catch(r){throw Cr=!1,r}finally{Cr=!1,pC()}}function TA(){let e=document.activeElement;if(!e)return!1;if(oc(e)){let t=e.selectionStart||0,n=e.value.length,a=e.value.split(` `).reverse()[0].trim(),o=n<=t;return I.debug("cursorPosition",t,"textLength",n),I.debug("input isTail",o,"tailHasText",a),o&&!!a}else{let t=window.getSelection();if(!t)return I.debug("No active selection found."),!1;if(t.rangeCount>0){let n=t.getRangeAt(0),r=n.startContainer;if(r.nodeType===Node.TEXT_NODE){let a=vA(r,e);I.debug("Current text node:",r.textContent),I.debug("Cursor position within text node:",n.startOffset);let o=r.textContent?.length===n.startOffset&&a,i=e.innerText?.split(` -`).reverse(),s=We()?i[0]||i[1]:i[0];return I.debug("editdiv isTail",o,"tailHasText",s),o&&!!s}else I.debug("Cursor is not within a text node.")}}return!1}function vA(e,t){let n;function r(a){if(a.nodeType===Node.TEXT_NODE)n=a;else for(let o of a.childNodes)r(o)}return r(t),n==e}function fC(e,t){let{triggerTimes:n,triggerKey:r}=t,a=0,o=" ";r.length==1?(a=n,o=r):r.toLowerCase()=="space"&&(a=n);let i=e.length;for(let s=e.length-1;s>=e.length-a;s--){if([10,8629].includes(e[s].charCodeAt(0))){i--;continue}if(![...t.codePrefixAlias[r]||[],o].includes(e[s]))break;i--}return e.length-i<3&&[".","\u3002"].includes(e[i-1])&&i--,e.slice(0,i)}function xA(e,t){let n=t.innerHTML,r=Ga(t);return{html:n.replace(r,e),text:e}}function cC(e,t,n=!1){let r=Ga(t);return n?r.trim().endsWith(e.text.trim()):r?.trim()?.indexOf(e?.text?.trim())>=0}function Ga(e){return e.value||e.innerText||e.textContent}async function Ya(e){await new Promise((t,n)=>{setTimeout(()=>{t("")},e)})}async function EA(e,t,n){await Ya(10);let r=new DataTransfer;e.forEach(a=>{a==="plain"&&r.setData("text/plain",t.text)}),n.dispatchEvent(new ClipboardEvent("paste",{clipboardData:r,bubbles:!0,cancelable:!0})),r.clearData(),await Ya(10)}async function SA(e,t){let n=document.createEvent("TextEvent");n.initTextEvent&&(n.initTextEvent("textInput",!0,!0,window,e.text),t.dispatchEvent(n),await Ya(10))}async function wA(e,t){t.value&&t.select(),document.execCommand("insertText",!1,e.text.replace(/\n/g,"\r")),await Ya(20),(t.value||t.value==="")&&(t.value=e.text)}async function DA(e,t){oc(t)&&(t.value=e.text,t.dispatchEvent(new Event("input",{bubbles:!0})),await Ya(20))}var kA=[EA.bind(null,["plain"])];function AA(e){let t;oc(e)?t=new InputEvent("beforeinput",{bubbles:!0,cancelable:!0,inputType:"deleteContent"}):t=new KeyboardEvent("keydown",{bubbles:!0,cancelable:!0,keyCode:8,which:8,location:0,key:"Backspace"}),e.dispatchEvent(t)}function oc(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"}function LA(e){if(oc(e))return;e.focus();let t=window.getSelection();if(!t)return;let n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}async function hC(e,t,n){await LA(t),await Ya(50);let r=e.rule.inputConfig,a=xA(n,t);try{r?.clearContentEnable&&AA(t),await Ya(50),r?.execCommandDeleteEnable&&!Zr()&&Ga(t)?.trim()!=""&&(document.execCommand("delete"),await Ya(50)),I.debug("clearContent",Ga(t))}catch(o){I.error(o)}for(let o of[...kA,wA,DA,SA]){await o(a,t);let i=_A();if(!i)return;if(I.debug("setContent",o.name,cC(a,i),Ga(i),a),cC(a,i))break}}function _A(){return document.activeElement}function bC(e){mt("translate_input",[{name:"translate_input",params:{input_trailing_trigger_key:e.config.inputTrailingTriggerKey,input_starting_trigger_key:e.config.inputStartingTriggerKey,input_target_language:e.config.inputTargetLanguage}}],e)}function MA(e,t,n){let r="";e&&e.code&&(r=e.code.toLowerCase());let a="";e&&e.key&&(a=e.key.toLowerCase());let o=e.keyCode,i=n[t]||[];return o===229&&t!=="space"?!1:!!(i.includes(r)||i.includes(a)||r===t||a===t)}async function PA(e){if(e.config.interfaceLanguage!=="zh-CN"||e.config.targetLanguage!=="zh-CN")return;let t="inputTutorialsShowedAt";if(await jt(t,"")||Number(await jt(Fl,0))>0)return;let a=e.rule.inputConfig,o=a.tutorialsSelectors,i=a.tutorialsText;if((o?.length||0)>0&&i)for(let s=0;s{BA()},100),new Promise(g=>{let p=g;if(i){let D=i.shadowRoot;if(!D)return;s=D.querySelector(`.${n}`);let T=s.querySelector(`.${r}`),j=s.querySelector(`.${o}`),R=s.querySelector(`.${a}`)}else{let D=document.createElement("div");D.setAttribute("translate","no"),D.className="no-translate immersive-translate-error-modal-input-shadow-root",D.id=t,D.style.all="initial",D.style.zIndex="2147483647",document.body.appendChild(D);let T=D.attachShadow({mode:"open"}),j=document.createElement("style"),R=Pe();j.textContent=R.IMMERSIVE_TRANSLATE_INPUT_INJECTED_CSS,T.appendChild(j),s=document.createElement("div"),s.className=n+" notranslate",s.id=n;let M=document.createElement("div");M.className=ee+"-modal-content notranslate "+ee+"-modal-content-in-input",s.appendChild(M);let O=document.createElement("span");O.textContent="\xD7",O.className=ee+"-close",M.appendChild(O),u=document.createElement("div"),u.className=r+" notranslate",M.appendChild(u),c=document.createElement("div"),c.className=a+" notranslate",M.appendChild(c),l=document.createElement("div"),l.className=o,M.appendChild(l),T.appendChild(s),O.onclick=function(){P(),g("close")},T.addEventListener("click",N=>{N.target==s&&(s.style.display="none",g("close"))})}document.addEventListener("keydown",L);let f=Ht.bind(null,e);u.innerHTML=`
${H0} ${f("modalEnableInputTranslationTitle")}
`,c.innerHTML="";let h=document.createElement("p");h.innerHTML=f("modalEnableInputTranslationDesc",{1:"https://immersivetranslate.com/docs/input/"}),h.style.cssText="margin-bottom:12px",c.appendChild(h);let y=document.createElement("div");y.style.cssText="margin-bottom: 12px;",y.innerHTML=tt.sanitize(f("disableInputTranslationTips",{option:`${f("option")}`,learnMore:`${f("learnMore")}`})),c.appendChild(y);let C=[{id:"enable-search-enhancement",value:"enable",text:f("continueEnalbeInputTranslation")},{id:"disable-once",value:"once",text:f("disableOnce")},{id:"disable-global",value:"global",text:f("disableGlobal")}];for(let D=0;D0&&await VA(e.rule.waitForSelectors,e.rule.waitForSelectorsTimeout),e.rule.isInjectOptionsUrl){let s=w0(),u=document.createElement("meta");u.name="immersive-translate-options-url",u.content=s;try{document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(l){I.warn("inject options url failed",l)}}if(e.rule.globalMeta&&Object.keys(e.rule.globalMeta).forEach(u=>{let l=document.createElement("meta");l.name=u,l.content=e.rule.globalMeta[u],document.head.appendChild(l)}),e.rule.initialGlobalAttributes&&Wb(document.body,e.rule.initialGlobalAttributes),e.rule.pageType=="pdfReader"){_n(e);return}if(e.config.arxivRule&&e.config.arxivRule.matches&&_t(e.url,e.config.arxivRule.matches)){let u=document.querySelector(e.config.arxivRule.injectContainerSelector);if(u){let l=document.querySelector(e.config.arxivRule.officialHtmlSelector),c="";if(l&&l.getAttribute&&l.getAttribute("href")){let C=l.getAttribute("href");try{let b=new URL(C);b.searchParams.set("_immersive_translate_auto_translate","1"),c=b.toString()}catch{}}let f=new URL(e.url).pathname.split("/").pop(),h=!1,y=!0;if(f)try{let b=f.split(".")[0],x=b.slice(0,2),S=b.slice(2,4),A=new Date(`20${x}-${S}-27`),P=new Date(e.config.arxivRule.validBefore);A${Ht(e,"viewWithImmersiveTranslate")}`,u.appendChild(C)}else{let C="";if(c&&(C=c),C){let b=document.createElement("li");b.innerHTML=`${Ht(e,"viewWithImmersiveTranslate")}`,u.appendChild(b)}}}}if(e.rule.isOnBoardingPage){document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"currentConfig",payload:{enableDefaultAlwaysTranslatedUrls:!!e.config.enableDefaultAlwaysTranslatedUrls}})}));let s=document.querySelector("#immersiveTranslateEnableDefaultAlwaysTranslatedUrlsValue");s&&(s.value="helloworld",s.value=String(!!e.config.enableDefaultAlwaysTranslatedUrls),s.dispatchEvent(new Event("change")))}CC||(CC=!0,at()&&e.rule.useIframePostMessage&&await Q6());let n=e.sourceLanguage;n==="auto"?n=await TC():Xn(n);let r=J1(e,n);if(r&&(e=await Ye(Ae(),{translationMode:r})),e.rule.isInjectMeta)try{let s=await K1(n),u=document.createElement("meta");u.name="immersive-translate-meta",u.content=Td(JSON.stringify(s)),document.head&&document.head.appendChild&&document.head.appendChild(u)}catch(s){I.warn("inject meta failed",s)}let a=new URL(e.url),i=a.searchParams.get("_immersive_translate_auto_translate")==="1"||a.searchParams.get("_immersive_translate_auto_translate")==="true"||e.state.isAutoTranslate||e.isTranslateUrl||e.rule.pageType=="pdfReader";if(!i&&!e.isTranslateExcludeUrl&&(I.debug(`detect page language: ${e.url} ${n}`),Sa(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto"||ty(n,e.config.translationLanguagePattern)&&(i=!0,I.debug(`match language pattern ${n}, auto translate`))),e.rule.pageType=="ebookBuilder"&&(i=!1),e.rule.pageType!=="pdfReader"&&To(t)&&Zi(e,window),i)ye.state.isAutoTranslate=!0,_n(ye);else if(I.debug("do not auto translate",e),e.rule.initTranslationServiceAsSoonAsPossible&&e.translationService==="deepl"){if(Sa(n,e.targetLanguage,{ignoreZhCNandZhTW:e.rule.ignoreZhCNandZhTW})||n==="auto")return;e.config&&e.config.translationServices&&e.config.translationServices.deepl&&e.config.translationServices.deepl.authKey&&typeof e.config.translationServices.deepl.authKey=="string"&&e.config.translationServices.deepl.authKey.startsWith("immersive_")&&(ic[e.translationService]||(ic[e.translationService]=!0,at()||sp(e).catch(s=>{I.warn("init translation engine error",s)})))}}async function g4(e){if(Ze()==="Original"){let t={};Qi&&(t.translationTheme=Qi),ye&&(t={...ye.state,...t});let n=await Ye(Ae(),t);if(e?.trigger=="right_menu"&&Mo(n?.rule)){let r=Ra(n.rule);Mi(!0,r||Ae());return}await _n(ye,e)}else(Ze()==="Translated"||Ze()==="Error")&&jo()}async function IA(){if(ye=await Ye(Ae(),{}),ye.rule.pageType=="ebookBuilder")return iC(ye);if(ye.rule.pageType=="subtitleBuilder")return aC(ye);wC()}async function m4(e){if(Ze()==="Original"){ye=await Ye(Ae(),{}),Qi||(Qi=ye.state.translationTheme);let t="mask";ye.state.translationTheme==="opacity"&&(t="opacity"),ye=await Ye(Ae(),{translationTheme:t}),await _n(ye,e)}else if(Ze()==="Translated"){let t="mask";ye?.state?.translationTheme==="opacity"&&(t="opacity");let n=W1().filter(o=>o.contentDocument?.body).map(o=>o.contentDocument.body),r=[ye.mainFrame,...n],a=ye?.state.translationTheme;for(let o of r){let i=Si(o,mi,!0);a==="mask"||a==="opacity"?i!=="none"?yt(o,mi,"none",!0):yt(o,mi,t,!0):i!=="mask"&&i!=="opacity"?yt(o,mi,t,!0):yt(o,mi,"none",!0)}}}async function TC(){let e=await Ye(Ae(),{});return e.rule.pageType=="subtitleBuilder"?s4():SC(e)}function OA(e){Ze()==="Original"?yC(e):Ho()}function NA(e){Ze()==="Original"?rC(e):u4()}function UA(e){Ze()==="Original"?Ji(e):Ho()}async function jo(){Pi(""),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"restorePage",payload:{}})}));let e=await Ye(Ae(),{});if(e.rule.pageType=="subtitleBuilder"){u4();return}else e.rule.pageType=="ebookBuilder"&&sC();Ho()}async function _n(e,t){e.config?.sentryConfig?.contentInitTime=="translate_page"&&(e.config?.sentryConfig,void 0);let n=Ze(),r={pageStatus:n,translateService:e.state.translationService||e.translationService,translationMode:e.state.translationMode};n!=="Original"&&await jo(),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"translateStart",payload:{}})})),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"targetLanguage",payload:{targetLanguage:e.targetLanguage}})})),ic[e.translationService]||(ic[e.translationService]=!0,at()||sp(e).catch(o=>{I.warn("init translation engine error",o)}));let a={};if(t&&t.trigger&&(a.trigger=t.trigger),mt("translage_page_daily",[{name:"translage_page_daily",params:a}],e),mt("translate_page",[{name:"translate_page",params:a}],{...e,sourceLanguage:Mt()}),e.rule.pageType=="subtitleBuilder"){NA(e),Pi("yes");return}if(e.rule.pageType=="ebookBuilder"){uC(e),Pi("yes");return}if(e.rule.pageType==="pdfReader"){OA(e),Pi("yes");return}UA(e),Pi("yes")}async function jA(e,t){let n=ye?.translationService;if(Ze()==="Original"||n!=e){ye=await Ye(Ae(),{translationService:e});let r=Ht(ye,"temprarilyChangeTranslationTo_"+e);Z0({text:r}),await _n(ye,t)}else{jo();let r=await er(),a={url:Ae(),config:r,state:{}},o=await bn(a);ye=await Ye(Ae(),{translationService:o.translationService})}}async function HA(e){Ze()==="Original"?await d4(e):(Ze()==="Translated"||Ze()==="Error")&&(ye=await Ye(Ae(),{}),ye.state.translationArea!=="main"?await d4(e):jo())}async function d4(e){ye=await Ye(Ae(),{translationArea:"main"}),await _n(ye,e)}async function vC(e){ye=await Ye(Ae(),{translationArea:"body"}),await _n(ye,e)}async function p4(e){let t=await Ye(Ae(),{}),n=t.state.translationMode=="dual"?"translation":"dual";if(t=await Ye(Ae(),{translationMode:n}),Ze()==="Original"){_n(t,e);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(n)}async function a4(e){if(ye=await Ye(Ae(),{translationMode:e}),mt("switch_translation_mode",[{name:"switch_translation_mode",params:{mode:e}}],{...ye,sourceLanguage:"unknown"}),Ze()==="Original"){_n(ye);return}window.immersiveTranslateSwitchTranslateState&&window.immersiveTranslateSwitchTranslateState(e)}async function zA(e){if(Ze()==="Original")await vC(e);else if(Ze()==="Translated"||Ze()==="Error"){let t={};ye&&ye.state&&(t=ye.state),ye=await Ye(Ae(),t),ye.state.translationArea!=="body"?(ye.state.translationArea="body",ye=await Ye(Ae(),ye.state),await _n(ye,e)):jo()}}async function xC(e){ye=await Ye(Ae(),{translationStartMode:"immediate"}),await _n(ye,e)}async function qA(e){Ze()==="Original"?await xC(e):(Ze()==="Translated"||Ze()==="Error")&&jo()}function WA(){return ye}async function Ye(e,t){let n=Object.keys(t);if(ye){let r={url:e,config:ye.config,state:{...ye.state,...t}};ye=await bn(r)}else{let r=await er(),a=t;n.length===0&&(a=void 0),ye=await bn({url:e,config:r,state:a})}return ye.state&&ye.state.translationService&&(ye.translationService=ye.state.translationService),ye.state&&ye.state.targetLanguage&&(ye.targetLanguage=ye.state.targetLanguage),ye}async function $A(){let e=await An()||{},t=e.generalRule||{},n=t["subtitleRule.add"]||{},r=!n.preTranslation;await kn({...e,generalRule:{...t,"subtitleRule.add":{...n,preTranslation:r}}}),r?Z0({text:Ht(ye,"videoSubtitlePreTranslationOn")}):Z0({text:Ht(ye,"videoSubtitlePreTranslationOff")}),setTimeout(()=>{window.location.reload()},1e3)}async function e4(){let e=await er(),t=await lu(),n;ye&&ye.state&&(n=ye.state);let r={url:Ae(),config:e,state:n},a=await bn(r);a.state&&a.state.translationService&&(a.translationService=a.state.translationService),ye=a,f4(ye);let o=Mu(),i=[];return o?i=o.allInlineWindows||[window]:i=[window],i.forEach(s=>{Vy(a,s),To(t)&&Zi(a,s),dC(a)}),a}function VA(e,t=3e3){return new Promise((n,r)=>{let a=t?setTimeout(()=>{n(new Error("timeout"))},t):void 0,o=setInterval(()=>{e.every(s=>document.querySelector(s)!==null)&&(clearInterval(o),a&&clearTimeout(a),n(null))},50)})}async function Jy(e){let t=e.detail,n=An();await Db(t.token,n,kn),gt.set(Tt,t);let r=await gt.get(Ws,!1);gt.set(Ws,!1),document.dispatchEvent(new CustomEvent("immersiveTranslateDocumentMessageUserResult",{detail:r?"close":"success"})),c4()}function Qy(e){I.debug("update user info",e);let t=e.detail;gt.set(Tt,t),c4()}async function Zy(e){let t=await An();if(t.translationService)return;let n=e.config.translationService,r=await o4(e,n);if(e.translationService!==r){if(!r){Eo([{name:"no_avaliable_translation_service"}]);return}t.translationService=r,kn(t),e.translationService=r,Eo([{name:"change_default_translation_service",params:{translation_service:r}}])}}async function Xy(e,t){let n=t.detail;if(e.rule.id!="immersive")return;let r=n.translateService;if(!r)return;let a=n.provider,o=await An();o.translationService=r,a&&o?.translationServices?.[r]?.provider&&(o.translationServices[r].provider=a),o.translationServiceChangedbyUserAt=new Date().toISOString(),kn(o)}async function o4(e,t,n=!0){let r=e.rule.detectionServiceOrder||["google","bing","transmart","yandex"];return r.sort((a,o)=>a===t?n?-1:1:o===t?n?1:-1:0),await hb(r,e)}async function eC(e){let t=await An();t.translationService=e,await kn(t);let n=await Ye(Ae(),{});n.translationService=e,await _n(n)}W9({detectCurrentPageLanguage:TC,ensureSwitchTranslationMode:p4,restorePage:jo,retryFailedParagraphs:IA,switchTranslationMode:a4,toggleTranslatePage:g4,toggleTranslateTheMainPage:HA,toggleTranslateTheWholePage:zA,toggleTranslationMask:m4,toggleVideoSubtitlePreTranslation:$A,translatePage:_n,translatePageWithTranslationService:jA,translateTheMainPage:d4,translateTheWholePage:vC,translateToThePageEndImmediately:xC,toggleTranslateToThePageEndImmediately:qA,updateGlobalContext:e4,getPureGlobalContext:WA});m();m();function sc({parent:e,ctx:t,Component:n,props:r={},style:a="",id:o,initialCSS:i=!0}){let s=o||ee+n.name;e.querySelector(`#${s}`)&&document.querySelector(`#${s}`)?.remove();let u=document.createElement("div");u.id=s,i&&u.setAttribute("style","all: initial");let l=u.attachShadow({mode:"open"});a&&zn(l,a),e.appendChild(u),la(d(qi,{lang:t.config.interfaceLanguage,fallbackLang:"zh-CN",translations:tn,children:d(n,{...r})}),l)}m();m();m();function Xi(e){return Ja(e).subtitles}function Ja(e){let t=[],n=e.split(/\r?\n/),r={},a=-1;return n.forEach((o,i)=>{let s=o.match(/(?(\d{2}:)*\d{2}([.,]\d{3})?) --> (?(\d{2}:)*\d{2}([.,]\d{3})?)(?${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${A4.htmlEncode(o.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`${n}`,r},_L=e=>/]*>[\s\S]*]*>/.test(e),e5=sn({name:XC,build:LL,detect:_L,helper:A4,parse:AL});m();var ML="srt",Ru={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},PL=(e,t)=>{let n=[],r=t.eol||`\r +`,r="";r+=`${n}`,r+=`${n}`,r+=`${t.title||""}${n}`,r+=`${n}`,r+=`${n}`,r+=`${n}`;for(let a=0;a${n}`,r+=`

${A4.htmlEncode(o.text||"")}${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`${n}`),r+=`${n}`,r+=`

 ${t.closeTags?"

":""}${n}`,t.closeTags&&(r+=`
${n}`);continue}t.verbose}}return r+=`${n}`,r+=`
${n}`,r},_L=e=>/]*>[\s\S]*]*>/.test(e),e5=un({name:XC,build:LL,detect:_L,helper:A4,parse:AL});m();var ML="srt",Ru={toMilliseconds:e=>{let t=/^\s*(\d{1,2}):(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=parseInt(t[1]),r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r},${a<100?"0":""}${a<10?"0":""}${a}`}},PL=(e,t)=>{let n=[],r=t.eol||`\r `,a=e.split(/\r?\n\s*\n/g);for(let o=0;o\s*(\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\r?\n([\s\S]*)$/.exec(a[o]);if(s){let u={};u.type="caption",u.index=parseInt(s[1]),u.start=Ru.toMilliseconds(s[2]),u.end=Ru.toMilliseconds(s[3]),u.duration=u.end-u.start;let l=s[4].split(/\r?\n/);u.content=l.join(r),u.text=u.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,"").replace(/>>[^:]*:\s*/g,""),n.push(u);continue}t.verbose}return n},FL=(e,t)=>{let n="",r=t.eol||`\r -`;for(let a=0;a ${Ru.toTimeString(o.end)}${r}`,n+=o.text+r,n+=r;continue}t.verbose}return n},BL=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),t5=sn({name:ML,build:FL,detect:BL,helper:Ru,parse:PL});m();var RL="sub",L4=25,IL=(e,t)=>{t.fps||=L4;let n=t.fps>0?t.fps:L4,r=[],a=t.eol||`\r +`;for(let a=0;a ${Ru.toTimeString(o.end)}${r}`,n+=o.text+r,n+=r;continue}t.verbose}return n},BL=e=>/\d+\r?\n\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?\s*-->\s*\d{1,2}:\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?/.test(e),t5=un({name:ML,build:FL,detect:BL,helper:Ru,parse:PL});m();var RL="sub",L4=25,IL=(e,t)=>{t.fps||=L4;let n=t.fps>0?t.fps:L4,r=[],a=t.eol||`\r `,o=e.split(/\r?\n/g);for(let i=0;i{let n=(t.fps||0)>0?t.fps:L4,r="",a=t.eol||`\r -`;for(let o=0;o=0?i.frame.start:i.start*n,u=typeof i.frame=="object"&&i.frame.end>=0?i.frame.end:i.end*n,l=i.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},NL=e=>/^\{\d+\}\{\d+\}.*/.test(e),n5=sn({name:RL,build:OL,detect:NL,parse:IL});m();var UL="vtt",Iu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},jL=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let o=0;o\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[o]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Iu.toMilliseconds(s[2]),l.end=Iu.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[o])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[o]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},HL=(e,t)=>{let n=t.eol||`\r -`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Iu.toTimeString(o.end)}${n}`,r+=o.text+n,r+=n;continue}t.verbose}return r},zL=e=>/^\s*WEBVTT\r?\n/.test(e),r5=sn({name:UL,build:HL,detect:zL,helper:Iu,parse:jL});var qL={vtt:r5,lrc:QC,smi:e5,ssa:GC,ass:YC,sub:n5,srt:t5,sbv:ZC,json:JC},a5=qL;var WL=e=>JSON.parse(JSON.stringify(e)),_4=class{format=a5;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof o.detect!="function")continue;let i=o.detect(t);if(i===!0||i===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.parse;if(typeof o!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return o(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.build;if(typeof o!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return o(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},o=this.parse(t,a);r.resync&&(o=this.resync(o,r.resync));let i={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(o,i)};resync=(t,n={})=>{let r,a,o=!1,i;if(typeof n=="function")r=n;else if(typeof n=="number")i=n,r=u=>[u[0]+i,u[1]+i];else if(typeof n=="object")i=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,o=n.frame||!1,r=u=>[Math.round(u[0]*a+i),Math.round(u[1]*a+i)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),i=await Oe({text:o.map(c=>c.text).join(` -`),pageLangs:[kt(),"en"]});if(ft(Te(i),this.ctx.targetLanguage))return null;Ve(this.ctx,Te(i));let s=o.map(c=>c.text),u=await this._translateSubtitle(s,i);return o.forEach((c,g)=>{c.text=u[g]}),Ou.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return I.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}};m();var Ac=class extends Ke{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:o}=this.parseFromXml(r),i=await Oe({text:o.map(u=>u.textContent).join(` -`),pageLangs:[kt(),"en"]});return ft(Te(i),this.ctx.targetLanguage)?null:(Ve(this.ctx,Te(i)),(await this._translateSubtitle(o.map(u=>u.textContent||""),Te(i))).forEach((u,l)=>{o[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return I.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` -`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};m();var Lc=class extends Ke{hasSubtitle=!1;async mutationVideoChange(){let t=$L(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let o=new URL(a.getAttribute("src")||"");o.searchParams.set("code",t),a.setAttribute("src",o.toString());return}let r=await this.fetchSubtitle(t);r&&(Ve(this.ctx,"ja","av"),this.hasSubtitle=!0,sa(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Ou.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){I.error("fetchSubtitle",n);return}}};function $L(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var VL={youtube:mc,netflix:pc,webvtt:ts,khanacademy:fc,bilibili:hc,udemy:bc,hulu:Sc,text_track:Za,text_track_dynamic:rs,general:yc,live:ns,ebutt:vc,disneyplus:xc,"fmp4.xml":Ec,multi_attach_vtt:wc,twitter:Dc,subsrt:kc,xml:Ac,av:Lc},_c;function EC(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=VL[t.type];if(!n)return;_c=new n(e)}catch(t){I.error(t)}}async function M4(){_c?.onPageStatusChange()}async function KL(e,t){if(_c?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&at())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),mt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function GL(){_c?.onTranslationModeChanged()}V9({autoEnableSubtitleChanged:KL,reloadSubtitleWithTranslationModeChanged:GL});var fe=null;function Mu(){return fe||null}function Ji(e){YL(e),n_(e),XL(e),t_(e),_a(document,e),Dn("Translated"),e_(fe),ZL(fe),Zb(Ho),JL(fe),M4(),c_()}function YL(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=yn(e);$b(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}Ki(e)&&yt(document.documentElement,be+"_rtl",e.targetLanguage)}function JL(e){Xb(e)}function QL(){ey()}function ZL(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=jb(e.ctx);if(I.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Ro(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(o=>{Ro(o,e)})}async function XL(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await qt(),n=Date.now(),a=new URL(e.url).hostname,o=t.tempTranslationUrlMatches||[],i=o.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;i>-1||(o.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Wt({...t,tempTranslationUrlMatches:[...o]})}}function e_(e){e.ctx.rule.isTranslateTitle&&(Ip(e.ctx),e.titleDynamicObserver=Vb(e.ctx))}function t_(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function f4(e){if(!fe)return;let t=yn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function n_(e){let t=Ks();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],f4(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||u_(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||l_(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||o_(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||i_(fe),fe.injectCssToDocument=Mc,fe.walkContainer=ia,fe.allInlineWindows=[window],window.onerror=a_(fe,e),window.immersiveTranslateSwitchTranslateState=F4.bind(fe)}function l5(e,t){t.getRootNode()instanceof ShadowRoot?Mc(t.getRootNode(),e):Mc(t.ownerDocument,e),r_(e)}function r_(e){fe||(fe={},fe.ctx=e,fe.id=Ks(),P4(fe,e))}function P4(e,t){e.paragraphQueue=[],e.injectCssToDocument=Mc;let n=yn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=F4.bind(e),e}function Ho(e=!0){fe&&(Dn("Original"),M4(),QL(),ku(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),Kb(fe.ctx),z1(),q1(),e&&F4.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function a_(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,o=!1;return a?.indexOf("Minified React error")>=0&&(o=!0),o&&(clearTimeout(n),Ho(),n=setTimeout(()=>{Ji(t)},e.urlChangeDelay||2e3)),!0}}function o_(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(jp(e,r.target),n.unobserve(r.target))})})}function i_(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(i=>{Hp(e,i)}),n.unobserve(a)}})})}var i5;function s_(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(i5),e.translateState=="original"?!1:(Ho(e.urlChangeDelay>20),i5=setTimeout(()=>{let a=e.ctx;Ji(a)},e.urlChangeDelay),!0)):!1}function u_(e){let t=e.ctx.rule,n=yn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&s_(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!In(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&In(a.target,t.mutationExcludeSelectors))continue;let o=a.target;if(a.type=="characterData"){let u=o.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Ol)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&s5(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&Vp(a))continue;if(o.recordLength){o.recordLength!==o.innerHTML.length&&s5(e,n,o);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!ka(o,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(o))){let u=vi(n,o.parentElement);u&&(xt.clearToParentMark(o,u),u5(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||un(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:o.contains(u)).length&&u5(e,a.target)}catch(o){I.error(o)}}})}function s5(e,t,n){let r=e.ctx.rule;for(let i of r.mutationExcludeContainsSelectors)if(n.querySelector(i))return;if(un(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,o=n;clearTimeout(o.timer),o.timer=setTimeout(()=>{$p(n),ia({id:e.id,container:n,filterRule:t,force:!0,onParagraph:i=>{Io(e,i,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),o.timer=null},a)}function u5(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,o=t;xt.clearMark(o),clearTimeout(o.timer),o.timer=setTimeout(()=>{Ro(t,e,n),o.timer=null},a)}function $p(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function Vp(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||un(n,["."+Lt]))).length==0}function l_(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,o=globalThis.getComputedStyle(a);Bp(o)||(n.unobserve(r.target),xt.clearMark(a),Ro(a,e))}})}function F4(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{Du(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function Mc(e,t){if(e instanceof HTMLIFrameElement){_a(e.contentDocument,t);return}_a(e,t)}async function SC(e){let t=at(),n="auto";if(me()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=nm(e.mainFrame),n=await Oe({text:r,pageLangs:["en"]})):(r=Ei(e.mainFrame).slice(0,1e3),n=await Oe({text:r,pageLangs:[kt(),"en"]}))}else if(t)n=await Oe({text:Ei(e.mainFrame).slice(0,1e3),pageLangs:[kt(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=nm(e.mainFrame),n=await Oe({text:r,pageLangs:["en"]})}else n=await Y9();return n==="auto"&&(n=await Qb()),q9(n),n}async function wC(){if(!fe)return;ku(),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let o=r.commonAncestorContainer.querySelector(`[${Bl}='${n}']`);o&&o.remove()}}J0.call(fe,fe.ctx)}async function i4(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),mt("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await qt(),o=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(f=>{[...o?.querySelectorAll(f),...s?.querySelectorAll(f)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?Y1():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(f=>{g+=`${f}="${globalThis.document.documentElement.getAttribute(f)}" `});let p="";globalThis.document.body.getAttributeNames().forEach(f=>{p+=`${f}="${globalThis.document.body.getAttribute(f)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` +`;for(let o=0;o=0?i.frame.start:i.start*n,u=typeof i.frame=="object"&&i.frame.end>=0?i.frame.end:i.end*n,l=i.text.replace(/\r?\n/,"|");r+=`{${s}}{${u}}${l}${a}`;continue}t.verbose}return r},NL=e=>/^\{\d+\}\{\d+\}.*/.test(e),n5=un({name:RL,build:OL,detect:NL,parse:IL});m();var UL="vtt",Iu={toMilliseconds:e=>{let t=/^\s*(\d{1,2}:)?(\d{1,2}):(\d{1,2})(?:[.,](\d{1,3}))?\s*$/.exec(e);if(!t)throw new Error(`Invalid time format: ${e}`);let n=t[1]?parseInt(t[1].replace(":","")):0,r=parseInt(t[2]),a=parseInt(t[3]),o=t[4]?parseInt(t[4]):0;return n*3600*1e3+r*60*1e3+a*1e3+o},toTimeString:e=>{let t=Math.floor(e/1e3/3600),n=Math.floor(e/1e3/60%60),r=Math.floor(e/1e3%60),a=Math.floor(e%1e3);return`${(t<10?"0":"")+t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}.${a<100?"0":""}${a<10?"0":""}${a}`}},jL=(e,t)=>{let n=1,r=[],a=e.split(/\r?\n\s*\n/);for(let o=0;o\s*((?:\d{1,2}:)?\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\s?.*\r?\n([\s\S]*)$/.exec(a[o]);if(s){let l={};l.type="caption",l.index=n++,s[1]&&(l.cue=s[1].replace(/[\r\n]*/g,"")),l.start=Iu.toMilliseconds(s[2]),l.end=Iu.toMilliseconds(s[3]),l.duration=l.end-l.start;let c=s[4].split(/\r?\n/);l.content=c.join(" "),l.text=l.content.replace(/<[^>]+>/g,"").replace(/\{[^}]+\}/g,""),r.push(l);continue}let u=/^([A-Z]+)(\r?\n([\s\S]*))?$/.exec(a[o])||/^([A-Z]+)\s+([^\r\n]*)$/.exec(a[o]);if(u){let l={};l.type="meta",l.name=u[1],u[3]&&(l.data=u[3]),r.push(l);continue}t.verbose}return r},HL=(e,t)=>{let n=t.eol||`\r +`,r=`WEBVTT${n}${n}`;for(let a=0;a ${Iu.toTimeString(o.end)}${n}`,r+=o.text+n,r+=n;continue}t.verbose}return r},zL=e=>/^\s*WEBVTT\r?\n/.test(e),r5=un({name:UL,build:HL,detect:zL,helper:Iu,parse:jL});var qL={vtt:r5,lrc:QC,smi:e5,ssa:GC,ass:YC,sub:n5,srt:t5,sbv:ZC,json:JC},a5=qL;var WL=e=>JSON.parse(JSON.stringify(e)),_4=class{format=a5;list=()=>Object.keys(this.format);detect=t=>{let n=this.list();for(let r=0;r"u"||typeof o.detect!="function")continue;let i=o.detect(t);if(i===!0||i===a)return a}return""};parse=(t,n={})=>{let r=n.format||this.detect(t);if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.parse;if(typeof o!="function")throw new Error(`Subtitle format does not support 'parse' op: ${r}`);return o(t,n)};build=(t,n={})=>{let r=n.format||"srt";if(!r||r.trim().length===0)throw new Error("Cannot determine subtitle format!");let a=this.format[r];if(typeof a>"u")throw new Error(`Unsupported subtitle format: ${r}`);let o=a.build;if(typeof o!="function")throw new Error(`Subtitle format does not support 'build' op: ${r}`);return o(t,n)};convert=(t,n={})=>{let r={};typeof n=="string"?r.to=n:r=n;let a={format:r.from||void 0,verbose:r.verbose,eol:r.eol},o=this.parse(t,a);r.resync&&(o=this.resync(o,r.resync));let i={format:r.to||r.format,verbose:r.verbose,eol:r.eol};return this.build(o,i)};resync=(t,n={})=>{let r,a,o=!1,i;if(typeof n=="function")r=n;else if(typeof n=="number")i=n,r=u=>[u[0]+i,u[1]+i];else if(typeof n=="object")i=(n.offset||0)*(n.frame?n.fps||25:1),a=n.ratio||1,o=n.frame||!1,r=u=>[Math.round(u[0]*a+i),Math.round(u[1]*a+i)];else throw new Error("Argument 'options' not defined!");let s=[];for(let u=0;uc.type==="caption"),i=await Oe({text:o.map(c=>c.text).join(` +`),pageLangs:[kt(),"en"]});if(lt(ye(i),this.ctx.targetLanguage))return null;qe(this.ctx,ye(i));let s=o.map(c=>c.text),u=await this._translateSubtitle(s,i);return o.forEach((c,g)=>{c.text=u[g]}),Ou.build(a,{format:this.config.subsrtFormat||"vtt"})}catch(r){return I.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}};m();var kc=class extends Ke{autoShowObserver=null;videoSrc=null;loadSubtitleWithFetch(t,n){return this.loadSubtitle(t,n)}async loadSubtitle(t,n){try{this.showSubtitleLoading(!0);let r=await this.fetchSubtitle(t,n);if(!r)return null;let{doc:a,subtitles:o}=this.parseFromXml(r),i=await Oe({text:o.map(u=>u.textContent).join(` +`),pageLangs:[kt(),"en"]});return lt(ye(i),this.ctx.targetLanguage)?null:(qe(this.ctx,ye(i)),(await this._translateSubtitle(o.map(u=>u.textContent||""),ye(i))).forEach((u,l)=>{o[l].textContent=u}),new XMLSerializer().serializeToString(a))}catch(r){return I.error(r),null}finally{this.hideSubtitleLoading()}}async fetchSubtitle(t,n){let r=await fetch(t,n);if(!r.ok)throw new Error("request subtitle error");return(await r.text()||"").replace(/\r\n/g,` +`)}parseFromXml(t){if(!this.config.xmlTextSelector)throw new Error("xml text selector is required");let n=new DOMParser().parseFromString(t,"text/xml"),r=[...n.querySelectorAll(this.config.xmlTextSelector)];return{doc:n,subtitles:r}}};m();var Ac=class extends Ke{hasSubtitle=!1;async mutationVideoChange(){let t=$L(location.href,document,this.config.avSerial);if(!t)return;let n=this.config.avSerial?.serialAttachIframe;if(n){let a=document.querySelector(n);if(!a)return;let o=new URL(a.getAttribute("src")||"");o.searchParams.set("code",t),a.setAttribute("src",o.toString());return}let r=await this.fetchSubtitle(t);r&&(qe(this.ctx,"ja","av"),this.hasSubtitle=!0,sa(this.ctx,this.config.attachRule?.appendSelector||"",{videoSelector:this.config.videoSelector||"video",subtitleItems:r,ctx:this.ctx,lang:"ja"}))}isShowQuickButton(){return Promise.resolve(this.hasSubtitle)}async fetchSubtitle(t){try{let n=await de({url:`https://subhub.weixin.so/missav/${t}`,responseType:"text"});if(!n)throw new Error("request subtitle error");return Ou.parse(n,{format:"vtt"}).map(a=>({...a,start:a.start/1e3,end:a.end/1e3}))}catch(n){I.error("fetchSubtitle",n);return}}};function $L(e,t,n){if(!n)return;let r;if(n.type==="url"&&(r=e),n.type=="selector"&&n.selector&&(r=t?.querySelector(n.selector)?.textContent),!!r){if(n.regexStr){let a=r.match(new RegExp(n.regexStr));if(a)return a[1]||a[0]}return r.toLowerCase()}}var VL={youtube:gc,netflix:mc,webvtt:ns,khanacademy:pc,bilibili:fc,udemy:hc,hulu:Ec,text_track:Za,text_track_dynamic:as,general:bc,live:rs,ebutt:Tc,disneyplus:vc,"fmp4.xml":xc,multi_attach_vtt:Sc,twitter:wc,subsrt:Dc,xml:kc,av:Ac},Lc;function EC(e){try{let t=e.rule.subtitleRule;if(t.disabled||!t.type)return;let n=VL[t.type];if(!n)return;Lc=new n(e)}catch(t){I.error(t)}}async function M4(){Lc?.onPageStatusChange()}async function KL(e,t){if(Lc?.autoEnableSubtitleChanged(),t&&t.trigger==="popup"&&ot())return;let n={auto_enable_subtitles:e.rule.subtitleRule.autoEnableSubtitle?"1":"0",video_platform:e.rule.id||""};t&&t.trigger&&(n.trigger=t.trigger),pt("auto_enable_subtitles_changed",[{name:"auto_enable_subtitles_changed",params:n}],e)}async function GL(){Lc?.onTranslationModeChanged()}V9({autoEnableSubtitleChanged:KL,reloadSubtitleWithTranslationModeChanged:GL});var fe=null;function Pu(){return fe||null}function Ji(e){YL(e),n_(e),XL(e),t_(e),_a(document,e),Dn("Translated"),e_(fe),ZL(fe),Zb(Ho),JL(fe),M4(),c_()}function YL(e){if(e.state.translationArea==="main"&&e.rule.initialSelectorGlobalAttributes){let t=yn(e);$b(document.body,e.rule.initialSelectorGlobalAttributes,e.rule.asideMaxTextCount,e.rule.asideMaxWordCount,e.rule.asideMaxTextCountPerParagraph,e.rule.asideMaxWordCountPerParagraph,t)}Ki(e)&&yt(document.documentElement,be+"_rtl",e.targetLanguage)}function JL(e){Xb(e)}function QL(){ey()}function ZL(e){e.ctx.isMutationTranslationExcludeUrl||e.dynamicContainerObserver?.observe(document.body,{subtree:!0,childList:!0,characterData:!0});let{bodyNode:t,articleNode:n,bodyIsRoot:r}=jb(e.ctx);if(I.debug("bodyIsRoot",r,"bodyNode",t,"articleNode",n),e.ctx.bodyNode=t,e.ctx.articleNode=n,t&&Ro(t,e),r)return;let a=[];e.ctx.rule.mainFrameSelector&&(a=[...document.querySelectorAll(e.ctx.rule.mainFrameSelector||"")]),a.length<=0&&(a=[document.body]),a.forEach(o=>{Ro(o,e)})}async function XL(e){if(!e.state.isAutoTranslate&&e.config.tempTranslateDomainMinutes>0){let t=await qt(),n=Date.now(),a=new URL(e.url).hostname,o=t.tempTranslationUrlMatches||[],i=o.findIndex(u=>u.match===a&&u.expiredAt>n),s=!1;i>-1||(o.push({match:a,expiredAt:n+e.config.tempTranslateDomainMinutes*60*1e3}),s=!0),s&&await Wt({...t,tempTranslationUrlMatches:[...o]})}}function e_(e){e.ctx.rule.isTranslateTitle&&(Rp(e.ctx),e.titleDynamicObserver=Vb(e.ctx))}function t_(e){if(e.rule.normalizeBody&&document.querySelector(e.rule.normalizeBody)){let n=document.body.innerHTML;document.body.innerHTML="",document.body.innerHTML=n}}function p4(e){if(!fe)return;let t=yn(e);fe.rule={excludeSelectors:t.excludeSelectors||[],selectors:t.selectors||[]},fe.containerRule={pageHeight:screen.availHeight,selectors:t.selectors},fe.translationService=e.translationService,fe.urlChangeDelay=e.rule.urlChangeDelay,fe.immediateTranslateCapacity=e.state.immediateTranslationTextCount,fe.translateState=e.state.translationMode||e.config.translationMode||"dual"}function n_(e){let t=Gs();fe&&(t=fe.id),fe=fe||{},fe.ctx=e,fe.id=t,fe.paragraphQueue=fe.paragraphQueue||[],p4(e),fe.currentUrl=window.location.href,fe.paragraphEntities=fe.paragraphEntities||{},fe.autoIncreaseParagraphId=fe.autoIncreaseParagraphId||1,fe.interruptEffectDOM=!1,fe.observeContainers=fe.observeContainers||[],fe.observeParagraphs=fe.observeParagraphs||[],fe.dynamicContainerObserver=fe.dynamicContainerObserver||u_(fe),fe.ignoreResizeObserver=fe.ignoreResizeObserver||l_(fe),fe.containerVisibleObserver=fe.containerVisibleObserver||o_(fe),fe.paragraphVisibleObserver=fe.paragraphVisibleObserver||i_(fe),fe.injectCssToDocument=_c,fe.walkContainer=ia,fe.allInlineWindows=[window],window.onerror=a_(fe,e),window.immersiveTranslateSwitchTranslateState=F4.bind(fe)}function l5(e,t){t.getRootNode()instanceof ShadowRoot?_c(t.getRootNode(),e):_c(t.ownerDocument,e),r_(e)}function r_(e){fe||(fe={},fe.ctx=e,fe.id=Gs(),P4(fe,e))}function P4(e,t){e.paragraphQueue=[],e.injectCssToDocument=_c;let n=yn(t);return e.rule={excludeSelectors:n.excludeSelectors,selectors:n.selectors||[]},e.translationService=t.mouseHoverTranslationService,e.currentUrl=window.location.href,e.paragraphEntities={},e.autoIncreaseParagraphId=1,e.interruptEffectDOM=!1,e.urlChangeDelay=t.rule.urlChangeDelay,e.translateState=t.state.translationMode||t.config.translationMode||"dual",e.observeContainers=[],e.observeParagraphs=[],e.allInlineWindows=[window],window.switchTranslateState=F4.bind(e),e}function Ho(e=!0){fe&&(Dn("Original"),M4(),QL(),Au(),fe.interruptEffectDOM=!0,fe.ignoreResizeObserver?.disconnect(),fe.dynamicContainerObserver?.disconnect(),fe.containerVisibleObserver?.disconnect(),fe.paragraphVisibleObserver?.disconnect(),fe.titleDynamicObserver?.disconnect(),Kb(fe.ctx),z1(),q1(),e&&F4.call(fe,"original"),Object.values(fe.paragraphEntities).forEach(t=>{t.commonAncestorContainer.paragraphs=null}),fe=null)}function a_(e,t){e.interruptEffectDOM=!1;let n;return function(r){let a=r.message,o=!1;return a?.indexOf("Minified React error")>=0&&(o=!0),o&&(clearTimeout(n),Ho(),n=setTimeout(()=>{Ji(t)},e.urlChangeDelay||2e3)),!0}}function o_(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{r.intersectionRatio>0&&(Up(e,r.target),n.unobserve(r.target))})})}function i_(e){return new IntersectionObserver((t,n)=>{e.interruptEffectDOM||t.forEach(r=>{if(r.intersectionRatio>0){let a=r.target;(a.paragraphs||[]).forEach(i=>{jp(e,i)}),n.unobserve(a)}})})}var i5;function s_(e){if(e.urlChangeDelay<=0)return!1;let n=(window.location.href||"").split("#")[0];return e.currentUrl.split("#")[0]!=n?(clearTimeout(i5),e.translateState=="original"?!1:(Ho(e.urlChangeDelay>20),i5=setTimeout(()=>{let a=e.ctx;Ji(a)},e.urlChangeDelay),!0)):!1}function u_(e){let t=e.ctx.rule,n=yn(e.ctx);return new MutationObserver(r=>{if(!(t.mutationConfig.enableUrlChange&&s_(e))&&!e.interruptEffectDOM){for(let a of r)if(a.target.nodeType!=Node.COMMENT_NODE)try{if(t.mutationObserverLimitTargetSelectors.length>0&&!In(a.target,t.mutationObserverLimitTargetSelectors)||t.mutationExcludeSelectors.length>0&&In(a.target,t.mutationExcludeSelectors))continue;let o=a.target;if(a.type=="characterData"){let u=o.parentElement,l=1;for(;u&&!u.recordLength&&l<=5;){if(u.classList?.contains(Ol)){u=null;break}u=u?.parentElement,l++}u?.recordLength&&u.recordLength!==u.innerHTML.length&&s5(e,n,u);continue}if(t.mutationConfig.checkSelfUpdate&&$p(a))continue;if(o.recordLength){o.recordLength!==o.innerHTML.length&&s5(e,n,o);continue}if((a.addedNodes||[]).length<=0||a.target.nodeType!==Node.ELEMENT_NODE||!xt.isSkipMarkEle(a.target)&&!xt.isMarked(a.target,e.id)&&a.target.nodeName!=="BODY"&&!a.target.timer)continue;if(!ka(o,{blockSelectors:n.blockSelectors,extraInlineSelectors:n.extraInlineSelectors,extraBlockSelectors:n.extraBlockSelectors,atomicBlockSelectors:n.atomicBlockSelectors},window.getComputedStyle(o))){let u=vi(n,o.parentElement);u&&(xt.clearToParentMark(o,u),u5(e,u));continue}[...a.addedNodes].filter(u=>u.nodeType==Node.COMMENT_NODE||u.immersive||ln(u,[...e.ctx.rule.mutationExcludeSelectors,"."+Lt])?!1:o.contains(u)).length&&u5(e,a.target)}catch(o){I.error(o)}}})}function s5(e,t,n){let r=e.ctx.rule;for(let i of r.mutationExcludeContainsSelectors)if(n.querySelector(i))return;if(ln(n,r.mutationExcludeContainsSelectors))return;let a=r.mutationConfig.consumeTimeout||100,o=n;clearTimeout(o.timer),o.timer=setTimeout(()=>{Wp(n),ia({id:e.id,container:n,filterRule:t,force:!0,onParagraph:i=>{Io(e,i,!0)},onFrame:()=>{},onIgnoreElement:()=>{}}),o.timer=null},a)}function u5(e,t,n=!0){let a=e.ctx.rule.mutationConfig.buildTimeout||100,o=t;xt.clearMark(o),clearTimeout(o.timer),o.timer=setTimeout(()=>{Ro(t,e,n),o.timer=null},a)}function Wp(e){e.paragraphs=[],xt.clearMark(e),e.querySelectorAll("."+Lt).forEach(t=>{t.remove()}),e.querySelectorAll("[data-immersive_translate_walked]").forEach(t=>{t.paragraphs=void 0,xt.clearMark(t)}),e.recordLength?e.recordLength=e.innerHTML.length:e.recordLength=void 0}function $p(e){return[...e.addedNodes,...e.removedNodes].filter(n=>!(n.immersive||ln(n,["."+Lt]))).length==0}function l_(e){return new ResizeObserver((t,n)=>{if(!e.interruptEffectDOM)for(let r of t){if(r.target.nodeType!==Node.ELEMENT_NODE)return;let a=r.target,o=globalThis.getComputedStyle(a);Fp(o)||(n.unobserve(r.target),xt.clearMark(a),Ro(a,e))}})}function F4(e){this.translateState=e,Object.values(this.paragraphEntities).forEach(t=>{ku(t,e)}),e=="original"&&document.querySelectorAll(`.${Lt}`).forEach(t=>t.remove())}function _c(e,t){if(e instanceof HTMLIFrameElement){_a(e.contentDocument,t);return}_a(e,t)}async function SC(e){let t=ot(),n="auto";if(me()){let r="";e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"?(r=tm(e.mainFrame),n=await Oe({text:r,pageLangs:["en"]})):(r=Ei(e.mainFrame).slice(0,1e3),n=await Oe({text:r,pageLangs:[kt(),"en"]}))}else if(t)n=await Oe({text:Ei(e.mainFrame).slice(0,1e3),pageLangs:[kt(),"en"]});else if(e.rule.pageType=="ebookReader"||e.rule.pageType=="ebookBuilder"){let r="";r=tm(e.mainFrame),n=await Oe({text:r,pageLangs:["en"]})}else n=await Y9();return n==="auto"&&(n=await Qb()),q9(n),n}async function wC(){if(!fe)return;Au(),document.dispatchEvent(new CustomEvent(Gt,{detail:JSON.stringify({type:"retryFailedParagraphsStart",payload:{}})}));let e=fe.paragraphEntities,t=Object.keys(e);for(let n of t){let r=e[n];if(r.error){fe.paragraphQueue.push(n);let o=r.commonAncestorContainer.querySelector(`[${Bl}='${n}']`);o&&o.remove()}}J0.call(fe,fe.ctx)}async function o4(e,t){let n={};e&&e.detail?.trigger&&(n.trigger=e.detail.trigger),pt("share_to_draft",[{name:"share_to_draft",params:n}],{...t,sourceLanguage:Mt()});let r=fe?.ctx||t,a=await qt(),o=document.head.cloneNode(!0),s=document.body.cloneNode(!0),u=r.rule.shareConfig;[...u?.removeSelectors||[]].forEach(f=>{[...o?.querySelectorAll(f),...s?.querySelectorAll(f)].forEach(h=>{h.nodeName.toLowerCase()=="script"&&h.type=="application/ld+json"||h.remove()})});let c=u.injectCss?Y1():"",g="";globalThis.document.documentElement.getAttributeNames().forEach(f=>{g+=`${f}="${globalThis.document.documentElement.getAttribute(f)}" `});let p="";globalThis.document.body.getAttributeNames().forEach(f=>{p+=`${f}="${globalThis.document.body.getAttribute(f)}" `});try{a.draft={url:globalThis.location.href,title:document.title,source_lang:r.sourceLanguage,target_lang:r.targetLanguage,content:` ${o.innerHTML} - ${s.innerHTML}`.replaceAll('data-immersive-translate-translation-element-mark="1"',"dim_m='1'").replace(/data-immersive-translate-walked=\".+?\"/g,"dim_w='1'").replace(/data-on-parse-paragraph=\".+?\"/g,"").replace(/data-consume-paragraph=\".+?\"/g,"").replace(/data-consume-container=\".+?\"/g,"").replace(/immersive-translate-target-([a-z\-]+)/g,(C,b)=>"imt_"+b.replaceAll("translation","t"))},await Wt(a);let h=Pe().SHARE_DRAFT_URL,y=r.rule;if(y.shareConfig?.sharePath){let C=new URL(h);C.pathname=y.shareConfig.sharePath,h=C.toString()}_i(h)}catch(f){I.error(f)}}async function tC(){let e=await qt();e.draft&&globalThis.document.dispatchEvent(new CustomEvent(C2,{detail:JSON.stringify(e.draft)}))}async function c_(){try{if(await t0("reportActive"))return;I.debug("\u672A\u6FC0\u6D3B\u8FC7");let t=await Qg();await de({url:yo+"/v1/user/campaign-info-translated/"+t,method:"POST",headers:{"content-type":"application/json"}}),eu("reportActive","1")}catch(e){I.error(e)}}var d_=new AbortController,{signal:g_}=d_,Pc=0,Fc=0,as=!1,Wo,c5=0,Xa=[];function Zi(e,t){m_();let n=e,r=n.config,a=r.generalRule.mouseHoverHoldKey==="Off",o=r.mouseModifierKeyPressTimeout||400;n.state.isTranslateDirectlyOnHover===!0&&(a=!1);let i=n.state.isTranslateDirectlyOnHover===!0||r.generalRule.mouseHoverHoldKey==="Auto";function s(){i=!i,i?(I.debug("mouse hover translate on"),n.state.isTranslateDirectlyOnHover=!0,Zi(n,t)):(I.debug("mouse hover translate off"),n.state.isTranslateDirectlyOnHover=!1,Zi(n,t))}document.addEventListener(Ns,s),Xa.push(()=>{document.removeEventListener(Ns,s)});let u=or(p=>{if(!(Math.abs(p.clientX-Pc)+Math.abs(p.clientY-Fc)<=3)&&(Pc=p.clientX,Fc=p.clientY,i||as&&!Wo)){let f=p5(n.rule,t);if(f){if(O4(f))return;I4(n,!1,f)}}},i?700:300),l=p=>{let f=p.target;O4(f)||I4(n,!0)},c=p=>{let f=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",h=Ut.getPressedKeyCodes();if(h.length>1&&Ut[f]&&(c5=Date.now(),as=!1),h.length===1&&Ut[f]){let y=Date.now();as=!0,Wo&&clearTimeout(Wo),Wo=setTimeout(()=>{let C=c5-y;C>0&&C<=o?as=!1:l(p),Wo=void 0},o)}};if(Xa.push(()=>{Wo&&clearTimeout(Wo)}),a)return;B4("mousemove",u,t),Xa.push(()=>{t.removeEventListener("mousemove",u)});function g(){i?u.cancel():as=!1}if(B4("blur",g,t),Xa.push(()=>{t.removeEventListener("blur",g)}),!i){let p=r?.generalRule?.mouseHoverHoldKey?.toLowerCase()||"alt",f=U2;B4("keyup",d5,t),Xa.push(()=>{t.removeEventListener("keyup",d5)}),f.includes(p)?Ut("*","mouseHover",c):Ut(r.generalRule.mouseHoverHoldKey,"mouseHover",l),Ut.setScope("mouseHover"),Xa.push(()=>{Ut.deleteScope("mouseHover")})}}function m_(){Xa.forEach(e=>e()),Xa=[],Ut.setScope("all")}function d5(e){as=!1}function B4(e,t,n=window){return n.addEventListener(e,t,{signal:g_})}function I4(e,t,n,r=window){if(n=n||p5(e.rule,r),!n){I.debug("can not find selection part!");return}if(f_(n,t))return;if(O4(n)){I.debug("exclude dom");return}l5(e,n);let o=Mu();o&&(o.setupMouseHoverListener=Zi);let i=yn(e);i.excludeSelectors=[],i.selectors=[];let s=!1,u=P4({...o},e);ia({id:o.id,container:n,filterRule:i,force:!0,onParagraph:l=>{Io(u,l,!0,"hover").then(c=>{if(c&&!s){s=!0;let g=Date.now();rt(x2,g),mt("mouse_hover_translate",[{name:"mouse_hover_translate"}],{...e,sourceLanguage:"mouseHover"})}})},onFrame:()=>{},onIgnoreElement:()=>{}})}function p5(e,t){return p_(Pc,Fc,e,t)}function p_(e,t,n,r){let a=s9(e,t,n,r);if(a==null)return;let o=()=>{let u=r.document.elementFromPoint(e,t);if(!u)return;let l=u9(u,e,t);return l===u?u.nodeName==="BUTTON"?u:void 0:m5(l,n)},i=()=>{try{a.setStartBefore(a.startContainer),a.setEndAfter(a.startContainer)}catch(l){I.debug("get mouse over word fail",l)}let u=a.getBoundingClientRect();if(!(u.left>e||u.rightt||u.bottom{b_(r)}),!0}function h_(e){let t=[e];if(e.nodeName=="FONT"&&e.classList.contains("immersive-translate-target-wrapper"))t=[e.parentElement];else{let r=[...e.querySelectorAll(".immersive-translate-target-wrapper")].map(a=>a.parentElement).filter(a=>!!a);r.length&&(t=r)}return t.filter(n=>n?.paragraphs&&n?.paragraphs.length>0)}function b_(e){let t=Mu();t&&(!e.paragraphs||!e.paragraphs.length||(e.paragraphs.forEach(n=>{Du(n,n.state==="original"?t.translateState:"original")}),e.paragraphs=[]))}function R4(e){return!!(e.host&&e.mode)}function g5(e,t){let n=e.parentNode;if(n.nodeName==="BODY"||R4(n))return e;for(;n&&n.nodeName!=="BODY"&&!R4(n)&&em(n,t);){let r=n.parentNode;if(r&&R4(r))break;n=r}return n}function m5(e,t){return e.nodeType===Node.TEXT_NODE||em(e,t)?g5(e,t):e}function f5(e,t){Pc=t.clientX,Fc=t.clientY,I4(e,!0)}var Nu=[];function N4(e,t){let n=0,r=0,a,o=s=>{let u=new Date().getTime();r++,u-n<300?i(s):r=1,n=u},i=s=>{clearTimeout(a),r===parseInt(e+"")&&(a=setTimeout(()=>{r=0,t(s)},400))};document.addEventListener("click",o),Nu.push(()=>{document.removeEventListener("click",o)})}function h5(e,t){let n=0,r=0,a=0,o=s=>{let u=s.changedTouches[0];n=new Date().getTime(),r=u.clientX,a=u.clientY},i=s=>{let u=s.changedTouches[0];n-new Date().getTime()>1e3||Math.abs(a-u.clientY)>50||(e==="left"&&u.clientX-r>50&&t(s.changedTouches[0]),e==="right"&&u.clientX-r<-50&&t(s.changedTouches[0]))};document.addEventListener("touchstart",o),document.addEventListener("touchend",i),Nu.push(()=>{document.removeEventListener("touchstart",o),document.removeEventListener("touchend",i)})}function Bc(e,t){let n,r=a=>{clearTimeout(n),a.touches.length===parseInt(e+"")&&(n=setTimeout(()=>{t(a.changedTouches[0])},200))};document.addEventListener("touchstart",r),Nu.push(()=>{document.removeEventListener("touchstart",r)})}var Lu={touchShortcutsOff:()=>{},"multipleClick.2":N4,"multipleClick.3":N4,"multipleClick.4":N4,"slide.left":h5,"slide.right":h5,"fingers.2":Bc,"fingers.3":Bc,"fingers.4":Bc,"fingers.5":Bc};async function nC(e){try{x_();let t=await pr(),n=Nl.find(r=>r.name==="touch");if(!n)return;n.shortcuts.forEach(r=>{if(typeof r=="string")return;let a=U4(e,t,r.command),o=Lu[a];if(a==="touchShortcutsOff"||!o)return;let i=a.split(".");if(i.length!==2)return;let s=i[1];s&&o(s,u=>{v_(r.command,e,u)})})}catch(t){I.error(t)}}function U4(e,t,n){if(!t.generalRule)return e.config.generalRule[n];if(t.generalRule[n])return t.generalRule[n];let r={touchShortcutsToggleTranslatePage:"fingerCountToToggleTranslagePageWhenTouching",touchShortcutsToggleTranslationMask:"fingerCountToToggleTranslationMaskWhenTouching",touchShortcutsToggleTranslatePageOnlyTranslation:"fingerCountToToggleTranslagePageOnlyTranslationWhenTouching"};return r[n]&&t.generalRule[r[n]]?`fingers.${t.generalRule[r[n]]}`:e.config.generalRule[n]||""}var y_=()=>{g4();let e=new CustomEvent(Yr,{detail:{method:"toggleTranslatePage"}});globalThis.document.dispatchEvent(e)},C_=()=>{p4();let e=new CustomEvent(Yr,{detail:{method:"toggleOnlyTranslation"}});globalThis.document.dispatchEvent(e)},T_=()=>{m4();let e=new CustomEvent(Yr,{detail:{method:"toggleTranslationMask"}});globalThis.document.dispatchEvent(e)},b5=0,v_=(e,t,n)=>{new Date().getTime()-b5<200||(b5=new Date().getTime(),e==="touchShortcutsToggleTranslatePage"?y_():e==="touchShortcutsToggleTranslationMask"?T_():e==="touchShortcutsToggleTranslatePageOnlyTranslation"?C_():e==="touchShortcutsToggleTranslateTouchElement"&&f5(t,n))};function x_(){Nu.forEach(e=>{e()}),Nu=[]}function Uu(e){let{onChange:t,type:n,title:r,command:a,description:o,shortcut:i,disabled:s}=e,[u,l]=$(!1),{t:c}=W();if(n==="finger")return d("div",{class:"nav",children:[d(we,{title:r,description:o||""}),d("select",{class:"select !w-36",onChange:g=>{g.preventDefault();let p=g.target.value;t(p)},children:Object.keys(Lu).map((g,p)=>d("option",{value:g,selected:i===g,children:`${c(g)}`},"finger-"+p))})]});if(n==="mouseHoverHoldKey"){let g=Jr.includes(i);return d("div",{children:[d("div",{class:"nav",children:[d(we,{title:r,description:o||""}),d(Pr,{className:"select",maxWidth:250,items:Jr.filter(p=>!(g&&p==="OtherCustom"||p==="OtherCustom")).map(p=>{let f=c("mouseHoldKey",{key:p}),h=Jr.includes(i),y=p===i;return i==="Off"&&p===i&&u&&(y=!1),p==="Auto"?f=c("mouseHoldKeyAuto"):p==="Off"?f=c("mouseHoldKeyOff"):p==="OtherCustom"?f=h?c("mouseHoldKeyOther"):c("mouseHoldKeyCustomKey",{key:i}):p==="Other"&&(f=c("mouseHoldKeyOther")),h||p==="Other"&&(y=!0),{label:f,value:p,selected:y,onSelected:C=>{C.value==="Other"?(l(!0),t("Off",!0)):(l(!1),t(C.value))}}})})]}),(!g||u)&&d("div",{class:"nav",children:[d(we,{title:c("mouseHoverCustomKeyTitle"),description:c("mouseHoverCustomKeyDescription")||""}),d("input",{type:"text",class:"!w-36",placeholder:c("mouseHoverShortcutPlaceholder"),name:"mouseHoverHoldKey",value:i==="Off"?"":i,onChange:p=>{t(p.target.value)}})]})]})}return d("div",{class:"nav",children:[d(we,{title:r,description:o||""}),d("div",{children:[d("input",{type:"text",class:"!w-36",disabled:s,id:a,name:a,value:i,onChange:g=>{t(g.target.value)}}),s&&d("div",{class:"ml-2 inline-block",children:d(tr,{width:200,multiple:!0,text:c("shortcutDisableTooltip"),children:d("span",{children:d(Ub,{width:20,height:16})})})})]})]})}function j4(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let[i,s]=oa(),{t:u}=W(),l=Qt(t),c=On(l);return l?d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:u("mouseHoverOptions")})}),d(Vi,{image:yr("images/hover_intro.png"),nightImage:yr("images/hover_intro_night.png"),title:u("intro.hoverTitle"),description:u("intro.hoverDescription")}),d(Uu,{onChange:(g,p)=>{n(f=>{let y={...f.generalRule||{},mouseHoverHoldKey:g||"Off"};return g!=="Off"&&(y.mouseHoverPreferenceKey=g),{...f,generalRule:y}}),p||it(u("saved"))},type:"mouseHoverHoldKey",title:u("mouseHoverHoldKey"),command:"mouseHoverHoldKey",description:u("desc.mouseHoverHoldKey"),shortcut:l.generalRule.mouseHoverHoldKey,disabled:!1}),d(E_,{setSettings:n,config:l}),!d1()&&d("div",{class:"nav",children:[d(we,{title:u("confirmSupportMouse"),description:u("confirmSupportMouseDescription")}),d("label",{for:"confirmSupportMouse",children:d("input",{type:"checkbox",onChange:g=>{let p=g.target.checked;s({...i,confirmSupportMouse:p})},checked:i?.confirmSupportMouse===!0,id:"confirmSupportMouse",name:"switch",role:"switch"})})]}),d($a,{config:l,ctx:c,serviceType:"mouseHoverTranslationService"})]})}):null}function E_({setSettings:e,config:t}){let{t:n}=W();return Ea()?d(Uu,{onChange:(r,a)=>{e(o=>{let s={...o.generalRule||{},touchShortcutsToggleTranslateTouchElement:r||"touchShortcutsOff"};return r&&r!=="touchShortcutsOff"&&(s.touchShortcutsToggleTranslateTouchElementPreferenceKey=r),{...o,generalRule:s}}),a||it(n("saved"))},type:"finger",title:n("touchShortcutsToggleTranslateTouchElement"),command:"touchShortcutsToggleTranslateTouchElement",description:n("desc.touchShortcutsToggleTranslateTouchElement"),shortcut:t.generalRule.touchShortcutsToggleTranslateTouchElement,disabled:!1}):null}m();function H4(){let e=$e(),[t,n,r,a,o]=e;vt(t,n);let i=Qt(t),s=On(i),u=Ne(p=>{s&&n(f=>n0({...f},p))},[s,n]),l=au(s,t),{t:c}=W(),g=Ne((p,f)=>c("floatBallOptions."+p,f),[]);return!s||!l?d("div",{children:"loading"}):d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:c("floatBallOptions")})}),d(Vi,{image:yr("images/float_ball_intro.png"),nightImage:yr("images/float_ball_intro_night.png"),title:c("intro.floatBallTitle"),description:c("intro.floatBallDescription")}),d(S_,{config:s.config,t:g,rawT:c,rule:l,updateFloatBallRule:u}),d(w_,{t:g,rule:l,updateFloatBallRule:u}),d(D_,{t:g,rule:l,updateFloatBallRule:u}),d(k_,{t:g,rule:l,updateFloatBallRule:u})]})})}function S_({rule:e,config:t,updateFloatBallRule:n,t:r,rawT:a}){return d(xe,{children:d("div",{class:"nav",children:[d(we,{title:r("enable"),description:e.isPc?r("enableDescPc"):r("enableDesc",{touch:a("fingers."+t.generalRule.fingerCountToToggleTranslagePageWhenTouching)})}),d("label",{for:"enable",children:d("input",{type:"checkbox",id:"enable",name:"switch",role:"switch",onChange:o=>{let i=o.target.checked;e.enable=i,n(e)},checked:e.enable})})]})})}function w_({t:e,rule:t,updateFloatBallRule:n}){let[r,a]=$(!1),[o,i]=$(""),[s,u]=$(-1);le(()=>{Ut("esc",()=>{a(!1)})},[]);let l=()=>{a(!r)},c=(f,h,y,C)=>{l(),s==h&&h!=-1?t.blockUrls[h]=f:t.blockUrls=Rn(f,t.blockUrls),n(t),u(-1),i("")},g=(f,h)=>{f.forEach(y=>{t.blockUrls=zt(y,t.blockUrls)}),n(t),u(-1),i("")},p=(f,h,y)=>{a(!r),i(f),u(y)};return d(xe,{children:[d("div",{class:"nav",children:[d(we,{title:e("blockUrls"),description:e("blockUrlDesc")}),d("div",{class:"nav-right",children:d("a",{href:"#",role:"button",class:"add-button secondary outline",onClick:f=>{f.preventDefault(),l()},children:e("add")})}),r?d(aa,{toggleModal:f=>{f.preventDefault(),l()},onSubmitAddUrl:c,type:"excludeMatches",urlValue:o,index:s}):null]}),d(qa,{urls:t.blockUrls||[],type:"excludeMatches",onDeleteUrl:g,onEditUrl:p})]})}function D_({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(we,{title:e("clickType"),description:e("clickTypeDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.clickType=r.target.value,n(t)},children:[d("option",{value:"translate",selected:t.clickType=="translate",children:e("clickTranslate")}),d("option",{value:"popup",selected:t.clickType=="popup",children:e("clickPopup")})]})]})})}function k_({t:e,rule:t,updateFloatBallRule:n}){return d(xe,{children:d("div",{class:"nav",children:[d(we,{title:e("fixedPosition"),description:e("fixedPositionDesc")}),d("select",{class:"select",onChange:r=>{r.preventDefault(),t.fixedPosition=r.target.value,n(t)},children:[d("option",{value:"left",selected:t.fixedPosition=="left",children:e("fixedPositionLeft")}),d("option",{value:"right",selected:t.fixedPosition=="right",children:e("fixedPositionRight")})]})]})})}m();function z4(){let e=$e(),[t,n,r,a,o]=e,[i]=oa();vt(t,n);let[s,u]=$(null),{t:l}=W();if(le(()=>{pt().then(f=>{bn({config:f,url:globalThis.location.href}).then(h=>{u(h)})})},[t]),!s)return d("div",{children:"loading"});let c={...s.config,shortcuts:{...s.config.shortcuts}},g=Nl.filter(f=>f.name==="touch"?Ea():f.name==="mouse"?To(i):!0).map(f=>({name:f.name,shortcuts:f.shortcuts.map(h=>{let y="",C="normal";typeof h=="string"?y=h:(y=h.command,h.type&&(C=h.type));let b="";l(`desc.${y}`)!==`desc.${y}`&&(b=l(`desc.${y}`));let S="";C==="finger"?S=U4(s,t,y):C==="mouseHoverHoldKey"?t?.generalRule&&t?.generalRule[y]!==void 0?S=t.generalRule[y]:S=c.generalRule[y]:t?.shortcuts&&t?.shortcuts[y]!==void 0?S=t.shortcuts[y]:S=c.shortcuts[y];let A=l(`browser.${y}`);return(C==="finger"||C==="mouseHoverHoldKey")&&(A=l(`${y}`)),{command:y,type:C,shortcut:S,title:A,description:b,disabled:!(me()||ci())}})})),p=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsSucks")," ",d("kbd",{children:"Ctrl+A"}),"\xA0",d("kbd",{children:"Alt+B"}),"\xA0",d("kbd",{children:"Command+C"}),"\xA0 ",d("kbd",{children:"Ctrl+Shift+D"})," "]});return me()||(Zr()?p=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForFirefox")," ",d("a",{target:"_blank",href:"https://support.mozilla.org/zh-CN/kb/%E7%AE%A1%E7%90%86Firefox%E7%9A%84%E6%89%A9%E5%B1%95%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F",children:[l("help"),"?"]})]}):ci()||(p=()=>d("blockquote",{class:"text-sm",children:[l("browserShortcutsNoteForChrome"),"\xA0",d("a",{href:"#",onClick:f=>{f.preventDefault(),Q.tabs.create({url:"chrome://extensions/shortcuts"})},children:l("goSettings")})]}))),d(ut,{children:d(Ee.Provider,{value:e,children:[d("div",{class:"nav",children:d("strong",{class:"text-lg",children:l("shortcutSettingsTitle")})}),d("div",{children:d(p,{})}),g.map((f,h)=>d("article",{class:"mb-8",children:[d("div",{class:"text-gray-500 text-sm",children:l(`shortcutGroup.${f.name}`)}),f.shortcuts.map((y,C)=>ss(Uu,{...y,key:`shortcut-${C}`,onChange:(b,x)=>{n(S=>{if(y.type==="finger"){let P={...S.generalRule||{},[y.command]:b||"touchShortcutsOff"};return y.command==="touchShortcutsToggleTranslateTouchElement"&&b&&b!=="touchShortcutsOff"&&(P.touchShortcutsToggleTranslateTouchElementPreferenceKey=b),{...S,generalRule:P}}else if(y.type==="mouseHoverHoldKey"){let P={...S.generalRule||{},[y.command]:b||"Off"};return b!=="Off"&&(P.mouseHoverPreferenceKey=b),{...S,generalRule:P}}else{let A={...S?.shortcuts},P={...S,shortcuts:{...A,[y.command]:b}};return b||(P.shortcuts[y.command]=""),P}}),x||it(l("saved"))}}))]},`shortcut-group-${h}`))]})})}m();function A_(){let[e,t]=$(null);return le(()=>{pt().then(n=>{t(n)})},[]),e}function q4(){let[e,t,n,r,a]=$e(),o=A_(),{t:i,setLang:s}=W(),[u,l]=oa();if(!o)return null;return d(ut,{children:d("div",{class:"pb-4",children:d(c,{})})});function c(){return le(()=>{e&&g()},[e]),d(xe,{children:d("div",{style:{width:"100%"},children:d("p",{children:[i("download_started")," ",d("a",{href:"#",class:"secondary",onClick:p=>{p.preventDefault(),g()},children:i("here")})]})})});function g(){let p=new Blob([JSON.stringify(e,null,2)],{type:"text/plain;charset=utf-8"});ao.saveAs(p,"immersive-translate-config-"+$i()+".txt")}}}m();m();function y5(){return d("svg",{id:"svg",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0, 0, 400,400",children:d("g",{id:"svgg",children:[d("path",{id:"path0",d:"M116.705 75.100 L 116.600 89.000 88.900 89.103 L 61.200 89.205 61.200 137.600 L 61.200 185.995 88.900 186.097 L 116.600 186.200 116.704 207.100 L 116.807 228.000 130.604 228.000 L 144.400 228.000 144.400 207.000 L 144.400 186.000 172.200 186.000 L 200.000 186.000 200.000 137.600 L 200.000 89.200 172.200 89.200 L 144.400 89.200 144.400 75.200 L 144.400 61.200 130.605 61.200 L 116.810 61.200 116.705 75.100 M227.600 88.772 L 227.600 102.800 250.576 102.800 C 265.463 102.800,273.640 102.941,273.800 103.200 C 273.936 103.420,274.387 103.600,274.803 103.600 C 281.873 103.600,292.696 112.756,295.278 120.921 C 295.778 122.505,296.371 123.928,296.594 124.085 C 296.854 124.268,297.044 130.468,297.124 141.385 L 297.247 158.400 311.262 158.400 L 325.277 158.400 325.083 140.900 C 324.882 122.835,324.541 118.696,323.013 115.765 C 322.678 115.124,322.404 114.303,322.402 113.940 C 322.398 112.713,319.594 106.004,317.992 103.386 C 317.116 101.956,316.400 100.635,316.400 100.451 C 316.400 100.267,315.995 99.677,315.500 99.139 C 315.005 98.601,314.107 97.412,313.504 96.496 C 311.880 94.027,305.442 87.743,302.856 86.103 C 301.615 85.316,300.456 84.430,300.280 84.136 C 300.104 83.841,299.804 83.600,299.613 83.600 C 299.422 83.600,297.879 82.780,296.184 81.778 C 292.949 79.865,288.492 78.078,284.796 77.210 C 283.588 76.927,282.420 76.558,282.200 76.390 C 280.817 75.333,275.285 75.062,251.900 74.906 L 227.600 74.745 227.600 88.772 M116.600 137.600 L 116.600 158.200 102.700 158.305 L 88.800 158.410 88.800 137.600 L 88.800 116.790 102.700 116.895 L 116.600 117.000 116.600 137.600 M172.000 137.600 L 172.000 158.400 158.200 158.400 L 144.400 158.400 144.400 137.600 L 144.400 116.800 158.200 116.800 L 172.000 116.800 172.000 137.600 M255.091 172.900 C 254.773 174.314,252.711 179.778,252.412 180.000 C 252.263 180.110,251.461 182.090,250.628 184.400 C 249.795 186.710,248.891 188.960,248.619 189.400 C 248.166 190.130,246.935 193.348,245.328 198.000 C 244.986 198.990,244.579 199.890,244.424 200.000 C 244.269 200.110,243.461 202.090,242.628 204.400 C 241.795 206.710,240.891 208.960,240.619 209.400 C 240.166 210.130,238.935 213.348,237.328 218.000 C 236.986 218.990,236.579 219.890,236.424 220.000 C 236.269 220.110,235.461 222.090,234.628 224.400 C 233.795 226.710,232.891 228.960,232.619 229.400 C 232.166 230.130,230.935 233.348,229.328 238.000 C 228.986 238.990,228.579 239.890,228.424 240.000 C 228.269 240.110,227.461 242.090,226.628 244.400 C 225.795 246.710,224.883 248.969,224.600 249.421 C 224.317 249.872,223.808 251.042,223.468 252.021 C 221.781 256.882,220.655 259.819,220.412 260.000 C 220.263 260.110,219.461 262.090,218.628 264.400 C 217.795 266.710,216.883 268.969,216.600 269.421 C 216.317 269.872,215.808 271.042,215.468 272.021 C 213.781 276.882,212.655 279.819,212.412 280.000 C 212.263 280.110,211.461 282.090,210.628 284.400 C 209.795 286.710,208.891 288.960,208.619 289.400 C 208.166 290.130,206.935 293.348,205.328 298.000 C 204.986 298.990,204.579 299.890,204.424 300.000 C 204.269 300.110,203.461 302.090,202.628 304.400 C 201.795 306.710,200.891 308.960,200.619 309.400 C 200.166 310.130,198.935 313.348,197.328 318.000 C 196.986 318.990,196.583 319.890,196.433 320.000 C 196.191 320.178,194.400 324.617,194.400 325.040 C 194.400 325.133,201.186 325.162,209.480 325.105 L 224.560 325.000 225.465 322.471 C 225.963 321.079,226.659 319.369,227.011 318.671 C 227.637 317.428,230.057 311.085,230.587 309.300 C 230.734 308.805,231.001 308.400,231.180 308.400 C 231.360 308.400,231.597 307.995,231.708 307.500 C 231.993 306.224,234.272 300.138,235.022 298.649 C 235.639 297.423,238.062 291.071,238.587 289.300 C 238.734 288.805,239.022 288.400,239.227 288.400 C 239.432 288.400,239.600 288.145,239.600 287.833 C 239.600 287.521,239.954 286.441,240.386 285.433 L 241.172 283.600 269.531 283.600 L 297.891 283.600 298.546 285.313 C 298.906 286.256,299.200 287.175,299.200 287.355 C 299.200 287.536,299.629 288.537,300.152 289.580 C 300.676 290.623,301.788 293.349,302.623 295.638 C 303.458 297.927,304.269 299.890,304.424 300.000 C 304.579 300.110,304.987 301.010,305.331 302.000 C 306.989 306.773,307.765 308.786,308.800 311.000 C 310.009 313.586,311.554 317.639,311.888 319.100 C 312.001 319.595,312.238 320.000,312.416 320.000 C 312.593 320.000,312.945 320.675,313.198 321.500 C 313.452 322.325,313.847 323.495,314.078 324.100 L 314.497 325.200 329.449 325.200 C 346.303 325.200,345.174 325.457,343.448 322.020 C 342.924 320.977,341.812 318.251,340.977 315.962 C 340.142 313.673,339.337 311.710,339.188 311.600 C 338.945 311.419,337.819 308.482,336.132 303.621 C 335.792 302.642,335.283 301.472,335.000 301.021 C 334.717 300.569,333.805 298.310,332.972 296.000 C 332.139 293.690,331.337 291.710,331.188 291.600 C 330.945 291.419,329.819 288.482,328.132 283.621 C 327.792 282.642,327.283 281.472,327.000 281.021 C 326.717 280.569,325.805 278.310,324.972 276.000 C 324.139 273.690,323.337 271.710,323.188 271.600 C 322.945 271.419,321.819 268.482,320.132 263.621 C 319.792 262.642,319.283 261.472,319.000 261.021 C 318.717 260.569,317.805 258.310,316.972 256.000 C 316.139 253.690,315.337 251.710,315.188 251.600 C 314.945 251.419,313.819 248.482,312.132 243.621 C 311.792 242.642,311.283 241.472,311.000 241.021 C 310.717 240.569,309.805 238.310,308.972 236.000 C 308.139 233.690,307.337 231.710,307.188 231.600 C 306.945 231.419,305.819 228.482,304.132 223.621 C 303.792 222.642,303.283 221.472,303.000 221.021 C 302.717 220.569,301.805 218.310,300.972 216.000 C 300.139 213.690,299.331 211.710,299.176 211.600 C 299.021 211.490,298.614 210.590,298.272 209.600 C 296.665 204.948,295.434 201.730,294.981 201.000 C 294.709 200.560,293.805 198.310,292.972 196.000 C 292.139 193.690,291.331 191.710,291.176 191.600 C 291.021 191.490,290.614 190.590,290.272 189.600 C 288.667 184.953,287.434 181.730,286.982 181.000 C 286.710 180.560,285.905 178.580,285.192 176.600 C 284.480 174.620,283.718 172.775,283.500 172.500 C 283.195 172.117,279.842 172.000,269.198 172.000 L 255.293 172.000 255.091 172.900 M270.342 214.500 C 270.978 216.680,272.184 219.788,272.480 220.011 C 272.634 220.128,273.474 222.198,274.346 224.611 C 275.218 227.025,276.219 229.562,276.570 230.249 C 277.192 231.467,279.455 237.406,279.904 239.000 C 280.028 239.440,280.272 239.895,280.445 240.011 C 280.618 240.128,281.479 242.228,282.357 244.679 C 283.235 247.131,284.144 249.465,284.377 249.868 C 285.100 251.118,286.400 254.437,286.400 255.033 C 286.400 255.513,283.802 255.600,269.400 255.600 C 260.050 255.600,252.400 255.506,252.400 255.392 C 252.400 255.278,252.850 254.077,253.400 252.723 C 253.950 251.370,254.400 250.036,254.400 249.760 C 254.400 249.483,254.637 249.019,254.928 248.729 C 255.218 248.438,255.560 247.840,255.688 247.400 C 256.167 245.754,258.416 239.852,259.022 238.649 C 259.639 237.423,262.062 231.071,262.587 229.300 C 262.734 228.805,263.001 228.400,263.180 228.400 C 263.360 228.400,263.597 227.995,263.708 227.500 C 264.027 226.071,266.188 220.398,267.344 217.955 C 267.925 216.727,268.400 215.617,268.400 215.487 C 268.400 213.445,269.823 212.722,270.342 214.500 M74.908 258.900 C 75.078 275.176,75.446 280.965,76.390 282.200 C 76.558 282.420,76.925 283.590,77.205 284.800 C 78.005 288.246,79.979 293.127,81.870 296.333 C 82.821 297.946,83.600 299.422,83.600 299.613 C 83.600 299.804,83.841 300.104,84.136 300.280 C 84.430 300.456,85.316 301.615,86.103 302.856 C 87.894 305.679,94.229 312.056,96.838 313.661 C 97.917 314.325,98.800 315.003,98.800 315.167 C 98.800 315.331,99.295 315.718,99.900 316.027 C 100.505 316.336,102.122 317.262,103.493 318.086 C 106.058 319.626,112.767 322.398,113.940 322.402 C 114.303 322.404,115.124 322.678,115.765 323.013 C 118.974 324.686,122.332 324.902,147.900 325.085 L 172.400 325.259 172.400 311.245 L 172.400 297.230 148.585 297.115 C 133.034 297.040,124.671 296.859,124.485 296.593 C 124.328 296.370,123.304 295.955,122.210 295.671 C 113.434 293.396,105.109 284.270,103.791 275.479 C 103.635 274.440,103.348 273.492,103.154 273.371 C 102.958 273.251,102.800 266.091,102.800 257.376 L 102.800 241.600 88.764 241.600 L 74.728 241.600 74.908 258.900 ",stroke:"none",fill:"#fcfcfc","fill-rule":"evenodd"}),d("path",{id:"path1",d:"M47.411 2.664 C 45.657 2.981,44.127 3.372,44.011 3.533 C 43.895 3.694,42.810 4.067,41.600 4.362 C 38.910 5.017,33.083 7.195,32.777 7.660 C 32.654 7.847,31.304 8.616,29.777 9.371 C 28.249 10.125,26.280 11.385,25.400 12.171 C 24.520 12.956,23.626 13.600,23.412 13.600 C 23.006 13.600,21.491 14.969,18.277 18.242 C 14.870 21.711,14.144 22.565,12.961 24.499 C 12.323 25.544,11.674 26.399,11.519 26.399 C 11.365 26.400,10.466 27.975,9.521 29.900 C 8.576 31.825,7.581 33.634,7.309 33.921 C 6.749 34.512,4.509 41.424,4.141 43.700 C 4.007 44.525,3.763 45.200,3.598 45.200 C 2.468 45.200,2.400 53.950,2.400 200.400 C 2.400 348.123,2.460 355.600,3.649 355.600 C 3.842 355.600,4.000 355.940,4.000 356.355 C 4.000 358.391,6.974 367.200,7.661 367.200 C 7.847 367.200,8.001 367.425,8.002 367.700 C 8.005 368.559,10.815 373.724,11.832 374.741 C 12.364 375.273,12.800 375.918,12.800 376.174 C 12.800 377.128,22.380 387.200,23.288 387.200 C 23.493 387.200,24.161 387.695,24.771 388.300 C 25.381 388.905,26.852 389.918,28.040 390.551 C 29.228 391.184,30.290 391.836,30.400 392.000 C 30.632 392.346,33.327 393.596,36.432 394.797 C 37.625 395.259,39.175 395.902,39.877 396.226 C 40.580 396.550,42.830 397.214,44.877 397.701 L 48.600 398.585 199.200 398.710 C 307.771 398.799,350.693 398.711,353.000 398.391 C 357.180 397.813,362.564 396.484,362.733 395.990 C 362.807 395.775,363.127 395.600,363.445 395.600 C 364.500 395.600,370.951 392.776,371.600 392.030 C 371.710 391.904,372.430 391.462,373.200 391.049 C 376.487 389.286,377.434 388.693,378.000 388.045 C 378.330 387.668,379.320 386.837,380.200 386.198 C 382.889 384.248,388.894 377.717,389.891 375.657 C 390.221 374.976,390.875 373.991,391.345 373.467 C 392.202 372.513,393.857 369.363,394.814 366.866 C 395.095 366.132,395.535 365.322,395.790 365.066 C 396.421 364.434,398.247 357.808,398.993 353.448 C 399.919 348.029,399.914 52.728,398.988 47.352 C 398.229 42.949,396.410 36.400,395.945 36.400 C 395.755 36.400,395.600 36.231,395.600 36.024 C 395.600 35.238,392.306 28.585,391.766 28.280 C 391.455 28.104,391.200 27.786,391.200 27.574 C 391.200 26.249,386.178 20.048,381.967 16.174 C 379.417 13.828,373.665 9.784,371.800 9.025 C 370.920 8.667,370.020 8.154,369.800 7.886 C 369.101 7.034,360.812 4.018,359.133 4.005 C 358.767 4.002,358.407 3.827,358.333 3.616 C 357.735 1.894,56.765 0.972,47.411 2.664 M144.705 74.900 L 144.810 88.800 172.405 88.800 L 200.000 88.800 200.000 137.600 L 200.000 186.400 172.400 186.400 L 144.800 186.400 144.800 207.200 L 144.800 228.000 130.600 228.000 L 116.400 228.000 116.400 207.200 L 116.400 186.400 88.600 186.400 L 60.800 186.400 60.800 137.600 L 60.800 88.800 88.600 88.800 L 116.400 88.800 116.400 74.795 L 116.400 60.790 130.500 60.895 L 144.600 61.000 144.705 74.900 M277.400 75.067 C 277.840 75.324,279.820 75.825,281.800 76.181 C 285.920 76.920,291.600 78.689,291.600 79.233 C 291.600 79.435,291.873 79.600,292.206 79.600 C 292.912 79.600,299.079 82.679,299.271 83.127 C 299.342 83.294,300.210 83.900,301.200 84.475 C 305.072 86.723,313.353 94.921,315.225 98.359 C 315.568 98.990,316.158 99.815,316.536 100.193 C 318.699 102.356,323.995 115.750,323.999 119.067 C 324.000 119.543,324.164 119.993,324.364 120.067 C 325.126 120.346,325.600 129.481,325.600 143.869 L 325.600 158.800 311.200 158.800 L 296.800 158.800 296.800 143.055 C 296.800 124.194,296.908 124.966,293.169 117.022 C 291.290 113.028,285.600 107.884,280.800 105.838 C 279.370 105.229,277.570 104.431,276.800 104.065 C 275.552 103.472,272.799 103.387,251.500 103.282 L 227.600 103.165 227.600 88.753 L 227.600 74.341 252.100 74.470 C 269.857 74.564,276.820 74.729,277.400 75.067 M89.200 137.600 L 89.200 158.000 102.800 158.000 L 116.400 158.000 116.400 137.600 L 116.400 117.200 102.800 117.200 L 89.200 117.200 89.200 137.600 M144.800 137.600 L 144.800 158.000 158.400 158.000 L 172.000 158.000 172.000 137.600 L 172.000 117.200 158.400 117.200 L 144.800 117.200 144.800 137.600 M284.742 174.500 C 285.378 175.875,286.301 178.170,286.792 179.600 C 287.284 181.030,287.917 182.569,288.200 183.021 C 288.483 183.472,288.994 184.642,289.335 185.621 C 291.027 190.467,291.767 192.393,292.787 194.597 C 293.398 195.919,294.301 198.170,294.792 199.600 C 295.284 201.030,295.917 202.569,296.200 203.021 C 296.483 203.472,296.994 204.642,297.335 205.621 C 299.027 210.467,299.767 212.393,300.787 214.597 C 301.398 215.919,302.301 218.170,302.792 219.600 C 303.284 221.030,303.917 222.569,304.200 223.021 C 304.483 223.472,304.994 224.642,305.335 225.621 C 307.027 230.467,307.767 232.393,308.787 234.597 C 309.398 235.919,310.301 238.170,310.792 239.600 C 311.284 241.030,311.917 242.569,312.200 243.021 C 312.483 243.472,312.994 244.642,313.335 245.621 C 315.027 250.467,315.767 252.393,316.787 254.597 C 317.398 255.919,318.301 258.170,318.792 259.600 C 319.284 261.030,319.917 262.569,320.200 263.021 C 320.483 263.472,320.994 264.642,321.335 265.621 C 323.027 270.467,323.767 272.393,324.787 274.597 C 325.398 275.919,326.301 278.170,326.792 279.600 C 327.284 281.030,327.917 282.569,328.200 283.021 C 328.483 283.472,328.994 284.642,329.335 285.621 C 331.027 290.467,331.767 292.393,332.787 294.597 C 333.398 295.919,334.301 298.170,334.792 299.600 C 335.284 301.030,335.917 302.569,336.200 303.021 C 336.483 303.472,336.994 304.642,337.335 305.621 C 339.027 310.467,339.767 312.393,340.787 314.597 C 341.398 315.919,342.304 318.170,342.799 319.600 C 343.295 321.030,343.975 322.675,344.310 323.255 C 345.685 325.635,345.908 325.600,329.282 325.600 L 314.138 325.600 313.016 322.300 C 312.399 320.485,311.676 318.640,311.410 318.200 C 311.144 317.760,310.165 315.423,309.234 313.006 C 308.304 310.590,307.395 308.430,307.215 308.206 C 307.034 307.983,306.609 306.990,306.269 306.000 C 304.673 301.355,303.463 298.161,303.149 297.761 C 302.959 297.520,302.082 295.377,301.200 293.000 C 300.318 290.623,299.435 288.480,299.236 288.239 C 299.038 287.998,298.568 286.855,298.192 285.700 L 297.508 283.600 269.566 283.600 L 241.625 283.600 240.633 285.700 C 240.087 286.855,238.983 289.600,238.178 291.800 C 237.373 294.000,236.583 295.890,236.422 296.000 C 236.261 296.110,236.028 296.560,235.904 297.000 C 235.462 298.571,233.200 304.513,232.425 306.142 C 231.992 307.054,230.979 309.600,230.176 311.800 C 229.372 314.000,228.583 315.890,228.422 316.000 C 228.261 316.110,228.028 316.560,227.904 317.000 C 227.349 318.970,225.160 324.566,224.753 325.057 C 224.144 325.790,194.000 325.870,194.000 325.139 C 194.000 324.885,194.433 323.760,194.963 322.639 C 195.849 320.762,196.618 318.753,198.269 314.000 C 198.613 313.010,199.021 312.110,199.176 312.000 C 199.331 311.890,200.139 309.910,200.972 307.600 C 201.805 305.290,202.717 303.031,203.000 302.579 C 203.283 302.128,203.792 300.958,204.132 299.979 C 205.819 295.118,206.945 292.181,207.188 292.000 C 207.337 291.890,208.139 289.910,208.972 287.600 C 209.805 285.290,210.709 283.040,210.981 282.600 C 211.434 281.870,212.665 278.652,214.272 274.000 C 214.614 273.010,215.021 272.110,215.176 272.000 C 215.331 271.890,216.139 269.910,216.972 267.600 C 217.805 265.290,218.717 263.031,219.000 262.579 C 219.283 262.128,219.792 260.958,220.132 259.979 C 221.819 255.118,222.945 252.181,223.188 252.000 C 223.337 251.890,224.139 249.910,224.972 247.600 C 225.805 245.290,226.717 243.031,227.000 242.579 C 227.283 242.128,227.792 240.958,228.132 239.979 C 229.819 235.118,230.945 232.181,231.188 232.000 C 231.337 231.890,232.139 229.910,232.972 227.600 C 233.805 225.290,234.709 223.040,234.981 222.600 C 235.434 221.870,236.665 218.652,238.272 214.000 C 238.614 213.010,239.021 212.110,239.176 212.000 C 239.331 211.890,240.139 209.910,240.972 207.600 C 241.805 205.290,242.717 203.031,243.000 202.579 C 243.283 202.128,243.792 200.958,244.132 199.979 C 245.819 195.118,246.945 192.181,247.188 192.000 C 247.337 191.890,248.139 189.910,248.972 187.600 C 249.805 185.290,250.709 183.040,250.981 182.600 C 251.463 181.823,253.007 177.762,254.290 173.900 L 254.922 172.000 269.253 172.000 L 283.584 172.000 284.742 174.500 M269.200 214.548 C 269.200 214.875,268.963 215.381,268.672 215.671 C 268.382 215.962,268.040 216.560,267.912 217.000 C 267.427 218.664,265.182 224.551,264.425 226.142 C 263.992 227.054,262.979 229.600,262.176 231.800 C 261.372 234.000,260.583 235.890,260.422 236.000 C 260.261 236.110,260.028 236.560,259.904 237.000 C 259.462 238.569,257.200 244.513,256.426 246.142 C 255.992 247.054,255.012 249.510,254.248 251.600 L 252.860 255.400 269.292 255.504 C 278.330 255.562,285.804 255.529,285.902 255.432 C 285.999 255.334,285.594 253.937,285.001 252.327 C 284.409 250.717,283.822 249.040,283.697 248.600 C 283.572 248.160,283.328 247.705,283.155 247.589 C 282.982 247.472,282.126 245.402,281.254 242.989 C 280.382 240.575,279.381 238.038,279.030 237.351 C 278.408 236.133,276.145 230.194,275.696 228.600 C 275.572 228.160,275.328 227.705,275.155 227.589 C 274.982 227.472,274.125 225.402,273.251 222.989 C 272.376 220.575,271.288 217.844,270.831 216.919 C 270.374 215.995,270.000 215.061,270.000 214.843 C 270.000 214.625,269.820 214.336,269.600 214.200 C 269.380 214.064,269.200 214.221,269.200 214.548 M103.200 256.745 C 103.200 271.263,103.434 275.394,104.370 277.400 C 104.576 277.840,105.239 279.370,105.845 280.800 C 107.787 285.385,113.002 291.278,116.618 292.972 C 117.488 293.380,119.100 294.145,120.200 294.673 C 124.060 296.526,124.345 296.547,149.000 296.778 L 172.600 297.000 172.600 311.200 L 172.600 325.400 151.400 325.522 C 130.794 325.641,120.383 325.260,120.067 324.374 C 119.993 324.168,119.543 324.000,119.067 323.999 C 115.750 323.995,102.356 318.699,100.193 316.536 C 99.815 316.158,98.990 315.568,98.359 315.225 C 94.897 313.340,86.661 305.008,84.496 301.200 C 83.934 300.210,83.261 299.220,83.001 299.000 C 82.404 298.494,79.600 292.826,79.600 292.124 C 79.600 291.836,79.435 291.600,79.233 291.600 C 78.689 291.600,76.920 285.920,76.181 281.800 C 75.825 279.820,75.327 277.840,75.073 277.400 C 74.749 276.839,74.568 271.314,74.467 258.900 L 74.324 241.200 88.762 241.200 L 103.200 241.200 103.200 256.745 ",stroke:"none",fill:"#ec4c8c","fill-rule":"evenodd"}),d("path",{id:"path2",d:"",stroke:"none",fill:"#f4d4100","fill-rule":"evenodd"}),d("path",{id:"path3",d:"M235.600 74.690 C 256.786 74.968,273.107 74.972,272.938 74.700 C 272.836 74.535,262.548 74.441,250.076 74.491 C 237.604 74.542,231.090 74.631,235.600 74.690 M286.800 77.414 C 286.800 77.693,289.706 78.831,290.091 78.703 C 290.282 78.639,289.620 78.284,288.619 77.913 C 287.619 77.542,286.800 77.317,286.800 77.414 M302.400 85.290 C 302.400 85.377,303.435 86.328,304.700 87.403 C 305.965 88.479,306.640 88.944,306.200 88.436 C 305.364 87.471,302.400 85.017,302.400 85.290 M308.783 90.900 C 310.441 92.666,310.800 92.984,310.800 92.683 C 310.800 92.619,309.945 91.764,308.900 90.783 L 307.000 89.000 308.783 90.900 M312.597 95.300 C 313.672 96.565,314.623 97.600,314.710 97.600 C 314.983 97.600,312.529 94.636,311.564 93.800 C 311.056 93.360,311.521 94.035,312.597 95.300 M321.200 109.884 C 321.200 110.451,322.363 113.200,322.602 113.200 C 322.707 113.200,322.496 112.435,322.132 111.500 C 321.395 109.607,321.200 109.269,321.200 109.884 M88.994 137.400 L 89.000 158.200 102.700 158.208 L 116.400 158.216 102.804 158.103 L 89.207 157.990 89.098 137.295 L 88.989 116.600 88.994 137.400 M324.641 122.800 C 324.839 123.130,325.109 131.320,325.243 141.000 L 325.485 158.600 325.443 140.920 C 325.407 126.341,325.302 123.148,324.841 122.720 C 324.377 122.288,324.343 122.301,324.641 122.800 M151.074 158.299 C 154.855 158.365,161.155 158.365,165.074 158.299 C 168.993 158.234,165.900 158.180,158.200 158.180 C 150.500 158.180,147.293 158.234,151.074 158.299 M253.700 175.700 C 253.270 176.875,253.280 176.926,253.812 176.224 C 254.321 175.552,254.621 174.400,254.288 174.400 C 254.226 174.400,253.961 174.985,253.700 175.700 M250.196 184.272 C 249.858 185.081,249.633 185.900,249.697 186.091 C 249.761 186.282,250.116 185.620,250.487 184.619 C 251.293 182.445,251.070 182.179,250.196 184.272 M74.729 186.300 C 82.500 186.361,95.100 186.361,102.729 186.300 C 110.358 186.239,104.000 186.189,88.600 186.189 C 73.200 186.189,66.958 186.239,74.729 186.300 M158.500 186.300 C 166.145 186.361,178.655 186.361,186.300 186.300 C 193.945 186.239,187.690 186.189,172.400 186.189 C 157.110 186.189,150.855 186.239,158.500 186.300 M289.200 186.284 C 289.200 186.851,290.363 189.600,290.602 189.600 C 290.707 189.600,290.496 188.835,290.132 187.900 C 289.395 186.007,289.200 185.669,289.200 186.284 M245.700 195.700 C 245.270 196.875,245.280 196.926,245.812 196.224 C 246.321 195.552,246.621 194.400,246.288 194.400 C 246.226 194.400,245.961 194.985,245.700 195.700 M242.196 204.272 C 241.858 205.081,241.633 205.900,241.697 206.091 C 241.761 206.282,242.116 205.620,242.487 204.619 C 243.293 202.445,243.070 202.179,242.196 204.272 M297.200 206.284 C 297.200 206.851,298.363 209.600,298.602 209.600 C 298.707 209.600,298.496 208.835,298.132 207.900 C 297.395 206.007,297.200 205.669,297.200 206.284 M237.700 215.700 C 237.270 216.875,237.280 216.926,237.812 216.224 C 238.321 215.552,238.621 214.400,238.288 214.400 C 238.226 214.400,237.961 214.985,237.700 215.700 M270.032 214.824 C 270.014 215.166,270.280 215.796,270.622 216.224 C 271.234 216.988,271.238 216.987,270.876 216.200 C 270.674 215.760,270.408 215.130,270.286 214.800 C 270.093 214.282,270.059 214.285,270.032 214.824 M265.267 223.180 C 265.033 223.851,264.927 224.400,265.031 224.400 C 265.301 224.400,266.056 222.322,265.857 222.124 C 265.767 222.033,265.501 222.508,265.267 223.180 M234.196 224.272 C 233.858 225.081,233.633 225.900,233.697 226.091 C 233.761 226.282,234.116 225.620,234.487 224.619 C 235.293 222.445,235.070 222.179,234.196 224.272 M273.913 224.619 C 274.284 225.620,274.639 226.282,274.703 226.091 C 274.831 225.706,273.693 222.800,273.414 222.800 C 273.317 222.800,273.542 223.619,273.913 224.619 M305.200 226.284 C 305.200 226.851,306.363 229.600,306.602 229.600 C 306.707 229.600,306.496 228.835,306.132 227.900 C 305.395 226.007,305.200 225.669,305.200 226.284 M261.756 231.843 C 261.424 232.637,261.226 233.359,261.314 233.448 C 261.403 233.536,261.759 232.887,262.105 232.004 C 262.889 230.009,262.582 229.868,261.756 231.843 M229.700 235.700 C 229.270 236.875,229.280 236.926,229.812 236.224 C 230.321 235.552,230.621 234.400,230.288 234.400 C 230.226 234.400,229.961 234.985,229.700 235.700 M278.032 234.824 C 278.014 235.166,278.280 235.796,278.622 236.224 C 279.234 236.988,279.238 236.987,278.876 236.200 C 278.674 235.760,278.408 235.130,278.286 234.800 C 278.093 234.282,278.059 234.285,278.032 234.824 M309.113 236.219 C 309.484 237.220,309.839 237.882,309.903 237.691 C 310.031 237.306,308.893 234.400,308.614 234.400 C 308.517 234.400,308.742 235.219,309.113 236.219 M74.488 257.076 C 74.440 265.698,74.535 272.836,74.700 272.939 C 74.973 273.108,74.967 261.235,74.687 247.000 C 74.626 243.920,74.537 248.454,74.488 257.076 M257.267 243.180 C 257.033 243.851,256.927 244.400,257.031 244.400 C 257.301 244.400,258.056 242.322,257.857 242.124 C 257.767 242.033,257.501 242.508,257.267 243.180 M226.196 244.272 C 225.858 245.081,225.633 245.900,225.697 246.091 C 225.761 246.282,226.116 245.620,226.487 244.619 C 227.293 242.445,227.070 242.179,226.196 244.272 M281.913 244.619 C 282.284 245.620,282.639 246.282,282.703 246.091 C 282.831 245.706,281.693 242.800,281.414 242.800 C 281.317 242.800,281.542 243.619,281.913 244.619 M313.200 246.284 C 313.200 246.851,314.363 249.600,314.602 249.600 C 314.707 249.600,314.496 248.835,314.132 247.900 C 313.395 246.007,313.200 245.669,313.200 246.284 M253.756 251.843 C 253.424 252.637,253.226 253.359,253.314 253.448 C 253.403 253.536,253.759 252.887,254.105 252.004 C 254.889 250.009,254.582 249.868,253.756 251.843 M221.700 255.700 C 221.270 256.875,221.280 256.926,221.812 256.224 C 222.321 255.552,222.621 254.400,222.288 254.400 C 222.226 254.400,221.961 254.985,221.700 255.700 M317.113 256.219 C 317.484 257.220,317.839 257.882,317.903 257.691 C 318.031 257.306,316.893 254.400,316.614 254.400 C 316.517 254.400,316.742 255.219,317.113 256.219 M218.196 264.272 C 217.858 265.081,217.633 265.900,217.697 266.091 C 217.761 266.282,218.116 265.620,218.487 264.619 C 219.293 262.445,219.070 262.179,218.196 264.272 M321.200 266.284 C 321.200 266.851,322.363 269.600,322.602 269.600 C 322.707 269.600,322.496 268.835,322.132 267.900 C 321.395 266.007,321.200 265.669,321.200 266.284 M213.700 275.700 C 213.270 276.875,213.280 276.926,213.812 276.224 C 214.321 275.552,214.621 274.400,214.288 274.400 C 214.226 274.400,213.961 274.985,213.700 275.700 M325.113 276.219 C 325.484 277.220,325.839 277.882,325.903 277.691 C 326.031 277.306,324.893 274.400,324.614 274.400 C 324.517 274.400,324.742 275.219,325.113 276.219 M105.007 279.879 C 105.607 281.314,106.000 281.962,106.000 281.516 C 106.000 281.084,104.785 278.400,104.589 278.400 C 104.479 278.400,104.667 279.066,105.007 279.879 M210.196 284.272 C 209.858 285.081,209.633 285.900,209.697 286.091 C 209.761 286.282,210.116 285.620,210.487 284.619 C 211.293 282.445,211.070 282.179,210.196 284.272 M329.200 286.284 C 329.200 286.851,330.363 289.600,330.602 289.600 C 330.707 289.600,330.496 288.835,330.132 287.900 C 329.395 286.007,329.200 285.669,329.200 286.284 M77.913 288.619 C 78.284 289.620,78.639 290.282,78.703 290.091 C 78.831 289.706,77.693 286.800,77.414 286.800 C 77.317 286.800,77.542 287.619,77.913 288.619 M237.756 291.843 C 237.424 292.637,237.226 293.359,237.314 293.448 C 237.403 293.536,237.759 292.887,238.105 292.004 C 238.889 290.009,238.582 289.868,237.756 291.843 M301.600 293.884 C 301.600 294.451,302.763 297.200,303.002 297.200 C 303.107 297.200,302.896 296.435,302.532 295.500 C 301.795 293.607,301.600 293.269,301.600 293.884 M205.700 295.700 C 205.270 296.875,205.280 296.926,205.812 296.224 C 206.321 295.552,206.621 294.400,206.288 294.400 C 206.226 294.400,205.961 294.985,205.700 295.700 M333.113 296.219 C 333.484 297.220,333.839 297.882,333.903 297.691 C 334.031 297.306,332.893 294.400,332.614 294.400 C 332.517 294.400,332.742 295.219,333.113 296.219 M233.095 303.596 C 232.748 304.478,232.549 305.200,232.653 305.200 C 232.923 305.200,234.078 302.345,233.886 302.152 C 233.797 302.064,233.441 302.713,233.095 303.596 M86.322 303.900 C 86.977 304.725,87.928 305.760,88.436 306.200 C 88.944 306.640,88.479 305.965,87.403 304.700 C 85.213 302.124,84.490 301.589,86.322 303.900 M202.196 304.272 C 201.858 305.081,201.633 305.900,201.697 306.091 C 201.761 306.282,202.116 305.620,202.487 304.619 C 203.293 302.445,203.070 302.179,202.196 304.272 M305.524 303.800 C 305.726 304.240,305.992 304.870,306.114 305.200 C 306.307 305.718,306.341 305.715,306.368 305.176 C 306.386 304.834,306.120 304.204,305.778 303.776 C 305.166 303.012,305.162 303.013,305.524 303.800 M337.200 306.284 C 337.200 306.851,338.363 309.600,338.602 309.600 C 338.707 309.600,338.496 308.835,338.132 307.900 C 337.395 306.007,337.200 305.669,337.200 306.284 M90.783 308.900 C 91.764 309.945,92.619 310.800,92.683 310.800 C 92.984 310.800,92.666 310.441,90.900 308.783 L 89.000 307.000 90.783 308.900 M229.756 311.843 C 229.424 312.637,229.226 313.359,229.314 313.448 C 229.403 313.536,229.759 312.887,230.105 312.004 C 230.889 310.009,230.582 309.868,229.756 311.843 M93.800 311.564 C 94.636 312.529,97.600 314.983,97.600 314.710 C 97.600 314.623,96.565 313.672,95.300 312.597 C 94.035 311.521,93.360 311.056,93.800 311.564 M197.700 315.700 C 197.270 316.875,197.280 316.926,197.812 316.224 C 198.321 315.552,198.621 314.400,198.288 314.400 C 198.226 314.400,197.961 314.985,197.700 315.700 M310.032 314.824 C 310.014 315.166,310.280 315.796,310.622 316.224 C 311.234 316.988,311.238 316.987,310.876 316.200 C 310.674 315.760,310.408 315.130,310.286 314.800 C 310.093 314.282,310.059 314.285,310.032 314.824 M341.113 316.219 C 341.484 317.220,341.839 317.882,341.903 317.691 C 342.031 317.306,340.893 314.400,340.614 314.400 C 340.517 314.400,340.742 315.219,341.113 316.219 M109.633 321.335 C 110.019 321.647,113.200 322.777,113.200 322.602 C 113.200 322.363,110.451 321.200,109.884 321.200 C 109.655 321.200,109.542 321.261,109.633 321.335 M225.095 323.596 L 224.464 325.200 209.432 325.200 C 201.164 325.200,194.400 325.122,194.400 325.026 C 194.400 324.930,194.591 324.345,194.825 323.726 C 195.109 322.974,195.113 322.736,194.837 323.009 C 194.609 323.233,194.373 323.863,194.311 324.409 L 194.200 325.400 209.400 325.400 L 224.600 325.400 225.344 323.877 C 225.753 323.040,226.006 322.273,225.906 322.173 C 225.806 322.073,225.441 322.713,225.095 323.596 M313.791 324.300 L 314.421 325.600 329.510 325.505 L 344.600 325.410 329.500 325.300 C 321.195 325.240,314.400 325.047,314.400 324.872 C 314.400 324.696,314.121 324.204,313.781 323.776 C 313.234 323.091,313.235 323.152,313.791 324.300 M127.143 325.303 C 127.310 325.470,137.606 325.560,150.023 325.503 L 172.600 325.400 149.720 325.200 C 137.136 325.090,126.976 325.137,127.143 325.303 ",stroke:"none",fill:"#f478c8","fill-rule":"evenodd"}),d("path",{id:"path4",d:"M144.580 75.000 C 144.580 82.700,144.634 85.793,144.699 81.874 C 144.765 77.955,144.765 71.655,144.699 67.874 C 144.634 64.093,144.580 67.300,144.580 75.000 M274.100 75.087 C 274.705 75.178,275.695 75.178,276.300 75.087 C 276.905 74.995,276.410 74.920,275.200 74.920 C 273.990 74.920,273.495 74.995,274.100 75.087 M95.900 117.099 C 99.695 117.165,105.905 117.165,109.700 117.099 C 113.495 117.034,110.390 116.980,102.800 116.980 C 95.210 116.980,92.105 117.034,95.900 117.099 M144.583 117.300 C 144.478 117.575,144.440 126.890,144.500 138.000 L 144.608 158.200 144.704 137.705 L 144.800 117.211 158.500 117.100 L 172.200 116.989 158.487 116.895 C 147.816 116.821,144.732 116.911,144.583 117.300 M324.493 121.200 C 324.493 121.970,324.575 122.285,324.676 121.900 C 324.776 121.515,324.776 120.885,324.676 120.500 C 324.575 120.115,324.493 120.430,324.493 121.200 M288.429 184.310 C 288.676 185.020,289.042 185.703,289.242 185.826 C 289.442 185.950,289.391 185.544,289.127 184.925 C 288.421 183.265,287.906 182.812,288.429 184.310 M144.586 207.200 C 144.586 218.750,144.637 223.475,144.700 217.700 C 144.762 211.925,144.762 202.475,144.700 196.700 C 144.637 190.925,144.586 195.650,144.586 207.200 M296.429 204.310 C 296.676 205.020,297.042 205.703,297.242 205.826 C 297.442 205.950,297.391 205.544,297.127 204.925 C 296.421 203.265,295.906 202.812,296.429 204.310 M268.779 214.655 C 268.558 215.236,268.464 215.797,268.569 215.903 C 268.675 216.008,268.879 215.624,269.023 215.050 C 269.170 214.465,269.470 214.120,269.704 214.265 C 269.949 214.416,270.005 214.331,269.838 214.062 C 269.416 213.379,269.223 213.487,268.779 214.655 M304.429 224.310 C 304.676 225.020,305.042 225.703,305.242 225.826 C 305.442 225.950,305.391 225.544,305.127 224.925 C 304.421 223.265,303.906 222.812,304.429 224.310 M260.779 234.655 C 260.558 235.236,260.452 235.785,260.543 235.876 C 260.633 235.967,260.899 235.492,261.133 234.820 C 261.653 233.328,261.339 233.182,260.779 234.655 M74.920 275.200 C 74.920 276.410,74.995 276.905,75.087 276.300 C 75.178 275.695,75.178 274.705,75.087 274.100 C 74.995 273.495,74.920 273.990,74.920 275.200 M172.580 311.200 C 172.580 319.010,172.634 322.205,172.699 318.300 C 172.765 314.395,172.765 308.005,172.699 304.100 C 172.634 300.195,172.580 303.390,172.580 311.200 M107.200 320.179 C 107.200 320.289,107.740 320.659,108.400 321.000 C 109.060 321.341,109.600 321.531,109.600 321.421 C 109.600 321.311,109.060 320.941,108.400 320.600 C 107.740 320.259,107.200 320.069,107.200 320.179 M120.500 324.676 C 120.885 324.776,121.515 324.776,121.900 324.676 C 122.285 324.575,121.970 324.493,121.200 324.493 C 120.430 324.493,120.115 324.575,120.500 324.676 M123.700 325.087 C 124.305 325.178,125.295 325.178,125.900 325.087 C 126.505 324.995,126.010 324.920,124.800 324.920 C 123.590 324.920,123.095 324.995,123.700 325.087 ",stroke:"none",fill:"#f47c8c","fill-rule":"evenodd"})]})})}function C5(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.9091 2H7.04546C6.50297 2 5.9827 2.2155 5.5991 2.5991C5.2155 2.9827 5 3.50297 5 4.04546V17.9545C5 18.497 5.2155 19.0173 5.5991 19.4009C5.9827 19.7845 6.50297 20 7.04546 20H15.9091C16.4515 20 16.9718 19.7845 17.3554 19.4009C17.739 19.0173 17.9545 18.497 17.9545 17.9545V4.04546C17.9545 3.50297 17.739 2.9827 17.3554 2.5991C16.9718 2.2155 16.4516 2 15.9091 2ZM7.04546 3.36364H15.9091C16.0899 3.36364 16.2633 3.43548 16.3912 3.56334C16.519 3.69121 16.5909 3.86463 16.5909 4.04546V14.2727H6.36362V4.04546C6.36362 3.86463 6.43546 3.69121 6.56332 3.56334C6.69119 3.43548 6.86461 3.36364 7.04544 3.36364H7.04546ZM15.9091 18.6364H7.04546C6.95592 18.6364 6.86726 18.6187 6.78454 18.5845C6.70182 18.5502 6.62665 18.5 6.56334 18.4367C6.50003 18.3733 6.44981 18.2982 6.41554 18.2155C6.38128 18.1327 6.36364 18.0441 6.36364 17.9545V15.6364H16.5909V17.9545C16.5909 18.1354 16.5191 18.3088 16.3912 18.4367C16.2633 18.5645 16.0899 18.6364 15.9091 18.6364H15.9091ZM9.50007 6.09103H13.591C13.7718 6.09103 13.9452 6.01919 14.0731 5.89133C14.201 5.76346 14.2728 5.59004 14.2728 5.40921C14.2728 5.22838 14.201 5.05496 14.0731 4.9271C13.9452 4.79924 13.7718 4.72741 13.591 4.72741H9.50007C9.31924 4.72741 9.14582 4.79924 9.01796 4.9271C8.89009 5.05496 8.81825 5.22838 8.81825 5.40921C8.81825 5.49875 8.83588 5.58741 8.87015 5.67013C8.90441 5.75285 8.95464 5.82802 9.01795 5.89133C9.08126 5.95464 9.15642 6.00486 9.23915 6.03913C9.32187 6.07339 9.41053 6.09103 9.50007 6.09103ZM11.0634 17.6184C10.9355 17.4905 10.8637 17.3171 10.8637 17.1362C10.8637 16.9554 10.9355 16.782 11.0634 16.6541C11.1913 16.5262 11.3647 16.4544 11.5455 16.4544C11.7264 16.4544 11.8998 16.5262 12.0276 16.6541C12.1555 16.782 12.2273 16.9554 12.2273 17.1362C12.2273 17.3171 12.1555 17.4905 12.0276 17.6184C11.8998 17.7462 11.7264 17.8181 11.5455 17.8181C11.3647 17.8181 11.1913 17.7462 11.0634 17.6184Z"})})}function T5(){return d("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"#333333",xmlns:"http://www.w3.org/2000/svg",children:d("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.7719 2L17.7647 5.98965V8.88235V17.3529V18.4118C17.7647 18.833 17.5974 19.237 17.2995 19.5348C17.0017 19.8327 16.5977 20 16.1765 20H5.58824C5.16701 20 4.76304 19.8327 4.46518 19.5348C4.16733 19.237 4 18.833 4 18.4118V17.3529V8.88235V3.58824C4 3.16701 4.16733 2.76304 4.46518 2.46518C4.76304 2.16733 5.16701 2 5.58824 2H13.7719ZM13.9778 4.45118V6.20988H15.7376L13.9778 4.45118ZM5.58817 18.4118V17.3529V3.58823H12.3895L12.3901 7.79758H16.1764V17.3529V18.4118H5.58817ZM14.9956 9.33215H6.76855V10.5674H14.9956V9.33215ZM6.76855 12.1116H14.9956V13.3469H6.76855V12.1116ZM11.3268 14.78H6.76855V16.0153H11.3268V14.78Z"})})}function W4(){let e=kr(),{t,lang:n}=W();return d(xe,{children:[d("header",{className:"header-navbar",children:[d("a",{class:"header-navbar-brand",href:"https://immersivetranslate.com",target:"_blank",children:[d(y5,{}),d("h1",{children:t("browser.shortBrandName")})]}),d("span",{class:"version",children:e}),d("div",{style:{flex:1}}),d("div",{class:"header-right",children:[d(L_,{}),d(__,{})]})]}),d("div",{className:"header-navbar-height"})]})}function L_(){let{t:e}=W();return d("a",{class:"header-navbar-item mobile-hidden",href:z2,target:"_blank",children:[d(C5,{}),d("span",{children:e("options.navbar.installApp")})]})}function __(){let{t:e}=W();return d(tr,{text:e("translateFileTooltip"),position:"bottom",tipStyle:{whiteSpace:"pre"},multiple:!0,children:d("a",{class:"header-navbar-item ml-8",href:Y2,target:"_blank",children:[d(T5,{}),d("span",{children:e("options.navbar.translateFile")})]})})}function v5(){let e=document.getElementById("mount");e&&(async()=>{cd(Ob);let t=await pt();t.sentryConfig,t.debug&&I.setLevel("debug"),globalThis.location.hash||(globalThis.location.hash="#general");let n=await bn({url:"http://localhost",config:t});mt("options_page_view",[{name:"options_page_view"}],{...n,sourceLanguage:globalThis.location.hash}),_a(document,n),la(d(qi,{lang:t.interfaceLanguage,fallbackLang:"en",translations:wi,children:d(M_,{donateUrl:t.donateUrl,config:t})}),e)})()}function M_(e){let t=am(),{t:n,lang:r}=W(),a=kr(),{config:o}=e,i=[{name:n("general"),props:{href:"#general",className:"secondary"}},{name:n("subtitle"),props:{href:"#subtitle",className:"secondary"}},{name:n("inputOptions"),props:{href:"#input",className:"secondary"}},{name:n("mouseHoverOptions"),props:{href:"#mouse_hover",className:"secondary"}},{name:n("floatBallOptions"),props:{href:"#floating",className:"secondary"}},{name:n("shortcutSettings"),props:{href:"#shortcuts",className:"secondary"}},{name:n("advanced"),props:{href:"#advanced",className:"secondary"}},{name:n("import_export"),props:{href:"#import_export",className:"secondary"}},{name:n("about"),props:{href:"#about",className:"secondary"}}];r.startsWith("zh")||i.splice(i.length-1,0,{name:n("contact"),props:{href:"#contact",className:"secondary"}}),i.forEach(u=>{t===u.props.href&&(u.props.className="primary",u.props["aria-current"]="page")});let s=!0;return We()&&(s=o.generalRule.showSponsorOnSafari),d(ut,{children:[d(W4,{}),d(xe,{children:d("main",{class:"container-fluid",children:[d("aside",{children:d("nav",{class:"menu-nav flex flex-col h-full justify-between ",children:[d("div",{children:d("ul",{class:"flex flex-wrap flex-start min-[992px]:block text-sm min-[992px]:text-base",children:i.map((u,l)=>d("li",{class:"li",children:d("a",{...u.props,children:u.name})},`nav-${l}`))})}),d("div",{class:"m-0 p-0 flex flex-wrap min-[992px]:flex-col max-[992px]:mt-2",children:[s&&d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:e.donateUrl,children:n("donateCafe")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:$l,children:n("document")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"https://immersivetranslate.com/docs/CHANGELOG/",children:n("changelog")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:K2,children:n("feedbackAndJoin")}),d("a",{class:"py-3 text-xs no-focus secondary mr-2",href:"#developer",children:n("developer")})]})]})}),d("div",{role:"main",children:d(rm,{value:t,defaultCase:d(q0,{}),cases:{"#general":d(q0,{}),"#mouse_hover":d(j4,{}),"#input":d(Sp,{}),"#shortcuts":d(z4,{}),"#floating":d(H4,{}),"#import_export":d(fp,{}),"#about":d(Dp,{}),"#advanced":d(kp,{}),"#developer":d(wp,{}),"#subtitle":d(Lp,{}),"#contact":d(Ap,{}),"#download_config":d(q4,{})}})})]})})]})}globalThis.__IS_IMMERSIVE_TRANSLATE_WEB_OPTIONS_PAGE__=!0;var $4=!1;function P_(){if($4)return;if(L1(),!document.querySelector("meta[name=immersive-translate-options]"))throw new Error("Options meta element not found");let t=document.getElementById("immersive-translate-status");if(!t)throw new Error("Status element not found");let n=document.getElementById("immersive-translate-page-ready");if(!n)throw new Error("Page ready input element not found");function r(a){let o=a.target.value;o==="true"?($4=!0,t.innerText="",n.removeEventListener("change",r),v5()):t.innerText="Page Status: "+o}n.addEventListener("change",r),setTimeout(()=>{$4||(t.innerHTML=`\u65E0\u6CD5\u68C0\u6D4B\u5230 \u6C89\u6D78\u5F0F\u7FFB\u8BD1 \u6269\u5C55. \u8BF7\u786E\u8BA4\u5DF2\u5B89\u88C5\u5E76\u542F\u7528\u6C89\u6D78\u5F0F\u6269\u5C55\uFF0C\u5E76\u6388\u6743\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u8BBF\u95EE\u6240\u6709\u7F51\u7AD9\u7684\u6743\u9650\u3002

\u5982\u679C\u4F60\u4F7F\u7528\u7684\u662FiOS Safari \u6D4F\u89C8\u5668\u6269\u5C55\uFF0C\u53EF\u4EE5\u53C2\u8003\u4EE5\u4E0B\u89C6\u9891\u542F\u7528\u6C89\u6D78\u5F0F\u7FFB\u8BD1\u6269\u5C55\uFF1A